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,900 | Bandits Dueling on Partially Ordered Sets Julien Audiffren CMLA ENS Paris-Saclay, CNRS Universit´e Paris-Saclay, France julien.audiffren@gmail.com Liva Ralaivola Lab. Informatique Fondamentale de Marseille CNRS, Aix Marseille University Institut Universitaire de France F-13288 Marseille Cedex 9, France liva.ralaivola@lif.univ-mrs.fr Abstract We address the problem of dueling bandits defined on partially ordered sets, or posets. In this setting, arms may not be comparable, and there may be several (incomparable) optimal arms. We propose an algorithm, UnchainedBandits, that efficiently finds the set of optimal arms —the Pareto front— of any poset even when pairs of comparable arms cannot be a priori distinguished from pairs of incomparable arms, with a set of minimal assumptions. This means that UnchainedBandits does not require information about comparability and can be used with limited knowledge of the poset. To achieve this, the algorithm relies on the concept of decoys, which stems from social psychology. We also provide theoretical guarantees on both the regret incurred and the number of comparison required by UnchainedBandits, and we report compelling empirical results. 1 Introduction Many real-life optimization problems pose the issue of dealing with a few, possibly conflicting, objectives: think for instance of the choice of a phone plan, where a right balance between the price, the network coverage/type, and roaming options has to be found. Such multi-objective optimization problems may be studied from the multi-armed bandits perspective (see e.g. Drugan and Nowe [2013]), which is what we do here from a dueling bandits standpoint. Dueling Bandits on Posets. Dueling bandits [Yue et al., 2012] pertain to the K-armed bandit framework, with the assumption that there is no direct access to the reward provided by any single arm and the only information that can be gained is through the simultaneous pull of two arms: when such a pull is performed the agent is informed about the winner of the duel between the two arms. We extend the framework of dueling bandits to the situation where there are pairs of arms that are not comparable, that is, we study the case where there might be no natural order that could help decide the winner of a duel—this situation may show up, for instance, if the (hidden) values associated with the arms are multidimensional, as is the case in the multi-objective setting mentioned above. The notion of incomparability naturally links this problem with the theory of posets and our approach take inspiration from works dedicated to selecting and sorting on posets [Daskalakis et al., 2011]. Chasing the Pareto Front. In this setting, the best arm may no longer be unique, and we consider the problem of identifying among all available K arms the set of maximal incomparable arms, or the Pareto front, with minimal regret. This objective significantly differs from the usual objective of dueling bandit algorithms, which aim to find one optimal arm—such as a Condorcet winner, a Copeland winner or a Borda winner—and pull it as frequently as possible to minimize the regret. Finding the entire Pareto front (denoted P) is more difficult, but pertains to many real-world applications. For instance, in the discussed phone plan setting, P will contain both the cheapest plan and the plan offering the largest coverage, as well as any non dominated plan in-between; therefore, every customer may then find a a suitable plan in P in accordance with her personal preferences. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Key: Indistinguishability. In practice, the incomparability information might be difficult to obtain. Therefore, we assume the underlying incomparability structure, is unknown and inaccessible. A pivotal issue that arises is that of indistinguishability. In the assumed setting, the pull of two arms that are comparable and that have close values—and hence a probability for either arm to win a duel close to 0.5—is essentially driven by the same random process, i.e. an unbiased coin flip, as the draw of two arms that are not comparable. This induces the problem of indistinguishability: that of deciding from pulls whether a pair of arms is incomparable or is made of arms of similar strengths. Contributions. Our main contribution, the UnchainedBandits algorithm, implements a strategy based on a peeling approach (Section 3). We show that UnchainedBandits can find a nearly optimal approximation of the the set of optimal arms of S with probability at least 1−δ while incurring a regret upper bounded by R O ⇣ Kwidth(S) log K δ P i,i/2P 1 ∆i ⌘ , where ∆i is the regret associated with arm i, K the size of the poset and width(S) its width, and that this regret is essentially optimal. Moreover, we show that with little additional information, UnchainedBandits can recover the exact set of optimal arms, and that even when no additional information is available, UnchainedBandits can recover P by using decoy arms—an idea stemming from social psychology, where decoys are used to lure an agent (e.g., a customer) towards a specific good/action (e.g. a product) by presenting her a choice between the targetted good and a degraded version of it (Section 4). Finally, we report results on the empirical performance of our algorithm in different settings (Section 5). Related Works. Since the seminal paper of Yue et al. [2012] on Dueling Bandits, numerous works have proposed settings where the total order assumption is relaxed, but the existence of a Condorcet winner is assumed [Yue and Joachims, 2011, Ailon et al., 2014, Zoghi et al., 2014, 2015b]. More recent works [Zoghi et al., 2015a, Komiyama et al., 2016], which envision bandit problems from the social choice perspective, pursue the objective of identifying a Copeland winner. Finally, the works closest to our partial order setting are [Ramamohan et al., 2016] and [Dud´ık et al., 2015]. The former proposes a general algorithm which can recover many sets of winners—including the uncovered set, which is akin to the Pareto front; however, it is assumed the problems do not contain ties while in our framework, any pair of incomparable arms is encoded as a tie. The latter proposes an extension of dueling bandits using contexts, and introduces several algorithms to recover a Von Neumann winner, i.e. a mixture of arms that is better that any other—and in our setting, any mixture of arms from the Pareto front is a Von Neumann winner. It is worth noting that the aforementioned works aim to identify a single winner, either Condorcet, Copeland or Von Neumann. This is significantly different from the task of identifying the entire Pareto front. Moreover, the incomparability property is not addressed in previous works; if some algorithms may still be applied if incomparability is encoded as a tie, they are not designed to fully use this information, which is reflected by their performances in our experiments. Moreover, our lower bound illustrates the fact that our algorithm is essentially optimal for the task of identifying the Pareto front. Regarding decoys, the idea originates from social psychology; they introduce the idea that the introduction of strictly dominated alternatives may influence the perceived value of items. This has generated an abundant literature that studied decoys and their uses in various fields (see e.g. Tversky and Kahneman [1981], Huber et al. [1982], Ariely and Wallsten [1995], Sedikides et al. [1999]). From the computer science literature, we may mention the work of Daskalakis et al. [2011], which addresses the problem of selection and sorting on posets and provides relevant data structures and accompanying analyses. 2 Problem: Dueling Bandits on Posets We here briefly recall base notions and properties at the heart of our contribution. Definition 2.1 (Poset). Let S be a set of elements. (S, <) is a partially ordered set or poset if < is a partial reflexive, antisymmetric and transitive binary relation on S. Transitivity relaxation. Recent works on dueling bandits (see e.g. Zoghi et al. [2014]) have shown that the transitivity property is not required for the agent to successfully identify the maximal element (in that cas,e the Condorcet winner), if it is assumed to exists. Similarly, most of the results we provide do not require transitivity. In the following, we dub social poset a transitivity-free poset, i.e. a partial binary relation which is solely reflexive and antisymmetric. Remark 2.2. Throughout, we will use S to denote indifferently the set S or the social poset (S, <), the distinction being clear from the context. We make use of the additional notation: 8a, b 2 S 2 • a k b if a and b are incomparable (neither a < b nor b < a); • a ≻b if a < b and a 6= b; Definition 2.3 (Maximal element and Pareto front). An element a 2 S is a maximal element of S if 8b 2 S, a < b or a k b. We denote by P(S) .= {a : a < b or a k b, 8b 2 S}, the set of maximal elements or Pareto front of the social poset. Similarly to the problem of the existence of a Condorcet winner, P might be empty for social poset (in with posets there always is at least one maximal element). In the following, we assume that |P| > 0. The notions of chain and antichain are key to identify P. Definition 2.4 (Chain, Antichain, Width and Height). C ⇢S is a chain (resp. an antichain) if 8a, b 2 C, a < b or b < a (resp. a k b). C is maximal if 8a 2 S \ C, C [ {a} is not a chain (resp. an antichain). The height (resp. width) of S is the size of its longest chain (resp. antichain). K-armed Dueling Bandit on posets. The K-armed dueling bandit problem on a social poset S = {1, . . . , K} of arms might be formalized as follows. For all maximal chains {i1, . . . , im} of m arms there exist a family {γipiq}1p,qm of parameters such that γij 2 (−1/2, 1/2) and the pull of a pair (ip, iq) of arms from the same chain is the independent realization of a Bernoulli random variable Bipiq with expectation E(Bipiq) = 1/2 + γipiq, where Bipiq = 1 means that i is the winner of the duel between i and j and conversely (note that: 8i, j, γji = −γij). In the situation where the pair of arms (ip, iq) selected by the agent corresponds to arms such that ip k iq, a pull is akin to the toss of an unbiased coin flip, that is, γipiq = 0. This is summarized by the following assumption: Assumption 1 (Order Compatibility). 8i, j 2 S, (i ≻j) if and only if γij > 0. Regret on posets. In the total order setting, the regret incurred by pulling an arm i is defined as the difference between the best arm and arm i. In the poset framework, there might be multiple ’best’ arms, and we chose to define regret as the maximum of the difference between arm i and the best arm comparable to i. Formally, the regret ∆i is defined as : ∆i = max{γji, 8j 2 P such that j < i}. We then define the regret incurred by comparing two arms i and j by ∆i + ∆j. Note the regret of a comparison is zero if and only if the agent is comparing two elements of the Pareto front. Problem statement. The problem that we want to tackle is to identify the Pareto front P(S) of S as efficiently as possible. More precisely, we want to devise pulling strategies such that for any given δ 2 (0, 1), we are ensured that the agent is capable, with probability 1 −δ to identify P(S) with a controlled number of pulls and a bounded regret. "-indistinguishability. In our model, we assumed that if i k j, then γij = 0: if two arms cannot be compared, the outcome of the their comparison will only depend on circumstances independent from the arms (like luck or personal tastes). Our encoding of such framework makes us assume that when considered over many pulls, the effects of those circumstances cancel out, so that no specific arm is favored, whence γij = 0. The limit of this hypothesis and the robustness of our results when not satisfied are discussed in Section 5. This property entails the problem of indistinguishability evoked previously. Indeed, given two arms i and j, regardless of the number of comparisons, an agent may never be sure if either the two arms are very close to each other (γij ⇡0 and i and j are comparable) or if they are not comparable (γij = 0). This raises two major difficulties. First, any empirical estimation ˆγij of γij being close to zero is no longer a sufficient condition to assert that i and j have similar values; insisting on pulling the pair (i, j) to decide whether they have similar value may incur a very large regret if they are incomparable. Second, it is impossible to ensure that two elements are incomparable—therefore, identifying the exact Pareto set is intractable if no additional information is provided. Indeed,the agent might never be sure if the candidate set no longer contains unnecessary additional elements—i.e. arms very close to the real maximal elements but nonetheless dominated. This problem motivates the following definition, which quantifies the notion of indistinguishability: Definition 2.5 ("-indistinguishability). Let a, b 2 S and " > 0. a and b are "-indistinguishable, noted a k" b, if |γab| ". As the notation k" implies, the "-indistinguishability of two arms can be seen as a weaker form of incomparability, and note that as "-decreases, previously indistinguishable pairs of arms become dis3 Algorithm 1 Direct comparison Given (S, ≻) a social poset, δ, " > 0, a, b 2 S Define pab the average number of victories of a over b and Iab its 1 −δ confidence interval. Compare a and b until |Iab| < " or 0.5 62 Iab. return a k" b if |Iab| < ", else a ≻b if pab > 0.5, else b ≻a. Algorithm 2 UnchainedBandits Given S = {s1, . . . , sK} a social poset, δ > 0, N > 0, ("t)N t=1 2 RN + Define Set S0 = S. Maintain ˆp = (ˆpij)K i,j=1 the average number of victories of i against j and I = (Iij)K i,j=1 = min ⇣q log(NK2/δ) 2nij , 1 ⌘ the corresponding 1 −δ/NK2 confidence interval. Peel bP: for t = 1 to N do St+1 = UBSRoutine (St, "t, δ/N, A = Algorithm 1). return bP = SN+1 tinguishable, and the only 0−indistinguishable pair of arms are the incomparable pairs. The classical notions of a poset related to incomparability can easily be extended to fit the "-indistinguishability: Definition 2.6 ("-antichain, "-width and "-approximation of P). Let " > 0. C ⇢S is an "-antichain if 8a 6= b 2 C, we have a k" b. Additionally, P0 ⇢S is an "-approximation of P (noted P0 2 P") if P ⇢P0 and P0 is an "-antichain. Finally, width"(S) is the size of the largest "-antichain of S. Features of P". While the Pareto front is always unique, it might possess multiple "-approximations. The interest of working with P" is threefold: i) to find an "-approximation of P, the agent only has to remove the elements of S which are not "-indistinguishable from P; thus, if P cannot be recovered in the partially observable setting, an "-approximation of P can be obtained; ii) any set in P" contains P, so no maximal element is discarded; iii) for any B 2 P" all the elements of B are nearly optimal, in the sense that 8i 2 B, ∆i < ". It is worth noting that "-approximations of P may structurally differ from P in some settings, though. For instance, if S includes an isolated cycle, an "-approximation of the Pareto front may contain elements of the cycle and in such case, approximating the Pareto front using "-approximation may lead to counterintuitive results. Finding an "-approximation of P is the focus of the next subsection. 3 Chasing P" with UnchainedBandits 3.1 Peeling and the UnchainedBandits Algorithm While deciding if two arms are incomparable or very close is intractable, the agent is able to find if two arms a and b are "-indistinguishable, by using for instance the direct comparison process provided by Algorithm 1. Our algorithm, UnchainedBandits, follows this idea to efficiently retrieve an "-approximation of the Pareto front. It is based on a peeling technique: given N > 0 and a decreasing sequence ("t)1tN it computes and refines an "t-approximation bPt of the Pareto front, using UBSRoutine (Algorithm 3), which considers "t-indistinguishable arms as incomparable. Peeling S. Peeling provides a way to control the time spent on pulling indistinguishable arms, and it is used to upper bound the regret.Without peeling, i.e. if the algorithm were directly called with "N, the agent could use a number of pulls proportional to 1/"2 N trying to distinguish two incomparable arms, even though one of them is a regret inducing arm (e.g. an arm j with a large |γi,j| for some i 2 P). The peeling strategy ensures that inefficient arms are eliminated in early epochs, before the agent can focus on the remaining arms with an affordable larger number of comparisons. Algorithm subroutine. At each epoch, UBSRoutine (Algorithm 3), called on St with parameter " > 0 and δ > 0, works as follows. It chooses a single initial pivot—an arm to which other arms are compared—and successively examines all the elements of St. The examined element p is compared to all the pivots (the current pivot and the previously collected ones), using Algorithm 1 with parameters " and δ/K2. Each pivot that is dominated by p is removed from the pivot set. If after being compared to all the pivots, p has not been dominated, it is added to the pivot set. At the end, the set of remaining pivots is returned. 4 Algorithm 3 UBSRoutine Given St a social poset, "t > 0 a precision criterion, δ0 an error parameter Initialisation Choose p 2 St at random. Define bP = {p} the set of pivots. Construct bP for c 2 St \ {p} do for c0 2 bP, compare c and c0 using Algorithm 1 with (δ = δ0/|St|2, " = "t). 8c0 2 bP, such that c ≻c0, remove c0 from bP if 8c0 2 bP, c k"t c0 then add c to bP return ˆP Reuse of informations. To optimize the efficiency of the peeling process, UnchainedBandits reuses previous comparison results: the empirical estimates pab and the corresponding confidence intervals Iab are initialized using the statistics collected from previous pulls of a and b. 3.2 Regret Analysis In this part, we focus on geometrically decreasing peeling sequence, i.e. 9β > 0 such that "t = βt 8n ≥0. We now introduce the following Theorem1 which gives an upper bound on the regret incurred by UnchainedBandits. Theorem 1. Let R be the regret generated by Algorithm 2 applied on S with parameters δ, N and with a decreasing sequence ("t)N t=1 such that "t = βt, 8t ≥0. Then with probability at least 1 −δ, UnchainedBandits successfully returns ˆP 2 P"N after at most T comparisons, with T O & Kwidth"N (S)log(NK2/δ)/"2 N ' (1) R 2K β2 log ✓2NK2 δ ◆K X i=1 1 ∆i (2) The 1/β2 reflects the fact that a careful peeling, i.e. β close to 1, is required to avoid unnecessary expensive (regret-wise) comparisons: this prevents the algorithm from comparing two incomparable— yet severely suboptimal—arms for an extended period of time. Conversely, for a given approximation accuracy "N = ", N increases as −1/ log β, since βN = ", which illustrates the fact that unnecessary peeling, i.e. peeling that do not remove any arms, lead to a slightly increased regret. In general, β should be chosen close to 1 (e.g. 0.95), as the advantages tend to surpass the drawbacks—unless additional information about the poset structure are known. Influence of the complexity of S. In the bounds of Theorem 1, the complexity of S influences the result through its total size |S| = K and its width. One of the features of UnchainedBandits is that the dependency in S in Theorem 1 is |S|width(S) and not |S|2. For instance, if S is actually equipped with a total order, then width(S) = 1 and we recover the best possible dependency in |S|—which is highlighted by the lower bound (see Theorem 2). Comparison Lower Bound. We will now prove that the previous result is nearly optimal in order. Let A denotes a dueling bandit algorithm on hidden posets. We first introduce the following Assumption: Assumption 2. 8K > W 2 N+ ⇤, for all δ > 0, 1/8 > " > 0, for any poset S such that |S| K and max (|P"(S)|) W, A identify an "-approximation of the Pareto front P" of S with probability at least 1 −δ with at most T δ," A (K, W) comparisons. Theorem 2. Let A be a dueling bandit algorithm satisfying Assumption 2. Then for any δ > 0, 1/8 > " > 0, K and W two positive integers such that K > W > 0, there exists a poset S such that |S| = K, width(S) = |P(S)| = W, max (|P"(S)|) W and E ⇣ T δ," A (K, W)|A(S) = P(S) ⌘ ≥e⇥ ✓ KW log(1/δ) "2 ◆ . The main discrepancy between the usual dueling bandit upper and lower bounds for regret is the K factor (see e.g. [Komiyama et al., 2015]) and ours is arguably the K factor. It is worth noting that 1The complete proof for all our results can be found in the supplementary material. 5 Algorithm 4 Decoy comparison Given (S, ≻) a poset, δ, ∆> 0, a, b 2 S Initialisation Create a0, b0 the respective ∆- decoy of a, b. Maintains pab the average number of victory of a over b and Iab its 1 −δ/2 confidence interval, Compare a and b0, b and a0, until max(|Iab0|, |Iba0|) < ∆or pab0 > 0.5 or pa0b > 0.5. return a k" b if max(|Iab0|, |Iba0|) < ∆, else a ≻b if pab0 > 0.5, else b ≻a. this additional complexity is directly related to the goal of finding the entire Pareto front, as can be seen in the proof of Theorem 2 (see Supplementary). 4 Finding P using Decoys In this section, we discuss several methods to recover the exact Pareto front from an "-approximation, when S is a poset. First, note that P can be found if additional information on the poset is available. For instance, if a lower bound c > 0 on the minimum distance of any arm to the Pareto set—defined as d(P) = min{γij, 8i 2 P, j 2 S \ P, such that i ≻j}—is known, then since Pc = {P}, UnchainedBandits used with "N = c will produce the Pareto front of S. Alternatively, if the size k of the Pareto front is known, P can be found by peeling St until it achieves the desired size. This can be achieved by successively calling UBSRoutine with parameters St, "t = βt, and δt = 6δ/⇡2t2, and by stopping as soon as |St| = k. This additional information may be unavailable in practice, so we propose an approach which does not rely on external information to solve the problem at hand. We devise a strategy which rests on the idea of decoys, that we now fully develop. First, we formally define decoys for posets, and we prove that it is a sufficient tool to solve the incomparability problem (Algorithm 4). We also present methods for building those decoys, both for the purely formal model of posets and for real-life problems. In the following, ∆is a strictly positive real number. Definition 4.1 (∆-decoy). Let a 2 S. Then b 2 S is said to be a ∆-decoy of a if : 1. a < b and γa,b ≥∆; 2. 8c 2 S, a k c implies b k c; 3. 8c 2 S such that c < a, γc,b ≥∆. The following proposition illustrates how decoys can be used to assess incomparability. Proposition 4.2 (Decoys and incomparability). Let a and b 2 S. Let a0 (resp. b0) be a ∆-decoy of a (resp. b). Then a and b are comparable if and only if max(γb,a0, γa,b0) ≥∆. Algorithm 4 is derived from this result. The next proposition, which is an immediate consequence of Proposition 4.2, gives a theoretical guarantee on its performance. Proposition 4.3. Algorithm 4 returns the correct incomparability result with probability at least 1 −δ after at most T comparisons, where T = 4log(4/δ)/∆2. Adding decoys to a poset. A poset S may not contain all the necessary decoys. To alleviate this, the following proposition states that it is always possible to add relevant decoys to a poset. Proposition 4.4 (Extending a poset with a decoy). Let (S, <, γ) be a dueling bandit problem on a poset S and a 2 S. Define a0, S0, ≻0, γ0 as follows: • S0 = S [ {a0} • 8b, c 2 S, b < c i.f.f. b <0 c and γ0 b,c = γb,c • 8b 2 S, if b < a then b < a0 and γ0 b,a0 = max(γb,a, ∆). Otherwise, b k a0. Then (S0, <0, γ0) defines a dueling bandit problem on poset, γ0 |S = γ, and a0 is a ∆-decoy of a. Note that the addition of decoys in a poset does not disqualify previous decoys, so that this proposition can be used iteratively to produce the required number of decoys. Decoys in real-life. The intended goal of a decoy a0 of a is to have at hand an arm that is known to be lesser than a. Creating such a decoy in real-life can be done by using a degraded version of a: for the case of an item in a online shop, a decoy can be obtained by e.g. increasing the price. Note that while for large values of the ∆parameter of the decoys Algorithm 4 requires less comparisons (see 6 Table 1: Comparison between the five films with the highest average scores (bottom line) and the five films of the computed "-pareto set (top line). Pareto Front Pulp Fiction Fight Club Shawshank Redemption The Godfather Star Wars Ep. V Top Five Pulp Fiction Usual Suspect Shawshank Redemption The Godfather The Godfather II Proposition 4.3), in real-life problems, the second point of Definition 4.1 tends to become false: the new option is actually so worse than the original that the decoy becomes comparable (and inferior) to all the other arms, including previously non comparable arms (example: if the price becomes absurd). In that case, the use of decoys of arbitrarily large ∆can lead to erroneous conclusions about the Pareto front and should be avoided. Given a specific decoy, the problem of estimating ∆in a real-life problem may seem difficult. However, as decoys are not new—even though the use we make of them here is—a number of methods [Heath and Chatterjee, 1995] have been designed to estimate the quality of a decoy, which is directly related to ∆, and, with limited work, this parameter may be estimated as well. We refer the interested reader to the aforementioned paper (and references therein) for more details on the available estimation methods. Using decoys. As a consequence of Proposition 4.3, Algorithm 3 used with decoys instead of direct comparison and " = ∆will produce the exact Pareto front. But this process can be very costly, as the number of required comparison is proportional to 1/∆2, even for strongly suboptimal arms. Therefore, our algorithm, UnchainedBandits, when combined with decoys, first produces an "-approximation bP of P using a peeling approach and direct comparisons before refining it into P by using Algorithm 3 together with decoys. The following theorems provide guarantees on the performances of this modification of UnchainedBandits. Theorem 3. UnchainedBandits applied on S with ∆decoys, parameters δ,N and with a decreasing sequence ("t)N−1 t=1 lower bounded by ∆ q K width(S), returns the Pareto front P of S with probability at least 1 −δ after at most T comparisons, with T O & Kwidth(S)log(NK2/δ)/∆2' (3) Theorem 4. UnchainedBandits applied on S with ∆decoys, parameters δ,N and with a decreasing sequence ("t)N−1 t=1 such that "N−1 ∆ p K. returns the Pareto front P of S with probability at least 1 −δ while incurring a regret R such that R 2K β2 log ✓2NK2 δ ◆K X i=1 1 ∆i + Kwidth(S) log ✓2NK2 δ ◆ X i,∆i<"N−1,i/2P 1 ∆i , (4) Compared to (2), (4) includes an extra term due to the regret incurred by the use of decoys. In this term, the dependency in S is slightly worse (Kwidth(S) instead of K). However, this extra regret is limited to arms belonging to an "-approximation of the Pareto front, i.e. nearly optimal arms. Constraints on ". Theorem 4 require that "t p K∆, which implies that only near-optimal arms remain during the decoy step. This is crucial to obtain a reasonable upper bound on the incurred regret, as the number of comparisons using decoys is large (⇡1/∆2) and is the same for every arm, regardless of its regret. Conversely, in Theorem 3—which provides an upper bound on the number of comparisons required to find the Pareto front—the "t are required to be lower bounded. This bound is tight in the (worst-case) scenario where all the arms are ∆-indistinguishable, i.e. peeling cannot eliminate any arm. In that case, any comparison done during the peeling is actually wasted, and the lower bound on "t allows to control the number of comparisons made during the peeling step. In order to satisfy both constraints, "N must be chosen such that p K/width(S)∆"N p K∆. In particular "N = p K∆satisfy both condition and does not rely on the knowledge of width(S). 5 Numerical Simulations 5.1 Simulated Poset Here, we test UnchainedBandits on randomly generated posets of different sizes, widths and heights. To evaluate the performance of UnchainedBandits, we compare it to three variants of dueling bandit algorithms which were naively modified to handle partial orders and incomparability: 7 Figure 1: Regret incurred by Modified IF2, Modified RUCB, UniformSampling and UnchainedBandits, when the structure of the poset varies. Dependence on (left:) height, (center:) size of the Pareto front and (right:) addition of suboptimal arms. 1. A simple algorithm, UniformSampling, inspired from the successive elimination algorithm [Even-Dar et al., 2006], which simultaneously compares all possible pairs of arms until one of the arms appears suboptimal, at which point it is removed from the set of selected arms. When only ∆-indistinguishable elements remain, it uses ∆-decoys. 2. A modified version of the single-pivot IF2 algorithm [Yue et al., 2012]. Similarly to the regular IF2 algorithm, the agent maintains a pivot which is compared to every other elements; suboptimal elements are removed and better elements replace the pivot. This algorithm is useful to illustrate consequences of the multi-pivot approach. 3. A modified version of RUCB [Zoghi et al., 2014]. This algorithm is useful to provide a non pivot based perspective. More precisely, IF2 and RUCB were modified as follows: the algorithms were provided with the additional knowledge of d(P), the minimum gap between one arm of the Pareto front and any other given comparable arm. When during the execution of the algorithm, the empirical gap between two arms reaches this threshold, the arms were concluded to be incomparable. This allowed the agent to retrieve the Pareto front iteratively, one element at a time. The random posets are generated as follows: a Pareto front of size p is created, and w disjoint chains of length h −1 are added. Then, the top of the chains are connected to a random number of elements of the Pareto front. This creates the structure of the partial order ≻. Finally, the exact values of the γij’s are obtained from a uniform distribution, conditioned to satisfy Assumption 1 and to have d(P) ≥0.01. When needed, ∆-decoys are created according to Proposition 4.4. For each experiment, we changed the value of one parameter, and left the other to their default values (p = 5, w = 2p, h = 10). Additionally, we provide one experiment where we studied the influence of the quality of the arms (∆i) on the incurred regret, by adding clearly suboptimal arms2 to an existing poset. The results are averaged over ten runs, and can be found in reported on Figure 1. By default, we use δ = 1/1000 and ∆= 1/100, β = 0.9 and N = blog( p K∆)/ log β)c. Result Analysis. While UniformSampling implements a naive approach, it does outperform the modified IF2. This can be explained as in modified IF2, the pivot is constantly compared to all the remaining arms, including all the uncomparable, and potentially strongly suboptimal arms. These uncomparable arms can only be eliminated after the pivot has changed, which can take a large number of comparison, and produces a large regret. UnchainedBandits and modified RUCB produce much better results than UniformSampling and modified IF2, and their advantage increases with the complexity of S. While UnchainedBandits performs better that modified RUCB in all the experiments, it is worth noting that this difference is particularly important when additional suboptimal arms are added. In RUCB, the general idea is roughly to compare the best optimistic arm available to its closest opponent. While this approach works greatly in totally ordered set, in poset it produces a lot of comparisons between an optimal arm i and an uncomparable arm j—because in this case γij = 0.5, and j appears to be a close opponent to i, even though j can be clearly suboptimal. 2For this experiment, we say that an arm j is clearly suboptimal if 9c 2 P s.t. γcj > 0.15 8 5.2 MovieLens Dataset To illustrate the application of UnchainedBandits to a concrete example, we used the 20 millions items MovieLens dataset (Harper and Konstan [2015]), which contains movie evaluations. Movies can be seen as a poset, as two movies may be incomparable because they are from different genres (e.g. a horror movie and a documentary). To simulate a dueling bandit on a poset we proceed as follows: we remove all films with less than 50000 evaluations, thus obtaining 159 films, represented as arms. Then, when comparing two arms, we pick at random a user which has evaluated both films, and compare those evaluations (ties are broken with an unbiased coin toss). Since the decoy tool cannot be used in an offline dataset, we restrict ourselves to finding an "-approximation of the Pareto front, with " = 0.05, and parameters β = 0.9, δ = 0.001 and N = blog "/ log βc = 28. Due to the lack of a ground-truth for this experiment, no regret estimation can be provided. Instead, the resulting "-Pareto front, which contains 5 films, is listed in Table 1, and compared to the five films among the original 159 with the highest average scores. It is interesting to note that three films are present in both list, which reflects the fact that the best films in term of average score have a high chance of being in the Pareto Front. However, the films contained in the Pareto front are more diverse in term of genre, which is expected of a Pareto front. For instance, the sequel of the film ”The Godfather” has been replaced by a a film of a totally different genre. It is important to remember that UnchainedBandits does not have access to any information about the genre of a film: its results are based solely on the pairwise evaluation, and this result illustrates the effectiveness of our approach. Limit of the uncomparability model. The hypothesis that i k j ) γij = 0 might not always hold true in all real life settings: for instance movies of a niche genre will probably get dominated in users reviews by movies of popular genre—even if they are theoretically incomparable—resulting in their elimination by UnchainedBandit. This might explains why only 5 movies are present in our " pareto front. However, even in this case, the algorithm will produce a subset of the Pareto Front, made of uncomparable movies from popular genres. Hence, while the algorithm fails at finding all the different genre, it still provides a significant diversity. 6 Conclusion We introduced dueling bandits on posets and the problem of "-indistinguishability. We provided a new algorithm, UnchainedBandits, together with theoretical performance guarantees and compelling experiments to identify the Pareto front. Future work might include the study of the influence of additional hypotheses on the structure of the social poset, and see if some ideas proposed here may carry over to lattices or upper semi-lattices. Additionally, it is an interesting question whether different approaches to dueling bandits, such as Thompson Sampling [Wu and Liu, 2016], could be applied to the partial order setting, and whether results for the von Neumann problem [Balsubramani et al., 2016] can be rendered valid in the poset setting. Acknowledgement We would like to thank the anonymous reviewers of this work for their useful comments, particularly regarding the future work section. 9 References Nir Ailon, Zohar Karnin, and Thorsten Joachims. Reducing dueling bandits to cardinal bandits. In Proceedings of The 31st International Conference on Machine Learning, pages 856–864, 2014. Dan Ariely and Thomas S Wallsten. Seeking subjective dominance in multidimensional space: An explanation of the asymmetric dominance effect. Organizational Behavior and Human Decision Processes, 63(3):223–232, 1995. Akshay Balsubramani, Zohar Karnin, Robert E Schapire, and Masrour Zoghi. Instance-dependent regret bounds for dueling bandits. In Conference on Learning Theory, pages 336–360, 2016. Constantinos Daskalakis, Richard M Karp, Elchanan Mossel, Samantha J Riesenfeld, and Elad Verbin. Sorting and selection in posets. SIAM Journal on Computing, 40(3):597–622, 2011. Madalina M Drugan and Ann Nowe. Designing multi-objective multi-armed bandits algorithms: a study. In Neural Networks (IJCNN), The 2013 International Joint Conference on, pages 1–8. IEEE, 2013. Miroslav Dud´ık, Katja Hofmann, Robert E Schapire, Aleksandrs Slivkins, and Masrour Zoghi. Contextual dueling bandits. In Conference on Learning Theory, pages 563–587, 2015. Eyal Even-Dar, Shie Mannor, and Yishay Mansour. Action elimination and stopping conditions for the multiarmed bandit and reinforcement learning problems. The Journal of Machine Learning Research, 7:1079–1105, 2006. Uriel Feige, Prabhakar Raghavan, David Peleg, and Eli Upfal. Computing with noisy information. SIAM Journal on Computing, 23(5):1001–1018, 1994. F Maxwell Harper and Joseph A Konstan. The movielens datasets: History and context. ACM Transactions on Interactive Intelligent Systems (TiiS), 5(4):19, 2015. Timothy B Heath and Subimal Chatterjee. Asymmetric decoy effects on lower-quality versus higher-quality brands: Meta-analytic and experimental evidence. Journal of Consumer Research, 22(3):268–284, 1995. Joel Huber, John W Payne, and Christopher Puto. Adding asymmetrically dominated alternatives: Violations of regularity and the similarity hypothesis. Journal of consumer research, pages 90–98, 1982. Junpei Komiyama, Junya Honda, Hisashi Kashima, and Hiroshi Nakagawa. Regret lower bound and optimal algorithm in dueling bandit problem. In Conference on Learning Theory, pages 1141–1154, 2015. Junpei Komiyama, Junya Honda, and Hiroshi Nakagawa. Copeland dueling bandit problem: Regret lower bound, optimal algorithm, and computationally efficient algorithm. arXiv preprint arXiv:1605.01677, 2016. Siddartha Y Ramamohan, Arun Rajkumar, and Shivani Agarwal. Dueling bandits: Beyond condorcet winners to general tournament solutions. In Advances in Neural Information Processing Systems, pages 1253–1261, 2016. B Robert. Ash. information theory, 1990. Constantine Sedikides, Dan Ariely, and Nils Olsen. Contextual and procedural determinants of partner selection: Of asymmetric dominance and prominence. Social Cognition, 17(2):118–139, 1999. Amos Tversky and Daniel Kahneman. The framing of decisions and the psychology of choice. Science, 211 (4481):453–458, 1981. Huasen Wu and Xin Liu. Double thompson sampling for dueling bandits. In Advances in Neural Information Processing Systems, pages 649–657, 2016. Yisong Yue and Thorsten Joachims. Beat the mean bandit. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 241–248, 2011. Yisong Yue, Josef Broder, Robert Kleinberg, and Thorsten Joachims. The k-armed dueling bandits problem. Journal of Computer and System Sciences, 78(5):1538–1556, 2012. Masrour Zoghi, Shimon Whiteson, Remi Munos, and Maarten D Rijke. Relative upper confidence bound for the k-armed dueling bandit problem. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 10–18, 2014. Masrour Zoghi, Zohar S Karnin, Shimon Whiteson, and Maarten de Rijke. Copeland dueling bandits. In Advances in Neural Information Processing Systems, pages 307–315, 2015a. Masrour Zoghi, Shimon Whiteson, and Maarten de Rijke. Mergerucb: A method for large-scale online ranker evaluation. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining, pages 17–26. ACM, 2015b. 10 | 2017 | 403 |
6,901 | Decomposition-Invariant Conditional Gradient for General Polytopes with Line Search Mohammad Ali Bashiri Xinhua Zhang Department of Computer Science, University of Illinois at Chicago Chicago, Illinois 60607 {mbashi4,zhangx}@uic.edu Abstract Frank-Wolfe (FW) algorithms with linear convergence rates have recently achieved great efficiency in many applications. Garber and Meshi (2016) designed a new decomposition-invariant pairwise FW variant with favorable dependency on the domain geometry. Unfortunately it applies only to a restricted class of polytopes and cannot achieve theoretical and practical efficiency at the same time. In this paper, we show that by employing an away-step update, similar rates can be generalized to arbitrary polytopes with strong empirical performance. A new “condition number” of the domain is introduced which allows leveraging the sparsity of the solution. We applied the method to a reformulation of SVM, and the linear convergence rate depends, for the first time, on the number of support vectors. 1 Introduction The Frank-Wolfe algorithm [FW, 1] has recently gained revived popularity in constrained convex optimization, in part because linear optimization on many feasible domains of interest admits efficient computational solutions [2]. It has been well known that FW achieves O(1/ϵ) rate for smooth convex optimization on a compact domain [1, 3, 4]. Recently a number of works have focused on linearly converging FW variants under various assumptions. In the context of convex feasibility problem, [5] showed linear rates for FW where the condition number depends on the distance of the optimum to the relative boundary [6]. Similar dependency was derived in the local linear rate on polytopes using the away-step [6, 7]. With a different analysis approach, [8–10] derived linear rates when the Robinson’s condition is satisfied at the optimal solution [11], but it was not made clear how the rate depends on the dimension and other problem parameters. To avoid the dependency on the location of the optimum, [12] proposed a variant of FW whose rate depends on some geometric parameters of the feasible domain (a polytope). In a similar flavor, [13, 14] analyzed four versions of FW including away-steps [6], and their affine-invariant rates depend on the pyramidal width (Pw) of the polytope, which is hard to compute and can still be ill-conditioned. Moreover, [15] recently gave a duality-based analysis for non-strongly convex functions. Some lower bounds on the dependency of problem parameters for linear rates of FW are given in [12, 16]. To get around the lower bound, one may tailor FW to specific objectives and domains (e.g. spectrahedron in [17]). [18] specialized the pairwise FW (PFW) to simplex-like polytopes (SLPs) whose vertices are binary, and is defined by equality constraints and xi ≥0. The advantages include: a) the convergence rate depends linearly on the cardinality of the optimal solution and the domain diameter square (D2), which can be much better than the pyramidal width; b) it is decomposition-invariant, meaning that it does not maintain a pool of atoms accumulated and the away-step is performed on the face that the current iterate lies on. This results in considerable savings in computation and storage. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. PFW-1 [18] PFW-2 [18] LJ [13] AFW-1 AFW-2 (SLP) general general (SLP) general Unit cube [0, 1]n ns × n2 ns n2s Pk = {x ∈[0, 1]n :1⊤x = k} ks × n (k = 1) ks k2s Qk = {x ∈[0, 1]n :1⊤x ≤k} × × k · Pw−2 × k2 min(sk, n) arbitrary polytope in Rn × × D2 · Pw−2 × D2nHs Table 1: Comparison of related methods. These numbers need to be multiplied with κ log 1 ϵ to get the convergence rates, where κ is the condition number of the objective, D is the diameter of the domain, s is the cardinality of the optimum, and Pw is the pyradimal width.. Our method is AFW. × means inapplicable or no rate known. PFW-1 [18] and AFW-1 apply only to SLP, hence not covering Qk (k≥2). [13] showed the pyramidal width for Pk only with k=1. However, [18] suffers from multiple inherent restrictions. First it applies only to SLPs, which although encompass useful sets such as k-simplex Pk, do not cover its convex hull with the origin (Qk): Pk = {x ∈[0, 1]n : 1⊤x = k}, Qk = {x ∈[0, 1]n : 1⊤x ≤k}, where k ∈{1, . . . , n}. Here 1 = (1, . . . , 1)⊤. Extending its analysis to general polytopes is not promising because it relies fundamentally on the integrality of the vertices. Second, its rate is derived from a delicately designed sequence of step size (PFW-1), which exhibits no empirical competency. In fact, the experiments in [18] resorted to line search (PFW-2). However no rate was proved for it. As shown in [13], dimension friendly bounds are intrinsically hard for PFW, and they settled for the factorial of the vertex number. The goal of this paper is to address these two issues while at the same time retaining the computational efficiency of decomposition invariance. Our contributions are four folds. First we generalize the dimension friendly linear rates to arbitrary polytopes, and this is achieved by replacing the pairwise PFW in [18] with the away-step FW (AFW, §2), and setting the step sizes by line search instead of a pre-defined schedule. This allows us to avoid “swapping atoms” in PFW, and the resulting method (AFW-2) delivers not only strong empirical performance (§5) but also strong theoretical guarantees (§3.5), improving upon PFW-1 and PFW-2 which are strong in either theory or practice, but not both. Second, a new condition number Hs is introduced in §3.1 to characterize the dimension dependency of AFW-2. Compared with pyramidal width, it not only provides a more explicit form for computation, but also leverages the cardinality (s) of the optimal solution. This may lead to much smaller constants considering the likely sparsity of the solution. Since pyramidal width is hard to compute [13], we leave the thorough comparison for future work, but they are comparable on simple polytopes. The decomposition invariance of AFW-2 also makes each step much more efficient than [13]. Third, when the domain is indeed an SLP, we provide a step size schedule (AFW-1, §3.4) yielding the same rate as PFW-1. This is in fact nontrivial because the price for replacing PFW by AFW is the much increased hardness in maintaining the integrality of iterates. The current iterate is scaled in AFW, while PFW simply adds (scaled) new atoms (which on the other hand complicates the analysis for line search [13]). Our solution relies on first running a constant number of FW-steps. Finally we applied AFW to a relaxed-convex hull reformulation of binary kernel SVM with bias (§4), obtaining O(nκ(#SV)3 log 1 ϵ ) computational complexity for AFW-1 and O(nκ(#SV)4 log 1 ϵ ) for AFW-2. Here κ is the condition number of the objective, n is the number of training examples, and #SV is the number of support vectors in the optimal solution. This is much better than the best known result of O(n3κ log 1 ϵ ) based on sequential minimal optimization [SMO, 19, 20], because #SV is typically much smaller than n. To the best of our knowledge, this is the first linear convergence rate for hinge-loss SVMs with bias where the rate leverages dual sparsity. A brief comparison of our method (AFW) with [18] and [13] is given in Table 1. AFW-1 matches the superior rates of PFW-1 on SLPs, and AFW-2 is more general and its rate is slightly worse than AFW-1 on SLPs. PFW-2 has no rates available, and pyramidal width is hard to compute in general. 2 Preliminaries and Algorithms Our goal is to solve minx∈P f(x), where P is a polytope and f is both strongly convex and smooth. A function f : P →R is α-strongly convex if f(y) ≥f(x)+⟨y −x, ∇f(x)⟩+ α 2 ∥y −x∥2 , ∀x, y ∈ 2 Algorithm 1: Decomposition-invariant Away-step Frank-Wolfe (AFW) 1 Initialize x1 by an arbitrary vertex of P. Set q0 = 1. 2 for t = 1, 2, . . . do 3 Choose the FW-direction via v+ t ←arg minv∈P ⟨v, ∇f(xt)⟩, and set dFW t ←v+ t −xt. 4 Choose the away-direction v− t by calling the away-oracle in (3), and set dA t ←xt −v− t . 5 if dFW t , −∇f(xt) ≥ dA t , −∇f(xt) then dt ←dFW t , else dt ←dA t . ▷Choose a direction 6 Choose the step size ηt by using one of the following two options: 7 Option 1: Pre-defined step size: ▷This is for SLP only. Need input arguments n0, γt. 8 if t ≤n0 then 9 Set qt = t, ηt = 1 t , and revert dt = dFW t . ▷Perform FW-step for the first n0 steps 10 else 11 Find the smallest integer s ≥0 such that qt defined as follows satisfies qt ≥⌈1/γt⌉: 12 qt ← 2sqt−1 + 1 if line 5 adopts the FW-step 2sqt−1 −1 if line 5 adopts the away-step , and ηt ←q−1 t . (2) 13 Option 2: Line search: ηt ←arg min η≥0 f(xt + ηdt), s.t. xt + ηdt ∈P. ▷General purpose 14 xt+1 ←xt + ηtdt. Return xt if −∇f(xt), dFW t ≤ϵ. Algorithm 2: Decomposition-invariant Pairwise Frank-Wolfe (PFW) (exactly the same as [18]) 1 ... as in Algorithm 1, except replacing a) line 5 by dt = dPFW t := v+ t −v− t , and b) line 8-11 by Option 1: Pre-defined step size: Find the smallest integer s ≥0 such that 2sqt−1 ≥1/γt. Set qt ←2sqt−1 and ηt ←q−1 t .▷This option is for SLP only. P. In this paper, all norms are Euclidean, and we write vectors in bold lowercase letters. f is βsmooth if f(y)≤f(x) + ⟨y −x, ∇f(x)⟩+ β 2 ∥y−x∥2, ∀x, y∈P. Denote the condition number as κ = β/α, and the diameter of the domain P as D. We require D < ∞, i.e. the domain is bounded. Let [m] := {1, . . . , m}. In general, a polytope P can be defined as P = {x ∈Rn : ⟨ak, x⟩≤bk, ∀k ∈[m], Cx = d}. (1) Here {ak} is a set of “directions” and is finite (m < ∞) and bk cannot be reduced without changing P. Although the equality constraints can be equivalently written as two linear inequalities, we separate them out to improve the bounds below. Denoting A = (a1, . . . , am)⊤and b = (b1, . . . , bm)⊤, we can simplify the representation into P = {x ∈Rn : Ax ≤b, Cx = d}. In the sequel, we will find highly efficient solvers for a special class of polytope that was also studied by [18]. We call a potytope as a simplex-like polytope (SLP), if all vertices are binary (i.e. the set of extreme points ext(P) are contained in {0, 1}n), and the only inequality constraints are x ∈[0, 1]n.1 Our decomposition-invariant Frank-Wolfe (FW) method with away-step is shown in Algorithm 1. There are two different schemes of choosing the step size: one with fixed step size (AFW-1) and one with line search (AFW-2). Compared with [13], AFW-2 enjoys decomposition invariance. Like [13], we also present a pairwise version in Algorithm 2 (PFW), which is exactly the method given in [18]. The efficiency of line search in step 13 of Algorithm 1 depends on the polytope. Although in general one needs a problem-specific procedure to compute the maximal step size, we will show in experiments some examples where such procedures with high computational efficiency are available. The idea of AFW is to compute a) the FW-direction in the conventional FW sense (call it FW-oracle), and b) the away-direction (call it away-oracle). Then pick the one that gives the steeper descent and take a step along it. Our away-oracle adopts the decomposition-invariant approach in [18], which differs from [13] by saving the cost of maintaining a pool of atoms. To this end, our search space in the away-oracle is restricted to the vertices that satisfy all the inequality constraints by equality if the 1Although [18] does not allow for x ≤1 constraints, we can add a slack variable yi: yi + xi = 1, yi ≥0. 3 current xt does so: v− t := arg maxv ⟨v, ∇f(xt)⟩, s.t. Av≤b, Cv=d, and ⟨ai, xt⟩= bi ⇒⟨ai, v⟩= bi ∀i. (3) Besides saving the space of atoms, this also dispenses with computing the inner product between the gradient and all existing atoms. Same as [18], it presumes efficient solutions to the away-oracle, which may preclude its applicability to problems where only the FW-oracle is efficiently solvable. We will show some examples that admit efficient away-oracle. Before moving on to the analysis, we here make a new, albeit quick, observation that this selection scheme is in fact decomposing xt implicitly. Specifically, it tries all possible decompositions of xt, and for each of them it finds the best away-direction in the traditional sense. Then it picks the best of the best over all proper convex decompositions of xt. Property 1. Denote S(x) := {S ⊆P : x is a proper convex combination of all elements in S}, where proper means that all elements in S have a strictly positive weight. Then the away-step in (3) is exactly equivalent to maxS∈S(xt) maxv∈S ⟨v, ∇f(xt)⟩. See the proof in Appendix A. 3 Analysis We aim to analyze the rate by which the primal gap ht := f(xt) −f(x∗) decays. Here x∗is the minimizer of f, and we assume it can be written as the convex combination of s vertices of P. 3.1 A New Geometric “Condition Number” of a Polytope Underlying the analysis of linear convergence for FW-style algorithms is the following inequality that involves a geometric ”condition number” Hs of the polytope: (v+ t and v− t are the FW and away-directions) p 2Hsht/α v+ t −v− t , ∇f(xt) ≤⟨x∗−xt, ∇f(xt)⟩. (4) In Theorem 3 of [13], this Hs is essentially the pyramidal width inverse. In Lemma 3 of [18], it is the cardinality of the optimal solution, which, despite being better than the pyramidal width, is restricted to SLPs. Our first key step here is to relax this restriction to arbitrary polytopes and define our Hs. Let {ui} be the set of vertices of the polytope P, and this set must be finite. We do not assume ui is binary. The following “margin” for each separating hyperplane directions ak will be important: gk := max i ⟨ak, ui⟩−second max i ⟨ak, ui⟩≥0. (5) Here the second max is the second distinct max in {⟨ak, ui⟩: i}. If ⟨ak, ui⟩is invariant to i, then this inequality ⟨ak, x⟩≤bk is indeed an equality constraint (⟨ak, x⟩= maxz∈P ⟨ak, z⟩) hence can be moved to Cx = d. So w.l.o.g, we assume gk > 0. Now we state the generalized result. Lemma 1. Let P be defined as in (1). Suppose x can be written as some convex combination of s number of vertices of P: x = Ps i=1 γiui, where γi ≥0, 1⊤γ = 1. Then any y ∈P can be written as y=Ps i=1(γi −∆i)ui +(1⊤∆)z, such that z ∈P, ∆i ∈[0, γi], and 1⊤∆≤√Hs ∥x −y∥where Hs := max S⊆[m],|S|=s n X j=1 X k∈S akj gk !2 . (6) In addition, Equation (4) holds with this definition of Hs. Note our Hs is defined here, not in (4). Some intuitive interpretations of Hs are in order. First the definition in (6) admits a much more explicit characterization than pyramidal width. The maximization in (6) ranges over all possible subsets of constraints with cardinality s, and can hence be much lower than if s = m (taking all constraints). Recall that pyramidal width is oblivious to, hence not benefiting from, the sparsity of the optimal solution. More comparisons are hard to make because [13] only provided an existential proof of pyramidal width, along with its value for simplex and hypercube only.2 However, Hs is clearly not intrinsic of the polytope. For example, by definition Hs = n for Q2. By contrast, we can introduce a slack variable y to Q2, leading to a polytope over [x; y] (vertical 2[21] showed pyramidal width is equivalent to a more interpretable quantity called ”facial distance”, and they derived its value for more examples. But the evaluation of its value remains challenging in general. 4 concatenation), with x ≥0, y ≥0, y + 1⊤x = 2. The augmented polytope enjoys Hs = s. Nevertheless, adding slack variables increases the diameter of the space and the vertices may no longer be binary. It also incurs more computation. Second, gk may approach 0 (tending Hs to infinity) when more linear constraints are introduced and vertices get closer neighbors. Hs is infinity if the domain is not a polytope, requiring an uncountable number of supporting hyperplanes. Third, due to the square in (6), Hs grows more rapidly as one variable participates in a larger number of constraints, than as a constraint involves a larger number of variables. When all gk = 1 and all akj are nonnegative, Hs grows with the magnitude of akj. However this is not necessarily the case when akj elements have mixed sign. Finally, Hs is relative to the affine subspace that P lies in, and is independent of linear equality constraints. The proof of Lemma 1 utlizes the fact that the lowest value of 1⊤∆is the optimal objective value of min∆,z 1⊤∆, s.t. 0 ≤∆≤γ, y = x −(u1, . . . , us)∆+ (1⊤∆)z, z ∈P, (7) where the inequalities are both elementwise. To ensure z ∈P, we require Az ≤b, i.e. (b1⊤−AU)∆≥A(y −x), where U = (u1, . . . , us). (8) The rest of the proof utilizes the optimality conditions of ∆, and is relegated to Appendix A. Compared with Lemma 2 of [18], our Lemma 1 does not require ext(P) to be binary, and allows arbitrary inequality constraints rather than only x ≥0. Note Hs depends on b indirectly, and employs a more explicit form for computation than pyramidal width. Obviously Hs is non-decreasing in s. Example 1. To get some idea, consider the k-simplex Pk or more general polytopes {x ∈[0, 1]n : Cx = d}. In this case, the inequality constraints are exclusively xi ∈[0, 1], meaning ak = ±ek for all k ∈[2n] in (1). Here ek stands for a canonical vector of straight 0 except a single 1 in the k-th coordinate. Obviously all gk = 1. Therefore by Lemma 1, one can derive Hs = s, ∀s ≤n. Example 2. To include inequality, let us consider Qk, the convex hull of a k-simplex. Lemma 1 implies its Hs = n + 3s −3, independent of k. One might hope to get better Hs when k = 1, since the constraint x ≤1 can be dropped in this case. Unfortunately, still Hs = n. Remark 1. The L0 norm of the optimal x can be connected with s simply by Caratheodory’s theorem. Obviously s = ∥x∥0 (L0 norm) for P1 and Q1. In general, an x in P may be decomposed in multiple ways, and Lemma 1 immediately applies to the lowest (best) possible value of s (which we will refer to as the cardinality of x following [18]). For example, the smallest s for any x ∈Pk (or Qk) must be at most ∥x∥0 + 1, because x must be in the convex hull of V := {y ∈{0, 1}n : 1⊤y = k, xi = 0 ⇒yi = 0 ∀i}. Clearly its affine hull has dimension ∥x∥0, and V is a subset of ext(Pk) = ext(Qk). 3.2 Tightness of Hs under a Given Representation of the Polytope We show some important examples that demonstrate the tightness of Lemma 1 with respect to the dimensionality (n) and the cardinality of x (s). Note the tightness is in the sense of satisfying the conditions in Lemma 1, not in the rate of convergence for the optimization algorithm. Example 3. Consider Q2. u1 = e1 is a vertex and let x = u1 (hence s = 1) and y = (1, ϵ, . . . , ϵ)⊤, where ϵ > 0 is a small scalar. So in the necessary condition (8), the row corresponding to 1⊤x ≤2 becomes ∆1 ≥(n −1)ϵ = √n −1 · ∥x −y∥. By Lemma 1, Hs = n which is almost n −1. Example 4. Let us see another example that is not simplex-like. Let ak = −ek + en+1 + en+2 for k ∈[n]. Let A = (a1, . . . , an)⊤= (−I, 1, 1) where I is the identity matrix. Define P as P = x ∈[0, 1]n+2 : Ax ≤1 , i.e. b = 1. Since A is totally unimodular, all the vertices of P must be binary. Let us consider x = Pn i=1 iϵei + ren+1 + (1 −rϵ)en+2, where r = n(n + 1)/2 and ϵ > 0 is a small positive constant. x can be represented as the convex combination of n + 1 vertices x = Xn i=1 iϵui + (1 −rϵ)un+1, where ui = ei + en+1 for i ≤n, and un+1 = en+2. (9) With U = (u1, . . . , un+1), we have b1⊤−AU = (I, 0). Let y = x + ϵen+1, which is clearly in P. Then (8) becomes ∆≥ϵ1, and so 1⊤∆≥ √ n2 ∥y −x∥. Applying Lemma 1 with s = n + 1 and gk = 1 for all k, we get Hs = 2n2 + n −1, which is of the same order of magnitude as n2. 3.3 Analysis for Pairwise Frank-Wolfe (PFW-1) on SLPs Equipped with Lemma 1, we can now extend the analysis in [18] to SLPs where the constraint of x ≤1 can be explicitly accommodated without having to introduce a slack variable which increases the diameter D and costs more computations. 5 Theorem 1. Applying PFW-1 to SLP, all iterates must be feasible and ht ≤βD2 2 (1 −c1)t−1 if we set γt = c1/2 1 (1−c1) t−1 2 , where c1 = α 16βHsD2 . The proof just replaces all card(x∗) in [18] with Hs. Slight effort is needed to guarantee the feasibility and we show it as Lemma 6 in Appendix A. When P is not an SLP or general inequality constraints are present, we resort to line search (PFW-2), which is more efficient than PFW-1 in practice. However, the analysis becomes challenging [13, 18], because it is difficult to bound the number of steps where the step size is clamped due to the feasibility constraint (the swap step in [13]). So [13] appealed to a bound that is the factorial of the number of vertices. Fortunately, we will show below that by switching to AFW, the line search version achieves linear rates with improved dimension dependency for general polytopes, and the pre-defined step version preserves the strong rates of PFW-1 on SLPs. These are all facilitated by the Hs in Lemma 1. 3.4 Analysis for Away-step Frank-Wolfe with Pre-defined Step Size (AFW-1) on SLPs We first show that AFW-1 achieves the same rate of convergence as PFW-1 on SLPs. Although this does not appear surprising and the proof architecture is similar to [18], we stress that the step size needs delicate modifications because the descent direction dt in PFW does not rescale xt, while AFW does. Our key novelty is to first run a constant number of FW-steps (O( 1 t ) rate), and start accepting away-steps when the step size is small enough to ensure feasibility and linear convergence. We first establish the feasibility of iterates under the pre-defined step sizes. Proofs are in Appendix A. Lemma 2 (Feasibility of iterates for AFW-1). Suppose P is an SLP and the reference step sizes {γt}t≥n0 are contained in [0, 1]. Then the iterates generated by AFW-1 are always feasible. Choosing the step size. Key to the AFW-1 algorithm is the delicately chosen sequence of step sizes. For AFW-1, define (logarithms are natural basis) γt = M1 θM2 √c0(1 −c1)(t−1)/2, where M1 = r α 8Hs , M2 = βD2 2 , θ = 52 (10) c1 = M 2 1 M2 θ −4 4θ2 < 1 200, n0 = 1 c1 , c0 = 3M2 log n0 n0 (1 −c1)1−n0. (11) Lemma 3. In AFW-1, we have ht ≤3 t M2 log t for all t ∈[2, n0]. Obviously n0 ≥200 by (11). This result is similar to Theorem 1 in [4]. However, their step size is 2/(t + 2) leading to a 2 t+2M2 rate of convergence. Such a step size will break the integrality of the iterates, and hence we adjusted the step size, at the cost of a log t term in the rates which can be easily handled in the sequel. The condition number c1 gets better (bigger) when: the strongly convex parameter α is larger, the smoothness constant β is smaller, the diameter D of the domain is smaller, and Hs is smaller. Lemma 4. For all t ≥n0, AFW-1 satisfies a) γt ≤1, b) γ−1 t+1 −γ−1 t ≥1, and c) ηt ∈[ 1 4γt, γt]. By Lemma 2 and Lemma 4a, we know that the iterates generated by AFW-1 are all feasible. Theorem 2. Applying AFW-1 to SLP, the gap decays as ht ≤c0(1 −c1)t−1 for all t ≥n0. Proof. By Lemma 3, hn0≤3M2 n0 log n0 = c0(1 −c1)n0−1. Let the result hold for some t ≥n0. Then ht+1 ≤ht + ηt ⟨dt, ∇f(xt)⟩+ β 2 η2 t D2 (smoothness of f) (12) ≤ht + ηt 2 v+ t −v− t , ∇f(xt) + β 2 η2 t D2 (by step 5 of Algorithm 1) (13) ≤ht −ηt 2 r α 2Hs p ht + β 2 η2 t D2 (by (4) and the fact ⟨x∗−xt, ∇f(xt)⟩≤−ht) (14) ≤ht −1 4M1γth1/2 t + β 2 γ2 t D2 (Lemma 4c and the defn. of M1) (15) = ht −M 2 1 4θM2 √c0(1 −c1)(t−1)/2h1/2 t + M 2 1 θ2M2 c0(1 −c1)t−1 (by defn. of γt) (16) ≤c0(1 −c1)t−1 1 −M 2 1 4θM2 + M 2 1 θ2M2 = c0(1 −c1)t (by defn. of c1). (17) 6 Here the inequality in step (17) is by treating (16) as a quadratic of h1/2 t and applying the induction assumption on ht. The last step completes the induction: the conclusion also holds for step t + 1. 3.5 Analysis for Away-step Frank-Wolfe with Line Search (AFW-2) We finally analyze AFW-2 on general polytopes with line search. Noting that f(xt +ηdt)−f(x∗) ≤ (14) (with ηt in (14) replaced by η), we minimize both sides over η : xt + ηdt ∈P. If none of the inequality constraints are satisfied as equality at the optimal ηt of line search, then we call it a good step and in this case ht+1 ≤ 1 − α 256βD2Hs ht, (Eq 14 in η is minimized at η∗ t := 1 βD2 M1h1/2 t ). (18) The only task left is to bound the number of bad steps (i.e. ηt clamped by its upper bound). In [13] where the set of atoms is maintained, it is easily shown that up to step t there can be only at most t/2 bad steps, and so the overall rate of convergence is slowed down by at most a factor of two. This favorable result no longer holds in our decomposition-invariant AFW. However, thanks to the special property of AFW, it is still not hard to bound the number of bad steps between two good steps. First we notice that such clamping never happens for FW-steps, because η∗ t ≤1 and for FW-steps, xt + ηtdt ∈P implicitly enforces ηt ≤1 only (after ηt ≥0 is imposed). For an away-step, if the line search is blocked by some constraint, then at least one inequality constraint will turn into an equality constraint if the next step is still away. Since AFW selects the away-direction by respecting all equality constraints, the succession of away-steps (called an away epoch) must terminate when the set of equalities define a singleton. For any index set of inequality constraints S ⊆[m], let P(S) := {x ∈P : ⟨aj, x⟩= bj, ∀j ∈S} be the set of points that satisfy these inequalities with equality. Let n(P) := max {|S| : S ⊆[m], |P(S)| = 1, |P(S′)| = ∞for all S′ ⊊S} (19) be the maxi-min number of constraints to define a singleton. Then obviously n(P) ≤n, and so Theorem 3. To find an ϵ accurate solution, AFW-2 requires at most O nβD2Hs α log 1 ϵ steps. Example 5. Suppose f(x) = 1 2 ∥x + 1∥2 with P = [0, 1]n. Clearly n(P) = n. Unfortunately we can construct an initial x1 as a convex combination of only O(log n) vertices, but AFW-2 will then run O(n) number of away-steps consecutively. Hence our above analysis on the max length of away epoch seems tight, although having n consecutive away-steps between two good steps once is different than this happening multiple times. See the construction of x1 in Appendix A. Tighter bounds. By refining the analysis of the polytopes, we may improve upon the n(P) bound. For example it is not hard to show that n(Pk) = n(Qk) = n. Let us consider the number of non-zeros in the iterates xt. A bad step (which must be an away-step) will either a) set an entry to 1, which will force the corresponding entry of v− t to be 1 in the future steps of the away epoch, hence can happen at most k times; or b) set at least one nonzero entry of xt into 0, and will never switch a zero entry to nonzero. But each FW-step may introduce at most k nonzeros. So the number of bad steps cannot be over 2k times of that of FW-step, and the overall iteration complexity is at most O( kβD2Hs α log 1 ϵ ). We can now revisit Table 1 and observe the generality and efficiency of AFW-2. It is noteworthy that on SLPs, we are not yet able to establish the same rate as AFW-1. We believe that the vertices being binary is very special, making it hard to generalize the analysis. 4 Application to Kernel Binary SVM As a concrete example, we apply AFW to the dual objective of a binary SVM with bias: (SVM-Dual) min x f(x) := 1 2x⊤Qx −1 C 1⊤x, s.t. x ∈[0, 1]n, y⊤x = 0. (20) Here y = (y1, . . . , yn)⊤is the label vector with yi ∈{−1, 1}, and Q is the signed kernel matrix with Qij = yiyjk(xi, xj). Since the feasible region is an SLP with diameter O(√n), we can use both AFW-1 and PFW-1 to solve it with O(#SV · nκ log 1 ϵ ) iterations, where κ is the ratio between the maximum and minimum eigenvalues of Q (assume Q is positive definite), and #SV stands for the number of support vectors in the optimal solution. 7 Computational efficiency per iteration. The key technique for computational efficiency is to keep updating the gradient ∇f(x) over the iterations, exploiting the fact that v+ t and v− t might be sparse and ∇f(x) = Qx −1 C 1 is affine in x. In particular, when AFW takes a FW-step in line 5, we have Qdt = QdFW t = Q(v+ t −xt) = −∇f(xt) −1 C 1 + Qv+ t . (21) Similar update formulas can be shown for away-step dA t and PFW-step dPFW t . So if v+ (or v− t ) has k non-zeros, all these three updates can be performed in O(kn) time. Based on them, we can update the gradient by ∇f(xt+1) = ∇f(xt) + ηtQdt. The FW-oracle and away-oracle cost O(n) time given the gradient, and the line search has a closed form solution. See more details in Appendix B. Major drawback. This approach unfortunately provides no control of the sparseness of v+ t and v− t . As a result, each iteration may require evaluating the entire kernel matrix (O(n2) kernel evaluations), leading to an overall computational cost O(#SV · n3κ log 1 ϵ ) . This can be prohibitive. 4.1 Reformulation by Relaxed Convex Hull To ensure the sparsity of each update, we reformulate the SVM dual objective (20) by using the reduced convex hull (RC-Hull, [22]). Let P and N be the set of positive and negative examples, resp. (RC-Margin) min θ, ξ+∈R|P |, ξ−∈R|N|, α, β 1 K (1⊤ξ+ + 1⊤ξ−) + 1 2 ∥θ∥2 −α + β, s.t. A⊤θ −α1 + ξ+ ≥0, −B⊤θ + β1 + ξ−≥0, ξ+ ≥0, ξ−≥0. (22) (RC-Hull) min u∈R|P |,v∈R|N| 1 2 ∥Au −Bv∥2 , s.t. u ∈PK, v ∈PK. (23) Here A (or B) is a matrix whose i-th column is the (implicit) feature representation of the i-th positive (or negative) example. RC-Margin resembles the primal SVM formulation, except that the bias term is split into two terms α and β. RC-Hull is the dual problem of RC-Margin, and it has a very intuitive geometric meaning. When K = 1, RC-Hull tries to find the distance between the convex hull of P and N. When the integer K is greater than 1, then 1 K Au is a reduced convex hull of the positive examples, and the objective finds the distance of the reduced convex hull of P and N. Since the feasible region of RC-Hull is a simplex, dt in AFW and PFW have at most 2K and 4K nonzeros respectively, and it costs O(nK) time to update the gradient (see Appendix B.1). Given K, Appendix B.2 shows how to recover the corresponding C in (20), and to translate the optimal solutions. Although solving RC-Hull requires the knowledge of K (which is unknown a priori if we are only given C), in practice, it is equally justified to tune the value of K via model selection tools in the first place, which is approximately tuning the number of support vectors. 4.2 Discussion and Comparison of Rates of Convergence Clearly, the feasible region of RC-Hull is an SLP, allowing us to apply AFW-1 and PFW-1 with optimal linear convergence: O(#SV · κK log 1 ϵ ) ≤O(κ(#SV)2 log 1 ϵ ), because K = 1⊤u ≤#SV. So overall, the computational cost is O(nκ(#SV)3 log 1 ϵ ). [20] shows sequential minimal optimization (SMO) [19, 23] costs O(n3κ log 1 ϵ ) computations. This is greater than O(nκ(#SV)3 log 1 ϵ ) when #SV ≤n2/3. [24] requires O(κ2n ∥Q∥sp log 1 ϵ ) iterations, and each iteration costs O(n). SVRG [25], SAGA [26], SDCA [27] require losses to be decomposable and smooth, which do not hold for hinge loss with a bias. SDCA can be extended to almost smooth losses such as hinge loss, but still the dimension dependency is unclear and it cannot handle bias. As a final remark, despite the superior rates of AFW-1 and PFW-1, their pre-defined step size makes them impractical. With line search, AFW-2 is much more efficient in practice, and at the same time provides theoretical guarantees of O(nκ(#SV)4log 1 ϵ ) computational cost, just slightly worse by #SV times. Such an advantage in both theory and practice by one method is not available in PFW [18]. 5 Experiments and Future Work In this section we compare the empirical performance of AFW-2 against related methods. We first illustrate the performance on kernel binary SVM, then we investigate a problem whose domain is not an SLP, and finally we demonstrate the scalability of AFW-2 on a large scale dataset. 8 0 50 100 150 # Kernel evaluations / # of examples 101 102 103 104 Primal Objective AFW-2 SMO (a) Breast-cancer (K = 10) 0 20 40 60 # Kernel evaluations / # of examples 103 104 105 106 Primal Objective AFW-2 SMO (b) a1a (K = 30) 0 300 600 900 1200 # Kernel evaluations / # of examples 103 104 105 106 107 Primal Objective AFW-2 SMO (c) ijcnn1 (K = 20) Figure 1: Comparison of SMO and AFW-2 on three different datasets Binary SVM Our first comparison is on solving kernel binary SVMs with bias. Three datasets are used. breast-cancer and a1a are obtained from the UCI repository [28] with n = 568 and 1, 605 training examples respectively, and ijcnn1 is from [29] with a subset of 5, 000 examples. As a competitor, we adopted the well established Sequential Minimal Optimization (SMO) algorithm [19]. The implementation updates all cached errors corresponding to each examples if any variable is being updated at each step. Using these cached error, the algorithm heuristically picks the best subset of variable to update at each iteration. We first run AFW-2 on the RC-Hull objective in (23), with the value of K set to optimize the test accuracy (K shown in Figure 1). After obtaining the optimal solution, we compute the equivalent C value based on the conversion rule in Appendix B.2, and then run SMO on the dual objective (20). 0 20 40 60 # steps 10-20 10-10 100 1010 Gap AFW-2 PFW-2 Figure 2: Least square w. Q375 250 500 750 1000 # Kernel evaluations / # of examples 104 105 106 107 108 Primal Objective AFW-2 SMO Figure 3: Full ijcnn1 Figure 1 shows the decay of the primal SVM objective (hence fluctuation) as a function of (the number of kernel evaluations divided by n). This avoids the complication of CPU frequency and kernel caching. Clearly, AFW-2 outperforms SMO on breastcancer and ijcnn1, and overtakes SMO on a1a after a few iterations. PFW-1 and PFW-2 are also applicable to the RC-Hull formulation. Although the rate of PFW-1 is better than AFW-2, it is much slower in practice. Although empirically we observed that PFW-2 is similar to our AFW-2, unfortunately PFW-2 has no theoretical guarantee. General Polytope Our next comparison uses Qk as the domain. Since it is not an SLP, neither PFW-1 nor PFW-2 provides a bound. Here we aim to show that AFP-2 is not only advantageous in providing a good rate of convergence, it is also comparable to (or better than) PFW-2 in terms of practical efficiency. Our objective is a least square (akin to lasso): minx f(x) = ∥Ax −b∥2, 0 ≤x ≤1, 1⊤x ≤375. Here A ∈R100×1000, and both A and b were generated randomly. Both the FW-oracle and away-oracle are simply based on sorting the gradient. As shown in Figure 2, AFW-2 is indeed slightly faster than PFW-2. Scalability To demonstrate the scalability of AFP-2, we plot its convergence curve (K = 100) along with SMO on the full ijcnn1 dataset with 49, 990 examples. In Figure 3, AFW-2 starts with a higher primal objective value, but after a while it outperforms SMO near the optimum. In this problem, kernel evaluation is the major computational bottleneck, hence used as the horizontal axis. This also helps avoiding the complication of CPU speed (e.g. when wall-clock time is used). 6 Future work We will extend the decomposition invariant method to gauge regularized problems [30–32], and derive comparable linear convergence rates. Moreover, although it is hard to evaluate pyramidal width, it will be valuable to compare it with Hs even in terms of upper/lower bounds. Acknowledgements. We thank Dan Garber for very helpful discussions and clarifications on [18]. Mohammad Ali Bashiri is supported in part by NSF grant RI-1526379. 9 References [1] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval Research Logistics Quarterly, 3(1-2):95–110, 1956. [2] Z. Harchaoui, M. Douze, M. Paulin, M. Dudik, and J. Malick. Large-scale image classification with trace-norm regularization. In Proc. IEEE Conf. Computer Vision and Pattern Recognition. 2012. [3] E. S. Levitin and B. T. Polyak. Constrained minimization methods. USSR Computational Mathematics and Mathematical Physics, 6(5):787–823, 1966. [4] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In Proceedings of International Conference on Machine Learning. 2013. [5] A. Beck and M. Teboulle. A conditional gradient method with linear rate of convergence for solving convex linear systems. Mathematical Methods of Operations Research, 59(2):235–247, 2004. [6] J. Gu´eLat and P. Marcotte. Some comments on Wolfe’s ‘away step’. Mathematical Programming, 35(1):110–119, 1986. [7] P. Wolfe. Convergence theory in nonlinear programming. In Integer and Nonlinear Programming. North-Holland, 1970. [8] S. D. Ahipasaoglu, P. Sun, and M. J. Todd. Linear convergence of a modified Frank-Wolfe algorithm for computing minimum-volume enclosing ellipsoids. Optimization Methods Software, 23(1):5–19, 2008. [9] R. ˜Nanculef, E. Frandi, C. Sartori, and H. Allende. A novel Frank-Wolfe algorithm. analysis and applications to large-scale svm training. Information Sciences, 285(C):66–99, 2014. [10] P. Kumar and E. A. Yildirim. A linearly convergent linear-time first-order algorithm for support vector classification with a core set result. INFORMS J. on Computing, 23(3):377–391, 2011. [11] S. M. Robinson. Generalized equations and their solutions, part II: Applications to nonlinear programming. Springer Berlin Heidelberg, 1982. [12] D. Garber and E. Hazan. A linearly convergent variant of the conditional gradient algorithm under strong convexity, with applications to online and stochastic optimization. SIAM Journal on Optimization, 26(3):1493–1528, 2016. [13] S. Lacoste-Julien and M. Jaggi. On the global linear convergence of Frank-Wolfe optimization variants. In Neural Information Processing Systems. 2015. [14] S. Lacoste-Julien and M. Jaggi. An affine invariant linear convergence analysis for Frank-Wolfe algorithms. In NIPS 2013 Workshop on Greedy Algorithms, Frank-Wolfe and Friends. 2013. [15] A. Beck and S. Shtern. Linearly convergent away-step conditional gradient for non-strongly convex functions. Mathematical Programming, pp. 1–27, 2016. [16] G. Lan. The complexity of large-scale convex programming under a linear optimization oracle. Technical report, University of Florida, 2014. [17] D. Garber. Faster projection-free convex optimization over the spectrahedron. In Neural Information Processing Systems. 2016. [18] D. Garber and O. Meshi. Linear-memory and decomposition-invariant linearly convergent conditional gradient algorithm for structured polytopes. In Neural Information Processing Systems. 2016. [19] J. C. Platt. Sequential minimal optimization: A fast algorithm for training support vector machines. Tech. Rep. MSR-TR-98-14, Microsoft Research, 1998. [20] N. List and H. U. Simon. SVM-optimization and steepest-descent line search. In S. Dasgupta and A. Klivans, eds., Proc. Annual Conf. Computational Learning Theory. Springer, 2009. [21] J. Pena and D. Rodriguez. [22] K. P. Bennett and E. J. Bredensteiner. Duality and geometry in SVM classifiers. In Proceedings of International Conference on Machine Learning. 2000. 10 [23] S. S. Keerthi, O. Chapelle, and D. DeCoste. Building support vector machines with reduced classifier complexity. Journal of Machine Learning Research, 7:1493–1515, 2006. [24] Y. You, X. Lian, J. Liu, H.-F. Yu, I. S. Dhillon, J. Demmel, and C.-J. Hsieh. Asynchronous parallel greedy coordinate descent. In Neural Information Processing Systems. 2016. [25] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Neural Information Processing Systems. 2013. [26] A. Defazio, F. Bach, and S. Lacoste-Julien. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In Neural Information Processing Systems. 2014. [27] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss minimization. Journal of Machine Learning Research, 14:567–599, 2013. [28] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ ml. [29] D. Prokhorov. Ijcnn 2001 neural network competition. Slide presentation in IJCNN, 1:97, 2001. [30] M. Jaggi and M. Sulovsky. A simple algorithm for nuclear norm regularized problems. In Proceedings of International Conference on Machine Learning. 2010. [31] X. Zhang, Y. Yu, and D. Schuurmans. Accelerated training for matrix-norm regularization: A boosting approach. In Neural Information Processing Systems. 2012. [32] Z. Harchaoui, A. Juditsky, and A. Nemirovski. Conditional gradient algorithms for normregularized smooth convex optimization. Mathematical Programming, 152:75–112, 2015. 11 | 2017 | 404 |
6,902 | Multiscale Semi-Markov Dynamics for Intracortical Brain-Computer Interfaces Daniel J. Milstein ∗ daniel_milstein@alumni.brown.edu Jason L. Pacheco † pachecoj@mit.edu Leigh R. Hochberg ‡ § ¶ leigh_hochberg@brown.edu John D. Simeral ‡ § john_simeral@brown.edu Beata Jarosiewicz ∥§ ∗∗ beataj@stanford.edu Erik B. Sudderth †† ∗ sudderth@uci.edu Abstract Intracortical brain-computer interfaces (iBCIs) have allowed people with tetraplegia to control a computer cursor by imagining the movement of their paralyzed arm or hand. State-of-the-art decoders deployed in human iBCIs are derived from a Kalman filter that assumes Markov dynamics on the angle of intended movement, and a unimodal dependence on intended angle for each channel of neural activity. Due to errors made in the decoding of noisy neural data, as a user attempts to move the cursor to a goal, the angle between cursor and goal positions may change rapidly. We propose a dynamic Bayesian network that includes the on-screen goal position as part of its latent state, and thus allows the person’s intended angle of movement to be aggregated over a much longer history of neural activity. This multiscale model explicitly captures the relationship between instantaneous angles of motion and long-term goals, and incorporates semi-Markov dynamics for motion trajectories. We also introduce a multimodal likelihood model for recordings of neural populations which can be rapidly calibrated for clinical applications. In offline experiments with recorded neural data, we demonstrate significantly improved prediction of motion directions compared to the Kalman filter. We derive an efficient online inference algorithm, enabling a clinical trial participant with tetraplegia to control a computer cursor with neural activity in real time. The observed kinematics of cursor movement are objectively straighter and smoother than prior iBCI decoding models without loss of responsiveness. 1 Introduction Paralysis of all four limbs from injury or disease, or tetraplegia, can severely limit function, independence, and even sometimes communication. Despite its inability to effect movement in muscles, neural activity in motor cortex still modulates according to people’s intentions to move their paralyzed arm or hand, even years after injury [Hochberg et al., 2006, Simeral et al., 2011, Hochberg et al., ∗Department of Computer Science, Brown University, Providence, RI, USA. †Computer Science and Artificial Intelligence Laboratory, MIT, Cambridge, MA, USA. ‡School of Engineering, Brown University, Providence, RI, USA; and Department of Neurology, Massachusetts General Hospital, Boston, MA, USA. §Rehabilitation R&D Service, Department of Veterans Affairs Medical Center, Providence, RI, USA; and Brown Institute for Brain Science, Brown University, Providence, RI, USA. ¶Department of Neurology, Harvard Medical School, Boston, MA, USA. ∥Department of Neuroscience, Brown University, Providence, RI, USA. ∗∗Present affiliation: Dept. of Neurosurgery, Stanford University, Stanford, CA, USA. ††Department of Computer Science, University of California, Irvine, CA, USA. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: A microelectrode array (left) is implanted in the motor cortex (center) to record electrical activity. Via this activity, a clinical trial participant (right, lying on his side in bed) then controls a computer cursor with an iBCI. A cable connected to the electrode array via a transcutaneous connector (gray box) sends neural signals to the computer for decoding. Center drawing from Donoghue et al. [2011] and used with permission of the author. The right image is a screenshot of a video included in the supplemental material that demonstrates real time decoding via our MSSM model. 2012, Collinger et al., 2013]. Intracortical brain-computer interfaces (iBCIs) utilize neural signals recorded from implanted electrode arrays to extract information about movement intentions. They have enabled individuals with tetraplegia to control a computer cursor to engage in tasks such as on-screen typing [Bacher et al., 2015, Jarosiewicz et al., 2015, Pandarinath et al., 2017], and to regain volitional control of their own limbs [Ajiboye et al., 2017]. Current iBCIs are based on a Kalman filter that assumes the vector of desired cursor movement evolves according to Gaussian random walk dynamics, and that neural activity is a Gaussian-corrupted linear function of this state [Kim et al., 2008]. In Sec. 2, we review how the Kalman filter is applied to neural decoding, and studies of the motor cortex by Georgopoulos et al. [1982] that justify its use. In Sec. 3, we improve upon the Kalman filter’s linear observation model by introducing a flexible, multimodal likelihood inspired by more recent research [Amirikian and Georgopulos, 2000]. Sec. 4 then proposes a graphical model (a dynamic Bayesian network [Murphy, 2002]) for the relationship between the angle of intended movement and the intended on-screen goal position. We derive an efficient inference algorithm via an online variant of the junction tree algorithm [Boyen and Koller, 1998]. In Sec. 5, we use recorded neural data to validate the components of our multiscale semiMarkov (MSSM) model, and demonstrate significantly improved prediction of motion directions in offline analysis. Via a real time implementation of the inference algorithm on a constrained embedded system, we then evaluate online decoding performance as a participant in the BrainGate21 iBCI pilot clinical trial uses the MSSM model to control a computer cursor with his neural activity. 2 Neural decoding via a Kalman filter The Kalman filter is the current state-of-the-art for iBCI decoding. There are several configurations of the Kalman filter used to enable cursor control in contemporary iBCI systems [Pandarinath et al., 2017, Jarosiewicz et al., 2015, Gilja et al., 2015] and there is no broad consensus in the iBCI field on which is most suited for clinical use. In this paper, we focus on the variant described by Jarosiewicz et al. [2015]. Participants in the BrainGate2 clinical trial receive one or two microelectrode array implants in the motor cortex (see Fig. 1). The electrical signals recorded by this electrode array are then transformed (via signal processing methods designed to reduce noise) into a D-dimensional neural activity vector zt ∈RD, sampled at 50 Hz. From the sequence of neural activity, the Kalman filter estimates the latent state xt ∈R2, a vector pointing in the intended direction of cursor motion. The Kalman filter assumes a jointly Gaussian model for cursor dynamics and neural activity, xt | xt−1 ∼N(Axt−1, W), zt | xt ∼N(b + Hxt, Q), (1) with cursor dynamics A ∈R2×2, process noise covariance W ∈R2×2, and (typically non-diagonal) observation covariance Q ∈RD×D. At each time step, the on-screen cursor’s position is moved by the estimated latent state vector (decoder output) scaled by a constant, the speed gain. The function relating neural activity to some measurable quantity of interest is called a tuning curve. A common model of neural activity in the motor cortex assumes that each neuron’s activity is highest 1Caution: Investigational Device. Limited by Federal Law to Investigational Use. 2 for some preferred direction of motion, and lowest in the opposite direction, with intermediate activity often resembling a cosine function. This cosine tuning model is based on pioneering studies of the motor cortex of non-human primates [Georgopoulos et al., 1982], and is commonly used (or implicitly assumed) in iBCI systems because of its mathematical simplicity and tractability. Expressing the inner product between vectors via the cosine of the angle between them, the expected neural activity of the jth component of Eq. (1) can be written as E[ztj | xt] = bj + hT j xt = bj + ||xt|| · ||hj|| · cos θt −atan hj2 hj1 , (2) where θt is the intended angle of movement at timestep t, bj is the baseline activity rate for channel j, and hj is the jth row of the observation matrix H = (hT 1 , . . . , hT D)T . If xt is further assumed to be a unit vector (a constraint not enforced by the Kalman filter), Eq. (2) simplifies to hT j xt = mj cos(θt −pj), where mj is the modulation of the tuning curve and pj specifies the angular location of the peak of the cosine tuning curve (the preferred direction). Thus, cosine tuning models are linear. To collect labeled training data for decoder calibration, the participant is asked to attempt to move a cursor to prompted target locations. We emphasize that although the clinical random target task displays only one target at a time, this target position is unknown to the decoder. Labels are constructed for the neural activity patterns by assuming that at each 20ms time step, the participant intends to move the cursor straight to the target [Jarosiewicz et al., 2015, Gilja et al., 2015]. These labeled data are used to fit the observation matrix H and neuron baseline rates (biases) b via ridge regression. The observation noise covariance Q is estimated as the empirical covariance of the residuals. The state dynamics matrix A and process covariance matrix W may be tuned to adjust the responsiveness of the iBCI system. 3 Flexible tuning likelihoods The cosine tuning model reviewed in the previous section has several shortcomings. First, motor cortical neurons that have unimodal tuning curves often have narrower peaks that are better described by von Mises distributions [Amirikian and Georgopulos, 2000]. Second, tuning can be multimodal. Third, neural features used for iBCI decoding may capture the pooled activity of several neurons, not just one [Fraser et al., 2009]. While bimodal von Mises models were introduced by Amirikian and Georgopulos [2000], up to now iBCI decoders based on von Mises tuning curves have only employed unimodal mean functions proportional to a single von Mises density [Koyama et al., 2010]. In contrast, we introduce a multimodal likelihood proportional to an arbitrary number of regularly spaced von Mises densities and incorporate this likelihood into an iBCI decoder. Moreover, we can efficiently fit parameters of this new likelihood via ridge regression. Computational efficiency is crucial to allow rapid calibration in clinical applications. Let θt ∈[0, 2π) denote the intended angle of cursor movement at time t. The flexible tuning likelihood captures more complex neural activity distributions via a regression model with nonlinear features: zt | θt ∼N b + wT φ(θt), Q , φk(θt) = exp [ϵ cos (θt −ϕk)] . (3) The features are a set of K von Mises basis functions φ(θ) = (φ1(θ), . . . , φK(θ))T . Basis functions φk(x) are centered on a regular grid of angles ϕk, and have tunable concentration ϵ. Using human neural data recorded during cued target tasks, we compare regression fits for the flexible tuning model to the standard cosine tuning model (Fig. 2). In addition to providing better fits for channels with complex or multimodal activity, the flexible tuning model also provides good fits to apparently cosine-tuned signals. This leads to higher predictive likelihoods for held-out data, and as we demonstrate in Sec. 5, more accurate neural decoding algorithms. 4 Multiscale Semi-Markov Dynamical Models The key observation underlying our multiscale dynamical model is that the sampling rate used for neural decoding (typically around 50 Hz) is much faster than the rate that the goal position changes (under normal conditions, every few seconds). In addition, frequent but small adjustments of cursor aim angle are required to maintain a steady heading. State-of-the-art Kalman filter approaches to iBCIs 3 Angle (degrees) -180 -135 -90 -45 0 45 90 135 180 Spike power measurement 5.5 6 6.5 7 7.5 8 Data Cosine fit Flexible fit Angle (degrees) -180 -135 -90 -45 0 45 90 135 180 Spike power measurement 9 9.5 10 10.5 11 11.5 12 12.5 13 Data Cosine fit Flexible fit Angle (degrees) -180 -135 -90 -45 0 45 90 135 180 Spike power measurement 5.4 5.45 5.5 5.55 5.6 5.65 5.7 5.75 5.8 Data Cosine fit Flexible fit Figure 2: Flexible tuning curves. Each panel shows the empirical mean and standard deviation (red) of example neural signals recorded from a single intracortical electrode while a participant is moving within 45 degrees of a given direction in a cued target task. These signals can violate the assumptions of a cosine tuning model (black), as evident in the left two examples. The flexible regression likelihood (cyan) captures neural activity with varying concentration (left) and multiple tuning directions (center), as well as cosine-tuned signals (right). Because neural activity from individual electrodes is very noisy (the standard deviation within each angular bin exceeds the change in mean activity across angles), information from multiple electrodes is aggregated over time for effective decoding. are incapable of capturing these multiscale dynamics since they assume first-order Markov dependence across time and do not explicitly represent goal position. To cope with this, hyperparameters of the linear Gaussian dynamics must be tuned to simultaneously remain sensitive to frequent directional adjustments, but not so sensitive that cursor dynamics are dominated by transient neural activity. Our proposed MSSM decoder, by contrast, explicitly represents goal position in addition to cursor aim angle. Through the use of semi-Markov dynamics, the MSSM enables goal position to evolve at a different rate than cursor angle while allowing for a high rate of neural data acquisition. In this way, the MSSM can integrate across different timescales to more robustly infer the (unknown) goal position and the (also unknown) cursor aim. We introduce the model in Sec. 4.1 and 4.2. We derive an efficient decoding algorithm, based on an online variant of the junction tree algorithm, in Sec. 4.3. 4.1 Modeling Goals and Motion via a Dynamic Bayesian Network The MSSM directed graphical model (Fig. 3) uses a structured latent state representation, sometimes referred to as a dynamic Bayesian network [Murphy, 2002]. This factorization allows us to discretize latent state variables, and thereby support non-Gaussian dynamics and data likelihoods. At each time t we represent discrete cursor aim θt as 72 values in [0, 2π) and goal position gt as a regular grid of 40 × 40 = 1600 locations (see Fig. 4). Each cell of the grid is small compared to elements of a graphical interface. Cursor aim dynamics are conditioned on goal position and evolve according to a smoothed von Mises distribution: vMS(θt | gt, pt) ≜α/2π + (1 −α)vonMises(θt | a(gt, pt), ¯κ). (4) Here, a(g, p) = tan−1((gy −py)/(gx −px)) is the angle from the cursor p = (px, py) to the goal g = (gx, gy), and the concentration parameter ¯κ encodes the expected accuracy of user aim. Neural activity from some participants has short bursts of noise during which the learned angle likelihood is inaccurate; the outlier weight 0 < α < 1 adds robustness to these noise bursts. 4.2 Multiscale Semi-Markov Dynamics The first-order Markov assumption made by existing iBCI decoders (see Eq. (1)) imposes a geometric decay in state correlation over time. For example, consider a scalar Gaussian state-space model: xt = βxt−1 +v, v ∼N(0, σ2). For time lag k > 0, the covariance between two states cov(xt, xt+k) decays as β−k. This weak temporal dependence is highly problematic in the iBCI setting due to the mismatch between downsampled sensor acquisition rates used for decoding (typically around 50Hz, or 20ms per timestep) and the time scale at which the desired goal position changes (seconds). We relax the first-order Markov assumption via a semi-Markov model of state dynamics [Yu, 2010]. Semi-Markov models, introduced by Levy [1954] and Smith [1955], divide the state evolution into contiguous segments. A segment is a contiguous series of timesteps during which a latent variable is unchanged. The conditional distribution over the state at time xt depends not only on the previous state xt−1, but also on a duration dt which encodes how long the state is to remain unchanged: 4 Goal reconsideration counter Observation Cursor position Angle of aim Goal position Aim adjustment counter Multiscale Semi-Markov Model Junction Tree for Online Decoding Figure 3: Multiscale semi-Markov dynamical model. Left: The multiscale directed graphical model of how goal positions gt, angles of aim θt, and observed cursor positions pt evolve over three time steps. Dashed nodes are counter variables enabling semi-Markov dynamics. Right: Illustration of the junction tree used to compute marginals for online decoding, as in Boyen and Koller [1998]. Dashed edges indicate cliques whose potentials depend on the marginal approximations at time t −1. The inference uses an auxiliary variable rt ≜a(gt, pt), the angle from the cursor to the current goal, to reduce computation and allow inference to operate in real time. p(xt | xt−1, dt). Duration is modeled via a latent counter variable, which is drawn at the start of each segment and decremented deterministically until it reaches zero, at which point it is resampled. In this way the semi-Markov model is capable of integrating information over longer time horizons, and thus less susceptible to intermittent bursts of sensor noise. We define separate semi-Markov dynamical models for the goal position and the angle of intended movement. As detailed in the supplement, in experiments our duration distributions were uniform, with parameters informed by knowledge about typical trajectory durations and reaction times. Goal Dynamics A counter ct encodes the temporal evolution of the semi-Markov dynamics on goal positions: ct is drawn from a discrete distribution p(c) at the start of each trajectory, and then decremented deterministically until it reaches zero. (During decoding we do not know the value of the counter, and maintain a posterior probability distribution over its value.) The goal position gt remains unchanged until the goal counter reaches zero, at which point with probability η we resample a new goal, and we keep the same goal with the remaining probability 1 −η: p(ct | ct−1) = ( 1, ct = ct−1 −1, ct−1 > 0, Decrement p(ct), ct−1 = 0, Sample new counter 0, Otherwise (5) p(gt | ct−1, gt−1) = 1, ct−1 > 0, gt = gt−1, Goal position unchanged η 1 G + (1 −η), ct−1 = 0, gt = gt−1, Sample same goal position η 1 G, ct−1 = 0, gt ̸= gt−1, Sample new goal position 0, Otherwise (6) Cursor Angle Dynamics We define similar semi-Markov dynamics for the cursor angle via an aim counter bt. Once the counter reaches zero, we sample a new aim counter value from the discrete distribution p(b), and a new cursor aim angle from the smoothed von Mises distribution of Eq. (4): p(bt | bt−1) = ( 1, bt = bt−1 −1, bt−1 > 0, Decrement p(bt), bt−1 = 0, Sample new counter 0, Otherwise (7) p(θt | bt−1, θt−1, pt, gt) = θt−1 bt−1 > 0, Keep cursor aim vMS(θt | gt, pt) bt−1 = 0, Sample new cursor aim (8) 4.3 Decoding via Approximate Online Inference Efficient decoding is possible via an approximate variant of the junction tree algorithm [Boyen and Koller, 1998]. We approximate the full posterior at time t via a partially factorized posterior: p(gt, ct, θt, bt | z1...t) ≈p(gt, ct | z1...t)p(θt, bt | z1...t). (9) 5 Goal Positions 0s 0.5s 1s 1.5s 2s Figure 4: Decoding goal positions. The MSSM represents goal position via a regular grid of 40 × 40 locations (upper left). For one real sequence of recorded neural data, the above panels illustrate the motion of the cursor (white dot) to the user’s target (red circle). Panels show the marginal posterior distribution over goal positions at 0.5s intervals (25 discrete time steps of graphical model inference). Yellow goal states have highest probability, dark blue goal states have near-zero probability. Note the temporal aggregation of directional cues. Here p(gt, ct | z1...t) is the marginal on the goal position and goal counter, and p(θt, bt | z1...t) is the marginal on the angle of aim and the aim counter. Note that in this setting goal position gt and cursor aim θt, as well as their respective counters ct and bt, are unknown and must be inferred from neural data. At each inference step we use the junction tree algorithm to compute state marginals at time t, conditioned on the factorized posterior approximation from time step t −1 (see Fig. 3). Boyen and Koller [1998] show that this technique has bounded approximation error over time, and Murphy and Weiss [2001] show this as a special case of loopy belief propagation. Detailed inference equations are derived in the supplemental material. Given G goal positions and A discrete angle states, each temporal update for our online decoder requires O(GA + A2) operations. In contrast, the exact junction tree algorithm would require O(G2A2) operations; for practical numbers of goals G, realtime implementation of this exact decoder is infeasible. Figure 4 shows several snapshots of the marginal posterior over goal position. At each time the MSSM decoder moves the cursor along the vector E h gt−pt ∥gt−pt∥ i , computed by taking an average of the directions needed to get to each possible goal, weighted by the inferred probability that each goal is the participant’s true target. This vector is smaller in magnitude when the decoder is less certain about the direction in which the intended goal lies, which has the practical benefit of allowing the participant to slow down near the goal. 5 Experiments We evaluate all decoders under a variety of conditions and a range of configurations for each decoder. Controlled offline evaluations allow us to assess the impact of each proposed innovation. To analyze the effects of our proposed likelihood and multiscale dynamics in isolation, we construct a baseline hidden Markov model (HMM) decoder using the same discrete representation of angles as the MSSM, and either cosine-tuned or flexible likelihoods. Our findings show that the offline decoding performance of the MSSM is superior in all respects to baseline models. We also evaluate the MSSM decoder in two online clinical research sessions, and compare headto-head performance with the Kalman filter. Previous studies have tested the Kalman filter under a variety of responsive parameter configurations and found a tradeoff between slow, smooth control versus fast, meandering control [Willett et al., 2016, 2017]. Through comparisons to the Kalman, we demonstrate that the MSSM decoder maintains smoother and more accurate control at comparable speeds. These realtime results are preliminary since we have yet to evaluate the MSSM decoder on other clinical metrics such as communication rate. 6 Kalman (raw) Kalman Cosine HMM Flexible HMM KalmanBC (raw) KalmanBC Cosine MSSM Flexible MSSM 0 0.05 0.1 0.15 0.2 0.25 Mean squared error Kalman (raw) Kalman Cosine HMM Flexible HMM KalmanBC (raw) KalmanBC Cosine MSSM Flexible MSSM 0 0.05 0.1 0.15 0.2 0.25 Mean squared error Figure 5: Offline decoding. Mean squared error of angular prediction for a variety of decoders, where each decoder processes the same sets of recorded data. We analyze 24 minutes (eight 3-minute blocks) of neural data recorded from participant T9 on trial days 546 and 552. We use one block for testing and the remainder for training, and average errors across the choice of test block. On the left, we report errors over all time points. On the right, we report errors on time points during which the cursor was outside a fixed distance from the target. For both analyses, we exclude the initial 1s after target acquisition, during which the ground truth is unreliable. To isolate preprocessing effects, the plots separately report the Kalman without preprocessing (“raw”). Dynamics effects are isolated by separately evaluating HMM dynamics (“HMM”), and likelihood effects are isolated by separately evaluating flexible likelihood and cosine tuning in each configuration. “KalmanBC” denotes the Kalman filter with an additional kinematic bias-correction heuristic [Jarosiewicz et al., 2015]. 5.1 Offline evaluation We perform offline analysis using previously recorded data from two historical sessions of iBCI use with a single participant (T9). During each session the participant is asked to perform a cued target task in which a target appears at a random location on the screen and the participant attempts to move the cursor to the target. Once the target is acquired or after a timeout (10 seconds), a new target is presented at a different location. Each session is composed of several 3 minute segments or blocks. To evaluate the effect of each innovation we compare to an HMM decoder. This HMM baseline isolates the effect of our flexible likelihood since, like the Kalman filter, it does not model goal positions and assumes first-order Markov dynamics. Let θt be the latent angle state at time t and x(θ) = (cos(θ), sin(θ))T the corresponding unit vector. We implement a pair of HMM decoders for cosine tuning and our proposed flexible tuning curves, zt | θt ∼N(b + Hx(θt), Q) | {z } Cosine HMM , zt | θt ∼N b + wT φ(θt), Q | {z } Flexible HMM Here, φ(·) are the basis vectors defined in Eq. (3). The state θt is discrete, taking one of 72 angular values equally spaced in [0, 2π), the same discretization used by the MSSM. Continuous densities are appropriately normalized. Unlike the linear Gaussian state-space model, the HMMs constrain latent states to be valid angles (equivalently, unit vectors) rather than arbitrary vectors in R2. We analyze decoder accuracy within each session using a leave-one-out approach. Specifically, we test the decoder on each held-out block using the remaining blocks in the same session for training. We report MSE of the predicted cursor direction, using the unit vector from the cursor to the target as ground truth, and normalizing decoder output vectors. We used the same recorded data for each decoder. See the supplement for further details. Figure 5 summarizes the findings of the offline comparisons for a variety of decoder configurations. First, we evaluate the effect of preprocessing the data by taking the square root, applying a low-pass IIR filter, and clipping the data outside a 5σ threshold, where σ is the empirical standard deviation of training data. This preprocessing significantly improves accuracy for all decoders. The MSSM model compares favorably to all configurations of the Kalman decoders. The majority of benefit comes from the semi-Markov dynamical model, but additional gains are observed when including the flexible tuning likelihood. Finally, it has been observed that the Kalman decoder is sensitive to outliers for which Jarosiewicz et al. [2015] propose a correction to avoid biased estimates. We test the Kalman filter with and without this correction. 7 MSSM Kalman MSSM Kalman MSSM Kalman 0 0.5 1 1.5 2 2.5 3 Squared error Session 1 Time MSSM Kalman MSSM Kalman MSSM Kalman 0 0.5 1 1.5 2 2.5 3 Squared error Session 2 Time Figure 6: Realtime decoding. A realtime comparison of the Kalman filter and MSSM with flexible likelihoods from two sessions with clinical trial participant T10. Left: Box plots of squared error between unit vectors from cursor to target and normalized (unit vector) decoder output for each four-minute comparison block in a session. MSSM errors are consistently smaller. Right: Two metrics that describe the smoothness of cursor trajectories, introduced by MacKenzie et al. [2001] and commonly used to quantify iBCI performance [Kim et al., 2008, Simeral et al., 2011]. The task axis for a trajectory is the straight line from the cursor’s position at the start of a trajectory to a goal. Orthogonal directional changes measure the number of direction changes towards or away from the goal, and movement direction changes measure the number of direction changes towards or away from the task axis. The MSSM decoder shows significantly fewer direction changes according to both metrics. 5.2 Realtime evaluation Next, we examined whether the MSSM method was effective for realtime iBCI control by a clinical trial participant. On two different days, a clinical trial participant (T10) completed six four-minute comparison blocks. In these blocks, we alternated using an MSSM decoder with flexible likelihoods and novel preprocessing, or a standard Kalman decoder. As with the Kalman decoding described in Jarosiewicz et al. [2015], we used the Kalman filter in conjunction with a bias correcting postprocessing heuristic. We used the feature selection method proposed by Malik et al. [2015] to select D = 60 channels of neural data, and used these same 60 channels for both decoders. Jarosiewicz et al. [2015] selected the timesteps of data to use for parameter learning by taking the first two seconds of each trajectory after a 0.3s reaction time. For both decoders, we instead selected all timesteps in which the cursor was a fixed distance from the cued goal because we found this alternative method lead to improvements in offline decoding. Both methods for selecting subsets of the calibration data are designed to compensate for the fact that vectors from cursor to target are not a reliable estimator for participants’ intended aim when the cursor is near the target. Decoding accuracy. Figure 6 shows that our MSSM decoder had less directional error than the configuration of the Kalman filter that we compared to. We confirmed the statistical significance of this result using a Wilcoxon rank sum test. To accommodate the Wilcoxon rank sum test’s independence assumption, we divided the data into individual trajectories from a starting point towards a goal, that ended either when the cursor reached the goal or at a timeout (10 seconds). We then computed the mean squared error of each trajectory, where the squared error is the squared Euclidean distance between the normalized (unit vector) decoded vectors and the unit vectors from cursor to target. Within each session, we compared the distributions of these mean squared errors for trajectories between decoders (p < 10−6 for each session). MSSM also performed better than the Kalman on metrics from MacKenzie et al. [2001] that measure the smoothness of cursor trajectories (see Fig. 6). Figure 7 shows example trajectories as the cursor moves toward its target via the MSSM decoder or the (bias-corrected) Kalman decoder. Consistent with the quantitative error metrics, the trajectories produced by the MSSM model were smoother and more direct than those of the Kalman filter, especially as the cursor approached the goal. The distance ratio (the ratio of the length of the trajectory to the line from the starting position to the goal) averaged 1.17 for the MSSM decoder and 1.28 for the Kalman decoder, a significant difference (Wilcoxon rank sum test, p < 10−6). Some trajectories for both decoders are shown in Figure 7. Videos of cursor movement under both decoding algorithms, and additional experimental details, are included in the supplemental material. Decoding speed. We controlled for speed by configuring both decoders to average the same fast speed determined in collaboration with clinical research engineers familiar with the participant’s preferred cursor speed. For each decoder, we collected a block of data in which the participant used 8 Goal Near Goal Figure 7: Examples of realtime decoding trajectories. Left: 20 randomly selected trajectories for the Kalman decoder, and 20 trajectories for the MSSM decoder. The trajectories are aligned so that the starting position is at the origin and rotated so the goal position is on the positive, horizontal axis. The MSSM decoder exhibits fewer abrupt direction changes. Right: The empirical probability of instantaneous angle of movement, after rotating all trajectories from the realtime data (24 minutes of iBCI use with each decoder). The MSSM distribution (shown as translucent cyan) is more peaked at zero degrees, corresponding to direct motion towards the goal. that decoder to control the cursor. For each of these blocks, we computed the trimmed mean of the speed, and then linearly extrapolated the speed gain needed for the desired speed. Although such an extrapolation is approximate, the average times to acquire a target with each decoder at the extrapolated speed gains were within 6% of each other: 2.6s for the Kalman decoder versus 2.7s for the MSSM decoder. This speed discrepancy is dominated by the relative performance improvement of MSSM over Kalman: the Kalman had a 30.7% greater trajectory mean squared error, 249% more orthogonal direction changes, and 224% more movement direction changes. This approach to evaluating decoder performance differs from that suggested by Willett et al. [2016], which discusses the possibility of optimizing the speed gain and other decoder parameters to minimize target acquisition time. In contrast, we matched the speed of both decoders and evaluated decoding error and smoothness. We did not extensively tune the dynamics parameters for either decoder, instead relying on the Kalman parameters in everyday use by T10. For MSSM we tried two values of η, which controls the sampling of goal states (6), and chose the remaining parameters offline. 6 Conclusion We introduce a flexible likelihood model and multiscale semi-Markov (MSSM) dynamics for cursor control in intracortical brain-computer interfaces. The flexible tuning likelihood model extends the cosine tuning model to allow for multimodal tuning curves and narrower peaks. The MSSM dynamic Bayesian network explicitly models the relationship between the goal position, the cursor position, and the angle of intended movement. Because the goal position changes much less frequently than the angle of intended movement, a decoder’s past knowledge of the goal position stays relevant for longer, and the MSSM model can use longer histories of neural activity to infer the direction of desired movement. To create a realtime decoder, we derive an online variant of the junction tree algorithm with provable accuracy guarantees. We demonstrate a significant improvement over the Kalman filter in offline experiments with neural recordings, and demonstrate promising preliminary results in clinical trial tests. As seen in the videos, the MSSM decoder yields an appreciably straighter and smoother trajectory than the Kalman decoder. Future work will further evaluate the suitability of this method for clinical use. We hope that the MSSM graphical model will also enable further advances in iBCI decoding, for example by encoding the structure of a known user interface in the set of latent goals. Author contributions DJM, JLP, and EBS created the flexible tuning likelihood and the multiscale semi-Markov dynamics. DJM derived the inference (decoder), wrote software implementations of these methods, and performed data analyses. DJM, JLP, and EBS designed offline experiments. DJM, BJ, and JDS designed clinical research sessions. LRH is the sponsor-investigator of the BrainGate2 pilot clinical trial. DJM, JLP, and EBS wrote the manuscript with input from all authors. 9 Acknowledgments The authors thank Participants T9 and T10 and their families, Brian Franco, Tommy Hosman, Jessica Kelemen, Dave Rosler, Jad Saab, and Beth Travers for their contributions to this research. Support for this study was provided by the Office of Research and Development, Rehabilitation R&D Service, Department of Veterans Affairs (B4853C, B6453R, and N9228C), the National Institute on Deafness and Other Communication Disorders of National Institutes of Health (NIDCD-NIH: R01DC009899), MGH-Deane Institute, and The Executive Committee on Research (ECOR) of Massachusetts General Hospital. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health, or the Department of Veterans Affairs or the United States Government. CAUTION: Investigational Device. Limited by Federal Law to Investigational Use. Disclosure: Dr. Hochberg has a financial interest in Synchron Med, Inc., a company developing a minimally invasive implantable brain device that could help paralyzed patients achieve direct brain control of assistive technologies. Dr. Hochberg’s interests were reviewed and are managed by Massachusetts General Hospital, Partners HealthCare, and Brown University in accordance with their conflict of interest policies. References A. B. Ajiboye, F. R. Willett, D. R. Young, W. D. Memberg, B. A. Murphy, J. P. Miller, B. L. Walter, J. A. Sweet, H. A. Hoyen, M. W. Keith, et al. Restoration of reaching and grasping movements through brain-controlled muscle stimulation in a person with tetraplegia. The Lancet, 389(10081): 1821–1830, 2017. B. Amirikian and A. P. Georgopulos. Directional tuning profiles of motor cortical cells. J. Neurosci. Res., 36(1):73–79, 2000. D. Bacher, B. Jarosiewicz, N. Y. Masse, S. D. Stavisky, J. D. Simeral, K. Newell, E. M. Oakley, S. S. Cash, G. Friehs, and L. R. Hochberg. Neural point-and-click communication by a person with incomplete locked-in syndrome. Neurorehabil Neural Repair, 29(5):462–471, 2015. X. Boyen and D. Koller. Tractable inference for complex stochastic processes. In Proceedings of UAI, pages 33–42. Morgan Kaufmann Publishers Inc., 1998. J. L. Collinger, B. Wodlinger, J. E. Downey, W. Wang, E. C. Tyler-Kabara, D. J. Weber, A. J. McMorland, M. Velliste, M. L. Boninger, and A. B. Schwartz. High-performance neuroprosthetic control by an individual with tetraplegia. The Lancet, 381(9866):557–564, 2013. J. A. Donoghue, J. H. Bagley, V. Zerris, and G. M. Friehs. Youman’s neurological surgery: Chapter 94. Elsevier/Saunders, 2011. G. W. Fraser, S. M. Chase, A. Whitford, and A. B. Schwartz. Control of a brain–computer interface without spike sorting. J. Neuroeng, 6(5):055004, 2009. A. P. Georgopoulos, J. F. Kalaska, R. Caminiti, and J. T. Massey. On the relations between the direction of two-dimensional arm movements and cell discharge in primate motor cortex. J. Neurosci., 2(11):1527–1537, 1982. V. Gilja, C. Pandarinath, C. H. Blabe, P. Nuyujukian, J. D. Simeral, A. A. Sarma, B. L. Sorice, J. A. Perge, B. Jarosiewicz, L. R. Hochberg, et al. Clinical translation of a high performance neural prosthesis. Nature Medicine, 21(10):1142, 2015. L. R. Hochberg, M. D. Serruya, G. M. Friehs, J. A. Mukand, M. Saleh, A. H. Caplan, A. Branner, D. Chen, R. D. Penn, and J. P. Donoghue. Neuronal ensemble control of prosthetic devices by a human with tetraplegia. Nature, 442(7099):164–171, 2006. L. R. Hochberg, D. Bacher, B. Jarosiewicz, N. Y. Masse, J. D. Simeral, J. Vogel, S. Haddadin, J. Liu, S. S. Cash, P. van der Smagt, et al. Reach and grasp by people with tetraplegia using a neurally controlled robotic arm. Nature, 485(7398):372, 2012. 10 B. Jarosiewicz, A. A. Sarma, D. Bacher, N. Y. Masse, J. D. Simeral, B. Sorice, E. M. Oakley, C. Blabe, C. Pandarinath, V. Gilja, et al. Virtual typing by people with tetraplegia using a self-calibrating intracortical brain-computer interface. Sci. Transl. Med., 7(313):313ra179–313ra179, 2015. S. P. Kim, J. D. Simeral, L. R. Hochberg, J. P. Donoghue, and M. J. Black. Neural control of computer cursor velocity by decoding motor cortical spiking activity in humans with tetraplegia. J. Neuroeng, 5(4):455, 2008. S. Koyama, S. M. Chase, A. S. Whitford, M. Velliste, A. B. Schwartz, and R. E. Kass. Comparison of brain–computer interface decoding algorithms in open-loop and closed-loop control. J Comput Neurosci, 29(1-2):73–87, 2010. P. Levy. Semi-Markovian processes. Proc: III ICM (Amsterdam), pages 416–426, 1954. I. S. MacKenzie, T. Kauppinen, and M. Silfverberg. Accuracy measures for evaluating computer pointing devices. In Proceedings of CHI, pages 9–16. ACM, 2001. W. Q. Malik, L. R. Hochberg, J. P. Donoghue, and E. N. Brown. Modulation depth estimation and variable selection in state-space models for neural interfaces. IEEE Trans Biomed Eng, 62(2): 570–581, 2015. K. Murphy and Y. Weiss. The factored frontier algorithm for approximate inference in DBNs. In Proceedings of UAI, pages 378–385. Morgan Kaufmann Publishers Inc., 2001. K. P. Murphy. Dynamic Bayesian networks: Representation, inference and learning. PhD thesis, University of California, Berkeley, 2002. C. Pandarinath, P. Nuyujukian, C. H. Blabe, B. L. Sorice, J. Saab, F. R. Willett, L. R. Hochberg, K. V. Shenoy, and J. M. Henderson. High performance communication by people with paralysis using an intracortical brain-computer interface. eLife, 6:e18554, 2017. J. D. Simeral, S. P. Kim, M. Black, J. Donoghue, and L. Hochberg. Neural control of cursor trajectory and click by a human with tetraplegia 1000 days after implant of an intracortical microelectrode array. J. Neuroeng, 8(2):025027, 2011. W. L. Smith. Regenerative stochastic processes. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 232(1188):6–31, 1955. F. R. Willett, C. Pandarinath, B. Jarosiewicz, B. A. Murphy, W. D. Memberg, C. H. Blabe, J. Saab, B. L. Walter, J. A. Sweet, J. P. Miller, et al. Feedback control policies employed by people using intracortical brain–computer interfaces. J. Neuroeng, 14(1):016001, 2016. F. R. Willett, B. A. Murphy, W. D. Memberg, C. H. Blabe, C. Pandarinath, B. L. Walter, J. A. Sweet, J. P. Miller, J. M. Henderson, K. V. Shenoy, et al. Signal-independent noise in intracortical brain– computer interfaces causes movement time properties inconsistent with Fitts’ law. J. Neuroeng, 14 (2):026010, 2017. S. Z. Yu. Hidden semi-Markov models. Artificial intelligence, 174(2):215–243, 2010. 11 | 2017 | 405 |
6,903 | Fast Black-box Variational Inference through Stochastic Trust-Region Optimization Jeffrey Regier jregier@cs.berkeley.edu Michael I. Jordan jordan@cs.berkeley.edu Jon McAuliffe jon@stat.berkeley.edu Abstract We introduce TrustVI, a fast second-order algorithm for black-box variational inference based on trust-region optimization and the “reparameterization trick.” At each iteration, TrustVI proposes and assesses a step based on minibatches of draws from the variational distribution. The algorithm provably converges to a stationary point. We implemented TrustVI in the Stan framework and compared it to two alternatives: Automatic Differentiation Variational Inference (ADVI) and Hessianfree Stochastic Gradient Variational Inference (HFSGVI). The former is based on stochastic first-order optimization. The latter uses second-order information, but lacks convergence guarantees. TrustVI typically converged at least one order of magnitude faster than ADVI, demonstrating the value of stochastic second-order information. TrustVI often found substantially better variational distributions than HFSGVI, demonstrating that our convergence theory can matter in practice. 1 Introduction The “reparameterization trick” [1, 2, 3] has led to a resurgence of interest in variational inference (VI), making it applicable to essentially any differentiable model. This new approach, however, requires stochastic optimization rather than fast deterministic optimization algorithms like closed-form coordinate ascent. Some fast stochastic optimization algorithms exist, but variational objectives have properties that make them unsuitable: they are typically nonconvex, and the relevant expectations cannot usually be replaced by finite sums. Thus, to date, practitioners have used SGD and its variants almost exclusively. Automatic Differentiation Variational Inference (ADVI) [4] has been especially successful at making variational inference based on first-order stochastic optimization accessible. Stochastic first-order optimization, however, is slow in theory (sublinear convergence) and in practice (thousands of iterations), negating a key benefit of VI. This article presents TrustVI, a fast algorithm for variational inference based on second-order trust-region optimization and the reparameterization trick. TrustVI routinely converges in tens of iterations for models that take thousands of ADVI iterations. TrustVI’s iterations can be more expensive, but on a large collection of Bayesian models, TrustVI typically reduced total computation by an order of magnitude. Usually TrustVI and ADVI find the same objective value, but when they differ, TrustVI is typically better. TrustVI adapts to the stochasticity of the optimization problem, raising the sampling rate for assessing proposed steps based on a Hoeffding bound. It provably converges to a stationary point. TrustVI generalizes the Newton trust-region method [5], which converges quadratically and has performed well at optimizing analytic variational objectives even at an extreme scale [6]. With large enough minibatches, TrustVI iterations are nearly as productive as those of a deterministic trust region method. Fortunately, large minibatches make effective use of single-instruction multiple-data (SIMD) parallelism on modern CPUs and GPUs. TrustVI uses either explicitly formed approximations of Hessians or approximate Hessian-vector products. Explicitly formed Hessians can be fast for low-dimensional problems or problems with sparse Hessians, particularly when expensive computations (e.g., exponentiation) already need to be performed to evaluate a gradient. But Hessian-vector products are often more convenient. They can be computed efficiently through forward-mode automatic differentiation, reusing the implementation for computing gradients [7, 8]. This is the approach we take in our experiments. Fan et al. [9] also note the limitations of first-order stochastic optimization for variational inference: the learning rate is difficult to set, and convergence is especially slow for models with substantial curvature. Their approach is to apply Newton’s method or L-BFGS to problems that are both stochastic and nonconvex. All stationary points—minima, maxima, and saddle points—act as attractors for Newton steps, however, so while Newton’s method may converge quickly, it may also converge poorly. Trust region methods, on the other hand, are not only unharmed by negative curvature, they exploit it: descent directions that become even steeper are among the most productive. In section 5, we empirically compare TrustVI to Hessian-free Stochastic Gradient Variation Inference (HFSGVI) to assess the practical importance of our convergence theory. TrustVI builds on work from the derivative-free optimization community [10, 11, 12]. The STORM framework [12] is general enough to apply to a derivative-free setting, as well as settings where higher-order stochastic information is available. STORM, however, requires that a quadratic model of the objective function can always be constructed such that, with non-trivial probability, the quadratic model’s absolute error is uniformly bounded throughout the trust region. That requirement can be satisfied for the kind of low-dimensional problems one can optimize without derivatives, where the objective may be sampled throughout the trust region at a reasonable density, but not for most variational objective functions. 2 Background Variational inference chooses an approximation to the posterior distribution from a class of candidate distributions through numerical optimization [13]. The candidate approximating distributions q! are parameterized by a real-valued vector !. The variational objective function L, also known as the evidence lower bound (ELBO), is an expectation with respect to latent variables z that follow an approximating distribution q!: L(!) , Eq! {log p(x, z) −log q!(z)} . (1) Here x, the data, is fixed. If this expectation has an analytic form, L may be maximized by deterministic optimization methods, such as coordinate ascent and Newton’s method. Realistic Bayesian models, however, not selected primarily for computational convenience, seldom yield variational objective functions with analytic forms. Stochastic optimization offers an alternative. For many common classes of approximating distributions, there exists a base distribution p0 and a function g! such that, for e ⇠p0 and z ⇠q!, g!(e) d= z. In words: the random variable z whose distribution depends on !, is a deterministic function of a random variable e whose distribution does not depend on !. This alternative expression of the variational distribution is known as the “reparameterization trick” [1, 2, 3, 14]. At each iteration of an optimization procedure, ! is updated based on an unbiased Monte Carlo approximation to the objective function: ˆL(!; e1, . . . , eN) , 1 N N X i=1 {log p(x, g!(ei)) −log q!(g!(ei))} (2) for e1, . . . , eN sampled from the base distribution. 3 TrustVI TrustVI performs stochastic optimization of the ELBO L to find a distribution q! that approximates the posterior. For TrustVI to converge, the ELBO only needs to satisfy Condition 1. (Subsequent conditions apply to the algorithm specification, not the optimization problem.) Condition 1. L : RD ! R is a twice-differentiable function of ! that is bounded above. Its gradient has Lipschitz constant L. Condition 1 is compatible with all models whose conditional distributions are in the exponential family. The ELBO for a model with categorical random variables, for example, is twice differentiable in its parameters when using a mean-field categorical variational distribution. 2 Algorithm 1 TrustVI Require: Initial iterate !0 2 RD; initial trust region radius δ0 2 (0, δmax]; and settings for the parameters listed in Table 1. for k = 0, 1, 2, . . . do Draw stochastic gradient gk satisfying Condition 2. Select symmetric matrix Hk satisfying Condition 3. Solve for sk , arg max g| ks + 1 2s|Hks : ksk δk. Compute m0 k , g| ksk + 1 2s| kHksk. Select Nk satisfying Inequality 11 and Inequality 13. Draw `0 k1, . . . , `0 kNk satisfying Condition 4. Compute `0 k , 1 Nk PNk i=1 `0 ki. if `0 k ≥⌘m0 k ≥λδ2 k then !k+1 !k + sk δk+1 min(γδk, δmax) else !k+1 !k δk+1 δk/γ end if end for Table 1: User-selected parameters for TrustVI name brief description allowable range ⌘ model fitness threshold (0, 1/2] γ trust region expansion factor (1, 1) λ trust region radius constraint (0, 1) ↵ tradeoff between trust region radius and objective value (λ/(1 −γ−2), 1) ⌫1 tradeoff between both sampling rates (0, 1 −⌘) ⌫2 accuracy of “good” stochastic gradients’ norms (0, 1) ⌫3 accuracy of “good” stochastic gradients’ directions (0, 1 −⌘−⌫1) ⇣0 probability of “good” stochastic gradients (1/2, 1) ⇣1 probability of accepting a “good” step (1/(2⇣0), 1) H maximum norm of the quadratic models’ Hessians [0, 1) δ− maximum trust region radius for enforcing some conditions (0, 1] δmax maximum trust region radius (0, 1) The domain of L is taken to be all of RD. If instead the domain is a proper subset of a real coordinate space, the ELBO can often be reparameterized so that its domain is RD [4]. TrustVI iterations follow the form of common deterministic trust region methods: 1) construct a quadratic model of the objective function restricted to the current trust region; 2) find an approximate optimizer of the model function: the proposed step; 3) assess whether the proposed step leads to an improvement in the objective; and 4) update the iterate and the trust region radius based on the assessment. After introducing notation in Section 3.1, we describe proposing a step in Section 3.2 and assessing a proposed step in Section 3.3. TrustVI is summarized in Algorithm 1. 3.1 Notation TrustVI’s iteration number is denoted by k. During iteration k, until variables are updated at its end, !k is the iterate, δk is the trust region radius, and L(!k) is the objective-function value. As shorthand, let Lk , L(!k). During iteration k, a quadratic model mk is formed based on a stochastic gradient gk of L(!k), as well as a local Hessian approximation Hk. The maximizer of this model on the trust region, sk, we call the proposed step. The maximum, denoted m0 k , mk(sk), we refer to as the model improvement. We use the “prime” symbol to denote changes relating to a proposed step sk that is not necessarily 3 accepted; e.g., L0 k = L(!k + sk) −Lk. We use the ∆symbol to denote change across iterations; e.g., ∆Lk = Lk+1 −Lk. If a proposed step is accepted, then, for example, ∆Lk = L0 k and ∆δk = δ0 k. Each iteration k has two sources of randomness: mk and `0 k, an unbiased estimate of L0 k that determines whether to accept proposed step sk. `0 k is based on an iid random sample of size Nk (Section 3.3). For the random sequence m1, `0 1, m2, `0 2, . . ., it is often useful to condition on the earlier variables when reasoning about the next. Let M− k refer to the σ-algebra generated by m1, . . . , mk−1 and `0 1, . . . , `0 k−1. When we condition on M− k , we hold constant all the outcomes that precede iteration k. Let M+ k refer to the σ-algebra generated by m1, . . . , mk and `0 1, . . . , `0 k−1. When we condition on M+ k , we hold constant all the outcomes that precede drawing the sample that determines whether to accept the kth proposed step. Table 1 lists the user-selected parameters that govern the behavior of the algorithm. TrustVI converges to a stationary point for any selection of parameters in the allowable range (column 3). As shorthand, we refer to a particular trust region radius, derived from the user-selected parameters, as δ− k , min δ−, r ⌘m0 k λ , ⌫2⌫3krLkk ⌫2L + ⌫2⌘H + 8H ! . (3) 3.2 Proposing a step At each iteration, TrustVI proposes the step sk that maximizes the local quadratic approximation mk(s) = Lk + g| ks + 1 2s|Hks : ksk δk (4) to the function L restricted to the trust region. We set gk to the gradient of ˆL at !k, where ˆL is evaluated using a freshly drawn sample e1, . . . , eN. From Equation 2 we see that gk is a stochastic gradient constructed from a minibatch of size N. We must choose N large enough to satisfy the following condition: Condition 2. If δk δ− k , then, with probability ⇣0, given M− k , g| krLk ≥(⌫1 + ⌫3)krLkkkgkk + ⌘kgkk2 (5) and kgkk ≥⌫2krLkk. (6) Condition 2 is the only restriction on the stochastic gradients: they have to point in roughly the right direction most of the time, and they have to be of roughly the right magnitude when they do. By constructing the stochastic gradients from large enough minibatches of draws from the variational distribution, this condition can always be met. In practice, we cannot observe rL, and we do not explicitly set ⌫1, ⌫2, and ⌫3. Fortunately, Condition 2 holds as long as our stochastic gradients remain large in relation to their variance. Because we base each stochastic gradient on at least one sizable minibatch, we always have many iid samples to inform us about the population of stochastic gradients. We use a jackknife estimator [15] to conservatively bound the standard deviation of the norm of the stochastic gradient. If the norm of a given stochastic gradient is small relative to its standard deviation, we double the next iteration’s sampling rate. If it is large relative to its standard deviation, we halve it. Otherwise, we leave it unchanged. The gradient observations may include randomness from sources other than sampling the variational distribution too. In the “doubly stochastic” setting [3], for example, the data is also subsampled. This setting is fully compatible with our algorithm, though the size of the subsample may need to vary across iterations. To simplify our presentation, we henceforth only consider stochasticity from sampling the variational distribution. Condition 3 is the only restriction on the quadratic models’ Hessians. Condition 3. There exists finite H satisfying, for the spectral norm, kHkk H a. s. (7) for all iterations k with δk δ− k . 4 For concreteness we bound the spectral norm of Hk, but a bound on any Lp norm suffices. The algorithm specification does not involve H, but the convergence proof requires that H be finite. This condition suffices to ensure that, when the trust region is small enough, the model’s Hessian cannot interfere with finding a descent direction. With such mild conditions, we are free to use nearly arbitrary Hessians. Hessians may be formed like the stochastic gradients, by sampling from the variational distribution. The number of samples can be varied. The quadratic model’s Hessian could even be set to the identity matrix if we prefer not to compute second-order information. Low-dimensional models, and models with block diagonal Hessians, may be optimized explicitly by inverting −Hk + ↵kI, where ↵k is either zero for interior solutions, or just large enough that (−Hk + ↵kI)−1gk is on the boundary of the trust region [5]. Matrix inversion has cubic runtime though, and even explicitly storing Hk is prohibitive for many variational objectives. In our experiments, we instead maximize the model without explicitly storing the Hessian, through Hessian-vector multiplication, assembling Krylov subspaces through both conjugate gradient iterations and Lanczos iterations [16, 17]. We reuse our Hessian approximation for two consecutive iterations if the iterate does not change (i.e., the proposed steps are rejected). A new stochastic gradient gk is still drawn for each of these iterations. 3.3 Assessing the proposed step Deterministic trust region methods only accept steps that improve the objective by enough. In a stochastic setting, we must ensure that accepting “bad” steps is improbable while accepting “good” steps is likely. To assess steps, TrustVI draws new samples from the variational distribution—we may not reuse the samples that gk and Hk are based on. The new samples are used to estimate both L(!k) and L(!k + sk). Using the same sample to estimate both quantities is analogous to a matched-pairs experiment; it greatly reduces the variance of the improvement estimator. Formally, for i = 1, . . . , NK, let eki follow the base distribution and set `0 ki , ˆL(!k + sk; eki) −ˆL(!k; eki). (8) Let `0 k , 1 Nk Nk X i=1 `0 ki. (9) Then, `0 k is an unbiased estimate of L0 k—the quantity a deterministic trust region method would use to assess the proposed step. 3.3.1 Choosing the sample size To pick the sample size NK, we need additional control on the distribution of the `0 ki. The next condition gives us that. Condition 4. For each k, there exists finite σk such that the `0 ki are σk-subgaussian. Unlike the quantities we have introduced earlier, such as L and H, the σk need to be known to carry out the algorithm. Because `0 k1, `0 k2, . . . are iid, σ2 k may be estimated—after the sample is drawn—by the population variance formula, i.e., 1 Nk−1 PNk i=1(`0 ki −`0 k). We discuss below, in the context of setting Nk, how to make use of a “retrospective” estimate of σk in practice. Two user-selected constants control what steps are accepted: ⌘2 (0, 1/2) and λ > 0. The step is accepted iff 1) the observed improvement `0 k exceeds the fraction ⌘of the model improvement m0 k, and 2) the model improvement is at least a small fraction λ/⌘of the trust region radius squared. Formally, steps are accepted iff `0 k ≥⌘m0 k ≥λδ2 k. (10) If ⌘m0 k < λδ2 k, the step is rejected regardless of `0 k: we set Nk = 0. Otherwise, we pick the smallest Nk such that Nk ≥ 2σ2 k (⌘m0 k + y)2 log ✓⌧2δ2 k + y ⌧1δ2 k ◆ , 8y > max ✓ −⌘m0 k 2 , −⌧2δ2 k ◆ (11) 5 where ⌧1 , ↵(1 −γ−2) −λ and ⌧2 , ↵(γ2 −γ−2). (12) Finding the smallest such Nk is a one-dimensional optimization problem. We solve it via bisection. Inequality 11 ensures that we sample enough to reject most steps that do not improve the objective sufficiently. If we knew exactly how a proposed step changed the objective, we could express in closed form how many samples would be needed to detect bad steps with sufficiently high probability. Since we do not know that, Inequality 11 is for all such change-values in a range. Nonetheless, Nk is rarely large in practice: the second factor lower bounding Nk is logarithmic in y; in the first factor the denominator is bounded away from zero. Finally, if δk δ− k , we also ensure Nk is large enough that Nk ≥−2σ2 k log(1 −⇣1) ⌫2 1krLkk2δ2 k . (13) Selecting Nk this large ensures that we sample enough to detect most steps that improve the value of the objective sufficiently when the trust region is small. This bound is not high in practice. Because of how the `0 ki are collected (a “matched-pairs experiment”), as δk becomes small, σk becomes small too, at roughly the same rate. In practice, at the end of each iteration, we estimate whether Nk was large enough to meet the conditions. If not, we set Nk+1 = 2Nk. If Nk exceeds the size of the gradient’s minibatch, and it is more than twice as large as necessary to meet the conditions, we set Nk+1 = Nk/2. These Nk function evaluations require little computation compared to computing gradients and Hessian-vector products. 4 Convergence to a stationary point To show that TrustVI converges to a stationary point, we reason about the stochastic process (φk)1 k=1, where φk , Lk −↵δ2 k. (14) In words, φk is the objective function penalized by the weighted squared trust region radius. Because TrustVI is stochastic, neither Lk nor φk necessarily increase at every iteration. But, φk increases in expectation at each iteration (Lemma 1). That alone, however, does not suffice to show TrustVI reaches a stationary point; φk must increase in expectation by enough at each iteration. Lemma 1 and Lemma 2 in combination show just that. The latter states that the trust region radius cannot remain small unless the gradient is small too, while the former states that the expected increase is a constant fraction of the squared trust region radius. Perhaps surprisingly, Lemma 1 does not depend on the quality of the quadratic model: Rejecting a proposed step always leads to sufficient increase in φk. Accepting a bad step, though possible, rapidly becomes less likely as the proposed step gets worse. No matter how bad a proposed step is, φk increases in expectation. Theorem 1 uses the lemmas to show convergence by contradiction. The structure of its proof, excluding the proofs of the lemmas, resembles the proof from [5] that a deterministic trust region method converges. The lemmas’ proofs, on the other hand, more closely resemble the style of reasoning in the stochastic optimization literature [12]. Theorem 1. For Algorithm 1, lim k!1 krLkk = 0 a. s. (15) Proof. By Condition 1, L is bounded above. The trust region radius δk is positive almost surely by construction. Therefore, φk is bounded above almost surely by the constant sup L. Let the constant c , sup L −φ0. Then, 1 X k=1 E[∆φk | M− k ] c a. s. (16) 6 By Lemma 1, E[∆φk | M+ k ], and hence E[∆φk | M− k ], is almost surely nonnegative. Therefore, E[∆φk | M− k ] ! 0 almost surely. By an additional application of Lemma 1, δ2 k ! 0 almost surely too. Suppose there exists K0 and ✏> 0 such that krLkk ≥✏for all k > K1. Fix K ≥K0 such that δk meets the conditions of Lemma 2 for all k ≥K. By Lemma 2, (logγ ∆δk)1 K is a submartingale. A submartingale almost surely does not go to −1, so δk almost surely does not go to 0. The contradiction implies that krLkk < ✏infinitely often. Because our choice of ✏was arbitrary, lim inf k!1 krLkk = 0 a. s. (17) Because δ2 k ! 0 almost surely, this limit point is unique. Lemma 1. E ⇥ ∆φk | M+ k ⇤ ≥λδ2 k a. s. (18) Proof. Let ⇡denote the probability that the proposed step is accepted. Then, E[∆φk | M+ k ] = (1 −⇡)[↵(1 −γ−2)δ2 k] + ⇡[L0 k −↵(γ2 −1)]δ2 k (19) = ⇡[L0 k −⌧2δ2 k] + ⌧1δ2 k + λδ2 k. (20) By the lower bound on ↵, ⌧1 ≥0. If ⌘m0 k < λδ2 k, the step is rejected regardless of `k, so the lemma holds. Also, if L0 k ≥⌧2δ2 k, then lemma holds for any ⇡2 [0, 1]. So, consider just L0 k < ⌧2δ2 k and ⌘m0 k ≥λδ2 k. The probability ⇡of accepting this step is a tail bound on the sum of iid subgaussian random variables. By Condition 4, Hoeffding’s inequality applies. Then, Inequality 11 lets us cancel some of the remaining iteration-specific variables: ⇡= P(`0 k ≥⌘m0 k | M+ k ) (21) = P(`0 k −L0 k ≥⌘m0 k −L0 k | M+ k ) (22) = P NK X i=1 (`0 ki −L0 k) ≥(⌘m0 k −L0 k)Nk *** M+ k ! (23) exp ⇢ −(⌘m0 k −L0 k)2Nk 2σ2 k , (24) ⌧1δ2 k ⌧2δ2 k −L0 k . (25) The lemma follows from substituting Inequality 25 into Equation 20. Lemma 2. For each iteration k, on the event δk δ− k , we have P(`0 k ≥⌘m0 k | M− k ) ≥⇣0⇣1 > 1 2. (26) The proof appears in Appendix A of the supplementary material. 5 Experiments Our experiments compare TrustVI to both Automatic Differentiation Variational Inference (ADVI) [4] and Hessian-free Stochastic Gradient Variational Inference (HFSGVI) [9]. We use the authors’ Stan [21] implementation of ADVI, and implement the other two algorithms in Stan as well. Our study set comprises 183 statistical models and datasets from [22], an online repository of open-source Stan models and datasets. For our trials, the variational distribution is always mean-field multivariate Gaussian. The dimensions of ELBO domains range from 2 to 2012. 7 100 101 102 103 104 runtime (oracle calls) 103 104 105 106 107 108 109 1010 ELBO ADVI TrustVI HFSGVI (a) A variance components model (“Dyes”) from [18]. 18-dimensional domain. 100 101 102 103 104 runtime (oracle calls) 103 104 105 106 107 108 ELBO ADVI TrustVI HFSGVI (b) A bivariate normal hierarchical model (“Birats”) from [19]. 132-dimensional domain. 100 101 102 103 104 runtime (oracle calls) 102.90 102.95 103.00 103.05 103.10 103.15 103.20 103.25 ELBO ADVI TrustVI HFSGVI (c) A multi-level linear model (“Electric Chr”) from [20]. 100-dimensional domain. 100 101 102 103 104 runtime (oracle calls) 103.2 103.4 103.6 103.8 104.0 104.2 ELBO ADVI TrustVI HFSGVI (d) A multi-level linear model (“Radon Redundant Chr”) from [20]. 176-dimensional domain. Figure 1: Each panel shows optimization paths for five runs of ADVI, TrustVI, and HFSGVI, for a particular dataset and statistical model. Both axes are log scale. In addition to the final objective value for each method, we compare the runtime each method requires to produce iterates whose ELBO values are consistently above a threshold. As the threshold, for each pair of methods we compare, we take the ELBO value reached by the worse performing method, and subtract one nat from it. We measure runtime in “oracle calls” rather than wall clock time so that the units are independent of the implementation. Stochastic gradients, stochastic Hessian-vector products, and estimates of change in ELBO value are assigned one, two, and one oracle calls, respectively, to reflect the number of floating point operations required to compute them. Each stochastic gradient is based on a minibatch of 256 samples of the variational distribution. The number of variational samples for stochastic Hessian-vector products and for estimates of change (85 and 128, respectively) are selected to match the degree of parallelism for stochastic gradient computations. To make our comparison robust to outliers, for each method and each model, we optimize five times, but ignore all runs except the one that attains the median final objective value. 5.1 Comparison to ADVI ADVI has two phases that contribute to runtime: During the first phase, a learning rate is selected based on progress made by SGD during trials of 50 (by default) “adaptation” SGD iterations, for as many as six learning rates. During the second phase, the variational objective is optimized with the learning rate that made the most progress during the trials. If the number of adaptation iterations is small relative to the number of iterations needed to optimize the variational objective, then the learning rate selected may be too large: what appears most productive at first may be overly “greedy” for a longer run. Conversely, a large number of adaptation iteration may leave little computational budget for the actual optimization. We experimented with both more and fewer adaptation iterations 8 than the default but did not find a setting that was uniformly better than the default. Therefore, we report on the default number of adaption iterations for our experiments. Case studies. Figure 1 and Appendix B show the optimization paths for several models, chosen to demonstrate typical performance. Often ADVI does not finish its adaptation phase before TrustVI converges. Once the adaptation phase ends, ADVI generally increased the objective value function more gradually than TrustVI did, despite having expended iterations to tune its learning rate. Quality of optimal points. For 126 of the 183 models (69%), on sets of five runs, the median optimal values found by ADVI and TrustVI did not differ substantively. For 51 models (28%), TrustVI found better optimal values than ADVI. For 6 models (3%), ADVI found better optimal values than TrustVI. Runtime. We excluded model-threshold pairs from the runtime comparison that did not require at least five iterations to solve; they were too easy to be representative of problems where the choice of optimization algorithm matters. For 136 of 137 models (99%) remaining in our study set, TrustVI was faster than ADVI. For 69 models (50%), TrustVI was at least 12x faster than ADVI. For 34 models (25%), TrustVI was at least 36x faster than ADVI. 5.2 Comparison to HFSGVI HFSGVI applies Newton’s method—an algorithm that converges for convex and deterministic objective functions—to an objective function that is neither. But do convergence guarantees matter in practice? Often HFSGVI takes steps so large that numerical overflow occurs during the next iteration: the gradient “explodes” during the next iteration if we take a bad enough step. With TrustVI, we reject obviously bad steps (e.g., those causing numerical overflow) and try again with a smaller trust region. We tried several heuristics to workaround this problem with HFSGVI, including shrinking the norm of the very large steps that would otherwise cause numerical overflow. But “large” is relative, depending on the problem, the parameter, and the current iterate; severely restricting step size would unfairly limit HFSGVI’s rate of convergence. Ultimately, we excluded 23 of the 183 models from further analysis because HFSGVI consistently generated numerical overflow errors for them, leaving 160 models in our study set. Case studies. Figure 1 and Appendix B show that even when HFSGVI does not step so far as to cause numerical overflow, it nonetheless often makes the objective value worse before it gets better. HFSGVI, however, sometimes makes faster progress during the early iterations, while TrustVI is rejecting steps as it searches for an appropriate trust region radius. Quality of optimal points. For 107 of the 160 models (59%), on sets of five runs, the median optimal value found by TrustVI and HFSGVI did not differ substantively. For 51 models (28%), TrustVI found a better optimal values than HFSGVI. For 1 model (0.5%), HFSGVI found a better optimal value than TrustVI. Runtime. We excluded 45 model-threshold pairs from the runtime comparison that did not require at least five iterations to solve, as in Section 5.1. For the remainder of the study set, TrustVI was faster than HFSGVI for 61 models, whereas HFSGVI was faster than TrustVI for 54 models. As a reminder, HFSGVI failed to converge on another 23 models that we excluded from the study set. 6 Conclusions For variational inference, it is no longer necessary to pick between slow stochastic first-order optimization (e.g., ADVI) and fast-but-restrictive deterministic second-order optimization. The algorithm we propose, TrustVI, leverages stochastic second-order information, typically finding a solution at least one order of magnitude faster than ADVI. While HFSGVI also uses stochastic second-order information, it lacks convergence guarantees. For more than one-third of our experiments, HFSGVI terminated at substantially worse ELBO values than TrustVI, demonstrating that convergence theory matters in practice. 9 References [1] Diederik Kingma and Max Welling. Auto-encoding variational Bayes. In International Conference on Learning Representations, 2014. [2] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, 2014. [3] Michalis Titsias and Miguel Lázaro-Gredilla. Doubly stochastic variational Bayes for non-conjugate inference. In International Conference on Machine Learning, 2014. [4] Alp Kucukelbir, Dustin Tran, Rajesh Ranganath, Andrew Gelman, and David M. Blei. Automatic Differentiation Variational Inference. Journal of Machine Learning Research, 18(14):1–45, 2017. [5] Jorge Nocedal and Stephen Wright. Numerical optimization. Springer, 2nd edition, 2006. [6] Jeffrey Regier et al. Learning an astronomical catalog of the visible universe through scalable Bayesian inference. arXiv preprint arXiv:1611.03404, 2016. [7] Jeffrey Fike and Juan Alonso. Automatic differentiation through the use of hyper-dual numbers for second derivatives. In Recent Advances in Algorithmic Differentiation, pages 163–173. Springer, 2012. [8] Barak A Pearlmutter. Fast exact multiplication by the Hessian. Neural Computation, 6(1):147–160, 1994. [9] Kai Fan, Ziteng Wang, Jeffrey Beck, James Kwok, and Katherine Heller. Fast second-order stochastic backpropagation for variational inference. In Advances in Neural Information Processing Systems, 2015. [10] Sara Shashaani, Susan Hunter, and Raghu Pasupathy. ASTRO-DF: Adaptive sampling trust-region optimization algorithms, heuristics, and numerical experience. In IEEE Winter Simulation Conference, 2016. [11] Geng Deng and Michael C Ferris. Variable-number sample-path optimization. Mathematical Programming, 117(1):81–109, 2009. [12] Ruobing Chen, Matt Menickelly, and Katya Scheinberg. Stochastic optimization using a trust-region method and random models. Mathematical Programming, pages 1–41, 2017. [13] David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 2017. [14] James Spall. Introduction to stochastic search and optimization: Estimation, simulation, and control. John Wiley & Sons, 2005. [15] Bradley Efron and Charles Stein. The jackknife estimate of variance. The Annals of Statistics, pages 586–596, 1981. [16] Nicholas Gould, Stefano Lucidi, Massimo Roma, and Philippe Toint. Solving the trust-region subproblem using the Lanczos method. SIAM Journal on Optimization, 9(2):504–525, 1999. [17] Felix Lenders, Christian Kirches, and Andreas Potschka. trlib: A vector-free implementation of the GLTR method for iterative solution of the trust region problem. arXiv preprint arXiv:1611.04718, 2016. [18] OpenBugs developers. Dyes: Variance components model. http://www.openbugs.net/Examples/ Dyes.html, 2017. [Online; accessed Oct 8, 2017]. [19] OpenBugs developers. Rats: A normal hierarchical model. http://www.openbugs.net/Examples/ Rats.html, 2017. [Online; accessed Oct 8, 2017]. [20] Andrew Gelman and Jennifer Hill. Data analysis using regression and multilevel/hierarchical models. Cambridge University Press, 2006. [21] Bob Carpenter et al. Stan: A probabilistic programming language. Journal of Statistical Software, 20, 2016. [22] Stan developers. https://github.com/stan-dev/example-models, 2017. [Online; accessed Jan 3, 2017; commit 6fbbf36f9d14ed69c7e6da2691a3dbe1e3d55dea]. [23] OpenBugs developers. Alligators: Multinomial-logistic regression. http://www.openbugs.net/ Examples/Aligators.html, 2017. [Online; accessed Oct 4, 2017]. [24] OpenBugs developers. Seeds: Random effect logistic regression. http://www.openbugs.net/ Examples/Seeds.html, 2017. [Online; accessed Oct 4, 2017]. [25] David Lunn, Chris Jackson, Nicky Best, Andrew Thomas, and David Spiegelhalter. The BUGS book: A practical introduction to Bayesian analysis. CRC press, 2012. 10 | 2017 | 406 |
6,904 | Revisit Fuzzy Neural Network: Demystifying Batch Normalization and ReLU with Generalized Hamming Network Lixin Fan lixin.fan@nokia.com Nokia Technologies Tampere, Finland Abstract We revisit fuzzy neural network with a cornerstone notion of generalized hamming distance, which provides a novel and theoretically justified framework to re-interpret many useful neural network techniques in terms of fuzzy logic. In particular, we conjecture and empirically illustrate that, the celebrated batch normalization (BN) technique actually adapts the “normalized” bias such that it approximates the rightful bias induced by the generalized hamming distance. Once the due bias is enforced analytically, neither the optimization of bias terms nor the sophisticated batch normalization is needed. Also in the light of generalized hamming distance, the popular rectified linear units (ReLU) can be treated as setting a minimal hamming distance threshold between network inputs and weights. This thresholding scheme, on the one hand, can be improved by introducing double-thresholding on both positive and negative extremes of neuron outputs. On the other hand, ReLUs turn out to be non-essential and can be removed from networks trained for simple tasks like MNIST classification. The proposed generalized hamming network (GHN) as such not only lends itself to rigorous analysis and interpretation within the fuzzy logic theory but also demonstrates fast learning speed, well-controlled behaviour and state-of-the-art performances on a variety of learning tasks. 1 Introduction Since early 1990s the integration of fuzzy logic and computational neural networks has given birth to the fuzzy neural networks (FNN) [1]. While the formal fuzzy set theory provides a strict mathematical framework in which vague conceptual phenomena can be precisely and rigorously studied [2, 3, 4, 5], application-oriented fuzzy technologies lag far behind theoretical studies. In particular, fuzzy neural networks have only demonstrated limited successes on some toy examples such as [6, 7]. In order to catch up with the rapid advances in recent neural network developments, especially those with deep layered structures, it is the goal of this paper to demonstrate the relevance of FNN, and moreover, to provide a novel view on its non-fuzzy counterparts. Our revisiting of FNN is not merely for the fond remembrances of the golden age of “soft computing” [8]. Instead it provides a novel and theoretically justified perspective of neural computing, in which we are able to re-examine and demystify some useful techniques that were proposed to improve either effectiveness or efficiency of neural networks training processes. Among many others, batch normalization (BN) [9] is probably the most influential yet mysterious trick, that significantly improved the training efficiency by adapting to the change in the distribution of layers’ inputs (coined as internal covariate shift). Such kind of adaptations, when viewed within the fuzzy neural network framework, can be interpreted as rectifications to the deficiencies of neuron outputs with respect to the rightful generalized hamming distance (see definition 1) between inputs and neuron weights. Once 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the appropriate rectification is applied , the ill effects of internal covariate shift are automatically eradicated, and consequently, one is able to enjoy the fast training process without resorting to a sophisticated learning method used by BN. Another crucial component in neural computing, Rectified linear unit (ReLU), has been widely used due to its strong biological motivations and mathematical justifications [10, 11, 12]. We show that within the generalized hamming group endowed with generalized hamming distance, ReLU can be regarded as setting a minimal hamming distance threshold between network input and neuron weights. This novel view immediately leads us to an effective double-thresholding scheme to suppress fuzzy elements in the generalized hamming group. The proposed generalized hamming network (GHN) forms its foundation on the cornerstone notion of generalized hamming distance (GHD), which is essentially defined as h(x, w) := x + w −2xw for any x, w ∈R (see definition 1). Its connection with the inferencing rule in neural computing is obvious: the last term (−2xw) corresponds to element-wise multiplications of neuron inputs and weights, and since we aim to measure the GHD between inputs x and weights w, the bias term then should take the value x + w. In this article we define any network that has its neuron outputs fulfilling this requirement (3) as a generalized hamming network. Since the underlying GHD induces a fuzzy XOR logic, GHN lends itself to rigorous analysis within the fuzzy logics theory (see definition 4). Apart from its theoretical appeals, GHN also demonstrates appealing features in terms of fast learning speed, well-controlled behaviour and simple parameter settings (see Section 4). 1.1 Related Work Fuzzy logic and fuzzy neural network: the notion of fuzzy logic is based on the rejection of the fundamental principle of bivalence of classical logic i.e. any declarative sentence has only two possible truth values, true and false. Although the earliest connotation of fuzzy logic was attributed to Aristotle, the founder of classical logic [13], it was Zadeh’s publication in 1965 that ignited the enthusiasm about the theory of fuzzy sets [2]. Since then mathematical developments have advanced to a very high standard and are still forthcoming to day [3, 4, 5]. Fuzzy neural networks were proposed to take advantages of the flexible knowledge acquiring capability of neural networks [1, 14]. In theory it was proved that fuzzy systems and certain classes of neural networks are equivalent and convertible with each other [15, 16]. In practice, however, successful applications of FNNs are limited to some toy examples only [6, 7]. Demystifying neural networks: efforts of interpreting neural networks by means of propositional logic dated back to McCulloch & Pitts’ seminial paper [17]. Recent research along this line include [18] and the references therein, in which First Order Logic (FOL) rules are encoded using soft logic on continuous truth values from the interval [0, 1]. These interpretations, albeit interesting, seldom explain effective neural network techniques such as batch normalization or ReLU. Recently [19] provided an improvement (and explanation) to batch normalization by removing dependencies in weight normalization between the examples in a minibatch. Binary-valued neural network: Restricted Boltzmann Machine (RBM) was used to model an “ensemble of binary vectors” and rose to prominence in the mid-2000s after fast learning algorithms were demonstrated by Hinton et. al. [20, 21]. Recent binarized neural network [22, 23] approximated standard CNNs by binarizing filter weights and/or inputs, with the aim to reduce computational complexity and memory consumption. The XNOR operation employed in [23] is limited to binary hamming distance and not readily applicable to non-binary neuron weights and inputs. Ensemble of binary patterns: the distributive property of GHD described in (1) provides an intriguing view on neural computing – even though real-valued pattens are involved in the computation, the computed GHD is strictly equivalent to the mean of binary hamming distances across two ensembles of binary patterns! This novel view illuminates the connection between generalized hamming networks and efficient binary features, that have long been used in various computer vision tasks, for instance, the celebrated Adaboost face detection[24], numerous binary features for key-point matching [25, 26] and binary codes for large database hashing [27, 28, 29, 30]. 2 −3 −2 −1 0 1 2 3 4 −3 −2 −1 0 1 2 3 4 −20 −10 0 10 20 h(a, b) (a) −3 −2 −1 0 1 2 3 4 −3 −2 −1 0 1 2 3 4 −1200 −1000 −800 −600 −400 −200 0 F(h(a, b)) (b) −3 −2 −1 0 1 2 3 4 −3 −2 −1 0 1 2 3 4 0.2 0.4 0.6 0.8 μ(h(a, b)) (c) −3 −2 −1 0 1 2 3 4 −3 −2 −1 0 1 2 3 4 −0.015 −0.010 −0.005 0.000 0.005 0.010 0.015 ∂μ ∂a(h(a, b)) (d) Figure 1: (a) h(a, b) has one fuzzy region near the identity element 0.5 (in white), two positively confident (in red) and two negatively confident (in blue) regions from above and below, respectively. (b) Fuzziness F(h(a, b)) = h(a, b) ⊕h(a, b) has its maxima along a = 0.5 or b = 0.5. (c) µ(h(a, b)) : U →I where µ(h) = 1/(1+exp(0.5−h)) is the logistic function to assign membership to fuzzy set elements (see definition 4). (d) partial derivative of µ(h(a, b)). Note that magnitudes of gradient in the fuzzy region is non-negligible. 2 Generalized Hamming Distance Definition 1. Let a, b, c ∈U ⊆R, and a generalized hamming distance (GHD), denoted by ⊕, be a binary operator h : U × U →U; h(a, b) := a ⊕b = a + b −2 · a · b . Then (i) for U = {0, 1} GHD de-generalizes to binary hamming distance with 0 ⊕0 = 0; 0 ⊕1 = 1; 1 ⊕0 = 1; 1 ⊕1 = 0; (ii) for U = [0.0, 1.0] the unitary interval I, a ⊕b ∈I (closure); Remark: this case is referred to as the “restricted” hamming distance, in the sense that inverse of any elements in I are not necessarily contained in I (see below for definition of inverse). (iii) for U = R, H := (R, ⊕) is a group satisfying five abelian group axioms, thus is referred to as the generalized hamming group or hamming group: • a ⊕b = (a + b −2 · a · b) ∈R (closure); • a ⊕b = (a + b −2 · a · b) = b ⊕a (commutativity); • (a ⊕b) ⊕c = (a + b −2 · a · b) + c −2(a + b −2 · a · b)c = a + (b + c −2 · b · c) −2 · a · (b + c −2 · b · c) = a ⊕(b ⊕c) (associativity); • ∃e = 0 ∈R such that e ⊕a = a ⊕e = (0 + a −2 · 0 · a) = a (identity element); • for each a ∈R \ {0.5}, ∃a−1 := a/(2 · a −1) s.t. a ⊕a−1 = (a + a 2·a−1 −2a · a 2·a−1) = 0 = e; and we define ∞:= (0.5)−1 (inverse element). Remark: note that 1 ⊕a = 1 −a which complements a. “0.5” is a fixed point since ∀a ∈ R, 0.5 ⊕a = 0.5, and 0.5 ⊕∞= 0 according to definition1. (iv) GHD naturally leads to a measurement of fuzziness: F(a) := a ⊕a, R →(−∞, 0.5] : F(a) ≥0, ∀a ∈[0, 1]; F(a) < 0 otherwise. Therefore [0, 1] is referred to as the fuzzy region in which F(0.5) = 0.5 has the maximal fuzziness and F(0) = F(1) = 0 are two boundary points. Outer regions (−∞, 0] and [1, ∞) are negative and positive confident regions respectively. See Figure 1 (a) for the surface of h(a, b) which has one central fuzzy region, two positive confident and two negative confident regions. (v) The direct sum of hamming group is still a hamming group HL := ⊕l∈LHl: let x = {x1, . . . , xL}, y = {y1, . . . , yL} ∈HL be two group members, then the generalized hamming distance is defined as the arithmetic mean of element-wise GHD: GL(x ⊕L y) := 1 L(x1 ⊕y1 + . . . + xL ⊕yL). And let ˜x = (x1 +. . . xL)/L, ˜y = (y1 +. . . yL)/L be arithmetic means of respective elements, then GL(x ⊕L y) = ˜x + ˜y −2 L(x · y) , where x · y = PL l=1 xl · yl is the dot product. 1By this extension, it is R = R ∪{−∞, +∞} instead of R on which we have all group members. 3 (vi) Distributive property: let ¯XM = (x1 + . . . xM)/M ∈HL be element-wise arithmetic mean of a set of members xm ∈HL, and ¯YN be defined in the same vein. Then GHD is distributive: GL(¯XM ⊕L ¯YN) = 1 L L X l=1 ¯xl ⊕¯yl = 1 M 1 N 1 L M X m=1 N X n=1 L X l=1 xm l ⊕yn l = 1 MN M X m=1 N X n=1 GL(xm ⊕L yn). (1) Remark: in case that xm l , yn l ∈{0, 1} i.e. for two sets of binary patterns, the mean of binary hamming distance between two sets can be efficiently computed as the GHD between two realvalued patterns ¯XM, ¯YN. Conversely, a real-valued pattern can be viewed as the element-wise average of an ensemble of binary patterns. 3 Generalized Hamming Network Despite the recent progresses in deep learning, artificial neural networks has long been criticized for its “black box” nature: “they capture hidden relations between inputs and outputs with a highly accurate approximation, but no definitive answer is offered for the question of how they work” [16]. In this section we provide an interpretation on neural computing by showing that, if the condition specified in (3) is fulfilled, outputs of each neuron can be strictly defined as the generalized hamming distance between inputs and weights. Moreover, the computations of GHD induces fuzzy implication of XOR connective, and therefore, the inferencing of entire network can be regarded as a logical calculus in the same vein as described in McCulloch & Pitts’ seminial paper [17]. 3.1 New perspective on neural computing The bearing of generalized hamming distance on neural computing is elucidated by looking at the negative of generalized hamming distance, (GHD, see definition 1), between inputs x ∈HL and weights w ∈HL in which L denotes the length of neuron weights e.g. in convolution kernels: −GL(w ⊕L x) = 2 Lw · x −1 L L X l=1 wl −1 L L X l=1 xl (2) Divide (2) by the constant 2 L and let b = −1 2 L X l=1 wl + L X l=1 xl (3) then it becomes the familiar form (w · x + b) of neuron outputs save the non-linear activation function. By enforcing the bias term to take the given value in (3), standard neuron outputs measure negatives of GHD between inputs and weights. Note that, for each layer, the bias term PL l=1 xl is averaged over neighbouring neurons in individual input image. The bias term PL l=1 wl is computed separately for each filter in fully connected or convolution layers. When weights are updated during the optimization, PL l=1 wl changes accordingly to keep up with weights and maintain stable neuron outputs. We discuss below (re-)interpretations of neural computing in terms of GHD. Fuzzy inference: As illustrated in definition 4 GHD induces a fuzzy XOR connective. Therefore the negative of GHD quantifies the degree of equivalence between inputs x and weights w (see definition 4 of fuzzy XOR), i.e. the fuzzy truth value of the statement “x ↔w” where ↔denotes a fuzzy equivalence relation. For GHD with multiple layers stacked together, neighbouring neuron outputs from the previous layer are integrated to form composite statements e.g. “(x1 1 ↔w1 1, . . . , x1 i ↔ w1 i ) ↔w2 j” where superscripts correspond to two layers. Thus stacked layers will form more complex, and hopefully more powerful, statements as the layer depth increases. 4 0 5 10 15 20 25 30 −0.16 −0.14 −0.12 −0.10 −0.08 −0.06 −0.04 −0.02 0.00 Y: Mean outputs X:epochs( 100) BN XOR WO_BN 0 5 10 15 20 25 30 0 1 2 3 4 5 6 7 8 Y: Max outputs X:epochs(x100) BN XOR WO_BN 0 5 10 15 20 25 30 −7 −6 −5 −4 −3 −2 −1 0 Y: Min outputs X:epochs(x100) BN XOR WO_BN Figure 2: Left to right: mean, max and min of neuron outputs, with/without batch normalized (BN, WO_BN) and generalized hamming distance (XOR). Outputs are averaged over all 64 filters in the first convolution layer and plotted for 30 epochs training of a MNIST network used in our experiment (see Section 4). Batch normalization demystified: When a mini-batch of training samples X = {x1, . . . , xM} is involved in the computation, due to the distributive property of GHD, the data-dependent bias term L P l=1 xl equals the arithmetic mean of corresponding bias terms computed for each sample in the mini-batch i.e. 1 M M P m=1 L P l=1 xm l . It is almost impossible to maintain a constant scalar b that fulfils this requirement when mini-batch changes, especially at deep layers of the network whose inputs are influenced by weights of incoming layers. The celebrated batch normalization (BN) technique therefore proposed a learning method to compensate for the input vector change, with additional parameters γ, β to be learnt during the training [9]. It is our conjecture that batch normalization is approximating these rightful bias through optimization, and this connection is empirically revealed in Figure 2 with very similar neuron outputs obtained by BN and GHD. Indeed they are highly correlated during the course of training (with Pearson correlation coefficient=0.97), confirming our view that BN is attempting to influence the bias term according to (3). Once b is enforced to follow (3), neither the optimization of bias terms nor the sophisticated learning method of BN is needed. In the following section we will illustrate a rectified neural network designed as such. Rectified linear units (ReLU) redesigned: Due to its strong biological motivations [10] and mathematical justifications [11], rectified linear unit (ReLu) is the most popular activation function used for deep neural network [31]. If neuron outputs are rectified as the generalized hamming distances, the activation function max(0, 0.5 −h(x, w)) then simply sets a minimal hamming distance threshold of 0.5 (see Figure 1). Astute readers may immediately spot two limitations of this activation function: a) it only takes into account the negative confidence region while disregards positive confidence regions; b) it allows elements in the fuzzy regime near 0.5 to misguide the optimization with their non-negligible gradients. A straightforward remedy to ReLU is to suppress elements within the fuzzy region by setting outputs between [0.5 −r, 0.5 + r] to 0.5, where r is a parameter to control acceptable fuzziness in neuron outputs. In particular, we may set thresholds adaptively e.g. [0.5 −r · O, 0.5 + r · O] where O is the maximal magnitude of neuron outputs and the threshold ratio r is adjusted by the optimizer. This double-thresholding strategy effectively prevents noisy gradients of fuzzy elements, since 0.5 is a fixed point and x ⊕0.5 = 0.5 for any x. Empirically we found this scheme, in tandem with the rectification (3), dramatically boosts the training efficiency for challenging tasks such as CIFAR10/100 image classification. It must be noted that, however, the use of non-linear activation as such is not essential for GHD-based neural computing. When the double-thresholding is switched-off (by fixing r = 0), the learning is prolonged for challenging CIFAR10/100 image classification but its influence on the simple MNIST classification is almost negligible (see Section 4 for experimental results). 3.2 Ganeralized hamming network with induced fuzzy XOR Definition 2. A generalized hamming network (GHN) is any networks consisting of neurons, whose outputs h ∈HL are related to neuron inputs x ∈HL and weights w ∈HL by h = x ⊕L w . 5 Remark: In case that the bias term is computed directly from (3) such that h = x ⊕L w is fulfilled strictly, the network is called a rectified GHN or simply a GHN. In other cases where bias terms are approximating the rightful offsets (e.g. by batch normalization [9]), the trained network is called an approximated GHN. Compared with traditional neural networks, the optimization of bias terms is no longer needed in GHN. Empirically, it is shown that the proposed GHN benefits from a fast and robust learning process that is on par with that of the batch-normalization approach, yet without resorting to sophisticated learning process of additional parameters (see Section 4 for experimental results). On the other hand, GHN also benefits from the rapid developments of neural computing techniques, in particular, those employing parallel computing on GPUs. Due to this efficient implementation of GHNs, it is the first time that fuzzy neural networks have demonstrated state-of-the-art performances on learning tasks with large scale datasets. Often neuron outputs are clamped by a logistic activation function to within the range [0, 1], so that outputs can be compared with the target labels in supervised learning. As shown below, GHD followed by such a non-linear activation actually induces a fuzzy XOR connective. We briefly review basic notion of fuzzy set used in our work and refer readers to [2, 32, 13] for thorough treatments and review of the topic. Definition 3. Fuzzy Set: Let X be an universal set of elements x ∈X, then a fuzzy set A is a set of pairs: A := { x, µA(x) |x ∈X, µA(x) ∈I}, in which µA : X →I is called the membership function (or grade membership). Remark: In this work we let X be a Cartesian product of two sets X = P × U where P are (2D or 3D) collection of neural nodes and U are real numbers in ⊆I or ⊆R. We define the membership function µX(x) := µU(xp), ∀x = (p, xp) ∈X such that it is dependent on xp only. For the sake of brevity we abuse the notation and use µ(x), µX(x) and µU(xp) interchangeably. Definition 4. Induced fuzzy XOR: let two fuzzy set elements a, b ∈U be assigned with respective grade or membership by a membership function µ : U →I : µ(a) = i, µ(b) = j, then the generalized hamming distance h(a, b) : U ×U →U induces a fuzzy XOR connective E : I ×I →I whose membership function is given by µR(i, j) = µ(h(µ−1(i), µ−1(j))). (4) Remark: For the restricted case U = I the membership function can be trivially defined as the identity function µ = idI as proved in [4]. Remark: For the generalized case where U = R, the fuzzy membership µ can be defined by a sigmoid function such as logistic, tanh or any function : U →I. In this work we adopt the logistic function µ(a) = 1 1+exp(0.5−a) and the resulting fuzzy XOR connective is given by following membership function: µR(i, j) = 1 1 + exp 0.5 −µ−1(i) ⊕µ−1(j) , (5) where µ−1(a) = −ln( 1 a −1) + 1 2 is the inverse of µ(a). Following this analysis, it is possible to rigorously formulate neuron computing of the entire network according to inference rules of fuzzy logic theory (in the same vein as illustrated in [17]). Nevertheless, research along this line is out of the scope of the present article and will be reported elsewhere. 4 Performance evaluation 4.1 A case study with MNIST image classification Overall performance: we tested a simple four-layered GHN (cv[1,5,5,16]-pool-cv[16,5,5,64]-poolfc[1024]-fc[1024,10]) on the MNIST dataset with 99.0% test accuracy obtained. For this relatively simple dataset, GHN is able to reach test accuracies above 0.95 with 1000 mini-batches and a learning rate 0.1. This learning speed is on par with that of the batch normalization (BN), but without resorting to the learning of additional parameters in BN. It was also observed a wide range of large learning rates (from 0.01 to 0.1) all resulted in similar final accuracies (see below). We ascribe this well-controlled robust learning behaviour to rectified bias terms enforced in GHNs. 6 3.0 3.5 4.0 4.5 5.0 log(#mini_batch) 0.80 0.85 0.90 0.95 1.00 Accuracy rate0.1 (98.97%) rate0.05 (98.86%) rate0.025 (98.96%) rate0.01 (98.69%) 3.0 3.5 4.0 4.5 5.0 log(#mini_batch) 0.75 0.80 0.85 0.90 0.95 1.00 Accuracy rate0.1 (98.91%) rate0.05 (99.01%) rate0.025 (98.86%) rate0.01 (98.65%) 3.0 3.5 4.0 4.5 5.0 log(#mini_batch) 0.75 0.80 0.85 0.90 0.95 1.00 Accuracy rate0.1 (98.98%) rate0.05 (98.83%) rate0.025 (98.84%) rate0.01 (98.63%) Figure 3: Test accuracies of MNIST classification with Generalized Hamming Network (GHN). Left: test accuracies without using non-linear activation (by setting r = 0). Middle: with r optimized for each layer. Right: with r optimized for each filter. Four learning rates i.e. {0.1, 0.05, 0.025, 0.01} are used for each case with the final accuracy reported in brackets. Note that the number of mini-batch are in logarithmic scale along x-axis. Influence of learning rate: This experiment compares performances with different learning rates and Figure 3 (middle,right) show that a very large learning rate (0.1) leads to much faster learning without the risk of divergences. A small learning rate (0.01) suffice to guarantee the comparable final test accuracy. Therefore we set the learning rate to a constant 0.1 for all experiments unless stated otherwise. Influence of non-linear double-thresholding: The non-linear double-thresholding can be turned off by setting the threshold ratio r = 0 (see texts in Section 3.1). Optionally the parameter r is automatically optimized together with the optimization of neuron weights. Figure 3 (left) shows that the GHN without non-linear activation (by setting r = 0) performs equally well as compared with the case where r is optimized (in Figure 3 left, right). There are no significant differences between two settings for this relative simple task. 4.2 CIFAR10/100 image classification In this experiment, we tested a six-layered GHN (cv[3,3,3,64]-cv[64,5,5,256]-pool-cv[256,5,5,256]pool-fc[1024]-fc[1024,512]-fc[1024,nclass]) on both CIFAR10 (nclass=10) and CIFAR100 (nclass=100) datasets. Figure 4 shows that the double-thresholding scheme improves the learning efficiency dramatically for these challenging image classification tasks: when the parameter r is optimized for each feature filter the numbers of iterations required to reach the same level of test accuracy are reduced by 1 to 2 orders of magnitudes. It must be noted that performances of such a simple generalized hamming network (89.3% for CIFAR10 and 60.1% for CIFAR100) are on par with many sophisticated networks reported in [33]. In our view, the rectified bias enforced by (3) can be readily applied to these sophisticated networks, although resulting improvements may vary and remain to be tested. 4.3 Generative modelling with Variational Autoencoder In this experiment, we tested the effect of rectification in GHN applied to a generative modelling setting. One crucial difference is that the objective is now to minimize reconstruction error instead of classification error. It turns out the double-thresholding scheme is no longer relevant for this setting and thus not used in the experiment. The baseline network (784-400-400-20) used in this experiment is an improved implementation [34] of the influential paper [35], trained on the MNIST dataset of images of handwritten digits. We have rectified the outputs following (3) and, instead of optimizing the lower bound of the log marginal likelihood as in [35], we directly minimize the reconstruction error. Also we did not include weights regularization terms for the optimization as it is unnecessary for GHN. Figure 5 (left) illustrates the reconstruction error with respect to number of training steps (mini-batches). It is shown that the rectified generalized hamming network converges to a lower minimal reconstruction error as compared to the baseline network, with about 28% reduction. The rectification also leads to a faster convergence, which is in accordance with our observations in other experiments. 7 3.0 3.5 4.0 4.5 5.0 5.5 6.0 log(#mini_batch) 0.4 0.5 0.6 0.7 0.8 0.9 Accuracy OPT_THRES (89.26%) WO_THRES (84.63%) 3.00 3.25 3.50 3.75 4.00 4.25 4.50 4.75 log(#mini_batch) 0.1 0.2 0.3 0.4 0.5 0.6 Accuracy OPT_THRES (60.05%) WO_THRES (51.71%) Figure 4: Left: GHN test accuracies of CIFAR10 classification (OPT THRES: parameter r optimized; WO THRES: without nonlinear activation). Right: GHN test accuracies of CIFAR100 classification(OPT THRES: parameter r optimized; WO THRES: without non-linear activation). 0 20000 40000 60000 80000 100000 #mini_batch 1500 2000 2500 3000 3500 4000 4500 5000 Reconstruction error GHN VAE 0 1000 2000 3000 4000 5000 #mini_batch 0.50 0.55 0.60 0.65 0.70 0.75 accuracy GHN CNN Figure 5: Left: Reconstruction errors of convolution VAE with and w/o rectification. Right: Evaluation accuracies of Sentence classification with GHN rectification and w/o rectification). 4.4 Sentence classification A simple CNN has been used for sentence-level classification tasks and excellent results were demonstrated on multiple benchmarks [36]. The baseline network used in this experiment is a re-implementation of [36] made available from [37]. Figure 5 (right) plots accuracy curves from both networks. It was observed that the rectified GHN did improve the learning speed, but did not improve the final accuracy as compared with the baseline network: both networks yielded the final evaluation accuracy around 74% despite that the training accuracy were almost 100%. The over-fitting in this experiment is probably due to the relatively small Movie Review dataset size with 10,662 example review sentences, half positive and half negative. 5 Conclusion In summary, we proposed a rectified generalized hamming network (GHN) architecture which materializes a re-emerging principle of fuzzy logic inferencing. This principle has been extensively studied from a theoretic fuzzy logic point of view, but has been largely overlooked in the practical research of ANN. The rectified neural network derives fuzzy logic implications with underlying generalized hamming distances computed in neuron outputs. Bearing this rectified view in mind, we proposed to compute bias terms analytically without resorting to sophisticated learning methods such as batch normalization. Moreover, we have shown that, the rectified linear units (ReLU) was theoretically non-essential and could be skipped for some easy tasks. While for challenging classification problems, the double-thresholding scheme did improve the learning efficiency significantly. The simple architecture of GHN, on the one hand, lends itself to being analysed rigorously and this follow up research will be reported elsewhere. On the other hand, GHN is the first fuzzy neural network of its kind that has demonstrated fast learning speed, well-controlled behaviour and stateof-the-art performances on a variety of learning tasks. By cross-checking existing networks against GHN, one is able to grasp the most essential ingredient of deep learning. It is our hope that this kind of comparative study will shed light on future deep learning research and eventually open the “black box” of artificial neural networks [16]. 8 Acknowledgement I am grateful to anonymous reviewers for their constructive comments to improve the quality of this paper. I greatly appreciate valuable discussions and supports from colleagues at Nokia Technologies. References [1] M M Gupta and D H Rao. Invited Review on the principles of fuzzy neural networks. Fuzzy Sets and Systems, 61:1–18, 1994. [2] L.A. Zadeh. Fuzzy sets. Information Control, 8:338–353, 1965. [3] József Tick, János Fodor, and John Von Neumann. Fuzzy Implications and Inference Process. Computing and Informatics, 24:591–602, 2005. [4] Benjamín C Bedregal, Renata H S Reiser, and Graçaliz P Dimuro. Xor-Implications and E-Implications: Classes of Fuzzy Implications Based on Fuzzy Xor. Electronic Notes in Theoretical Computer Science, 247:5–18, 2009. [5] Krassimir Atanassov. On Zadeh’s intuitionistic fuzzy disjunction and conjunction. NIFS, 17(1):1–4, 2011. [6] Abhay B Ulsari. Training Artificial Neural Networks for Fuzzy Logic. Complex Systems, 6:443–457, 1992. [7] Witold Pedrycz and Giancarlo Succi. fXOR fuzzy logic networks. Soft Computing, 7, 2002. [8] H.-J Zimmermann. Fuzzy set theory review. Advanced Review, 2010. [9] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis R. Bach and David M. Blei, editors, ICML, volume 37, pages 448–456, 2015. [10] R. Hahnloser, R. Sarpeshkar, M. Mahowald, R.J. Douglas, H.S.Seung. Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. 405, 2000. [11] H.S. Seung R Hahnloser. Permitted and forbidden sets in symmetric threshold-linear networks. In NIPS, 2001. [12] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Geoffrey Gordon, David Dunson, and Miroslav Dudík, editors, Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, volume 15 of Proceedings of Machine Learning Research, pages 315–323, 11–13 Apr 2011. [13] R. Belohlavek, J.W. Dauben, and G.J. Klir. Fuzzy Logic and Mathematics: A Historical Perspective. Oxford University Press, 2017. [14] P. Liu and H.X. Li. Fuzzy Neural Network Theory and Application. Series in machine perception and artificial intelligence. World Scientific, 2004. [15] Jyh-Shing Roger Jang and Chuen-Tsai Sun. Functional equivalence between radial basis function networks and fuzzy inference systems. IEEE Trans. Neural Networks, 4(1):156–159, 1993. [16] José Manuel Benítez, Juan Luis Castro, and Ignacio Requena. Are artificial neural networks black boxes? IEEE Trans. Neural Networks, 8(5):1156–1164, 1997. [17] Warren Mcculloch and Walter Pitts. A logical calculus of ideas immanent in nervous activity. Bulletin of Mathematical Biophysics, 5:127–147, 1943. [18] Zhiting Hu, Xuezhe Ma, Zhengzhong Liu, Eduard H. Hovy, and Eric P. Xing. Harnessing deep neural networks with logic rules. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers, 2016. [19] Tim Salimans and Diederik P. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. page 901, 2016. [20] Geoffrey Hinton and Ruslan Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504 – 507, 2006. 9 [21] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In Johannes Fürnkranz and Thorsten Joachims, editors, Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 807–814. Omnipress, 2010. [22] Matthieu Courbariaux and Yoshua Bengio. Binarized neural network: Training deep neural networks with weights and activations constrained to +1 or -1. CoRR, abs/1602.02830, 2016. [23] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. CoRR, abs/1603.05279, 2016. [24] Paul Viola and Michael J. Jones. Robust real-time face detection. Int. J. Comput. Vision, 57(2):137–154, May 2004. [25] Michael Calonder, Vincent Lepetit, Christoph Strecha, and Pascal Fua. Brief: Binary robust independent elementary features. In Proceedings of the 11th European Conference on Computer Vision: Part IV, ECCV’10, pages 778–792, 2010. [26] Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary Bradski. Orb: An efficient alternative to sift or surf. In Proceedings of the 2011 International Conference on Computer Vision, ICCV ’11, pages 2564–2571, Washington, DC, USA, 2011. [27] Brian Kulis and Trevor Darrell. Learning to hash with binary reconstructive embeddings. In Proceedings of the 22Nd International Conference on Neural Information Processing Systems, NIPS’09, pages 1042–1050, 2009. [28] Mohammad Norouzi and David M. Blei. Minimal loss hashing for compact binary codes. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 353–360, New York, NY, USA, 2011. [29] Kevin Lin, Huei-Fang Yang, Jen-Hao Hsiao, and Chu-Song Chen. Deep learning of binary hash codes for fast image retrieval. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, June 2015. [30] Mohammad Norouzi, David J Fleet, and Ruslan R Salakhutdinov. Hamming distance metric learning. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 1061–1069. 2012. [31] Yann Lecun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 5 2015. [32] H.-J. Zimmermann. Fuzzy Set Theory — and Its Applications. Kluwer Academic Publishers, Norwell, MA, USA, 2001. [33] What is the class of this image? Discover the current state of the art in objects classification. http://rodrigob.github.io/are_we_there_yet/build/classification_datasets_ results.html. Accessed: 2017-07-19. [34] A baseline variational auto-encoder based on "auto-encoding variational bayes". https://github.com/ y0ast/VAE-TensorFlow. Accessed: 2017-05-19. [35] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. CoRR, abs/1312.6114, 2013. [36] Yoon Kim. Convolutional neural networks for sentence classification. CoRR, abs/1408.5882, 2014. [37] A baseline cnn network for sentence classification implemented with tensorflow. https://github.com/ dennybritz/cnn-text-classification-tf. Accessed: 2017-05-19. 10 | 2017 | 407 |
6,905 | Optimized Pre-Processing for Discrimination Prevention Flavio P. Calmon Harvard University flavio@seas.harvard.edu Dennis Wei IBM Research AI dwei@us.ibm.com Bhanukiran Vinzamuri IBM Research AI bhanu.vinzamuri@ibm.com Karthikeyan Natesan Ramamurthy IBM Research AI knatesa@us.ibm.com Kush R. Varshney IBM Research AI krvarshn@us.ibm.com Abstract Non-discrimination is a recognized objective in algorithmic decision making. In this paper, we introduce a novel probabilistic formulation of data pre-processing for reducing discrimination. We propose a convex optimization for learning a data transformation with three goals: controlling discrimination, limiting distortion in individual data samples, and preserving utility. We characterize the impact of limited sample size in accomplishing this objective. Two instances of the proposed optimization are applied to datasets, including one on real-world criminal recidivism. Results show that discrimination can be greatly reduced at a small cost in classification accuracy. 1 Introduction Discrimination is the prejudicial treatment of an individual based on membership in a legally protected group such as a race or gender. Direct discrimination occurs when protected attributes are used explicitly in making decisions, also known as disparate treatment. More pervasive nowadays is indirect discrimination, in which protected attributes are not used but reliance on variables correlated with them leads to significantly different outcomes for different groups. The latter phenomenon is termed disparate impact. Indirect discrimination may be intentional, as in the historical practice of “redlining” in the U.S. in which home mortgages were denied in zip codes populated primarily by minorities. However, the doctrine of disparate impact applies regardless of actual intent. Supervised learning algorithms, increasingly used for decision making in applications of consequence, may at first be presumed to be fair and devoid of inherent bias, but in fact, inherit any bias or discrimination present in the data on which they are trained [Calders and Žliobait˙e, 2013]. Furthermore, simply removing protected variables from the data is not enough since it does nothing to address indirect discrimination and may in fact conceal it. The need for more sophisticated tools has made discrimination discovery and prevention an important research area [Pedreschi et al., 2008]. Algorithmic discrimination prevention involves modifying one or more of the following to ensure that decisions made by supervised learning methods are less biased: (a) the training data, (b) the learning algorithm, and (c) the ensuing decisions themselves. These are respectively classified as pre-processing [Hajian, 2013], in-processing [Fish et al., 2016, Zafar et al., 2016, Kamishima et al., 2011] and post-processing approaches [Hardt et al., 2016]. In this paper, we focus on pre-processing since it is the most flexible in terms of the data science pipeline: it is independent of the modeling algorithm and can be integrated with data release and publishing mechanisms. Researchers have also studied several notions of discrimination and fairness. Disparate impact is addressed by the principles of statistical parity and group fairness [Feldman et al., 2015], which seek similar outcomes for all groups. In contrast, individual fairness [Dwork et al., 2012] mandates that similar individuals be treated similarly irrespective of group membership. For classifiers and other 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. predictive models, equal error rates for different groups are a desirable property [Hardt et al., 2016], as is calibration or lack of predictive bias in the predictions [Zhang and Neill, 2016]. The tension between the last two notions is described by Kleinberg et al. [2017] and Chouldechova [2016]; the work of Friedler et al. [2016] is in a similar vein. Corbett-Davies et al. [2017] discuss the trade-offs in satisfying prevailing notions of algorithmic fairness from a public safety standpoint. Since the present work pertains to pre-processing and not modeling, balanced error rates and predictive bias are less relevant criteria. Instead we focus primarily on achieving group fairness while also accounting for individual fairness through a distortion constraint. Existing pre-processing approaches include sampling or re-weighting the data to neutralize discriminatory effects [Kamiran and Calders, 2012], changing the individual data records [Hajian and Domingo-Ferrer, 2013], and using t-closeness [Li et al., 2007] for discrimination control [Ruggieri, 2014]. A common theme is the importance of balancing discrimination control against utility of the processed data. However, this prior work neither presents general and principled optimization frameworks for trading off these two criteria, nor allows connections to be made to the broader statistical learning and information theory literature via probabilistic descriptions. Another shortcoming is that individual distortion or fairness is not made explicit. Learn/Apply Transformation Original data {(Xi, Yi)} Discriminatory variable {Di} Utility: pX,Y ≈p ˆ X, ˆY Individual distortion: (xi, yi) ≈(ˆxi, ˆyi) Discrimination control: ˆYi ⊥⊥Di Learn/Apply predictive model ( ˆY | ˆX, D) Transformed data {(Di, ˆXi, ˆYi)} Figure 1: The proposed pipeline for predictive learning with discrimination prevention. Learn mode applies with training data and apply mode with novel test data. Note that test data also requires transformation before predictions can be obtained. In this work, we (i) introduce a probabilistic framework for discrimination-preventing preprocessing in supervised learning, (ii) formulate an optimization problem for producing preprocessing transformations that trade off discrimination control, data utility, and individual distortion, (iii) characterize theoretical properties of the optimization approach (e.g. convexity, robustness to limited samples), and (iv) benchmark the ensuing pre-processing transformations on real-word datasets. Our aim in part is to work toward a more unified view of existing pre-processing concepts and methods, which may help to suggest refinements. While discrimination and utility are defined at the level of probability distributions, distortion is controlled on a per-sample basis, thereby limiting the effect of the transformation on individuals and ensuring a degree of individual fairness. Figure 1 illustrates the supervised learning pipeline that includes our proposed discrimination-preventing pre-processing. The work of Zemel et al. [2013] is closest to ours in also presenting a framework with three criteria related to discrimination control (group fairness), individual fairness, and utility. However, the criteria are manifested less directly than in our proposal. Discrimination control is posed in terms of intermediate features rather than outcomes, individual distortion does not take outcomes into account (being an ℓ2-norm between original and transformed features), and utility is specific to a particular classifier. Our formulation more naturally and generally encodes these fairness and utility desiderata. Given the novelty of our formulation, we devote more effort than usual to discussing its motivations and potential variations. We state conditions under which the proposed optimization problem is convex. The optimization assumes as input an estimate of the distribution of the data which, in practice, can be imprecise due to limited sample size. Accordingly, we characterize the possible degradation in discrimination and utility guarantees at test time in terms of the training sample size. To demonstrate our framework, we apply specific instances of it to a prison recidivism dataset [ProPublica, 2017] and the UCI Adult dataset [Lichman, 2013]. We show that discrimination, distortion, and utility loss can be controlled simultaneously with real data. We also show that the preprocessed data reduces discrimination when training standard classifiers, particularly when compared to the original data with and without removing protected variables. In the Supplementary Material (SM), we describe in more detail the resulting transformations and the demographic patterns that they reveal. 2 General Formulation We are given a dataset consisting of n i.i.d. samples {(Di, Xi, Yi)}n i=1 from a joint distribution pD,X,Y with domain D × X × Y. Here D denotes one or more protected (discriminatory) variables such as gender and race, X denotes other non-protected variables used for decision making, and Y is an outcome random variable. We use the term ‘discriminatory’ interchangeably with ‘protected,’ 2 and not in the usual statistical sense. For instance, Yi could represent a loan approval decision for individual i based on demographic information Di and credit score Xi. We focus in this paper on discrete (or discretized) and finite domains D and X and binary outcomes, i.e. Y = {0, 1}. There is no restriction on the dimensions of D and X. Our goal is to determine a randomized mapping p ˆ X, ˆY |X,Y,D that (i) transforms the given dataset into a new dataset {(Di, ˆXi, ˆYi)}n i=1 which may be used to train a model, and (ii) similarly transforms data to which the model is applied, i.e. test data. Each ( ˆXi, ˆYi) is drawn independently from the same domain X × Y as X, Y by applying p ˆ X, ˆY |X,Y,D to the corresponding triplet (Di, Xi, Yi). Since Di is retained as-is, we do not include it in the mapping to be determined. Motivation for retaining D is discussed later in Section 3. For test samples, Yi is not available at the input while ˆYi may not be needed at the output. In this case, a reduced mapping p ˆ X|X,D is used as given later in (9). It is assumed that pD,X,Y is known along with its marginals and conditionals. This assumption is often satisfied using the empirical distribution of {(Di, Xi, Yi)}n i=1. In Section 3, we state a result ensuring that discrimination and utility loss continue to be controlled if the distribution used to determine p ˆ X, ˆY |X,Y,D differs from the distribution of test samples. We propose that the mapping p ˆ X, ˆY |X,Y,D satisfy the three following properties. I. Discrimination Control. The first objective is to limit the dependence of the transformed outcome ˆY on the protected variables D. We propose two alternative formulations. The first requires the conditional distribution p ˆY |D to be close to a target distribution pYT for all values of D, J p ˆY |D(y|d), pYT (y) ≤ϵy,d ∀d ∈D, y ∈{0, 1}, (1) where J(·, ·) denotes some distance function. In the second formulation, we constrain the conditional probability p ˆY |D to be similar for any two values of D: J p ˆY |D(y|d1), p ˆY |D(y|d2) ≤ϵy,d1,d2 ∀d1, d2 ∈D, y ∈{0, 1}. (2) Note that the number of such constraints is O(|D|2) as opposed to O(|D|) constraints in (1). The choice of pYT in (1), and J and ϵ in (1) and (2) should be informed by societal aspects, consultations with domain experts and stakeholders, and legal considerations such as the “80% rule” [EEOC, 1979]. For this work, we choose J to be the following probability ratio measure: J(p, q) = p q −1 . (3) This metric is motivated by the “80% rule.” The combination of (3) and (1) generalizes the extended lift criterion proposed in the literature [Pedreschi et al., 2012], while the combination of (3) and (2) generalizes selective and contrastive lift. The latter combination (2), (3) is used in the numerical results in Section 4. We note that the selection of a ‘fair’ target distribution pYT in (1) is not straightforward; see Žliobait˙e et al. [2011] for one such proposal. Despite its practical motivation, we alert the reader that (3) may be unnecessarily restrictive when q is low. In (1) and (2), discrimination control is imposed jointly with respect to all protected variables, e.g. all combinations of gender and race if D consists of those two variables. An alternative is to take the protected variables one at a time, and impose univariate discrimination control. In this work, we opt for the more stringent joint discrimination control, although legal formulations tend to be of the univariate type. Formulations (1) and (2) control discrimination at the level of the overall population in the dataset. It is also possible to control discrimination within segments of the population by conditioning on additional variables B, where B is a subset of X and X is a collection of features. Constraint (1) would then generalize to J p ˆY |D,B(y|d, b), pYT |B(y|b) ≤ϵy,d,b for all d ∈D, y ∈{0, 1}, and b ∈B. Similar conditioning or ‘context’ for discrimination has been explored before in Hajian and Domingo-Ferrer [2013] in the setting of association rule mining. For example, B could represent the fraction of a pool of applicants that applied to a certain department, which enables the metric to avoid statistical traps such as the Simpson’s paradox [Pearl, 2014]. One may wish to control for such 3 variables in determining the presence of discrimination, while ensuring that population segments created by conditioning are large enough to derive statistically valid inferences. Moreover, we note that there may exist inaccessible latent variables that drive discrimination, and the metrics used here are inherently limited by the available data. Recent definitions of fairness that seek to mitigate this issue include [Johnson et al., 2016] and [Kusner et al., 2017]. We defer further investigation of causality and conditional discrimination to future work. II. Distortion Control. The mapping p ˆ X, ˆY |X,Y,D should satisfy distortion constraints with respect to the domain X × Y. These constraints restrict the mapping to reduce or avoid altogether certain large changes (e.g. a very low credit score being mapped to a very high credit score). Given a distortion metric δ : (X × Y)2 →R+, we constrain the conditional expectation of the distortion as, E h δ((x, y), ( ˆX, ˆY )) | D = d, X = x, Y = y i ≤cd,x,y ∀(d, x, y) ∈D × X × Y. (4) We assume that δ(x, y, x, y) = 0 for all (x, y) ∈X × Y. Constraint (4) is formulated with pointwise conditioning on (D, X, Y ) = (d, x, y) in order to promote individual fairness. It ensures that distortion is controlled for every combination of (d, x, y), i.e. every individual in the original dataset, and more importantly, every individual to which a model is later applied. By way of contrast, an average-case measure in which an expectation is also taken over D, X, Y may result in high distortion for certain (d, x, y), likely those with low probability. Equation (4) also allows the level of control cd,x,y to depend on (d, x, y) if desired. We also note that (4) is a property of the mapping p ˆ X, ˆY |D,X,Y , and does not depend on the assumed distribution pD,X,Y . The expectation over ˆX, ˆY in (4) encompasses several cases depending on the choices of the metric δ and thresholds cd,x,y. If cd,x,y = 0, then no mappings with nonzero distortion are allowed for individuals with original values (d, x, y). If cd,x,y > 0, then certain mappings may still be disallowed by assigning them infinite distortion. Mappings with finite distortion are permissible subject to the budget cd,x,y. Lastly, if δ is binary-valued (perhaps achieved by thresholding a multi-valued distortion function), it can be seen as classifying mappings into desirable (δ = 0) and undesirable ones (δ = 1). Here, (4) reduces to a bound on the conditional probability of an undesirable mapping, i.e., Pr δ((x, y), ( ˆX, ˆY )) = 1 | D = d, X = x, Y = y ≤cd,x,y. (5) III. Utility Preservation. In addition to constraints on individual distortions, we also require that the distribution of ( ˆX, ˆY ) be statistically close to the distribution of (X, Y ). This is to ensure that a model learned from the transformed dataset (when averaged over the protected variables D) is not too different from one learned from the original dataset, e.g. a bank’s existing policy for approving loans. For a given dissimilarity measure ∆between probability distributions (e.g. KL-divergence), we require that ∆ p ˆ X, ˆY , pX,Y be small. Optimization Formulation. Putting together the considerations from the three previous subsections, we arrive at the optimization problem below for determining a randomized transformation p ˆ X, ˆY |X,Y,D mapping each sample (Di, Xi, Yi) to ( ˆXi, ˆYi): min p ˆ X, ˆ Y |X,Y,D ∆ p ˆ X, ˆY , pX,Y s.t. J p ˆY |D(y|d), pYT (y) ≤ϵy,d and E h δ((x, y), ( ˆX, ˆY )) | D = d, X = x, Y = y i ≤cd,x,y ∀(d, x, y) ∈D × X × Y, p ˆ X, ˆY |X,Y,D is a valid distribution. (6) We choose to minimize the utility loss ∆subject to constraints on individual distortion (4) and discrimination (we use (1) for concreteness, but (2) can be used instead), since it is more natural to place bounds on the latter two. The distortion constraints (4) are an essential component of the problem formulation (6). Without (4) and assuming that pYT = pY , it is possible to achieve perfect utility and non-discrimination simply by sampling ( ˆXi, ˆYi) from the original distribution pX,Y independently of any inputs, i.e. 4 p ˆ X, ˆY |X,Y,D(ˆx, ˆy|x, y, d) = p ˆ X, ˆY (ˆx, ˆy) = pX,Y (ˆx, ˆy). Then ∆(p ˆ X, ˆY , pX,Y ) = 0, and p ˆY |D(y|d) = p ˆY (y) = pY (y) = pYT (y) for all d ∈D. Clearly, this solution is objectionable from the viewpoint of individual fairness, especially for individuals to whom a subsequent model is applied since it amounts to discarding an individual’s data and replacing it with a random sample from the population pX,Y . Constraint (4) seeks to prevent such gross deviations from occurring. The distortion constraints may, however, render the optimization infeasible, as illustrated in the SM. 3 Theoretical Properties I. Convexity. We show conditions under which (6) is a convex or quasiconvex optimization problem, and can thus be solved to optimality. The proof is presented in the SM. Proposition 1. Problem (6) is a (quasi)convex optimization if ∆(·, ·) is (quasi)convex and J(·, ·) is quasiconvex in their respective first arguments (with the second arguments fixed). If discrimination constraint (2) is used in place of (1), then the condition on J is that it be jointly quasiconvex in both arguments. II. Generalizability of Discrimination Control. We now discuss the generalizability of discrimination guarantees (1) and (2) to unseen individuals, i.e. those to whom a model is applied. Recall from Section 2 that the proposed transformation retains the protected variables D. We first consider the case where models trained on the transformed data to predict ˆY are allowed to depend on D. While such models may qualify as disparate treatment, the intent and effect is to better mitigate disparate impact resulting from the model. In this respect our proposal shares the same spirit with ‘fair’ affirmative action in Dwork et al. [2012] (fairer on account of distortion constraint (4)). Assuming that predictive models for ˆY can depend on D, let eY be the output of such a model based on D and ˆX. To remove the separate issue of model accuracy, suppose for simplicity that the model provides a good approximation to the conditional distribution of ˆY , i.e. peY | ˆ X,D(ey|ˆx, d) ≈ p ˆY | ˆ X,D(ey|ˆx, d). Then for individuals in a protected group D = d, the conditional distribution of eY is given by peY |D(ey|d) = X ˆx peY | ˆ X,D(ey|ˆx, d)p ˆ X|D(ˆx|d) ≈ X ˆx p ˆY | ˆ X,D(ey|ˆx, d)p ˆ X|D(ˆx|d) = p ˆY |D(ey|d). (7) Hence the model output peY |D can also be controlled by (1) or (2). On the other hand, if D must be suppressed from the transformed data, perhaps to comply with legal requirements regarding its non-use, then a predictive model can depend only on ˆX and approximate p ˆY | ˆ X, i.e. peY | ˆ X,D(ey|ˆx, d) = peY | ˆ X(ey|ˆx) ≈p ˆY | ˆ X(ey|ˆx). In this case we have peY |D(ey|d) ≈ X ˆx p ˆY | ˆ X(ey|ˆx)p ˆ X|D(ˆx|d), (8) which in general is not equal to p ˆY |D(ey|d) in (7). The quantity on the right-hand side of (8) is less straightforward to control. We address this question in the SM. III. Training and Application Considerations. The proposed optimization framework has two modes of operation (Fig. 1): train and apply. In train mode, the optimization problem (6) is solved in order to determine a mapping p ˆ X, ˆY |X,Y,D for randomizing the training set. The randomized training set, in turn, is used to fit a classification model fθ( ˆX, D) that approximates p ˆY | ˆ X,D, where θ are the parameters of the model. At apply time, a new data point (X, D) is received and transformed into ( ˆX, D) through a randomized mapping p ˆ X|X,D. The mapping p ˆ X|D,X is given by marginalizing over Y, ˆY : p ˆ X|D,X(ˆx|d, x) = X y,ˆy p ˆ X, ˆY |X,Y,D(ˆx, ˆy|x, y, d)pY |X,D(y|x, d). (9) Assuming that the variable D is not suppressed, and that the marginals are known, then the utility and discrimination guarantees set during train time still hold during apply time, as discussed above. 5 However, the distortion control will inevitably change, since the mapping has been marginalized over Y . More specifically, the bound on the expected distortion for each sample becomes E h E h δ((x, Y ), ( ˆX, ˆY )) | D = d, X = x, Y i | D = d, X = x i ≤ X y∈Y pY |X,D(y|x, d)cx,y,d ≜cx,d . (10) If the distortion control values cx,y,d are independent of y, then the upper-bound on distortion set during training time still holds during apply time. Otherwise, (10) provides a bound on individual distortion at apply time. The same guarantee holds for the case when D is suppressed. IV. Robustness to Mismatched Prior Distribution Estimation. We may also consider the case where the distribution pD,X,Y used to determine the transformation differs from the distribution qD,X,Y of test samples. This occurs, for example, when pD,X,Y is the empirical distribution computed from n i.i.d. samples from an unknown distribution qD,X,Y . In this situation, discrimination control and utility are still guaranteed for samples drawn from qD,X,Y that are transformed using p ˆY , ˆ X|X,Y,D, where the latter is obtained by solving (6) with pD,X,Y . In particular, denoting by q ˆY |D and q ˆ X, ˆY the corresponding distributions for ˆY , ˆX and D when qD,X,Y is transformed using p ˆY , ˆ X|X,Y,D, we have J p ˆY |D(y|d), pYT (y) →J q ˆY |D(y|d), pYT (y) and ∆ pX,Y , p ˆ X, ˆY →∆ qX,Y , q ˆ X, ˆY for n sufficiently large (the distortion control constraints (4) only depend on p ˆY , ˆ X|X,Y,D). The next proposition provides an estimate of the rate of this convergence in terms of n and assuming pY,D(y, d) is fixed and bounded away from zero. Its proof can be found in the SM. Proposition 2. Let pD,X,Y be the empirical distribution obtained from n i.i.d. samples that is used to determine the mapping p ˆY , ˆ X|X,Y,D, and qD,X,Y be the true distribution of the data, with support size m ≜|X × Y × D|. In addition, denote by qD, ˆ X, ˆY the joint distribution after applying p ˆY , ˆ X|X,Y,D to samples from qD,X,Y . If for all y ∈Y, d ∈D we have pY,D(y, d) > 0, J p ˆY |D(y|d), pYT (y) ≤ϵ, where J is given in (3), and ∆ pX,Y , p ˆ X, ˆY = X x,y pX,Y (x, y) −p ˆ X, ˆY (x, y) ≤µ, with probability 1 −β, max n J q ˆY |D(y|d), pYT (y) −ϵ, ∆ qX,Y , q ˆ X, ˆY −µ o ≲ r m n log 1 + n m −log β n . (11) Proposition 2 guarantees that, as long as n is sufficiently large, the utility and discrimination control guarantees will approximately hold when p ˆ X, ˆY |Y,X,D is applied to fresh samples drawn from qD,X,Y . In particular, the utility and discrimination guarantees will converge to the ones used as parameters in the optimization at a rate that is at least q 1 n log n. The distortion control guarantees (4) are a property of the mapping p ˆ X, ˆY |Y,X,D, and do not depend on the distribution of the data. The convergence rate is tied to the support size, and for large m a dimensionality reduction step may be required to assuage generalization issues. The same upper bound on convergence rate holds for discrimination constraints of the form (2). 4 Experimental Results This section provides a numerical demonstration of running the data processing pipeline in Fig. 1. Our focus here is on the discrimination-accuracy trade-off obtained when the pre-processed data is used to train standard prediction algorithms. The SM presents additional results on the trade-off between discrimination control ϵ and utility ∆as well as an analysis of the optimized data transformations. We apply the pipeline to ProPublica’s COMPAS recidivism data [ProPublica, 2017] and the UCI Adult dataset [Lichman, 2013]. From the COMPAS dataset (7214 instances), we select severity of charge, number of prior crimes, and age category to be the decision variables (X). The outcome variable (Y ) is a binary indicator of whether the individual recidivated (re-offended), and race is set to be the protected variable (D). The encoding of categorical variables is described in the SM. For the Adult dataset (32561 instances), the features were categorized as protected variables (D): 6 gender (male, female); decision variables (X): age (quantized to decades) and education (quantized to years); and response variable (Y ): income (binary). Our proposed approach is benchmarked against two baselines, leaving the dataset as-is and suppressing the protected variable D during training and testing. We also compare against the learning fair representations (LFR) algorithm from Zemel et al. [2013]. As discussed in the introduction, LFR has fundamental differences from the proposed framework. In particular, LFR only considers binary-valued D, and consequently, we restrict D to be binary in the experiments presented here. However, our method is not restricted to D being binary or univariate. Illustrations of our method on non-binary D are provided in the SM. The details of applying our method to the datasets are as follows. For each train/test split, we approximate pD,X,Y using the empirical distribution of (D, X, Y ) in the training set and solve (6) using a standard convex solver [Diamond and Boyd, 2016]. For both datasets the utility metric ∆is the total variation distance, i.e. ∆ pX,Y , p ˆ X, ˆY = 1 2 P x,y pX,Y (x, y) −p ˆ X, ˆY (x, y) , the distortion constraint is the combination of (2) and (3), and two levels of discrimination control are used, ϵ = {0.05, 0.1}. The distortion function δ is chosen differently for the two datasets as described below, based on the differing semantics of the variables in the two applications. The specific values were chosen for demonstration purposes to be reasonable to our judgment and can easily be tuned according to the desires of a practitioner. We emphasize that the distortion values were not selected to optimize the results presented here. All experiments run in minutes on a standard laptop. Distortion function for COMPAS: We use the expected distortion constraint in (4) with cd,x,y = 0.4, 0.3 for d being respectively African-American and Caucasian. The distortion function δ has the following behavior. Jumps of more than one category in age and prior counts are heavily discouraged by a high distortion penalty (104) for such transformations. We impose the same penalty on increases in recidivism (change of Y from 0 to 1). Both these choices are made in the interest of individual fairness. Furthermore, for every jump to an adjacent category for age and prior counts, a penalty of 1 is assessed, and a similar jump in charge degree incurs a penalty of 2. Reduction in recidivism (1 to 0) has a penalty of 2. The total distortion for each individual is the sum of squares of distortions for each attribute of X. Distortion function for Adult: We use three conditional probability constraints of the form in (5). In constraint i, the distortion function returns 1 in case (i) and 0 otherwise: (1) if income is decreased, age is not changed and education is increased by at most 1 year, (2) if age is changed by a decade and education is increased by at most 1 year regardless of the change of income, (3) if age is changed by more than a decade or education is lowered by any amount or increased by more than 1 year. The corresponding probability bounds cd,x,y are 0.1, 0.05, 0 (no dependence on d, x, y). As a consequence, and in the same broad spirit as for COMPAS, decreases in income, small changes in age, and small increases in education (events (1), (2)) are permitted with small probabilities, while larger changes in age and education (event (3)) are not allowed at all. Once the optimized randomized mapping p ˆ X, ˆY |D,X,Y is determined, we apply it to the training set to obtain a new perturbed training set, which is then used to fit two classifiers: logistic regression (LR) and random forest (RF). For the test set, we first compute the test-time mapping p ˆ X|D,X in (9) using p ˆ X, ˆY |D,X,Y and pD,X,Y estimated from the training set. We then independently randomize each test sample (di, xi) using p ˆ X|D,X, preserving the protected variable D, i.e. (di, xi) p ˆ X|D,X −−−−−→(di, ˆxi). Each trained classifier f is applied to the transformed test samples, obtaining an estimate eyi = f(di, ˆxi) which is evaluated against yi. These estimates induce an empirical posterior distribution given by peY |D(1|d) = 1 nd P {ˆxi,di}:di=d f(di, ˆxi), where nd is the number of samples with di = d. For the two baselines, the above procedure is repeated without data transformation except for dropping D throughout for the second baseline (D is still used to compute the discrimination of the resulting classifier). Due to the lack of available code, we implemented LFR ourselves in Python and solved the associated optimization problem using the SciPy package. The parameters for LFR were set as recommended in Zemel et al. [2013]: Az = 50 (group fairness), Ax = 0.01 (individual fairness), and Ay = 1 (prediction accuracy). The results did not significantly change within a reasonable variation of these three parameters. 7 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 Discrimination 0.675 0.680 0.685 0.690 0.695 0.700 0.705 0.710 0.715 AUC LR LR + Dropping D LFR LR + Our approach(.05) LR + Our approach(.1) 0.0 0.1 0.2 0.3 0.4 Discrimination 0.65 0.66 0.67 0.68 0.69 0.70 0.71 AUC RF RF + Dropping D LFR RF + Our approach(.05) RF + Our approach(.1) 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 Discrimination 0.76 0.77 0.78 0.79 0.80 0.81 0.82 AUC LR LR + Dropping D LFR LR + Our approach(.05) LR + Our approach(.1) 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 Discrimination 0.74 0.75 0.76 0.77 0.78 0.79 0.80 0.81 0.82 AUC RF RF + Dropping D LFR RF + Our approach(.05) RF + Our approach(.1) Figure 2: Discrimination-AUC plots for two different classifiers. Top row is for COMPAS dataset, and bottom row for UCI Adult dataset. First column is logistic regression (LR), and second column is random forests (RF). Results. We report the trade-off between two metrics: (i) the empirical discrimination of the classifier on the test set, given by maxd,d′∈D J(peY |D(1|d), peY |D(1|d′)), and (ii) the empirical accuracy, measured by the Area under ROC (AUC) of eyi = f(di, ˆxi) compared to yi, using 5-fold cross validation. Fig. 2 presents the operating points achieved by each procedure in the discrimination-accuracy space as measured by these metrics. For the COMPAS dataset, there is significant discrimination in the original dataset, which is reflected by both LR and RF when the data is not transformed. Dropping the D variable reduces discrimination with a negligible impact on classification. However discrimination is far from removed since the features X are correlated with D, i.e. there is indirect discrimination. LFR with the recommended parameters is successful in further reducing discrimination while still achieving high prediction performance for the task. Our proposed optimized pre-processing approach successfully decreases the empirical discrimination close to the target ϵ values (x-axis). Deviations are expected due to the approximation of ˆY , the output of the transformation, by eY , the output of each classifier, and also due to the randomized nature of the method. The decreased discrimination comes at an accuracy cost, which is greater in this case than for LFR. A possible explanation is that LFR is free to search across different representations whereas our method is restricted by the chosen distortion metric and having to preserve the domain of the original variables. For example, for COMPAS we heavily penalize increases in recidivism from 0 to 1 as well as large changes in prior counts and age. When combined with the other constraints in the optimization, this may alter the joint distribution after perturbation and by extension the classifier output. Increased accuracy could be obtained by relaxing the distortion constraint, as long as this is acceptable to the practitioner. We highlight again that our distortion metric was not chosen to explicitly optimize performance on this task, and should be guided by the practitioner. Nevertheless, we do successfully obtain a controlled reduction of discrimination while avoiding unwanted deviations in the randomized mapping. For the Adult dataset, dropping the protected variable does significantly reduce discrimination, in contrast with COMPAS. Our method further reduces discrimination towards the target ϵ values. The loss of prediction performance is again due to satisfying the distortion and discrimination constraints. On the other hand, LFR with the recommended parameters provides only a small reduction in discrimination. We note that this does not contradict the results in Zemel et al. [2013], since here we have adopted a multiplicative discrimination metric (3) whereas Zemel et al. [2013] used an additive metric. Moreover, we reduced the Adult dataset to 31 binary features which is different from Zemel et al. [2013] where they additionally considered the test dataset for Adult (12661 instances) also and created 103 binary features. By varying the LFR parameters, it is possible to attain low empirical discrimination but with a large loss in prediction performance (below the plotted range). Thus, we do not claim that our method outperforms LFR since different operating points can be achieved by 8 adjusting parameters in either approach. In our approach however, individual fairness is explicitly maintained through the design of the distortion metric and discrimination is controlled directly by a single parameter ϵ, whereas the relationship is less clear with LFR. 5 Conclusions We proposed a flexible, data-driven optimization framework for probabilistically transforming data in order to reduce algorithmic discrimination, and applied it to two datasets. When used to train standard classifiers, the transformed dataset led to a fairer classification when compared to the original dataset. The reduction in discrimination comes at an accuracy penalty due to the restrictions imposed on the randomized mapping. Moreover, our method is competitive with others in the literature, with the added benefit of enabling an explicit control of individual fairness and the possibility of multivariate, non-binary protected variables. The flexibility of the approach allows numerous extensions using different measures and constraints for utility preservation, discrimination, and individual distortion control. Investigating such extensions, developing theoretical characterizations based on the proposed framework, and quantifying the impact of the transformations on additional supervised learning tasks will be pursued in future work. References T. Calders and I. Žliobait˙e. Why unbiased computational processes can lead to discriminative decision procedures. In Discrimination and Privacy in the Information Society, pages 43–57. Springer, 2013. A. Chouldechova. Fair prediction with disparate impact: A study of bias in recidivism prediction instruments. arXiv preprint arXiv:1610.07524, 2016. S. Corbett-Davies, E. Pierson, A. Feller, S. Goel, and A. Huq. Algorithmic decision making and the cost of fairness. arXiv preprint arXiv:1701.08230, 2017. S. Diamond and S. Boyd. CVXPY: A Python-embedded modeling language for convex optimization. Journal of Machine Learning Research, 17(83):1–5, 2016. C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel. Fairness through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, pages 214–226. ACM, 2012. T. U. EEOC. Uniform guidelines on employee selection procedures. https://www.eeoc.gov/ policy/docs/qanda_clarify_procedures.html, Mar. 1979. M. Feldman, S. A. Friedler, J. Moeller, C. Scheidegger, and S. Venkatasubramanian. Certifying and removing disparate impact. In Proc. ACM SIGKDD Int. Conf. Knowl. Disc. Data Min., pages 259–268, 2015. B. Fish, J. Kun, and Á. D. Lelkes. A confidence-based approach for balancing fairness and accuracy. In Proceedings of the SIAM International Conference on Data Mining, pages 144–152. SIAM, 2016. S. A. Friedler, C. Scheidegger, and S. Venkatasubramanian. On the (im) possibility of fairness. arXiv preprint arXiv:1609.07236, 2016. S. Hajian. Simultaneous Discrimination Prevention and Privacy Protection in Data Publishing and Mining. PhD thesis, Universitat Rovira i Virgili, 2013. Available online: https://arxiv.org/ abs/1306.6805. S. Hajian and J. Domingo-Ferrer. A methodology for direct and indirect discrimination prevention in data mining. IEEE Trans. Knowl. Data Eng., 25(7):1445–1459, 2013. M. Hardt, E. Price, and N. Srebro. Equality of opportunity in supervised learning. In Adv. Neur. Inf. Process. Syst. 29, pages 3315–3323, 2016. K. D. Johnson, D. P. Foster, and R. A. Stine. Impartial predictive modeling: Ensuring fairness in arbitrary models. arXiv preprint arXiv:1608.00528, 2016. 9 F. Kamiran and T. Calders. Data preprocessing techniques for classification without discrimination. Knowledge and Information Systems, 33(1):1–33, 2012. T. Kamishima, S. Akaho, and J. Sakuma. Fairness-aware learning through regularization approach. In Data Mining Workshops (ICDMW), IEEE 11th International Conference on, pages 643–650. IEEE, 2011. J. Kleinberg, S. Mullainathan, and M. Raghavan. Inherent trade-offs in the fair determination of risk scores. In Proc. Innov. Theoret. Comp. Sci., 2017. M. J. Kusner, J. R. Loftus, C. Russell, and R. Silva. Counterfactual fairness. arXiv preprint arXiv:1703.06856, 2017. N. Li, T. Li, and S. Venkatasubramanian. t-closeness: Privacy beyond k-anonymity and l-diversity. In IEEE 23rd International Conference on Data Engineering, pages 106–115. IEEE, 2007. M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ml. J. Pearl. Comment: understanding simpson’s paradox. The American Statistician, 68(1):8–13, 2014. D. Pedreschi, S. Ruggieri, and F. Turini. Discrimination-aware data mining. In Proc. ACM SIGKDD Int. Conf. Knowl. Disc. Data Min., pages 560–568. ACM, 2008. D. Pedreschi, S. Ruggieri, and F. Turini. A study of top-k measures for discrimination discovery. In Proc. ACM Symp. Applied Comput., pages 126–131, 2012. ProPublica. COMPAS Recidivism Risk Score Data and Analysis. https://www.propublica.org/datastore/dataset/compas-recidivism-risk-score-data-and-analysis, 2017. S. Ruggieri. Using t-closeness anonymity to control for non-discrimination. Trans. Data Privacy, 7 (2):99–129, 2014. M. B. Zafar, I. Valera, M. G. Rodriguez, and K. P. Gummadi. Fairness beyond disparate treatment & disparate impact: Learning classification without disparate mistreatment. arXiv preprint arXiv:1610.08452, 2016. R. Zemel, Y. L. Wu, K. Swersky, T. Pitassi, and C. Dwork. Learning fair representations. In Proc. Int. Conf. Mach. Learn., pages 325–333, 2013. Z. Zhang and D. B. Neill. Identifying significant predictive bias in classifiers. In Proceedings of the NIPS Workshop on Interpretable Machine Learning in Complex Systems, 2016. Available online: https://arxiv.org/abs/1611.08292. I. Žliobait˙e, F. Kamiran, and T. Calders. Handling conditional discrimination. In Proc. IEEE Int. Conf. Data Mining, pages 992–1001, 2011. 10 | 2017 | 408 |
6,906 | Scalable Demand-Aware Recommendation Jinfeng Yi1∗, Cho-Jui Hsieh2, Kush R. Varshney1, Lijun Zhang3, Yao Li2 1IBM Thomas J. Watson Research Center, Yorktown Heights, NY, USA 2University of California, Davis, CA, USA 3National Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China jinfengyi.ustc@gmail.com, chohsieh@ucdavis.edu, krvarshn@us.ibm.com, zhanglj@lamda.nju.edu.cn, yaoli@ucdavis.edu Abstract Recommendation for e-commerce with a mix of durable and nondurable goods has characteristics that distinguish it from the well-studied media recommendation problem. The demand for items is a combined effect of form utility and time utility, i.e., a product must both be intrinsically appealing to a consumer and the time must be right for purchase. In particular for durable goods, time utility is a function of inter-purchase duration within product category because consumers are unlikely to purchase two items in the same category in close temporal succession. Moreover, purchase data, in contrast to rating data, is implicit with non-purchases not necessarily indicating dislike. Together, these issues give rise to the positive-unlabeled demand-aware recommendation problem that we pose via joint low-rank tensor completion and product category inter-purchase duration vector estimation. We further relax this problem and propose a highly scalable alternating minimization approach with which we can solve problems with millions of users and millions of items in a single thread. We also show superior prediction accuracies on multiple real-world datasets. 1 Introduction E-commerce recommender systems aim to present items with high utility to the consumers [18]. Utility may be decomposed into form utility: the item is desired as it is manifested, and time utility: the item is desired at the given point in time [28]; recommender systems should take both types of utility into account. Economists define items to be either durable goods or nondurable goods based on how long they are intended to last before being replaced [27]. A key characteristic of durable goods is the long duration of time between successive purchases within item categories whereas this duration for nondurable goods is much shorter, or even negligible. Thus, durable and nondurable goods have differing time utility characteristics which lead to differing demand characteristics. Although we have witnessed great success of collaborative filtering in media recommendation, we should be careful when expanding its application to general e-commerce recommendation involving both durable and nondurable goods due to the following reasons: 1. Since media such as movies and music are nondurable goods, most users are quite receptive to buying or renting them in rapid succession. However, users only purchase durable goods when the time is right. For instance, most users will not buy televisions the day after they have already bought one. Therefore, recommending an item for which a user has no immediate demand can hurt user experience and waste an opportunity to drive sales. ∗Now at Tencent AI Lab, Bellevue, WA, USA 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2. A key assumption made by matrix factorization- and completion-based collaborative filtering algorithms is that the underlying rating matrix is of low-rank since only a few factors typically contribute to an individual’s form utility [5]. However, a user’s demand is not only driven by form utility, but is the combined effect of both form utility and time utility. Hence, even if the underlying form utility matrix is of low-rank, the overall purchase intention matrix is likely to be of high-rank,2 and thus cannot be directly recovered by existing approaches. An additional challenge faced by many real-world recommender systems is the one-sided sampling of implicit feedback [15, 23]. Unlike the Netflix-like setting that provides both positive and negative feedback (high and low ratings), no negative feedback is available in many e-commerce systems. For example, a user might not purchase an item because she does not derive utility from it, or just because she was simply unaware of it or plans to buy it in the future. In this sense, the labeled training data only draws from the positive class, and the unlabeled data is a mixture of positive and negative samples, a problem usually referred to as positive-unlabeled (PU) learning [13]. To address these issues, we study the problem of demand-aware recommendation. Given purchase triplets (user, item, time) and item categories, the objective is to make recommendations based on users’ overall predicted combination of form utility and time utility. We denote purchases by the sparse binary tensor P. To model implicit feedback, we assume that P is obtained by thresholding an underlying real-valued utility tensor to a binary tensor Y and then revealing a subset of Y’s positive entries. The key to demand-aware recommendation is defining an appropriate utility measure for all (user, item, time) triplets. To this end, we quantify purchase intention as a combined effect of form utility and time utility. Specifically, we model a user’s time utility for an item by comparing the time t since her most recent purchase within the item’s category and the item category’s underlying inter-purchase duration d; the larger the value of d −t, the less likely she needs this item. In contrast, d ≤t may indicate that the item needs to be replaced, and she may be open to related recommendations. Therefore, the function h = max(0, d −t) may be employed to measure the time utility factor for a (user, item) pair. Then the purchase intention for a (user, item, time) triplet is given by x −h, where x denotes the user’s form utility. This observation allows us to cast demand-aware recommendation as the problem of learning users’ form utility tensor X and items’ inter-purchase durations vector d given the binary tensor P. Although the learning problem can be naturally formulated as a tensor nuclear norm minimization problem, the high computational cost significantly limits its application to large-scale recommendation problems. To address this limitation, we first relax the problem to a matrix optimization problem with a label-dependent loss. We note that the problem after relaxation is still non-trivial to solve since it is a highly non-smooth problem with nested hinge losses. More severely, the optimization problem involves mnl entries, where m, n, and l are the number of users, items, and time slots, respectively. Thus a naive optimization algorithm will take at least O(mnl) time, and is intractable for largescale recommendation problems. To overcome this limitation, we develop an efficient alternating minimization algorithm and show that its time complexity is only approximately proportional to the number of nonzero elements in the purchase records tensor P. Since P is usually very sparse, our algorithm is extremely efficient and can solve problems with millions of users and items. Compared to existing recommender systems, our work has the following contributions and advantages: (i) to the best of our knowledge, this is the first work that makes demand-aware recommendation by considering inter-purchase durations for durable and nondurable goods; (ii) the proposed algorithm is able to simultaneously infer items’ inter-purchase durations and users’ real-time purchase intentions, which can help e-retailers make more informed decisions on inventory planning and marketing strategy; (iii) by effectively exploiting sparsity, the proposed algorithm is extremely efficient and able to handle large-scale recommendation problems. 2 Related Work Our contributions herein relate to three different areas of prior work: consumer modeling from a microeconomics and marketing perspective [6], time-aware recommender systems [4, 29, 8, 19], and PU learning [20, 9, 13, 14, 23, 2]. The extensive consumer modeling literature is concerned with descriptive and analytical models of choice rather than prediction or recommendation, but nonetheless 2A detailed illustration can be found in the supplementary material 2 forms the basis for our modeling approach. A variety of time-aware recommender systems have been proposed to exploit time information, but none of them explicitly consider the notion of time utility derived from inter-purchase durations in item categories. Much of the PU learning literature is focused on the binary classification problem, e.g. [20, 9], whereas we are in the collaborative filtering setting. For the papers that do examine collaborative filtering with PU learning or learning with implicit feedback [14, 23, 2, 32], they mainly focus on media recommendation and overlook users’ demands, thus are not suitable for durable goods recommendation. Temporal aspects of the recommendation problem have been examined in a few ways: as part of the cold-start problem [3], to capture dynamics in interests or ratings over time [17], and as part of the context in context-aware recommenders [1]. However, the problem we address in this paper is different from all of those aspects, and in fact could be combined with the other aspects in future solutions. To the best of our knowledge, there is no existing work that tries to take inter-purchase durations into account to better time recommendations as we do herein. 3 Positive-Unlabeled Demand-Aware Recommendation Throughout the paper, we use boldface Euler script letters, boldface capital letters, and boldface lower-case letters to denote tensors (e.g., A), matrices (e.g., A) and vectors (e.g., a), respectively. Scalars such as entries of tensors, matrices, and vectors are denoted by lowercase letters, e.g., a. In particular, the (i, j, k) entry of a third-order tensor A is denoted by aijk. Given a set of m users, n items, and l time slots, we construct a third-order binary tensor P ∈ {0, 1}m×n×l to represent the purchase history. Specifically, entry pijk = 1 indicates that user i has purchased item j in time slot k. We denote ∥P∥0 as the number of nonzero entries in tensor P. Since P is usually very sparse, we have ∥P∥0 ≪mnl. Also, we assume that the n items belong to r item categories, with items in each category sharing similar inter-purchase durations.3 We use an n-dimensional vector c ∈{1, 2, . . . , r}n to represent the category membership of each item. Given P and c, we further generate a tensor T ∈Rm×r×l where ticjk denotes the number of time slots between user i’s most recent purchase within item category cj until time k. If user i has not purchased within item category cj until time k, ticjk is set to +∞. 3.1 Inferring Purchase Intentions from Users’ Purchase Histories In this work, we formulate users’ utility as a combined effect of form utility and time utility. To this end, we use an underlying third-order tensor X ∈Rm×n×l to quantify form utility. In addition, we employ a non-negative vector d ∈Rr + to measure the underlying inter-purchase duration times of the r item categories. It is understood that the inter-purchase durations for durable good categories are large, while for nondurable good categories are small, or even zero. In this study, we focus on items’ inherent properties and assume that the inter-purchase durations are user-independent. The problem of learning personalized durations will be studied in our future work. As discussed above, the demand is mediated by the time elapsed since the last purchase of an item in the same category. Let dcj be the inter-purchase duration time of item j’s category cj, and let ticjk be the time gap of user i’s most recent purchase within item category cj until time k. Then if dcj > ticjk, a previously purchased item in category cj continues to be useful, and thus user i’s utility from item j is weak. Intuitively, the greater the value dcj −ticjk, the weaker the utility. On the other hand, dcj < ticjk indicates that the item is nearing the end of its lifetime and the user may be open to recommendations in category cj. We use a hinge loss max(0, dcj −ticjk) to model such time utility. The overall utility can be obtained by comparing form utility and time utility. In more detail, we model a binary utility indicator tensor Y ∈{0, 1}m×n×l as being generated by the following thresholding process: yijk = 1[xijk −max(0, dcj −ticjk) > τ], (1) where 1(·) : R →{0, 1} is the indicator function, and τ > 0 is a predefined threshold. 3To meet this requirement, the granularity of categories should be properly selected. For instance, the category “Smart TV” is a better choice than the category “Electrical Equipment”, since the latter category covers a broad range of goods with different durations. 3 Note that the positive entries of Y denote high purchase intentions, while the positive entries of P denote actual purchases. Generally speaking, a purchase only happens when the utility is high, but a high utility does not necessarily lead to a purchase. This observation allows us to link the binary tensors P and Y: P is generated by a one-sided sampling process that only reveals a subset of Y’s positive entries. Given this observation, we follow [13] and include a label-dependent loss [26] trading the relative cost of positive and unlabeled samples: L(X, P)= η X ijk: pijk=1 max[1 −(xijk −max(0, dcj −ticjk)), 0]2 + (1 −η) X ijk: pijk=0 l(xijk, 0), where l(x, c) = (x −c)2 denotes the squared loss. In addition, the form utility tensor X should be of low-rank to capture temporal dynamics of users’ interests, which are generally believed to be dictated by a small number of latent factors [22]. By combining asymmetric sampling and the low-rank property together, we jointly recover the tensor X and the inter-purchase duration vector d by solving the following tensor nuclear norm minimization (TNNM) problem: min X∈Rm×n×l, d∈Rr + η X ijk: pijk=1 max[1 −(xijk −max(0, dcj −ticjk)), 0]2 + (1 −η) X ijk: pijk=0 x2 ijk + λ ∥X∥∗, (2) where ∥X∥∗denotes the tensor nuclear norm, a convex combination of nuclear norms of X’s unfolded matrices [21]. Given the learned ˆX and ˆd, the underlying binary tensor Y can be recovered by (1). We note that although the TNNM problem (2) can be solved by optimization techniques such as block coordinate descent [21] and ADMM [10], they suffer from high computational cost since they need to be solved iteratively with multiple SVDs at each iteration. An alternative way to solve the problem is tensor factorization [16]. However, this also involves iterative singular vector estimation and thus not scalable enough. As a typical example, recovering a rank 20 tensor of size 500 × 500 × 500 takes the state-of-the-art tensor factorization algorithm TenALS 4 more than 20, 000 seconds on an Intel Xeon 2.40 GHz processor with 32 GB main memory. 3.2 A Scalable Relaxation In this subsection, we discuss how to significantly improve the scalability of the proposed demandaware recommendation model. To this end, we assume that an individual’s form utility does not change over time, an assumption widely-used in many collaborative filtering methods [25, 32]. Under this assumption, the tensor X is a repeated copy of its frontal slice x::1, i.e., X = x::1 ◦e, (3) where e is an l-dimensional all-one vector and the symbol ◦represents the outer product operation. In this way, we can relax the problem of learning a third-order tensor X to the problem of learning its frontal slice, which is a second-order tensor (matrix). For notational simplicity, we use a matrix X to denote the frontal slice x::1, and use xij to denote the entry (i, j) of the matrix X. Since X is a low-rank tensor, its frontal slice X should be of low-rank as well. Hence, the minimization problem (2) simplifies to: min X∈Rm×n d∈Rr η X ijk: pijk=1 max[1 −(xij −max(0, dcj −ticjk)), 0]2 + (1 −η) X ijk: pijk=0 x2 ij + λ ∥X∥∗:= f(X, d), (4) where ∥X∥∗stands for the matrix nuclear norm, the convex surrogate of the matrix rank function. By relaxing the optimization problem (2) to the problem (4), we recover a matrix instead of a tensor to infer users’ purchase intentions. 4http://web.engr.illinois.edu/~swoh/software/optspace/code.html 4 4 Optimization Although the learning problem has been relaxed, optimizing (4) is still very challenging for two main reasons: (i) the objective is highly non-smooth with nested hinge losses, and (ii) it contains mnl terms, and a naive optimization algorithm will take at least O(mnl) time. To address these challenges, we adopt an alternating minimization scheme that iteratively fixes one of d and X and minimizes with respect to the other. Specifically, we propose an extremely efficient optimization algorithm by effectively exploring the sparse structure of the tensor P and low-rank structure of the matrix X. We show that (i) the problem (4) can be solved within O(∥P∥0(k + log(∥P∥0)) + (n + m)k2) time, where k is the rank of X, and (ii) the algorithm converges to the critical points of f(X, d). In the following, we provide a sketch of the algorithm. The detailed description can be found in the supplementary material. 4.1 Update d When X is fixed, the optimization problem with respect to d can be written as: min d X ijk: pijk=1 ( max 1 −(xij −max(0, dcj −ticjk)), 0 2) := g(d) := X ijk: pijk=1 gijk(dcj). (5) Problem (5) is non-trivial to solve since it involves nested hinge losses. Fortunately, by carefully analyzing the value of each term gijk(dcj), we can show that gijk(dcj) = max(1 −xij, 0)2, if dcj ≤ticjk + max(xij −1, 0) (1 −(xij −dcj + ticjk))2, if dcj > ticjk + max(xij −1, 0). For notational simplicity, we let sijk = ticjk + max(xij −1, 0) for all triplets (i, j, k) satisfying pijk = 1. Now we can focus on each category κ: for each κ, we collect the set Q = {(i, j, k) | pijk = 1 and cj = κ} and calculate the corresponding sijks. We then sort sijks such that s(i1j1k1) ≤ · · · ≤s(i|Q|j|Q|k|Q|). For each interval [s(iqjqkq), s(iq+1jq+1kq+1)], the function is quadratic, thus can be solved in a closed form. Therefore, by scanning the solution regions from left to right according to the sorted s values, and maintaining some intermediate computed variables, we are able to find the optimal solution, as summarized by the following lemma: Lemma 1. The subproblem (5) is convex with respect to d and can be solved exactly in O(∥P∥0 log(∥P∥0)), where ∥P∥0 is the number of nonzero elements in tensor P. Therefore, we can efficiently update d since P is a very sparse tensor with only a small number of nonzero elements. 4.2 Update X By defining aijk = 1 + max(0, dcj −ticjk), if pijk = 1 0, otherwise the subproblem with respect to X can be written as min X∈Rm×n h(X)+λ∥X∥∗where h(X) := η X ijk: pijk=1 max(aijk−xij, 0)2+(1−η) X ijk: pijk=0 x2 ij . (6) Since there are O(mnl) terms in the objective function, a naive implementation will take at least O(mnl) time, which is computationally infeasible when the data is large. To address this issue, We use proximal gradient descent to solve the problem. At each iteration, X is updated by X ←Sλ(X −α∇h(X)), (7) where Sλ(·) is the soft-thresholding operator for singular values.5 5If X has the singular value decomposition X = UΣVT , then Sλ(X) = U(Σ −λI)+VT where a+ = max(0, a). 5 Table 1: CPU time for solving problem (4) with different number of purchase records m (# users) n (# items) l (# time slots) ∥P∥0 k CPU Time (in seconds) 1,000,000 1,000,000 1,000 11,112,400 10 595 1,000,000 1,000,000 1,000 43,106,100 10 1,791 1,000,000 1,000,000 1,000 166,478,000 10 6,496 In order to efficiently compute the top singular vectors of X −α∇h(X), we rewrite it as X −α∇h(X) = [1 −2(1 −η)l] X + 2(1 −η) X ijk: pijk=1 xij −2η X ijk: pijk=1 max(aijk −xij, 0) . = fa(X) + fb(X). Since fa(X) is of low-rank and fb(X) is sparse, multiplying (X −α∇h(X)) with a skinny m by k matrix can be computed in O(nk2 + mk2 + ∥P∥0k) time. As shown in [12], each iteration of proximal gradient descent for nuclear norm minimization only requires a fixed number of iterations of randomized SVD (or equivalently, power iterations) using the warm start strategy, thus we have the following lemma. Lemma 2. A proximal gradient descent algorithm can be applied to solve problem (6) within O(nk2T + mk2T + ∥P∥0kT) time, where T is the number of iterations. We note that the algorithm is guaranteed to converge to the true solution. This is because when we apply a fixed number of iterations to update X via problem (7), it is equivalent to the “inexact gradient descent update” where each gradient is approximately computed and the approximation error is upper bounded by a constant between zero and one. Intuitively speaking, when the gradient converges to 0, the error will also converge to 0 at an even faster rate. See [12] for the detailed explanations. 4.3 Overall Algorithm Combining the two subproblems together, the time complexity of each iteration of the proposed algorithm is: O(∥P∥0 log(∥P∥0) + nk2T + mk2T + ∥P∥0kT). Remark: Since each user should make at least one purchase and each item should be purchased at least once to be included in P, n and m are smaller than ∥P∥0. Also, since k and T are usually very small, the time complexity to solve problem (4) is dominated by the term ∥P∥0, which is a significant improvement over the naive approach with at least O(mnl) complexity. Since our problem has only two blocks d, X and each subproblem is convex, our optimization algorithm is guaranteed to converge to a stationary point [11]. Indeed, it converges very fast in practice. As a concrete example, our experiment shows that it takes only 9 iterations to optimize a problem with 1 million users, 1 million items, and more than 166 million purchase records. 5 Experiments 5.1 Experiment with Synthesized Data We first conduct experiments with simulated data to verify that the proposed demand-aware recommendation algorithm is computationally efficient and robust to noise. To this end, we first construct a low-rank matrix X = WHT , where W ∈Rm×10 and H ∈Rn×10 are random Gaussian matrices with entries drawn from N(1, 0.5), and then normalize X to the range of [0, 1]. We randomly assign all the n items to r categories, with their inter-purchase durations d equaling [10, 20, . . . , 10r]. We then construct the high purchase intension set Ω= {(i, j, k) | ticjk ≥dcj and xij ≥0.5}, and sample a subset of its entries as the observed purchase records. We let n = m and vary them in the range {10, 000, 20, 000, 30, 000, 40, 000}. We also vary r in the range {10, 20, · · · , 100}. Given the learned durations d∗, we use ∥d −d∗∥2/∥d∥2 to measure the prediction errors. 6 (a) Error vs Number of users/items (b) Error vs Number of categories (c) Error vs Noise levels Figure 1: Prediction errors ∥d −d∗∥2/∥d∥2 as a function of number of users, items, categories, and noise levels on synthetic datasets Accuracy Figure 1(a) and 1(b) clearly show that the proposed algorithm can perfectly recover the underlying inter-purchase durations with varied numbers of users, items, and categories. To further evaluate the robustness of the proposed algorithm, we randomly flip some entries in tensor P from 0 to 1 to simulate the rare cases of purchasing two items in the same category in close temporal succession. Figure 1(c) shows that when the ratios of noisy entries are not large, the predicted durations ˆd are close enough to the true durations, thus verifying the robustness of the proposed algorithm. Scalability To verify the scalability of the proposed algorithm, we fix the numbers of users and items to be 1 million, the number of time slots to be 1, 000, and vary the number of purchase records (i.e., ∥P∥0). Table 1 summarizes the CPU time of solving problem (4) on an Intel Xeon 2.40 GHz server with 32 GB main memory. We observe that the proposed algorithm is extremely efficient, e.g., even with 1 million users, 1 million items, and more than 166 million purchase records, the running time of the proposed algorithm is less than 2 hours. 5.2 Experiment with Real-World Data In the real-world experiments, we evaluate the proposed demand-aware recommendation algorithm by comparing it with the six state-of the-art recommendation methods: (a) M3F, maximum-margin matrix factorization [24], (b) PMF, probabilistic matrix factorization [25], (c) WR-MF, weighted regularized matrix factorization [14], (d) CP-APR, Candecomp-Parafac alternating Poisson regression [7], (e) Rubik, knowledge-guided tensor factorization and completion method [30], and (f) BPTF, Bayesian probabilistic tensor factorization [31]. Among them, M3F and PMF are widely-used static collaborative filtering algorithms. We include these two algorithms as baselines to justify whether traditional collaborative filtering algorithms are suitable for general e-commerce recommendation involving both durable and nondurable goods. Since they require explicit ratings as inputs, we follow [2] to generate numerical ratings based on the frequencies of (user, item) consumption pairs. WR-MF is essentially the positive-unlabeled version of PMF and has shown to be very effective in modeling implicit feedback data. All the other three baselines, i.e., CP-APR, Rubik, and BPTF, are tensor-based methods that can consider time utility when making recommendations. We refer to the proposed recommendation algorithm as Demand-Aware Recommender for One-Sided Sampling, or DAROSS for short. Our testbeds are two real-world datasets Tmall6 and Amazon Review7. Since some of the baseline algorithms are not scalable enough, we first conduct experiments on their subsets and then on the full set of Amazon Review. In order to generate the subsets, we randomly sample 80 item categories for Tmall dataset and select the users who have purchased at least 3 items within these categories, leading to the purchase records of 377 users and 572 items. For Amazon Review dataset, we randomly select 300 users who have provided reviews to at least 5 item categories on Amazon.com. This leads to a total of 5, 111 items belonging to 11 categories. Time information for both datasets is provided in days, and we have 177 and 749 time slots for Tmall and Amazon Review subsets, respectively. The full Amazon Review dataset is significantly larger than its subset. After removing duplicate items, it contains more than 72 million product reviews from 19.8 million users and 7.7 million items that 6http://ijcai-15.org/index.php/repeat-buyers-prediction-competition 7http://jmcauley.ucsd.edu/data/amazon/ 7 (a) Category Prediction (b) Purchase Time Prediction Figure 2: Prediction performance on real-world datasets Tmall and Amazon Review subsets Table 2: Estimated inter-review durations for Amazon Review subset Categories Instant Apps for Automotive Baby Beauty Digital Grocery Musical Office Patio ... Pet Video Android Music ... Food Instruments Products Garden Supplies d 0 0 326 0 0 158 0 38 94 271 40 belong to 24 item categories. The collected reviews span a long range of time: from May 1996 to July 2014, which leads to 6, 639 time slots in total. Comparing to its subset, the full set is a much more challenging dataset both due to its much larger size and much higher sparsity, i.e., many reviewers only provided a few reviews, and many items were only reviewed a small number of times. For each user, we randomly sample 90% of her purchase records as the training data, and use the remaining 10% as the test data. For each purchase record (u, i, t) in the test set, we evaluate all the algorithms on two tasks: (i) category prediction, and (ii) purchase time prediction. In the first task, we record the highest ranking of items that are within item i’s category among all items at time t. Since a purchase record (u, i, t) may suggest that in time slot t, user u needed an item that share similar functionalities with item i, category prediction essentially checks whether the recommendation algorithms recognize this need. In the second task, we record the number of slots between the true purchase time t and its nearest predicted purchase time within item i’s category. Ideally, good recommendations should have both small category rankings and small time errors. Thus we adopt the average top percentages, i.e., (average category ranking) / n × 100% and (average time error) / l × 100%, as the evaluation metrics of category and purchase time prediction tasks, respectively. The algorithms M3F, PMF, and WR-MF are excluded from the purchase time prediction task since they are static models that do not consider time information. Figure 2 displays the predictive performance of the seven recommendation algorithms on Tmall and Amazon Review subsets. As expected, M3F and PMF fail to deliver strong performance since they neither take into account users’ demands, nor consider the positive-unlabeled nature of the data. This is verified by the performance of WR-MF: it significantly outperforms M3F and PMF by considering the PU issue and obtains the second-best item prediction accuracy on both datasets (while being unable to provide a purchase time prediction). By taking into account both issues, our proposed algorithm DAROSS yields the best performance for both datasets and both tasks. Table 2 reports the inter-review durations of Amazon Review subset estimated by our algorithm. Although they may not perfectly reflect the true inter-purchase durations, the estimated durations clearly distinguish between durable good categories, e.g., automotive, musical instruments, and non-durable good categories, e.g., instant video, apps, and food. Indeed, the learned inter-purchase durations can also play an important role in applications more advanced than recommender systems, such as inventory management, operations management, and sales/marketing mechanisms. We do not report the estimated durations of Tmall herein since the item categories are anonymized in the dataset. Finally, we conduct experiments on the full Amazon Review dataset. In this study, we replace category prediction with a more strict evaluation metric item prediction [8], which indicates the predicted ranking of item i among all items at time t for each purchase record (u, i, t) in the test set. Since most of our baseline algorithms fail to handle such a large dataset, we only obtain the predictive performance of three algorithms: DAROSS, WR-MF, and PMF. Note that for such a large dataset, prediction time instead of training time becomes the bottleneck: to evaluate average item rankings, we 8 need to compute the scores of all the 7.7 million items, thus is computationally inefficient. Therefore, we only sample a subset of items for each user and estimate the rankings of her purchased items. Using this evaluation method, the average item ranking percentages for DAROSS, WR-MF, and PMF are 16.7%, 27.3%, and 38.4%, respectively. In addition to superior performance, it only takes our algorithm 10 iterations and 1 hour to converge to a good solution. Since WR-MF and PMF are both static models, our algorithm is the only approach evaluated here that considers time utility while being scalable enough to handle the full Amazon Review dataset. Note that this dataset has more users, items, and time slots but fewer purchase records than our largest synthesized dataset, and the running time of the former dataset is lower than the latter one. This clearly verifies that the time complexity of our algorithm is dominated by the number of purchase records instead of the tensor size. Interestingly, we found that some inter-review durations estimated from the full Amazon Review dataset are much smaller than the durations estimated from its subset. This is because the durations may be underestimated when many users reviewed items within a same durable goods category in close temporal succession. On the other hand, this result verifies the effectiveness of the PU formulation – even if the durations are underestimated, our algorithm still outperforms the competitors by a considerable margin. As a final note, we want to point out that Tmall and Amazon Review may not take full advantage of the proposed algorithm, since (i) their categories are relatively coarse and may contain multiple sub-categories with different durations, and (ii) the time stamps of Amazon Review reflect the review time instead of purchase time, and inter-review durations could be different from inter-purchase durations. By choosing a purchase history dataset with a more appropriate category granularity, we may obtain more accurate duration estimations and also a better recommendation performance. 6 Conclusion In this paper, we examine the problem of demand-aware recommendation in settings when interpurchase duration within item categories affects users’ purchase intention in combination with intrinsic properties of the items themselves. We formulate it as a tensor nuclear norm minimization problem that seeks to jointly learn the form utility tensor and a vector of inter-purchase durations, and propose a scalable optimization algorithm with a tractable time complexity. Our empirical studies show that the proposed approach can yield perfect recovery of duration vectors in noiseless settings; it is robust to noise and scalable as analyzed theoretically. On two real-world datasets, Tmall and Amazon Review, we show that our algorithm outperforms six state-of-the-art recommendation algorithms on the tasks of category, item, and purchase time predictions. Acknowledgements Cho-Jui Hsieh and Yao Li acknowledge the support of NSF IIS-1719097, TACC and Nvidia. References [1] Gediminas Adomavicius and Alexander Tuzhilin. Context-aware recommender systems. In Recommender Systems Handbook, pages 217–253. Springer, New York, NY, 2011. [2] Linas Baltrunas and Xavier Amatriain. Towards time-dependant recommendation based on implicit feedback. In Workshop on context-aware recommender systems, 2009. [3] Jesús Bobadilla, Fernando Ortega, Antonio Hernando, and Jesús Bernal. A collaborative filtering approach to mitigate the new user cold start problem. Knowl.-Based Syst., 26:225–238, February 2012. [4] Pedro G. Campos, Fernando Díez, and Iván Cantador. Time-aware recommender systems: a comprehensive survey and analysis of existing evaluation protocols. User Model. User-Adapt. Interact., 24(1-2):67–119, 2014. [5] Emmanuel J. Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, 2009. [6] Christopher Chatfield and Gerald J Goodhardt. A consumer purchasing model with erlang inter-purchase times. Journal of the American Statistical Association, 68(344):828–835, 1973. 9 [7] Eric C. Chi and Tamara G. Kolda. On tensors, sparsity, and nonnegative factorizations. SIAM Journal on Matrix Analysis and Applications, 33(4):1272–1299, 2012. [8] Nan Du, Yichen Wang, Niao He, Jimeng Sun, and Le Song. Time-sensitive recommendation from recurrent user activities. In NIPS, pages 3474–3482, 2015. [9] Marthinus Christoffel du Plessis, Gang Niu, and Masashi Sugiyama. Analysis of learning from positive and unlabeled data. In NIPS, pages 703–711, 2014. [10] Silvia Gandy, Benjamin Recht, and Isao Yamada. Tensor completion and low-n-rank tensor recovery via convex optimization. Inverse Problems, 27(2):025010, 2011. [11] L. Grippo and M. Sciandrone. On the convergence of the block nonlinear Gauss-Seidel method under convex constraints. Operations Research Letters, 26:127–136, 2000. [12] C.-J. Hsieh and P. A. Olsen. Nuclear norm minimization via active subspace selection. In ICML, 2014. [13] Cho-Jui Hsieh, Nagarajan Natarajan, and Inderjit S. Dhillon. PU learning for matrix completion. In ICML, pages 2445–2453, 2015. [14] Y. Hu, Y. Koren, and C. Volinsky. Collaborative filtering for implicit feedback datasets. In ICDM, pages 263–272. IEEE, 2008. [15] Yifan Hu, Yehuda Koren, and Chris Volinsky. Collaborative filtering for implicit feedback datasets. In ICDM, pages 263–272, 2008. [16] P. Jain and S. Oh. Provable tensor factorization with missing data. In NIPS, pages 1431–1439, 2014. [17] Yehuda Koren. Collaborative filtering with temporal dynamics. Commun. ACM, 53(4):89–97, April 2010. [18] Dokyun Lee and Kartik Hosanagar. Impact of recommender systems on sales volume and diversity. In Proc. Int. Conf. Inf. Syst., Auckland, New Zealand, December 2014. [19] Bin Li, Xingquan Zhu, Ruijiang Li, Chengqi Zhang, Xiangyang Xue, and Xindong Wu. Cross-domain collaborative filtering over time. In IJCAI, pages 2293–2298, 2011. [20] Bing Liu, Yang Dai, Xiaoli Li, Wee Sun Lee, and Philip S. Yu. Building text classifiers using positive and unlabeled examples. In ICML, pages 179–188, 2003. [21] Ji Liu, Przemyslaw Musialski, Peter Wonka, and Jieping Ye. Tensor completion for estimating missing values in visual data. IEEE Trans. Pattern Anal. Mach. Intell., 35(1):208–220, 2013. [22] Atsuhiro Narita, Kohei Hayashi, Ryota Tomioka, and Hisashi Kashima. Tensor factorization using auxiliary information. In ECML/PKDD, pages 501–516, 2011. [23] Steffen Rendle, Christoph Freudenthaler, Zeno Gantner, and Lars Schmidt-Thieme. BPR: bayesian personalized ranking from implicit feedback. In UAI, pages 452–461, 2009. [24] Jason D. M. Rennie and Nathan Srebro. Fast maximum margin matrix factorization for collaborative prediction. In ICML, pages 713–719, 2005. [25] Ruslan Salakhutdinov and Andriy Mnih. Bayesian probabilistic matrix factorization using markov chain monte carlo. In ICML, pages 880–887, 2008. [26] Clayton Scott et al. Calibrated asymmetric surrogate losses. Electronic Journal of Statistics, 6:958–992, 2012. [27] Robert L. Sexton. Exploring Economics. Cengage Learning, Boston, MA, 2013. [28] Robert L. Steiner. The prejudice against marketing. J. Marketing, 40(3):2–9, July 1976. [29] John Z. Sun, Dhruv Parthasarathy, and Kush R. Varshney. Collaborative Kalman filtering for dynamic matrix factorization. IEEE Trans. Signal Process., 62(14):3499–3509, 15 July 2014. [30] Yichen Wang, Robert Chen, Joydeep Ghosh, Joshua C. Denny, Abel N. Kho, You Chen, Bradley A. Malin, and Jimeng Sun. Rubik: Knowledge guided tensor factorization and completion for health data analytics. In SIGKDD, pages 1265–1274, 2015. [31] Liang X., Xi C., Tzu-Kuo H., Jeff G. S., and Jaime G. C. Temporal collaborative filtering with bayesian probabilistic tensor factorization. In SDM, pages 211–222, 2010. [32] Jinfeng Yi, Rong Jin, Shaili Jain, and Anil K. Jain. Inferring users’ preferences from crowdsourced pairwise comparisons: A matrix completion approach. In First AAAI Conference on Human Computation and Crowdsourcing (HCOMP), 2013. 10 | 2017 | 409 |
6,907 | When Cyclic Coordinate Descent Outperforms Randomized Coordinate Descent Mert Gürbüzbalaban⇤, Asuman Ozdaglar†, Pablo A. Parrilo†, N. Denizcan Vanli† ⇤Rutgers University, mg1366@rutgers.edu †Massachusetts Institute of Technology, {asuman,parrilo,denizcan}@mit.edu Abstract The coordinate descent (CD) method is a classical optimization algorithm that has seen a revival of interest because of its competitive performance in machine learning applications. A number of recent papers provided convergence rate estimates for their deterministic (cyclic) and randomized variants that differ in the selection of update coordinates. These estimates suggest randomized coordinate descent (RCD) performs better than cyclic coordinate descent (CCD), although numerical experiments do not provide clear justification for this comparison. In this paper, we provide examples and more generally problem classes for which CCD (or CD with any deterministic order) is faster than RCD in terms of asymptotic worst-case convergence. Furthermore, we provide lower and upper bounds on the amount of improvement on the rate of CCD relative to RCD, which depends on the deterministic order used. We also provide a characterization of the best deterministic order (that leads to the maximum improvement in convergence rate) in terms of the combinatorial properties of the Hessian matrix of the objective function. 1 Introduction We consider solving smooth convex optimization problems using the coordinate descent (CD) method. The CD method is an iterative algorithm that performs (approximate) global minimizations with respect to a single coordinate (or several coordinates in the case of block CD) in a sequential manner. More specifically, at each iteration k, an index ik 2 {1, 2, . . . , n} is selected and the decision vector is updated to approximately minimize the objective function in the ik-th coordinate [3, 4]. The CD method can be deterministic or randomized depending on the choice of the update coordinates. If the coordinate indices ik are chosen in a cyclic manner from the set {1, 2, . . . , n}, then the method is called the cyclic coordinate descent (CCD) method. When ik is sampled uniformly from the set {1, 2, . . . , n}, the resulting method is called the randomized coordinate descent (RCD) method.1 The CD method has a long history in optimization and its convergence has been studied extensively in 80s and 90s (cf. [5, 12, 13, 18]). It has seen a resurgence of recent interest because of its applicability and superior empirical performance in machine learning and large-scale data analysis [7, 8]. Several recent influential papers established non-asymptotic convergence rate estimates under various assumptions. Among these are Nesterov [15], which provided the first global non-asymptotic convergence rates of RCD for convex and smooth problems (see also [11, 21, 22] for problems with non-smooth terms), and Beck and Tetruashvili [1], which provided rate estimates for block coordinate gradient descent method that yields rate results for CCD with exact minimization for quadratic problems. Tighter rate estimates (with respect to [1]) for CCD are then presented in [23]. These rate estimates suggest that CCD can be slower than RCD (precisely O(n2) times slower for quadratic 1Note that there are other coordinate selection rules as well (such as the Gauss-Southwell rule [17]). However, in this paper, we focus on cyclic and randomized rules. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. problems, where n is the dimension of the problem), which is puzzling in view of the faster empirical performance of CCD over RCD for various problems (e.g., see numerical examples in [1, 24]). This gap was investigated in [24], which provided a quadratic problem that attains this performance gap. In this paper, we investigate performance comparison of deterministic and randomized coordinate descent and provide examples and more generally problem classes for which CCD (or CD with any deterministic order) is faster than RCD in terms of asymptotic worst-case convergence. Furthermore, we provide lower and upper bounds on the amount of improvement on the rate of deterministic CD relative to RCD. The amount of improvement depends on the deterministic order used. We also provide a characterization of the best deterministic order (that leads to the maximum improvement in convergence rate) in terms of the combinatorial properties of the Hessian matrix of the objective function. In order to clarify the rate comparison between CCD and RCD, we focus on quadratic optimization problems. In particular, we consider the problem2 min x2Rn 1 2xT Ax, (1) where A is a positive definite matrix. We consider two problem classes: i) A is a 2-cyclic matrix, whose formal definition is given in Definition 4.4, but an equivalent and insightful definition is the bipartiteness of the graph induced by the matrix A −D, where D is the diagonal part of A; ii) A is an M-matrix, i.e., the off-diagonal entries of A are nonpositive. These matrices arise in a large number of applications such as in inference in attractive Gaussian-Markov random fields [14] and in minimization of quadratic forms of graph Laplacians (for which A = D −W, where W denotes the weighted adjacency matrix of the graph and D is the diagonal matrix given by Di,i = P j Wi,j), for example in spectral partitioning [6] and semisupervised learning [2]. We build on the seminal work of Young [27] and Varga [25] on the analysis of Gauss-Seidel method for solving linear systems of equations (with matrices satisfying certain properties) and provide a novel analysis that allows us to compare the asymptotic worst-case convergence rate of CCD and RCD for the aforementioned class of problems and establish the faster performance of CCD with any deterministic order. Outline: In the next section, we formally introduce the CCD and RCD methods. In Section 3, we present the notion of asymptotic convergence rate to compare the CCD and RCD methods and provide a motivating example for which CCD converges faster than RCD. In Section 4, we present classes of problems for which the asymptotic convergence rate of CCD is faster than that of RCD. We provide numerical experiments in Section 5 and concluding remarks in Section 6. Notation: For a matrix H, we let Hi denote its ith row and Hi,j denote its entry at the ith row and jth column. For a vector x, we let xi denote its ith entry. Throughout the paper, we reserve superscripts for iteration counters of iterative algorithms and use x⇤to denote the optimal solution of problem (1). For a vector x, kxk denotes its Euclidean norm and for a matrix H, ||H|| denotes its operator norm. For matrices, ≥and are entry-wise operators. The matrices I and 0 denote the identity matrix and the zero matrix respectively and their dimensions can be understood from the context. 2 Coordinate Descent Method Starting from an initial point x0 2 Rn, the coordinate descent (CD) method, at each iteration k, picks a coordinate of x, say ik, and updates the decision vector by performing exact minimization along the ikth coordinate, which for problem (1) yields xk+1 = xk − 1 Aik,ik Aikxkeik, k = 0, 1, 2, . . . , (2) where eik is the unit vector, whose ikth entry is 1 and the rest of its entries are 0. Note that this is a special case of the coordinate gradient projection method (see [1]), which at each iteration updates a single coordinate, say coordinate ik, along the gradient component direction (with the particular step size of 1 Aik,ik ). The coordinate index ik can be selected according to a deterministic or randomized rule: 2For ease of presentation, we consider minimization of 1 2xT Ax, yet our results directly extend for problems of the type 1 2xT Ax −bT x for any b 6= 0. 2 • When ik is chosen using the cyclic rule with order 1, . . . , n (i.e., ik = k (mod n) + 1), the resulting algorithm is called the cyclic coordinate descent (CCD) method. In order to write the CCD iterations in a matrix form, we introduce the following decomposition A = D −L −LT , where D is the diagonal part of A and −L is the strictly lower triangular part of A. Then, over each epoch ` ≥0 (where an epoch is defined to be consecutive n iterations), the CCD iterations given in (2) can be written as x(`+1)n CCD = C x`n CCD, where C = (D −L)−1LT . (3) Note that the epoch in (3) is equivalent to one iteration of the Gauss-Seidel (GS) method applied to the first-order optimality condition of (1), i.e., applied to the linear system Ax = 0 [26]. • When ik is chosen at random among {1, . . . , n} with probabilities {p1, . . . , pn} independently at each iteration k, the resulting algorithm is called the randomized coordinate descent (RCD) method. Given the kth iterate generated by the RCD algorithm, i.e., xk RCD, we have Ek ⇥ xk+1 RCD | xk RCD ⇤ = $ I −SD−1A % xk RCD, (4) where S = diag(p1, . . . , pn) contains the coordinate sampling probabilities and the conditional expectation Ek is taken over the random variable ik given xk RCD. Using the nested property of the expectations, the RCD iterations in expectation over each epoch ` ≥0 satisfy Ex(`+1)n RCD = R Ex`n RCD with R := $ I −SD−1A %n . (5) 3 Comparison of the Convergence Rates of CCD and RCD Methods In the following subsection, we define our basis of comparison for rates of CCD and RCD methods. To measure the performance of these methods, we use the notion of the average worst-case asymptotic rate that has been studied extensively in the literature for characterizing the rate of iterative algorithms [25]. In Section 3.2, we construct an example, for which the rate of CCD is more than twice the rate of RCD. This raises the question whether the best known convergence rates of CCD in the literature are tight or whether there exist a class of problems for which CCD provably attains better convergence rates than the best known rates for RCD, a question which we will answer in Section 4. 3.1 Asymptotic Rate of Converge for Iterative Algorithms Consider an iterative algorithm with update rule x(`+1)n = Cx`n (e.g., the CCD algorithm). The reduction in the distance to the optimal solution of the iterates generated by this algorithm after ` epochs is given by &&&&x`n −x⇤&&&& ||x0 −x⇤|| = &&&&C`(x0 −x⇤) &&&& ||x0 −x⇤|| . (6) Note that the right hand side of (6) can be as large as &&&&C`&&&&, hence in the worst-case, the average decay of distance at each epoch of this algorithm is &&&&C`&&&&1/`. Over any finite epochs ` ≥1, we have &&&&C`&&&&1/` ≥⇢(C) and &&&&C`&&&&1/` ! ⇢(C) as ` ! 1 by Gelfand’s formula. Thus, we define the asymptotic worst-case convergence rate of an iterative algorithm (with iteration matrix C) as follows Rate(CCD) := lim `!1 sup x02Rn −1 ` log &&&&x`n −x⇤&&&& ||x0 −x⇤|| ! = −log (⇢(C)) . (7) We emphasize that this notion has been used extensively for studying the performance of iterative methods such as GS and Jacobi methods [5, 18, 25, 27]. Note that according to our definition in (7), larger rate means faster algorithm and we will use these terms interchangably in throughout the paper. Analogously, for a randomized algorithm with expected update rule Ex(`+1)n = R Ex`n (e.g., the RCD algorithm), we consider the asymptotic convergence of the expected iterate error 3 &&&&E(x`n) −x⇤&&&& and define the asymptotic worst-case convergence rate as Rate(RCD) := lim `!1 sup x02Rn −1 ` log &&&&E(x`n) −x⇤&&&& ||x0 −x⇤|| ! = −log (⇢(R)) , (8) Note that in (8), we use the distance of the expected iterates &&&&Ex`n −x⇤&&&& as our convergence criterion. One can also use the expected distance (or the squared distance) of the iterates E &&&&x`n −x⇤&&&& as the convergence criterion, which is a stronger convergence criterion than the one in (8). This follows since E &&&&x`n −x⇤&&&& ≥ &&&&Ex`n −x⇤&&&& by Jensen’s inequality and any convergence rate on E &&&&x`n −x⇤&&&& immediately implies at least the same convergence rate on &&&&Ex`n −x⇤&&&& as well. Since we consider the reciprocal case, i.e., obtain a convergence rate on &&&&Ex`n −x⇤&&&& and show that it is slower than that of CCD, our results naturally imply that the convergence rate on E &&&&x`n −x⇤&&&& is also slower than that of CCD. 3.2 A Motivating Example In this section, we provide an example for which the (asymptotic worst-case convergence) rate of CCD is better than the one of RCD and building on this example, in Section 4, we construct a class of problems for which CCD attains a better rate than RCD. For some positive integer n ≥1, consider the 2n ⇥2n symmetric matrix A = I −L −LT , where L = 1 n2 0n⇥n 0n⇥n 1n⇥n 0n⇥n * , (9) and 1n⇥n is the n ⇥n matrix with all entries equal to 1 and 0n⇥n is the n ⇥n zero matrix. Noting that A has a special structure (A is equal to the sum of the identity matrix and the rank-two matrix −L −LT ), it is easy to check that 1 −1/n and 1 + 1/n are eigenvalues of A with the corresponding eigenvectors [11⇥n 11⇥n]T and [11⇥n −11⇥n]T . The remaining 2n −2 eigenvalues of A are equal to 1. The iteration matrix of the CCD algorithm when applied to the problem in (1) with the matrix (9) can be found as C = 0n⇥n 1 n2 1n⇥n 0n⇥n 1 n3 1n⇥n * . The eigenvalues of C are all zero except the eigenvalue of 1/n2 with the corresponding eigenvector [n11⇥n, 11⇥n]T . Therefore, ⇢(C) = 1/n2 and Rate(CCD) = −log(⇢(C)) = 2 log n. On the other hand, the spectral radius of the expected iteration matrix of RCD can be found as ⇢(R) = ✓ 1 −λmin(A) n ◆n ≥1 −λmin(A) = 1 n, which yields Rate(RCD) = −log(⇢(R)) log n. Thus, we conclude Rate(CCD) Rate(RCD) ≥2, for all n ≥1. That is, CCD is at least twice as fast as RCD in terms of the the asymptotic rate. This motivates us to investigate if there exists a more general class of problems for which the asymptotic worst-case rate of CCD is larger than that of RCD. The answer to this question turns out to be positive as we describe in the following section. 4 When Deterministic Orders Outperform Randomized Sampling In this section, we present special classes of problems (of the form (1)) for which the asymptotical worst-case rate of CCD is larger than that of RCD. We begin our discussion by highlighting the main assumption we will use in this section. Assumption 4.1. A is a symmetric positive definite matrix whose smallest eigenvalue is µ and the diagonal entries of A are 1. 4 Given any positive definite matrix A with diagonals D 6= I, the diagonal entries of the preconditioned matrix D−1/2AD−1/2 are 1. Therefore, Assumption 4.1 is mild. The relationship between the smallest eigenvalue of the original matrix and the preconditioned matrix are as follows. Let σ > 0 and Lmax denote the smallest eigenvalue and the largest diagonal entry of the original matrix, respectively. Then, the smallest eigenvalue of the preconditioned matrix satisfies µ ≥σ/Lmax. Remark 4.2. For the RCD algorithm, the coordinate index ik 2 {1, . . . , n} (at iteration k) can be chosen using different probability distributions {p1, . . . , pn}. Two common choices of distributions are pi = 1 n, for all i 2 {1, . . . , n} and pi = Ai,i PN J=1 Aj,j [15]. Since by Assumption 4.1, the diagonal entries of A are 1, both of these distributions reduces to pi = 1 n, for all i 2 {1, . . . , n}. Therefore, in the rest of the paper, we consider the RCD algorithm with uniform and independent coordinate selection at each iteration. In the following lemma, we characterize the spectral radius of the RCD method. This worst-case rate has been presented in many works in the literature for strongly convex optimization problems [15, 26]. The proof is deferred to Appendix. Lemma 4.3. Suppose Assumption 4.1 holds. Then, the spectral radius of the expected iteration matrix R of the RCD algorithm (defined in (5)) is given by ⇢(R) = ⇣ 1 −µ n ⌘n . (10) 4.1 Convergence Rate of CCD for 2-Cyclic Matrices In this section, we introduce the class of 2-cyclic matrices and show that the asymptotic worst-case rate of CCD is more than two times faster than that of RCD. Definition 4.4 (2-Cyclic Matrix). A matrix H is 2-cyclic if there exists a permutation matrix P such that PHP T = D + 0 B1 B2 0 * , (11) where the diagonal null submatrices are square and D is a diagonal matrix. This definition can be interpreted as follows. Let H be a 2-cyclic matrix, i.e., H satisfies (11). Then, the graph induced by the matrix H −D is bipartite. The definition in (11) is first introduced in [27], where it had an alternative name: Property A. A generalization of this property is later introduced by Varga to the class of p-cyclic matrices [25] where p ≥2 can be arbitrary. We next introduce the following definition that will be useful in Theorem 4.12 and explicitly identify the class of matrices that satisfy this definition in Lemma 4.6. Definition 4.5 (Consistently Ordered Matrix). For a matrix H, let H = HD −HL −HU be its decomposition such that HD is a diagonal matrix, HL (and HU) is a strictly lower (and upper) triangular matrix. If the eigenvalues of the matrix ↵HL + ↵HU −γHD are independent of ↵for any γ 2 R and ↵6= 0, then H is said to be consistently ordered. Lemma 4.6. [27, Theorem 4.5] A matrix H is 2-cyclic if and only if there exists a permutation matrix P such that PHP T is consistently ordered. In the next theorem, we characterize the convergence rate of CCD algorithm applied to a 2-cyclic matrix. Since ⇢(R) ≥1 −µ by Lemma 4.3, the following theorem indicates that the spectral radius of the CCD iteration matrix is smaller than ⇢2(R). Theorem 4.7. Suppose Assumption 4.1 holds and A is a consistently ordered 2-cyclic matrix. Then, the spectral radius of the CCD algorithm is given by ⇢(C) = (1 −µ)2 . Remark 4.8. Note that our motivating example in (9) is an example of a consistently ordered 2-cyclic matrix, for which Theorem 4.7 is applicable. In particular, for the example in (9), we can apply Theorem 4.7 with µ = 1 −1/n leading to ⇢(C) = 1/n2, which exactly coincides with our previous computations of ⇢(C) in Section 3.2. We also give an example in Appendix F, for which CCD is twice faster than RCD for any arbitrary initialization with probability one. 5 The following corollary states that the asymptotic worst-case rate of CCD is more than twice larger than that of RCD for quadratic problems whose Hessian is a 2-cyclic matrix. This corollary directly follows by Theorem 4.7 and definitions (7)-(8). Corollary 4.9. Suppose Assumption 4.1 holds and A is a consistently ordered 2-cyclic matrix. Then, the asymptotic worst-case rates of CCD and RCD satisfy Rate(CCD) Rate(RCD) = 2⌫n, where ⌫n := log(1 −µ) n log $ 1 −µ n %. (12) In the following remark, we highlight several properties of the constant ⌫n. Remark 4.10. ⌫n is a monotonically increasing function of n over the interval [1, 1), where ⌫1 = 1 and limn!1 ⌫n = −log(1−µ) µ > 1. Furthermore, limµ!0+ ⌫n = 1. We emphasize that the CCD method applied to 1 is equivalent to the Gauss-Seidel (GS) algorithm applied to the linear system Ax = 0 and when A is a 2-cyclic matrix, the GS algorithm is twice as fast as the Jacobi algorithm [25, 27]. Hence, when A is a 2-cyclic matrix and µ is sufficiently small, the RCD method is approximately as fast as the Jacobi algorithm. 4.2 Convergence Rate of CCD for Irreducible M-Matrices In this section, we first define the class of M-matrices and then present the convergence rate of the CCD algorithm applied to quadratic problems whose Hessian is an M-matrix. Definition 4.11 (M-matrix). A real matrix A with Ai,j 0 for all i 6= j is an M-matrix if A has the decomposition A = sI −B such that B ≥0 and s ≥⇢(B). We emphasize that M-matrices arise in a variety of applications such as in belief propagation over Gaussian graphical models [14] and in distributed control of positive systems [20]. Furthermore, graph Laplacians are M-matrices, therefore solving linear systems with M-matrices (or equivalently solving (1) for an M-matrix A) arise in a variety of applications for analyzing random walks over graphs as well as distributed optimization and consensus problems over graphs (cf. [10] for a survey). For quadratic problems, the Hessian is an M-matrix if and only if the gradient descent mapping is an isotone operator [5, 22] and in Gaussian graphical models, M-matrices are often referred as attractive models [14]. In the following theorem, we provide lower and upper bounds on the spectral radius of the iteration matrix of CCD for quadratic problems, whose Hessian matrix is an irreducible M-matrix. In particular, we show that the spectral radius of the iteration matrix of CCD is strictly smaller than that of RCD for irreducible M-matrices. Theorem 4.12. Suppose Assumption 4.1 holds, A is an irreducible M-matrix and n ≥2. Then, the iteration matrix of the CCD algorithm C = (I −L)−1LT satisfies the following inequality (1 −µ)2 ⇢(C) 1 −µ 1 + µ, (13) where the inequality on the left holds with equality if and only if A is a consistently ordered matrix. An immediate consequence of Theorem 4.12 is that for quadratic problems whose Hessian is an irreducible M-matrix, the best cyclic order that should be used in CCD can be characterized as follows. Remark 4.13. The standard CCD method follows the standard cyclic order (1, 2, . . . , n) as described in Section 2. However, we can construct a CCD method that follows an alternative deterministic order by considering a permutation ⇡of {1, 2, . . . , n}, and choosing the coordinates according to the order (⇡(1), ⇡(2), . . . , ⇡(n)) instead. For any given order ⇡, (1) can be reformulated as follows min x⇡2Rn 1 2xT ⇡A⇡x⇡, where A⇡:= P⇡AP T ⇡ and x⇡= P⇡x, where P⇡is the corresponding permutation matrix of ⇡. Supposing that Assumption 4.1 holds, the corresponding CCD iterations for this problem can be written as follows x(`+1)n ⇡ = C⇡x`n ⇡, where C⇡= (I −L⇡)−1LT ⇡ and L⇡= P⇡LP⇡. 6 If A is an irreducible M-matrix and satisfies Assumptions 4.1, then so does A⇡. Consequently, Theorem 4.12 yields the same upper and lower bounds (in (13)) on ⇢(C⇡) as well, i.e., the spectral radius of the iteration matrix of CCD with any cyclic order ⇡satisfies (1 −µ)2 ⇢(C⇡) 1 −µ 1 + µ, (14) where the inequality on the left holds with equality if and only if A⇡is a consistently ordered matrix. Therefore, if a consistent order ⇡⇤exists, then the CCD method with the consistent order ⇡⇤attains the smallest spectral radius (or equivalently, the fastest asymptotic worst-case convergence rate) among the CCD methods with any cyclic order. Remark 4.14. The irreducibility of A is essential to derive the lower bound in (13) of Theorem 4.12. However, the upper bound in (13) holds even when A is a reducible matrix. We next compare the spectral radii bounds for CCD (given in Theorem 4.12) and RCD (given in Lemma 4.3). Since µ > 0, the right-hand side of (13) can be relaxed to (1 −µ)2 ⇢(C) < 1 −µ. A direct consequence of this inequality is the following corollary, which states that the asymptotic worst-case rate of CCD is strictly better than that of RCD at least by a factor that is strictly greater than 1. Corollary 4.15. Suppose Assumption 4.1 holds, A is an irreducible M-matrix and n ≥2. Then, the asymptotic worst-case rates of CCD and RCD satisfy 1 < ⌫n < Rate(CCD) Rate(RCD) 2⌫n, where ⌫n := log(1 −µ) n log $ 1 −µ n %, (15) and the inequality on the right holds with equality if and only if A is a consistently ordered matrix. In the following corollary, we highlight that as the smallest eigenvalue of A goes to zero, the asymptotic worst-case rate of the CCD algorithm becomes twice the asymptotic worst-case rate of the RCD algorithm. Corollary 4.16. Suppose Assumption 4.1 holds, A is an irreducible M-matrix and n ≥2. Then, we have lim µ!0+ Rate(CCD) Rate(RCD) = 2. 5 Numerical Experiments In this section, we compare the performance of CCD and RCD through numerical examples. First, we consider the quadratic optimization problem in (1), where A is an n⇥n matrix defined as follows A = I −L −LT , where L = 1 n 0 0 1 n 2 ⇥n 2 0 * , (16) and 1 n 2 ⇥n 2 is the n 2 ⇥n 2 matrix with all entries equal to 1. Here, it can be easily checked that A is a consistently ordered, 2-cyclic matrix. By Theorem 4.7 and Corolloary 4.9, the asymptotic worst-case convergence rate of CCD on this example is 2⌫n = 2 log(1 −µ) n log $ 1 −µ n % = log(0.5) 50 log $ 1 − 1 200 % ⇡2.77 (17) times faster than that of RCD. This is illustrated in Figure 1 (left), where the distance to the optimal solution is plotted in a logarithmic scale over epochs. Note that even if our results our asymptotic, we see the same difference in performances on the early epochs (for small `). On the other hand, when the matrix A is not consistently ordered, according to Theorem 4.12, CCD is still faster but the difference in the convergence rates decreases with respect to the consistent ordering case. To illustrate this, we need to generate an inconsistent ordering of the matrix A. For this goal, we generate a permutation matrix P and replace A with AP := PAP T in the optimization problem (1) (This is equivalent to solving the system AP x = 0) so that AP is not consistently ordered (We generate P randomly and compute AP ). Figure 1 (right) shows that for this inconsistent ordering CCD is still faster compared to RCD, but not as fast (the slope of the decay of error line in blue marker is less steep) predicted by our theory. 7 1 2 3 4 5 6 7 8 9 10 −14 −12 −10 −8 −6 −4 −2 0 Number of Epochs ` log ! ||x` −x⇤|| " Consistent Ordering, Worst-Case Initialization CCD RCD Expected RCD 1 2 3 4 5 6 7 8 9 10 −14 −12 −10 −8 −6 −4 −2 0 Number of Epochs ` log ! ||x` −x⇤|| " Inconsistent Ordering, Worst-Case Initialization CCD RCD Expected RCD Figure 1: Distance to the optimal solution of the iterates of CCD and RCD for the cyclic matrix in (16) (left figure) and a randomly permuted version of the same matrix (right figure) where the y-axis is on a logarithmic scale. The left (right) figure corresponds to the consistent (inconsistent) ordering for the same quadratic optimization problem. 0 20 40 60 80 100 −12 −10 −8 −6 −4 −2 0 Number of Epochs ` log ⇣ ||x`−x⇤|| ||x0−x⇤|| ⌘ M-Matrix, Worst-Case Initialization CCD RCD Expected RCD 0 20 40 60 80 100 −12 −10 −8 −6 −4 −2 0 Number of Epochs ` log ⇣ ||x`−x⇤|| ||x0−x⇤|| ⌘ M-Matrix, Random Initialization CCD RCD Expected RCD Figure 2: Distance to the optimal solution of the iterates of CCD and RCD for the M-matrix matrix in (18) for the worst-case initialization (left figure) and a random initialization (right figure). We next consider the case, where A is an irreducible positive definite M-matrix. In particular, we consider the matrix A = (1 + δ)I −δ1n⇥n, (18) where 1n⇥n is the n ⇥n matrix with all entries equal to 1 as before and δ = 1 n+5. We set n = 100 and plot the performance of CCD and RCD methods for the quadratic problem defined by this matrix. In Figure 2, we compare the convergence rate of CCD and RCD for an initial point that corresponds to a worst-case (left figure) and for a random choice of an initial point (right figure). We conclude that the asymptotic rate of CCD is faster than that of RCD demonstrating our results in Theorem 4.12 and Corolloary 4.15. 6 Conclusion In this paper, we compare the CCD and RCD methods for quadratic problems, whose Hessian is a 2-cyclic matrix or an M-matrix. We show by a novel analysis that for these classes of quadratic problems, CCD is always faster than RCD in terms of the asymptotic worst-case rate. We also give a characterization of the best cyclic order to use in the CCD algorithm for these classes of problems and show that with the best cyclic order, CCD enjoys more than a twice faster asymptotic worst-case rate with respect to RCD. We also provide numerical experiments that show the tightness of our results. Acknowledgments This work is supported by NSF DMS-1723085 and DARPA Foundations of Scalable Statistical Learning grants. 8 References [1] A. Beck and L. Tetruashvili. On the convergence of block coordinate descent type methods. SIAM Journal on Optimization, 23(4):2037–2060, 2013. [2] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of Machine Learning Research, 7:2399–2434, 2006. [3] D. P. Bertsekas. Nonlinear programming. Athena Scientific, 1999. [4] D. P. Bertsekas. Convex Optimization Algorithms. Athena Scientific, 2015. [5] D. P. Bertsekas and J. N. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. PrenticeHall, Inc., 1989. [6] F. R. K. Chung. Spectral Graph Theory. American Mathematical Society, 1997. [7] J. Friedman, T. Hastie, H. Höfling, and R. Tibshirani. Pathwise coordinate optimization. The Annals of Applied Statistics, 1(2):302–332, 2007. [8] J. Friedman, T. Hastie, and R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1):1–22, 2010. [9] J. F. C. Kingman. A convexity property of positive matrices. The Quarterly Journal of Mathematics, 12(1):283–284, 1961. [10] S. J. Kirkland and M. Neumann. Group inverses of M-matrices and their applications. CRC Press, 2012. [11] Z. Lu and L. Xiao. On the complexity analysis of randomized block-coordinate descent methods. Mathematical Programming, 152(1):615–642, 2015. [12] Z.-Q. Luo and P. Tseng. On the convergence of the coordinate descent method for convex differentiable minimization. Journal of Optimization Theory and Applications, 72(1):7–35, 1992. [13] Z.-Q. Luo and P. Tseng. Error bounds and convergence analysis of feasible descent methods: a general approach. Annals of Operations Research, 46(1):157–178, 1993. [14] D. M. Malioutov, J. K. Johnson, and A. S. Willsky. Walk-sums and belief propagation in gaussian graphical models. Journal of Machine Learning Research, 7:2031–2064, 2006. [15] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [16] Roger D. Nussbaum. Convexity and log convexity for the spectral radius. Linear Algebra and its Applications, 73(Supplement C):59 – 122, 1986. [17] J. Nutini, M. Schmidt, I. H. Laradji, M. Friedlander, and H. Koepke. Coordinate descent converges faster with the gauss-southwell rule than random selection. In Proceedings of the 32nd International Conference on International Conference on Machine Learning, pages 1632–1641, 2015. [18] J. Ortega and W. Rheinboldt. Iterative Solution of Nonlinear Equations in Several Variables. Society for Industrial and Applied Mathematics, 2000. [19] R. J. Plemmons. M-matrix characterizations.I—nonsingular m-matrices. Linear Algebra and its Applications, 18(2):175 – 188, 1977. [20] A. Rantzer. Distributed control of positive systems. ArXiv:1203.0047, 2014. [21] P. Richtárik and M. Takáˇc. Parallel coordinate descent methods for big data optimization. Mathematical Programming, 156(1):433–484, 2016. [22] A. Saha and A. Tewari. On the nonasymptotic convergence of cyclic coordinate descent methods. SIAM Journal on Optimization, 23(1):576–601, 2013. [23] R. Sun and M. Hong. Improved iteration complexity bounds of cyclic block coordinate descent for convex problems. In Advances in Neural Information Processing Systems 28, pages 1306–1314. 2015. [24] R. Sun and Y. Ye. Worst-case Complexity of Cyclic Coordinate Descent: O(n2) Gap with Randomized Version. ArXiv:1604.07130, 2016. [25] R. S. Varga. Matrix iterative analysis. Springer Science & Business Media, 2009. [26] S. J. Wright. Coordinate descent algorithms. Mathematical Programming, 151(1):3–34, 2015. [27] D. M. Young. Iterative solution of large linear systems. Academic Press, 1971. 9 | 2017 | 41 |
6,908 | Learning a Multi-View Stereo Machine Abhishek Kar UC Berkeley akar@berkeley.edu Christian Häne UC Berkeley chaene@berkeley.edu Jitendra Malik UC Berkeley malik@berkeley.edu Abstract We present a learnt system for multi-view stereopsis. In contrast to recent learning based methods for 3D reconstruction, we leverage the underlying 3D geometry of the problem through feature projection and unprojection along viewing rays. By formulating these operations in a differentiable manner, we are able to learn the system end-to-end for the task of metric 3D reconstruction. End-to-end learning allows us to jointly reason about shape priors while conforming to geometric constraints, enabling reconstruction from much fewer images (even a single image) than required by classical approaches as well as completion of unseen surfaces. We thoroughly evaluate our approach on the ShapeNet dataset and demonstrate the benefits over classical approaches and recent learning based methods. 1 Introduction Multi-view stereopsis (MVS) is classically posed as the following problem - given a set of images with known camera poses, it produces a geometric representation of the underlying 3D world. This representation can be a set of disparity maps, a 3D volume in the form of voxel occupancies, signed distance fields etc. An early example of such a system is the stereo machine from Kanade et al. [26] that computes disparity maps from images streams from six video cameras. Modern approaches focus on acquiring the full 3D geometry in the form of volumetric representations or polygonal meshes [48]. The underlying principle behind MVS is simple - a 3D point looks locally similar when projected to different viewpoints [29]. Thus, classical methods use the basic principle of finding dense correspondences in images and triangulate to obtain a 3D reconstruction. The question we try to address in this work is can we learn a multi-view stereo system? For the binocular case, Becker and Hinton [1] demonstrated that a neural network can learn to predict a depth map from random dot stereograms. A recent work [28] shows convincing results for binocular stereo by using an end-to-end learning approach with binocular geometry constraints. In this work, we present Learnt Stereo Machines (LSM) - a system which is able to reconstruct object geometry as voxel occupancy grids or per-view depth maps from a small number of views, including just a single image. We design our system inspired by classical approaches while learning each component from data embedded in an end to end system. LSMs have built in projective geometry, enabling reasoning in metric 3D space and effectively exploiting the geometric structure of the MVS problem. Compared to classical approaches, which are designed to exploit a specific cue such as silhouettes or photo-consistency, our system learns to exploit the cues that are relevant to the particular instance while also using priors about shape to predict geometry for unseen regions. Recent work from Choy et al. [5] (3D-R2N2) trains convolutional neural networks (CNNs) to predict object geometry given only images. While this work relied primarily on semantic cues for reconstruction, our formulation enables us to exploit strong geometric cues. In our experiments, we demonstrate that a straightforward way of incorporating camera poses for volumetric occupancy prediction does not lead to expected gains, while our geometrically grounded method is able to effectively utilize the additional information. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Image Encoder 2D Feature Maps Unprojection 3D Feature Grids Recurrent Fusion Fused Feature Grid 3D Grid Reasoning Projection Final Grid Voxel Occupancy Grid Depth Maps Figure 1: Overview of a Learnt Stereo Machine (LSM). It takes as input one or more views and camera poses. The images are processed through a feature encoder which are then unprojected into the 3D world frame using a differentiable unprojection operation. These grids {Gf i }n i=1 are then matched in a recurrent manner to produce a fused grid Gp which is then transformed by a 3D CNN into Go. LSMs can produce two kinds of outputs - voxel occupancy grids (Voxel LSM) decoded from Go or per-view depth maps (Depth LSM) decoded after a projection operation. Classical multi-view stereopsis is traditionally able to handle both objects and scenes - we only showcase our system for the case of objects with scenes left for future work. We thoroughly evaluate our system on the synthetic ShapeNet [3] dataset. We compare to classical plane sweeping stereo, visual hulls and several challenging learning-based baselines. Our experiments show that we are able to reconstruct objects with fewer images than classical approaches. Compared to recent learning based reconstruction approaches, our system is able to better use camera pose information leading to significantly large improvements while adding more views. Finally, we show successful generalization to unseen object categories demonstrating that our network goes beyond semantic cues and strongly uses geometric information for unified single and multi-view 3D reconstruction. 2 Related Work Extracting 3D information from images is one of the classical problems in computer vision. Early works focused on the problem of extracting a disparity map from a binocular image pair [36]. We refer the reader to [47] for an overview of classical binocular stereo matching algorithms. In the multiview setting, early work focused on using silhouette information via visual hulls [32], incorporating photo-consistency to deal with concavities (photo hull) [29], and shape refinement using optimization [55, 50, 7, 15]. [39, 35, 54] directly reason about viewing rays in a voxel grid, while [34] recovers a quasi dense point cloud. In our work, we aim to learn a multi-view stereo machine grounded in geometry, that learns to use these classical constraints while also being able to reason about semantic shape cues from the data. Another approach to MVS involves representing the reconstruction as a collection of depth maps [6, 57, 41, 13, 40]. This allows recovery of fine details for which a consistent global estimate may be hard to obtain. These depth maps can then be fused using a variety of different techniques [38, 8, 33, 59, 30]. Our learnt system is able to produce a set of per-view depth maps along with a globally consistent volumetric representation which allows us to preserve fine details while conforming to global structure. Learning has been used for multi-view reconstruction in the form of shape priors for objects [2, 9, 58, 20, 27, 52], or semantic class specific surface priors for scenes [22, 17, 45]. These works use learnt shape models and either directly fit them to input images or utilize them in a joint representation that fuses semantic and geometric information. Most recently, CNN based learning methods have been proposed for 3D reconstruction by learning image patch similarity functions [60, 18, 23] and end-to-end disparity regression from stereo pairs [37, 28]. Approaches which predict shape from a single image have been proposed in form of direct depth map regression [46, 31, 10], generating multiple depth maps from novel viewpoints [51], producing voxel occupancies [5, 16], geometry images [49] and point clouds [11]. [12] study a related problem of view interpolation, where a rough depth estimate is obtained within the system. A line of recent works, complementary to ours, has proposed to incorporate ideas from multi-view geometry in a learning framework to train single view prediction systems [14, 56, 53, 42, 61] using multiple views as supervisory signal. These works use the classical cues of photo-consistency and 2 Depth planes 1-D Canvas 1-D Projections Camera Sampling locations 1-D Feature Map (a) Projection (b) Unprojection Camera 2-D Feature Grid 2-D World Grid z = 1 z = 2 z = 3 z = 1 z = 2 z = 3 Figure 2: Illustrations of projection and unprojection operations between 1D maps and 2D grids. (a) The projection operation samples values along the ray at equally spaced z-values into a 1D canvas/image. The sampled features (shown by colors here) at the z planes are stacked into channels to form the projected feature map. (b) The unprojection operation takes features from a feature map (here in 1-D) and places them along rays at grid blocks where the respective rays intersect. Best viewed in color. silhouette consistency only during training - their goal during inference is to only perform single image shape prediction. In contrast, we also use geometric constraints during inference to produce high quality outputs. Closest to our work is the work of Kendall et al. [28] which demonstrates incorporating binocular stereo geometry into deep networks by formulating a cost volume in terms of disparities and regressing depth values using a differentiable arg-min operation. We generalize to multiple views by tracing rays through a discretized grid and handle variable number of views via incremental matching using recurrent units. We also propose a differentiable projection operation which aggregates features along viewing rays and learns a nonlinear combination function instead of using the differentiable arg-min which is susceptible to multiple modes. Moreover, we can also infer 3D from a single image during inference. 3 Learnt Stereo Machines Our goal in this paper is to design an end-to-end learnable system that produces a 3D reconstruction given one or more input images and their corresponding camera poses. To this end, we draw inspiration from classical geometric approaches where the underlying guiding principle is the following - the reconstructed 3D surface has to be photo-consistent with all the input images that depict this particular surface. Such approaches typically operate by first computing dense features for correspondence matching in image space. These features are then assembled into a large cost volume of geometrically feasible matches based on the camera pose. Finally, the optimum of this matching volume (along with certain priors) results in an estimate of the 3D volume/surface/disparity maps of the underlying shape from which the images were produced. Our proposed system, shown in Figure 1, largely follows the principles mentioned above. It uses a discrete grid as internal representation of the 3D world and operates in metric 3D space. The input images {Ii}n i=1 are first processed through a shared image encoder which produces dense feature maps {Fi}n i=1, one for each image. The features are then unprojected into 3D feature grids {Gf i }n i=1 by rasterizing the viewing rays with the known camera poses {Pi}n i=1. This unprojection operation aligns the features along epipolar lines, enabling efficient local matching. This matching is modelled using a recurrent neural network which processes the unprojected grids sequentially to produce a grid of local matching costs Gp. This cost volume is typically noisy and is smoothed in an energy optimization framework with a data term and smoothness term. We model this step by a feed forward 3D convolution-deconvolution CNN that transforms Gp into a 3D grid Go of smoothed costs taking context into account. Based on the desired output, we propose to either let the final grid be a volumetric occupancy map or a grid of features which is projected back into 2D feature 3 maps {Oi}n i=1 using the given camera poses. These 2D maps are then mapped to a view specific representation of the shape such as a per view depth/disparity map. The key components of our system are the differentiable projection and unprojection operations which allow us to learn the system end-to-end while injecting the underlying 3D geometry in a metrically accurate manner. We refer to our system as a Learnt Stereo Machine (LSM). We present two variants - one that produces per voxel occupancy maps (Voxel LSM) and another that outputs a depth map per input image (Depth LSM) and provide details about the components and the rationale behind them below. 2D Image Encoder. The first step in a stereo algorithm is to compute a good set of features to match across images. Traditional stereo algorithms typically use raw patches as features. We model this as a feed forward CNN with a convolution-deconvolution architecture with skip connections (UNet) [44] to enable the features to have a large enough receptive field while at the same time having access to lower level features (using skip connections) whenever needed. Given images {Ii}n i=1, the feature encoder produces dense feature maps {Fi}n i=1 in 2D image space, which are passed to the unprojection module along with the camera parameters to be lifted into metric 3D space. Differentiable Unprojection. The goal of the unprojection operation is to lift information from 2D image frame to the 3D world frame. Given a 2D point p, its feature representation F(p) and our global 3D grid representation, we replicate F(p) along the viewing ray for p into locations along the viewing ray in the metric 3D grid (a 2D illustration is presented in Figure 2). In the case of perspective projection specified by an intrinsic camera matrix K and an extrinsic camera matrix [R|t], the unprojection operation uses this camera pose to trace viewing rays in the world and copy the image features into voxels in this 3D world grid. Instead of analytically tracing rays, given the centers of blocks in our 3D grid {Xk w}NV k=1, we compute the feature for kth block by projecting {Xk w} using the camera projection equations p′ k = K[R|t]Xk w into the image space. p′ k is a continuous quantity whereas F is defined on at discrete 2D locations. Thus, we use the differentiable bilinear sampling operation to sample from the discrete grid [25] to obtain the feature at Xk w. Such an operation has the highly desirable property that features from pixels in multiple images that may correspond to the same 3D world point unproject to the same location in the 3D grid trivially enforcing epipolar constraints. As a result, any further processing on these unprojected grids has easy access to corresponding features to make matching decisions foregoing the need for long range image connections for feature matching in image space. Also, by projecting discrete 3D points into 2D and bilinearly sampling from the feature map rather than analytically tracing rays in 3D, we implicitly handle the issue where the probability of a grid voxel being hit by a ray decreases with distance from the camera due to their projective nature. In our formulation, every voxel gets a “soft" feature assigned based on where it projects back in the image, making the feature grids Gf smooth and providing stable gradients. This geometric procedure of lifting features from 2D maps into 3D space is in contrast with recent learning based approaches [5, 51] which either reshape flattened feature maps into 3D grids for subsequent processing or inject pose into the system using fully connected layers. This procedure effectively saves the network from having to implicitly learn projective geometry and directly bakes this given fact into the system. In LSMs, we use this operation to unproject the feature maps {Fi}n i=1 in image space produced by the feature encoder into feature grids {Gf i }n i=1 that lie in metric 3D space. For single image prediction, LSMs cannot match features from multiple images to reason about where to place surfaces. Therefore, we append geometric features along the rays during the projection and unprojection operation to facilitate single view prediction. Specifically, we add the depth value and the ray direction at each sampling point. Recurrent Grid Fusion. The 3D feature grids {Gf i }n i=1 encode information about individual input images and need to be fused to produce a single grid so that further stages may reason jointly over all the images. For example, a simple strategy to fuse them would be to just use a point-wise function e.g. max or average. This approach poses an issue where the combination is too spatially local and early fuses all the information from the individual grids. Another extreme is concatenating all the feature grids before further processing. The complexity of this approach scales linearly with the number of inputs and poses issues while processing a variable number of images. Instead, we choose to processed the grids in a sequential manner using a recurrent neural network. Specifically, we use a 3D convolutional variant of the Gated Recurrent Unit (GRU) [24, 4, 5] which combines the grids 4 {Gf i }n i=1 using 3D convolutions (and non-linearities) into a single grid Gp. Using convolutions helps us effectively exploit neighborhood information in 3D space for incrementally combining the grids while keeping the number of parameters low. Intuitively, this step can be thought of as mimicking incremental matching in MVS where the hidden state of the GRU stores a running belief about the matching scores by matching features in the observations it has seen. One issue that arises is that we now have to define an ordering on the input images, whereas the output should be independent of the image ordering. We tackle this issue by randomly permuting the image sequences during training while constraining the output to be the same. During inference, we empirically observe that the final output has very little variance with respect to ordering of the input image sequence. 3D Grid Reasoning. Once the fused grid Gp is constructed, a classical multi-view stereo approach would directly evaluate the photo-consistency at the grid locations by comparing the appearance of the individual views and extract the surface at voxels where the images agree. We model this step with a 3D UNet that transforms the fused grid Gp into Go. The purpose of this network is to use shape cues present in Gp such as feature matches and silhouettes as well as build in shape priors like smoothness and symmetries and knowledge about object classes enabling it to produce complete shapes even when only partial information is visible. The UNet architecture yet again allows the system to use large enough receptive fields for doing multi-scale matching while also using lower level information directly when needed to produce its final estimate Go. In the case of full 3D supervision (Voxel LSM), this grid can be made to represent a per voxel occupancy map. Go can also be seen as a feature grid containing the final representation of the 3D world our system produces from which views can be rendered using the projection operation described below. Differentiable Projection. Given a 3D feature grid G and a camera P, the projection operation produces a 2D feature map O by gathering information along viewing rays. The direct method would be to trace rays for every pixel and accumulate information from all the voxels on the ray’s path. Such an implementation would require handling the fact that different rays can pass through different number of voxels on their way. For example, one can define a reduction function along the rays to aggregate information (e.g. max, mean) but this would fail to capture spatial relationships between the ray features. Instead, we choose to adopt a plane sweeping approach where we sample from locations on depth planes at equally spaced z-values {zk}Nz k=1 along the ray. Consider a 3D point Xw that lies along the ray corresponding to a 2D point p in the projected feature grid at depth zw - i.e. p = K[R|t]Xw and z(Xw) = zw. The corresponding feature O(p) is computed by sampling from the grid G at the (continuous) location Xw. This sampling can be done differentiably in 3D using trilinear interpolation. In practice, we use nearest neighbor interpolation in 3D for computational efficiency. Samples along each ray are concatenated in ascending z-order to produce the 2D map O where the features are stacked along the channel dimension. Rays in this feature grid can be trivially traversed by just following columns along the channel dimension allowing us to learn the function to pool along these rays by using 1x1 convolutions on these feature maps and progressively reducing the number of feature channels. Architecture Details. As mentioned above, we present two versions of LSMs - Voxel LSM (VLSM) and Depth LSM (D-LSM). Given one or more images and cameras, Voxel LSM (V-LSM) produces a voxel occupancy grid whereas D-LSM produces a depth map per input view. Both systems share the same set of CNN architectures (UNet) for the image encoder, grid reasoning and the recurrent pooling steps. We use instance normalization for all our convolution operations and layer normalization for the 3D convolutional GRU. In V-LSM, the final grid Go is transformed into a probabilistic voxel occupancy map V ∈Rvh×vw×vd by a 3D convolution followed by softmax operation. We use simple binary cross entropy loss between ground truth occupancy maps and V. In D-LSM, Go is first projected into 2D feature maps {Oi}n i=1 which are then transformed into metric depth maps {di}n i=1 by 1x1 convolutions to learn the reduction function along rays followed by deconvolution layers to upsample the feature map back to the size of the input image. We use absolute L1 error in depth to train D-LSM. We also add skip connections between early layers of the image encoder and the last deconvolution layers producing depth maps giving it access to high frequency information in the images. 5 Figure 3: Voxel grids produced by V-LSM for example image sequences alongside a learning based baseline which uses pose information in a fully connected manner. V-LSM produces geometrically meaningful reconstructions (e.g. the curved arm rests instead of perpendicular ones (in R2N2) in the chair on the top left and the siren lights on top of the police car) instead of relying on purely semantic cues. More visualizations in supplementary material. 4 Experiments In this section, we demonstrate the ability of LSMs to learn 3D shape reconstruction in a geometrically accurate manner. First, we present quantitative results for V-LSMs on the ShapeNet dataset [3] and compare it to various baselines, both classical and learning based. We then show that LSMs generalize to unseen object categories validating our hypothesis that LSMs go beyond object/class specific priors and use photo-consistency cues to perform category-agnostic reconstruction. Finally, we present qualitative and quantitative results from D-LSM and compare it to traditional multi-view stereo approaches. Dataset and Metrics. We use the synthetic ShapeNet dataset [3] to generate posed image-sets, ground truth 3D occupancy maps and depth maps for all our experiments. More specifically, we use a subset of 13 major categories (same as [5]) containing around 44k 3D models resized to lie within the unit cube centered at the origin with a train/val/test split of [0.7, 0.1, 0.2]. We generated a large set of realistic renderings for the models sampled from a viewing sphere with θaz ∈[0, 360) and θel ∈[−20, 30] degrees and random lighting variations. We also rendered the depth images corresponding to each rendered image. For the volumetric ground truth, we voxelize each of the models at a resolution of 32 × 32 × 32. In order to evaluate the outputs of V-LSM, we binarize the probabilities at a fixed threshold (0.4 for all methods except visual hull (0.75)) and use the voxel intersection over union (IoU) as the similarity measure. To aggregate the per model IoU, we compute a per class average and take the mean as a per dataset measure. All our models are trained in a class agnostic manner. Implementation. We use 224 × 224 images to train LSMs with a shape batch size of 4 and 4 views per shape. Our world grid is at a resolution of 323. We implemented our networks in Tensorflow and trained both the variants of LSMs for 100k iterations using Adam. The projection and unprojection operations are trivially implemented on the GPU with batched matrix multiplications and bilinear/nearest sampling enabling inference at around 30 models/sec on a GTX 1080Ti. We unroll the GRU for upto 4 time steps while training and apply the trained models for arbitrary number of views at test time. Multi-view Reconstruction on ShapeNet. We evaluate V-LSMs on the ShapeNet test set and compare it to the following baselines - a visual hull baseline which uses silhouettes to carve out volumes, 3D-R2N2 [5], a previously proposed system which doesn’t use camera pose and performs multi-view reconstruction, 3D-R2N2 w/pose which is an extension of 3D-R2N2 where camera pose is injected using fully connected layers. For the experiments, we implemented the 3D-R2N2 system 6 # Views 1 2 3 4 3D-R2N2 [5] 55.6 59.6 61.3 62.0 Visual Hull 18.0 36.9 47.0 52.4 3D-R2N2 w/pose 55.1 59.4 61.2 62.1 V-LSM 61.5 72.1 76.2 78.2 V-LSM w/bg 60.5 69.8 73.7 75.6 Table 1: Mean Voxel IoU on the ShapeNet test set. Note that the original 3D-R2N2 system does not use camera pose whereas the 3D-R2N2 w/pose system is trained with pose information. V-LSM w/bg refers to voxel LSM trained and tested with random images as backgrounds instead of white backgrounds only. 1 2 3 4 5 6 7 8 Number of Views 5 10 15 20 25 Gap in Performance 3D-R2N2 w/pose V-LSM Figure 4: Generalization performance for V-LSM and 3D-R2N2 w/pose measured by gap in voxel IoU when tested on unseen object categories. Figure 5: Qualitative results for per-view depth map prediction on ShapeNet. We show the depth maps predicted by Depth-LSM (visualized with shading from a shifted viewpoint) and the point cloud obtained by unprojecting them into world coordinates. (and the 3D-R2N2 w/pose) and trained it on our generated data (images and voxel grids). Due to the difference in training data/splits and the implementation, the numbers are not directly comparable to the ones reported in [5] but we observe similar performance trends. For the 3D-R2N2 w/pose system, we use the camera pose quaternion as the pose representation and process it through 2 fully connected layers before concatenating it with the feature passed into the LSTM. Table 1 reports the mean voxel IoU (across 13 categories) for sequences of {1, 2, 3, 4} views. The accuracy increases with number of views for all methods but it can be seen that the jump is much less for the R2N2 methods indicating that it already produces a good enough estimate at the beginning but fails to effectively use multiple views to improve its reconstruction significantly. The R2N2 system with naively integrated pose fails to improve over the base version, completely ignoring it in favor of just image-based information. On the other hand, our system, designed specifically to exploit these geometric multi-view cues improves significantly with more views. Figure 3 shows some example reconstructions for V-LSM and 3D-R2N2 w/pose. Our system progressively improves based on the viewpoint it receives while the R2N2 w/pose system makes very confident predictions early on (sometimes “retrieving" a completely different instance) and then stops improving as much. As we use a geometric approach, we end up memorizing less and reconstruct when possible. More detailed results can be found in the supplementary material. Generalization. In order to test how well LSMs learn to generalize to unseen data, we split our data into 2 parts with disjoint sets of classes - split 1 has data from 6 classes while split 2 has data from the other 7. We train three V-LSMs - trained on split 1 (V-LSM-S1), on split 2 (V-LSM-S2) and both splits combined (V-LSM-All). The quantity we are interested in is the change in performance when we test the system on a category it hasn’t seen during training. We use the difference in test IoU of a category C between V-LSM-All and V-LSM-S1 if C is not in split 1 and vice versa. Figure 4 shows the mean of this quantity across all classes as the number of views change. It can be seen that for a single view, the difference in performance is fairly high and as we see more views, the difference 7 in performance decreases - indicating that our system has learned to exploit category agnostic shape cues. On the other hand, the 3D-R2N2 w/pose system fails to generalize with more views. Note that the V-LSMs have been trained with a time horizon of 4 but are evaluated till upto 8 steps here. Views:1 Views:2 Views:3 Views:4 45 50 55 60 65 70 75 80 Mean Voxel IoU Accurate Pose Noise:0 Noise:10 Noise:20 Noisy Pose Noise:0 Noise:10 Noise:20 Noisy Pose Noise:0 Noise:10 Noise:20 Figure 6: Sensitivity to noise in camera pose estimates for V-LSM for systems trained with and without pose perturbation. Sensitivity to noisy camera pose and masks. We conducted experiments to quantify the effects of noisy camera pose and segmentations on performance for V-LSMs. We evaluated models trained with perfect poses on data with perturbed camera extrinsics and observed that performance degrades (as expected) yet still remains better than the baseline (at 10◦noise). We also trained new models with synthetically perturbed extrinsics and achieve significantly higher robustness to noisy poses while maintaining competitive performance (Figure 6). This is illustrated in Figure 6. The perturbation is introduced by generating a random rotation matrix which rotates the viewing axis by a max angular magnitude θ while still pointing at the object of interest. We also trained LSMs on images with random images backgrounds (V-LSM w/bg in Table 1) rather than only white backgrounds and saw a very small drop in performance. This shows that our method learns to match features rather than relying heavily on perfect segmentations. Multi-view Depth Map Prediction. We show qualitative results from Depth LSM in Figure 5. We manage to obtain thin structures in challenging examples (chairs/tables) while predicting consistent geometry for all the views. We note that the skip connections from the image to last layers for D-LSM do help in directly using low level image features while producing depth maps. The depth maps are viewed with shading in order to point out that we produce metrically accurate geometry. The unprojected point clouds also align well with each other showing the merits of jointly predicting the depth maps from a global volume rather than processing them independently. Comparision to Plane Sweeping. We qualitatively compare D-LSM to the popular plane sweeping (PS) approach [6, 57] for stereo matching. Figure 7 shows the unprojected point clouds from per view depths maps produced using PS and D-LSM using 5 and 10 images. We omit an evaluation with less images as plane sweeping completely fails with fewer images. We use the publicly available implementation for the PS algorithm [19] and use 5x5 zero mean normalized cross correlation as matching windows with 300 depth planes. We can see that our approach is able to produce much cleaner point clouds with less input images. It is robust to texture-less areas where traditional stereo algorithms fail (e.g. the car windows) by using shape priors to reason about them. We also conducted a quantitative comparison using PS and D-LSM with 10 views (D-LSM was trained using only four images). The evaluation region is limited to a depth range of ± √ 3/2 (maximally possible depth range) around the origin as the original models lie in a unit cube centered at the origin. Furthermore, pixels where PS is not able to provide a depth estimate are not taken into account. Note that all these choices disadvantage our method. We compute the per depth map error as the median absolute depth difference for the valid pixels, aggregate to a per category mean error and report the average of the per category means for PS as 0.051 and D-LSM as 0.024. Please refer to the supplementary material for detailed results. 5 Discussion We have presented Learnt Stereo Machines (LSM) - an end-to-end learnt system that performs multi-view stereopsis. The key insight of our system is to use ideas from projective geometry to differentiably transfer features between 2D images and the 3D world and vice-versa. In our experiments we showed the benefits of our formulation over direct methods - we are able to generalize to new object categories and produce compelling reconstructions with fewer images than classical 8 (a) PS 5 Images (b) LSM 5 Images (c) PS 10 Images (d) LSM 10 Images (e) PS 20 Images Figure 7: Comparison between Depth-LSM and plane sweeping stereo (PS) with varying numbers of images. systems. However, our system also has some limitations. We discuss some below and describe how they lead to future work. A limiting factor in our current system is the coarse resolution (323) of the world grid. Classical algorithms typically work on much higher resolutions frequently employing special data structures such as octrees. We can borrow ideas from recent works [43, 21] which show that CNNs can predict such high resolution volumes. We also plan to apply LSMs to more general geometry than objects, eventually leading to a system which can reconstruct single/multiple objects and entire scenes. The main challenge in this setup is to find the right global grid representation. In scenes for example, a grid in terms of a per-view camera frustum might be more appropriate than a global aligned euclidean grid. In our experiments we evaluated classical multi-view 3D reconstruction where the goal is to produce 3D geometry from images with known poses. However, our system is more general and the projection modules can be used wherever one needs to move between 2D image and 3D world frames. Instead of predicting just depth maps from our final world representation, one can also predict other view specific representations such as silhouettes or pixel wise part segmentation labels etc. We can also project the final world representation into views that we haven’t observed as inputs (we would omit the skip connections from the image encoder to make the projection unconditional). This can be used to perform view synthesis grounded in 3D. Acknowledgments This work was supported in part by NSF Award IIS- 1212798 and ONR MURI-N00014-10-1-0933. Christian Häne is supported by an “Early Postdoc.Mobility” fellowship No. 165245 from the Swiss National Science Foundation. The authors would like to thank David Fouhey, Saurabh Gupta and Shubham Tulsiani for valuable discussions and Fyusion Inc. for providing GPU hours for the work. References [1] S. Becker and G. E. Hinton. Self-organizing neural network that discovers surfaces in random-dot stereograms. Nature, 1992. [2] V. Blanz and T. Vetter. A morphable model for the synthesis of 3d faces. In Conference on Computer Graphics and Interactive Techniques, 1999. [3] A. X. Chang, T. Funkhouser, L. Guibas, P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, H. Su, J. Xiao, L. Yi, and F. Yu. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. [4] K. Cho, B. van Merrienboer, C. Gulcehre, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In Conference on Empirical Methods in Natural Language Processing (EMNLP 2014), 2014. [5] C. B. Choy, D. Xu, J. Gwak, K. Chen, and S. Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In European Conference on Computer Vision (ECCV), 2016. [6] R. T. Collins. A space-sweep approach to true multi-image matching. In Conference on Computer Vision and Pattern Recognition (CVPR), 1996. 9 [7] D. Cremers and K. Kolev. Multiview stereo and silhouette consistency via convex functionals over convex domains. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 33(6):1161–1174, 2011. [8] B. Curless and M. Levoy. A volumetric method for building complex models from range images. In Conference on Computer Graphics and Interactive Techniques, 1996. [9] A. Dame, V. A. Prisacariu, C. Y. Ren, and I. Reid. Dense reconstruction using 3d object shape priors. In Conference on Computer Vision and Pattern Recognition (CVPR), 2013. [10] D. Eigen, C. Puhrsch, and R. Fergus. Depth map prediction from a single image using a multi-scale deep network. In Neural Information Processing Systems (NIPS), 2014. [11] H. Fan, H. Su, and L. Guibas. A point set generation network for 3d object reconstruction from a single image. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. [12] J. Flynn, I. Neulander, J. Philbin, and N. Snavely. Deepstereo: Learning to predict new views from the world’s imagery. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [13] Y. Furukawa and J. Ponce. Accurate, dense, and robust multi-view stereopsis. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2010. [14] R. Garg, G. Carneiro, and I. Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In European Conference on Computer Vision (ECCV), 2016. [15] P. Gargallo, E. Prados, and P. Sturm. Minimizing the reprojection error in surface reconstruction from images. In International Conference on Computer Vision (ICCV), pages 1–8, 2007. [16] R. Girdhar, D. F. Fouhey, M. Rodriguez, and A. Gupta. Learning a predictable and generative vector representation for objects. In European Conference on Computer Vision (ECCV), 2016. [17] C. Haene, C. Zach, A. Cohen, and M. Pollefeys. Dense semantic 3d reconstruction. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2016. [18] X. Han, T. Leung, Y. Jia, R. Sukthankar, and A. C. Berg. Matchnet: Unifying feature and metric learning for patch-based matching. In Conference on Computer Vision and Pattern Recognition (CVPR), 2015. [19] C. Häne, L. Heng, G. H. Lee, A. Sizov, and M. Pollefeys. Real-time direct dense matching on fisheye images using plane-sweeping stereo. In International Conference on 3D Vision (3DV), 2014. [20] C. Häne, N. Savinov, and M. Pollefeys. Class specific 3d object shape priors using surface normals. In Conference on Computer Vision and Pattern Recognition (CVPR), 2014. [21] C. Häne, S. Tulsiani, and J. Malik. Hierarchical surface prediction for 3d object reconstruction. In International Conference on 3D Vision (3DV), 2017. [22] C. Häne, C. Zach, A. Cohen, R. Angst, and M. Pollefeys. Joint 3d scene reconstruction and class segmentation. In Conference on Computer Vision and Pattern Recognition (CVPR), 2013. [23] W. Hartmann, S. Galliani, M. Havlena, K. Schindler, and L. V. Gool. Learned multi-patch similarity. In International Conference on Computer Vision, (ICCV), 2017. [24] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 1997. [25] M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu. Spatial transformer networks. In Neural Information Processing Systems (NIPS), 2015. [26] T. Kanade, H. Kano, S. Kimura, A. Yoshida, and K. Oda. Development of a video-rate stereo machine. In International Conference on Intelligent Robots and Systems (IROS), 1995. [27] A. Kar, S. Tulsiani, J. Carreira, and J. Malik. Category-specific object reconstruction from a single image. In Conference on Computer Vision and Pattern Recognition (CVPR), 2015. [28] A. Kendall, H. Martirosyan, S. Dasgupta, P. Henry, R. Kennedy, A. Bachrach, and A. Bry. End-to-end learning of geometry and context for deep stereo regression. In International Conference on Computer Vision (ICCV), 2017. [29] K. N. Kutulakos and S. M. Seitz. A theory of shape by space carving. International Journal of Computer Vision (IJCV), 38(3):199–218, 2000. 10 [30] P. Labatut, J.-P. Pons, and R. Keriven. Efficient multi-view reconstruction of large-scale scenes using interest points, delaunay triangulation and graph cuts. In International Conference on Computer Vision, (ICCV), 2007. [31] L. Ladicky, J. Shi, and M. Pollefeys. Pulling things out of perspective. In Conference on Computer Vision and Pattern Recognition (CVPR), 2014. [32] A. Laurentini. The visual hull concept for silhouette-based image understanding. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 16(2):150–162, 1994. [33] V. Lempitsky and Y. Boykov. Global optimization for shape fitting. In Conference on Computer Vision and Pattern Recognition, (CVPR), 2007. [34] M. Lhuillier and L. Quan. A quasi-dense approach to surface reconstruction from uncalibrated images. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2005. [35] S. Liu and D. B. Cooper. Statistical inverse ray tracing for image-based 3d modeling. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 36(10):2074–2088, 2014. [36] D. Marr and T. Poggio. Cooperative computation of stereo disparity. In From the Retina to the Neocortex, pages 239–243. 1976. [37] N. Mayer, E. Ilg, P. Hausser, P. Fischer, D. Cremers, A. Dosovitskiy, and T. Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [38] P. Merrell, A. Akbarzadeh, L. Wang, P. Mordohai, J.-M. Frahm, R. Yang, D. Nistér, and M. Pollefeys. Real-time visibility-based fusion of depth maps. In International Conference on Computer Vision (ICCV), 2007. [39] T. Pollard and J. L. Mundy. Change detection in a 3-d world. In Conference on Computer Vision and Pattern Recognition (CVPR), 2007. [40] M. Pollefeys, D. Nistér, J.-M. Frahm, A. Akbarzadeh, P. Mordohai, B. Clipp, C. Engels, D. Gallup, S.-J. Kim, P. Merrell, C. Salmi, S. Sinha, B. Talton, L. Wang, Q. Yang, H. Stewenius, R. Yang, G. Welch, and H. Towles. Detailed real-time urban 3d reconstruction from video. International Journal of Computer Vision (IJCV), 78(2):143–167, 2008. [41] M. Pollefeys, L. Van Gool, M. Vergauwen, F. Verbiest, K. Cornelis, J. Tops, and R. Koch. Visual modeling with a hand-held camera. International Journal of Computer Vision (IJCV), 59(3):207–232, 2004. [42] D. J. Rezende, S. A. Eslami, S. Mohamed, P. Battaglia, M. Jaderberg, and N. Heess. Unsupervised learning of 3d structure from images. In Neural Information Processing Systems (NIPS), 2016. [43] G. Riegler, A. O. Ulusoy, H. Bischof, and A. Geiger. Octnetfusion: Learning depth fusion from data. In International Conference on 3D Vision (3DV), 2017. [44] O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), 2015. [45] N. Savinov, C. Häne, L. Ladicky, and M. Pollefeys. Semantic 3d reconstruction with continuous regularization and ray potentials using a visibility consistency constraint. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [46] A. Saxena, J. Schulte, and A. Y. Ng. Depth estimation using monocular and stereo cues. In Neural Information Processing Systems (NIPS), 2005. [47] D. Scharstein and R. Szeliski. A taxonomy and evaluation of dense two-frame stereo correspondence algorithms. International Journal of Computer Vision (IJCV), 47(1-3):7–42, 2002. [48] S. M. Seitz, B. Curless, J. Diebel, D. Scharstein, and R. Szeliski. A comparison and evaluation of multiview stereo reconstruction algorithms. In Conference on Computer Vision and Pattern Recognition (CVPR), 2006. [49] A. Sinha, J. Bai, and K. Ramani. Deep learning 3d shape surfaces using geometry images. In European Conference on Computer Vision (ECCV), 2016. [50] S. N. Sinha, P. Mordohai, and M. Pollefeys. Multi-view stereo via graph cuts on the dual of an adaptive tetrahedral mesh. In International Conference on Computer Vision (ICCV), 2007. 11 [51] M. Tatarchenko, A. Dosovitskiy, and T. Brox. Multi-view 3d models from single images with a convolutional network. In European Conference on Computer Vision (ECCV), 2016. [52] S. Tulsiani, A. Kar, J. Carreira, and J. Malik. Learning category-specific deformable 3d models for object reconstruction. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2016. [53] S. Tulsiani, T. Zhou, A. A. Efros, and J. Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. [54] A. O. Ulusoy, A. Geiger, and M. J. Black. Towards probabilistic volumetric reconstruction using ray potentials. In International Conference on 3D Vision (3DV), 2015. [55] G. Vogiatzis, P. H. Torr, and R. Cipolla. Multi-view stereo via volumetric graph-cuts. In Conference on Computer Vision and Pattern Recognition (CVPR), 2005. [56] X. Yan, J. Yang, E. Yumer, Y. Guo, and H. Lee. Perspective transformer nets: Learning single-view 3d object reconstruction without 3d supervision. In Neural Information Processing Systems (NIPS), 2016. [57] R. Yang, G. Welch, and G. Bishop. Real-time consensus-based scene reconstruction using commodity graphics hardware. In Computer Graphics Forum, 2003. [58] S. Yingze Bao, M. Chandraker, Y. Lin, and S. Savarese. Dense object reconstruction with semantic priors. In Conference on Computer Vision and Pattern Recognition (CVPR), 2013. [59] C. Zach, T. Pock, and H. Bischof. A globally optimal algorithm for robust tv-l 1 range image integration. In International Conference on Computer Vision, (ICCV), 2007. [60] J. Zbontar and Y. LeCun. Stereo matching by training a convolutional neural network to compare image patches. Journal of Machine Learning Research (JMLR), 17(1-32):2, 2016. [61] T. Zhou, M. Brown, N. Snavely, and D. G. Lowe. Unsupervised learning of depth and ego-motion from video. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 12 | 2017 | 410 |
6,909 | On Blackbox Backpropagation and Jacobian Sensing Krzysztof Choromanski Google Brain New York, NY 10011 kchoro@google.com Vikas Sindhwani Google Brain New York, NY 10011 sindhwani@google.com Abstract From a small number of calls to a given “blackbox" on random input perturbations, we show how to efficiently recover its unknown Jacobian, or estimate the left action of its Jacobian on a given vector. Our methods are based on a novel combination of compressed sensing and graph coloring techniques, and provably exploit structural prior knowledge about the Jacobian such as sparsity and symmetry while being noise robust. We demonstrate efficient backpropagation through noisy blackbox layers in a deep neural net, improved data-efficiency in the task of linearizing the dynamics of a rigid body system, and the generic ability to handle a rich class of input-output dependency structures in Jacobian estimation problems. 1 Introduction Automatic Differentiation (AD) [1, 17] techniques are at the heart of several “end-to-end" machine learning frameworks such as TensorFlow [5] and Torch [2]. Such frameworks are organized around a library of primitive operators which are differentiable vector-valued functions of data inputs and model parameters. A composition of these primitives defines a computation graph - a directed acyclic graph whose nodes are operators and whose edges represent dataflows, typically culminating in the evaluation of a scalar-valued loss function. For reverse mode automatic differentiation (backpropagation) to work, each operator needs to be paired with a gradient routine which maps gradients of the loss function with respect to the outputs of the operator, to gradients with respect to its inputs. In this paper, we are concerned with extending the automatic differentiation paradigm to computation graphs where some nodes are "blackboxes" [12], that is, opaque pieces of code implemented outside the AD framework providing access to an operator only via expensive and potentially noisy function evaluation, with no associated gradient routine available. A useful mental model of this setting is shown below where f3 is a blackbox. f1 x1 x0 f3 x3 f4 x4 f2 x2 Blackboxes, of course, are pervasive - as legacy or proprietary codes or executables, numerical optimization routines, physics engines (e.g, Bullet [3] and MujoCo [4]), or even wrappers interfacing with a mechanical system as is typically the case in reinforcement learning, robotics and process control applications. The unknown Jacobian of a blackbox is the central object of study in this paper. Recall that the Jacobian ∇f(x0) of a differentiable vector-valued map f : Rn 7→Rm at an input x0 ∈Rn is the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. m × n matrix of partial derivatives, defined by, [∇f(x0)]ij = ∂fi ∂xj (x0) The rows of the Jacobian are gradient vectors of the m component functions f = (f1 . . . fm) and the columns are indexed by the n-dimensional inputs x = (x1 . . . xn). Through Taylor approximation, the Jacobian characterizes the rate of change in f at a step ϵ (0 < ϵ ≪1) along any direction d ∈Rn in the neighborhood of x0 as follows, ∇f(x0)d ≈1 ϵ [f(x0 + ϵd) −f(x0)] . (1) Viewed as a linear operator over perturbation directions d ∈Rn, differences of the form 1 ϵ [f(x + ϵd) −f(x)] may be interpreted as noisy measurements (“sensing" [10, 11, 13]) of the Jacobian based on function evaluation. The measurement error grows with the step size ϵ and the degree of nonlineary in f in the vicinity of x0. Additional measurement noise may well be introduced by unknown error-inducing elements inside the blackbox. From as few perturbations and measurements as possible, we are concerned with approximately recovering either the full Jacobian, or approximating the action of the transpose of the Jacobian on a given vector in the context of enabling backpropagation through blackbox nodes. To elaborate on the latter setting, let y = f(x) represent forward evaluation of an operator, and let p = ∂l ∂y be the gradient of a loss function l(·) flowing in from the “top" during the reverse sweep. We are interested in approximating ∂l ∂x = [∇f(x)]T p, i.e. the action of the transpose of the Jacobian on p. Note that due to linearity of the derivative, this is the same as estimating the gradient of the scalar-valued function g(x) = pT f(x) based on scalar measurements of the form 1 ϵ (g(x + ϵd) −g(x)), which is a special case of the tools developed in this paper. The more general problem of full Jacobian estimation arises in many derivative-free optimization settings [12, 8]. Problems in optimal control and reinforcement learning [18, 21, 20] are prominent examples, where the dynamics of a nonlinear system (e.g., a robot agent) needs to be linearized along a trajectory of states and control inputs reducing the problem to a sequence of time-varying Linear Quadratic Regulator (LQR) subproblems [21]. The blackbox in this case is either a physics simulator or actual hardware. The choice of perturbation directions and the collection of measurements then becomes intimately tied to the agent’s strategy for exploration and experience gathering. Finite differencing, where the perturbation directions d are the n standard basis vectors, is a default approach for Jacobian estimation. However, it requires n function evaluations which may be prohibitively expensive for large n. Another natural approach, when the number of measurements, say k, is smaller than n, is to estimate the Jacobian via linear regression, argmin J∈Rm×n k X i=1 ∥Jdi −1 ϵ f(x0 + ϵdi) −f(x0) ∥2 2 + λ∥J∥2 F , where an l2 regularizer is added to handle the underdetermined setting and ∥· ∥F stands for the Frobenius norm. This approach assumes that the error distribution is Gaussian and in its basic form, does not exploit additional Jacobian structure, e.g., symmetry and sparsity, to improve data efficiency. For example, if backpropagation needs to be enabled for a noiseless blackbox with identical input-output dimensions whose unknown Jacobian happens to be symmetric, then just one function evaluation suffices since ∇f(x0)T p = ∇f(x0)p ≈1 ϵ (f(x0 + ϵp) −f(x0)). Figure 1 shows the histogram of the Jacobian of the dynamics of a Humanoid walker with respect to its 18-dimensional state variables and 6 dimensional control inputs. It can be seen that the Jacobian is well approximated by a sparse matrix. In a complex dynamical system comprising of many subsystems, most state or control variables only have local influence on the instantaneous evolution of the overall state. Figure 1 also shows the example of a manipulator; the Jacobian of a 5 planar link system has sparse and symmetric blocks (highlighted by blue and red bounding boxes) as a consequence of the form of the equations of motion of a kinematic tree of rigid bodies. Clearly, one can hope that incorporating this kind of prior knowledge in the Jacobian estimation process will improve data efficiency in “model-free" trajectory optimization applications. Technical Preview, Contributions and Outline: We highlight the following contributions: 2 Figure 1: Structured Jacobians in Continuous Control Problems • In §2: We start by asking how many blackbox calls are required to estimate a sparse Jacobian with known sparsity pattern. We recall results from automatic differentiation [14, 17, 23] literature that relates this problem to graph coloring [19, 26] where the chromatic number of a certain graph that encodes input-output dependencies dictates the sample complexity. We believe that this connection is not particularly well known in the deep learning community, though coloring approaches only apply to noiseless structure-aware cases. • In §3: We present a Jacobian recovery algorithm, rainbow, that uses a novel probabilistic graph coloring subroutine to reduce the effective number of variables, leading to a compressed convex optimization problem whose solution yields an approximate Jacobian. The approximation bJ of the true Jacobian J is such that ∥bJ −J∥F ≤E(n), where the measurement error vector η ∈Rm satisfies: ∥η∥∞= o(E(n)). Our algorithm requires only O(min(A, B)) calls to the blackbox, where A = dint log2( √mn E(n) ), B = mρ(J, Gweak int ) log2( √ mρ(J,Gweak int ) E(n) ), dint is a measure of intrinsic dimensionality of a convex set C ∋J encoding prior knowledge about the Jacobian (elaborated below) and ρ(J, Gweak int ) ≤n is a parameter encoding combinatorial properties possibly known in advance (encoded by the introduced later the so-called weak-intersection graph Gweak int ) of the sparsity pattern in the Jacobian (see: §3.4.1 for an explicit definition); we will refer to ρ(J, Gweak int ) as the chromatic character of J. • We demonstrate our tools with the following experiments: (1) Training a convolutional neural network in the presence of a blackbox node, (2) Estimating structured Jacobians from few calls to a blackbox with different kinds of local and global dependency structures between inputs and outputs, and (3) Estimating structured Jacobians of the dynamics of a 50-link manipulator, with a small number of measurements while exploiting sparsity and partial symmetry via priors in lp regression. The convex set C mentioned above can be defined in many different ways depending on prior knowledge about the Jacobian (e.g., lower and upper bounds on certain entries, sparsity with unknown pattern, symmetric block structure, etc). As we show in the experimental section, our approach can be applied also for non-smooth problems where Jacobian is not well-defined. Note that in this setting one can think about a nonsmooth function as a noisy version of its smooth approximation and a Jacobian of a function smoothing (such as Gaussian smoothing) is a subject of interest. Notation: D = [d1 . . . dk] ∈Rn×k will denote the matrix of perturbation directions, with the corresponding measurement matrix R = [r1 . . . rk] ∈Rm×k where ri = 1 ϵ [f(x + ϵdi) −f(x)]. 2 The Link between Jacobian Estimation and Graph Coloring Suppose the Jacobian is known to be a diagonal matrix. Then finite differencing where perturbation directions are the n standard basis elements is utterly wasteful; it is easy to see that a single perturbation direction d = [1, 1 . . . 1]T suffices in identifying all diagonal elements. The goal of this section is to explain the connection between Jacobian recovery and graph coloring problems that substantially generalizes this observation. First we introduce graph theory terminology. The undirected graph is denoted as G(V, E), where V and E stand for the sets of vertices and edges respectively. For v, w ∈V we say that v is adjacent to w if there is an edge between v and w. The degree deg(v) of v ∈V is the number of vertices adjacent to it. The maximum degree in G(V, E) will be denoted as ∆(G). A stable set in G is the 3 a f d h b g c e Figure 2: On the left: Sparse Jacobian for a function f(a, b, c, d, e, f, g, h) with n = m = 8, where blue entries indicate nonzero values. In the middle: coloring of columns. A fixed color corresponds to a stable set in Gint. On the right: corresponding intersection graph Gint. subset S ⊆V , where no two vertices are adjacent. The chromatic number χ(G) of G is the minimum number of sets in the partitioning of V into stable sets. Equivalently, it is the smallest number of colors used in a valid vertex-coloring of the graph, where a valid coloring is one in which adjacent vertices are assigned different colors. Denote by Jx = [J1, ..., Jn] ∈Rm×n a Jacobian matrix evaluated at point x ∈Rn, where Ji ∈Rm denotes the i-th column. Assume that Jis are not known, but the sparsity structure, i.e. the location of zero entries in J is given. Let Ai = {k : Ji k ̸= 0} ⊆{0, ..., m −1} be the indices of the non-zero elements of Ji. The intersection graph, denoted by Gint, is a graph whose vertex set is V = {x1 . . . xn} and xi is adjacent to xj if the sets Ai and Aj intersect. In other words, there exists an output of the blackbox that depends both on xi and xj (see Figure 2 for an illustration). Now suppose k colors are used in a valid coloring of Gint. The key fact that relates the Jacobian recovery problem to graph coloring is the following observation. If one constructs vectors di ∈Rn for i = 1, ..., k in such a way that di j = 1 if xj is colored by the ith color and is 0 otherwise, then k computations of the finite difference f(x+ϵdi)−f(x) ϵ for 0 < ϵ ≪1 and i = 1, ..., k suffice to accurately approximate the Jacobian matrix (assuming no blackbox noise). The immediate corollary is the following lemma. Lemma 2.1 ([14]). The number of calls k to a blackbox vector-valued function f needed to compute an approximate Jacobian via finite difference technique in the noiseless setting satisfies k ≤χ(Gint), where Gint is the corresponding intersection graph. Thus, blackboxes whose unknown Jacobian happens to be associated with intersection graphs of low chromatic number admit accurate Jacobian estimation with few function calls. Rich classes of graphs have low chromatic number. If the maximum degree ∆(Gint) of Gint is small then χ(Gint) is also small, because of the well known fact that χ(Gint) ≤∆(Gint) + 1. For instance if every input xi influences at most k outputs fj and every output fj depends on at most l variables xi, then one can notice that ∆(Gint) ≤kl and thus χ(Gint) ≤kl + 1. When the maximum degree is small, an efficient coloring can be easily found by the greedy procedure that colors vertices one by one and assigns to the newly seen vertex the smallest color that has not been used to color all its already seen neighbors ([14]). This procedure cannot be applied if there exist vertices of high degree. That is the case for instance if there exist few global variables influence a large number of outputs fi. In the subsequent sections we will present an algorithm that does not need to rely on the small value of ∆(Gint). Graph coloring for Jacobian estimation has two disadvantages even if we assume that good quality coloring of the intersection graph can be found efficiently (optimal graph coloring is in general NP hard). It assumes that the sparsity structure of the Jacobian, i.e. the set of entries that are zero is given, and that all the measurements are accurate, i.e. there is no noise. We relax these limitations next. 3 Sensing and Recovery of Structured Jacobians Our algorithm receives as input two potential sources of prior knowledge about the blackbox: • sparsity pattern of the Jacobian in the form of a supergraph of the true intersection graph, which we call the weak intersection graph denoted as Gweak int . The knowledge of the sparsity pattern may be imprecise in the sense that we can overestimate the set of outputs an input can influence. Note that any stable set of Gweak int is a stable set in Gint and thus we have: χ(Gint) ≤χ(Gweak int ). A complete 4 weak intersection graph corresponds to the setting where no prior knowledge about the sparsity pattern is available while Gweak int = Gint reflects the setting with exact knowledge. • a convex set C encoding additional information about the local and global behavior of the blackbox. For example, if output components fi are Lipschitz continuous with the Lipschitz constant Li: the magnitude of the Jacobian entries can be bounded row-wise with Li, i = 1 . . . m. The Jacobian may additionally have sparse blocks, which may be expressed as a bound on the elementwise l1 norm over the entries of the block; it may also have symmetric and/or low-rank blocks [6] (the latter may be expressed as a bound on the nuclear norm of the block). A measure of the effective degrees of freedom due to such constraints directly shows up in our theoretical results on Jacobian recovery (§3.4). Direct domain knowledge, or a few expensive finite-difference calls may be used in the first few iterations to collect input-independent structural information about the Jacobian, e.g., to observe the typical degree of sparsity, whether a symmetry or sparsity pattern holds across iterations etc. Our algorithm, called rainbow, consists of three steps: • Color: Efficient coloring of Gweak int for reducing the dimensionality of the problem, where each variable in the compressed problem corresponds to a subset of variables in the original problem. This phases explores strictly combinatorial structural properties of J (§3.1). • Optimize: Solving a compressed convex optimization problem to minimize (or find a feasible) lp reconstruction. This phase can utilize additional structural knowledge via the convex set C ((§3.3)) defined earlier. • Reconstruct: Mapping the auxiliary variables from the solution to the above convex problem back to the original variables to reconstruct J. Next we discuss all these steps. 3.1 Combinatorial Variable Compression via Graph Coloring: GreedyColoring Consider the following coloring algorithm for reducing the effective number of input variables. Order the vertices x1, ..., xn of Gweak int randomly. Initialize the list of stable sets I covering {x1, ..., xn} as I = ∅. Process vertices one after another and add a vertex xi to the first set from I that does not contain vertices adjacent to xi. If no such a set exists, add the singleton set {xi} to I. After processing all the vertices, each stable set from I gets assigned a different color. We denote by color(i) the color assigned to vertex xi and by l the total number of colors. To boost the probability of finding a good coloring, one can repeat the procedure above for a few random permutations and choose the one that corresponds to the smallest l. 3.2 Choice of Perturbation Directions Each di ∈Rn is obtained from the randomly chosen vector di core ∈Rl, that we call the core vector. Entries of all core vectors are taken independently from the same distribution φ which is: Gaussian, Poissonian or bounded and of nonzero variance (for the sake of readability, technical conditions and extensions to this family of distributions is relegated to the Appendix). Directions may even be chosen from columns of structured matrices, i.e., Circulant and Toeplitz [7, 24, 22, 16]. Each di is defined as follows: di(j) = di core(color(j)). 3.3 Recovery via Compressed Convex Optimization Linear Programming: Assume that the lp-norm of the noise vector η ∈Rm is bounded by ϵ = E(n), where E(·) encodes non-decreasing dependence on n. With the matrix of perturbation vectors D ∈Rn×k and a matrix of the corresponding core vectors Dcore ∈Rl×k in hand, we are looking for the solution X ∈Rm×l to the following problem: ∥(XDcore −R)i∥p ≤ϵ, i = 1 . . . k (2) where subscript i runs over columns, R ∈Rm×k is the measurement matrix for the matrix of perturbations D. For p ∈{1, ∞}, this task can be cast as a Linear Programming (LP) problem. Note that the smaller the number of colors, l, the smaller the size of the LP. If C is a polytope, it can be included as additional linear constraints in the LP. After solving for X, we construct the Jacobian approximation bJ as follows: bJu,j = Xu,color(j), where color(j) is defined above. 5 We want to emphasize that a Linear Programming approach is just one instantiation of a more general method we present here. Below we show another one based on ADMM for structured l2 regression. ADMM Solvers for multiple structures: When the Jacobian is known to have multiple structures, e.g., it is sparse and has symmetric blocks, it is natural to solve structured l2 regression problems of the form, argmin X∈Rm×l∈S k X i=1 ∥(XDcore −R)i∥2 2 + λ∥X∥1, where the convex constraint set S is the set of all matrices conforming to a symmetry pattern on selected square blocks; an example is the Jacobian of the dynamics of a 5-link manipulator as shown in Figure 1. A consensus ADMM [9] solver can easily be implemented for such problems involving multiple structural priors and constraints admitting cheap proximal and projection operators. For the specific case of the above problem, it runs the following iterations: • Solve for X1: XT 1 = [DcoreDT core + ρI]−1 DRT + ρ(XT −UT 1 ) • X2 = symmetrize[X −U2, S] • X = soft-threshold[ 1 2(X1 + X2 + U1 + U2), λρ−1] • Ui = Ui + Xi −X, i = 1, 2 where X1, X2 are primal variables with associated dual variables U1, U2, ρ is the ADMM step size parameter, and X is the global consensus variable. The symmetrize(X, S) routine implements exact projection onto symmetry constraints - it takes a square block ˆX of X specified by the constraint set S and symmetrizes it simply as 1 2[ ˆX+ ˆXT ] keeping other elements of X intact. The softthresholding operator is defined by soft-threshold(X, λ) = max(X−λ, 0)−max(−X−λ, 0). Note that for the first step [DcoreDT core +ρI] can be factorized upfront, even across multiple Jacobian estimation problems since it is input-independent. Also, notice that if the perturbation directions are structured, e.g., drawn from a Circulant or Toeplitz matrix, then the cost of this linear solve can be further reduced using specialized solvers [15]. As before, after solving for X, we construct the Jacobian approximation bJ as follows: bJu,j = Xu,color(j). 3.4 Theoretical Guarantees 3.4.1 Chromatic property of a graph The probabilistic graph coloring algorithm GreedyColoring generates a coloring, where the number of colors is close to the chromatic property Λ(Gweak int ) of the graph Gweak int (see: proof of Lemma 3.1 in the Appendix). The chromatic property Λ(G) of a graph G is defined recursively as follows. • Λ(G∅) = 0, where G∅is an empty graph (V = ∅), • for G ̸= G∅, we have: Λ(G) = 1 + maxS⊆V Λ(G\S) where max is taken over all subsets satisfying: |S| = |V | −⌈P v∈V 1 1+deg(v)⌉and G\S stands for the graph obtained from G be deleting vertices from S. Note that we are not aware of any closed-form expression for Λ(G). We observe that there exists a subtle connection between the chromatic property of the graph Λ(G) and its chromatic number. Lemma 3.1. The following is true for every graph G: χ(G) ≤Λ(G). The importance of the chromatic property lies in the fact that in practice for many graphs G (especially sparse, but not necessarily of small maximum degree ∆(G)) the chromatic property is close to the chromatic number. Thus, in practice, GreedyColoring finds a good quality coloring for a large class of weak-intersection graphs Gweak int , efficiently utilizing partial knowledge about the sparsity structure. The chromatic character of the Jacobian is defined as the chromatic property of its weak-intersection graph Λ(Gweak int ) and thus does not depend only on the Jacobian J, but also on its “sparsity exposition" given by Gweak int and will be referred to as ρ(J, Gweak int ). 3.4.2 Accuracy of Jacobian Recovery with rainbow We need the following notion of intrinsic dimensionality in Rm×n as a metric space equipped with ∥· ∥F norm. 6 Definition 3.2 (intrinsic dimensionality). For any point X ∈Rm×n and any r > 0, let B(X, r) = {Y : ∥X −Y∥F ≤r} denote the closed ball of radius r centered at X. The intrinsic dimensionality of S ⊆Rm×n is the smallest integer d such that for any ball B(X, r) ⊆Rm×n, the set B(X, r) ∩S can be covered by 2d balls of radius r 2. We are ready to state our main theoretical result. Theorem 3.3. Consider the Jacobian matrix J ∈Rm×n. Assume that max |Ji,j| ≤C for some fixed C > 0 and J ∈C, where C ⊆Rm×n is a convex set defining certain structural properties of J (for instance C may be the set of matrices with block sparsity and symmetry patterns). Assume that the measurement error vector η ∈Rm satisfies: ∥η∥∞= o(E(n)) for some function E(n). Then the approximation bJ of J satisfying ∥bJ −J∥F ≤E(n) can be found with probability p = 1 − 1 spoly(n) by applying rainbow algorithm with k = O(min(A, B)) calls to the f function, where A = dint log2( C√mn E(n) ), B = mρ(J, Gweak int ) log2( C√ mρ(J,Gweak int ) E(n) ), dint stands for the intrinsic dimensionality of C and spoly(n) is a superpolynomial function of n. The proof is given in the Appendix. The result above is a characterization of the number of blackbox calls needed to recover the Jacobian, in terms of its intrinsic degrees of freedom, the dependency structure in the inputs and outputs and the noise introduced by higher order nonlinear terms and other sources of forward evaluation errors. 4 Experiments 4.1. Sparse Jacobian Recovery: We start with a controlled setting where we consider the vectorvalued function, f : Rn →Rm of the following form: f(x1, ..., xn) = ( X i∈S1 sin(xi), ..., X i∈Sm sin(xi)), (3) where sets Si for i = 1, ...., m are chosen according to one of the following models. In the p-model each entry i ∈{1, ..., n} is added to each Sj independently and with the same probability p. In the α-model entry i is added to each Sj independently at random with probability i−α. We consider a Jacobian at point x ∈Rn drawn from the standard multivariate Gaussian distribution with entries taken from N(0, 1). Both the models enable us to precisely control the sparsity of the corresponding Jacobian which has an explicit analytic form. Furthermore, the latter generates Jacobians where the degrees of the corresponding intersection graphs have power-law type distribution with few “hubs" very well connected to other nodes and many nodes of small degree. That corresponds to the setting, where there exist few global variables that impact many output fis, any many local variables that only influence a few outputs. We run the LP variant of rainbow for the above models and summarize the results in the table below. model m n sparsity χ/∆ σ k rel.error p = 0.1 30 60 0.91277 0.33 0.07 15 0.0632 p = 0.1 40 70 0.90142 0.35 0.07 20 0.0802 p = 0.1 50 80 0.90425 0.32 0.07 30 0.0751 p = 0.3 30 60 0.6866 0.6833 0.07 45 0.0993 p = 0.3 40 70 0.7096 0.6857 0.07 60 0.0589 p = 0.3 50 80 0.702 0.8625 0.07 70 0.1287 α = 0.5 30 60 0.7927 0.3833 0.1 45 0.0351 α = 0.5 40 70 0.78785 0.4285 0.1 60 0.0491 α = 0.5 50 80 0.79225 0.475 0.1 70 0.0443 α = 0.7 30 60 0.85166 0.2777 0.1 40 0.0393 α = 0.7 40 70 0.87357 0.2537 0.1 55 0.0398 α = 0.7 50 80 0.86975 0.275 0.1 65 0.0326 Above, we measure recovery error in terms of the relative Frobenius distance between estimated Jacobian and true Jacobian, rel.error = ∥bJ−J∥F ∥J∥F . The standard deviation of each entry of the measurement noise vector is given by σ. We report in particular the fraction of zero entries in J (sparsity), the ratio of the number of colors found by our GreedyColoring algorithm and the 7 maximum degree of the graph ( χ ∆). We see that the coloring algorithm finds good quality coloring even in the "power-law" type setting where maximum degree ∆(G) is large. The quality of the coloring in turn leads to the reduction in the number of measurement vectors needed (k) to obtain an accurate Jacobian approximation (i.e., relative error < 0.1). 4.2. Training Convolutional Neural Networks with Blackbox Nodes: We introduce a blackbox layer between the convolutional layers and the fully connected layers of a standard MNIST convnet. The blackbox node is a standard ReLU layer that takes as input 32-dimensional vectors, 32×32-sized weight matrix and a bias vector of length 32, and outputs a 32 dimensional representation. The minibatch size is 16. We inject truncated Gaussian noise in the output of the layer and override its default gradient operator in TensorFlow with our LP-based rainbow procedure. We use Gaussian perturbation directions and sample measurements by forward evaluation calls to the TensorFlow Op inside our custom blackbox gradient operator. In Fig. 3 we study the evolution of training and validation error across SGD iterations. We see in Fig. 3 that even though for low noise regime the standard linear regression and finite differencing methods work quite well, when noise magnitude increases our blackbox backpropagation procedure rainbow-LP shows superior robustness - retaining a capacity to learn while the other methods degrade in terms of validation error. The rightmost subfigure reports validation error for our method with different numbers of Jacobian measurements at a high noise level (in this case, the other methods fail to learn and are not plotted). (a) Standard deviation: 9e-5 (b) Standard deviation: 0.008 (c) Different numbers of measurement vectors (std : 0.1) Figure 3: TensorFlow CNN training with a "blackbox" layer with rainbow-LP method. On the left: Comparison of rainbow-LP with finite differencing and linear regression methods for low noise regime. In the middle: As before, but for more substantial noise magnitude. On the right: rainbow-LP for even larger noise magnitude (std : 0.1) and different number of measurement vectors used. In that setting other methods did not learn at all. 4.3. Jacobian of manipulator dynamics: We compute the true Jacobian of a planar rigid-body model with 50 links near an equilibrium point using MIT’s Drake planning and control toolbox [25]. The first link is unactuated; the remaining are all torque-actuated. The state vector comprises of 50 joint angles and associated joint velocities, and there are 49 control inputs to the actuators. The Jacobian has sparse and symmetric blocks similar to Figure 1. We compare linear regression with l2 regularization against the rainbow ADMM solver designed to exploit sparsity and symmetry, in the setting where the number of measurements is much smaller than the total number of input variables to the forward dynamics function (149). Results are shown in the adjacent Figure. The recovery is much more accurate in the presence of sparsity and symmetry priors. The results are similar if the matrix of perturbation directions are chosen from a Circulant matrix. 8 References [1] http://www.autodiff.org. [2] http://torch.ch. [3] http://www.bulletphysics.org. [4] http://www.mujoco.org. [5] M. Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. [6] H. S. Abdel-Khali, P. Hovland, A. Lyons, T. E. Stover, and J. Utke. A low rank approach to automatic differentiation. Advances in Automatic Differentiation, 2008. [7] W. U. Bajwa, J. D. Haupt, G. M. Raz, S. J. Wright, and R. D. Nowak. Toeplitz-structured compressed sensing matrices. IEEE/SP Workshop on Statistical Signal Processing, 2007. [8] A. S. Bandeira, K. Scheinberg, and L. N. Vicente. Computation of sparse low degree interpolating polynomials and their application to derivative-free optimization. Mathematical Programming, 134, 2012. [9] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 3, 2011. [10] E. Candes and M. B. Wakin. An introduction to compressive sampling. IEEE Signal Processing Magazine, 25, 2008. [11] E. J. Candès, J. K. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Communications on Pure and Applied Mathematics, 59, 2006. [12] A. R. Conn, K. Scheinberg, and L. N. Vicente. Derivative Free Optimization. MOS-SIAM Series on Optimization, 2009. [13] D. L. Donoho. Compressed sensing. IEEE Transactions on Information Theory, 52, 2006. [14] A. H. Gebremedhin, F. Manne, and A. Pothen. What color is your jacobian? graph coloring for computing derivatives. SIAM Review, 47(4):629–705, 2005. [15] G. Golub and C. F. V. Loan. Matrix Computations. Johns Hopkins University Press (4rth edition), 2012. [16] R. M. Gray. Toeplitz and circulant matrices: A review. Foundations and Trends in Communications and Information Theory, 2(3), 2006. [17] A. Griewank and A. Walther. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. SIAM, 2008. [18] D. H. Jacobson and D. Q. Mayne. Differential Dynamic Programming. Elsevier, 1970. [19] T. Jensen and B. Toft. Graph Coloring Problems. Wiley - Interscience, 1995. [20] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. JMLR, 17(39), 2016. [21] W. Li and E. Todorov. Iterative linear quadratic regulator design for nonlinear biological movement systems. International Conference on Informatics in Control, Automation and Robotics, 2004. [22] W. Lin, S. Morgan, J. Yang, and Y. Zhang. Practical compressive sensing with toeplitz and circulant matrices. Proceedings of SPIE, the International Society for Optical Engineering, 2010. [23] G. N. Newsam and J. D. Ramsdell. Estimation of sparse jacobian matrices. SIAM Journal of Algebraic Discrete Methods, 1983. [24] H. Rauhutk. Circulant and toeplitz matrices in compressed sensing. SPARS’09 - Signal Processing with Adaptive Sparse Structured Representations, 2010. [25] R. Tedrake and the Drake Development Team. Drake: A planning, control, and analysis toolbox for nonlinear dynamical systems, 2016. [26] B. Toft. Coloring, stable sets and perfect graphs. Handbook of Combinatorics, 1996. 9 | 2017 | 411 |
6,910 | Learning Disentangled Representations with Semi-Supervised Deep Generative Models N. Siddharth† University of Oxford nsid@robots.ox.ac.uk Brooks Paige† Alan Turing Institute University of Cambridge bpaige@turing.ac.uk Jan-Willem van de Meent† Northeastern University j.vandemeent@northeastern.edu Alban Desmaison University of Oxford alban@robots.ox.ac.uk Noah D. Goodman Stanford University ngoodman@stanford.edu Pushmeet Kohli ∗ Deepmind pushmeet@google.com Frank Wood University of Oxford fwood@robots.ox.ac.uk Philip H.S. Torr University of Oxford philip.torr@eng.ox.ac.uk Abstract Variational autoencoders (VAEs) learn representations of data by jointly training a probabilistic encoder and decoder network. Typically these models encode all features of the data into a single variable. Here we are interested in learning disentangled representations that encode distinct aspects of the data into separate variables. We propose to learn such representations using model architectures that generalise from standard VAEs, employing a general graphical model structure in the encoder and decoder. This allows us to train partially-specified models that make relatively strong assumptions about a subset of interpretable variables and rely on the flexibility of neural networks to learn representations for the remaining variables. We further define a general objective for semi-supervised learning in this model class, which can be approximated using an importance sampling procedure. We evaluate our framework’s ability to learn disentangled representations, both by qualitative exploration of its generative capacity, and quantitative evaluation of its discriminative ability on a variety of models and datasets. 1 Introduction Learning representations from data is one of the fundamental challenges in machine learning and artificial intelligence. Characteristics of learned representations can depend on their intended use. For the purposes of solving a single task, the primary characteristic required is suitability for that task. However, learning separate representations for each and every such task involves a large amount of wasteful repetitive effort. A representation that has some factorisable structure, and consistent semantics associated to different parts, is more likely to generalise to a new task. Probabilistic generative models provide a general framework for learning representations: a model is specified by a joint probability distribution both over the data and over latent random variables, and a representation can be found by considering the posterior on latent variables given specific data. The learned representation — that is, inferred values of latent variables — depends then not just on the data, but also on the generative model in its choice of latent variables and the relationships between the latent variables and the data. There are two extremes of approaches to constructing generative models. At one end are fully-specified probabilistic graphical models [19, 22], in which a practitioner decides on all latent variables present in the joint distribution, the relationships between them, and the functional form of the conditional distributions which define the model. At the other end are ∗Author was at Microsoft Research during this project. † indicates equal contribution. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. deep generative models [8, 17, 20, 21], which impose very few assumptions on the structure of the model, instead employing neural networks as flexible function approximators that can be used to train a conditional distribution on the data, rather than specify it by hand. The tradeoffs are clear. In an explicitly constructed graphical model, the structure and form of the joint distribution ensures that latent variables will have particular semantics, yielding a disentangled representation. Unfortunately, defining a good probabilistic model is hard: in complex perceptual domains such as vision, extensive feature engineering (e.g. Berant et al. [1], Siddharth et al. [31]) may be necessary to define a suitable likelihood function. Deep generative models completely sidestep the difficulties of feature engineering. Although they address learning representations which then enable them to better reconstruct data, the representations themselves do not always exhibit consistent meaning along axes of variation: they produce entangled representations. While such approaches have considerable merit, particularly when faced with the absence of any side information about data, there are often situations when aspects of variation in data can be, or are desired to be characterised. Bridging this gap is challenging. One way to enforce a disentangled representation is to hold different axes of variation fixed during training [21]. Johnson et al. [14] combine a neural net likelihood with a conjugate exponential family model for the latent variables. In this class of models, efficient marginalisation over the latent variables can be performed by learning a projection onto the same conjugate exponential family in the encoder. Here we propose a more general class of partiallyspecified graphical models: probabilistic graphical models in which the modeller only needs specify the exact relationship for some subset of the random variables in the model. Factors left undefined in the model definition are then learned, parametrised by flexible neural networks. This provides the ability to situate oneself at a particular point on a spectrum, by specifying precisely those axes of variations (and their dependencies) we have information about or would like to extract, and learning disentangled representations for them, while leaving the rest to be learned in an entangled manner. A subclass of partially-specified models that is particularly common is that where we can obtain supervision data for some subset of the variables. In practice, there is often variation in the data which is (at least conceptually) easy to explain, and therefore annotate, whereas other variation is less clear. For example, consider the MNIST dataset of handwritten digits: the images vary both in terms of content (which digit is present), and style (how the digit is written), as is visible in the right-hand side of Fig. 1. Having an explicit “digit” latent variable captures a meaningful and consistent axis of variation, independent of style; using a partially-specified graphical model means we can define a “digit” variable even while leaving unspecified the semantics of the different styles, and the process of rendering a digit to an image. With unsupervised learning there is no guarantee that inference on a model with 10 classes will induce factored latent representations with factors corresponding to the the 10 digits. However, given a small amount of labelled examples, this task becomes significantly easier. Fundamentally, our approach conforms to the idea that well-defined notions of disentanglement require specification of a task under which to measure it [4]. For example, when considering images of people’s faces, we might wish to capture the person’s identity in one context, and the lighting conditions on the faces in another, facial features in another, or combinations of these in yet other contexts. Partially-specified models and weak supervision can be seen as a way to operationalise this task-dependence directly into the learning objective. In this paper we introduce a recipe for learning and inference in partially-specified models, a flexible framework that learns disentangled representations of data by using graphical model structures to encode constraints to interpret the data. We present this framework in the context of variational autoencoders (VAEs), developing a generalised formulation of semi-supervised learning with DGMs that enables our framework to automatically employ the correct factorisation of the objective for any given choice of model and set of latents taken to be observed. In this respect our work extends previous efforts to introduce supervision into variational autoencoders [18, 24, 32]. We introduce a variational objective which is applicable to a more general class of models, allowing us to consider graphical-model structures with arbitrary dependencies between latents, continuous-domain latents, and those with dynamically changing dependencies. We provide a characterisation of how to compile partially-supervised generative models into stochastic computation graphs, suitable for end-to-end training. This approach allows us also amortise inference [7, 23, 29, 34], simultaneously learning a network that performs approximate inference over representations at the same time we learn the unknown factors of the model itself. We demonstrate the efficacy of our framework on a variety of tasks, involving classification, regression, and predictive synthesis, including its ability to encode latents of variable dimensionality. 2 z (handwriting style) y (digit label) Disentangled Representation Stochastic Computation Graph for VAE ε z p η θ z p η θ (a) (b) (c) (d) Figure 2: (a) Visual analogies for the MNIST data, with inferred style latent variable fixed and the label varied. (b) Exploration in “style” space for a 2D latent gaussian random variable. Visual analogies for the SVHN data when (c) fully supervised, and (d) partially supervised with just 100 labels/digit. To train deep generative models in a semi-supervised manner, we need to incorporate labelled data 126 into the variational bound. In a fully unsupervised setting, the contribution of a particular data 127 point xi to the ELBO can be expressed, with minor adjustments of Equation (1), whose Monte-Carlo 128 approximation samples latents z and y from the recognition distribution qφ ! z, y | xi" . 129 L ! ✓, φ; xi" = Eqφ(z,y|xi) " log p✓ ! xi | z, y " p(z, y) qφ(z, y | xi) # . (2) By contrast, in the fully supervised setting the values y are treated as observed and become fixed 130 inputs into the computation graph, instead of being sampled from qφ. When the label y is observed 131 along with the data, for fixed (xi, yi) pairs, the lower bound on the conditional log-marginal likelihood 132 log p✓(x | y) is 133 Lx|y ! ✓, φz; xi, yi" = Eqφz (z|xi,yi) " log p✓ ! xi | z, yi" p ! z | yi" qφz(z | xi, yi) # . (3) This quantity can be optimized directly to learn model parameters ✓and φz simultaneously via SGD. 134 However, it does not contain the encoder parameters φy. This difficulty was also encountered in a 135 related context by Kingma et al. [17]. Their solution was to augment the loss function by including 136 an explicit additional term for learning a classifier directly on the supervised points. 137 Here we propose an alternative approach. We extend the model with an auxiliary variable ˜y with 138 likelihood p(˜y | y) = δ˜y(y) to define densities 139 p(˜y, y, z, x) = p(˜y | y)p✓(x | y, z)p(y, z) q(˜y, y, z | x) = p(˜y | y)q(y, z | x). When we marginalize the ELBO for this model over ˜y, we recover the expression in Equation (2). 140 Treating ˜y = yi as observed results in the supervised objective 141 L ! ✓, φ; xi"%% ˜y=yi = Eqφ(z,y|xi) " δyi(y) log p✓ ! xi | z, y " p(z, y) qφ(z, y | xi) # . (4) Integration over an observed y is then replaced with evaluation of the ELBO and the density qφy at 142 yi. A Monte Carlo estimator of Equation (4) can be constructed automatically for any factorization 143 of qφ by sampling latent variables z and weighting the resulting ELBO estimate by the conditional 144 density terms qφy (y|·). 145 Note that the exact functional form of the Monte Carlo estimator will vary depending on the 146 dependency structure of qφ ! z, y | xi" . For example, for discrete y, choosing qφ(z, y | x) = 147 qφz(z | y, x)qφy (y | x), decomposes the problem into simultaneously learning a classifier 148 qφy (y | x) alongside the generative model parameters ✓and encoder qφz(z|x, y) which is condi149 tioned on the selected class. The computation graph for a model with this factorization is shown in Fig150 ure 1. In it, the value y of the distribution qφy (· | x) is observed, while the distribution qφz(· | x, y) 151 4 p λ y η ε z p λ q η φ φ x (data) y (partial labels) p η θ q Recognition Model z x y Generative Model z x ε y x Figure 1: Semi-supervised learning in structured variational autoencoders, illustrated on MNIST digits. Top-Left: Generative model. Bottom-Left: Recognition model. Middle: Stochastic computation graph, showing expansion of each node to its corresponding sub-graph. Generative-model dependencies are shown in blue and recognition-model dependencies are shown in orange. See Section 2.2 for a detailed explanation. Right: learned representation. 2 Framework and Formulation VAEs [17, 28] are a class of deep generative models that simultaneously train both a probabilistic encoder and decoder for a elements of a data set D = {x1, . . . xN}. The central analogy is that an encoding z can be considered a latent variable, casting the decoder as a conditional probability density pθ(x|z). The parameters ηθ(z) of this distribution are the output of a deterministic neural network with parameters θ (most commonly MLPs or CNNs) which takes z as input. By placing a weak prior over z, the decoder defines a posterior and joint distribution pθ(z | x) ∝pθ(x | z)p(z). xn zn θ φ N Inference in VAEs can be performed using a variational method that approximates the posterior distribution pθ(z | x) using an encoder qφ(z | x), whose parameters λφ(x) are the output of a network (with parameters φ) that is referred to as an “inference network” or a “recognition network”. The generative and inference networks, denoted by solid and dashed lines respectively in the graphical model, are trained jointly by performing stochastic gradient ascent on the evidence lower bound (ELBO) L(φ, θ; D) ≤log pθ(D), L(φ, θ; D) = N X n=1 L(φ, θ; xn) = N X n=1 Eqφ(z|xn)[log pθ(xn | z) + log p(z) −log qφ(z|xn)]. (1) Typically, the first term Eqφ(z|xn)[log pθ(xn | z)] is approximated by a Monte Carlo estimate and the remaining two terms are expressed as a divergence −KL(qφ(z|xn)∥p(z)), which can be computed analytically when the encoder model and prior are Gaussian. In this paper, we will consider models in which both the generative model pθ(x, y, z) and the approximate posterior qφ(y, z | x) can have arbitrary conditional dependency structures involving random variables defined over a number of different distribution types. We are interested in defining VAE architectures in which a subset of variables y are interpretable. For these variables, we assume that supervision labels are available for some fraction of the data. The VAE will additionally retain some set of variables z for which inference is performed in a fully unsupervised manner. This is in keeping with our central goal of defining and learning in partially-specified models. In the running example for MNIST, y corresponds to the classification label, whereas z captures all other implicit features, such as the pen type and handwriting style. This class of models is more general than the models in the work by Kingma et al. [18], who consider three model designs with a specific conditional dependence structure. We also do not require p(y, z) to be a conjugate exponential family model, as in the work by Johnson et al. [15]. To perform semi-supervised learning in this class of models, we need to i) define an objective that is suitable to general dependency graphs, and ii) define a method for constructing a stochastic computation graph [30] that incorporates both the conditional dependence structure in the generative model and that of the recognition model into this objective. 3 2.1 Objective Function xn yn zn φ θ xm ym zm N M Previous work on semi-supervised learning for deep generative models [18] defines an objective over N unsupervised data points D = {x1, . . . , xN} and M supervised data points Dsup = {(x1, y1), . . . , (xM, yM)}, L(θ, φ; D, Dsup) = N X n=1 L(θ, φ; xn) + γ M X m=1 Lsup(θ, φ; xm, ym). (2) Our model’s joint distribution factorises into unsupervised and supervised collections of terms over D and Dsup as shown in the graphical model. The standard variational bound on the joint evidence of all observed data (including supervision) also factorises as shown in Eq. (2). As the factor corresponding to the unsupervised part of the graphical model is exactly that as Eq. (1), we focus on the supervised term in Eq. (2), expanded below, incorporating an additional weighted component as in Kingma et al. [18]. Lsup(θ, φ; xm, ym) = Eqφ(z|xm,ym) log pθ(xm, ym, z) qφ(z | xm, ym) + α log qφ(ym | xm). (3) Note that the formulation in Eq. (2) introduces an constant γ that controls the relative strength of the supervised term. While the joint distribution in our model implicitly weights the two terms, in situations where the relative sizes of D and Dsup are vastly different, having control over the relative weights of the terms can help ameliorate such discrepancies. This definition in Eq. (3) implicitly assumes that we can evaluate the conditional probability qφ(z|x, y) and the marginal qφ(y|x) = R dz qφ(y, z|x). This was indeed the case for the models considered by Kingma et al. [18], which have a factorisation qφ(y, z|x) = qφ(z|x, y)qφ(y|x). Here we will derive an estimator for Lsup that generalises to models in which qφ(y, z | x) can have an arbitrary conditional dependence structure. For purposes of exposition, we will for the moment consider the case where qφ(y, z | x) = qφ(y | x, z)qφ(z | x). For this factorisation, generating samples zm,s ∼qφ(z | xm, ym) requires inference, which means we can no longer compute a simple Monte Carlo estimator by sampling from the unconditioned distribution qφ(z | xm). Moreover, we also cannot evaluate the density qφ(z | xm, ym). In order to address these difficulties, we re-express the supervised terms in the objective as Lsup(θ, φ; xm, ym) = Eqφ(z|xm,ym) log p(xm, ym, z) qφ(ym, z | xm) + (1 + α) log qφ(ym | xm), (4) which removes the need to evaluate qφ(z | xm, ym). We can then use (self-normalised) importance sampling to approximate the expectation. To do so, we sample proposals zm,s ∼qφ(z | xm) from the unconditioned encoder distribution, and define the estimator Eqφ(z|xm,ym) log pθ(xm, ym, z) qφ(ym, z | xm) ≃1 S S X s=1 wm,s Zm log pθ(xm, ym, zm,s) qφ(ym, zm,s | xm), (5) where the unnormalised importance weights wm,s and normaliser Zm are defined as wm,s := qφ(ym, zm,s | xm) qφ(zm,s | xm) , Zm = 1 S S X s=1 wm,s. (6) To approximate log qφ(ym | xm), we use a Monte Carlo estimator of the lower bound that is normally used in maximum likelihood estimation, log qφ(ym | xm) ≥Eqφ(z|xm) log qφ(ym, z | xm) qφ(z | xm) ≃1 S S X s=1 log wm,s, (7) using the same samples zm,s and weights wm,s as in Eq. (5). When we combine the terms in Eqs. (5) and (7), we obtain the estimator ˆLsup(θ, φ; xm, ym) := 1 S S X s=1 wm,s Zm log pθ(xm, ym, zm,s) qφ(ym, zm,s | xm) + (1 + α) log wm,s. (8) 4 We note that this estimator applies to any conditional dependence structure. Suppose that we were to define an encoder qφ(z2, y1, z1 | x) with factorisation qφ(z2 | y1, z1, x)qφ(y1 | z1, x)qφ(z1 | x). If we propose z2 ∼qφ(z2 | y1, z1, x) and z1 ∼qφ(z1 | x), then the importance weights wm,s for the estimator in Eq. (8) are defined as wm,s := qφ(zm,s 2 , ym 1 , zm,s 1 | xm) qφ(zm,s 2 | ym 1 , zm,s 1 , xm)qφ(zm,s 1 | xm) = qφ(ym 1 | zm,s 1 , xm). In general, the importance weights are simply the product of conditional probabilities of the supervised variables y in the model. Note that this also applies to the models in Kingma et al. [18], whose objective we can recover by taking the weights to be constants wm,s = qφ(ym | xm). We can also define an objective analogous to the one used in importance-weighted autoencoders [2], in which we compute the logarithm of a Monte Carlo estimate, rather than the Monte Carlo estimate of a logarithm. This objective takes the form ˆLsup,iw(θ, φ; xm, ym) := log " 1 S S X s=1 pθ(xm, ym, zm,s) qφ(zm,s | xm) # + α log " 1 S S X s=1 wm,s # , (9) which can be derived by moving the sums in Eq. (8) into the logarithms and applying the substitution wm,s/qφ(ym, zm,s | xm) = 1/qφ(zm,s | xm). 2.2 Construction of the Stochastic Computation Graph To perform gradient ascent on the objective in Eq. (8), we map the graphical models for pθ(x, y, z) and qφ(y, z|x) onto a stochastic computation graph in which each stochastic node forms a sub-graph. Figure 1 shows this expansion for the simple VAE for MNIST digits from [17]. In this model, y is a discrete variable that represents the underlying digit, our latent variable of interest, for which we have partial supervision data. An unobserved Gaussian-distributed variable z captures the remainder of the latent information. This includes features such as the hand-writing style and stroke thickness. In the generative model (Fig. 1 top-left), we assume a factorisation pθ(x, y, z) = pθ(x | y, z)p(y)p(z) in which y and z are independent under the prior. In the recognition model (Fig. 1 bottom-left), we use a conditional dependency structure qφ(y, z | x) = qφz (z | y, x)qφy (y|x) to disentangle the digit label y from the handwriting style z (Fig. 1 right). The generative and recognition model are jointly form a stochastic computation graph (Fig. 1 centre) containing a sub-graph for each stochastic variable. These can correspond to fully supervised, partially supervised and unsupervised variables. This example graph contains three types of subgraphs, corresponding to the three possibilities for supervision and gradient estimation: • For the fully supervised variable x, we compute the likelihood p under the generative model, that is pθ(x | y, z) = N(x ; ηθ(y, z)). Here ηθ(y, z) is a neural net with parameters θ that returns the parameters of a normal distribution (i.e. a mean vector and a diagonal covariance). • For the unobserved variable z, we compute both the prior probability p(z) = N(z ; ηz), and the conditional probability qφ(z | x, y) = N(z ; λφz (x, y)). Here the usual reparametrisation is used to sample z from qφ(z | x, y) by first sampling ϵ ∼N(0, I) using the usual reparametrisation trick z = g(ϵ, λφ(x, y)). • For the partially observed variable y, we also compute probabilities p(y) = Discrete(y; ηy) and qφy (y|x) = Discrete(y; λφz (x)). The value y is treated as observed when available, and sampled otherwise. In this particular example, we sample y from a qφy (y|x) using a Gumbel-softmax [13, 25] relaxation of the discrete distribution. The example in Fig. 1 illustrates a general framework for defining VAEs with arbitrary dependency structures. We begin by defining a node for each random variable. For each node we then specify a distribution type and parameter function η, which determines how the probability under the generative model depends on the other variables in the network. This function can be a constant, fully deterministic, or a neural network whose parameters are learned from the data. For each unsupervised and semi-supervised variable we must additionally specify a function λ that returns the parameter values in the recognition model, along with a (reparametrised) sampling procedure. Given this specification of a computation graph, we can now compute the importance sampling estimate in Eq. (8) by simply running the network forward repeatedly to obtain samples from qφ(·|λ) for all unobserved variables. We then calculate pθ(x, y, z), qφ(y|x), qφ(y, z|x), and the importance 5 (a) (b) (c) (d) Figure 2: (a) Visual analogies for the MNIST data, partially supervised with just 100 labels (out of 50000). We infer the style variable z and then vary the label y. (b) Exploration in style space with label y held fixed and (2D) style z varied. Visual analogies for the SVHN data when (c) partially supervised with just 1000 labels, and (d) fully supervised. weight w, which is the joint probability of all semi-supervised variable for which labels are available. This estimate can then be optimised with respect to the variables θ and φ to train the autoencoder. 3 Experiments We evaluate our framework along a number of different axes pertaining to its ability to learn disentangled representations through the provision of partial graphical-model structures for the latents and weak supervision. In particular, we evaluate its ability to (i) function as a classifier/regressor for particular latents under the given dataset, (ii) learn the generative model in a manner that preserves the semantics of the latents with respect to the data generated, and (iii) perform these tasks, in a flexible manner, for a variety of different models and data. For all the experiments run, we choose architecture and parameters that are considered standard for the type and size of the respective datasets. Where images are concerned (with the exception of MNIST), we employ (de)convolutional architectures, and employ a standard GRU recurrence in the Multi-MNIST case. For learning, we used AdaM [16] with a learning rate and momentumcorrection terms set to their default values. As for the mini batch sizes, they varied from 100-700 depending on the dataset being used and the sizes of the labelled subset Dsup. All of the above, including further details of precise parameter values and the source code, including our PyTorchbased library for specifying arbitrary graphical models in the VAE framework, is available at – https://github.com/probtorch/probtorch. 3.1 MNIST and SVHN We begin with an experiment involving a simple dependency structure, in fact the very same as that in Kingma et al. [18], to validate the performance of our importance-sampled objective in the special case where the recognition network and generative models factorise as indicated in Fig. 1(left), giving us importance weights that are constant wm,s = qφ(ym|xm). The model is tested on it’s ability to classify digits and perform conditional generation on the MNIST and Google Street-View House Numbers (SVHN) datasets. As Fig. 1(left) shows, the generative and recognition models have the “digit” label, denoted y, partially specified (and partially supervised) and the “style” factor, denoted z, assumed to be an unobserved (and unsupervised) variable. Figure 2(a) and (c) illustrate the conditional generation capabilities of the learned model, where we show the effect of first transforming a given input (leftmost column) into the disentangled latent space, and with the style latent variable fixed, manipulating the digit through the generative model to generate data with expected visual characteristics. Note that both these results were obtained with partial supervision – 100 (out of 50000) labelled data points in the case of MNIST and 1000 (out of 70000) labelled data points in the case of SVHN. The style latent variable z was taken to be a diagonal-covariance Gaussian of 10 and 15 dimensions respectively. Figure 2(d) shows the same for SVHN with full supervision. Figure 2(b) illustrates the alternate mode of conditional generation, where the style latent, here taken to be a 2D Gaussian, is varied with the digit held fixed. Next, we evaluate our model’s ability to effectively learn a classifier from partial supervision. We compute the classification error on the label-prediction task on both datasets, and the results are 6 0 20 40 60 MNIST M = 100 M = 600 M = 1000 M = 3000 0.0 0.2 0.4 0.6 0.8 1.0 0 20 40 60 SVHN M = 1000 M = 3000 0.0 0.2 0.4 0.6 0.8 1.0 Supervision Rate ( ) 0.0 0.2 0.4 0.6 0.8 1.0 Classification Error (%) Effect of Supervision Rate ( ) MNIST N = 50000 M Ours M2 [18] 100 9.71 (± 0.91) 11.97 (± 1.71) 600 3.84 (± 0.86) 4.94 (± 0.13) 1000 2.88 (± 0.79) 3.60 (± 0.56) 3000 1.57 (± 0.93) 3.92 (± 0.63) SVHN N = 70000 M Ours M1+M2 [18] 1000 38.91 (± 1.06) 36.02 (± 0.10) 3000 29.07 (± 0.83) — Figure 3: Right: Classification error rates for different labelled-set sizes M over multiple runs, with supervision rate ρ = γM N+γM , γ = 1. For SVHN, we compare against a multi-stage process (M1+M2) [18], where our model only uses a single stage. Left: Classification error over different labelled set sizes and supervision rates for MNIST (top) and SVHN (bottom). Here, scaling of the classification objective is held fixed at α = 50 (MNIST) and α = 70 (SVHN). Note that for sparsely labelled data (M ≪N), a modicum of over-representation (γ > 1) helps improve generalisation with better performance on the test set. Conversely, too much over-representation leads to overfitting. reported in the table in Fig. 3. Note that there are a few minor points of difference in the setup between our method and those we compare against [18]. We always run our models directly on the data, with no pre-processing or pre-learning on the data. Thus, for MNIST, we compare against model M2 from the baseline which does just the same. However, for SVHN, the baseline method does not report errors for the M2 model; only the two-stage M1+M2 model which involves a separate feature-extraction step on the data before learning a semi-supervised classifier. As the results indicate, our model and objective does indeed perform on par with the setup considered in Kingma et al. [18], serving as basic validation of our framework. We note however, that from the perspective of achieving the lowest possible classification error, one could adopt any number of alternate factorisations [24] and innovations in neural-network architectures [27, 33]. Supervision rate: As discussed in Section 2.1, we formulate our objective to provide a handle on the relative weight between the supervised and unsupervised terms. For a given unsupervised set size N, supervised set size M, and scaling term γ, the relative weight is ρ = γM/(N + γM). Figure 3 shows exploration of this relative weight parameter over the MNIST and SVHN datasets and over different supervised set sizes M. Each line in the graph measures the classification error for a given M, over ρ, starting at γ = 1, i.e. ρ = M/(N + M). In line with Kingma et al.[18], we use α = 0.1/ρ. When the labelled data is very sparse (M ≪N), over-representing the labelled examples during training can help aid generalisation by improving performance on the test data. In our experiments, for the most part, choosing this factor to be ρ = M/(N + M) provides good results. However, as is to be expected, over-fitting occurs when ρ is increased beyond a certain point. 3.2 Intrinsic Faces We next move to a more complex domain involving generative models of faces. As can be seen in the graphical models for this experiment in Fig. 4, the dependency structures employed here are more complex in comparison to those from the previous experiment. Here, we use the “Yale B” dataset [6] as processed by Jampani et al. [12] for the results in Fig. 5. We are interested in showing that our model can learn disentangled representations of identity and lighting and evaluate it’s performance on the tasks of (i) classification of person identity, and (ii) regression for lighting direction. Note that our generative model assumes no special structure – we simply specify a model where all latent variables are independent under the prior. Previous work [12] assumed a generative model with latent variables identity i, lighting l, shading s, and reflectance r, following the relationship (n · l) × r + ϵ for the pixel data. Here, we wish to demonstrate that our generative model still learns the correct relationship over these latent variables, by virtue of the structure in the recognition model and given (partial) supervision. Note that in the recognition model (Fig. 4), the lighting l is a latent variable with continuous domain, and one that we partially supervise. Further, we encode identity i as a categorical random variable, 7 Intrinsic Faces Multi-MNIST x i ℓ s r x i ℓ r s x ak xk zk yk K K x K ak xk hk zk yk hk−1 K Generative Model Recognition Model Generative Model Recognition Model Figure 4: Generative and recognition models for the intrinsic-faces and multi-MNIST experiments. Input Recon. Varying Identity Input Recon. Varying Lighting Identity Lighting Ours (Full Supervision) 1.9% (± 1.5) 3.1% (± 3.8) Ours (Semi-Supervised) 3.5% (± 3.4) 17.6% (± 1.8) Jampani et al. [12] (plot asymptotes) ≈30 ≈10 Figure 5: Left: Exploring the generative capacity of the supervised model by manipulating identity and lighting given a fixed (inferred) value of the other latent variables. Right: Classification and regression error rates for identity and lighting latent variables, fully-supervised, and semi-supervised (with 6 labelled example images for each of the 38 individuals, a supervision rate of ρ = 0.5, and α = 10). Classification is a direct 1-out-of-38 choice, whereas for the comparison, error is a nearest-neighbour loss based on the inferred reflectance. Regression loss is angular distance. instead of constructing a pixel-wise surface-normal map (each assumed to be independent Gaussian) as is customary. This formulation allows us to address the task of predicting identity directly, instead of applying surrogate evaluation methods (e.g. nearest-neighbour classification based on inferred reflectance). Figure 5 presents both qualitative and quantitative evaluation of the framework to jointly learn both the structured recognition model, and the generative model parameters. 3.3 Multi-MNIST Finally, we conduct an experiment that extends the complexity from the prior models even further. Particularly, we explore the capacity of our framework to handle models with stochastic dimensionality – having the number of latent variables itself determined by a random variable, and models that can be composed of other smaller (sub-)models. We conduct this experiment in the domain of multi-MNIST. This is an apposite choice as it satisfies both the requirements above – each image can have a varying number of individual digits, which essentially dictates that the model must learn to count, and as each image is itself composed of (scaled and translated) exemplars from the MNIST data, we can employ the MNIST model itself within the multi-MNIST model. The model structure that we assume for the generative and recognition networks is shown in Fig. 4. We extend the models from the MNIST experiment by composing it with a stochastic sequence generator, in which the loop length K is a random variable. For each loop iteration k = 1, . . . , K, the generative model iteratively samples a digit yk, style zk, and uses these to generate a digit image xk in the same manner as in the earlier MNIST example. Additionally, an affine tranformation is also sampled for each digit in each iteration to transform the digit images xk into a common, combined canvas that represents the final generated image x, using a spatial transformer network [11]. In the recognition model, we predict the number of digits K from the pixels in the image. For each loop iteration k = 1, . . . , K, we define a Bernoulli-distributed digit image xk. When supervision is available, we compute the probability of xk from the binary cross-entropy in the same manner as in the likelihood term for the MNIST model. When no supervision is available, we deterministically set xk to the mean of the distribution. This can be seen akin to providing bounding-boxes around the constituent digits as supervision, which must be taken into account when learning the affine transformations that decompose a multi-MNIST image into its constituent MNIST-like images. This model design is similar to the one used in DRAW [10], recurrent VAEs [3], and AIR [5]. 8 Input Reconstruction Decomposition M M+N Count Error (%) w/o MNIST w/ MNIST 0.1 85.45 (± 5.77) 76.33 (± 8.91) 0.5 93.27 (± 2.15) 80.27 (± 5.45) 1.0 99.81 (± 1.81) 84.79 (± 5.11) Figure 6: Left: Example input multi-MNIST images and reconstructions. Top-Right: Decomposition of Multi-MNIST images into constituent MNIST digits. Bottom-Right: Count accuracy over different supervised set sizes M for given dataset size M + N = 82000. In the absence of a canonical multi-MNIST dataset, we created our own from the MNIST dataset by manipulating the scale and positioning of the standard digits into a combined canvas, evenly balanced across the counts (1-3) and digits. We then conducted two experiments within this domain. In the first experiment, we seek to measure how well the stochastic sequence generator learns to count on its own, with no heed paid to disentangling the latent representations for the underlying digits. Here, the generative model presumes the availability of individual MNIST-digit images, generating combinations under sampled affine transformations. In the second experiment, we extend the above model to now also incorporate the same pre-trained MNIST model from the previous section, which allows the generative model to sample MNIST-digit images, while also being able to predict the underlying digits. This also demonstrates how we can leverage compositionality of models: when a complex model has a known simpler model as a substructure, the simpler model and its learned weights can be dropped in directly. The count accuracy errors across different supervised set sizes, reconstructions for a random set of inputs, and the decomposition of a given set of inputs into their constituent individual digits, are shown in Fig. 6. All reconstructions and image decompositions shown correspond to the nested-model configuration. We observe that not only are we able to reliably infer the counts of the digits in the given images, we are able to simultaneously reconstruct the inputs as well as its constituent parts. 4 Discussion and Conclusion In this paper we introduce a framework for learning disentangled representations of data using partially-specified graphical model structures and semi-supervised learning schemes in the domain of variational autoencoders (VAEs). This is accomplished by defining hybrid generative models which incorporate both structured graphical models and unstructured random variables in the same latent space. We demonstrate the flexibility of this approach by applying it to a variety of different tasks in the visual domain, and evaluate its efficacy at learning disentangled representations in a semisupervised manner, showing strong performance. Such partially-specified models yield recognition networks that make predictions in an interpretable and disentangled space, constrained by the structure provided by the graphical model and the weak supervision. The framework is implemented as a PyTorch library [26], enabling the construction of stochastic computation graphs which encode the requisite structure and computation. This provides another direction to explore in the future — the extension of the stochastic computation graph framework to probabilistic programming [9, 35, 36]. Probabilistic programs go beyond the presented framework to permit more expressive models, incorporating recursive structures and higher-order functions. The combination of such frameworks with neural networks has recently been studied in Le et al. [23] and Ritchie et al. [29], indicating a promising avenue for further exploration. Acknowledgements This work was supported by the EPSRC, ERC grant ERC-2012-AdG 321162-HELIOS, EPSRC grant Seebibyte EP/M013774/1, and EPSRC/MURI grant EP/N019474/1. BP & FW were supported by The Alan Turing Institute under the EPSRC grant EP/N510129/1. JWM, FW & NDG were supported under DARPA PPAML through the U.S. AFRL under Cooperative Agreement FA8750-14-2-0006. JWM was additionally supported through startup funds provided by Northeastern University. FW was additionally supported by Intel and DARPA D3M, under Cooperative Agreement FA8750-17-2-0093. 9 References [1] Jonathan Berant, Vivek Srikumar, Pei-Chun Chen, Abby Vander Linden, Brittany Harding, Brad Huang, Peter Clark, and Christopher D Manning. Modeling biological processes for reading comprehension. In EMNLP, 2014. [2] Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. arXiv preprint arXiv:1509.00519, 2015. [3] Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pages 2980–2988, 2015. [4] Christopher K. I. Williams Cian Eastwood. A framework for the quantitaive evaluation of disentangled representations. In Proceedings of the Workshop on Learning Disentangled Representaions: from Perception to Control, at NIPS 2017, 2017. [5] S. M. Ali Eslami, Nicolas Heess, Theophane Weber, Yuval Tassa, Koray Kavukcuoglu, and Geoffrey. E Hinton. Attend, infer, repeat: Fast scene understanding with generative models. arXiv preprint arXiv:1603.08575, 2016. [6] A.S. Georghiades, P.N. Belhumeur, and D.J. Kriegman. From few to many: Illumination cone models for face recognition under variable lighting and pose. IEEE Trans. Pattern Anal. Mach. Intelligence, 23(6):643–660, 2001. [7] Samuel Gershman and Noah Goodman. Amortized inference in probabilistic reasoning. In CogSci, 2014. [8] 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. [9] ND Goodman, VK Mansinghka, D Roy, K Bonawitz, and JB Tenenbaum. Church: A language for generative models. In Uncertainty in Artificial Intelligence, pages 220–229, 2008. [10] Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1462–1471, 2015. [11] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pages 2017–2025, 2015. [12] Varun Jampani, S. M. Ali Eslami, Daniel Tarlow, Pushmeet Kohli, and John Winn. Consensus message passing for layered graphical models. In International Conference on Artificial Intelligence and Statistics, pages 425–433, 2015. [13] E. Jang, S. Gu, and B. Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. [14] Matthew Johnson, David K Duvenaud, Alex Wiltschko, Ryan P Adams, and Sandeep R Datta. Composing graphical models with neural networks for structured representations and fast inference. In Advances in Neural Information Processing Systems, pages 2946–2954, 2016. [15] Matthew J. Johnson, David K. Duvenaud, Alex B. Wiltschko, Sandeep R. Datta, and Ryan P. Adams. Composing graphical models with neural networks for structured representations and fast inference. In Advances in Neural Information Processing Systems, 2016. [16] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. [17] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of the 2nd International Conference on Learning Representations, 2014. 10 [18] Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semisupervised learning with deep generative models. In Advances in Neural Information Processing Systems, pages 3581–3589, 2014. [19] Daphne Koller and Nir Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. [20] Tejas D Kulkarni, Pushmeet Kohli, Joshua B Tenenbaum, and Vikash Mansinghka. Picture: A probabilistic programming language for scene perception. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4390–4399, 2015. [21] Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In Advances in Neural Information Processing Systems, pages 2530–2538, 2015. [22] Steffen L Lauritzen and David J Spiegelhalter. Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society. Series B (Methodological), pages 157–224, 1988. [23] Tuan Anh Le, Atilim Gunes Baydin, and Frank Wood. Inference compilation and universal probabilistic programming. arXiv preprint arXiv:1610.09900, 2016. [24] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther. Auxiliary deep generative models. arXiv preprint arXiv:1602.05473, 2016. [25] C. J. Maddison, A. Mnih, and Y. W. Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. [26] PyTorch. PyTorch. http://pytorch.org/, 2017. Accessed: 2017-11-4. [27] A. Rasmus, H. Valpola, M. Honkala, M. Berglund, and Raiko. T. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, pages 3532–3540, 2015. [28] Danilo Jimenez 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, pages 1278–1286, 2014. [29] Daniel Ritchie, Paul Horsfall, and Noah D Goodman. Deep amortized inference for probabilistic programs. arXiv preprint arXiv:1610.05735, 2016. [30] John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. Gradient estimation using stochastic computation graphs. In Advances in Neural Information Processing Systems, pages 3510–3522, 2015. [31] N. Siddharth, A. Barbu, and J. M. Siskind. Seeing what you’re told: Sentence-guided activity recognition in video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 732–39, June 2014. [32] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in Neural Information Processing Systems, pages 3465–3473, 2015. [33] C. K. Sønderby, T. Raiko, L. Maaløe, S. K. Sønderby, and O. Winther. Ladder variational autoencoders. In Advances in Neural Information Processing Systems, 2016. [34] Andreas Stuhlmüller, Jacob Taylor, and Noah Goodman. Learning stochastic inverses. In Advances in neural information processing systems, pages 3048–3056, 2013. [35] David Wingate, Andreas Stuhlmueller, and Noah D Goodman. Lightweight implementations of probabilistic programming languages via transformational compilation. In International Conference on Artificial Intelligence and Statistics, pages 770–778, 2011. [36] Frank Wood, Jan Willem van de Meent, and Vikash Mansinghka. A new approach to probabilistic programming inference. In Artificial Intelligence and Statistics, pages 1024–1032, 2014. 11 | 2017 | 412 |
6,911 | GP CaKe: Effective brain connectivity with causal kernels Luca Ambrogioni Radboud University l.ambrogioni@donders.ru.nl Max Hinne Radboud University m.hinne@donders.ru.nl Marcel A. J. van Gerven Radboud University m.vangerven@donders.ru.nl Eric Maris Radboud University e.maris@donders.ru.nl Abstract A fundamental goal in network neuroscience is to understand how activity in one brain region drives activity elsewhere, a process referred to as effective connectivity. Here we propose to model this causal interaction using integro-differential equations and causal kernels that allow for a rich analysis of effective connectivity. The approach combines the tractability and flexibility of autoregressive modeling with the biophysical interpretability of dynamic causal modeling. The causal kernels are learned nonparametrically using Gaussian process regression, yielding an efficient framework for causal inference. We construct a novel class of causal covariance functions that enforce the desired properties of the causal kernels, an approach which we call GP CaKe. By construction, the model and its hyperparameters have biophysical meaning and are therefore easily interpretable. We demonstrate the efficacy of GP CaKe on a number of simulations and give an example of a realistic application on magnetoencephalography (MEG) data. 1 Introduction In recent years, substantial effort was dedicated to the study of the network properties of neural systems, ranging from individual neurons to macroscopic brain areas. It has become commonplace to describe the brain as a network that may be further understood by considering either its anatomical (static) scaffolding, the functional dynamics that reside on top of that or the causal influence that the network nodes exert on one another [1–3]. The latter is known as effective connectivity and has inspired a surge of data analysis methods that can be used to estimate the information flow between neural sources from their electrical or haemodynamic activity[2, 4]. In electrophysiology, the most popular connectivity methods are variations on the autoregressive (AR) framework [5]. Specifically, Granger causality (GC) and related methods, such as partial directed coherence and directed transfer function, have been successfully applied to many kinds of neuroscientific data [6, 7]. These methods can be either parametric or non-parametric, but are not based on a specific biophysical model [8, 9]. Consequently, the connectivity estimates obtained from these methods are only statistical in nature and cannot be directly interpreted in terms of biophysical interactions [10]. This contrasts with the framework of dynamic causal modeling (DCM), which allows for Bayesian inference (using Bayes factors) with respect to biophysical models of interacting neuronal populations [11]. These models are usually formulated in terms of either deterministic or stochastic differential equations, in which the effective connectivity between neuronal populations depends on a series of scalar parameters that specify the strength of the interactions and the conduction delays [12]. DCMs are usually less flexible than AR models since they depend on an appropriate parametrization of the effective 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. connectivity kernel, which in turn depends on detailed prior biophysical knowledge or Bayesian model comparison. In this paper, we introduce a new method that is aimed to bridge the gap between biophysically inspired models, such as DCM, and statistical models, such as AR, using the powerful tools of Bayesian nonparametrics [13]. We model the interacting neuronal populations with a system of stochastic integro-differential equations. In particular, the intrinsic dynamic of each population is modeled using a linear differential operator while the effective connectivity between populations is modeled using causal integral operators. The differential operators can account for a wide range of dynamic behaviors, such as stochastic relaxation and stochastic oscillations. While this class of models cannot account for non-linearities, it has the advantage of being analytically tractable. Using the framework of Gaussian process (GP) regression, we can obtain the posterior distribution of the effective connectivity kernel without specifying a predetermined parametric form. We call this new effective connectivity method Gaussian process Causal Kernels (GP CaKe). The GP CaKe method can be seen as a nonparametric extension of linear DCM for which the exact posterior distribution can be obtained in closed-form without resorting to variational approximations. In this way, the method combines the flexibility and statistical simplicity of AR modeling with the biophysical interpretability of a linear DCM. The paper is structured as follows. In Section 2 we describe the model for the activity of neuronal populations and their driving interactions. In Section 3 we construct a Bayesian hierarchical model that allows us to learn the causal interaction functions. Next, in Subsection 3.2, we show that these causal kernels may be learned analytically using Gaussian process regression. Subsequently in Section 4, we validate GP CaKe using a number of simulations and demonstrate its usefulness on MEG data in Section 5. Finally, we discuss the wide array of possible extensions and applications of the model in Section 6. 2 Neuronal dynamics We model the activity of a neuronal population xj(t) using the stochastic differential equation Djxj(t) = Ij(t) + wj(t) , (1) where Ij(t) is the total synaptic input coming from other neuronal populations and wj(t) is Gaussian white noise with mean 0 and variance σ2. The differential operator Dj = α0 +PP p=1 αp dp dtp specifies the internal dynamic of the neuronal population. For example, oscillatory dynamic can be modeled using the damped harmonic operator DH j = d2 dt2 + β d dt + ω2 0 , where ω0 is the (undamped) peak angular frequency and β is the damping coefficient. In Eq. 1, the term Ij(t) accounts for the effective connectivity between neuronal populations. Assuming that the interactions are linear and stationary over time, the most general form for Ij(t) is given by a sum of convolutions: Ij(t) = N X i=1 ci→j ⋆xi (t) , (2) where the function ci→j(t) is the causal kernel, modeling the effective connectivity from population i to population j, and ⋆indicates the convolution operator. The causal kernel ci→j(t) gives a complete characterization of the linear effective connectivity between the two neuronal populations, accounting for the excitatory or inhibitory nature of the connection, the time delay, and the strength of the interaction. Importantly, in order to preserve the causality of the system, we assume that ci→j(t) is identically equal to zero for negative lags (t < 0). Inserting Eq. 2 into Eq. 1, we obtain the following system of stochastic integro-differential equations: Djxj(t) = N X i=1 ci→j ⋆xi (t) + wj(t), j = 1 . . . N , (3) which fully characterizes the stochastic dynamic of a functional network consisting of N neuronal populations. 2 3 The Bayesian model We can frame the estimation of the effective connectivity between neuronal populations as a nonparametric Bayesian regression problem. In order to do this, we assign a GP prior distribution to the kernel functions ci→j(t) for every presynaptic population i and postsynaptic population j. A stochastic function f(t) is said to follow a GP distribution when all its marginal distributions p(f(t1), . . . , f(tn)) are distributed as a multivariate Gaussian [14]. Since these marginals are determined by their mean vector and covariance matrix, the GP is fully specified by a mean and a covariance function, respectively mf(t) = ⟨f(t)⟩and Kf(t1, t2) = ⟨(f(t1) −mf(t1))(f(t2) −mf(t2))⟩. Using the results of the previous subsection we can summarize the problem of Bayesian nonparametric effective connectivity estimation in the following way: ci→j(t) ∼GP (0, K(t1, t2)) wj(t) ∼N(0, σ2) Djxj(t) = N X i=1 (ci→j ⋆xi) (t) + wj(t) , (4) where expressions such as f(t) ∼GP m(t), K(t1, t2) mean that the stochastic process f(t) follows a GP distribution with mean function m(t) and covariance function K(t1, t2). Our aim is to obtain the posterior distributions of the effective connectivity kernels given a set of samples from all the neuronal processes. As a consequence of the time shift invariance, the system of integro-differential equations becomes a system of decoupled linear algebraic equations in the frequency domain. It is therefore convenient to rewrite the regression problem in the frequency domain: ci→j(ω) ∼CGP 0, K(ω1, ω2) wj(ω) ∼CN(0, σ2) Pj(ω)xj(ω) = N X i=1 xi(ω)ci→j(ω) + wj(ω) , (5) where Pj(ω) = PP p=0 αp(−iω)p is a complex-valued polynomial since the application of a differential operator in the time domain is equivalent to multiplication with a polynomial in the frequency domain. In the previous expression, CN(µ, ν) denotes a circularly-symmetric complex normal distribution with mean µ and variance ν, while CGP(m(t), K(ω)) denotes a circularly-symmetric complex valued GP with mean function m(ω) and Hermitian covariance function K(ω1, ω2) [15]. Importantly, the complex valued Hermitian covariance function K(ω1, ω2) can be obtained from K(t1, t2) by taking the Fourier transform of both its arguments: K(ω1, ω2) = Z +∞ −∞ Z +∞ −∞ e−iω1t1−iω2t2K(t1, t2)dt1dt2 . (6) 3.1 Causal covariance functions In order to be applicable for causal inference, the prior covariance function K(t1, t2) must reflect three basic assumptions about the connectivity kernel: I) temporal localization, II) causality and III) smoothness. Since we perform the GP analysis in the frequency domain, we will work with K(ω1, ω2), i.e. the double Fourier transform of the covariance function. First, the connectivity kernel should be localized in time, as the range of plausible delays in axonal communication between neuronal populations is bounded. In order to enforce this constraint, we need a covariance function K(t1, t2) that vanishes when either t1 or t2 becomes much larger than a time constant ϑ. In the frequency domain, this temporal localization can be implemented by inducing correlations between the Fourier coefficients of neighboring frequencies. In fact, local correlations in the time domain are associated with a Fourier transform that vanishes for high values of ω. From Fourier duality, this implies that local correlations in the frequency domain are associated with a function that vanishes for high values of t. We model these spectral correlations using a squared exponential covariance function: KSE(ω1, ω2) = e−ϑ (ω2−ω1)2 2 +its(ω2−ω1) = e−ϑ ζ2 2 +itsζ , (7) 3 where ζ = ω2 −ω1. Since we expect the connectivity to be highest after a minimal conduction delay ts, we introduced a time shift factor itsζ in the exponent that translates the peak of the variance from 0 to ts, which follows from the Fourier shift theorem. As this covariance function depends solely on the difference between frequencies ζ, it can be written (with a slight abuse of notation) as KSE(ζ). Second, we want the connectivity kernel to be causal, meaning that information cannot propagate back from the future. In order to enforce causality, we introduce a new family of covariance functions that vanish when the lag t2 −t1 is negative. In the frequency domain, a causal covariance function can be obtained by adding an imaginary part to Eq. 7 that is equal to its Hilbert transform H [16]. Causal covariance functions are the Fourier dual of quadrature covariance functions, which define GP distributions over the space of analytic functions, i.e. functions whose Fourier coefficients are zero for all negative frequencies [15]. The causal covariance function is given by the following formula: KC(ζ) = KSE(ζ) + iHKSE(ζ) . (8) Finally, as communication between neuronal populations is mediated by smooth biological processes such as synaptic release of neurotransmitters and dendritic propagation of potentials, we want the connectivity kernel to be a smooth function of the time lag. Smoothness in the time domain can be imposed by discounting high frequencies. Here, we use the following discounting function: f(ω1, ω2) = e−ν ω2 1+ω2 2 2 . (9) This discounting function induces a process that is smooth (infinitely differentiable) and with time scale equal to ν [14]. Our final covariance function is given by K(ω1, ω2) = f(ω1, ω2) (KSE(ζ) + iHKSE(ζ)) . (10) Unfortunately, the temporal smoothing breaks the strict causality of the covariance function because it introduces leakage from the positive lags to the negative lags. Nevertheless, the covariance function closely approximates a causal covariance function when ν is not much bigger than ts. 3.2 Gaussian process regression In order to explain how to obtain the posterior distribution of the causal kernel, we need to review some basic results of nonparametric Bayesian regression and GP regression in particular. Nonparametric Bayesian statistics deals with inference problems where the prior distribution has infinitely many degrees of freedom [13]. We focus on the following nonparametric regression problem, where the aim is to reconstruct a series of real-valued functions from a finite number of noisy mixed observations: yt = X i γi(t)fi(t) + wt , (11) where yt is the t-th entry of the data vector y, fi(t) is an unknown latent function and wt is a random variable that models the observation noise with diagonal covariance matrix D. The mixing functions γi(t) are assumed to be known and determine how the latent functions generate the data. In nonparametric Bayesian regression, we specify prior probability distributions over the whole (infinitely dimensional) space of functions fi(t). Specifically, in the GP regression framework this distribution is chosen to be a zero-mean GP. In order to infer the value of the function f(t) at an arbitrary set of target points T × = {t× 1 , ..., t× m}, we organize these values in the vector f with entries fl = f(t× l ). The posterior expected value of f, that we will denote as mfj|y, is given by mfj|y = K× fjΓj X i ΓiKfiΓi + D −1 y , (12) where the covariance matrix Kf is defined by the entries [Kf]uv = Kf(tu, tv) and the crosscovariance matrix K× ψ is defined by the entries [K× f ]uv = Kf(t× u , tv) [14]. The matrices Γi are square and diagonal, with the entries [Γi]uu given by γi(tu). It is easy to see that the problem defined by Eq. 5 has the exact same form as the generalized regression problem given by Eq. 11, with ω as dependent variable. In particular, the weight functions γi(ω) are given by xi(ω) Pj(ω) and the noise term wj(ω) Pj(ω) has variance σ2 |Pj(ω)|2 . Therefore, the expectation of the posterior distributions p(ci→j(ω)|{x1(ωh)}, . . . , {xN(ωh)}) can be obtained in closed from from Eq. 12. 4 4 Effective connectivity simulation study We performed a simulation study to assess the performance of the GP CaKe approach in recovering the connectivity kernel from a network of simulated sources. The neuronal time series xj(t) are generated by discretizing a system of integro-differential equations, as expressed in Eq. 3. Time series data was then generated for each of the sources using the Ornstein-Uhlenbeck process dynamic, i.e. D(1) = d dt + α , (13) where the positive parameter α is the relaxation coefficient of the process. The bigger α is, the faster the process reverts to its mean (i.e. zero) after a perturbation. The discretization of this dynamic is equivalent to a first order autoregressive process. As ground truth effective connectivity, we used functions of the form ci→j(τ) = ai→jτe−τ s , (14) where τ is a (non-negative) time lag, ai→j is the connectivity strength from i to j and s is the connectivity time scale. In order to recover the connectivity kernels ci→j(t) we first need to estimate the differential operator D(1). For simplicity, we estimated the parameters of the differential operator by maximizing the univariate marginal likelihood of each individual source. This procedure requires that the variance of the structured input from the other neuronal populations is smaller than the variance of the unstructured white noise input so that the estimation of the intrinsic dynamic is not too much affected by the coupling. Since most commonly used effective connectivity measures (e.g. Granger causality, partial directed coherence, directed transfer function) are obtained from fitted vector autoregression (VAR) coefficients, we use VAR as a comparison method. Since the least-squares solution for the VAR coefficients is not regularized, we also compare with a ridge regularized VAR model, whose penalty term is learned using cross-validation on separately generated training data. This comparison is particularly natural since our connectivity kernel is the continuous-time equivalent of the lagged AR coefficients between two time series. 4.1 Recovery of the effective connectivity kernels We explore the effects of different parameter values to demonstrate the intuitiveness of the kernel parameters. Whenever a parameter is not specifically adjusted, we use the following default values: noise level σ = 0.05, temporal smoothing ν = 0.15 and temporal localization ϑ = π. Furthermore, we set ts = 0.05 throughout. Figure 1 illustrates connectivity kernels recovered by GP CaKe. These kernels have a connection strength of ai→j = 5.0 if i feeds into j and ai→j = 0 otherwise. This applies to both the two node and the three node network. As these kernels show, our method recovers the desired shape as well as the magnitude of the effective connectivity for both connected and disconnected edges. At the same time, Fig. 1B demonstrates that the indirect pathway through two connections does not lead to a non-zero estimated kernel. Note furthermore that the kernels become non-zero after the zero-lag mark (indicated by the dashed lines), demonstrating that there is no significant anti-causal information leakage. The effects of the different kernel parameter settings are shown in Fig. 2A, where again the method is estimating connectivity for a two node network with one active connection, with ai→j = 5.0. We show the mean squared error (MSE) as well as the correlation between the ground truth effective connectivity and the estimates obtained using our method. We do this for different values of the temporal smoothing, the noise level and the temporal localization parameters. Figure 2B shows the estimated kernels that correspond to these settings. As to be expected, underestimating the temporal smoothness results in increased variance due to the lack of regularization. On the other hand, overestimating the smoothness results in a highly biased estimate as well as anti-causal information leakage. Overestimating the noise level does not induce anti-causal information leakage but leads to substantial bias. Finally, overestimating the temporal localization leads to an underestimation of the duration of the causal influence. Figure 3 shows a quantitative comparison between GP CaKe and the (regularized and unregularized) VAR model for the networks shown in Fig. 1A and Fig. 1B. The connection strength ai→j was 5 1 2 A B 3 2 Ground truth GP CaKe 0 lag 1 Figure 1: Example of estimated connectivity. A. The estimated connectivity kernels for two connections: one present (2 →1) and one absent (1 →2). B. A three-node network in which node 1 feeds into node 2 and node 2 feeds into node 3. The disconnected edge from 1 to 3 is correctly estimated, as the estimated kernel is approximately zero. For visual clarity, estimated connectivity kernels for other absent connections (2 →1, 3 →2 and 3 →1) are omitted in the second panel. The shaded areas indicate the 95% posterior density interval over 200 trials. varied to study its effect on the kernel estimation. It is clear that GP CaKe greatly outperforms both VAR models and that ridge regularization is beneficial for the VAR approach. Note that, when the connection strength is low, the MSE is actually smallest for the fully disconnected model. Conversely, both GP CaKe and VAR always outperform the disconnected estimate with respect to the correlation measure. 5 Brain connectivity In this section we investigate the effective connectivity structure of a network of cortical sources. In particular, we focus on sources characterized by alpha oscillations (8–12Hz), the dominant rhythm in MEG recordings. The participant was asked to watch one-minute long video clips selected from an American television series. During these blocks the participant was instructed to fixate on a cross in the center of the screen. At the onset of each block a visually presented message instructed the participant to pay attention to either the auditory or the visual stream. The experiment also included a so-called ‘resting state’ condition in which the participant was instructed to fixate on a cross in the center of a black screen. Brain activity was recorded using a 275 channels axial MEG system. The GP CaKe method can be applied to a set of signals whose intrinsic dynamic can be characterized by stochastic differential equations. Raw MEG measurements can be seen as a mixture of dynamical signals, each characterized by a different intrinsic dynamic. Therefore, in order to apply the method on MEG data, we need to isolate a set of dynamic components. We extracted a series of unmixed neural sources by applying independent component analysis (ICA) on the sensor recordings. These components were chosen to have a clear dipolar pattern, the signature of a localized cortical source. These local sources have a dynamic that can be well approximated with a linear mixture of linear stochastic differential equations [17]. We used the recently introduced temporal GP decomposition in order to decompose the components’ time series into a series of dynamic components [17]. In particular, for each ICA source we independently extracted the alpha oscillation component, which we modeled with a damped harmonic oscillator: DH j = d2 dt2 + β d dt + ω2 0. Note that the temporal GP decomposition automatically estimates the parameters β and ω0 through a non-linear least-squares procedure [17]. We computed the effective connectivity between the sources that corresponded to occipital, parietal and left- and right auditory cortices (see Fig. 4A) using GP CaKe with the following parameter settings: temporal smoothing ν = 0.01, temporal shift ts = 0.004, temporal localization ϑ = 8π and noise level σ = 0.05. To estimate the causal structure of the network, we performed a z-test on the maximum values of the kernels for each of the three conditions. The results were corrected 6 Noise level σ = 0.01 Temporal smoothing ν = 0.01 2π Temporal localization θ = π A B Ground truth GP CaKe 0 lag θ = 2π θ = 3π θ = 4π σ = 10.00 σ = 1.00 σ = 0.10 ν = 10.00 ν = 1.00 ν = 0.10 3π 4π π Time lag (s) Time lag (s) Time lag (s) Time lag (s) 0.0 1.0 2.0 0.0 1.0 0.0 1.0 2.0 0.0 1.0 2.0 0.0 1.0 2.0 0.0 1.0 0.0 1.0 2.0 0.0 1.0 0.0 1.0 2.0 0.0 1.0 2.0 0.0 1.0 2.0 0.10 0.20 0.30 MSE Correlation MSE MSE 10 -2 10 -1 10 0 10 1 0.0 0.2 0.4 0.6 0.8 1.0 0 1 2 3 4 5 6 7 MSE 10 -2 10 -1 10 0 10 1 0.0 0.2 0.4 0.6 0.8 1.0 0 0.2 0.4 0.6 0.8 0.0 0.2 0.4 0.6 0.8 1.0 Correlation Correlation Correlation ν σ θ Figure 2: The effect of the the temporal localization, smoothness and noise level parameters on a present connection. A. The correlation and mean squared error between the ground truth connectivity kernel and the estimation by GP CaKe. B. The shapes of the estimated kernels as determined by the indicated parameter. Default values for the parameters that remain fixed are σ = 0.05, ν = 0.15 and ϑ = π. The dashed line indicates the zero-lag moment at which point the causal effect deviates from zero. The shaded areas indicate the 95% posterior density interval over 200 trials. 1.0 5.0 10.0 10-2 10-1 100 101 102 −0.2 0.0 0.2 0.4 1.0 2.5 5.0 GP CaKe VAR, Ridge VAR Baseline 10-2 100 102 104 106 108 −0.2 −0.1 0.0 0.1 0.2 0.3 1.0 2.5 5.0 1.0 5.0 10.0 Two-node network Three-node network A B Connection weight Connection weight Connection weight Connection weight Correlation Mean squared error Correlation Mean squared error Figure 3: The performance of the recovery of the effective connectivity kernels in terms of the correlation and mean squared error between the actual and the recovered kernel. Left column: results for the two node graph shown in Fig. 1A. Right column: results for the three node graph shown in Fig. 1B. The dashed line indicates the baseline that estimates all node pairs as disconnected. for multiple comparisons using FDR correction with α = 0.05. The resulting structure is shown in Fig. 4A, with the corresponding causal kernels in Fig. 4B. The three conditions are clearly distinguishable from their estimated connectivity structure. For example, during the auditory attention condition, alpha band causal influence from parietal to occipital cortex is suppressed relative to the other conditions. Furthermore, a number of connections (i.e. right to left auditory cortex, as well as both auditory cortices to occipital cortex) are only present during the resting state. 7 A B Parietal cortex L. auditory cortex R. auditory cortex Occipital cortex Occ. cortex Par. cortex L. aud. cortex R. aud. cortex Occ. Par. R.A. L.A. R, V A V R R V R R, V, A R, V, A R, V, A −3 −2 −1 0 1 2 1e−18 −3 −2 −1 0 1 2 1e−18 0.00 0.04 0.08 0.12 −3 −2 −1 0 1 2 1e−18 0.00 0.04 0.08 0.12 0.00 0.04 0.08 0.12 rest video audio −3 −2 −1 0 1 2 1e−18 Time lag (s) Time lag (s) Time lag (s) Time lag (s) onset R,V,A R,V,A Figure 4: Effective connectivity using MEG for three conditions: I. resting state (R), II. attention to video stream (V) and III. attention to audio stream (A). Shown are the connections between occipital cortex, parietal cortex and left and right auditory cortices. A. The binary network for each of the three conditions. B. The kernels for each of the connections. Note that the magnitude of the kernels depends on the noise level σ, and as the true strength is unknown, this is in arbitrary units. 6 Discussion We introduced a new effective connectivity method based on GP regression and integro-differential dynamical systems, referred to as GP CaKe. GP CaKe can be seen as a nonparametric extension of DCM [11] where the posterior distribution over the effective connectivity kernel can be obtained in closed form. In order to regularize the estimation, we introduced a new family of causal covariance functions that encode three basic assumptions about the effective connectivity kernel: (1) temporal localization, (2) causality, and (3) temporal smoothness. The resulting estimated kernels reflect the time-modulated causal influence that one region exerts on another. Using simulations, we showed that GP CaKe produces effective connectivity estimates that are orders of magnitude more accurate than those obtained using (regularized) multivariate autoregression. Furthermore, using MEG data, we showed that GP CaKe is able to uncover interesting patterns of effective connectivity between different brain regions, modulated by cognitive state. The strategy for selecting the hyperparameters of the GP CaKe model depends on the specific study. If they are hand-chosen they should be set in a conservative manner. For example, the temporal localization should be longer than the highest biologically meaningful conduction delay. Analogously, the smoothing parameter should be smaller than the time scale of the system of interest. In ideal cases, such as for the analysis of the subthreshold postsynaptic response of the cellular membrane, these values can be reasonably obtained from biophysical models. When prior knowledge is not available, several off-the-shelf Bayesian hyperparameter selection or marginalization techniques can be applied to GP CaKe directly since both the marginal likelihood and its gradient are available in closed-form. In this paper, instead of proposing a particular hyper-parameter selection technique, we decided to focus our exposition on the interpretability of the hyperparameters. In fact, biophysical interpretability can help neuroscientists construct informed hyperprior distributions. Despite its high performance, the current version of the GP CaKe method has some limitations. First, the method can only be used on signals whose intrinsic dynamics are well approximated by linear stochastic differential equations. Real-world neural recordings are often a mixture of several independent dynamic components. In this case the signal needs to be preprocessed using a dynamic decomposition technique [17]. The second limitation is that the intrinsic dynamics are currently estimated from the univariate signals. This procedure can lead to biases when the neuronal populations are strongly coupled. Therefore, future developments should focus on the integration of dynamic decomposition with connectivity estimation within an overarching Bayesian model. The model can be extended in several directions. First, the causal structure of the neural dynamical system can be constrained using structural information in a hierarchical Bayesian model. Here, structural connectivity may be provided as an a priori constraint, for example derived from diffusionweighted MRI [18], or learned from the functional data simultaneously [19]. This allows the model to automatically remove connections that do not reflect a causal interaction, thereby regularizing 8 the estimation. Alternatively, the anatomical constraints on causal interactions may be integrated into a spatiotemporal model of the brain cortex by using partial integro-differential neural field equations [20] and spatiotemporal causal kernels. In addition, the nonparametric modeling of the causal kernel can be integrated into a more complex and biophysically realistic model where the differential equations are not assumed to be linear [12] or where the observed time series data are filtered through a haemodynamic [21] or calcium impulse response function [22]. Finally, while our model explicitly refers to neuronal populations, we note that the applicability of the GP CaKe framework is in no way limited to neuroscience and may also be relevant for fields such as econometrics and computational biology. References [1] A Fornito and E T Bullmore. Connectomics: A new paradigm for understanding brain disease. European Neuropsychopharmacology, 25:733–748, 2015. [2] K Friston. Functional and effective connectivity: A review. Brain Connectivity, 1(1):13–35, 2011. [3] S L Bressler and V Menon. Large-scale brain networks in cognition: Emerging methods and principles. Trends in Cognitive Sciences, 14(6):277–290, 2010. [4] K E Stephan and A Roebroeck. A short history of causal modeling of fMRI data. NeuroImage, 62(2):856–863, 2012. [5] K Friston, R Moran, and A K Seth. Analysing connectivity with Granger causality and dynamic causal modelling. Current Opinion in Neurobiology, 23(2):172–178, 2013. [6] K Sameshima and L A Baccalá. Using partial directed coherence to describe neuronal ensemble interactions. Journal of Neuroscience Methods, 94(1):93–103, 1999. [7] M Kami´nski, M Ding, W A Truccolo, and S. L. Bressler. Evaluating causal relations in neural systems: Granger causality, directed transfer function and statistical assessment of significance. Biological Cybernetics, 85(2):145–157, 2001. [8] M Dhamala, G Rangarajan, and M Ding. Analyzing information flow in brain networks with nonparametric Granger causality. NeuroImage, 41(2):354–362, 2008. [9] S L Bressler and A K Seth. Wiener–Granger causality: A well established methodology. NeuroImage, 58(2):323–329, 2011. [10] B Schelter, J Timmer, and M Eichler. Assessing the strength of directed influences among neural signals using renormalized partial directed coherence. Journal of Neuroscience Methods, 179(1):121–130, 2009. [11] K Friston, B Li, J Daunizeau, and K E Stephan. Network discovery with DCM. NeuroImage, 56(3):1202–1221, 2011. [12] O David, S J Kiebel, L M Harrison, J Mattout, J M Kilner, and K J Friston. Dynamic causal modeling of evoked responses in EEG and MEG. NeuroImage, 30(4):1255–1272, 2006. [13] N L Hjort, C Holmes, P Müller, and S G Walker. Bayesian Nonparametrics. Cambridge University Press, 2010. [14] C E Rasmussen. Gaussian Processes for Machine Learning. The MIT Press, 2006. [15] L Ambrogioni and E Maris. Complex–valued Gaussian process regression for time series analysis. arXiv preprint arXiv:1611.10073, 2016. [16] U C Täuber. Critical dynamics: a field theory approach to equilibrium and non-equilibrium scaling behavior. Cambridge University Press, 2014. [17] L Ambrogioni, M A J van Gerven, and E Maris. Dynamic decomposition of spatiotemporal neural signals. arXiv preprint arXiv:1605.02609, 2016. 9 [18] M Hinne, L Ambrogioni, R J Janssen, T Heskes, and M A J van Gerven. Structurally-informed Bayesian functional connectivity analysis. NeuroImage, 86:294–305, 2014. [19] M Hinne, R J Janssen, T Heskes, and M A J van Gerven. Bayesian estimation of conditional independence graphs improves functional connectivity estimates. PLoS Computational Biology, 11(11):e1004534, 2015. [20] S Coombes, P beim Graben, R Potthast, and J Wright. Neural Fields. Springer, 2014. [21] K J Friston, A Mechelli, R Turner, and C J Price. Nonlinear responses in fMRI: the Balloon model, Volterra kernels, and other hemodynamics. NeuroImage, 12(4):466–477, 2000. [22] C Koch. Biophysics of computation: Information processing in single neurons. Computational Neuroscience Series. Oxford University Press, 2004. 10 | 2017 | 413 |
6,912 | Certified Defenses for Data Poisoning Attacks Jacob Steinhardt⇤ Stanford University jsteinha@stanford.edu Pang Wei Koh⇤ Stanford University pangwei@cs.stanford.edu Percy Liang Stanford University pliang@cs.stanford.edu Abstract Machine learning systems trained on user-provided data are susceptible to data poisoning attacks, whereby malicious users inject false training data with the aim of corrupting the learned model. While recent work has proposed a number of attacks and defenses, little is understood about the worst-case loss of a defense in the face of a determined attacker. We address this by constructing approximate upper bounds on the loss across a broad family of attacks, for defenders that first perform outlier removal followed by empirical risk minimization. Our approximation relies on two assumptions: (1) that the dataset is large enough for statistical concentration between train and test error to hold, and (2) that outliers within the clean (nonpoisoned) data do not have a strong effect on the model. Our bound comes paired with a candidate attack that often nearly matches the upper bound, giving us a powerful tool for quickly assessing defenses on a given dataset. Empirically, we find that even under a simple defense, the MNIST-1-7 and Dogfish datasets are resilient to attack, while in contrast the IMDB sentiment dataset can be driven from 12% to 23% test error by adding only 3% poisoned data. 1 Introduction Traditionally, computer security seeks to ensure a system’s integrity against attackers by creating clear boundaries between the system and the outside world (Bishop, 2002). In machine learning, however, the most critical ingredient of all–the training data–comes directly from the outside world. For a system trained on user data, an attacker can inject malicious data simply by creating a user account. Such data poisoning attacks require us to re-think what it means for a system to be secure. The focus of the present work is on data poisoning attacks against classification algorithms, first studied by Biggio et al. (2012) and later by a number of others (Xiao et al., 2012; 2015b; Newell et al., 2014; Mei and Zhu, 2015b; Burkard and Lagesse, 2017; Koh and Liang, 2017). This body of work has demonstrated data poisoning attacks that can degrade classifier accuracy, sometimes dramatically. Moreover, while some defenses have been proposed against specific attacks (Laishram and Phoha, 2016), few have been stress-tested against a determined attacker. Are there defenses that are robust to a large class of data poisoning attacks? At development time, one could take a clean dataset and test a defense against a number of poisoning strategies on that dataset. However, because of the near-limitless space of possible attacks, it is impossible to conclude from empirical success alone that a defense that works against a known set of attacks will not fail against a new attack. In this paper, we address this difficulty by presenting a framework for studying the entire space of attacks against a given defense. Our framework applies to defenders that (i) remove outliers residing outside a feasible set, then (ii) minimize a margin-based loss on the remaining data. For such defenders, we can generate approximate upper bounds on the efficacy of any data poisoning attack, which hold modulo two assumptions—that the empirical train and test distribution are close together, ⇤Equal contribution. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. and that the outlier removal does not significantly change the distribution of the clean (non-poisoned) data; these assumptions are detailed more formally in Section 3. We then establish a duality result for our upper bound, and use this to generate a candidate attack that nearly matches the bound. Both the upper bound and attack are generated via an efficient online learning algorithm. We consider two different instantiations of our framework: first, where the outlier detector is trained independently and cannot be affected by the poisoned data, and second, where the data poisoning can attack the outlier detector as well. In both cases we analyze binary SVMs, although our framework applies in the multi-class case as well. In the first setting, we apply our framework to an “oracle” defense that knows the true class centroids and removes points that are far away from the centroid of the corresponding class. While previous work showed successful attacks on the MNIST-1-7 (Biggio et al., 2012) and Dogfish (Koh and Liang, 2017) image datasets in the absence of any defenses, we show (Section 4) that no attack can substantially increase test error against this oracle—the 0/1-error of an SVM on either dataset is at most 4% against any of the attacks we consider, even after adding 30% poisoned data.1 Moreover, we provide certified upper bounds of 7% and 10% test error, respectively, on the two datasets. On the other hand, on the IMDB sentiment corpus (Maas et al., 2011) our attack increases classification test error from 12% to 23% with only 3% poisoned data, showing that defensibility is very datasetdependent: the high dimensionality and abundance of irrelevant features in the IMDB corpus give the attacker more room to construct attacks that evade outlier removal. For the second setting, we consider a more realistic defender that uses the empirical (poisoned) centroids. For small amounts of poisoned data (5%) we can still certify the resilience of MNIST1-7 and Dogfish (Section 5). However, with more (30%) poisoned data, the attacker can subvert the outlier removal to obtain stronger attacks, increasing test error on MNIST-1-7 to 40%—much higher than the upper bound of 7% for the oracle defense. In other words, defenses that rely on the (potentially poisoned) data can be much weaker than their data-independent counterparts, underscoring the need for outlier removal mechanisms that are themselves robust to attack. 2 Problem Setting Consider a prediction task from an input x 2 X (e.g., Rd) to an output y 2 Y; in our case we will take Y = {−1, +1} (binary classification) although most of our analysis holds for arbitrary Y. Let ` be a non-negative convex loss function: e.g., for linear classification with the hinge loss, `(✓; x, y) = max(0, 1 −yh✓, xi) for a model ✓2 ⇥✓Rd and data point (x, y). Given a true data-generating distribution p⇤over X ⇥Y, define the test loss as L(✓) = E(x,y)⇠p⇤[`(✓; x, y)]. We consider the causative attack model (Barreno et al., 2010), which consists of a game between two players: the defender (who seeks to learn a model ✓), and the attacker (who wants the learner to learn a bad model). The game proceeds as follows: • n data points are drawn from p⇤to produce a clean training dataset Dc. • The attacker adaptively chooses a “poisoned” dataset Dp of ✏n poisoned points, where ✏2 [0, 1] parametrizes the attacker’s resources. • The defender trains on the full dataset Dc [ Dp to produce a model ˆ✓, and incurs test loss L(ˆ✓). The defender’s goal is to minimize the quantity L(ˆ✓) while the attacker’s goal is to maximize it. Remarks. We assume the attacker has full knowledge of the defender’s algorithm and of the clean training data Dc. While this may seem generous to the attacker, it is widely considered poor practice to rely on secrecy for security (Kerckhoffs, 1883; Biggio et al., 2014a); moreover, a determined attacker can often reverse-engineer necessary system details (Tramèr et al., 2016). The causative attack model allows the attacker to add points but not modify existing ones. Indeed, systems constantly collect new data (e.g., product reviews, user feedback on social media, or insurance claims), whereas modification of existing data would require first compromising the system. Attacks that attempt to increase the overall test loss L(ˆ✓), known as indiscriminate availability attacks (Barreno et al., 2010), can be thought of as a denial-of-service attack. This is in contrast to targeted 1We note Koh and Liang’s attack on Dogfish targets specific test images rather than overall test error. 2 Figure 1: Different datasets possess very different levels of vulnerability to attack. Here, we visualize the effect of the sphere and slab oracle defenses, with thresholds chosen to match the 70th percentile of the clean data. We mark with an X our attacks for the respective values of ✏. (a) For the MNIST-1-7 dataset, the classes are well-separated and no attack can get past the defense. Note that our attack chooses to put all of its weight on the negative class here, although this need not be true in general. (b) For the IMDB dataset, the class centroids are not well-separated and it is easy to attack the classifier. See Section 4 for more details about the experiments. attacks on individual examples or sub-populations (e.g., Burkard and Lagesse, 2017). Both have serious security implications, but we focus on denial-of-service attacks, as they compromise the model in a broad sense and interfere with fundamental statistical properties of learning algorithms. 2.1 Data Sanitization Defenses A defender who trains naïvely on the full (clean + poisoned) data Dc [ Dp is doomed to failure, as even a single poisoned point can in some cases arbitrarily change the model (Liu and Zhu, 2016; Park et al., 2017). In this paper, we consider data sanitization defenses (Cretu et al., 2008), which examine the full dataset and try to remove the poisoned points, for example by deleting outliers. Formally, the defender constructs a feasible set F ✓X ⇥Y and trains only on points in F: ˆ✓ def = argmin ✓2⇥ L(✓; (Dc [ Dp) \ F), where L(✓; S) def = X (x,y)2S `(✓; x, y). (1) Given such a defense F, we would like to upper bound the worst possible test loss over any attacker (choice of Dp)—in symbols, maxDp L(ˆ✓). Such a bound would certify that the defender incurs at most some loss no matter what the attacker does. We consider two classes of defenses: • Fixed defenses, where F does not depend on Dp. One example for text classification is letting F be documents that contain only licensed words (Newell et al., 2014). Other examples are oracle defenders that depend on the true distribution p⇤. While such defenders are not implementable in practice, they provide bounds: if even an oracle can be attacked, then we should be worried. • Data-dependent defenses, where F depends on Dc [ Dp. These defenders try to estimate p⇤ from Dc [ Dp and thus are implementable in practice. However, they open up a new line of attack wherein the attacker chooses the poisoned data Dp to change the feasible set F. Example defenses for binary classification. Let µ+ def = E[x | y = +1] and µ− def = E[x | y = −1] be the centroids of the positive and negative classes. A natural defense strategy is to remove points that are too far away from the corresponding centroid. We consider two ways of doing this: the sphere defense, which removes points outside a spherical radius, and the slab defense, which first projects points onto the line between the centroids and then discards points that are too far on this line: Fsphere def = {(x, y) : kx −µyk2 ry}, Fslab def = {(x, y) : |hx −µy, µy −µ−yi| sy}. (2) Here ry, sy are thresholds (e.g., chosen so that 30% of the data is removed). Note that both defenses are oracles (µy depends on p⇤); in Section 5, we consider versions that estimate µ from Dc [ Dp. Figure 1 depicts both defenses on the MNIST-1-7 and IMDB datasets. Intuitively, the constraints on MNIST-1-7 make it difficult for an attacker, whereas IMDB looks far more attackable. In the next section, we will see how to make these intuitions concrete. 3 Algorithm 1 Online learning algorithm for generating an upper bound and candidate attack. Input: clean data Dc of size n, feasible set F, radius ⇢, poisoned fraction ✏, step size ⌘. Initialize z(0) 0, λ(0) 1 ⌘, ✓(0) 0, U ⇤ 1. for t = 1, . . . , ✏n do Compute (x(t), y(t)) = argmax(x,y)2F `(✓(t−1); x, y). U ⇤ min " U ⇤, 1 nL(✓(t−1); Dc) + ✏`(✓(t−1); x(t), y(t)) # . g(t) 1 nrL(✓(t−1); Dc) + ✏r`(✓(t−1); x(t), y(t)). Update: z(t) z(t−1) −g(t), λ(t) max(λ(t−1), kz(t)k2 ⇢ ), ✓(t) z(t) λ(t) . end for Output: upper bound U ⇤and candidate attack Dp = {(x(t), y(t))}✏n t=1. 3 Attack, Defense, and Duality Recall that we are interested in the worst-case test loss maxDp L(ˆ✓). To make progress, we consider three approximations. First, (i) we pass from the test loss to the training loss on the clean data, and (ii) we consider the training loss on the full (clean + poisoned) data, which upper bounds the loss on the clean data due to non-negativity of the loss. For any model ✓, we then have: L(✓) (i)⇡1 nL(✓; Dc) (ii) 1 nL(✓; Dc [ Dp). (3) The approximation (i) could potentially be invalid due to overfitting; however, if we regularize the model appropriately then we can show that train and test are close by standard concentration arguments (see Appendix B for details). Note that (ii) is always a valid upper bound, and will be relatively tight as long as the model ends up fitting the poisoned data well. For our final approximation, we (iii) have the defender train on Dc [ (Dp \ F) (i.e., it uses the entire clean data set Dc rather than just the inliers Dc \ F). This should not have a large effect as long as the defense is not too aggressive (i.e., as long as F is not so small that it would remove important points from the clean data Dc). We denote the resulting model as ˜✓to distinguish it from ˆ✓. Putting it all together, the worst-case test loss from any attack Dp with ✏n elements is approximately upper bounded as follows: max Dp L(ˆ✓) (i)⇡max Dp 1 nL(ˆ✓; Dc) (ii) max Dp 1 nL(ˆ✓; Dc [ (Dp \ F)) (iii) ⇡max Dp 1 nL(˜✓; Dc [ (Dp \ F)) = max Dp✓F min ✓2⇥ 1 nL(✓; Dc [ Dp) def = M. (4) Here the final step is because ˜✓is chosen to minimize L(✓; Dc [ (Dp \ F)). The minimax loss M defined in (4) is the central quantity that we will focus on in the sequel; it has duality properties that will yield insight into the nature of the optimal attack. Intuitively, the attacker that achieves M is trying to maximize the loss on the full dataset by adding poisoned points from the feasible set F. The approximations (i) and (iii) define the assumptions we need for our certificates to hold; as long as both approximations are valid, M will give an approximate upper bound on the worst-case test loss. 3.1 Fixed Defenses: Computing the Minimax Loss via Online Learning We now focus on computing the minimax loss M in (4) when F is not affected by Dp (fixed defenses). In the process of computing M, we will also produce candidate attacks. Our algorithm is based on no-regret online learning, which models a game between a learner and nature and thus is a natural fit to our data poisoning setting. For simplicity of exposition we assume ⇥is an `2-ball of radius ⇢. Our algorithm, shown in Algorithm 1, is very simple: in each iteration, it alternates between finding the worst attack point (x(t), y(t)) with respect to the current model ✓(t−1) and updating the model in the direction of the attack point, producing ✓(t). The attack Dp is the set of points thus found. 4 To derive the algorithm, we simply swap min and max in (4) to get an upper bound on M, after which the optimal attack set Dp ✓F for a fixed ✓is realized by a single point (x, y) 2 F: M min ✓2⇥max Dp✓F 1 nL(✓; Dc [ Dp) = min ✓2⇥U(✓), where U(✓) def = 1 nL(✓; Dc) + ✏max (x,y)2F `(✓; x, y). (5) Note that U(✓) upper bounds M for any model ✓. Algorithm 1 follows the natural strategy of minimizing U(✓) to iteratively tighten this upper bound. In the process, the iterates {(x(t), y(t))} form a candidate attack Dp whose induced loss 1 nL(˜✓; Dc [ Dp) is a lower bound on M. We can monitor the duality gap between lower and upper bounds on M to ascertain the quality of the bounds. Moreover, since the loss ` is convex in ✓, U(✓) is convex in ✓(regardless of the structure of F, which could even be discrete). In this case, if we minimize U(✓) using any online learning algorithm with sublinear regret, the duality gap vanishes for large datasets. In particular (proof in Appendix A): Proposition 1. Assume the loss ` is convex. Suppose that an online learning algorithm (e.g., Algorithm 1) is used to minimize U(✓), and that the parameters (x(t), y(t)) maximize the loss `(✓(t−1); x, y) for the iterates ✓(t−1) of the online learning algorithm. Let U ⇤= min✏n t=1 U(✓(t)). Also suppose that the learning algorithm has regret Regret(T) after T time steps. Then, for the attack Dp = {(x(t), y(t))}✏n t=1, the corresponding parameter ˜✓satisfies: 1 nL(˜✓; Dc [ Dp) M U ⇤ and U ⇤−1 nL(˜✓; Dc [ Dp) Regret(✏n) ✏n . (6) Hence, any algorithm whose average regret Regret(✏n) ✏n is small will have a nearly optimal candidate attack Dp. There are many algorithms that have this property (Shalev-Shwartz, 2011); the particular algorithm depicted in Algorithm 1 is a variant of regularized dual averaging (Xiao, 2010). In summary, we have a simple learning algorithm that computes an upper bound on the minimax loss along with a candidate attack (which provides a lower bound). Of course, the minimax loss M is only an approximation to the true worst-case test loss (via (4)). We examine the tightness of this approximation empirically in Section 4. 3.2 Data-Dependent Defenses: Upper and Lower Bounds We now turn our attention to data-dependent defenders, where the feasible set F depends on the data Dc [ Dp (and hence can be influenced by the attacker). For example, consider the slab defense (see (2)) that uses the empirical (poisoned) mean instead of the true mean: Fslab(Dp) def = {(x, y) : |hx −ˆµy(Dp), ˆµy(Dp) −ˆµ−y(Dp)i| sy}, (7) where ˆµy(Dp) is the empirical mean over Dc [ Dp; the notation F(Dp) tracks the dependence of the feasible set on Dp. Similarly to Section 3.1, we analyze the minimax loss M, which we can bound as in (5): M min✓2⇥maxDp✓F(Dp) 1 nL(✓; Dc [ Dp). However, unlike in (5), it is no longer the case that the optimal Dp places all points at a single location, due to the dependence of F on Dp; we must jointly maximize over the full set Dp. To improve tractability, we take a continuous relaxation: we think of Dp as a probability distribution with mass 1 ✏n on each point in Dp, and relax this to allow any probability distribution ⇡p. The constraint then becomes supp(⇡p) ✓F(Dp) (where supp denotes the support), and the analogue to (5) is M min ✓2⇥ ˜U(✓), where ˜U(✓) def = 1 nL(✓; Dc) + ✏ max supp(⇡p)✓F(⇡p) E⇡p[`(✓; x, y)]. (8) This suggests again employing Algorithm 1 to minimize ˜U(✓). Indeed, this is what we shall do, but there are a few caveats: • The maximization problem in the definition of ˜U(✓) is in general quite difficult. We will, however, solve a specific instance in Section 5 based on the sphere/slab defense described in Section 2.1. • The constraint set for ⇡p is non-convex, so duality (Proposition 1) no longer holds. In particular, the average of two feasible ⇡p might not itself be feasible. To partially address the second issue, we will run Algorithm 1, at each iteration obtaining a distribution ⇡(t) p and upper bound ˜U(✓(t)). Then, for each ⇡(t) p we will generate a candidate attack by sampling ✏n points from ⇡(t) p , and take the best resulting attack. In Section 4 we will see that despite a lack of rigorous theoretical guarantees, this often leads to good upper bounds and attacks in practice. 5 Figure 2: On the (a) Dogfish and (b) MNIST-1-7 datasets, our candidate attack (solid blue) achieves the upper bound (dashed blue) on the worst-case train loss, as guaranteed by Proposition 1. Moreover, this worst-case loss is low; even after adding 30% poisoned data, the loss stays below 0.1. (c) The gradient descent (dash-dotted) and label flip (dotted) baseline attacks are suboptimal under this defense, with test loss (red) as well as test error and train loss (not shown) all significantly worse than our candidate attack. 4 Experiments I: Oracle Defenses An advantage of our framework is that we obtain a tool that can be easily run on new datasets and defenses to learn about the robustness of the defense and gain insight into potential attacks. We first study two image datasets: MNIST-1-7, and the Dogfish dataset used by Koh and Liang (2017). For MNIST-1-7, following Biggio et al. (2012), we considered binary classification between the digits 1 and 7; this left us with n = 13007 training examples of dimension 784. For Dogfish, which is a binary classification task, we used the same Inception-v3 features as in Koh and Liang (2017), so that each of the n = 1800 training images is represented by a 2048-dimensional vector. For this and subsequent experiments, our loss ` is the hinge loss (i.e., we train an SVM). We consider the combined oracle slab and sphere defense from Section 2.1: F = Fslab \ Fsphere. To run Algorithm 1, we need to maximize the loss over (x, y) 2 F. Note that maximizing the hinge loss `(✓; x, y) is equivalent to minimizing yh✓, xi. Therefore, we can solve the following quadratic program (QP) for each y 2 {+1, −1} and take the one with higher loss: minimizex2Rd yh✓, xi subject to kx −µyk2 2 r2 y, |hx −µy, µy −µ−yi| sy. (9) The results of Algorithm 1 are given in Figures 2a and 2b; here and elsewhere, we used a combination of CVXPY (Diamond and Boyd, 2016), YALMIP (Löfberg, 2004), SeDuMi (Sturm, 1999), and Gurobi (Gurobi Optimization, Inc., 2016) to solve the optimization. We plot the upper bound U ⇤ computed by Algorithm 1, as well as the train and test loss induced by the corresponding attack Dp. Except for small ✏, the model ˜✓fits the poisoned data almost perfectly. We think this is because all feasible attack points that can get past the defense can be easily fit without sacrificing the quality of the rest of the model; in particular, the model chooses to fit the attack points as soon as ✏is large enough that there is incentive to do so. The upshot is that, in this case, the loss L(˜✓; Dc) on the clean data nearly matches its upper bound L(˜✓; Dc [ Dp) (which in turn matches U ⇤). On both datasets, the certified upper bound U ⇤is small (< 0.1 with ✏= 0.3), showing that the datasets are resilient to attack under the oracle defense. We also ran the candidate attack from Algorithm 1 as well as two baselines — gradient descent on the test loss (varying the location of points in Dp, as in Biggio et al. (2012) and Mei and Zhu (2015b)), and a simple baseline that inserts copies of points from Dc with the opposite label (subject to the flipped points lying in F). The results are in in Figure 2c. Our attack consistently performs strongest; label flipping seems to be too weak, while the gradient algorithm seems to get stuck in local minima.2 Though it is not shown in the figure, we note that the maximum test 0-1 error against any attack, for ✏ up to 0.3, was 4%, confirming the robustness suggested by our certificates. Finally, we visualize our attack in Figure 1a. Interestingly, though the attack was free to place points anywhere, most of the attack is tightly concentrated around a single point at the boundary of F. 2Though Mei and Zhu (2015b) state that their cost is convex, they communicated to us that this is incorrect. 6 Figure 3: The (a) Enron and (b) IMDB text datasets are significantly easier to attack under the oracle sphere and slab defense than the image datasets from Figure 2. (c) In particular, our attack achieves a large increase in test loss (solid red) and test error (solid purple) with small ✏for IMDB. The label flip baseline was unsuccessful as before, and the gradient baseline does not apply to discrete data. In (a) and (b), note the large gap between upper and lower bounds, resulting from the upper bound relaxation and the IQP/randomized rounding approximations. 4.1 Text Data: Handling Integrity Constraints We next consider attacks on text data. Beyond the the sphere and slab constraints, a valid attack on text data must satisfy additional integrity constraints (Newell et al., 2014): for text, the input x consists of binary indicator features (e.g., presence of the word “banana”) rather than arbitrary reals.3 Algorithm 1 still applies in this case — the only difference is that the QP from Section 4 has the added constraint x 2 Zd ≥0 and hence becomes an integer quadratic program (IQP), which can be computationally expensive to solve. We can still obtain upper bounds simply by relaxing the integrity constraints; the only issue is that the points x(t) in the corresponding attack will have continuous values, and hence don’t correspond to actual text inputs. To address this, we use the IQP solver from Gurobi (Gurobi Optimization, Inc., 2016) to find an approximately optimal feasible x. This yields a valid candidate attack, but it might not be optimal if the solver doesn’t find near-optimal solutions. We ran both the upper bound relaxation and the IQP solver on two text datasets, the Enron spam corpus (Metsis et al., 2006) and the IMDB sentiment corpus (Maas et al., 2011). The Enron training set consists of n = 4137 e-mails (30% spam and 70% non-spam), with d = 5166 distinct words. The IMDB training set consists of n = 25000 product reviews with d = 89527 distinct words. We used bag-of-words features, which yields test accuracy 97% and 88%, respectively, in the absence of poisoned data. IMDB was too large for Gurobi to even approximately solve the IQP, so we resorted to a randomized rounding heuristic to convert the continuous relaxation to an integer solution. Results are given in Figure 3; there is a relatively large gap between the upper bound and the attack. Despite this, the attacks are relatively successful. Most striking is the attack on IMDB, which increases test error from 12% to 23% for ✏= 0.03, despite having to pass the oracle defender. To understand why the attacks are so much more successful in this case, we can consult Figure 1b. In contrast to MNIST-1-7, for IMDB the defenses place few constraints on the attacker. This seems to be a consequence of the high dimensionality of IMDB and the large number of irrelevant features, which increase the size of F without a corresponding increase in separation between the classes. 5 Experiments II: Data-Dependent Defenses We now revisit the MNIST-1-7 and Dogfish datasets. Before, we saw that they were unattackable provided we had an oracle defender that knew the true class means. If we instead consider a data-dependent defender that uses the empirical (poisoned) means, how much can this change the attackability of these datasets? In this section, we will see that the answer is quite a lot. As described in Section 3.2, we can still use our framework to obtain upper and lower bounds even in this data-dependent case, although the bounds won’t necessarily match. The main difficulty is in computing ˜U(✓), which involves a potentially intractable maximization (see (8)). However, for 2-class SVMs there is a tractable semidefinite programming algorithm; the full details are in 3Note that in the previous section, we ignored such integrity constraints for simplicity. 7 Figure 4: The data-dependent sphere and slab defense is significantly weaker than its oracle counterpart, allowing MNIST-1-7 and Dogfish to be successfully attacked. (a) On MNIST-1-7, our attack achieves a test loss of 0.69 (red) and error of 0.40 (not shown) at ✏= 0.3, more than 10⇥its oracle counterpart (gold). At low ✏0.05, the dataset is safe, with a max train loss of 0.12. We saw qualitatively similar results on Dogfish. (b) Data-dependent sanitization can be significantly poisoned by coordinated adversarial data. We show here our attack for ✏= 0.3, which places almost all of its attacking mass on the red X. This shifts the empirical centroid, rotating the slab constraint (from red to orange) and allowing the red X to be placed far on the other side of the blue centroid. Appendix D, but the rough idea is the following: we can show that the optimal distribution ⇡p in (8) is supported on at most 4 points (one support vector and one non-support vector in each class). Moreover, for a fixed ⇡p, the constraints and objective depend only on inner products between a small number of points: the 4 attack points, the class means µ (on the clean data), and the model ✓. Thus, we can solve for the optimal attack locations with a semidefinite program on a 7 ⇥7 matrix. Then in an outer loop, we randomly sample ⇡p from the probability simplex and take the one with the highest loss. Running this algorithm on MNIST-1-7 yields the results in Figure 4a. On the test set, our ✏= 0.3 attack leads to a hinge loss of 0.69 (up from 0.03) and a 0-1 loss of 0.40 (up from 0.01). Similarly, on Dogfish, our ✏= 0.3 attack gives a hinge loss of 0.59 (up from 0.05) and a 0-1 loss of 0.22 (up from 0.01). The geometry of the attack is depicted in Figure 4b. By carefully choosing the location of the attack, the attacker can place points that lie substantially outside the original (clean) feasible set. This is because the poisoned data can substantially change the the direction of the slab constraint, while the sphere constraint by itself is not enough to effectively filter out attacks. There thus appears to be significant danger in employing data-dependent defenders—beyond the greater difficulty of analyzing them, they seem to actually be more vulnerable to attack. 6 Related Work Due to their increased use in security-critical settings such as malware detection, there has been an explosion of work on the security of machine learning systems; see Barreno et al. (2010), Biggio et al. (2014a), Papernot et al. (2016b), and Gardiner and Nagaraja (2016) for some recent surveys. Our contribution relates to the long line of work on data poisoning attacks; beyond linear classifiers, others have studied the LASSO (Xiao et al., 2015a), clustering (Biggio et al., 2013; 2014c), PCA (Rubinstein et al., 2009), topic modeling (Mei and Zhu, 2015a), collaborative filtering (Li et al., 2016), neural networks (Yang et al., 2017), and other models (Mozaffari-Kermani et al., 2015; Vuurens et al., 2011; Wang, 2016). There have also been a number of demonstrated vulnerabilities in deployed systems (Newsome et al., 2006; Laskov and Šrndi`c, 2014; Biggio et al., 2014b). We provide formal scaffolding to this line of work by supplying a tool that can certify defenses against a range of attacks. A striking recent security vulnerability discovered in machine learning systems is adversarial test images that can fool image classifiers despite being imperceptible from normal images (Szegedy et al., 2014; Goodfellow et al., 2015; Carlini et al., 2016; Kurakin et al., 2016; Papernot et al., 2016a). These images exhibit vulnerabilities at test time, whereas data poisoning is a vulnerability at training time. However, recent adversarial attacks on reinforcement learners (Huang et al., 2017; Behzadan and Munir, 2017; Lin et al., 2017) do blend train and test vulnerabilities. A common defense against adversarial test examples is adversarial training (Goodfellow et al., 2015), which alters the training objective to encourage robustness. 8 We note that generative adversarial networks (Goodfellow et al., 2014), despite their name, are not focused on security but rather provide a game-theoretic objective for training generative models. Finally, a number of authors have studied the theoretical question of learning in the presence of adversarial errors, under a priori distributional assumptions on the data. Robust algorithms have been exhibited for mean and covariance estimation and clustering (Diakonikolas et al., 2016; Lai et al., 2016; Charikar et al., 2017), classification (Klivans et al., 2009; Awasthi et al., 2014), regression (Nasrabadi et al., 2011; Nguyen and Tran, 2013; Chen et al., 2013; Bhatia et al., 2015) and crowdsourced data aggregation (Steinhardt et al., 2016). However, these bounds only hold for specific (sometimes quite sophisticated) algorithms and are focused on good asymptotic performance, rather than on giving good numerical error guarantees for concrete datasets/defenses. 7 Discussion In this paper we have presented a tool for studying data poisoning defenses that goes beyond empirical validation by providing certificates against a large family of attacks modulo the approximations from Section 3. We stress that our bounds are meant to be used as a way to assess defense strategies in the design stage, rather than guaranteeing performance of a deployed learning algorithm (since our method needs to be run on the clean data, which we presumably would not have access to at deployment time). For instance, if we want to build robust defenses for image classifiers, we can assess the performance against attacks on a number of known image datasets, in order to gain more confidence in the robustness of the system that we actually deploy. Having applied our framework to binary SVMs, there are a number of extensions we can consider: e.g., to other loss functions or to multiclass classification. We can also consider defenses beyond the sphere and slab constraints considered here—for instance, sanitizing text data using a language model, or using the covariance structure of the clean data (Lakhina et al., 2004). The main requirement of our framework is the ability to efficiently maximize `(✓; x, y) over all feasible x and y. For margin-based classifiers such as SVMs and logistic regression, this only requires maximizing a linear function over the feasible set, which is often possible (e.g., via dynamic programming) even for discrete sets. Our framework currently does not handle non-convex losses: while our method might still be meaningful as a way of generating attacks, our upper bounds would no longer be valid. The issue is that an attacker could try to thwart the optimization process and cause the defender to end up in a bad local minimum. Finding ways to rule this out without relying on convexity would be quite interesting. Separately, the bound L(ˆ✓) / M was useful because M admits the natural minimax formulation (5), but the worst-case L(ˆ✓) can be expressed directly as a bilevel optimization problem (Mei and Zhu, 2015b), which is intractable in general but admits a number of heuristics (Bard, 1999). Bilevel optimization has been considered in the related setting of Stackelberg games (Brückner and Scheffer, 2011; Brückner et al., 2012; Zhou and Kantarcioglu, 2016), and is natural to apply here as well. To conclude, we quote Biggio et al., who call for the following methodology for evaluating defenses: To pursue security in the context of an arms race it is not sufficient to react to observed attacks, but it is also necessary to proactively anticipate the adversary by predicting the most relevant, potential attacks through a what-if analysis; this allows one to develop suitable countermeasures before the attack actually occurs, according to the principle of security by design. The existing paradigm for such proactive anticipation is to design various hypothetical attacks against which to test the defenses. However, such an evaluation is fundamentally limited because it leaves open the possibility that there is a more clever attack that we failed to think of. Our approach provides a first step towards surpassing this limitation, by not just anticipating but certifying the reliability of a defender, thus implicitly considering an infinite number of attacks before they occur. Reproducibility. The code and data for replicating our experiments is available on GitHub (http: //bit.ly/gt-datapois) and Codalab Worksheets (http://bit.ly/cl-datapois). Acknowledgments. JS was supported by a Fannie & John Hertz Foundation Fellowship and an NSF Graduate Research Fellowship. This work was also partially supported by a Future of Life Institute grant and a grant from the Open Philanthropy Project. We are grateful to Daniel Selsam, Zhenghao Chen, and Nike Sun, as well as to the anonymous reviewers, for a great deal of helpful feedback. 9 References P. Awasthi, M. F. Balcan, and P. M. Long. The power of localization for efficiently learning linear separators with noise. In Symposium on Theory of Computing (STOC), pages 449–458, 2014. J. F. Bard. Practical Bilevel Optimization: Algorithms and Applications. Springer, 1999. M. Barreno, B. Nelson, A. D. Joseph, and J. D. Tygar. The security of machine learning. Machine Learning, 81(2):121–148, 2010. V. Behzadan and A. Munir. Vulnerability of deep reinforcement learning to policy induction attacks. arXiv, 2017. K. Bhatia, P. Jain, and P. Kar. Robust regression via hard thresholding. In Advances in Neural Information Processing Systems (NIPS), pages 721–729, 2015. B. Biggio, B. Nelson, and P. Laskov. Poisoning attacks against support vector machines. In International Conference on Machine Learning (ICML), pages 1467–1474, 2012. B. Biggio, I. Pillai, S. R. Bulò, D. Ariu, M. Pelillo, and F. Roli. Is data clustering in adversarial settings secure? In Workshop on Artificial Intelligence and Security (AISec), 2013. B. Biggio, G. Fumera, and F. Roli. Security evaluation of pattern classifiers under attack. IEEE Transactions on Knowledge and Data Engineering, 26(4):984–996, 2014a. B. Biggio, K. Rieck, D. Ariu, C. Wressnegger, I. Corona, G. Giacinto, and F. Roli. Poisoning behavioral malware clustering. In Workshop on Artificial Intelligence and Security (AISec), 2014b. B. Biggio, B. S. Rota, P. Ignazio, M. Michele, M. E. Zemene, P. Marcello, and R. Fabio. Poisoning complete-linkage hierarchical clustering. In Workshop on Structural, Syntactic, and Statistical Pattern Recognition, 2014c. M. A. Bishop. The art and science of computer security. Addison-Wesley Longman Publishing Co., Inc., 2002. M. Brückner and T. Scheffer. Stackelberg games for adversarial prediction problems. In SIGKDD, pages 547–555, 2011. M. Brückner, C. Kanzow, and T. Scheffer. Static prediction games for adversarial learning problems. Journal of Machine Learning Research (JMLR), 13:2617–2654, 2012. C. Burkard and B. Lagesse. Analysis of causative attacks against SVMs learning from data streams. In International Workshop on Security And Privacy Analytics, 2017. N. Carlini, P. Mishra, T. Vaidya, Y. Zhang, M. Sherr, C. Shields, D. Wagner, and W. Zhou. Hidden voice commands. In USENIX Security, 2016. M. Charikar, J. Steinhardt, and G. Valiant. Learning from untrusted data. In Symposium on Theory of Computing (STOC), 2017. Y. Chen, C. Caramanis, and S. Mannor. Robust high dimensional sparse regression and matching pursuit. arXiv, 2013. G. F. Cretu, A. Stavrou, M. E. Locasto, S. J. Stolfo, and A. D. Keromytis. Casting out demons: Sanitizing training data for anomaly sensors. In IEEE Symposium on Security and Privacy, pages 81–95, 2008. I. Diakonikolas, G. Kamath, D. Kane, J. Li, A. Moitra, and A. Stewart. Robust estimators in high dimensions without the computational intractability. In Foundations of Computer Science (FOCS), 2016. S. Diamond and S. Boyd. CVXPY: A Python-embedded modeling language for convex optimization. Journal of Machine Learning Research (JMLR), 17(83):1–5, 2016. J. Gardiner and S. Nagaraja. On the security of machine learning in malware c&c detection: A survey. ACM Computing Surveys (CSUR), 49(3), 2016. 10 I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems (NIPS), 2014. I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015. Gurobi Optimization, Inc. Gurobi optimizer reference manual, 2016. S. Huang, N. Papernot, I. Goodfellow, Y. Duan, and P. Abbeel. Adversarial attacks on neural network policies. arXiv, 2017. S. M. Kakade, K. Sridharan, and A. Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In Advances in Neural Information Processing Systems (NIPS), 2009. A. Kerckhoffs. La cryptographie militaire. Journal des sciences militaires, 9, 1883. A. R. Klivans, P. M. Long, and R. A. Servedio. Learning halfspaces with malicious noise. Journal of Machine Learning Research (JMLR), 10:2715–2740, 2009. P. W. Koh and P. Liang. Understanding black-box predictions via influence functions. In International Conference on Machine Learning (ICML), 2017. A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial examples in the physical world. arXiv, 2016. K. A. Lai, A. B. Rao, and S. Vempala. Agnostic estimation of mean and covariance. In Foundations of Computer Science (FOCS), 2016. R. Laishram and V. V. Phoha. Curie: A method for protecting SVM classifier from poisoning attack. arXiv, 2016. A. Lakhina, M. Crovella, and C. Diot. Diagnosing network-wide traffic anomalies. In ACM SIGCOMM Computer Communication Review, volume 34, pages 219–230, 2004. P. Laskov and N. Šrndi`c. Practical evasion of a learning-based classifier: A case study. In Symposium on Security and Privacy, 2014. B. Li, Y. Wang, A. Singh, and Y. Vorobeychik. Data poisoning attacks on factorization-based collaborative filtering. In Advances in Neural Information Processing Systems (NIPS), 2016. Y. Lin, Z. Hong, Y. Liao, M. Shih, M. Liu, and M. Sun. Tactics of adversarial attack on deep reinforcement learning agents. arXiv, 2017. J. Liu and X. Zhu. The teaching dimension of linear learners. Journal of Machine Learning Research (JMLR), 17(162), 2016. J. Löfberg. YALMIP: A toolbox for modeling and optimization in MATLAB. In CACSD, 2004. A. L. Maas, R. E. Daly, P. T. Pham, D. Huang, A. Y. Ng, and C. Potts. Learning word vectors for sentiment analysis. In Association for Computational Linguistics (ACL), 2011. S. Mei and X. Zhu. The security of latent Dirichlet allocation. In Artificial Intelligence and Statistics (AISTATS), 2015a. S. Mei and X. Zhu. Using machine teaching to identify optimal training-set attacks on machine learners. In Association for the Advancement of Artificial Intelligence (AAAI), 2015b. V. Metsis, I. Androutsopoulos, and G. Paliouras. Spam filtering with naive Bayes – which naive Bayes? In CEAS, volume 17, pages 28–69, 2006. M. Mozaffari-Kermani, S. Sur-Kolay, A. Raghunathan, and N. K. Jha. Systematic poisoning attacks on and defenses for machine learning in healthcare. IEEE Journal of Biomedical and Health Informatics, 19(6):1893–1905, 2015. 11 N. M. Nasrabadi, T. D. Tran, and N. Nguyen. Robust lasso with missing and grossly corrupted observations. In Advances in Neural Information Processing Systems (NIPS), 2011. A. Newell, R. Potharaju, L. Xiang, and C. Nita-Rotaru. On the practicality of integrity attacks on document-level sentiment analysis. In Workshop on Artificial Intelligence and Security (AISec), pages 83–93, 2014. J. Newsome, B. Karp, and D. Song. Paragraph: Thwarting signature learning by training maliciously. In International Workshop on Recent Advances in Intrusion Detection, 2006. N. H. Nguyen and T. D. Tran. Exact recoverability from dense corrupted observations via `1minimization. IEEE Transactions on Information Theory, 59(4):2017–2035, 2013. N. Papernot, P. McDaniel, and I. Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv, 2016a. N. Papernot, P. McDaniel, A. Sinha, and M. Wellman. Towards the science of security and privacy in machine learning. arXiv, 2016b. S. Park, J. Weimer, and I. Lee. Resilient linear classification: an approach to deal with attacks on training data. In International Conference on Cyber-Physical Systems, pages 155–164, 2017. B. Rubinstein, B. Nelson, L. Huang, A. D. Joseph, S. Lau, S. Rao, N. Taft, and J. Tygar. Antidote: Understanding and defending against poisoning of anomaly detectors. In ACM SIGCOMM Conference on Internet measurement conference, 2009. S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. J. Steinhardt, S. Wager, and P. Liang. The statistics of streaming sparse regression. arXiv preprint arXiv:1412.4182, 2014. J. Steinhardt, G. Valiant, and M. Charikar. Avoiding imposters and delinquents: Adversarial crowdsourcing and peer prediction. In Advances in Neural Information Processing Systems (NIPS), 2016. J. F. Sturm. Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optimization Methods and Software, 11:625–653, 1999. C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations (ICLR), 2014. F. Tramèr, F. Zhang, A. Juels, M. K. Reiter, and T. Ristenpart. Stealing machine learning models via prediction APIs. In USENIX Security, 2016. J. Vuurens, A. P. de Vries, and C. Eickhoff. How much spam can you take? An analysis of crowdsourcing results to increase accuracy. ACM SIGIR Workshop on Crowdsourcing for Information Retrieval, 2011. G. Wang. Combating Attacks and Abuse in Large Online Communities. PhD thesis, University of California Santa Barbara, 2016. H. Xiao, H. Xiao, and C. Eckert. Adversarial label flips attack on support vector machines. In European Conference on Artificial Intelligence, 2012. H. Xiao, B. Biggio, G. Brown, G. Fumera, C. Eckert, and F. Roli. Is feature selection secure against training data poisoning? In International Conference on Machine Learning (ICML), 2015a. H. Xiao, B. Biggio, B. Nelson, H. Xiao, C. Eckert, and F. Roli. Support vector machines under adversarial label contamination. Neurocomputing, 160:53–62, 2015b. L. Xiao. Dual averaging methods for regularized stochastic learning and online optimization. Journal of Machine Learning Research (JMLR), 11:2543–2596, 2010. 12 C. Yang, Q. Wu, H. Li, and Y. Chen. Generative poisoning attack method against neural networks. arXiv, 2017. Y. Zhou and M. Kantarcioglu. Modeling adversarial learning as nested Stackelberg games. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, 2016. 13 | 2017 | 414 |
6,913 | Towards Generalization and Simplicity in Continuous Control Aravind Rajeswaran∗ Kendall Lowrey∗ Emanuel Todorov Sham Kakade University of Washington Seattle { aravraj, klowrey, todorov, sham } @ cs.washington.edu Abstract This work shows that policies with simple linear and RBF parameterizations can be trained to solve a variety of widely studied continuous control tasks, including the gym-v1 benchmarks. The performance of these trained policies are competitive with state of the art results, obtained with more elaborate parameterizations such as fully connected neural networks. Furthermore, the standard training and testing scenarios for these tasks are shown to be very limited and prone to over-fitting, thus giving rise to only trajectory-centric policies. Training with a diverse initial state distribution induces more global policies with better generalization. This allows for interactive control scenarios where the system recovers from large on-line perturbations; as shown in the supplementary video. 1 Introduction Deep reinforcement learning (deepRL) has recently achieved impressive results on a number of hard problems, including sequential decision making in game domains [1, 2]. This success has motivated efforts to adapt deepRL methods for control of physical systems, and has resulted in rich motor behaviors [3, 4]. The complexity of systems solvable with deepRL methods is not yet at the level of what can be achieved with trajectory optimization (planning) in simulation [5, 6, 7], or with hand-crafted controllers on physical robots (e.g. Boston Dynamics). However, RL approaches are exciting because they are generic, model-free, and highly automated. Recent success of RL [2, 8, 9, 10, 11] has been enabled largely due to engineering efforts such as large scale data collection [1, 2, 11] or careful systems design [8, 9] with well behaved robots. When advances in a field are largely empirical in nature, it is important to understand the relative contributions of representations, optimization methods, and task design or modeling: both as a sanity check and to scale up to harder tasks. Furthermore, in line with Occam’s razor, the simplest reasonable approaches should be tried and understood first. A thorough understanding of these factors is unfortunately lacking in the community. In this backdrop, we ask the pertinent question: "What are the simplest set of ingredients needed to succeed in some of the popular benchmarks?" To attempt this question, we use the Gym-v1 [12] continuous control benchmarks, which have accelerated research and enabled objective comparisons. Since the tasks involve under-actuation, contact dynamics, and are high dimensional (continuous space), they have been accepted as benchmarks in the deepRL community. Recent works test their algorithms either exclusively or primarily on these tasks [13, 4, 14], and success on these tasks have been regarded as demonstrating a “proof of concept”. Our contributions: Our results and their implications are highlighted below with more elaborate discussions in Section 5: ∗Equal contributions. Project page: https://sites.google.com/view/simple-pol 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1. The success of recent RL efforts to produce rich motor behaviors have largely been attributed to the use of multi-layer neural network architectures. This work is among the first to carefully analyze the role of representation, and our results indicate that very simple policies including linear and RBF parameterizations are able to achieve state of the art results on widely studied tasks. Furthermore, such policies, particularly the linear ones, can be trained significantly faster due to orders of magnitude fewer parameters. This indicates that even for tasks with complex dynamics, there could exist relatively simple policies. This opens the door for studying a wide range of representations in addition to deep neural networks, and understand trade-offs including computational time, theoretical justification, robustness, sample complexity etc. 2. We study these issues not only with regards to the performance metric at hand but we also take the further step in examining them in the context of robustness. Our results indicate that, with conventional training methods, the agent is able to successfully learn a limit cycle for walking, but cannot recover from any perturbations that are delivered to it. For transferring the success of RL to robotics, such brittleness is highly undesirable. 3. Finally, we directly attempt to learn more robust policies through using more diverse training conditions, which favor such policies. This is similar in spirit to the model ensemble approaches [15, 16] and domain randomization approaches [17, 18], which have successfully demonstrated improved robustness and simulation to real world transfer. Under these new and more diverse training scenarios, we again find that there is no compelling evidence to favor the use of multi-layer architectures, at least for the benchmark tasks. On a side note, we also provide interactive testing of learned policies, which we believe is both novel and which sheds light on the robustness of trained policies. 2 Problem Formulation and Methods We consider Markov Decision Processes (MDPs) in the average reward setting, which is defined using the tuple: M = {S, A, R, T , ρ0}. S ⊆Rn, A ⊆Rm, and R : S × A →R are a (continuous) set of states, set of actions, and reward function respectively, and have the usual meaning. T : S × A →S is the stochastic transition function and ρ0 is the probability distribution over initial states. We wish to solve for a stochastic policy of the form π : S × A →R+, which optimizes the objective function: η(π) = lim T →∞ 1 T Eπ,M " T X t=1 rt # . (1) Since we use simulations with finite length rollouts to estimate the objective and gradient, we approximate η(π) using a finite T. In this finite horizon rollout setting, we define the value, Q, and advantage functions as follows: V π(s, t) = Eπ,M " T X t′=t rt′ # Qπ(s, a, t) = EM h R(s, a) i + Es′∼T (s,a) h V π(s′, t + 1) i Aπ(s, a, t) = Qπ(s, a, t) −V π(s, t) Note that even though the value functions are time-varying, we still optimize for a stationary policy. We consider parametrized policies πθ, and hence wish to optimize for the parameters (θ). Thus, we overload notation and use η(π) and η(θ) interchangeably. 2.1 Algorithm Ideally, a controlled scientific study would seek to isolate the challenges related to architecture, task design, and training methods for separate study. In practice, this is not entirely feasible as the results are partly coupled with the training methods. Here, we utilize a straightforward natural policy gradient method for training. The work in [19] suggests that this method is competitive with most state of the art methods. We now discuss the training procedure. Using the likelihood ratio approach and Markov property of the problem, the sample based estimate of the policy gradient is derived to be [20]: ˆ ∇θη(θ) = g = 1 T T X t=0 ∇θ log πθ(at|st) ˆ Aπ(st, at, t) (2) 2 Algorithm 1 Policy Search with Natural Gradient 1: Initialize policy parameters to θ0 2: for k = 1 to K do 3: Collect trajectories {τ (1), . . . τ (N)} by rolling out the stochastic policy π(·; θk). 4: Compute ∇θ log π(at|st; θk) for each (s, a) pair along trajectories sampled in iteration k. 5: Compute advantages Aπ k based on trajectories in iteration k and approximate value function V π k−1. 6: Compute policy gradient according to (2). 7: Compute the Fisher matrix (4) and perform gradient ascent (5). 8: Update parameters of value function in order to approximate V π k (s(n) t ) ≈R(s(n) t ), where R(s(n) t ) is the empirical return computed as R(s(n) t ) = PT t′=t γ(t′−t)r(n) t . Here n indexes over the trajectories. 9: end for Gradient ascent using this “vanilla” gradient is sub-optimal since it is not the steepest ascent direction in the metric of the parameter space [21, 22]. The steepest ascent direction is obtained by solving the following local optimization problem around iterate θk: maximize θ gT (θ −θk) subject to (θ −θk)T Fθk(θ −θk) ≤δ, (3) where Fθk is the Fisher Information Metric at the current iterate θk. We estimate Fθk as ˆFθk = 1 T T X t=0 ∇θ log πθ(at|st)∇θ log πθ(at|st)T , (4) as originally suggested by Kakade [22]. This yields the steepest ascent direction to be ˆF −1 θk g and corresponding update rule: θk+1 = θk + α ˆF −1 θk g. Here α is the step-size or learning rate parameter. Empirically, we observed that choosing a fixed value for α or an appropriate schedule is difficult [23]. Thus, we use the normalized gradient ascent procedure, where the normalization is under the Fisher metric. This procedure can be viewed as picking a normalized step size δ as opposed to α, and solving the optimization problem in (3). This results in the following update rule: θk+1 = θk + s δ gT ˆF −1 θk g ˆF −1 θk g. (5) A dimensional analysis of these quantities reveal that α has the unit of return−1 whereas δ is dimensionless. Though units of α are consistent with a general optimization setting where step-size has units of objective−1, in these problems, picking a good α that is consistent with the scales of the reward was difficult. On the other hand, a constant normalized step size was numerically more stable and easier to tune: for all the results reported in this paper, the same δ = 0.05 was used. When more than one trajectory rollout is used per update, the above estimators can be used with an additional averaging over the trajectories. For estimating the advantage function, we use the GAE procedure [13]. This requires learning a function that approximates V π k , which is used to compute Aπ k along trajectories for the update in (5). GAE helps with variance reduction at the cost of introducing bias, and requires tuning hyperparameters like a discount factor and an exponential averaging term. Good heuristics for these parameters have been suggested in prior work. The same batch of trajectories cannot be used for both fitting the value function baseline, and also to estimate g using (2), since it will lead to overfitting and a biased estimate. Thus, we use the trajectories from iteration k −1 to fit the value function, essentially approximating V π k−1, and use trajectories from iteration k for computing Aπ k and g. Similar procedures have been adopted in prior work [19]. 2.2 Policy Architecture Linear policy: We first consider a linear policy that directly maps from the observations to the motor torques. We use the same observations as used in prior work which includes joint positions, 3 joint velocities, and for some tasks, information related to contacts. Thus, the policy mapping is at ∼N(Wst + b, σ), and the goal is to learn W, b, and σ. For most of these tasks, the observations correspond to the state of the problem (in relative coordinates). Thus, we use the term states and observations interchangeably. In general, the policy is defined with observations as the input, and hence is trying to solve a POMDP. RBF policy: Secondly, we consider a parameterization that enriches the representational capacity using random Fourier features of the observations. Since these features approximate the RKHS features under an RBF Kernel [24], we call this policy parametrization the RBF policy. The features are constructed as: y(i) t = sin P j Pijs(j) t ν + φ(i) ! , (6) where each element Pij is drawn from N(0, 1), ν is a bandwidth parameter chosen approximately as the average pairwise distances between different observation vectors, and φ is a random phase shift drawn from U[−π, π). Thus the policy is at ∼N(Wyt + b, σ), where W, b, and σ are trainable parameters. This architecture can also be interpreted as a two layer neural network: the bottom layer is clamped with random weights, a sinusoidal activation function is used, and the top layer is finetuned. The principal purpose for this representation is to slightly enhance the capacity of a linear policy, and the choice of activation function is not very significant. 3 Results on OpenAI gym-v1 benchmarks As indicated before, we train linear and RBF policies with the natural policy gradient on the popular OpenAI gym-v1 benchmark tasks simulated in MuJoCo [25]. The tasks primarily consist of learning locomotion gaits for simulated robots ranging from a swimmer to a 3D humanoid (23 dof). Figure 1 presents the learning curves along with the performance levels reported in prior work using TRPO and fully connected neural network policies. Table 1 also summarizes the final scores, where “stoc” refers to the stochastic policy with actions sampled as at ∼πθ(st), while “mean” refers to using mean of the Gaussian policy, with actions computed as at = E[πθ(st)]. We see that the linear policy is competitive on most tasks, while the RBF policy can outperform previous results on five of the six considered tasks. Though we were able to train neural network policies that match the results reported in literature, we have used publicly available prior results for an objective comparison. Visualizations of the trained linear and RBF policies are presented in the supplementary video. Given the simplicity of these policies, it is surprising that they can produce such elaborate behaviors. Table 2 presents the number of samples needed for the policy performance to reach a threshold value for reward. The threshold value is computed as 90% of the final score achieved by the stochastic linear policy. We visually verified that policies with these scores are proficient at the task, and hence the chosen values correspond to meaningful performance thresholds. We see that linear and RBF policies are able to learn faster on four of the six tasks. All the simulated robots we considered are under-actuated, have contact discontinuities, and continuous action spaces making them challenging benchmarks. When adapted from model-based control [26, 5, 27] to RL, however, the notion of “success” established was not appropriate. To shape the behavior, a very narrow initial state distribution and termination conditions are used in the benchmarks. As a consequence, the learned policies become highly trajectory centric – i.e. they are good only where they tend to visit during training, which is a very narrow region. For example, the walker can walk very well when initialized upright and close to the walking limit cycle. Even small perturbations, as shown in the supplementary video, alters the visitation distribution and dramatically degrades the policy performance. This makes the agent fall down at which point it is unable to get up. Similarly, the swimmer is unable to turn when its heading direction is altered. For control applications, this is undesirable. In the real world, there will always be perturbations – stochasticity in the environment, modeling errors, or wear and tear. Thus, the specific task design and notion of success used for the simulated characters are not adequate. However, the simulated robots themselves are rather complex and harder tasks could be designed with them, as partly illustrated in Section 4. 4 Figure 1: Learning curves for the Linear and RBF policy architectures. The green line corresponding to the reward achieved by neural network policies on the OpenAI Gym website, as of 02/24/2017 (trained with TRPO). It is observed that for all the tasks, linear and RBF parameterizations are competitive with state of the art results. The learning curves depicted are for the stochastic policies, where the actions are sampled as at ∼πθ(st). The learning curves have been averaged across three runs with different random seeds. Table 1: Final performances of the policies Task Linear RBF NN stoc mean stoc mean TRPO Swimmer 362 366 361 365 131 Hopper 3466 3651 3590 3810 3668 Cheetah 3810 4149 6477 6620 4800 Walker 4881 5234 5631 5867 5594 Ant 3980 4607 4297 4816 5007 Humanoid 5873 6440 6237 6849 6482 Table 2: Number of episodes to achieve threshold Task Th. Linear RBF TRPO+NN Swimmer 325 1450 1550 N-A Hopper 3120 13920 8640 10000 Cheetah 3430 11250 6000 4250 Walker 4390 36840 25680 14250 Ant 3580 39240 30000 73500 Humanoid 5280 79800 96720 87000 4 Modified Tasks and Results Using the same set of simulated robot characters outlined in Section 3, we designed new tasks with two goals in mind: (a) to push the representational capabilities and test the limits of simple policies; (b) to enable training of “global" policies that are robust to perturbations and work from a diverse set of states. To this end, we make the following broad changes, also summarized in Table 3: 1. Wider initial state distribution to force generalization. For example, in the walker task, some fraction of trajectories have the walker initialized prone on the ground. This forces the agent to simultaneously learn a get-up skill and a walk skill, and not forget them as the learning progresses. Similarly, the heading angle for the swimmer and ant are randomized, which encourages learning of a turn skill. 2. Reward shaping appropriate with the above changes to the initial state distribution. For example, when the modified swimmer starts with a randomized heading angle, we include a small reward for adjusting its heading towards the correct direction. In conjunction, we also remove all termination conditions used in the Gym-v1 benchmarks. 3. Changes to environment’s physics parameters, such as mass and joint torque. If the agent has sufficient power, most tasks are easily solved. By reducing an agent’s action ability and/or increasing its mass, the agent is more under-actuated. These changes also produce more realistic looking motion. 5 Figure 2: Hopper completes a get-up sequence before moving to its normal forward walking behavior. The getup sequence is learned along side the forward hopping in the modified task setting. Table 3: Modified Task Description vx is forward velocity; θ is the heading angle; pz is the height of torso; and a is the action. Task Description Reward (des = desired value) Swimmer (3D) Agent swims in the desired direction. Should recover (turn) if rotated around. vx −0.1|θ −θdes| −0.0001||a||2 Hopper (2D) Agent hops forward as fast as possible. Should recover (get up) if pushed down. vx −3||pz −pdes z ||2 −0.1||a||2 Walker (2D) Agent walks forward as fast as possible. Should recover (get up) if pushed down. vx −3||pz −pdes z ||2 −0.1||a||2 Ant (3D) Agent moves in the desired direction. Should recover (turn) if rotated around. vx −3||pz −pdes z ||2 −0.01||a||2 Combined, these modifications require that the learned policies not only make progress towards maximizing the reward, but also recover from adverse conditions and resist perturbations. An example of this is illustrated in Figure 4, where the hopper executes a get-up sequence before hopping to make forward progress. Furthermore, at test time, a user can interactively apply pushing and rotating perturbations to better understand the failure modes. We note that these interactive perturbations may not be the ultimate test for robustness, but a step towards this direction. Representational capacity The supplementary video demonstrates the trained policies. We concentrate on the results of the walker task in the main paper. Figure 3 studies the performance as we vary the representational capacity. Increasing the Fourier features allows for more expressive policies and consequently allow for achieving a higher score. The policy with 500 Fourier features performs the best, followed by the fully connected neural network. The linear policy also makes forward progress and can get up from the ground, but is unable to learn as efficient a walking gait. (a) (b) Figure 3: (a) Learning curve on modified walker (diverse initialization) for different policy architectures. The curves are averaged over three runs with different random seeds. (b) Learning curves when using different number of conjugate gradient iterations to compute ˆF −1 θk g in (5). A policy with 300 Fourier features has been used to generate these results. 6 Figure 4: We test policy robustness by measuring distanced traveled in the swimmer, walker, and hopper tasks for three training configurations: (a) with termination conditions; (b) no termination, and peaked initial state distribution; and (c) with diverse initialization. Swimmer does not have a termination option, so we consider only two configurations. For the case of swimmer, the perturbation is changing the heading angle between −π/2.0 and π/2.0, and in the case of walker and hopper, an external force for 0.5 seconds along its axis of movement. All agents are initialized with the same positions and velocities. Perturbation resistance Next, we test the robustness of our policies by perturbing the system with an external force. This external force represents an unforeseen change which the agent has to resist or overcome, thus enabling us to understand push and fall recoveries. Fall recoveries of the trained policies are demonstrated in the supplementary video. In these tasks, perturbations are not applied to the system during the training phase. Thus, the ability to generalize and resist perturbations come entirely out of the states visited by the agent during training. Figure 4 indicates that the RBF policy is more robust, and also that diverse initializations are important to obtain the best results. This indicates that careful design of initial state distributions are crucial for generalization, and to enable the agent to learn a wide range of skills. 5 Summary and Discussion The experiments in this paper were aimed at trying to understand the effects of (a) representation; (b) task modeling; and (c) optimization. We summarize the results with regard to each aforementioned factor and discuss their implications. Representation The finding that linear and RBF policies can be trained to solve a variety of continuous control tasks is very surprising. Recently, a number of algorithms have been shown to successfully solve these tasks [3, 28, 4, 14], but all of these works use multi-layer neural networks. This suggests a widespread belief that expressive function approximators are needed to capture intricate details necessary for movements like running. The results in this work conclusively demonstrates that this is not the case, at least for the limited set of popular testbeds. This raises an interesting question: what are the capability limits of shallow policy architectures? The linear policies were not exemplary in the “global” versions of the tasks, but it must be noted that they were not terrible either. The RBF policy using random Fourier features was able to successfully solve the modified tasks producing global policies, suggesting that we do not yet have a sense of its limits. Modeling When using RL methods to solve practical problems, the world provides us with neither the initial state distribution nor the reward. Both of these must be designed by the researcher and must be treated as assumptions about the world or prescriptions about the required behavior. The quality of assumptions will invariably affect the quality of solutions, and thus care must be taken in this process. Here, we show that starting the system from a narrow initial state distribution produces 7 elaborate behaviors, but the trained policies are very brittle to perturbations. Using a more diverse state distribution, in these cases, is sufficient to train robust policies. Optimization In line with the theme of simplicity, we first tried to use REINFORCE [20], which we found to be very sensitive to hyperparameter choices, especially step-size. There are a class of policy gradient methods which use pre-conditioning to help navigate the warped parameter space of probability distributions and for step size selection. Most variants of pre-conditioned policy gradient methods have been reported to achieve state of the art performance, all performing about the same [19]. We feel that the used natural policy gradient method is the most straightforward pre-conditioned method. To demonstrate that the pre-conditioning helps, Figure 3 depicts the learning curve for different number of CG iterations used to compute the update in (5). The curve corresponding to CG = 0 is the REINFORCE method. As can be seen, pre-conditioning helps with the learning process. However, there is a trade-off with computation, and hence using an intermediate number of CG steps like 20 could lead to best results in wall-clock sense for large scale problems. We chose to compare with neural network policies trained with TRPO, since it has demonstrated impressive results and is closest to the algorithm used in this work. Are function approximators linear with respect to free parameters sufficient for other methods is an interesting open question (in this sense, RBFs are linear but NNs are not). For a large class of methods based on dynamic programming (including Q-learning, SARSA, approximate policy and value iteration), linear function approximation has guaranteed convergence and error bounds, while non-linear function approximation is known to diverge in many cases [29, 30, 31, 32]. It may of course be possible to avoid divergence in specific applications, or at least slow it down long enough, for example via target networks or replay buffers. Nevertheless, guaranteed convergence has clear advantages. Similar to recent work using policy gradient methods, recent work using dynamic programming methods have adopted multi-layer networks without careful side-by-side comparisons to simpler architectures. Could a global quadratic approximation to the optimal value function (which is linear in the set of quadratic features) be sufficient to solve most of the continuous control tasks currently studied in RL? Given that quadratic value functions correspond to linear policies, and good linear policies exist as shown here, this might make for interesting future work. 6 Conclusion In this work, we demonstrated that very simple policy parameterizations can be used to solve many benchmark continuous control tasks. Furthermore, there is no significant loss in performance due to the use of such simple parameterizations. We also proposed global variants of many widely studied tasks, which requires the learned policies to be competent for a much larger set of states, and found that simple representations are sufficient in these cases as well. These empirical results along with Occam’s razor suggests that complex policy architectures should not be a default choice unless sideby-side comparisons with simpler alternatives suggest otherwise. Such comparisons are unfortunately not widely pursued. The results presented in this work directly highlight the need for simplicity and generalization in RL. We hope that this work would encourage future work analyzing various architectures and associated trade-offs like computation time, robustness, and sample complexity. Acknowledgements This work was supported in part by the NSF. The authors would like to thank Vikash Kumar, Igor Mordatch, John Schulman, and Sergey Levine for valuable comments. References [1] V. Mnih et al. Human-level control through deep reinforcement learning. Nature, 518, 2015. [2] D. Silver et al. Mastering the game of go with deep neural networks and tree search. Nature, 529, 2016. [3] J. Schulman, S. Levine, P. Moritz, M. Jordan, and P. Abbeel. Trust region policy optimization. In ICML, 2015. 8 [4] T. Lillicrap, J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. ArXiv e-prints, September 2015. [5] Y. Tassa, T. Erez, and E. Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. International Conference on Intelligent Robots and Systems, 2012. [6] I. Mordatch, E. Todorov, and Z. Popovic. Discovery of complex behaviors through contactinvariant optimization. ACM SIGGRAPH, 2012. [7] M. Al Borno, M. de Lasa, and A. Hertzmann. Trajectory Optimization for Full-Body Movements with Complex Contacts. IEEE Transactions on Visualization and Computer Graphics, 2013. [8] Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. JMLR, 17(39):1–40, 2016. [9] V. Kumar, E. Todorov, and S. Levine. Optimal control with learned local models: Application to dexterous manipulation. In ICRA, 2016. [10] V. Kumar, A. Gupta, E. Todorov, and S. Levine. Learning dexterous manipulation policies from experience and imitation. ArXiv e-prints, 2016. [11] Lerrel Pinto and Abhinav Gupta. Supersizing self-supervision: Learning to grasp from 50k tries and 700 robot hours. In ICRA, 2016. [12] G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. OpenAI Gym, 2016. [13] J. Schulman, P. Moritz, S. Levine, M. Jordan, and P. Abbeel. High-dimensional continuous control using generalized advantage estimation. In ICLR, 2016. [14] Shixiang Gu, Timothy Lillicrap, Zoubin Ghahramani, Richard E. Turner, and Sergey Levine. Q-Prop: Sample-Efficient Policy Gradient with An Off-Policy Critic. In ICLR, 2017. [15] I. Mordatch, K. Lowrey, and E.Todorov. Ensemble-CIO: Full-body dynamic motion planning that transfers to physical humanoids. In IROS, 2015. [16] A. Rajeswaran, S. Ghotra, B. Ravindran, and S. Levine. EPOpt: Learning Robust Neural Network Policies Using Model Ensembles. In ICLR, 2017. [17] Fereshteh Sadeghi and Sergey Levine. (CAD)2RL: Real Single-Image Flight without a Single Real Image. ArXiv e-prints, 2016. [18] Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. ArXiv e-prints, 2017. [19] Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning for continuous control. In ICML, 2016. [20] Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3):229–256, 1992. [21] S. Amari. Natural gradient works efficiently in learning. Neural Computation, 10:251–276, 1998. [22] S. Kakade. A natural policy gradient. In NIPS, 2001. [23] Jan Peters. Machine learning of motor skills for robotics. PhD Dissertation, University of Southern California, 2007. [24] A. Rahimi and B. Recht. Random Features for Large-Scale Kernel Machines. In NIPS, 2007. [25] E. Todorov, T. Erez, and Y. Tassa. MuJoCo: A physics engine for model-based control. In International Conference on Intelligent Robots and Systems, 2012. 9 [26] Tom Erez, Yuval Tassa, and Emanuel Todorov. Infinite-horizon model predictive control for periodic tasks with contacts. In RSS, 2011. [27] T. Erez, K. Lowrey, Y. Tassa, V. Kumar, S. Kolev, and E. Todorov. An integrated system for real-time model predictive control of humanoid robots. In Humanoids, pages 292–299, 2013. [28] Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In NIPS, 2015. [29] Alborz Geramifard, Thomas J Walsh, Stefanie Tellex, Girish Chowdhary, Nicholas Roy, and Jonathan P How. A tutorial on linear function approximators for dynamic programming and reinforcement learning. Foundations and Trends R⃝in Machine Learning, 6(4):375–451, 2013. [30] Jennie Si. Handbook of learning and approximate dynamic programming, volume 2. John Wiley & Sons, 2004. [31] Dimitri P Bertsekas. Approximate dynamic programming. 2008. [32] Residual algorithms: Reinforcement learning with function approximation. In ICML, 1995. 10 A Choice of Step Size Compare α vs δ here. An important design choice in the version of NPG presented in this work is normalized vs un-normalized step size. The normalized step size corresponds to solving the optimization problem in equation (3), and leads to the following update rule: θk+1 = θk + s δ gT ˆF −1 θk g ˆF −1 θk g. On the other hand, an un-normalized step size corresponds to the update rule: θk+1 = θk + α ˆF −1 θk g. The principal difference between the update rules correspond to the units of the learning rate parameters α and δ. In accordance with general first order optimization methods, α scales inversely with the reward (note that F does not have the units of reward). This makes the choice of α highly problem specific, and we find that it is hard to tune. Furthermore, we observed that the same values of α cannot be used throughout the learning phase, and requires re-scaling. Though this is common practice in supervised learning, where the learning rate is reduced after some number of epochs, it is hard to employ a similar approach in RL. Often, large steps can destroy a reasonable policy, and recovering from such mistakes is extremely hard in RL since the variance of gradient estimate for a poorly performing policy is higher. Employing the normalized step size was found to be more robust. These results are illustrated in Figure 5 10 20 30 40 50 - 400 - 200 0 200 Swimmer: α vs δ Training Iterations Return α=0.01 α=0.05 α=0.1 α=0.25 α=1.0 α=2.0 δ=0.01 δ=0.05 δ=0.1 20 40 60 80 - 2000 0 2000 Hopper: α vs δ Training Iterations Return α=0.01 α=0.05 α=0.1 α=0.25 α=1.0 α=2.0 δ=0.01 δ=0.05 δ=0.1 50 100 150 200 250 - 4000 - 3000 - 2000 - 1000 0 1000 Walker: α vs δ Training Iterations Return α=0.01 α=0.05 α=0.1 α=0.25 α=1.0 α=2.0 δ=0.01 δ=0.05 δ=0.1 Figure 5: Learning curves using normalized and un-normalized step size rules for the diverse versions of swimmer, hopper, and walker tasks. We observe that the same normalized step size (δ) works across multiple problems. However, the un-normalized step size values that are optimal for one task do not work for other tasks. In fact, they often lead to divergence in the learning process. We replace the learning curves with flat lines in cases where we observed divergence, such as α = 0.25 in case of walker. This suggests that normalized step size rule is more robust, with the same learning rate parameter working across multiple tasks. B Effect of GAE For the purpose of advantage estimation, we use the GAE [13] procedure in this work. GAE uses an exponential average of temporal difference errors to reduce the variance of policy gradients at the expense of bias. Since the paper explores the theme of simplicity, a pertinent question is how well GAE performs when compared to more straightforward alternatives like using a pure temporal difference error, and pure Monte Carlo estimates. The λ parameter in GAE allows for an interpolation between these two extremes. In our experiments, summarized in Figure 6, we observe that reducing variance even at the cost of a small bias (λ = 0.97) provides for fast learning in the initial stages. This is consistent with the findings in Schulman et al. [13] and also make intuitive sense. Initially, when the policy is very far from the correct answer, even if the movement direction is not along the gradient (biased), it is beneficial to make consistent progress and not bounce around due to high 11 variance. Thus, high bias estimates of the policy gradient, corresponding to smaller λ values make fast initial progress. However, after this initial phase, it is important to follow an unbiased gradient, and consequently the low-bias variants corresponding to larger λ values show better asymptotic performance. Even without the use of GAE (i.e. λ = 1), we observe good asymptotic performance. But with GAE, it is possible to get faster initial learning due to reasons discussed above. 50 100 150 200 250 - 5000 - 2500 0 Walker: GAE Training Iterations Return GAE=0.00 GAE=0.50 GAE=0.90 GAE=0.95 GAE=0.97 GAE=1.00 Figure 6: Learning curves corresponding to different choices of λ in GAE. λ = 0 corresponds to a high bias but low variance version of policy gradient corresponding to a TD error estimate: ˆA(st, at) = rt + γV (st+1) −V (st); while λ = 1 corresponds to a low bias but high variance Monte Carlo estimate: ˆA(st, at) = PT t′=t γt′−trt′ −V (st). We observe that low bias is asymptotically very important to achieve best performance, but a low variance gradient can help during the initial stages. 12 | 2017 | 415 |
6,914 | Imagination-Augmented Agents for Deep Reinforcement Learning Sébastien Racanière∗Théophane Weber∗David P. Reichert∗Lars Buesing Arthur Guez Danilo Rezende Adria Puigdomènech Badia Oriol Vinyals Nicolas Heess Yujia Li Razvan Pascanu Peter Battaglia Demis Hassabis David Silver Daan Wierstra DeepMind Abstract We introduce Imagination-Augmented Agents (I2As), a novel architecture for deep reinforcement learning combining model-free and model-based aspects. In contrast to most existing model-based reinforcement learning and planning methods, which prescribe how a model should be used to arrive at a policy, I2As learn to interpret predictions from a learned environment model to construct implicit plans in arbitrary ways, by using the predictions as additional context in deep policy networks. I2As show improved data efficiency, performance, and robustness to model misspecification compared to several baselines. 1 Introduction A hallmark of an intelligent agent is its ability to rapidly adapt to new circumstances and "achieve goals in a wide range of environments" [1]. Progress has been made in developing capable agents for numerous domains using deep neural networks in conjunction with model-free reinforcement learning (RL) [2–4], where raw observations directly map to values or actions. However, this approach usually requires large amounts of training data and the resulting policies do not readily generalize to novel tasks in the same environment, as it lacks the behavioral flexibility constitutive of general intelligence. Model-based RL aims to address these shortcomings by endowing agents with a model of the world, synthesized from past experience. By using an internal model to reason about the future, here also referred to as imagining, the agent can seek positive outcomes while avoiding the adverse consequences of trial-and-error in the real environment – including making irreversible, poor decisions. Even if the model needs to be learned first, it can enable better generalization across states, remain valid across tasks in the same environment, and exploit additional unsupervised learning signals, thus ultimately leading to greater data efficiency. Another appeal of model-based methods is their ability to scale performance with more computation by increasing the amount of internal simulation. The neural basis for imagination, model-based reasoning and decision making has generated a lot of interest in neuroscience [5–7]; at the cognitive level, model learning and mental simulation have been hypothesized and demonstrated in animal and human learning [8–11]. Its successful deployment in artificial model-based agents however has hitherto been limited to settings where an exact transition model is available [12] or in domains where models are easy to learn – e.g. symbolic environments or low-dimensional systems [13–16]. In complex domains for which a simulator is not available to the agent, recent successes are dominated by model-free methods [2, 17]. In such domains, the performance of model-based agents employing standard planning methods usually suffers from model errors resulting from function approximation [18, 19]. These errors compound during planning, causing over-optimism and poor agent performance. There are currently no planning ∗Equal contribution, corresponding authors: {sracaniere, theophane, reichert}@google.com. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. or model-based methods that are robust against model imperfections which are inevitable in complex domains, thereby preventing them from matching the success of their model-free counterparts. We seek to address this shortcoming by proposing Imagination-Augmented Agents, which use approximate environment models by "learning to interpret" their imperfect predictions. Our algorithm can be trained directly on low-level observations with little domain knowledge, similarly to recent model-free successes. Without making any assumptions about the structure of the environment model and its possible imperfections, our approach learns in an end-to-end way to extract useful knowledge gathered from model simulations – in particular not relying exclusively on simulated returns. This allows the agent to benefit from model-based imagination without the pitfalls of conventional model-based planning. We demonstrate that our approach performs better than modelfree baselines in various domains including Sokoban. It achieves better performance with less data, even with imperfect models, a significant step towards delivering the promises of model-based RL. 2 The I2A architecture Figure 1: I2A architecture. ˆ· notation indicates imagined quantities. a): the imagination core (IC) predicts the next time step conditioned on an action sampled from the rollout policy ˆπ. b): the IC imagines trajectories of features ˆf = (ˆo, ˆr), encoded by the rollout encoder. c): in the full I2A, aggregated rollout encodings and input from a model-free path determine the output policy π. In order to augment model-free agents with imagination, we rely on environment models – models that, given information from the present, can be queried to make predictions about the future. We use these environment models to simulate imagined trajectories, which are interpreted by a neural network and provided as additional context to a policy network. In general, an environment model is any recurrent architecture which can be trained in an unsupervised fashion from agent trajectories: given a past state and current action, the environment model predicts the next state and any number of signals from the environment. In this work, we will consider in particular environment models that build on recent successes of action-conditional next-step predictors [20–22], which receive as input the current observation (or history of observations) and current action, and predict the next observation, and potentially the next reward. We roll out the environment model over multiple time steps into the future, by initializing the imagined trajectory with the present time real observation, and subsequently feeding simulated observations into the model. The actions chosen in each rollout result from a rollout policy ˆπ (explained in Section 3.1). The environment model together with ˆπ constitute the imagination core module, which predicts next time steps (Fig 1a). The imagination core is used to produce n trajectories ˆT1, . . . , ˆTn. Each imagined trajectory ˆT is a sequence of features ( ˆft+1, . . . , ˆft+τ), where t is the current time, τ the length of the rollout, and ˆft+i the output of the environment model (i.e. the predicted observation and/or reward). Despite recent progress in training better environment models, a key issue addressed by I2As is that a learned model cannot be assumed to be perfect; it might sometimes make erroneous or nonsensical predictions. We therefore do not want to rely solely on predicted rewards (or values predicted 2 input observations tile stacked context predicted observation predicted reward ConvNet one-hot input action Figure 2: Environment model. The input action is broadcast and concatenated to the observation. A convolutional network transforms this into a pixel-wise probability distribution for the output image, and a distribution for the reward. from predicted states), as is often done in classical planning. Additionally, trajectories may contain information beyond the reward sequence (a trajectory could contain an informative subsequence – for instance solving a subproblem – which did not result in higher reward). For these reasons, we use a rollout encoder E that processes the imagined rollout as a whole and learns to interpret it, i.e. by extracting any information useful for the agent’s decision, or even ignoring it when necessary (Fig 1b). Each trajectory is encoded separately as a rollout embedding ei = E( ˆTi). Finally, an aggregator A converts the different rollout embeddings into a single imagination code cia = A(e1, . . . , en). The final component of the I2A is the policy module, which is a network that takes the information cia from model-based predictions, as well as the output cmf of a model-free path (a network which only takes the real observation as input; see Fig 1c, right), and outputs the imagination-augmented policy vector π and estimated value V . The I2A therefore learns to combine information from its model-free and imagination-augmented paths; note that without the model-based path, I2As reduce to a standard model-free network [3]. I2As can thus be thought of as augmenting model-free agents by providing additional information from model-based planning, and as having strictly more expressive power than the underlying model-free agent. 3 Architectural choices and experimental setup 3.1 Rollout strategy For our experiments, we perform one rollout for each possible action in the environment. The first action in the ith rollout is the ith action of the action set A, and subsequent actions for all rollouts are produced by a shared rollout policy ˆπ. We investigated several types of rollout policies (random, pretrained) and found that a particularly efficient strategy was to distill the imagination-augmented policy into a model-free policy. This distillation strategy consists in creating a small model-free network ˆπ(ot), and adding to the total loss a cross entropy auxiliary loss between the imagination-augmented policy π(ot) as computed on the current observation, and the policy ˆπ(ot) as computed on the same observation. By imitating the imagination-augmented policy, the internal rollouts will be similar to the trajectories of the agent in the real environment; this also ensures that the rollout corresponds to trajectories with high reward. At the same time, the imperfect approximation results in a rollout policy with higher entropy, potentially striking a balance between exploration and exploitation. 3.2 I2A components and environment models In our experiments, the encoder is an LSTM with convolutional encoder which sequentially processes a trajectory T . The features ˆft are fed to the LSTM in reverse order, from ˆft+τ to ˆft+1, to mimic Bellman type backup operations.2 The aggregator simply concatenates the summaries. For the model-free path of the I2A, we chose a standard network of convolutional layers plus one fully connected one [e.g. 3]. We also use this architecture on its own as a baseline agent. Our environment model (Fig. 2) defines a distribution which is optimized by using a negative loglikelihood loss lmodel. We can either pretrain the environment model before embedding it (with frozen weights) within the I2A architecture, or jointly train it with the agent by adding lmodel to the total loss as an auxiliary loss. In practice we found that pre-training the environment model led to faster runtime of the I2A architecture, so we adopted this strategy. 2The choice of forward, backward or bi-directional processing seems to have relatively little impact on the performance of the I2A, however, and should not preclude investigating different strategies. 3 For all environments, training data for our environment model was generated from trajectories of a partially trained standard model-free agent (defined below). We use partially pre-trained agents because random agents see few rewards in some of our domains. However, this means we have to account for the budget (in terms of real environment steps) required to pretrain the data-generating agent, as well as to then generate the data. In the experiments, we address this concern in two ways: by explicitly accounting for the number of steps used in pretraining (for Sokoban), or by demonstrating how the same pretrained model can be reused for many tasks (for MiniPacman). 3.3 Agent training and baseline agents Using a fixed pretrained environment model, we trained the remaining I2A parameters with asynchronous advantage actor-critic (A3C) [3]. We added an entropy regularizer on the policy π to encourage exploration and the auxiliary loss to distill π into the rollout policy ˆπ as explained above. We distributed asynchronous training over 32 to 64 workers; we used the RMSprop optimizer [23]. We report results after an initial round of hyperparameter exploration (details in Appendix A). Learning curves are averaged over the top three agents unless noted otherwise. A separate hyperparameter search was carried out for each agent architecture in order to ensure optimal performance. In addition to the I2A, we ran the following baseline agents (see Appendix B for architecture details for all agents). Standard model-free agent. For our main baseline agent, we chose a model-free standard architecture similar to [3], consisting of convolutional layers (2 for MiniPacman, and 3 for Sokoban) followed by a fully connected layer. The final layer, again fully connected, outputs the policy logits and the value function. For Sokoban, we also tested a ‘large’ standard architecture, where we double the number of all feature maps (for convolutional layers) and hidden units (for fully connected layers). The resulting architecture has a slightly larger number of parameters than I2A. Copy-model agent. Aside from having an internal environment model, the I2A architecture is very different from the one of the standard agent. To verify that the information contained in the environment model rollouts contributed to an increase in performance, we implemented a baseline where we replaced the environment model in the I2A with a ‘copy’ model that simply returns the input observation. Lacking a model, this agent does not use imagination, but uses the same architecture, has the same number of learnable parameters (the environment model is kept constant in the I2A), and benefits from the same amount of computation (which in both cases increases linearly with the length of the rollouts). This model effectively corresponds to an architecture where policy logits and value are the final output of an LSTM network with skip connections. 4 Sokoban experiments We now demonstrate the performance of I2A over baselines in a puzzle environment, Sokoban. We address the issue of dealing with imperfect models, highlighting the strengths of our approach over planning baselines. We also analyze the importance of the various components of the I2A. Sokoban is a classic planning problem, where the agent has to push a number of boxes onto given target locations. Because boxes can only be pushed (as opposed to pulled), many moves are irreversible, and mistakes can render the puzzle unsolvable. A human player is thus forced to plan moves ahead of time. We expect that artificial agents will similarly benefit from internal simulation. Our implementation of Sokoban procedurally generates a new level each episode (see Appendix D.4 for details, Fig. 3 for examples). This means an agent cannot memorize specific puzzles.3 Together with the planning aspect, this makes for a very challenging environment for our model-free baseline agents, which solve less than 60% of the levels after a billion steps of training (details below). We provide videos of agents playing our version of Sokoban online [24]. While the underlying game logic operates in a 10 × 10 grid world, our agents were trained directly on RGB sprite graphics as shown in Fig. 4 (image size 80 × 80 pixels). There are no aspects of I2As that make them specific to grid world games. 3Out of 40 million levels generated, less than 0.7% were repeated. Training an agent on 1 billion frames requires less than 20 million episodes. 4 Figure 3: Random examples of procedurally generated Sokoban levels. The player (green sprite) needs to push all 4 boxes onto the red target squares to solve a level, while avoiding irreversible mistakes. Our agents receive sprite graphics (shown above) as observations. 4.1 I2A performance vs. baselines on Sokoban Figure 4 (left) shows the learning curves of the I2A architecture and various baselines explained throughout this section. First, we compare I2A (with rollouts of length 5) against the standard model-free agent. I2A clearly outperforms the latter, reaching a performance of 85% of levels solved vs. a maximum of under 60% for the baseline. The baseline with increased capacity reaches 70% still significantly below I2A. Similarly, for Sokoban, I2A far outperforms the copy-model. 0.0 0.2 0.4 0.6 0.8 1.0 environment steps 1e9 0.0 0.2 0.4 0.6 0.8 1.0 fraction of levels solved Sokoban performance I2A standard(large) standard no reward I2A copy-model I2A 0.0 0.2 0.4 0.6 0.8 1.0 environment steps 1e9 0.0 0.2 0.4 0.6 0.8 1.0 fraction of levels solved Unroll depth analysis unroll depth 15 5 3 1 Figure 4: Sokoban learning curves. Left: training curves of I2A and baselines. Note that I2A use additional environment observations to pretrain the environment model, see main text for discussion. Right: I2A training curves for various values of imagination depth. Since using imagined rollouts is helpful for this task, we investigate how the length of individual rollouts affects performance. The latter was one of the hyperparameters we searched over. A breakdown by number of unrolling/imagination steps in Fig. 4 (right) shows that using longer rollouts, while not increasing the number of parameters, increases performance: 3 unrolling steps improves speed of learning and top performance significantly over 1 unrolling step, 5 outperforms 3, and as a test for significantly longer rollouts, 15 outperforms 5, reaching above 90% of levels solved. However, in general we found diminishing returns with using I2A with longer rollouts. It is noteworthy that 5 steps is relatively small compared to the number of steps taken to solve a level, for which our best agents need about 50 steps on average. This implies that even such short rollouts can be highly informative. For example, they allow the agent to learn about moves it cannot recover from (such as pushing boxes against walls, in certain contexts). Because I2A with rollouts of length 15 are significantly slower, in the rest of this section, we choose rollouts of length 5 to be our canonical I2A architecture. It terms of data efficiency, it should be noted that the environment model in the I2A was pretrained (see Section 3.2). We conservatively measured the total number of frames needed for pretraining to be lower than 1e8. Thus, even taking pretraining into account, I2A outperforms the baselines after seeing about 3e8 frames in total (compare again Fig. 4 (left)). Of course, data efficiency is even better if the environment model can be reused to solve multiple tasks in the same environment (Section 5). 4.2 Learning with imperfect models One of the key strengths of I2As is being able to handle learned and thus potentially imperfect environment models. However, for the Sokoban task, our learned environment models actually perform quite well when rolling out imagined trajectories. To demonstrate that I2As can deal with less reliable predictions, we ran another experiment where the I2A used an environment model that had shown much worse performance (due to a smaller number of parameters), with strong artifacts accumulating over iterated rollout predictions (Fig. 5, left). As Fig. 5 (right) shows, even with such a 5 clearly flawed environment model, I2A performs similarly well. This implies that I2As can learn to ignore the latter parts of the rollout as errors accumulate, but still use initial predictions when errors are less severe. Finally, note that in our experiments, surprisingly, the I2A agent with poor model ended outperforming the I2A agent with good model. We posit this was due to random initialization, though we cannot exclude the noisy model providing some form of regularization — more work will be required to investigate this effect. 0.0 0.2 0.4 0.6 0.8 1.0 environment steps 1e9 0.0 0.2 0.4 0.6 0.8 1.0 fraction of levels solved Sokoban good vs. bad models I2A: good model I2A: poor model MC: good model MC: poor model Figure 5: Experiments with a noisy environment model. Left: each row shows an example 5-step rollout after conditioning on an environment observation. Errors accumulate and lead to various artefacts, including missing or duplicate sprites. Right: comparison of Monte-Carlo (MC) search and I2A when using either the accurate or the noisy model for rollouts. Learning a rollout encoder is what enables I2As to deal with imperfect model predictions. We can further demonstrate this point by comparing them to a setup without a rollout encoder: as in the classic Monte-Carlo search algorithm of Tesauro and Galperin [25], we now explicitly estimate the value of each action from rollouts, rather than learning an arbitrary encoding of the rollouts, as in I2A. We then select actions according to those values. Specifically, we learn a value function V from states, and, using a rollout policy ˆπ, sample a trajectory rollout for each initial action, and compute the corresponding estimated Monte Carlo return P t≤T γtra t + V (xa T ) where ((xa t , ra t ))t=0..T comes from a trajectory initialized with action a. Action a is chosen with probability proportional to exp(−(P t=0..T γtra t + V (xa T ))/δ), where δ is a learned temperature. This can be thought of as a form of I2A with a fixed summarizer (which computes returns), no model-free path, and very simple policy head. In this architecture, only V, ˆπ and δ are learned.4 We ran this rollout encoder-free agent on Sokoban with both the accurate and the noisy environment model. We chose the length of the rollout to be optimal for each environment model (from the same range as for I2A, i.e. from 1 to 5). As can be seen in Fig. 5 (right),5 when using the high accuracy environment model, the performance of the encoder-free agent is similar to that of the baseline standard agent. However, unlike I2A, its performance degrades catastrophically when using the poor model, showcasing the susceptibility to model misspecification. 4.3 Further insights into the workings of the I2A architecture So far, we have studied the role of the rollout encoder. To show the importance of various other components of the I2A, we performed additional control experiments. Results are plotted in Fig. 4 (left) for comparison. First, I2A with the copy model (Section 3.3) performs far worse, demonstrating that the environment model is indeed crucial. Second, we trained an I2A where the environment model was predicting no rewards, only observations. This also performed worse. However, after much longer training (3e9 steps), these agents did recover performance close to that of the original I2A (see Appendix D.2), which was never the case for the baseline agent even with that many steps. Hence, reward prediction is helpful but not absolutely necessary in this task, and imagined observations alone are informative enough to obtain high performance on Sokoban. Note this is in contrast to many classical planning and model-based reinforcement learning methods, which often rely on reward prediction. 4the rollout policy is still learned by distillation from the output policy 5Note: the MC curves in Fig. 5 only used a single agent rather than averages. 6 4.4 Imagination efficiency and comparison with perfect-model planning methods I2A@87 ∼1400 I2A MC search @95 ∼4000 MCTS@87 ∼25000 MCTS@95 ∼100000 Random search ∼millions Table 1: Imagination efficiency of various architectures. Boxes 1 2 3 4 5 6 7 I2A (%) 99.5 97 92 87 77 66 53 Standard (%) 97 87 72 60 47 32 23 Table 2: Generalization of I2A to environments with different number of boxes. In previous sections, we illustrated that I2As can be used to efficiently solve planning problems and can be robust in the face of model misspecification. Here, we ask a different question – if we do assume a nearly perfect model, how does I2A compare to competitive planning methods? Beyond raw performance we focus particularly on the efficiency of planning, i.e. the number of imagination steps required to solve a fixed ratio of levels. We compare our regular I2A agent to a variant of Monte Carlo Tree Search (MCTS), which is a modern guided tree search algorithm [12, 26]. For our MCTS implementation, we aimed to have a strong baseline by using recent ideas: we include transposition tables [27], and evaluate the returns of leaf nodes by using a value network (in this case, a deep residual value network trained with the same total amount of data as I2A; see appendix D.3 for further details). Running MCTS on Sokoban, we find that it can achieve high performance, but at a cost of a much higher number of necessary environment model simulation steps: MCTS reaches the I2A performance of 87% of levels solved when using 25k model simulation steps on average to solve a level, compared to 1.4k environment model calls for I2A. Using even more simulation steps, MCTS performance increases further, e.g. reaching 95% with 100k steps. If we assume access to a high-accuracy environment model (including the reward prediction), we can also push I2A performance further, by performing basic Monte-Carlo search with a trained I2A for the rollout policy: we let the agent play whole episodes in simulation (where I2A itself uses the environment model for short-term rollouts, hence corresponding to using a model-within-a-model), and execute a successful action sequence if found, up to a maximum number of retries; this is reminiscent of nested rollouts [28]. With a fixed maximum of 10 retries, we obtain a score of 95% (up from 87% for the I2A itself). The total average number of model simulation steps needed to solve a level, including running the model in the outer loop, is now 4k, again much lower than the corresponding MCTS run with 100k steps. Note again, this approach requires a nearly perfect model; we don’t expect I2A with MC search to perform well with approximate models. See Table 1 for a summary of the imagination efficiency for the different methods. 4.5 Generalization experiments Lastly, we probe the generalization capabilities of I2As, beyond handling random level layouts in Sokoban. Our agents were trained on levels with 4 boxes. Table 2 shows the performance of I2A when such an agent was tested on levels with different numbers of boxes, and that of the standard model-free agent for comparison. We found that I2As generalizes well; at 7 boxes, the I2A agent is still able to solve more than half of the levels, nearly as many as the standard agent on 4 boxes. 5 Learning one model for many tasks in MiniPacman In our final set of experiments, we demonstrate how a single model, which provides the I2A with a general understanding of the dynamics governing an environment, can be used to solve a collection of different tasks. We designed a simple, light-weight domain called MiniPacman, which allows us to easily define multiple tasks in an environment with shared state transitions and which enables us to do rapid experimentation. In MiniPacman (Fig. 6, left), the player explores a maze that contains food while being chased by ghosts. The maze also contains power pills; when eaten, for a fixed number of steps, the player moves faster, and the ghosts run away and can be eaten. These dynamics are common to all tasks. Each task 7 is defined by a vector wrew ∈R5, associating a reward to each of the following five events: moving, eating food, eating a power pill, eating a ghost, and being eaten by a ghost. We consider five different reward vectors inducing five different tasks. Empirically we found that the reward schemes were sufficiently different to lead to very different high-performing policies6 (for more details on the game and tasks, see appendix C. To illustrate the benefits of model-based methods in this multi-task setting, we train a single environment model to predict both observations (frames) and events (as defined above, e.g. "eating a ghost"). Note that the environment model is effectively shared across all tasks, so that the marginal cost of learning the model is nil. During training and testing, the I2As have access to the frame and reward predictions generated by the model; the latter was computed from model event predictions and the task reward vector wrew. As such, the reward vector wrew can be interpreted as an ‘instruction’ about which task to solve in the same environment [cf. the Frostbite challenge of 11]. For a fair comparison, we also provide all baseline agents with the event variable as input.7 We trained baseline agents and I2As separately on each task. Results in Fig. 6 (right) indicate the benefit of the I2A architecture, outperforming the standard agent in all tasks, and the copy-model baseline in all but one task. Moreover, we found that the performance gap between I2As and baselines is particularly high for tasks 4 & 5, where rewards are particularly sparse, and where the anticipation of ghost dynamics is especially important. We posit that the I2A agent can leverage its environment and reward model to explore the environment much more effectively. Task Name Standard model-free Copy-model I2A Regular 192 919 859 Avoid -16 3 23 Hunt -35 33 334 Ambush -40 -30 294 Rush 1.3 178 214 Figure 6: Minipacman environment. Left: Two frames from a minipacman game. Frames are 15 × 19 RGB images. The player is green, dangerous ghosts red, food dark blue, empty corridors black, power pills in cyan. After eating a power pill (right frame), the player can eat the 4 weak ghosts (yellow). Right: Performance after 300 million environment steps for different agents and all tasks. Note I2A clearly outperforms the other two agents on all tasks with sparse rewards. 6 Related work Some recent work has focused on applying deep learning to model-based RL. A common approach is to learn a neural model of the environment, including from raw observations, and use it in classical planning algorithms such as trajectory optimization [29–31]. These studies however do not address a possible mismatch between the learned model and the true environment. Model imperfection has attracted particular attention in robotics, when transferring policies from simulation to real environments [32–34]. There, the environment model is given, not learned, and used for pretraining, not planning at test time. Liu et al. [35] also learn to extract information from trajectories, but in the context of imitation learning. Bansal et al. [36] take a Bayesian approach to model imperfection, by selecting environment models on the basis of their actual control performance. The problem of making use of imperfect models was also approached in simplified environment in Talvitie [18, 19] by using techniques similar to scheduled sampling [37]; however these techniques break down in stochastic environments; they mostly address the compounding error issue but do not address fundamental model imperfections. A principled way to deal with imperfect models is to capture model uncertainty, e.g. by using Gaussian Process models of the environment, see Deisenroth and Rasmussen [15]. The disadvantage of this method is its high computational cost; it also assumes that the model uncertainty is well calibrated and lacks a mechanism that can learn to compensate for possible miscalibration of uncertainty. Cutler et al. [38] consider RL with a hierarchy of models of increasing (known) fidelity. A recent multi-task 6For example, in the ‘avoid’ game, any event is negatively rewarded, and the optimal strategy is for the agent to clear a small space from food and use it to continuously escape the ghosts. 7It is not necessary to provide the reward vector wrew to the baseline agents, as it is equivalent a constant bias. 8 GP extension of this study can further help to mitigate the impact of model misspecification, but again suffers from high computational burden in large domains, see Marco et al. [39]. A number of approaches use models to create additional synthetic training data, starting from Dyna [40], to more recent work e.g. Gu et al. [41] and Venkatraman et al. [42]; these models increase data efficiency, but are not used by the agent at test time. Tamar et al. [43], Silver et al. [44], and Oh et al. [45] all present neural networks whose architectures mimic classical iterative planning algorithms, and which are trained by reinforcement learning or to predict user-defined, high-level features; in these, there is no explicit environment model. In our case, we use explicit environment models that are trained to predict low-level observations, which allows us to exploit additional unsupervised learning signals for training. This procedure is expected to be beneficial in environments with sparse rewards, where unsupervised modelling losses can complement return maximization as learning target as recently explored in Jaderberg et al. [46] and Mirowski et al. [47]. Internal models can also be used to improve the credit assignment problem in reinforcement learning: Henaff et al. [48] learn models of discrete actions environments, and exploit the effective differentiability of the model with respect to the actions by applying continuous control planning algorithms to derive a plan; Schmidhuber [49] uses an environment model to turn environment cost minimization into a network activity minimization. Kansky et al. [50] learn symbolic networks models of the environment and use them for planning, but are given the relevant abstractions from a hand-crafted vision system. Close to our work is a study by Hamrick et al. [51]: they present a neural architecture that queries learned expert models, but focus on meta-control for continuous contextual bandit problems. Pascanu et al. [52] extend this work by focusing on explicit planning in sequential environments, and learn how to construct a plan iteratively. The general idea of learning to leverage an internal model in arbitrary ways was also discussed by Schmidhuber [53]. 7 Discussion We presented I2A, an approach combining model-free and model-based ideas to implement imagination-augmented RL: learning to interpret environment models to augment model-free decisions. I2A outperforms model-free baselines on MiniPacman and on the challenging, combinatorial domain of Sokoban. We demonstrated that, unlike classical model-based RL and planning methods, I2A is able to successfully use imperfect models (including models without reward predictions), hence significantly broadening the applicability of model-based RL concepts and ideas. As all model-based RL methods, I2As trade-off environment interactions for computation by pondering before acting. This is essential in irreversible domains, where actions can have catastrophic outcomes, such as in Sokoban. In our experiments, the I2A was always less than an order of magnitude slower per interaction than the model-free baselines. The amount of computation can be varied (it grows linearly with the number and depth of rollouts); we therefore expect I2As to greatly benefit from advances on dynamic compute resource allocation (e.g. Graves [54]). Another avenue for future research is on abstract environment models: learning predictive models at the "right" level of complexity and that can be evaluated efficiently at test time will help to scale I2As to richer domains. Remarkably, on Sokoban I2As compare favourably to a strong planning baseline (MCTS) with a perfect environment model: at comparable performance, I2As require far fewer function calls to the model than MCTS, because their model rollouts are guided towards relevant parts of the state space by a learned rollout policy. This points to further potential improvement by training rollout policies that "learn to query" imperfect models in a task-relevant way. Acknowledgements We thank Victor Valdes for designing and implementing the Sokoban environment, Joseph Modayil for reviewing an early version of this paper, and Ali Eslami, Hado Van Hasselt, Neil Rabinowitz, Tom Schaul, Yori Zwols for various help and feedback. 9 References [1] Shane Legg and Marcus Hutter. Universal intelligence: A definition of machine intelligence. Minds and Machines, 17(4):391–444, 2007. [2] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. [3] Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pages 1928–1937, 2016. [4] John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1889–1897, 2015. [5] Demis Hassabis, Dharshan Kumaran, and Eleanor A Maguire. Using imagination to understand the neural basis of episodic memory. Journal of Neuroscience, 27(52):14365–14374, 2007. [6] Daniel L Schacter, Donna Rose Addis, Demis Hassabis, Victoria C Martin, R Nathan Spreng, and Karl K Szpunar. The future of memory: remembering, imagining, and the brain. Neuron, 76(4):677–694, 2012. [7] Demis Hassabis, Dharshan Kumaran, Seralynne D Vann, and Eleanor A Maguire. Patients with hippocampal amnesia cannot imagine new experiences. Proceedings of the National Academy of Sciences, 104(5): 1726–1731, 2007. [8] Edward C Tolman. Cognitive maps in rats and men. Psychological Review, 55(4):189, 1948. [9] Anthony Dickinson and Bernard Balleine. The Role of Learning in the Operation of Motivational Systems. John Wiley & Sons, Inc., 2002. [10] Brad E Pfeiffer and David J Foster. Hippocampal place-cell sequences depict future paths to remembered goals. Nature, 497(7447):74–79, 2013. [11] Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. arXiv preprint arXiv:1604.00289, 2016. [12] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. [13] Jing Peng and Ronald J Williams. Efficient learning and planning within the dyna framework. Adaptive Behavior, 1(4):437–454, 1993. [14] Pieter Abbeel and Andrew Y Ng. Exploration and apprenticeship learning in reinforcement learning. In Proceedings of the 22nd international conference on Machine learning, pages 1–8. ACM, 2005. [15] Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pages 465–472, 2011. [16] Sergey Levine and Pieter Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, pages 1071–1079, 2014. [17] Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. ICLR, 2016. [18] Erik Talvitie. Model regularization for stable sample rollouts. In UAI, pages 780–789, 2014. [19] Erik Talvitie. Agnostic system identification for monte carlo planning. In AAAI, pages 2986–2992, 2015. [20] 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 2863–2871, 2015. [21] Silvia Chiappa, Sébastien Racaniere, Daan Wierstra, and Shakir Mohamed. Recurrent environment simulators. In 5th International Conference on Learning Representations, 2017. 10 [22] Felix Leibfried, Nate Kushman, and Katja Hofmann. A deep learning approach for joint video frame and reward prediction in atari games. CoRR, abs/1611.07078, 2016. URL http://arxiv.org/abs/1611. 07078. [23] Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-RMSprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2), 2012. [24] https://drive.google.com/open?id=0B4tKsKnCCZtQY2tTOThucHVxUTQ, 2017. [25] Gerald Tesauro and Gregory R Galperin. On-line policy improvement using monte-carlo search. In NIPS, volume 96, pages 1068–1074, 1996. [26] Rémi Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In International Conference on Computers and Games, pages 72–83. Springer, 2006. [27] Benjamin E Childs, James H Brodeur, and Levente Kocsis. Transpositions and move groups in monte carlo tree search. In Computational Intelligence and Games, 2008. CIG’08. IEEE Symposium On, pages 389–395. IEEE, 2008. [28] Christopher D Rosin. Nested rollout policy adaptation for monte carlo tree search. In Ijcai, pages 649–654, 2011. [29] Manuel Watter, Jost Springenberg, Joschka Boedecker, and Martin Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In Advances in Neural Information Processing Systems, pages 2746–2754, 2015. [30] Ian Lenz, Ross A Knepper, and Ashutosh Saxena. DeepMPC: Learning deep latent features for model predictive control. In Robotics: Science and Systems, 2015. [31] Chelsea Finn and Sergey Levine. Deep visual foresight for planning robot motion. In IEEE International Conference on Robotics and Automation (ICRA), 2017. [32] Matthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009. [33] Eric Tzeng, Coline Devin, Judy Hoffman, Chelsea Finn, Xingchao Peng, Sergey Levine, Kate Saenko, and Trevor Darrell. Towards adapting deep visuomotor representations from simulated to real environments. arXiv preprint arXiv:1511.07111, 2015. [34] Paul Christiano, Zain Shah, Igor Mordatch, Jonas Schneider, Trevor Blackwell, Joshua Tobin, Pieter Abbeel, and Wojciech Zaremba. Transfer from simulation to real world through learning deep inverse dynamics model. arXiv preprint arXiv:1610.03518, 2016. [35] YuXuan Liu, Abhishek Gupta, Pieter Abbeel, and Sergey Levine. Imitation from observation: Learning to imitate behaviors from raw video via context translation. arXiv preprint arXiv:1707.03374, 2017. [36] Somil Bansal, Roberto Calandra, Ted Xiao, Sergey Levine, and Claire J Tomlin. Goal-driven dynamics learning via bayesian optimization. arXiv preprint arXiv:1703.09260, 2017. [37] Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems, pages 1171–1179, 2015. [38] Mark Cutler, Thomas J Walsh, and Jonathan P How. Real-world reinforcement learning via multifidelity simulators. IEEE Transactions on Robotics, 31(3):655–671, 2015. [39] Alonso Marco, Felix Berkenkamp, Philipp Hennig, Angela P Schoellig, Andreas Krause, Stefan Schaal, and Sebastian Trimpe. Virtual vs. real: Trading off simulations and physical experiments in reinforcement learning with bayesian optimization. arXiv preprint arXiv:1703.01250, 2017. [40] Richard S Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Proceedings of the seventh international conference on machine learning, pages 216–224, 1990. [41] Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In International Conference on Machine Learning, pages 2829–2838, 2016. [42] Arun Venkatraman, Roberto Capobianco, Lerrel Pinto, Martial Hebert, Daniele Nardi, and J Andrew Bagnell. Improved learning of dynamics models for control. In International Symposium on Experimental Robotics, pages 703–713. Springer, 2016. 11 [43] Aviv Tamar, Yi Wu, Garrett Thomas, Sergey Levine, and Pieter Abbeel. Value iteration networks. In Advances in Neural Information Processing Systems, pages 2154–2162, 2016. [44] David Silver, Hado van Hasselt, Matteo Hessel, Tom Schaul, Arthur Guez, Tim Harley, Gabriel DulacArnold, David Reichert, Neil Rabinowitz, Andre Barreto, et al. The predictron: End-to-end learning and planning. arXiv preprint arXiv:1612.08810, 2016. [45] Junhyuk Oh, Satinder Singh, and Honglak Lee. Value prediction network. arXiv preprint arXiv:1707.03497, 2017. [46] Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. arXiv preprint arXiv:1611.05397, 2016. [47] Piotr Mirowski, Razvan Pascanu, Fabio Viola, Hubert Soyer, Andy Ballard, Andrea Banino, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, et al. Learning to navigate in complex environments. arXiv preprint arXiv:1611.03673, 2016. [48] Mikael Henaff, William F Whitney, and Yann LeCun. Model-based planning in discrete action spaces. arXiv preprint arXiv:1705.07177, 2017. [49] Jürgen Schmidhuber. An on-line algorithm for dynamic reinforcement learning and planning in reactive environments. In Neural Networks, 1990., 1990 IJCNN International Joint Conference on, pages 253–258. IEEE, 1990. [50] Ken Kansky, Tom Silver, David A Mély, Mohamed Eldawy, Miguel Lázaro-Gredilla, Xinghua Lou, Nimrod Dorfman, Szymon Sidor, Scott Phoenix, and Dileep George. Schema networks: Zero-shot transfer with a generative causal model of intuitive physics. Accepted at International Conference for Machine Learning, 2017, 2017. [51] Jessica B. Hamrick, Andy J. Ballard, Razvan Pascanu, Oriol Vinyals, Nicolas Heess, and Peter W. Battaglia. Metacontrol for adaptive imagination-based optimization. In Proceedings of the 5th International Conference on Learning Representations (ICLR 2017), 2017. [52] Razvan Pascanu, Yujia Li, Oriol Vinyals, Nicolas Heess, David Reichert, Theophane Weber, Sebastien Racaniere, Lars Buesing, Daan Wierstra, and Peter Battaglia. Learning model-based planning from scratch. arXiv preprint, 2017. [53] Jürgen Schmidhuber. On learning to think: Algorithmic information theory for novel combinations of reinforcement learning controllers and recurrent neural world models. arXiv preprint arXiv:1511.09249, 2015. [54] Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016. [55] Leemon C Baird III. Advantage updating. Technical report, Wright Lab. Technical Report WL-TR-93-1l46., 1993. [56] John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. Gradient estimation using stochastic computation graphs. In Advances in Neural Information Processing Systems, pages 3528–3536, 2015. [57] Levente Kocsis and Csaba Szepesvári. Bandit based monte-carlo planning. In European conference on machine learning, pages 282–293. Springer, 2006. [58] Sylvain Gelly and David Silver. Combining online and offline knowledge in uct. In Proceedings of the 24th international conference on Machine learning, pages 273–280. ACM, 2007. [59] Joshua Taylor and Ian Parberry. Procedural generation of sokoban levels. In Proceedings of the International North American Conference on Intelligent Games and Simulation, pages 5–12, 2011. [60] Yoshio Murase, Hitoshi Matsubara, and Yuzuru Hiraga. Automatic making of sokoban problems. PRICAI’96: Topics in Artificial Intelligence, pages 592–600, 1996. 12 | 2017 | 416 |
6,915 | Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles Balaji Lakshminarayanan Alexander Pritzel Charles Blundell DeepMind {balajiln,apritzel,cblundell}@google.com Abstract Deep neural networks (NNs) are powerful black box predictors that have recently achieved impressive performance on a wide spectrum of tasks. Quantifying predictive uncertainty in NNs is a challenging and yet unsolved problem. Bayesian NNs, which learn a distribution over weights, are currently the state-of-the-art for estimating predictive uncertainty; however these require significant modifications to the training procedure and are computationally expensive compared to standard (non-Bayesian) NNs. We propose an alternative to Bayesian NNs that is simple to implement, readily parallelizable, requires very little hyperparameter tuning, and yields high quality predictive uncertainty estimates. Through a series of experiments on classification and regression benchmarks, we demonstrate that our method produces well-calibrated uncertainty estimates which are as good or better than approximate Bayesian NNs. To assess robustness to dataset shift, we evaluate the predictive uncertainty on test examples from known and unknown distributions, and show that our method is able to express higher uncertainty on out-of-distribution examples. We demonstrate the scalability of our method by evaluating predictive uncertainty estimates on ImageNet. 1 Introduction Deep neural networks (NNs) have achieved state-of-the-art performance on a wide variety of machine learning tasks [35] and are becoming increasingly popular in domains such as computer vision [32], speech recognition [25], natural language processing [42], and bioinformatics [2, 61]. Despite impressive accuracies in supervised learning benchmarks, NNs are poor at quantifying predictive uncertainty, and tend to produce overconfident predictions. Overconfident incorrect predictions can be harmful or offensive [3], hence proper uncertainty quantification is crucial for practical applications. Evaluating the quality of predictive uncertainties is challenging as the ‘ground truth’ uncertainty estimates are usually not available. In this work, we shall focus upon two evaluation measures that are motivated by practical applications of NNs. Firstly, we shall examine calibration [12, 13], a frequentist notion of uncertainty which measures the discrepancy between subjective forecasts and (empirical) long-run frequencies. The quality of calibration can be measured by proper scoring rules [17] such as log predictive probabilities and the Brier score [9]. Note that calibration is an orthogonal concern to accuracy: a network’s predictions may be accurate and yet miscalibrated, and vice versa. The second notion of quality of predictive uncertainty we consider concerns generalization of the predictive uncertainty to domain shift (also referred to as out-of-distribution examples [23]), that is, measuring if the network knows what it knows. For example, if a network trained on one dataset is evaluated on a completely different dataset, then the network should output high predictive uncertainty as inputs from a different dataset would be far away from the training data. Well-calibrated predictions that are robust to model misspecification and dataset shift have a number of important practical uses (e.g., weather forecasting, medical diagnosis). 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. There has been a lot of recent interest in adapting NNs to encompass uncertainty and probabilistic methods. The majority of this work revolves around a Bayesian formalism [4], whereby a prior distribution is specified upon the parameters of a NN and then, given the training data, the posterior distribution over the parameters is computed, which is used to quantify predictive uncertainty. Since exact Bayesian inference is computationally intractable for NNs, a variety of approximations have been developed including Laplace approximation [40], Markov chain Monte Carlo (MCMC) methods [46], as well as recent work on variational Bayesian methods [6, 19, 39], assumed density filtering [24], expectation propagation [21, 38] and stochastic gradient MCMC variants such as Langevin diffusion methods [30, 59] and Hamiltonian methods [53]. The quality of predictive uncertainty obtained using Bayesian NNs crucially depends on (i) the degree of approximation due to computational constraints and (ii) if the prior distribution is ‘correct’, as priors of convenience can lead to unreasonable predictive uncertainties [50]. In practice, Bayesian NNs are often harder to implement and computationally slower to train compared to non-Bayesian NNs, which raises the need for a ‘general purpose solution’ that can deliver high-quality uncertainty estimates and yet requires only minor modifications to the standard training pipeline. Recently, Gal and Ghahramani [15] proposed using Monte Carlo dropout (MC-dropout) to estimate predictive uncertainty by using Dropout [54] at test time. There has been work on approximate Bayesian interpretation [15, 29, 41] of dropout. MC-dropout is relatively simple to implement leading to its popularity in practice. Interestingly, dropout may also be interpreted as ensemble model combination [54] where the predictions are averaged over an ensemble of NNs (with parameter sharing). The ensemble interpretation seems more plausible particularly in the scenario where the dropout rates are not tuned based on the training data, since any sensible approximation to the true Bayesian posterior distribution has to depend on the training data. This interpretation motivates the investigation of ensembles as an alternative solution for estimating predictive uncertainty. It has long been observed that ensembles of models improve predictive performance (see [14] for a review). However it is not obvious when and why an ensemble of NNs can be expected to produce good uncertainty estimates. Bayesian model averaging (BMA) assumes that the true model lies within the hypothesis class of the prior, and performs soft model selection to find the single best model within the hypothesis class [43]. In contrast, ensembles perform model combination, i.e. they combine the models to obtain a more powerful model; ensembles can be expected to be better when the true model does not lie within the hypothesis class. We refer to [11, 43] and [34, §2.5] for related discussions. It is important to note that even exact BMA is not guaranteed be robust to mis-specification with respect to domain shift. Summary of contributions: Our contribution in this paper is two fold. First, we describe a simple and scalable method for estimating predictive uncertainty estimates from NNs. We argue for training probabilistic NNs (that model predictive distributions) using a proper scoring rule as the training criteria. We additionally investigate the effect of two modifications to the training pipeline, namely (i) ensembles and (ii) adversarial training [18] and describe how they can produce smooth predictive estimates. Secondly, we propose a series of tasks for evaluating the quality of the predictive uncertainty estimates, in terms of calibration and generalization to unknown classes in supervised learning problems. We show that our method significantly outperforms (or matches) MC-dropout. These tasks, along with our simple yet strong baseline, serve as an useful benchmark for comparing predictive uncertainty estimates obtained using different Bayesian/non-Bayesian/hybrid methods. Novelty and Significance: Ensembles of NNs, or deep ensembles for short, have been successfully used to boost predictive performance (e.g. classification accuracy in ImageNet or Kaggle contests) and adversarial training has been used to improve robustness to adversarial examples. However, to the best of our knowledge, ours is the first work to investigate their usefulness for predictive uncertainty estimation and compare their performance to current state-of-the-art approximate Bayesian methods on a series of classification and regression benchmark datasets. Compared to Bayesian NNs (e.g. variational inference or MCMC methods), our method is much simpler to implement, requires surprisingly few modifications to standard NNs, and well suited for distributed computation, thereby making it attractive for large-scale deep learning applications. To demonstrate scalability of our method, we evaluate predictive uncertainty on ImageNet (and are the first to do so, to the best of our knowledge). Most work on uncertainty in deep learning focuses on Bayesian deep learning; we hope that the simplicity and strong empirical performance of our approach will spark more interest in non-Bayesian approaches for predictive uncertainty estimation. 2 2 Deep Ensembles: A Simple Recipe For Predictive Uncertainty Estimation 2.1 Problem setup and High-level summary We assume that the training dataset D consists of N i.i.d. data points D = {xn, yn}N n=1, where x 2 RD represents the D-dimensional features. For classification problems, the label is assumed to be one of K classes, that is y 2 {1, . . . , K}. For regression problems, the label is assumed to be real-valued, that is y 2 R. Given the input features x, we use a neural network to model the probabilistic predictive distribution p✓(y|x) over the labels, where ✓are the parameters of the NN. We suggest a simple recipe: (1) use a proper scoring rule as the training criterion, (2) use adversarial training [18] to smooth the predictive distributions, and (3) train an ensemble. Let M denote the number of NNs in the ensemble and {✓m}M m=1 denote the parameters of the ensemble. We first describe how to train a single neural net and then explain how to train an ensemble of NNs. 2.2 Proper scoring rules Scoring rules measure the quality of predictive uncertainty (see [17] for a review). A scoring rule assigns a numerical score to a predictive distribution p✓(y|x), rewarding better calibrated predictions over worse. We shall consider scoring rules where a higher numerical score is better. Let a scoring rule be a function S(p✓, (y, x)) that evaluates the quality of the predictive distribution p✓(y|x) relative to an event y|x ⇠q(y|x) where q(y, x) denotes the true distribution on (y, x)-tuples. The expected scoring rule is then S(p✓, q) = R q(y, x)S(p✓, (y, x))dydx. A proper scoring rule is one where S(p✓, q) S(q, q) with equality if and only if p✓(y|x) = q(y|x), for all p✓and q. NNs can then be trained according to measure that encourages calibration of predictive uncertainty by minimizing the loss L(✓) = −S(p✓, q). It turns out many common NN loss functions are proper scoring rules. For example, when maximizing likelihood, the score function is S(p✓, (y, x)) = log p✓(y|x), and this is a proper scoring rule due to Gibbs inequality: S(p✓, q) = Eq(x)q(y|x) log p✓(y|x) Eq(x)q(y|x) log q(y|x). In the case of multi-class K-way classification, the popular softmax cross entropy loss is equivalent to the log likelihood and is a proper scoring rule. Interestingly, L(✓) = −S(p✓, (y, x)) = K−1 PK k=1 # δk=y − p✓(y = k|x) $2, i.e., minimizing the squared error between the predictive probability of a label and one-hot encoding of the correct label, is also a proper scoring rule known as the Brier score [9]. This provides justification for this common trick for training NNs by minimizing the squared error between a binary label and its associated probability and shows it is, in fact, a well defined loss with desirable properties.1 2.2.1 Training criterion for regression For regression problems, NNs usually output a single value say µ(x) and the parameters are optimized to minimize the mean squared error (MSE) on the training set, given by PN n=1 # yn −µ(xn) $2. However, the MSE does not capture predictive uncertainty. Following [47], we use a network that outputs two values in the final layer, corresponding to the predicted mean µ(x) and variance2 σ2(x) > 0. By treating the observed value as a sample from a (heteroscedastic) Gaussian distribution with the predicted mean and variance, we minimize the negative log-likelihood criterion: −log p✓(yn|xn) = log σ2 ✓(x) 2 + # y −µ✓(x) $2 2σ2 ✓(x) + constant. (1) We found the above to perform satisfactorily in our experiments. However, two simple extensions are worth further investigation: (i) Maximum likelihood estimation over µ✓(x) and σ2 ✓(x) might overfit; one could impose a prior and perform maximum-a-posteriori (MAP) estimation. (ii) In cases where the Gaussian is too-restrictive, one could use a complex distribution e.g. mixture density network [5] or a heavy-tailed distribution. 1Indeed as noted in Gneiting and Raftery [17], it can be shown that asymptotically maximizing any proper scoring rule recovers true parameter values. 2We enforce the positivity constraint on the variance by passing the second output through the softplus function log(1 + exp(·)), and add a minimum variance (e.g. 10−6) for numerical stability. 3 2.3 Adversarial training to smooth predictive distributions Adversarial examples, proposed by Szegedy et al. [55] and extended by Goodfellow et al. [18], are those which are ‘close’ to the original training examples (e.g. an image that is visually indistinguishable from the original image to humans), but are misclassified by the NN. Goodfellow et al. [18] proposed the fast gradient sign method as a fast solution to generate adversarial examples. Given an input x with target y, and loss `(✓, x, y) (e.g. −log p✓(y|x)), the fast gradient sign method generates an adversarial example as x0 = x + ✏sign # rx `(✓, x, y) $ , where ✏is a small value such that the max-norm of the perturbation is bounded. Intuitively, the adversarial perturbation creates a new training example by adding a perturbation along a direction which the network is likely to increase the loss. Assuming ✏is small enough, these adversarial examples can be used to augment the original training set by treating (x0, y) as additional training examples. This procedure, referred to as adversarial training,3 was found to improve the classifier’s robustness [18]. Interestingly, adversarial training can be interpreted as a computationally efficient solution to smooth the predictive distributions by increasing the likelihood of the target around an ✏-neighborhood of the observed training examples. Ideally one would want to smooth the predictive distributions along all 2D directions in {1, −1}D; however this is computationally expensive. A random direction might not necessarily increase the loss; however, adversarial training by definition computes the direction where the loss is high and hence is better than a random direction for smoothing predictive distributions. Miyato et al. [44] proposed a related idea called virtual adversarial training (VAT), where they picked ∆x = arg max∆x KL # p(y|x)||p(y|x + ∆x) $ ; the advantage of VAT is that it does not require knowledge of the true target y and hence can be applied to semi-supervised learning. Miyato et al. [44] showed that distributional smoothing using VAT is beneficial for efficient semi-supervised learning; in contrast, we investigate the use of adversarial training for predictive uncertainty estimation. Hence, our contributions are complementary; one could use VAT or other forms of adversarial training, cf. [33], for improving predictive uncertainty in the semi-supervised setting as well. 2.4 Ensembles: training and prediction The most popular ensembles use decision trees as the base learners and a wide variety of method have been explored in the literature on ensembles. Broadly, there are two classes of ensembles: randomization-based approaches such as random forests [8], where the ensemble members can be trained in parallel without any interaction, and boosting-based approaches where the ensemble members are fit sequentially. We focus only on the randomization based approach as it is better suited for distributed, parallel computation. Breiman [8] showed that the generalization error of random forests can be upper bounded by a function of the strength and correlation between individual trees; hence it is desirable to use a randomization scheme that de-correlates the predictions of the individual models as well as ensures that the individual models are strong (e.g. high accuracy). One of the popular strategies is bagging (a.k.a. bootstrapping), where ensemble members are trained on different bootstrap samples of the original training set. If the base learner lacks intrinsic randomization (e.g. it can be trained efficiently by solving a convex optimization problem), bagging is a good mechanism for inducing diversity. However, if the underlying base learner has multiple local optima, as is the case typically with NNs, the bootstrap can sometimes hurt performance since a base learner trained on a bootstrap sample sees only 63% unique data points.4 In the literature on decision tree ensembles, Breiman [8] proposed to use a combination of bagging [7] and random subset selection of features at each node. Geurts et al. [16] later showed that bagging is unnecessary if additional randomness can be injected into the random subset selection procedure. Intuitively, using more data for training the base learners helps reduce their bias and ensembling helps reduce the variance. We used the entire training dataset to train each network since deep NNs typically perform better with more data, although it is straightforward to use a random subsample if need be. We found that random initialization of the NN parameters, along with random shuffling of the data points, was sufficient to obtain good performance in practice. We observed that bagging deteriorated performance in our experiments. Lee et al. [36] independently observed that training on entire dataset with random initialization was better than bagging for deep ensembles, however their goal was to improve 3Not to be confused with Generative Adversarial Networks (GANs). 4 The bootstrap draws N times uniformly with replacement from a dataset with N items. The probability an item is picked at least once is 1 −(1 −1/N)N, which for large N becomes 1 −e−1 ⇡0.632. Hence, the number of unique data points in a bootstrap sample is 0.632 ⇥N on average. 4 predictive accuracy and not predictive uncertainty. The overall training procedure is summarized in Algorithm 1. Algorithm 1 Pseudocode of the training procedure for our method 1: . Let each neural network parametrize a distribution over the outputs, i.e. p✓(y|x). Use a proper scoring rule as the training criterion `(✓, x, y). Recommended default values are M = 5 and ✏= 1% of the input range of the corresponding dimension (e.g 2.55 if input range is [0,255]). 2: Initialize ✓1, ✓2, . . . , ✓M randomly 3: for m = 1 : M do . train networks independently in parallel 4: Sample data point nm randomly for each net . single nm for clarity, minibatch in practice 5: Generate adversarial example using x0 nm = xnm + ✏sign # rxnm `(✓m, xnm, ynm) $ 6: Minimize `(✓m, xnm, ynm) + `(✓m, x0 nm, ynm) w.r.t. ✓m . adversarial training (optional) We treat the ensemble as a uniformly-weighted mixture model and combine the predictions as p(y|x) = M −1 PM m=1 p✓m(y|x, ✓m). For classification, this corresponds to averaging the predicted probabilities. For regression, the prediction is a mixture of Gaussian distributions. For ease of computing quantiles and predictive probabilities, we further approximate the ensemble prediction as a Gaussian whose mean and variance are respectively the mean and variance of the mixture. The mean and variance of a mixture M −1 P N # µ✓m(x), σ2 ✓m(x) $ are given by µ⇤(x) = M −1 P m µ✓m(x) and σ2 ⇤(x) = M −1 P m # σ2 ✓m(x) + µ2 ✓m(x) $ −µ2 ⇤(x) respectively. 3 Experimental results 3.1 Evaluation metrics and experimental setup For both classification and regression, we evaluate the negative log likelihood (NLL) which depends on the predictive uncertainty. NLL is a proper scoring rule and a popular metric for evaluating predictive uncertainty [49]. For classification we additionally measure classification accuracy and the Brier score, defined as BS = K−1 PK k=1 # t⇤ k −p(y = k|x⇤) $2 where t⇤ k = 1 if k = y⇤, and 0 otherwise. For regression problems, we additionally measured the root mean squared error (RMSE). Unless otherwise specified, we used batch size of 100 and Adam optimizer with fixed learning rate of 0.1 in our experiments. We use the same technique for generating adversarial training examples for regression problems. Goodfellow et al. [18] used a fixed ✏for all dimensions; this is unsatisfying if the input dimensions have different ranges. Hence, in all of our experiments, we set ✏to 0.01 times the range of the training data along that particular dimension. We used the default weight initialization in Torch. 3.2 Regression on toy datasets First, we qualitatively evaluate the performance of the proposed method on a one-dimensional toy regression dataset. This dataset was used by Hern´andez-Lobato and Adams [24], and consists of 20 training examples drawn as y = x3 + ✏where ✏⇠N(0, 32). We used the same architecture as [24]. A commonly used heuristic in practice is to use an ensemble of NNs (trained to minimize MSE), obtain multiple point predictions and use the empirical variance of the networks’ predictions as an approximate measure of uncertainty. We demonstrate that this is inferior to learning the variance by training using NLL.5 The results are shown in Figure 1. The results clearly demonstrate that (i) learning variance and training using a scoring rule (NLL) leads to improved predictive uncertainty and (ii) ensemble combination improves performance, especially as we move farther from the observed training data. 3.3 Regression on real world datasets In our next experiment, we compare our method to state-of-the-art methods for predictive uncertainty estimation using NNs on regression tasks. We use the experimental setup proposed by Hern´andezLobato and Adams [24] for evaluating probabilistic backpropagation (PBP), which was also used 5See also Appendix A.2 for calibration results on a real world dataset. 5 −6 −4 −2 0 2 4 6 −200 −100 0 100 200 Figure 1: Results on a toy regression task: x-axis denotes x. On the y-axis, the blue line is the ground truth curve, the red dots are observed noisy training data points and the gray lines correspond to the predicted mean along with three standard deviations. Left most plot corresponds to empirical variance of 5 networks trained using MSE, second plot shows the effect of training using NLL using a single net, third plot shows the additional effect of adversarial training, and final plot shows the effect of using an ensemble of 5 networks respectively. by Gal and Ghahramani [15] to evaluate MC-dropout.6 Each dataset is split into 20 train-test folds, except for the protein dataset which uses 5 folds and the Year Prediction MSD dataset which uses a single train-test split. We use the identical network architecture: 1-hidden layer NN with ReLU nonlinearity [45], containing 50 hidden units for smaller datasets and 100 hidden units for the larger protein and Year Prediction MSD datasets. We trained for 40 epochs; we refer to [24] for further details about the datasets and the experimental protocol. We used 5 networks in our ensemble. Our results are shown in Table 1, along with the PBP and MC-dropout results reported in their respective papers. Datasets RMSE NLL PBP MC-dropout Deep Ensembles PBP MC-dropout Deep Ensembles Boston housing 3.01 ± 0.18 2.97 ± 0.85 3.28 ± 1.00 2.57 ± 0.09 2.46 ± 0.25 2.41 ± 0.25 Concrete 5.67 ± 0.09 5.23 ± 0.53 6.03 ± 0.58 3.16 ± 0.02 3.04 ± 0.09 3.06 ± 0.18 Energy 1.80 ± 0.05 1.66 ± 0.19 2.09 ± 0.29 2.04 ± 0.02 1.99 ± 0.09 1.38 ± 0.22 Kin8nm 0.10 ± 0.00 0.10 ± 0.00 0.09 ± 0.00 -0.90 ± 0.01 -0.95 ± 0.03 -1.20 ± 0.02 Naval propulsion plant 0.01 ± 0.00 0.01 ± 0.00 0.00 ± 0.00 -3.73 ± 0.01 -3.80 ± 0.05 -5.63 ± 0.05 Power plant 4.12 ± 0.03 4.02 ± 0.18 4.11 ± 0.17 2.84 ± 0.01 2.80 ± 0.05 2.79 ± 0.04 Protein 4.73 ± 0.01 4.36 ± 0.04 4.71 ± 0.06 2.97 ± 0.00 2.89 ± 0.01 2.83 ± 0.02 Wine 0.64 ± 0.01 0.62 ± 0.04 0.64 ± 0.04 0.97 ± 0.01 0.93 ± 0.06 0.94 ± 0.12 Yacht 1.02 ± 0.05 1.11 ± 0.38 1.58 ± 0.48 1.63 ± 0.02 1.55 ± 0.12 1.18 ± 0.21 Year Prediction MSD 8.88 ± NA 8.85 ± NA 8.89 ± NA 3.60 ± NA 3.59 ± NA 3.35 ± NA Table 1: Results on regression benchmark datasets comparing RMSE and NLL. See Table 2 for results on variants of our method. We observe that our method outperforms (or is competitive with) existing methods in terms of NLL. On some datasets, we observe that our method is slightly worse in terms of RMSE. We believe that this is due to the fact that our method optimizes for NLL (which captures predictive uncertainty) instead of MSE. Table 2 in Appendix A.1 reports additional results on variants of our method, demonstrating the advantage of using an ensemble as well as learning variance. 3.4 Classification on MNIST, SVHN and ImageNet Next we evaluate the performance on classification tasks using MNIST and SVHN datasets. Our goal is not to achieve the state-of-the-art performance on these problems, but rather to evaluate the effect of adversarial training as well as the number of networks in the ensemble. To verify if adversarial training helps, we also include a baseline which picks a random signed vector. For MNIST, we used an MLP with 3-hidden layers with 200 hidden units per layer and ReLU non-linearities with batch normalization. For MC-dropout, we added dropout after each non-linearity with 0.1 as the dropout rate.7 Results are shown in Figure 2(a). We observe that adversarial training and increasing the number of networks in the ensemble significantly improve performance in terms of both classification accuracy as well as NLL and Brier score, illustrating that our method produces well-calibrated uncertainty estimates. Adversarial training leads to better performance than augmenting with random direction. Our method also performs much better than MC-dropout in terms of all the performance measures. Note that augmenting the training dataset with invariances (such as random crop and horizontal flips) is complementary to adversarial training and can potentially improve performance. 6We do not compare to VI [19] as PBP and MC-dropout outperform VI on these benchmarks. 7We also tried dropout rate of 0.5, but that performed worse. 6 0 5 10 15 1umEer Rf nets 1.0 1.2 1.4 1.6 1.8 ClassLfLcatLRn ErrRr EnsemEle EnsemEle + 5 EnsemEle + AT 0C drRSRut 0 5 10 15 1umEer Rf nets 0.02 0.04 0.06 0.08 0.10 0.12 0.14 1LL EnsemEle EnsemEle + 5 EnsemEle + AT 0C drRSRut 0 5 10 15 1umEer Rf nets 0.0014 0.0016 0.0018 0.0020 0.0022 0.0024 0.0026 0.0028 0.0030 BrLer 6cRre EnsemEle EnsemEle + 5 EnsemEle + AT 0C drRSRut (a) MNIST dataset using 3-layer MLP 0 5 10 1umEer Rf nets 2 4 6 8 10 12 14 ClassLfLcatLRn ErrRr EnsemEle EnsemEle + 5 EnsemEle + AT 0C drRSRut 0 5 10 1umEer Rf nets 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 1LL EnsemEle EnsemEle + 5 EnsemEle + AT 0C drRSRut 0 5 10 1umEer Rf nets 0.004 0.006 0.008 0.010 0.012 0.014 0.016 BrLer 6cRre EnsemEle EnsemEle + 5 EnsemEle + AT 0C drRSRut (b) SVHN using VGG-style convnet Figure 2: Evaluating predictive uncertainty as a function of ensemble size M (number of networks in the ensemble or the number of MC-dropout samples): Ensemble variants significantly outperform MC-dropout performance with the corresponding M in terms of all 3 metrics. Adversarial training improves results for MNIST for all M and SVHN when M = 1, but the effect drops as M increases. To measure the sensitivity of the results to the choice of network architecture, we experimented with a two-layer MLP as well as a convolutional NN; we observed qualitatively similar results; see Appendix B.1 in the supplementary material for details. We also report results on the SVHN dataset using an VGG-style convolutional NN.8 The results are in Figure 2(b). Ensembles outperform MC dropout. Adversarial training helps slightly for M = 1, however the effect drops as the number of networks in the ensemble increases. If the classes are well-separated, adversarial training might not change the classification boundary significantly. It is not clear if this is the case here, further investigation is required. Finally, we evaluate on the ImageNet (ILSVRC-2012) dataset [51] using the inception network [56]. Due to computational constraints, we only evaluate the effect of ensembles on this dataset. The results on ImageNet (single-crop evaluation) are shown in Table 4. We observe that as M increases, both the accuracy and the quality of predictive uncertainty improve significantly. Another advantage of using an ensemble is that it enables us to easily identify training examples where the individual networks disagree or agree the most. This disagreement9 provides another useful qualitative way to evaluate predictive uncertainty. Figures 10 and 11 in Appendix B.2 report qualitative evaluation of predictive uncertainty on the MNIST dataset. 3.5 Uncertainty evaluation: test examples from known vs unknown classes In the final experiment, we evaluate uncertainty on out-of-distribution examples from unseen classes. Overconfident predictions on unseen classes pose a challenge for reliable deployment of deep learning models in real world applications. We would like the predictions to exhibit higher uncertainty when the test data is very different from the training data. To test if the proposed method possesses this desirable property, we train a MLP on the standard MNIST train/test split using the same architecture as before. However, in addition to the regular test set with known classes, we also evaluate it on a test set containing unknown classes. We used the test split of the NotMNIST10 dataset. The images in this dataset have the same size as MNIST, however the labels are alphabets instead of digits. We do not have access to the true conditional probabilities, but we expect the predictions to be closer to uniform on unseen classes compared to the known classes where the predictive probabilities should concentrate on the true targets. We evaluate the entropy of the predictive distribution and use this to evaluate the quality of the uncertainty estimates. The results are shown in Figure 3(a). For known classes (top row), both our method and MC-dropout have low entropy as expected. For unknown classes (bottom row), as M increases, the entropy of deep ensembles increases much faster than MC-dropout indicating that our method is better suited for handling unseen test examples. In particular, MC-dropout seems to give high confidence predictions for some of the test examples, as evidenced by the mode around 0 even for unseen classes. Such overconfident wrong predictions can be problematic in practice when tested on a mixture of known and unknown classes, as we will see in Section 3.6. Comparing different variants of our method, the mode for adversarial training increases slightly faster than the mode for vanilla ensembles indicating that adversarial training is beneficial 8The architecture is similar to the one described in http://torch.ch/blog/2015/07/30/cifar.html. 9More precisely, we define disagreement as PM m=1 KL(p✓m(y|x)||pE(y|x)) where KL denotes the Kullback-Leibler divergence and pE(y|x) = M −1 P m p✓m(y|x) is the prediction of the ensemble. 10Available at http://yaroslavvb.blogspot.co.uk/2011/09/notmnist-dataset.html 7 for quantifying uncertainty on unseen classes. We qualitatively evaluate results in Figures 12(a) and 12(b) in Appendix B.2. Figure 12(a) shows that the ensemble agreement is highest for letter ‘I’ which resembles 1 in the MNIST training dataset, and that the ensemble disagreement is higher for examples visually different from the MNIST training dataset. −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values 0 2 4 6 8 10 12 14 EnsemEle 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values EnsemEle + 5 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values EnsemEle + AT 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values 0C drRpRut 0.1 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values 0 2 4 6 8 10 12 14 EnsemEle 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values EnsemEle + 5 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values EnsemEle + AT 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values 0C drRpRut 0.1 1 5 10 (a) MNIST-NotMNIST −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values 0 1 2 3 4 5 6 7 EnsemEle 1 5 10 −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values EnsemEle + 5 1 5 10 −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values EnsemEle + A7 1 5 10 −0.5 0.0 0.5 1.0 1.5 2.0 entrRpy values 0C drRpRut 1 5 10 −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values 0 1 2 3 4 5 6 7 EnsemEle 1 5 10 −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values EnsemEle + 5 1 5 10 −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values EnsemEle + A7 1 5 10 −0.50.0 0.5 1.0 1.5 2.0 2.5 entrRpy values 0C drRpRut 1 5 10 (b) SVHN-CIFAR10 Figure 3: : Histogram of the predictive entropy on test examples from known classes (top row) and unknown classes (bottom row), as we vary ensemble size M. We ran a similar experiment, training on SVHN and testing on CIFAR-10 [31] test set; both datasets contain 32 ⇥32 ⇥3 images, however SVHN contains images of digits whereas CIFAR-10 contains images of object categories. The results are shown in Figure 3(b). As in the MNIST-NotMNIST experiment, we observe that MC-dropout produces over-confident predictions on unseen examples, whereas our method produces higher uncertainty on unseen classes. Finally, we test on ImageNet by splitting the training set by categories. We split the dataset into images of dogs (known classes) and non-dogs (unknown classes), following Vinyals et al. [58] who proposed this setup for a different task. Figure 5 shows the histogram of the predictive entropy as well as the maximum predicted probability (i.e. confidence in the predicted class). We observe that the predictive uncertainty improves on unseen classes, as the ensemble size increases. 3.6 Accuracy as a function of confidence In practical applications, it is highly desirable for a system to avoid overconfident, incorrect predictions and fail gracefully. To evaluate the usefulness of predictive uncertainty for decision making, we consider a task where the model is evaluated only on cases where the model’s confidence is above an user-specified threshold. If the confidence estimates are well-calibrated, one can trust the model’s predictions when the reported confidence is high and resort to a different solution (e.g. use human in a loop, or use prediction from a simpler model) when the model is not confident. We re-use the results from the experiment in the previous section where we trained a network on MNIST and test it on a mix of test examples from MNIST (known classes) and NotMNIST (unknown M Top-1 error Top-5 error NLL Brier Score % % ⇥10−3 1 22.166 6.129 0.959 0.317 2 20.462 5.274 0.867 0.294 3 19.709 4.955 0.836 0.286 4 19.334 4.723 0.818 0.282 5 19.104 4.637 0.809 0.280 6 18.986 4.532 0.803 0.278 7 18.860 4.485 0.797 0.277 8 18.771 4.430 0.794 0.276 9 18.728 4.373 0.791 0.276 10 18.675 4.364 0.789 0.275 Figure 4: Results on ImageNet: Deep Ensembles lead to lower classification error as well as better predictive uncertainty as evidenced by lower NLL and Brier score. Figure 5: ImageNet trained only on dogs: Histogram of the predictive entropy (left) and maximum predicted probability (right) on test examples from known classes (dogs) and unknown classes (non-dogs), as we vary the ensemble size. 8 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 CRnfidence 7hreshRld τ 30 40 50 60 70 80 90 Accuracy Rn examples p(y|x) ≥τ EnsemEle EnsemEle + 5 EnsemEle + A7 0C drRpRut Figure 6: Accuracy vs Confidence curves: Networks trained on MNIST and tested on both MNIST test containing known classes and the NotMNIST dataset containing unseen classes. MC-dropout can produce overconfident wrong predictions, whereas deep ensembles are significantly more robust. classes). The network will produce incorrect predictions on out-of-distribution examples, however we would like these predictions to have low confidence. Given the prediction p(y = k|x), we define the predicted label as ˆy = arg maxk p(y = k|x), and the confidence as p(y = ˆy|x) = maxk p(y = k|x). We filter out test examples, corresponding to a particular confidence threshold 0 ⌧1 and plot the accuracy for this threshold. The confidence vs accuracy results are shown in Figure 6. If we look at cases only where the confidence is ≥90%, we expect higher accuracy than cases where confidence ≥80%, hence the curve should be monotonically increasing. If the application demands an accuracy x%, we can trust the model only in cases where the confidence is greater than the corresponding threshold. Hence, we can compare accuracy of the models for a desired confidence threshold of the application. MC-dropout can produce overconfident wrong predictions as evidenced by low accuracy even for high values of ⌧, whereas deep ensembles are significantly more robust. 4 Discussion We have proposed a simple and scalable non-Bayesian solution that provides a very strong baseline on evaluation metrics for predictive uncertainty quantification. Intuitively, our method captures two sources of uncertainty. Training a probabilistic NN p✓(y|x) using proper scoring rules as training objectives captures ambiguity in targets y for a given x. In addition, our method uses a combination of ensembles (which captures “model uncertainty” by averaging predictions over multiple models consistent with the training data), and adversarial training (which encourages local smoothness), for robustness to model misspecification and out-of-distribution examples. Ensembles, even for M = 5, significantly improve uncertainty quality in all the cases. Adversarial training helps on some datasets for some metrics and is not strictly necessary in all cases. Our method requires very little hyperparameter tuning and is well suited for large scale distributed computation and can be readily implemented for a wide variety of architectures such as MLPs, CNNs, etc including those which do not use dropout e.g. residual networks [22]. It is perhaps surprising to the Bayesian deep learning community that a non-Bayesian (yet probabilistic) approach can perform as well as Bayesian NNs. We hope that our work will encourage the community to consider non-Bayesian approaches (such as ensembles) and other interesting evaluation metrics for predictive uncertainty. Concurrent with our work, Hendrycks and Gimpel [23] and Guo et al. [20] have also independently shown that non-Bayesian solutions can produce good predictive uncertainty estimates on some tasks. Abbasi and Gagn´e [1], Tram`er et al. [57] have also explored ensemble-based solutions to tackle adversarial examples, a particularly hard case of out-of-distribution examples. There are several avenues for future work. We focused on training independent networks as training can be trivially parallelized. Explicitly de-correlating networks’ predictions, e.g. as in [37], might promote ensemble diversity and improve performance even further. Optimizing the ensemble weights, as in stacking [60] or adaptive mixture of experts [28], can further improve the performance. The ensemble has M times more parameters than a single network; for memory-constrained applications, the ensemble can be distilled into a simpler model [10, 26]. It would be also interesting to investigate so-called implicit ensembles the where ensemble members share parameters, e.g. using multiple heads [36, 48], snapshot ensembles [27] or swapout [52]. 9 Acknowledgments We would like to thank Samuel Ritter and Oriol Vinyals for help with ImageNet experiments, and Daan Wierstra, David Silver, David Barrett, Ian Osband, Martin Szummer, Peter Dayan, Shakir Mohamed, Theophane Weber, Ulrich Paquet and the anonymous reviewers for helpful feedback. References [1] M. Abbasi and C. Gagn´e. Robustness to adversarial examples through an ensemble of specialists. arXiv preprint arXiv:1702.06856, 2017. [2] B. Alipanahi, A. Delong, M. T. Weirauch, and B. J. Frey. Predicting the sequence specificities of DNA-and RNA-binding proteins by deep learning. Nature biotechnology, 33(8):831–838, 2015. [3] D. Amodei, C. Olah, J. Steinhardt, P. Christiano, J. Schulman, and D. Man´e. Concrete problems in AI safety. arXiv preprint arXiv:1606.06565, 2016. [4] J. M. Bernardo and A. F. Smith. Bayesian Theory, volume 405. John Wiley & Sons, 2009. [5] C. M. Bishop. Mixture density networks. 1994. [6] C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra. Weight uncertainty in neural networks. In ICML, 2015. [7] L. Breiman. Bagging predictors. Machine learning, 24(2):123–140, 1996. [8] L. Breiman. Random forests. Machine learning, 45(1):5–32, 2001. [9] G. W. Brier. Verification of forecasts expressed in terms of probability. Monthly weather review, 1950. [10] C. Bucila, R. Caruana, and A. Niculescu-Mizil. Model compression. In KDD. ACM, 2006. [11] B. Clarke. Comparing Bayes model averaging and stacking when model approximation error cannot be ignored. J. Mach. Learn. Res. (JMLR), 4:683–712, 2003. [12] A. P. Dawid. The well-calibrated Bayesian. Journal of the American Statistical Association, 1982. [13] M. H. DeGroot and S. E. Fienberg. The comparison and evaluation of forecasters. The statistician, 1983. [14] T. G. Dietterich. Ensemble methods in machine learning. In Multiple classifier systems. 2000. [15] Y. Gal and Z. Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. In ICML, 2016. [16] P. Geurts, D. Ernst, and L. Wehenkel. Extremely randomized trees. Machine learning, 63(1): 3–42, 2006. [17] T. Gneiting and A. E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007. [18] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. [19] A. Graves. Practical variational inference for neural networks. In NIPS, 2011. [20] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. arXiv preprint arXiv:1706.04599, 2017. [21] L. Hasenclever, S. Webb, T. Lienart, S. Vollmer, B. Lakshminarayanan, C. Blundell, and Y. W. Teh. Distributed Bayesian learning with stochastic natural-gradient expectation propagation and the posterior server. arXiv preprint arXiv:1512.09327, 2015. 10 [22] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [23] D. Hendrycks and K. Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. arXiv preprint arXiv:1610.02136, 2016. [24] J. M. Hern´andez-Lobato and R. P. Adams. Probabilistic backpropagation for scalable learning of Bayesian neural networks. In ICML, 2015. [25] 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. Signal Processing Magazine, IEEE, 29(6): 82–97, 2012. [26] G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. [27] G. Huang, Y. Li, G. Pleiss, Z. Liu, J. E. Hopcroft, and K. Q. Weinberger. Snapshot ensembles: Train 1, get M for free. ICLR submission, 2017. [28] R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991. [29] D. P. Kingma, T. Salimans, and M. Welling. Variational dropout and the local reparameterization trick. In NIPS, 2015. [30] A. Korattikara, V. Rathod, K. Murphy, and M. Welling. Bayesian dark knowledge. In NIPS, 2015. [31] A. Krizhevsky. Learning multiple layers of features from tiny images. 2009. [32] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [33] A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016. [34] B. Lakshminarayanan. Decision trees and forests: a probabilistic perspective. PhD thesis, UCL (University College London), 2016. [35] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [36] S. Lee, S. Purushwalkam, M. Cogswell, D. Crandall, and D. Batra. Why M heads are better than one: Training a diverse ensemble of deep networks. arXiv preprint arXiv:1511.06314, 2015. [37] S. Lee, S. P. S. Prakash, M. Cogswell, V. Ranjan, D. Crandall, and D. Batra. Stochastic multiple choice learning for training diverse deep ensembles. In NIPS, 2016. [38] Y. Li, J. M. Hern´andez-Lobato, and R. E. Turner. Stochastic expectation propagation. In NIPS, 2015. [39] C. Louizos and M. Welling. Structured and efficient variational deep learning with matrix Gaussian posteriors. arXiv preprint arXiv:1603.04733, 2016. [40] D. J. MacKay. Bayesian methods for adaptive models. PhD thesis, California Institute of Technology, 1992. [41] S.-i. Maeda. A Bayesian encourages dropout. arXiv preprint arXiv:1412.7003, 2014. [42] T. Mikolov, K. Chen, G. Corrado, and J. Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013. [43] T. P. Minka. Bayesian model averaging is not model combination. 2000. 11 [44] T. Miyato, S.-i. Maeda, M. Koyama, K. Nakae, and S. Ishii. Distributional smoothing by virtual adversarial examples. In ICLR, 2016. [45] V. Nair and G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. In ICML, 2010. [46] R. M. Neal. Bayesian Learning for Neural Networks. Springer-Verlag New York, Inc., 1996. [47] D. A. Nix and A. S. Weigend. Estimating the mean and variance of the target probability distribution. In IEEE International Conference on Neural Networks, 1994. [48] I. Osband, C. Blundell, A. Pritzel, and B. Van Roy. Deep exploration via bootstrapped DQN. In NIPS, 2016. [49] J. Quinonero-Candela, C. E. Rasmussen, F. Sinz, O. Bousquet, and B. Sch¨olkopf. Evaluating predictive uncertainty challenge. In Machine Learning Challenges. Springer, 2006. [50] C. E. Rasmussen and J. Quinonero-Candela. Healing the relevance vector machine through augmentation. In ICML, 2005. [51] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. [52] S. Singh, D. Hoiem, and D. Forsyth. Swapout: Learning an ensemble of deep architectures. In NIPS, 2016. [53] J. T. Springenberg, A. Klein, S. Falkner, and F. Hutter. Bayesian optimization with robust Bayesian neural networks. In Advances in Neural Information Processing Systems, pages 4134–4142, 2016. [54] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 2014. [55] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. In ICLR, 2014. [56] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2818–2826, 2016. [57] F. Tram`er, A. Kurakin, N. Papernot, D. Boneh, and P. McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017. [58] O. Vinyals, C. Blundell, T. Lillicrap, D. Wierstra, et al. Matching networks for one shot learning. In NIPS, 2016. [59] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In ICML, 2011. [60] D. H. Wolpert. Stacked generalization. Neural networks, 5(2):241–259, 1992. [61] J. Zhou and O. G. Troyanskaya. Predicting effects of noncoding variants with deep learningbased sequence model. Nature methods, 12(10):931–934, 2015. 12 | 2017 | 417 |
6,916 | Adaptive Active Hypothesis Testing under Limited Information Fabio Cecchi Eindhoven University of Technology, Eindhoven, The Netherlands f.cecchi@tue.nl Nidhi Hegde Nokia Bell Labs, Paris-Saclay, France nidhi.hegde@nokia-bell-labs.com Abstract We consider the problem of active sequential hypothesis testing where a Bayesian decision maker must infer the true hypothesis from a set of hypotheses. The decision maker may choose for a set of actions, where the outcome of an action is corrupted by independent noise. In this paper we consider a special case where the decision maker has limited knowledge about the distribution of observations for each action, in that only a binary value is observed. Our objective is to infer the true hypothesis with low error, while minimizing the number of action sampled. Our main results include the derivation of a lower bound on sample size for our system under limited knowledge and the design of an active learning policy that matches this lower bound and outperforms similar known algorithms. 1 Introduction We consider the problem of active sequential hypothesis testing with incomplete information. The original problem, first studied by Chernoff [1], is one where a Bayesian decision maker must infer the correct hypothesis from a set of J hypotheses. At each step the decision maker may choose from W actions where the outcome of an action is a random variable that depends on the action and the true (hidden) hypothesis. In prior work, the probability distribution functions on the outcomes are assumed to be known. In the present work we assume that these distributions are not known, and only some rough information about the outcomes of the actions is known, to be made more precise further on. Active hypothesis testing is an increasingly important problem these days, with applications that include the following. (a) Medical diagnostics ([2]) systems that include clinical trials for testing a new treatment, or diagnostics of a new disease. (b) Crowdsourcing: online platforms for task-worker matching such as Amazon’s Mechanical Turk or TaskRabbit, where, as new tasks arrive, they must be matched to workers capable of working on them. (c) Customer hotline centres or Q&A forums: online platforms such as StackExchange where questions are submitted, and users with varying capabilities are available for providing an answer. This includes customer service centres where customer tickets are submitted and the nature of the problem must be learned before its treatment (an example where supervised learning techniques are used is [3]). (d) Content search problems where an incoming image must be matched to known contents, as studied in [4]. We now informally describe our model. In the general instance of our problem, the true hypothesis, θ∗is one in a set of J hypotheses, J = {θ1, . . . , θJ}, and a set of W actions is available, where the outcomes of the actions depend on the true hypothesis. When the true hypothesis is θj and 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. action w is chosen, a noisy outcome Xw,j ∈J is observed, whose distribution, pw,j(·) ∈P(J ), is given. The objective then is to select an action at each step so as to infer the true hypothesis in a minimum number of steps, with a given accuracy. In our model, we assume that the decision maker has limited information about the outcome distributions. We define the principal set of an action w as Jw ⊆J . When action w is sampled, a noisy binary outcome y ∈{−1, 1} is observed, which gives an indication on whether the action classifies the hypothesis in the set Jw. The quality of action w, αw is related to the noise in the outcome. Rather than the distributions pw,j(·), we assume that the decision maker only has knowledge of the principal set Jw and quality αw of each action. 1.1 Related work Since the seminal work by Chernoff [1], active hypothesis testing and variants of the problemhave been studied through various perspectives (see [5] for a brief survey). Chernoff derived a simple heuristic algorithm whose performance is shown to achieve asymptotic optimality in the regime where the probability of error vanishes. Specifically, it is shown that as the probability of error δ decreases the expected number of samples needed by Chernoff’s algorithm grows as −log(δ). Most of the past literature in active sequential hypothesis testing has dealt with extensions of Chernoff’s model, and has shown that Chernoff’s algorithm performs well in more general settings [6, 7]. A notable exception is [8], where the impact of the number of hypotheses is analyzed and an algorithm that performs better than Chernoff’s benchmark is provided for the case of large values of J. Our work differs from prior work in a few ways. First, the hypothesis need not be locally identifiable. While in [1] each action is able to distinguish each pair of hypotheses, we assume that each hypothesis is globally identifiable, i.e., each pair of hypotheses can be discerned by at least one action. This is a common assumption in the area of distributed hypothesis testing ([9, 10]) and a weaker assumption than that of Chernoff. Note that dropping this assumption is not novel in itself, and has been done in other work such as [8]. Second, a novel extension in our work, differing from [8] is that we do not assume full knowledge on the actions’ statistical parameters. The responses of actions are noisy, and in past literature the probability distributions governing them was assumed to be known. In our model, we drop this assumption, and we only require to know a lower bound αw > 1/2 on the probability that action w will provide a correct response, no matter the hypothesis we want to test. As far as we know, no previous work in active sequential learning has tackled the problem of incomplete statistical information and we believe that such an extension may provide a non-negligible impact in real-life applications. Active hypothesis testing is similar to the problem of Bayesian active learning. This latter perspective in considered in [11] where noisy Bayesian active learning setting is used on the hypothesis testing problem with asymmetric noise and a heuristic based on the extrinsic Jensen-Shannon (EJS) divergence [12] is proposed. As in [8], full knowledge of the probability distributions governing the noise is available. In contrast, in our work we consider a more restricted model where, only a binary outcome with noise is given by the actions on the large hypothesis space. Inference with binary responses is considered in work on generalized binary search (GBS) [13], which is special case where the label set (outcome of actions) is binary with the case of symmetric, non-peristent noise. Our work differs from this type of work in that we consider asymmetric label-dependent noise, that is, αw varies with action w. We thus position our work between [11, 8] and [13]. While the former assumes full knowledge on the noise distributions, we assume that only a binary response is provided and only a lower bound on the value that governs the outcome is known, and while the latter considers symmetric noise, we extend to asymmetric label-dependent noise. Our contribution. Our main objective is to investigate the minimum sample query size of this system for a certain level of accuracy in the inference of the true hypothesis, and to design efficient policies for this inference. Our contributions in the present paper are as follows. First, we consider the system under limited knowledge of outcome distribution. This restricted scenario adds a significant constraint for the action selection policy, and the belief vector update policy. To the best of our knowledge, this restricted scenario has not been considered in past literature. Second, under the limited knowledge constraint, we propose the Incomplete-Bayesian Adaptive Gradient (IBAG) policy which includes a belief vector update rule that we call Incomplete-Bayesian, and an action selection rule, named Adaptive Gradient, that follows the drift of the (unknown) coordinate of interest in the 2 belief vector. Third, we derive a lower bound on the sample size for the system under incomplete information, and show that the performance of IBAG matches this bound. We also carry out numerical experiments to compare IBAG to prior work. 2 Model The classic model of the active sequential learning problem consists in sequentially selecting one of several available sensing actions, in order to collect enough information to identify the true hypothesis, as considered in [1]. We thus consider a system where a decision maker has at his disposal a finite set of actions W = {1, . . . , W}, and there are a set of J = |J | < ∞possible hypothesis, J = {θ1, . . . , θJ}. (For the rest of the paper, we refer to a hypothesis only by its index, i.e., j for hypothesis θj, for ease of notation.) When the true hypothesis is j and action w is sensed, the outcome Xw,j ∈J is sampled from the distribution pw,j(·) ∈P(J ), i.e., P{Xw,j = j′} = pw,j(j′). In our model, we assume to have limited information about the actions and this affects the classic model in two ways. First, for every sampled action w, a binary outcome y ∈{−1, 1} is observed, indicating whether the inference of hypothesis by this action is in Jw or not, i.e., the response observed is Yw,j ∈{−1, 1} where Yw,j = 1, if Xw,j ∈Jw, −1, if Xw,j /∈Jw. The subset Jw ⊆J is assumed to be known, and it is described by the matrix g ∈{−1, 1}W ×J where gw,j = 1, if j ∈Jw, −1, if j /∈Jw. (1) Observe that the probability an action w correctly identifies the subset to which the true hypothesis j belongs is given by qw,j := P{Yw,j = gw,j} = P j′:gw,j=gw,j′ pw,j(j′). However, as a second restriction, instead of knowing qw,j, the capacity, or quality, of an action w is captured by αw where we assume that qw,j ≥αw, ∀j ∈J , w ∈W. (2) We thus characterize each action by its principal set, Jw, and its quality, αw. Assumption 1. For every action w ∈W, the principal sets Jw ⊆J and the quality αw ∈(1/2, 1) are known. Denote by ∆w = 2αw −1 where ∆w ∈[∆m, ∆M] and ∆m, ∆M ∈(0, 1). Since each action can only indicate whether the hypothesis belongs to a subset or not, there must exist an action w ∈W for which j1 and j2 belong to different subsets, for all pairs j1, j2 ∈J . Define the subset Wj1,j2 ⊆W as Wj1,j2 = {w ∈W : gw,j1gw,j2 = −1}. Assumption 2. For every j1, j2 ∈J , the subset Wj1,j2 is nonempty, i.e., each hypothesis is globally identifiable. For every action w ∈W and hypothesis j ∈J we define the subsets Jw,+j and Jw,−j which are, respectively, given by the hypotheses that action w cannot and can distinguish from j, i.e., Jw,+j = {j′ ∈J : gw,j′gw,j = 1}, Jw,−j = {j′ ∈J : gw,j′gw,j = −1}. Note that w ∈Wj1,j2 if and only if j2 ∈Jw,−j1 (or equivalently j1 ∈Jw,−j2). We aim to design a simple algorithm to infer the correct hypothesis using as few actions as possible. The true hypothesis will be denoted by j∗∈J . The learning process is captured by the evolution of the belief vector ν(t) ∈P(J ), where νj(t) denotes the decision maker’s confidence at time t that the true hypothesis is j. At the initial step t = 1, the belief vector ν(1) ∈P(J ) is initialized so that νj(1) > 0, j ∈J . Since we assume to initially lack any information on the true hypothesis, without loss of generality, we set νj(1) = 1/J for every j ∈J . At every step t ≥1, according to the belief vector ν(t), the decision maker determines the next action to sense FW (ν(t)) = w(t) ∈W according to some selection rule FW (·). The outcome y(t) ∈{−1, 1} from the chosen action w(t) is used to update the belief vector according to an update rule F U ν(t), w(t), y(t) = ν(t + 1) ∈P(J ). The algorithm ends at time T ∗, and the 3 inferred hypothesis is given by ˆj = arg maxj∈J νj(T ∗) . Sensing actions is stopped when one of the posteriors is larger than 1 −δ, for some δ > 0: T ∗= inf t≥0{max j∈J νj(t) > 1 −δ}. (3) 3 The Incomplete-Bayesian update rule We now describe how the decision maker updates the belief vector after he observes the outcome of an action. Given a belief vector ν ∈P(J ) and the observation y ∈{−1, 1} obtained from action w ∈W, define ˜f(y, j, w) = qw,j, y = gw,j, 1 −qw,j, y = −gw,j, f(y, j, w) = αw, y = gw,j, 1 −αw, y = −gw,j. Note that ˜f(y, j, w) denotes the probability of having outcome y given that the action w is chosen and the true hypothesis is j. The standard Bayesian update rule is given by the map F B U(ν, w, y), where F B U,j(ν, w, y) = ˜ f(y,j,w)νj P i∈J ˜ f(y,i,w)νi . In our model, however, the values qw,j for w ∈W are unknown to the decision maker. Hence, we introduce the Incomplete Bayesian (IB) update rule, which mimics the Bayesian rule, but with limited knowledge on outcome probailities. The IB update rule is given by the map F U(ν, w, y), where FU,j(ν, w, y) = f(y, j, w)νj P i∈J f(y, i, w)νi . (4) Observe that Bayesian and IB update rules are identical when qw,j = αw. In practice, the νj(t) evolves according to both the quality of the chosen action, αw, and the relation between this action’s principal set Jw and the current state of the belief vector ν(t). This dependence is formalized in the following lemma whose proof is included in the supplementary material, Section B. Lemma 1. Given ν(t) ∈P(J ) and w(t) ∈W, then it holds that νj∗(t + 1) νj(t + 1) = νj∗(t) νj(t) × 1, w.p. indic1{w(t) /∈Wj∗,j}, 1+∆w(t) 1−∆w(t) , w.p. 1{w(t) ∈Wj∗,j}qw(t),j∗, 1−∆w(t) 1+∆w(t) , w.p. 1{w(t) ∈Wj∗,j}(1 −qw(t),j∗). 3.1 A lower bound on the sample size Note that the IB update rule alone sets some constraints on the performance. In particular, if we require the error probability to be low, then the expected number of samples is necessarily larger than a certain quantity depending on the model parameters. We show that this quantity asymptotically grows as −log δ in the asymptotic regime where δ →0. Theorem 1. Assume the IB update rule is applied to the belief vector and that lim δ→0 P{νj∗(T ∗) ≤δ} ≤˜γ < 1. Then, there exist functions Kl 0(δ), Kl 1(δ) such that E[T ∗] ≥Kl 1(δ) log 1 δ + Kl 0(δ), lim δ→0 Kl i(δ) ≥Kl i > 0, for i = 0, 1. The proof of this result is presented in the supplement, Section A.2. We sketch the proof here. We first define St(j1, j2) = log νj1(t) νj2(t), S(j1, j2) = ST ∗(j1, j2), and show that, on the one hand, if P{ˆj ̸= j∗} is small, then P j̸=j∗S(j∗, j) is large with high probability, and on the other hand, if t is small, then P j̸=j∗St(j∗, j) is small with high probability. 4 We use these properties to derive a lower bound on the tail probability of T ∗, and thus on its expected value. Further, we can control the belief vector evolution by deriving bounds on the ratio between coordinates of the belief vector under the IB policy. Specifically, in the supplementary material Section A.3, we bound the probability that νj(t) > νj∗(t) at a certain time, and investigate how this probability evolves with t. 4 Adaptive Gradient: the action selection policy 4.1 A gradient-based selection policy We now present an action selection policy that, together with the IB update rule, defines our active learning algorithm, which we call the Incomplete-Bayesian Adaptive Gradient (IBAG) policy. We will then analyze the complete algorithm showing that its performance asymptotically matches the lower bound provided in Theorem 1 as δ →0. We focus on the j∗-th coordinate of the belief vector, and define the drift at time t as Dw(ν(t)) = E[νj∗(t + 1)|ν(t), w(t) = w] −νj∗(t). Simple algebra and (4) yield the following Lemma. Lemma 2. It holds that Dw(ν(t)) = 4∆wνj∗(t)νw,−j∗(t) qw,j∗−αw + ∆wνw,−j∗(t) 1 −∆2w 1 −2νw,−j∗(t) 2 , (5) where νw,+j = X j∈Jw,+j νj, νw,−j = X j∈Jw,−j νj. Assume for a moment that we know the true hypothesis j∗and qw,j∗for every w ∈W. Then, in order to let νj∗(t) grow as much as possible, we would greedily select the action w which maximizes Dw(ν(t)). Our worker selection policy will attempt to mimic as closely as possible this greedy policy, while operating without complete information. Lemma 3. It holds that Dw(ν(t)) ≥DL w(ν(t)), where DL w(ν(t)) = 4νj∗(t) ∆2 wν2 −w(t) 1 −∆2w 1 −2ν−w(t) 2 , (6) and ν−w(t) = min n X j∈Jw νj(t), X j /∈Jw νj(t) o The proof follows from the fact that Dw(ν(t)) is increasing both in qw,j∗and νw,−j∗(t) for every w ∈W, and the observation that that qw,j∗≥αw and νw,−j∗(t) ≥ν−w(t). Note that DL w(ν(t)) provides us a tight lower bound on the expected growth of the coordinate of the true hypothesis if action w is chosen at step t. Indeed, DL w(ν(t)) can be decomposed to a part that uses the j∗-th coordinate of the belief vector and a part than can be computed without knowing j∗. The Adaptive Gradient (AG) selection rule, then chooses at step t, the action wD(t) ∈W such that wD(t) = FW (ν(t)) = arg max w∈W G(ν−w, ∆w), G(v, d) = d2v2 1 −d2 1 −2v 2 , (7) i.e., we select the action maximizing the current lower bound on the expected growth of the j∗coordinate of the belief vector. Ties are broken uniformly. Remark: Assume the actions have different costs of sensing. The AG selection rule can then be generalized as follows: wD(t) = F c W (ν(t)) = arg max w∈W G(ν−w, ∆w) cw . (8) 5 4.2 An upper bound We now present our main result. We show that the expected number of samples required by our algorithm IBAG asymptotically matches the lower bound obtained in Theorem 1. Theorem 2. Under the IBAG algorithm, there exist constants Ku 0 , Ku 1 > 0 independent of δ such that E[T ∗] ≤Ku 1 log 1 δ + Ku 0 . The proof is provided in supplementary material, Section A.5. This result is based on the intuition that IBAG never selects an action that is too uninformative relative to the other actions. Specifically, the information provided by an action w at time t depends on its quality αw and outcome over the subset Jw,−j∗. In other words, the value νw,−j∗must decrease to 0, hence the higher this value is for a given action w, the more we can still learn from sensing this action. As a proxy for νw,−j∗we use ν−w which also must be as large as possible. The following lemma, whose proof is given in supplementary material, Section B, provides bounds on the relative quality of ν−wD(t) compared to ν−w. Lemma 4. For every w ∈W, it holds that ν−wD(t) ≥∆m ∆M ν−w. 5 Numerical results We now present numerical results based on simulations. In order to gain practical insight, we will focus on a task labelling application. A task labelling problem might arise in a crowdsourcing scenrio such as Amazon’s Mechanical Turk or Content search problems where an incoming image must be matched to known contents. The mapping to the hypothesis testing problem is as follows. The set of hypotheses J corresponds to the set of task labels, with j∗the true hypothesis being the latent task label that must be inferred. The set of W actions corresponds to W workers who perform the labelling when sampled, where pw,j(j′) is the probability that worker w assigns the task the label j′ when the true label is j. For each worker w, we will call Jw the expertise of the worker (principal set of the actions), and αw will be the quality of the worker. We will first investigate the impact of the lack of exact knowledge, i.e., the difference between αw and qw,j, that we call slack. We then compare our algorithm to that in [1] and that of [13] for a few scenarios of interest. 5.1 The effect of the slack Here we present a simulated scenario with J = 100, W = 15, and fixed subsets {Jw}w∈W satisfying Assumption 2. We set δ ≈0.001, and assume the incoming job-type to be j∗= 1. In Figure 1 we present the results of 1000 runs of the simulation for every instance of respectively the first and second scenario described below. Recalling that the simulation stops as soon as maxj νj(t) > 1 −δ, we specify that out of the entire set of simulations of these scenarios the algorithm never failed to infer the correct incoming job type j∗= 1. For both scenarios, in Figure 1(left) we display the averaged sample paths of the coordinate νj∗(t) and in Figure 1(right) the average sample size required for the decision maker to make an inference. The performance upper bound is pessimistic. In the first set of simulations, scenario A, we fix the quality vector α with αw ∈(0.55, 0.6) for every worker w ∈W. We then let the parameter s vary in {0, .05, .1, .15, .2, .25, .3} and assume qw,j∗= αw + s for every w ∈W. In Theorem 2 we proved an upper bound for E[T ∗] when the IBAG algorithm is employed. It can be observed that the upper bound does not depend on qw,j∗, but only on αw. In fact, the upper bound is obtained by looking at the worst case scenario, where qw,j∗= αw for every w ∈W and j ∈J . As the slack s grows, the performance of the algorithm drastically improves even if it is not reflected in the upper bound term. Robustness to perturbations in estimate of worker skills. In the second set of simulations, scenario B we fix the quality vector qw,j∗∈(0.85, 0.9) for every worker w ∈W. We then let the parameter s vary in {0, .05, .1, .15, .2, .25, .3} and set αw = qw,j∗−s for every w ∈W. It is observed that the IBAG algorithm performs well even when the decision maker’s knowledge of the skills is not precise, and he decides to play safe by reducing the lower bound α(w). 6 (a) Scenario A (b) Scenario B Figure 1: ((a), (b) left) Empirical average of the sample paths of the process νj∗(t), ((a), (b) right) Empirical average of the sample size T ∗. We therefore deduce that the learning process strongly depends on the true skills of the worker qw,j (Figure 1(a)), however their exact knowledge is not fundamental for IBAG to behave well (Figure 1(b)) - it is robust to small perturbations. 5.2 Comparison to existing algorithms Chernoff algorithm. As we mentioned, most of the existing sequential hypothesis testing algorithms are based on Chernoff’s algorithm presented in [1]. Such an algorithm, at step t identifies the job-types j1, j2 ∈J associated with the two highest values of ν(t) and selects the class of workers wC that best distinguishes j1 and j2, i.e., wC = arg maxw∈Wj1,j2 αw. In the asymptotic regime with δ →0, the expected sample size required by the Chernoff’s algorithm is of order −log δ, exactly as with IBAG. This has been proven ([1, 8]) in the case with full knowledge of the matrix pw,j(·). What we emphasize here is that by focusing only on the two highest components of ν(t), the decision maker loses information that might help him make a better selection of worker w(t). In particular, Chernoff’s algorithm bases its decision largely on the workers’ skills and thus does not behave as well as it should when these are not informative enough. Soft-Decision GBS algorithm. The algorithm proposed in [13] generalizes the intuition behind optimal GBS algorithms in noiseless environments. This algorithm, given a belief vector ν(t) at step t picks the worker ¯w such that ¯w = arg minw P j∈J νjgw,j = arg minw P j∈Jw νj − P j /∈Jw νj = arg maxw{ν−w}. Intuitively, the Soft-Decision GBS algorithm selects the worker that is the most "unsure", in the sense that the worker splits the belief vector as evenly as possible. Since the model in [13] does not allow for different qualities of the workers (noise is symmetric there), this feature does not play a role on the worker selection policy. Note that when the quality of all workers are identical, the Soft-Decision GBS and the IBAG algorithms are identical. In [13], an asymptotic performance analysis is presented, and under certain constraints on the problem geometry, it is shown that the sample size required is of order −log δ + log J, and once again the performance in terms of the error probability matches with IBAG. We now compare our algorithm IBAG with the Chernoff algorithm under three scenarios and with Soft-Decision GBS only for the third scenario where the quality αw or workers (noise in GBS) differ among the workers. In the first scenario, we set J = 32, j∗= 1, and δ = 0.003. We assume two kinds of worker classes. We have 5 ‘generalist’ workers, each of whom has |Jw| = J/2 = 16 and moreover for every pair of job types (j1, j2) there exists a generalist belonging to Wj1,j2. In addition, we have 32 ‘specialist’ workers who can distinguish exactly 1 job-type, i.e., |Jw| = 1. We assume that there is one specialist per job-type, and note that among them there is also w∗such that Jw∗= {j∗}. We consider two cases: in case A, the skills of the workers are identical, αw = 0.8 for every w ∈W, and in case B we drop the generalists’ skill level to αw = 0.75. We assume qw,j = αw for every w ∈W and j ∈J . In the second scenario, we set J = 30 with only specialists present. We set δ = 0.003 and j∗= 1. In this scenario we consider two cases as well, in case A αw = 0.7 for every worker, while in case B we drop the skill level of the specialist on job-type j∗to 0.65, representing a situation where the system is ill-prepared for an incoming job. We assume qw,j = αw for every w ∈W and j ∈J . We display the results for both scenarios in Figure 2. In Figure 2(top) we display boxplots of the number of queries required and in Figure 2(bottom) we show the expectation of the number of queries per kind of worker. In both scenarios, the performance of Chernoff’s algorithm is drastically 7 (a) Scenario 1 (b) Scenario 2 (c) Scenario 3 Figure 2: (top) Boxplot of the sample size T ∗. (bottom) Empirical expected number of times the different groups of workers are queried. weakened by only a tiny variation in αw, yielding a very different behavior. In the first scenario, although it is very informative to query the generalists in an early explorative stage, under Chernoff’s algorithm the selection of the workers relies too much on the skill levels and therefore always queries the specialists. The IBAG algorithm, on the other hand, sensibly decides at each step on the trade-off between getting rough information on a larger set of job pairs, or getting more precise information on a smaller set, and seems to better grasp this quality vs quantity dilemma. Similarly, in case B of the second scenario, the low-quality workers (the specialist in j∗) are never selected by Chernoff’s algorithm, even if their responses have a large impact on the growth of νj∗(t). For both cases A and B we see that IBAG outperforms Chernoff. In the third scenario we set J = 32, W = 42, and δ = 0.03. We have five low-quality generalist workers with αw = 0.55, five high-quality generalist workers with αw = 0.75. The remaining 32 workers are specialists with αw = 0.8. The plots comparing all three algorithms is shown in Figure 2(iii). We observe again that the Chernoff algorithm never queries generalists and performs the worst. IBAG outperforms Soft-GBS because it queries high-quality workers preferentially while Soft-GBS doesn’t consider quality. 6 Discussion and conclusion We have presented and analyzed the IBAG algorithm, an intuitive active sequential learning algorithm which requires only a rough knowledge of the quality and principal set of each available action. The algorithm is shown to be competitive and in many cases outperforms Chernoff’s algorithm, the benchmark in the area. As far as we know, this is the first attempt to analyze a scenario where the decision maker has limited knowledge of the system parameters. In Section 5 we studied through simulations, the effect of this lack of exact knowledge on the performances of the system, in order to quantify the tradeoff between caution, i.e., how close αw is to qw,j, and the cost. The numerical analysis suggests that a moderate caution does not worsen drastically the performance. In the supplement Section C we analyze formally this tradeoff and show results on how cautious the decision maker can be while still ensuring good performance. A further element of incomplete knowledge would be to allow slight perturbations on the principal sets of the actions. In the present paper we have assumed to know with certainty, for every w ∈W and j ∈J , whether w has j in its principal set (j ∈Jw), or not. In future work we will investigate the impact of uncertainty in the expertise, for instance having j ∈Jw with some probability pj,w. 8 As a last remark, it would be interesting to analyze the model when the different actions have heterogeneous costs. Note that the IBAG algorithm naturally extends to such case, as mentioned in equation (8). The IBAG algorithm in the framework of the task-worker system could give definitive answers on whether it is better to sample a response from a cheap worker with a general expertise and low skill or from more expensive workers with narrow expertise and higher skill. References [1] H. Chernoff, “Sequential design of experiments,” The Annals of Mathematical Statistics, vol. 30, no. 3, pp. 755–770, 1959. [2] S. Berry, B. Carlin, J. Lee, and P. Muller, Bayesian Adaptive Methods for Clinical Trials. CRC press, 2010. [3] S. C. Hui and G. Jha, “Data mining for customer service support,” Information & Management, vol. 38, no. 1, pp. 1–13, 2000. [4] N. Vaidhiyan, S. P. Arun, and R. Sundaresan, “Active sequential hypothesis testing with application to a visual search problem,” in 2012 IEEE International Symposium on Information Theory Proceedings (ISIT), pp. 2201–2205, IEEE, 2012. [5] B. Ghosh, “A brief history of sequential analysis,” Handbook of Sequential Analysis, vol. 1, 1991. [6] A. Albert, “The sequential design of experiments for infinitely many states of nature,” The Annals of Mathematical Statistics, vol. 32, pp. 774–799, 1961. [7] J. Kiefer and J. Sacks, “Asymptotically optimum sequential inference and design,” The Annals of Mathematical Statistics, vol. 34, pp. 705–750, 1963. [8] M. Naghshvar and T. Javidi, “Active sequential hypothesis testing,” The Annals of Statistics, vol. 41, no. 6, pp. 2703–2738, 2013. [9] A. Lalitha, A. Sarwate, and T. Javidi, “Social learning and distributed hypothesis testing,” in Information Theory (ISIT), 2014 IEEE International Symposium on, pp. 551–555, IEEE, 2014. [10] R. Olfati-Saber, J. Fax, and R. Murray, “Consensus and cooperation in networked multi-agent systems,” Proceedings of the IEEE, vol. 95, no. 1, pp. 215–233, 2007. [11] M. Naghshvar, T. Javidi, and K. Chaudhuri, “Noisy bayesian active learning,” in Communication, Control, and Computing (Allerton), 2012 50th Annual Allerton Conference on, pp. 1626–1633, IEEE, 2012. [12] M. Naghshvar and T. Javidi, “Extrinsic jensen-shannon divergence with application in active hypothesis testing,” in IEEE International Symposium on Information Theory (ISIT), 2012. [13] R. Nowak, “Noisy generalized binary search,” in Advances in neural information processing systems, pp. 1366–1374, 2009. 9 | 2017 | 418 |
6,917 | Translation Synchronization via Truncated Least Squares Xiangru Huang⋆ The University of Texas at Austin 2317 Speedway, Austin, 78712 xrhuang@cs.utexas.edu Zhenxiao Liang⋆ Tsinghua University Beijing, China, 100084 liangzx14@mails.tsinghua.edu.cn Chandrajit Bajaj The University of Texas at Austin 2317 Speedway, Austin, 78712 bajaj@cs.utexas.edu Qixing Huang The University of Texas at Austin 2317 Speedway, Austin, 78712 huangqx@cs.utexas.edu Abstract In this paper, we introduce a robust algorithm, TranSync, for the 1D translation synchronization problem, in which the aim is to recover the global coordinates of a set of nodes from noisy measurements of relative coordinates along an observation graph. The basic idea of TranSync is to apply truncated least squares, where the solution at each step is used to gradually prune out noisy measurements. We analyze TranSync under both deterministic and randomized noisy models, demonstrating its robustness and stability. Experimental results on synthetic and real datasets show that TranSync is superior to state-of-the-art convex formulations in terms of both efficiency and accuracy. 1 Introduction In this paper, we are interested in solving the 1D translation synchronization problem, where the input is encoded as an observation graph G = (V, E) with n nodes (i.e. V = {1, · · · , n}). Each node is associated with a latent coordinate x⋆ i ∈R, 1 ≤i ≤n, and each edge (i, j) ∈E is associated with a noisy measurement tij = x⋆ i −x⋆ j + N(ϵij) of the coordinate difference xi −xj under some noise model N(ϵij). The goal of translation synchronization is to recover the latent coordinates (up to a global shift) from these noisy pairwise measurements. Translation synchronization is a fundamental problem that arises in many application domains, including joint alignment of point clouds [7] and ranking from relative comparisons [8, 16]. A standard approach to translation synchronization is to solve the following linear program: minimize X (i,j)∈E |tij −(xi −xj)|, subject to n X i=1 xi = 0, (1) Where the constraint ensures that the solution is unique. The major drawback of the linear programming formulation is that it can only tolerate up to 50% of measurements coming from biased noise models (e.g., uniform samples with non-zero mean). Moreover, it is challenging to solve (1) efficiently at scale. Solving (1) using interior point method becomes impractical for large-scale datasets, while more scalable methods such as coordinate descent usually exhibit slow convergence. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we introduce a robust and scalable algorithm, TranSync, for translation synchronization. The algorithm is rather simple, we solve a truncated least squares at each iteration k: {x(k) i } = argmin {xi} X (i,j)∈E wij|tij −(xi −xj)|2, subject to n X i=1 p dixi = 0, di := X j∈N (i) wij. (2) where the weights wij = Id(|tij −(x(k−1) i −x(k−1) j )| < δk) are obtained from the solution at the previous iteration using a geometrically decaying truncation parameter δk. Although TranSync requires solving a linear system at each step, these linear systems are fairly similar to each other, meaning that the solution at the previous iteration provides an excellent warm-start for solving the linear system at the current iteration. As a result, the computational efficiency of TranSync is superior to state-of-the-art methods for solving the linear programming formulation. We analyze TranSync under both deterministic and randomized noise models, demonstrating its robustness and stability. In particular, we show that TranSync is able to handle biased noisy measurements. We have evaluated TranSync on both synthetic datasets and real datasets used in the applications of joint alignment of point clouds and ranking from pair-wise measurements. Experimental results show that TranSync is superior to state-of-the-art solvers for the linear programming formulation in terms of both computational efficiency and accuracy. 1.1 Related Work Translation synchronization falls into the general problem of map synchronization, which takes maps computed between pairs of objects as input, and outputs consistent maps across all the objects. Map synchronization appears as a crucial step in many scientific problems, including fusing partially overlapping range scans [15], assembling fractured surfaces [14], solving jigsaw puzzles [5, 11], multi-view structure from motion [25], data-driven shape analysis and processing [17], and structure from motion [27]. Early methods for map synchronization focused on applying greedy algorithms [14, 15, 18] or combinatorial optimization [20, 23, 27]. Although these methods exhibit certain empirical success, they lack theoretical understanding (e.g. we do not know under what conditions can the underlying ground-truth maps be exactly recovered). Recent methods for map synchronization apply modern optimization techniques such as convex optimization and non-convex optimization. In [13], Huang and Guibas introduce a semidefinite programming formulation for permutation synchronization and its variants. Chen et al. [4] generalize the method to partial maps. In [26], Wang and Singer introduce a method for rotation synchronization. Although these methods provide tight, exact recovery conditions, the computational cost of the convex optimizations provide an obstruction for applying these methods to large-scale data sets. In contrast to convex optimization, very recent map synchronization methods leverage non-convex optimization approaches such as spectral techniques and gradient-based optimization. In [21, 22], Pachauri et al. study map synchronization from the perspective of spectral decomposition. Recently, Shen et al. [24] provide an analysis of spectral techniques for permutation synchronization. Beyond spectral techniques, Zhou et al. [28] apply alternating minimization for permutation synchronization. Finally, Chen and Candes [3] introduce a method for the generalized permutation synchronization problem using the projected power method. To the best of our knowledge, we are the first to develop and analyze continuous map synchronizations (e.g., translations or rotations) beyond convex optimization. Our approach can be considered as a special case of reweighted least squares (or RLS) [9, 12], which is a powerful method for solving convex and non-convex optimizations. The general RLS framework has been applied for map synchronization (e.g. see [1, 2]). Despite the empirical success of these approaches, the theoretical understanding of RLS remains rather limited. The analysis in this paper provides a first step towards the understanding of RLS for map synchronization. 1.2 Notation Before proceeding to the technical part of this paper, we introduce some notation that will be used later. The unnormalized graph Laplacian of a graph G is denoted as LG. If it is obvious from the 2 Algorithm 1 TranSync(c, kmax) 1. x(−1) ←0. δ−1 ←∞. for k = 0, 1, 2, kmax do 2. Obtain the truncated graph G(k) using x(k−1) and δk−1. 3. Break if G(k) is disconnected 4. Solve (2) using (4) to obtain x(k). 5. δk = min max (i,j)∈E |tij −(x(0) i −x(0) j )|, cδk−1 . end for Output: x(k). context, we will always shorten LG as L to make the notation uncluttered. Similarly, we will use D = diag(d1, · · · , dn) to collect the vertex degrees and denote the vertex adjacency and vertex-edge adjacency matrices as A and B respectively. The peusdo-inverse of a matrix X is given by X+. In addition, we always sort the eigenvalues of a symmetric matrix X ∈Rn×n in increasing order (i.e. λ1(X) ≤λ2(X) ≤· · · ≤λn(X)). Moreover, we will consider several matrix norms ∥· ∥, ∥· ∥1,∞ and ∥· ∥F, which are defined as follows: ∥X∥= σmax(X), ∥X∥1,∞= max 1≤i≤n n X j=1 |xij|, ∥X∥F = X i,j x2 ij 1 2 . Note that ∥X∥1,∞is consistent with the L∞-norm of vectors. 2 Algorithm In this section, we provide the algorithmic details of TranSync. The iterative scheme (1) requires an initial solution x(0), an initial truncation parameter δ0, and a stopping condition. The initial solution can be determined by solving for x(0) from (2) w.r.t. wij = 1. We set the initial truncation parameter δ0 = max (i,j)∈E |tij −(x(0) i −x(0) j )|, so that the edge with the biggest residual is removed. We stop TranSync either after the maximum number of iterations is reached, or the truncated graph becomes disconnected. Algorithm 1 provides the pseudo code of TranSync. Clearly, the performance of TranSync is driven by the efficiency of solving (2) at each iteration. TranSync takes an iterative approach, in which we utilize a warm-start x(k−1) provided by the solution obtained at the previous iteration. When the truncated graph is non-bipartite, we find a simple weighted average scheme delivers satisfactory computational efficiency. Specifically, it generates a series of vectors xk,0 = x(k−1), xk,1, · · · , xk,nmax via the following recursion: xk,l+1 i = (1 −ϵ) X j∈N (i) wij(xk,l j + tij)/ X j∈N (i) wij + ϵxk,l i (3) xk,l+1 i = xk,l+1 i − 1 Pn i′=1 √di n X i′=1 p di′xk,l+1 i′ , (4) which may be written in the following matrix form: xk,l+1 = (In −1 nD−1 2 11T D 1 2 )[(1 −ϵ)D−1 Axk,l + Bt(k) + ϵxk,l], (5) Here we add the parameter ϵ to create a small perturbation to avoid the special case of bipartite graphs. For non-bipartite graphs, ϵ can be set to zero. Remark 2.1 The corresponding normalization constraint in (4), i.e., P i √ dixi = 0, only changes the solution to (2) by a constant factor. We utilize this modification for the purpose of obtaining a concise convergence property of the iterative scheme detailed below. The following proposition states that (4) admits a geometric convergence rate: 3 Proposition 2.1 xk,l geometrically converges to x(k+1). Specifically, ∀l ≥0, ∥D 1 2 xk,l −x(k) shift ∥≤(1 −(1 −ϵ)ρ)l∥D 1 2 xk,0 −x(k) shift ∥, x(k) shift = x(k) − P i √dix(k) i P i √di 1. where ρ < 1 is the spectral gap of the normalized Graph Laplacian of the truncated graph. Proof. See Appendix A. Since the intermediate solutions are mainly used to prune outlier observations, it is clear that O(log(n)) iterations of (5), which induce a O(1/n) error for solving (2), are sufficient. The complexity of checking if the graph is non-bapriatite is O(|E|). The total running time for solving (2) is thus O |E| log(n) . This means the total running time of TranSync is O(|E| log(n)kmax), making it scalable to large-scale datasets. 3 Analysis of TranSync In this section, we provide exact recovery conditions of TranSync. We begin with describing an exact recovery condition under a deterministic noise model in Section 3.1. We then study an exact recovery condition to demonstrate that TranSync can handle biased noisy samples in Section 3.2. 3.1 Deterministic Exact Recovery Condition We consider the following deterministic noisy model: We are given the ground-truth location xgt. Then, for each correct measurement tij, (i, j) ∈G, |tij −(xgt i −xgt j )| ≤σ for a threshold σ. In contrast, each incorrect measurement tij, (i, j) ∈G could take any real number. The following theorem provides an exact recovery condition under this noisy model. Theorem 3.1 Let dbad be the maximum number of incorrect measurements per node. Define α = max k L† G,kk + max i̸=j L† G,ij + n 2 max i,j,k pairwisely different |L† G,ki −L† G,kj|, and h = αdbad, p = dbadα 1 −2h, q = (n −dbad)α 1 −2h . Suppose h < 1 6 (or p < 1 4), then starting from any initial solution x(0), and for any large enough initial truncation threshold ϵ ≥2∥x(0)∥∞+ σ and iterative step size c satisfying 4p < c < 1, we have ∥x(k) −xgt∥∞≤qσ + 2pϵck−1, where k ≤−log ϵ(c −4p) (1 + 2q) σ / log c + 1. Moreover, we can eventually reach an x(k) such that ∥x(k)∥∞≤2p + cq c −4p σ which is independent of the initial solution x(0), initial truncation threshold ϵ, and values of all wrong measurements tG\Ggood. Proof: See Appendix B. □ Theorem 3.1 essentially says that TransSync can tolerate a constant fraction of arbitrary noise. To understand how strong this condition is, we consider the case where G = Kn is given by a clique. Moreover, we assume the nodes are divided into two clusters of equal size, where all the measurements within each cluster are correct. For measurements between different clusters, half of them are correct and the other half are wrong. In this case, 25% of all measurements are wrong. However, we cannot recover the original xgt in this case. In fact, we can set the wrong measurements in a consistent 4 manner, i.e tij = xgt i −xgt j + b for a constant b ̸= 0, leading to two competing clusters (one correct and the other one incorrect) with equal strength. Hence, in the worst case, any algorithm can only tolerate at most 25% of measurements being wrong. We now try to use Theorem 3.1 to analyze the case where the observation graph is a clique. In this case, it is clear that α = 1 n, and p = dbad n , i.e the fraction of wrong measurements out of all measurements. Hence, in the clique case, we have shown that TranSync converges to a neighborhood of the ground truth from any initial solution if the fraction of wrong measurements is less that 1 6 (i.e., 2/3 of the upper bound). 3.2 Biased Random Noisy Model We proceed to provide an exact recovery condition of TranSync under a biased random noisy model. To simplify the discussion, we assume the observation graph G = Kn is a clique. However, our analysis framework can be extended to handle arbitrary graphs. Assume σ << a + b. We consider the following noise model, where the noisy measurements are independent, and they follow tij = xgt i −xgt j + U[−σ, σ] with probability p xgt i −xgt j + U[−a, b] with probability 1 −p (6) It is easy to check that the linear programming formulation is unable to recover the ground-truth solution if b a+b(1 −p) > 1 2. The following theorem shows that TranSync achieves a sub-constant recovery rate instead. Theorem 3.2 There exists a constant c so that if p > c/ p log(n), then w.h.p, ∥x(k) −xgt∥∞≤(1 −p/2)k(b −a), ∀k = 0, · · · , [−log(b + a 2σ )/log(1 −p/2)]. The major difficulty of proving Theorem 3.2 is that x(k) is dependent on tk, making it hard to control x(k) using existing concentration bounds. We address this issue by showing that the solutions x(k), k = 0, · · · , stay close to the segment between xgt and xgt + (1 −p) a+b 2 1. Specifically, for points on this segment, we can leverage the independence of tij to derive the following concentration bound for one step of TranSync: Lemma 3.1 Consider a fixed observation graph G. Let r = (a+b)p (a+b)p+2(1−p)δ and dmin be the minimum degree of G. Suppose dmin = Ω(log2(n)), and p + r(1 −p) = Ω(log2(n)/dmin) . Consider an initial point x(0) (independent from tij) and a threshold parameter δ such that −a + δ ≤ mini x(0) i ≤maxi x(0) i ≤b −δ. Then w.h.p., one step of TranSync outputs x(1) which satisfies ∥x(1) −(1 −r)x(0) + rxgt)∥∞ = O s log(n) (p + r(1 −p))dminλ2(LG)) ! · r max(∥x(0)∥2 d,∞, r2) + O p r σ2 , where ∥x(0)∥d,∞= max 1≤i,j≤n |x(0) i −x(0) j |, and LG is the normalized graph Laplacian of G. Proof: See Appendix C.1. □ Remark 3.1 Note that when G is a clique or a graph sampled from the standard Erd˝os-Rényi model G(n, q), then O( q ρ log(n) (p+r(1−p))λ2(LG)) = O( q log(n) (p+r(1−p))n). To prove Theorem 3.2, we show that when k = O(log 3 4 (n)), the L∞distance between x(k) to the line segment between xgt and xgt + (1 −p) a+b 2 1 only grows geometrically, and this distance is in the order of o(p). On the other hand, (1 −p/2)k = o(p). So when k ≥k, that distance decays with a geometrical rate that is small than c. The details are deferred to Appendix C.2. 5 Improving recovery rate via sample splitting. Note that Lemma 3.1 enables us to apply standard sampling tricks to improve the recovery rate. To simplify the discussion, we will assume σ is sufficiently small. First of all, it is clear that if re-sampling is allowed at each iteration, then TranSync admits a recovery rate of O( log(n) √dmin ). When re-sampling is not allowed, we can improve the recovery rate by dividing the observations into O( log(n) √n ) independent sets, and apply one set of observations at each iteration. In this case, the recovery rate is O( log2(n) √n ). These recovery rates suggest that the recovery rate in Theorem 3.2 could potentially be improved. Nevertheless, Theorem 3.2 still shows that TranSync can tolerate a sub-constant recovery rate, which is superior to the linear programming formulation. 4 Experimental Results In this section, we provide a detailed experimental evaluation of the proposed translation synchronization (TranSync) method. We begin with describing the experimental setup in Section 4.1. We then perform evaluations on synthetic and real datasets in Section 4.2 and Section 4.3 respectively. 4.1 Experimental Setup Datasets. We employ both synthetic datasets and real datasets for evaluation. The synthetic data is generated following the noisy model described in (6). In the following, we encode the noisy model as M(G, p, σ), where G is the observation graph, p is the fraction of correct measurements, and σ describes the interval of correct measurements. Besides the synthetic data, we also consider two real datasets coming from the applications of joint alignment of point clouds and global ranking from relative rankings. Baseline comparison. We choose coordinate descent for solving (1) as the baseline algorithm. Specifically, denote the solution of xi, 1 ≤i ≤n at iteration k as x(k) i . Then {x(k) i } are given by the following recursion: x(k) i = arg min xi X j∈N (i) |xi −(x(k−1) j −tij)| = median j∈N (i) {x(k−1) j −tij}, 1 ≤i ≤n, k = 1, 2, · · · , (7) We use the same initial starting point as TranSync. We also tested interior point methods, and all the datasets used in our experiments are beyond their reach. Evaluation protocol. We report the min, median, and max of the coordinate-wise difference between the solution of each algorithm and the underlying ground-truth. We also report the total running time of each algorithm on each dataset (See Table 1). 4.2 Experimental Evaluation on Synthetic Datasets We generate the synthetic datasets by sampling from four kinds of observation graphs and two values of σ, i.e. σ ∈{0.01, 0.04}. The graphs are generated according to two modes: 1) dense graphs versus sparse graphs, and 2) regular graphs versus irregular graphs. To illustrate the strength of TranSync, we choose p ∈{0.4, 0.8} for dense graphs and p ∈{0.8, 1.0} for sparse graphs. Below is a detailed descriptions for all kinds of observation graphs generated. • Gdr (dense, regular): The first graph contains n = 2000 nodes. Independently, we connect an edge between a pair of vertices vi, vj with a fixed probability p = 0.1. The expected degree of each vertex is 200. • Gdi (dense, irregular): The second graph contains n = 2000 nodes. Independently, we connect an edge between a pair of vertices vi, vj with probability p = 0.4sisj, where si = 0.2+0.6 i−1 n−1, 1 ≤i ≤n are scalar values associated the vertices. The expected degree of each vertex is about 200. 6 Coordinate Descent TranSync G p σ min median max time min median max time Gdr 0.4 0.01 0.95e-2 1.28e-2 11.40e-2 0.939s 0.30e-2 0.37e-2 0.60e-2 0.178s Gdr 0.4 0.04 3.87e-2 4.73e-2 18.59e-2 1.325s 1.04e-2 1.22e-2 1.59e-2 0.155s Gdr 0.8 0.01 0.30e-2 0.34e-2 0.41e-2 0.781s 0.16e-2 0.18e-2 0.28e-2 0.149s Gdr 0.8 0.04 1.19e-2 1.35e-2 1.78e-2 1.006s 0.57e-2 0.70e-2 0.87e-2 0.133s Gdi 0.4 0.01 2.17e-2 17.59e-2 50.51e-2 0.865s 0.39e-2 0.52e-2 0.93e-2 0.179s Gdi 0.4 0.04 5.46e-2 19.40e-2 53.88e-2 1.043s 1.25e-2 1.55e-2 2.42e-2 0.169s Gdi 0.8 0.01 0.34e-2 0.42e-2 0.58e-2 0.766s 0.17e-2 0.24e-2 0.33e-2 0.159s Gdi 0.8 0.04 1.39e-2 1.66e-2 2.30e-2 0.972s 0.68e-2 0.86e-2 1.16e-2 0.141s Gsr 0.8 0.01 0.58e-2 0.65e-2 0.79e-2 10.062s 0.38e-2 0.45e-2 0.61e-2 1.852s Gsr 0.8 0.04 2.35e-2 2.62e-2 3.54e-2 12.375s 1.35e-2 1.55e-2 2.05e-2 1.577s Gsr 1.0 0.01 0.45e-2 0.50e-2 0.58e-2 9.798s 0.28e-2 0.32e-2 0.39e-2 0.188s Gsr 1.0 0.04 1.84e-2 1.99e-2 2.36e-2 11.626s 1.14e-2 1.29e-2 1.60e-2 0.179s Gsi 0.8 0.01 0.72e-2 0.85e-2 75.85e-2 10.236s 0.52e-2 0.64e-2 1.10e-2 1.835s Gsi 0.8 0.04 2.88e-2 3.38e-2 11.48e-2 12.350s 1.79e-2 2.16e-2 3.59e-2 1.610s Gsi 1.0 0.01 0.53e-2 0.62e-2 0.77e-2 9.388s 0.37e-2 0.43e-2 0.57e-2 0.180s Gsi 1.0 0.04 2.24e-2 2.52e-2 3.12e-2 12.200s 1.44e-2 1.72e-2 2.47e-2 0.187s Table 1: Experimental results comparing TranSync and Coordinate Descent (CD) under different settings. All statistics (min, median, max) and mean running time are computed among 100 independent experiments with the same setting. As observed, TranSync outperforms Coordinate Descent in all experiments. • Gsr (sparse, regular): The third graph is generated in a similar fashion as the first graph, except that the number of nodes n = 20K, and the connecting probability is set to p = 0.003. The expected degree of each vertex is 60. • Gsi (sparse, irregular): The fourth graph is generated in a similar fashion as the second graph, except that the number of nodes n = 20K, and the connecting probability between a pair of vertices is p = 0.1sisj, where si = 0.07 + 0.21 i−1 n−1, 1 ≤i ≤n are scalar values associated the vertices. The expected degree of each vertex is about 60. For this experiment, instead of using kmax as stopping condition as in Algorithm 1, we stop when we observe δk < δmin. Here δmin does not need to be close to σ. In fact, we choose δmin = 0.05, 0.1 for σ = 0.01, 0.04, respectively. We also claim that if a small validation set (with size significantly less than n) of correct observations is available, our performance could be further improved. As illustrated in Table 1, TranSync dominates coordinate descent in terms of both accuracy and prediction. In particular, TranSync is significantly better than coordinate descent on dense graphs in terms of accuracy. In particular, on dense but irregular graphs, coordinate descent did not converge at all when p = 0.8. The main advantage of TranSync on sparse graphs is the computational cost, although the accuracy is still considerably better than coordinate descent. 4.3 Experimental Evaluation on Real Datasets Translation synchronization for joint alignment of point clouds. In the first application, we consider the problem of joint alignment of point clouds from pair-wise alignment [10]. To this end, we utilize the Patriot Circle Lidar dataset1. We uniformly subsampled the dataset to 6K scans. We applied Super4PCS [19] to match each scan to 300 randomly selected scans, where each match returns a pair-wise rigid transformation and a score. We then pick the top-30 matches for each scan, this results in a graph with 140K edges. To create the input data for translation synchronization, we run the state-of-the-art rotation synchronization algorithm described in [2] to estimate a global pose Ri for each scan. The pair-wise measurement tij from node i to node j is then given by RT i tlocal ij , where tlocal ij is the translation vector obtained in pair-wise matching. The average outlier ratio of the pair-wise matches per node is 35%, which is relatively high since the observation graph is fairly sparse. Since tij is a 3D vector, we run TranSync three times, one for each coordinate. As illustrated in Figure 1, TranSync is able to recover the the global shape of the underlying scanning trajectory. In contrast, coordinate descent completely fails on this dataset. 1http://masc.cs.gmu.edu/wiki/MapGMU 7 Figure 1: The application of TranSync in joint alignment of 6K Lidar scans around a city block. (a) Snapshot of the underlying scanning trajectory. (b) Reconstruction using TranSync (c) Reconstruction using Coordinate Descent. Global ranking (score) Movie MRQE Hodge-Diff. Hodge-Ratio Hodge-Binary TS-Init TS-Final Shakespeare in Love 1(85) 1(0.247) 2(0.078) 1 (0.138) 1(0.135) 1(0.219) Witness 2(77) 2(0.217) 1(0.088) 3(0.107) 3(0.076) 2(0.095) October Sky 3(76) 3(0.213) 3(0.078) 2(0.111) 2(0.092) 3(0.0714) The Waterboy 4(66) 6(-0.464) 6(-0.162) 6(-0.252) 5(-0.134) 4(-0.112) Interview with the Vampire 5(65) 4(-0.031) 4(-0.012) 4(-0.120) 4 (-0.098) 5(-0.140) Dune 6(44) 5(-0.183) 5(-0.069) 5(-0.092) 6(-0.216) 6(-0.281) Table 2: Global ranking of selected six movies via different methods: MRQE, HodgeRank[16] with 1) arithmetic mean score difference, 2) geometric mean score ratio and 3) and binary comparisons, and the initial and final predictions of TranSync. TranSync results in the most consistent result with MRQE. Ranking from relative comparisons. In the second application, we apply TranSync to predict global rankings of Netflix movies from their relative comparisons provided by users. The Netflix dataset contains 17070 movies that were rated between October, 1998 and December, 2005. We adapt the procedure described in [16] to generate the input data. Specifically, for each pair of movies, we average the relative ratings from the same users within the same month. We only consider a relative measurement if we collect more than 10 such relative ratings. We then apply TranSync to predict the global rankings of all the movies. We report the initial prediction obtained by the first step of TranSync (i.e., all the relative comparisons are used) and the final prediction suggested by TranSync (i.e., after removing inconsistent relative comparisons). Table 2 compares TranSync with HodgeRank [16] on six representative movies that are studied in [16]. The experimental results show that both predictions appear to be more consistent with MRQE2 (the largest online directory of movie reviews on the internet) than HodgeRank [16] and its variants, which were only applied on these six movies in isolation. Moreover, the final prediction is superior to the initial prediction. These observations indicate two key advantages of TranSync, i.e., scalability on large-scale datasets and robustness to noisy relative comparisons. 5 Conclusions and Future Work In this paper, we have introduced an iterative algorithm for solving the translation synchronization problem, which estimates the global locations of objects from noisy measurements of relative locations. We have justified the performance of our approach both experimentally and theoretically under both deterministic and randomized conditions. Our approach is more scalable and accurate than the standard linear programming formulation. In particular, when the pair-wise measurement 2http://www.mrqe.com 8 is biased, our approach can still achieve sub-constant recovery rate, while the linear programming approach can tolerate no more than 50% of the measurements being biased. In the future, we plan to extend this iterative scheme to other synchronization problems, such as synchronizing rotations and point-based maps. Moreover, it would also be interesting to study variants of the iterative scheme such as re-weighted least squares. We would also like to close the gap between the current recovery rate and the lower bound, which exhibits a poly-log factor. This requires developing new tools for analyzing the iterative algorithm. Acknowledgement. Qixing Huang would like to acknowledge support this research from NSF DMS1700234. Chandrajit Bajaj would like to acknowledge support for this research from the National Institute of Health grants #R41 GM116300 and #R01 GM117594. References [1] F. Arrigoni, A. Fusiello, B. Rossi, and P. Fragneto. Robust rotation synchronization via low-rank and sparse matrix decomposition. CoRR, abs/1505.06079, 2015. [2] A. Chatterjee and V. M. Govindu. Efficient and robust large-scale rotation averaging. In 2013 IEEE International Conference on Computer Vision (ICCV). IEEE, 2013. [3] Y. Chen and E. J. Candès. The projected power method: An efficient algorithm for joint alignment from pairwise differences. CoRR, abs/1609.05820, 2016. [4] Y. Chen, L. J. Guibas, and Q. Huang. Near-optimal joint object matching via convex relaxation. 2014. [5] T. S. Cho, S. Avidan, and W. T. Freeman. A probabilistic image jigsaw puzzle solver. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2010. [6] F. R. K. Chung and P. Horn. The spectral gap of a random subgraph of a graph. Internet Mathematics, 4(2):225–244, 2007. [7] D. Crandall, A. Owens, N. Snavely, and D. Huttenlocher. Discrete-continuous optimization for large-scale structure from motion. In Proceedings of the 2011 IEEE Conference on Computer Vision and Pattern Recognition, CVPR ’11, pages 3001–3008, 2011. [8] R. Cruz, K. Fernandes, J. S. Cardoso, and J. F. P. da Costa. Tackling class imbalance with ranking. In 2016 International Joint Conference on Neural Networks, IJCNN 2016, Vancouver, BC, Canada, July 24-29, 2016, pages 2182–2187, 2016. [9] I. Daubechies, R. Devore, M. Fornasier, and C. S. Güntürk. Iteratively reweighted least squares minimization for sparse recovery. Comm. Pure Appl. Math. [10] N. Gelfand, N. J. Mitra, L. J. Guibas, and H. Pottmann. Robust global registration. In Proceedings of the Third Eurographics Symposium on Geometry Processing, SGP ’05, Aire-la-Ville, Switzerland, Switzerland, 2005. Eurographics Association. [11] D. Goldberg, C. Malon, and M. Bern. A global approach to automatic solution of jigsaw puzzles. In Proceedings of the Eighteenth Annual Symposium on Computational Geometry, SCG ’02, pages 82–87, 2002. [12] R. M. Heiberger and R. A. Becker. Design of an s function for robust regression using iteratively reweighted least squares. pages 112–116, 1992. [13] Q. Huang and L. Guibas. Consistent shape maps via semidefinite programming. Computer Graphics Forum, Proc. Eurographics Symposium on Geometry Processing (SGP), 32(5):177–186, 2013. [14] Q.-X. Huang, S. Flöry, N. Gelfand, M. Hofer, and H. Pottmann. Reassembling fractured objects by geometric matching. In ACM SIGGRAPH 2006 Papers, SIGGRAPH ’06, pages 569–578, 2006. [15] D. Huber. Automatic Three-dimensional Modeling from Reality. PhD thesis, Robotics Institute, Carnegie Mellon University, Pittsburgh, PA, December 2002. [16] X. Jiang, L. Lim, Y. Yao, and Y. Ye. Statistical ranking and combinatorial hodge theory. Math. Program., 127(1):203–244, 2011. [17] 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), 31(4), Aug. 2012. [18] W. Marande and G. Burger. Mitochondrial dna as a genomic jigsaw puzzle. Science, 318:5849, July 2007. [19] N. Mellado, D. Aiger, and N. J. Mitra. Super 4pcs fast global pointcloud registration via smart indexing. Computer Graphics Forum, 33(5):205–215, 2014. [20] 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), pages 1481–1491, 2011. [21] D. Pachauri, R. Kondor, G. Sargur, and V. Singh. Permutation diffusion maps (pdm) with application to the image association problem in computer vision. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 541–549. Curran Associates, Inc., 2014. [22] D. Pachauri, R. Kondor, and V. Singh. Solving the multi-way matching problem by permutation synchronization. In C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 1860–1868. Curran Associates, Inc., 2013. [23] R. Roberts, S. N. Sinha, R. Szeliski, and D. Steedly. Structure from motion for scenes with large duplicate structures. pages 3137–3144. Computer Vision and Patter Recognition, June 2011. 9 [24] Y. Shen, Q. Huang, N. Srebro, and S. Sanghavi. Normalized spectral map synchronization. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 4925–4933. 2016. [25] N. Snavely, S. M. Seitz, and R. Szeliski. Photo tourism: Exploring photo collections in 3d. ACM Trans. Graph., 25(3):835–846, July 2006. [26] L. Wang and A. Singer. Exact and stable recovery of rotations for robust synchronization. CoRR, abs/1211.2441, 2012. [27] C. Zach, M. Klopschitz, and M. Pollefeys. Disambiguating visual relations using loop constraints. In CVPR, pages 1426–1433, 2010. [28] X. Zhou, M. Zhu, and K. Daniilidis. Multi-image matching via fast alternating minimization. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pages 4032–4040, 2015. 10 | 2017 | 419 |
6,918 | Principles of Riemannian Geometry in Neural Networks Michael Hauser Department of Mechanical Engineering Pennsylvania State University State College, PA 16801 mzh190@psu.edu Asok Ray Department of Mechanical Engineering Pennsylvania State University State College, PA 16801 axr2@psu.edu Abstract This study deals with neural networks in the sense of geometric transformations acting on the coordinate representation of the underlying data manifold which the data is sampled from. It forms part of an attempt to construct a formalized general theory of neural networks in the setting of Riemannian geometry. From this perspective, the following theoretical results are developed and proven for feedforward networks. First it is shown that residual neural networks are fnite diference approximations to dynamical systems of frst order diferential equations, as opposed to ordinary networks that are static. This implies that the network is learning systems of diferential equations governing the coordinate transformations that represent the data. Second it is shown that a closed form solution of the metric tensor on the underlying data manifold can be found by backpropagating the coordinate representations learned by the neural network itself. This is formulated in a formal abstract sense as a sequence of Lie group actions on the metric fbre space in the principal and associated bundles on the data manifold. Toy experiments were run to confrm parts of the proposed theory, as well as to provide intuitions as to how neural networks operate on data. 1 Introduction The introduction is divided into two parts. Section 1.1 attempts to succinctly describe ways in which neural networks are usually understood to operate. Section 1.2 articulates a more minority perspective. It is this minority perspective that this study develops, showing that there exists a rich connection between neural networks and Riemannian geometry. 1.1 Latent variable perspectives Neural networks are usually understood from a latent variable perspective, in the sense that successive layers are learning successive representations of the data. For example, convolution networks [10] are understood quite well as learning hierarchical representations of images [19]. Long short-term memory networks [9] are designed such that input data act on a memory cell to avoid problems with long term dependencies. More complex devices like neural Turing machines are designed with similar intuitions for reading and writing to a memory [6]. Residual networks were designed [7] with the intuition that it is easier to learn perturbations from the identity map than it is to learn an unreferenced map. Further experiments then suggest that residual networks work well because, during forward propagation and back propagation, the signal from any block can be mapped to any other block [8]. After unraveling the residual network, this attribute can be seen more clearly. From this perspective, the residual network can be understood as an ensemble of shallower networks [17]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. M x(0) (M) x(1) (M) x(2) (M) x(3) (M) x(L) (M) x(0) x(1) x(2) x(3) x(L) ϕ(0) ϕ(1) ϕ(2) ϕ(L) Figure 1: Coordinate systems x(l+1) := ϕ(l) ◦... ◦ϕ(1) ◦ϕ(0) ◦x(0) induced by the coordinate transformations ϕ(l) : x(l) (M) → ϕ(l) ◦x(l) (M) learned by the neural network. The pullback metric gx(l)(M) (X, Y ) := g(ϕ(l)◦x(l))(M) ϕ(l) ∗X, ϕ(l) ∗Y pulls-back (i.e. backpropagates) the coordinate representation of the metric tensor from layer l + 1 to layer l, via the pushforward map ϕ(l) ∗ : Tx(l) (M) →T ϕ(l) ◦x(l) (M) between tangent spaces. 1.2 Geometric perspectives These latent variable perspectives are a powerful tool for understanding and designing neural networks. However, they often overlook the fundamental process taking place, where successive layers successively warp the coordinate representation of the data manifold with nonlinear transformations into a form where the classes in the data manifold are linearly separable by hyperplanes. These nested compositions of afne transformations followed by nonlinear activations can be seen by work done by C. Olah (http://colah.github.io/) and published by LeCun et al. [11]. Research in language modeling has shown that the word embeddings learned by the network preserve vector ofsets[13], with an example given as xapples −xapple ≈xcars −xcar for the word embedding vector xi. This suggests the network is learning a word embedding space with some resemblance to group closure, with group operation vector addition. Note that closure is generally not a property of data, for if instead of word embeddings one had images of apples and cars, preservation of these vector ofsets would certainly not hold at the input [3]. This is because the input images are represented in Cartesian coordinates, but are not sampled from a fat data manifold, and so one should not measure vector ofsets by Euclidean distance. In Locally Linear Embedding [14], a coordinate system is learned in which Euclidean distance can be used. This work shows that neural networks are also learning a coordinate system in which the data manifold can be measured by Euclidean distance, and the coordinate representation of the metric tensor can be backpropagated through to the input so that distance can be measured in the input coordinates. 2 Mathematical notations Einstein notation is used throughout this paper. A raised index in parenthesis, such as x(l), means it is the lth coordinate system while ϕ(l) means it is the lth coordinate transformation. If the index is not in parenthesis, a superscript free index means it is components of a vector, a subscript free index means it is components of a covector, and a repeated index means implied summation. The . in tensors, such as Aa. .b, are placeholders to keep track of which index comes frst, second, etc. A (topological) manifold M of dimension dimM is a Hausdorf, paracompact topological space that is locally homeomorphic to RdimM [18]. This homeomorphism x : U →x (U) ⊆RdimM is called a coordinate system on U ⊆M. Non-Euclidean manifolds, such as S1, can be created by taking an image and rotating it in a circle. A feedforward network learns coordinate transformations ϕ(l) : x(l) (M) → ϕ(l) ◦x(l) (M), where the new coordinates x(l+1) := ϕ(l) x(l) : M → x(l+1) (M), and is initialized in Cartesian coordinates x(0) : M →x(0) (M), as seen in Figure 1. A data point q ∈M can only be represented as numbers with respect to some coordinate system; with the coordinates at layer l + 1, q is represented as the layerwise composition x(l+1) (q) := ϕ(l) ◦... ◦ϕ(1) ◦ϕ(0) ◦x(0) (q). The output coordinate representation is x(L) (M) ⊆Rd. For an activation function f, such as ReLU or tanh, a standard feedforward network transforms coordinates as x(l+1) := ϕ(l) x(l) := f(x(l); l). Note ReLu is not a bijection and thus not a proper coordinate transformation. A residual network transforms coordinates as x(l+1) := ϕ(l) x(l) := x(l) + f(x(l); l). Note that these are global coordinates over the entire manifold. A residual network with ReLu activation is bijective, and is piecewise linear with kinks of infnite curvature. 2 With the Softmax coordinate transformation defned as softmax W (L) · x(L)j := eW (L)jx(L)/ PK k=1 eW (L)kx(L) the probability of q ∈M being from class j is P (Y = j|X = q) = softmax W (L) · x(L) (q) j. 3 Neural networks as Ck diferentiable coordinate transformations One can defne entire classes of coordinate transformations. The following formulation also has the form of diferentiable curves/trajectories, but because the number of dimensions often changes as one moves through the network, it is difcult to interpret a trajectory traveling through a space of changing dimensions. A standard feedforward neural network is a C0 function: x(l+1) := f(x(l); l) (1) A residual network has the form x(l+1) = x(l) + f(x(l); l). However, because of eventually taking the limit as L →∞and l ∈[0, 1] ⊂R, as opposed to l being only a fnitely countable index, the equivalent form of the residual network is as follows: x(l+1) ≃x(l) + f(x(l); l)∆l (2) where ∆l = 1/L for a uniform partition of the interval [0, 1] and is implicit in the weight matrix. One can defne entire classes of coordinate transformations inspired by fnite diference approximations of diferential equations. These can be used to impose kth order diferentiable smoothness: δx(l) := x(l+1) −x(l) ≃f(x(l); l)∆l (3) δ2x(l) := x(l+1) −2x(l) + x(l−1) ≃f(x(l); l)∆l2 (4) Each of these defne a diferential equation, but of diferent orders of smoothness on the coordinate transformations. Written in this form the residual network in Equation 3 is a frst-order forward diference approximation to a C1 coordinate transformation and has O (∆l) error. Network architectures with higher order accuracies can be constructed, such as central diferencing approximations of a C1 coordinate transformation to give O ∆l2 error. Note that the architecture of a standard feedforward neural network is a static equation, while the others are dynamic. Also note that Equation 4 can be rewritten x(l+1) = x(l) + f(x(l); l)∆l2 + δx(l−1), where δx(l−1) = x(l) −x(l−1), and in this form one sees that this is a residual network with an extra term δx(l−1) acting as a sort of momentum term on the coordinate transformations. This momentum term is explored in Section 7.1. By the defnitions of the Ck networks given by Equations 3-4, the right hand side is both continuous and independent of ∆l (after dividing), and so the limit exists as ∆l →0. Convergence rates and error bounds of fnite diference approximations can be applied to these equations. By the standard defnition of the derivative, the residual network defnes a system of diferentiable transformations. dx(l) dl := lim ∆l→0 x(l+∆l) −x(l) ∆l = f(x(l); l) (5) d2x(l) dl2 := lim ∆l→0 x(l+∆l) −2x(l) + x(l−∆l) ∆l2 = f(x(l); l) (6) Notations are slightly changed, by taking l = n∆l for n ∈{0, 1, 2, .., L −1} and indexing the layers by the fractional index l instead of the integer index n. This defnes a partitioning: P = {0 = l(0) < l(1) < l(2) < ... < l(n) < ... < l(L) = 1} (7) where ∆l(n) := l(n + 1) −l(n) can in general vary with n as the maxn ∆l(n) still goes to zero as L →∞. To reduce notation, this paper will write ∆l := ∆l (n) for all n ∈{0, 1, 2, ..., L −1}. In [4], a deep residual convolution network was trained on ImageNet in the usual fashion except parameter weights between residual blocks at the same dimension were shared, at a cost to the accuracy of only 0.2%. This is the diference between learning an inhomogeneous frst order equation dx(l) dl := f(x(l); l) and a (piecewise) homogeneous frst order equation dx(l) dl := f(x(l)). 3 layer 0 layer 1 layer 2 layer 3 layer 4 layer 5 layer 6 layer 7 layer 8 layer 9 layer 10 (a) A C0 network with sharply changing layer-wise particle trajectories. layer 0 layer 1 layer 2 layer 3 layer 4 layer 5 layer 6 layer 7 layer 8 layer 9 layer 10 (b) A C1 network with smooth layer-wise particle trajectories. layer 0 layer 1 layer 2 layer 3 layer 4 layer 5 layer 6 layer 7 layer 8 layer 9 layer 10 (c) A C2 network also exhibits smooth layer-wise particle trajectories. layer 0 layer 1 layer 2 layer 3 layer 4 layer 5 layer 6 layer 7 layer 8 layer 9 layer 10 (d) A combination C0 and C1 network, where the identity connection is left out in layer 6. Figure 2: Untangling the same spiral with 2-dimensional neural networks with diferent constraints on smoothness. The x and y axes are the two nodes of the neural network at a given layer l, where layer 0 is the input data. The C0 network is a standard network, while the C1 network is a residual network and the C2 network also exhibits smooth layerwise transformations. All networks achieve 0.0% error rates. The momentum term in the C2 network allows the red and blue sets to pass over each other in layers 3, 4 and 5. Figure 2d has the identity connection for all layers other than layer 6. 4 The Riemannian metric tensor learned by neural networks From the perspective of diferentiable geometry, as one moves through the layers of the neural network, the data manifold stays the same but the coordinate representation of the data manifold changes with each successive afne transformation and nonlinear activation. The objective of the neural network is to fnd a coordinate representation of the data manifold such that the classes are linearly separable by hyperplanes. Defnition 4.1. (Riemannian manifold [18]) A Riemannian manifold (M, g) is a real smooth manifold M with an inner product, defned by the positive defnite metric tensor g, varying smoothly on the tangent space of M. If the network has been well trained as a classifer, then by Euclidean distance two input points of the same class may be far apart when represented by the input coordinates but close together in the output coordinates. Similarly, two points of diferent classes may be near each other when represented by the input coordinates but far apart in the output coordinates. These ideas form the basis of Locally Linear Embeddings [14]. The intuitive way to measure distances is in the output coordinates, which even in the unsupervised case tends to be a fattened representation of the data manifold [3]. Accordingly, the metric in the output coordinates is the Euclidean metric: g x(L) aLbL := ηaLbL (8) The elements of the metric tensor transforms as a tensor with coordinate transformations: g(x(l))albl = ∂x(l+1) ∂x(l) al+1. .al ∂x(l+1) ∂x(l) bl+1. .bl g(x(l+1))al+1bl+1 (9) 4 layer 0 layer 1 layer 2 layer 3 layer 4 layer 5 Figure 3: A C1 (residual) network with a hyperbolic tangent activation function separating the spiral manifold. Additionally, balls of constant radius ds = p galbl(x(l))dx(l)aldx(l)bl at diferent points are shown. In the output coordinates, distances are measured by the standard Euclidean metric in Equation 8, and so the circles are "round". The coordinate representation of the metric tensor is pulled-back (backpropagated) through the network to the input by Equations 9 and 10. Distances on the data manifold can then be measured with the input Cartesian coordinates, and so the circles are not round. These balls can also be interpreted as forming an ϵ −δ relationship across layers of the network, where an ϵ-ball at one layer corresponds to a δ-ball at the previous layer. The above recursive formula is solved from the output layer to the input, i.e. the coordinate representation of the metric tensor is backpropagated through the network from output to input: g(x(l))albl = lY l′=L−1 ∂x(l′+1) ∂x(l′) !al′+1. .al′ ∂x(l′+1) ∂x(l′) !bl′+1. .bl′ ηaLbL (10) If the network is taken to be residual as in Equation 2, then the Jacobian of the coordinate transformation is found, with δal+1. .al the Kronecker delta: ∂x(l+1) ∂x(l) al+1. .al = δal+1. .al + ∂f x(l); l ∂x(l) !al+1. .al ∆l (11) Backpropagating the coordinate representation of the metric tensor requires the sequence of matrix products from output to input, and can be defned for any layer l: P aL. .al := L−1 Y l′=l δ al′+1. .al′ + ∂f(z(l′+1); l′) ∂z(l′+1) !al′+1. .el′+1 ∂z(l′+1) ∂x(l′) !el′+1. .al′ ∆l (12) where z(l+1) := W (l) · x(l) + b(l). With this, taking the output metric to be the standard Euclidean metric ηab, the linear element can be represented in the coordinate space for any layer l: ds2 = ηabP a. .alP b. .bldxaldxbl (13) The data manifold is independent of coordinate representation. At the output where distances are measured by the standard Euclidean metric an ϵ-ball can be defned. The linear element in Equation 13 defnes the corresponding δ-ball at layer l. This can be used to see what in the input space the neural network encodes as similar in the output space. As L →∞, Equation 12 becomes an infnite product of matricies (from our infnite applications of the chain rule) and these transformations act smoothly along the fbres of the tensor bundle. The proof that this sequence converges in the limit can be found in the appendix. This analysis has so far assumed a constant layerwise dimension, which is not how most neural networks are used in practice, where the number of nodes often changes. This is handled by the pullback metric [18]. Manifolds can be submersed and immersed into lower and higher dimensional spaces so long as the rank of the pushforward Jacobian matrix is constant for every p ∈M [12]. The dimension of the underlying data manifold is defned as the dimension of the smallest, bottleneck layer of the neural network, i.e. dimM := minl dimx(l) (M), and all other higher dimensional layers are immersion/embedding representations of this lowest dimensional representation. 5 Defnition 4.2. (Pushforward map) Let M and N be topological manifolds, ϕ(l) : M →N a smooth map and TM and TN be their respective tangent spaces. Also let X ∈TM where X : C∞(M) →R, and f ∈C∞(N). The pushforward is the linear map ϕ (l) ∗: TM →TN that takes an element X 7→ϕ (l) ∗X and is defned by its action on f as ϕ (l) ∗X (f) := X (f ◦ϕ(l)). Defnition 4.3. (Pullback metric) Let (M, gM) and (N, gN) be Riemannian manifolds, ϕ(l) : M → N a smooth map and ϕ (l) ∗: TM →TN the pushforward between their tangent spaces TM and TN. Then the pullback metric on M is given by gM (X, Y ) := gN ϕ (l) ∗X, ϕ (l) ∗Y ∀X, Y ∈TM. In practice being able to change dimensions in the neural network is important for many reasons. One reason is that neural networks usually have access to a limited number of types of nonlinear coordinate transformations, for example tanh, σ and ReLU. This severely limits the ability of the network to separate the wide variety of manifolds that exist. For example, the networks have difculty linearly separating the simple toy spirals in Figures 2 because they only have access to coordinate transformations of the form tanh. If instead they had access to a coordinate system that was more appropriate for spirals, such as polar coordinates, they could very easily separate the data. This is the reason why Locally Linear Embeddings [14] could very easily discover the coordinate charts for the underlying manifold, because k-nearest neighbors is an extremely fexible type of nonlinearity. Allowing the network to go into higher dimensions makes it easier to separate data. 5 Lie Group actions on the metric fbre bundle This section will abstractly formulate Section 4 as neural networks learning sequences of left Lie Group actions on the metric (fbre) space over the data manifold to make the metric representation of the underlying data manifold Euclidean. Several defnitions, which can be found in the appendix in the full version of this paper, are needed to formulate Lie group actions on principal and associated fbre bundles, namely of bundles, fbre bundles, Lie Groups and their actions on manifolds [18]. Defnition 5.1. (Principal fbre bundle) A bundle (E, π, M) is called a principal G-bundle if: (i.) E is equipped with a right G-action ◁: E × G →E. (ii.) The right G-action ◁is free. (iii.) (E, π, M) is (bundle) isomorphic to (E, ρ, E/G) where the surjective projection map ρ : E → E/G is defned by ρ (ϵ) := [ϵ] as the equivalence class of points of ϵ Remark. (Principal bundle) The principal fbre bundle can be thought of (locally) as a fbre bundle with fbres G over the base manifold M. Defnition 5.2. (Associated fbre bundle) Given a G principal bundle and a smooth manifold F on which exists a left G-action ▷: G × F →F, the associated fbre bundle (PF , πF , M) is defned as follows: (i.) let ∼G be the relation on P × F defned as follows: (p, f) ∼G (p′, f ′) : ⇐⇒∃h ∈G : p′ = p ◁h and f ′ = h−1 ▷f, and thus PF := (P × F) / ∼G. (ii.) defne πF : PF →M by πF ([(p, f)]) := π (p) Neural network actions on the manifold M are a (layerwise) sequence of left G-actions on the associated (metric space) fbre bundle. Let the dimension of the manifold d := dim M. The structure group G is taken to be the general linear group of dimension d over R, i.e. G = GL (d, R) := {φ : Rd →Rd| det φ ̸= 0}. The principal bundle P is taken to be the frame bundle, i.e. P = LM := ∪p∈MLpM := ∪p∈M{(e1, ..., ed) ∈TpM| (e1, ..., ed) is a basis of TpM}, where TpM is the tangent space of M at the point p ∈M. The right G-action ◁: LM × GL (d, R) →LM is defned by e ◁h = (e1, ..., ed) ◁h := (hal. .1 eal, ..., hal. .d eal), which is the standard transformation law of linear algebra. The fbre F in the associated bundle will be the metric tensor space, and so F = Rd∗× Rd∗, where the ∗denotes the cospace. With this, the left G-action ▷: GL (d, R) × F →F is defned as the inverse of the left, namely h−1 ▷g albl := (g ◁h)albl = gal+1bl+1hal+1. .al hbl+1. .bl . 6 Layerwise sequential applications of the left G-action from output to input is thus simply understood: h−1 0 ▷h−1 1 ▷... ▷h−1 L ▷g a0b0 = h−1 0 • ... • h−1 L ▷gaLbL = 0 Y l′=L−1 h al′+1. .a′ l h bl′+1. .bl′ gaLbL (14) This is equivalent to Equation 10, only formulated in a formal, abstract sense. 6 Backpropagation as a sequence of right Lie Group actions A similar analysis that has been performed in Sections 4 and 5 can be done to generalize error backpropagation as a sequence of right Lie Group actions on the output error (or more generally pull-back the frame bundle). The discrete layerwise error backpropagation algorithm [15] is derived using the chain rule on graphs. The closed form solution of the gradient of the output error E with respect to any layer weight W (l−1) can be solved for recursively from the output, by backpropagating errors: ∂E ∂W (l−1) = ∂E ∂x(L) aL lY l′=L−1 ∂x(l′+1) ∂x(l′) !al′+1. .al′ ∂x(l) ∂W (l−1) al (15) In practice, one further applies the chain rule ∂x(l) ∂W (l−1) al = ∂x(l) ∂z(l) al. .bl ∂z(l) ∂W (l−1) bl. Note that W (l−1) is a coordinate chart on the parameter manifold [1], not the data manifold. In this form it is immediately seen that error backpropagation is a sequence of right G-actions Ql l′=L−1 ∂x(l′+1) ∂x(l′) al′+1. .al′ on the output frame bundle ∂ ∂x(L) aL. This pulls-back the frame bundle acting on E to the coordinate system at layer l, and thus puts it in the same space as ∂x(l) ∂W (l−1) al . For the residual network, the transformation matrix Equation 11 can be inserted into Equation 15.By the same logic as before, the infnite tensor product in Equation 15 converges in the limit L →∞in the same way as in Equation 12, and so it is not rewritten here. In the limit this becomes a smooth right G-action on the frame bundle, which itself is acting on the error cost function. 7 Numerical experiments This section presents the results of numerical experiments used to understand the proposed theory. The C∞hyperbolic tangent has been used for all experiments, with weights initialized according to [5]. For all of the experiments, layer 0 is the input Cartesian coordinate representation of the data manifold, and the fnal layer L is the last hidden layer before the linear softmax classifer. GPU implementations of the neural networks are written in the Python library Theano [2, 16]. 7.1 Neural networks with Ck diferentiable coordinate transformations As described in Section 3, kth order smoothness can be imposed on the network by considering network structures defned by e.g. Equations 3-4. As seen in Figure 2a, the standard C0 network with no impositions on diferentiability has very sharp layerwise transformations and separates the data in an unintuitive way. The C1 residual network and C2 network can be seen in Figures 2b and 2c, and exhibit smooth layerwise transformations and separate the data in a more intuitive way. Forward diferencing is used for the C1 network, while central diferencing was used for the C2 network, except at the output layer where backward diferencing was used, and at the input frst order smoothness was used as forward diferencing violates causality. In Figure 2c one can see that for the C2 network the red and blue data sets pass over each other in layers 4, 5 and 6. This can be understood as the C2 network has the same form as a residual network, with an additional momentum term pushing the data past each other. 7 layer 0 layer 2 layer 4 layer 6 layer 8 layer 10 layer 12 layer 14 layer 16 layer 18 layer 20 layer 22 layer 24 layer 26 layer 28 layer 30 layer 32 layer 34 layer 36 layer 38 layer 40 layer 42 layer 44 layer 46 layer 48 layer 50 (a) A batch size of 300 for untangling data. As early as layer 4 the input connected sets have been disconnected and the data are untangled in an unintuitive way. This means a more complex coordinate representation of the data manifold was learned. layer 0 layer 2 layer 4 layer 6 layer 8 layer 10 layer 12 layer 14 layer 16 layer 18 layer 20 layer 22 layer 24 layer 26 layer 28 layer 30 layer 32 layer 34 layer 36 layer 38 layer 40 layer 42 layer 44 layer 46 layer 48 layer 50 (b) A batch size of 1000 for untangling data. Because the large batch size can well-sample the data manifold, the spiral sets stay connected and are untangled in an intuitive way. This means a simple coordinate representation of the data manifold was learned. Figure 4: The efect of batch size on coordinate representation learned by the same 2-dimensional C1 network, where layer 0 is the input representation, and both examples achieve 0% error. A basic theorem in topology says continuous functions map connected sets to connected sets. A small batch size of 300 during training sparsely samples from the connected manifold and the network learns overftted coordinate representations. With a larger batch size of 1000 during training the network learns a simpler coordinate representation and keeps the connected input connected throughout. 7.2 Coordinate representations of the data manifold and metric tensor As described in Sections 4 and 5, the network is learning a sequence of non-linear coordinate transformations, beginning with Cartesian coordinates, to fnd a coordinate representation of the data manifold that well represents the data, and this representation tends to be fat. This process can be visualized in Figure 3. This experiment used a C1 (residual) network and so the group actions on the principal and associated bundles act approximately smoothly along the fbres of the bundles. In the forward direction, beginning with Cartesian coordinates, a sequence of C1 diferential coordinate transformations is applied to fnd a nonlinear coordinate representation of the data manifold such that in the output coordinates the classes satisfy the cost restraint. In the reverse direction, starting with a standard Euclidean metric at the output, Equation 8, the coordinate representation of the metric tensor is backpropagated through the network to the input by Equations 9-10 to fnd the metric tensor representation in the input Cartesian coordinates. The principal components of the metric tensor are used to draw the ellipses in Figure 3. 7.3 Efect of batch size on set connectedness and topology A basic theorem in topology says that continuous functions map connected sets to connected sets. However, in Figure 4a it is seen that as early as layer 4 the continuous neural network is breaking the connected input set into disconnected sets. Additionally, and although it achieves 0% error, it is learning very complicated and unintuitive coordinate transformations to represent the data in a linearly separable form. This is because during training with a small batch size of 300 in the stochastic gradient descent search, the underlying manifold was not sufciently sampled to represent the entire connected manifold and so it seemed disconnected. This is compared to Figure 4b in which a larger batch size of 1000 was used and was sufciently sampled to represent the entire connected manifold, and the network was also able to achieve 0% error. The coordinate transformations learned by the neural network with the larger batch size seem to more intuitively untangle the data in a simpler way than that of Figure 4a. Note that this experiment is in 2-dimensions, and with higher dimensional data the issue of batch size and set connectedness becomes exponentially more important by the curse of dimensionality. 8 layer 0 layer 1 layer 2 layer 3 layer 4 layer 5 layer 6 layer 7 layer 8 layer 9 layer 10 (a) A 10 layer C1 network struggles to separate the spirals and has 1% error rate. layer 0 layer 2 layer 4 layer 6 layer 8 layer 10 layer 12 layer 14 layer 16 layer 18 layer 20 (b) A 20 layer C1 network is able to separate the spirals and has 0% error rate. layer 0 layer 4 layer 8 layer 12 layer 16 layer 20 layer 24 layer 28 layer 32 layer 36 layer 40 (c) A 40 layer C1 network is able to separate the spirals and has 0% error rate. Figure 5: The efect of number of layers on the separation process of a C1 neural network. In Figure 5a it is seen that the ∆l is too large to properly separate the data. In Figures 5b and 5c the ∆l is sufciently small to separate the data. Interestingly, the separation process is not as simple as merely doubling the parameterization and halving the partitioning in Equation 7 because this is a nonlinear system of ODE’s. This is seen in Figures 5b and 5c; the data are at diferent levels of separation at the same position of layer parameterization, for example by comparing layer 18 in Figure 5b to layer 36 in Figure 5c. 7.4 Efect of number of layers on the separation process This experiment compares the process in which 2-dimensional C1 networks with 10, 20 and 40 layers separate the same data, thus experimenting on the ∆l in the partitioning of Equation 7, as seen in Figure 5. The 10 layer network is unable to properly separate the data and achieves a 1% error rate, whereas the 20 and 40 layer networks both achieve 0% error rates. In Figures 5b and 5c it is seen that at same positions of layer parameterization, for example layers 18 and 36 respectively, the data are at diferent levels of separation. This implies that the partitioning cannot be interpreted as simply as halving the ∆l when doubling the number of layers. This is because the system of ODE’s are nonlinear and the ∆l is implicit in the weight matrix. 8 Conclusions This paper forms part of an attempt to construct a formalized general theory of neural networks as a branch of Riemannian geometry. In the forward direction, and starting in Cartesian coordinates, the network is learning a sequence of coordinate transformations to fnd a coordinate representation of the data manifold that well encodes the data, and experimental results suggest this imposes a fatness constraint on the metric tensor in this learned coordinate system. One can then backpropagate the coordinate representation of the metric tensor to fnd its form in Cartesian coordinates. This can be used to defne an ϵ−δ relationship between the input and output data. Coordinate backpropagation was formulated in a formal, abstract sense in terms of Lie Group actions on the metric fbre bundle. The error backpropagation algorithm was then formulated in terms of Lie group actions on the frame bundle. For a residual network in the limit, the Lie group acts smoothly along the fbres of the bundles. Experiments were conducted to confrm and better understand aspects of this formulation. 9 Acknowledgements This work has been supported in part by the U.S. Air Force Ofce of Scientifc Research (AFOSR) under Grant No. FA9550-15-1-0400. The frst author has been supported by PSU/ARL Walker Fellowship. Any opinions, fndings and conclusions or recommendations expressed in this publication are those of the authors and do not necessarily refect the views of the sponsoring agencies. 9 References [1] Shun-ichi Amari and Hiroshi Nagaoka. Methods of information geometry, volume 191. American Mathematical Soc., 2007. [2] Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, James Bergstra, Ian Goodfellow, Arnaud Bergeron, Nicolas Bouchard, David Warde-Farley, and Yoshua Bengio. Theano: new features and speed improvements. arXiv preprint arXiv:1211.5590, 2012. [3] Yoshua Bengio, Grégoire Mesnil, Yann Dauphin, and Salah Rifai. Better mixing via deep representations. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 552–560, 2013. [4] Alexandre Boulch. Sharesnet: reducing residual network parameter number by sharing weights. arXiv preprint arXiv:1702.08782, 2017. [5] Xavier Glorot and Yoshua Bengio. Understanding the difculty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256, 2010. [6] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer, 2016. [9] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [10] Alex Krizhevsky, Ilya Sutskever, and Geofrey E Hinton. Imagenet classifcation with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [11] Yann LeCun, Yoshua Bengio, and Geofrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [12] John M Lee. Smooth manifolds. In Introduction to Smooth Manifolds, pages 1–29. Springer, 2003. [13] Tomas Mikolov, Wen-tau Yih, and Geofrey Zweig. Linguistic regularities in continuous space word representations. In Hlt-naacl, volume 13, pages 746–751, 2013. [14] Sam T Roweis and Lawrence K Saul. Nonlinear dimensionality reduction by locally linear embedding. science, 290(5500):2323–2326, 2000. [15] David E Rumelhart, Geofrey E Hinton, and Ronald J Williams. Learning internal representations by error propagation. Technical report, DTIC Document, 1985. [16] Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. [17] Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Advances in Neural Information Processing Systems, pages 550–558, 2016. [18] Gerard Walschap. Metric structures in diferential geometry, volume 224. Springer Science & Business Media, 2012. [19] Matthew D Zeiler, Dilip Krishnan, Graham W Taylor, and Rob Fergus. Deconvolutional networks. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2528–2535. IEEE, 2010. 10 | 2017 | 42 |
6,919 | Limitations on Variance-Reduction and Acceleration Schemes for Finite Sum Optimization Yossi Arjevani Department of Computer Science and Applied Mathematics Weizmann Institute of Science Rehovot 7610001, Israel yossi.arjevani@weizmann.ac.il Abstract We study the conditions under which one is able to efficiently apply variancereduction and acceleration schemes on finite sum optimization problems. First, we show that, perhaps surprisingly, the finite sum structure by itself, is not sufficient for obtaining a complexity bound of ˜O((n + L/µ) ln(1/ϵ)) for L-smooth and µ-strongly convex individual functions - one must also know which individual function is being referred to by the oracle at each iteration. Next, we show that for a broad class of first-order and coordinate-descent finite sum algorithms (including, e.g., SDCA, SVRG, SAG), it is not possible to get an ‘accelerated’ complexity bound of ˜O((n+ p nL/µ) ln(1/ϵ)), unless the strong convexity parameter is given explicitly. Lastly, we show that when this class of algorithms is used for minimizing L-smooth and convex finite sums, the iteration complexity is bounded from below by Ω(n + L/ϵ), assuming that (on average) the same update rule is used in any iteration, and Ω(n + p nL/ϵ) otherwise. 1 Introduction An optimization problem principal to machine learning and statistics is that of finite sums: min w∈Rd F(w) := 1 n n X i=1 fi(w), (1) where the individual functions fi are assumed to possess some favorable analytical properties, such as Lipschitz-continuity, smoothness or strong convexity (see [16] for details). We measure the iteration complexity of a given optimization algorithm by determining how many evaluations of individual functions (via some external oracle procedure, along with their gradient, Hessian, etc.) are needed in order to obtain an ϵ-solution, i.e., a point w ∈Rd which satisfies E[F(w) −minw∈Rd F(w)] < ϵ (where the expectation is taken w.r.t. the algorithm and the oracle randomness). Arguably, the simplest way of minimizing finite sum problems is by using optimization algorithms for general optimization problems. For concreteness of the following discussion, let us assume for the moment that the individual functions are L-smooth and µ-strongly convex. In this case, by applying vanilla Gradient Descent (GD) or Accelerated Gradient Descent (AGD, [16]), one obtains iteration complexity of ˜O(nκ ln(1/ϵ)) or ˜O n√κ ln(1/ϵ) , (2) respectively, where κ := L/µ denotes the condition number of the problem and ˜O hides logarithmic factors in the problem parameters. However, whereas such bounds enjoy logarithmic dependence on 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the accuracy level, the multiplicative dependence on n renders this approach unsuitable for modern applications where n is very large. A different approach to tackle a finite sum problem is by reformulating it as a stochastic optimization problem, i.e., minw∈Rd Ei∼U([n])[fi(w)], and then applying a general stochastic method, such as SGD, which allows iteration complexity of O(1/ϵ) or O 1/ϵ2 (depending on the problem parameters). These methods offer rates which do not depend on n, and are therefore attractive for situations where one seeks for a solution of relatively low accuracy. An evident drawback of these methods is their broad applicability for stochastic optimization problems, which may conflict with the goal of efficiently exploiting the unique noise structure of finite sums (indeed, in the general stochastic setting, these rates cannot be improved, e.g., [1, 18]). In recent years, a major breakthrough was made when stochastic methods specialized in finite sums (first SAG [19] and SDCA [21], and then SAGA [10], SVRG [11], SDCA without duality [20], and others) were shown to obtain iteration complexity of ˜O((n + κ) ln(1/ϵ)). (3) The ability of these algorithms to enjoy both logarithmic dependence on the accuracy parameter and an additive dependence on n is widely attributed to the fact that the noise of finite sum problems distributes over a finite set of size n. Perhaps surprisingly, in this paper we show that another key ingredient is crucial, namely, a mean of knowing which individual function is being referred to by the oracle at each iteration. In particular, this shows that variance-reduction mechanisms (see, e.g., [10, Section 3]) cannot be applied without explicitly knowing the ‘identity’ of the individual functions. On the more practical side, this result shows that when data augmentation (e.g., [14]) is done without an explicit enumeration of the added samples, it is impossible to obtain iteration complexity as stated in (3, see [7] for relevant upper bounds). Although variance-reduction mechanisms are essential for obtaining an additive dependence on n (as shown in (3)), they do not necessarily yield ‘accelerated’ rates which depend on the square root of the condition number (as shown in (2) for AGD). Recently, generic acceleration schemes were used by [13] and accelerated SDCA [22] to obtain iteration complexity of ˜O (n + √ nk) ln(1/ϵ) . (4) The question of whether this rate is optimal was answered affirmatively by [23, 12, 5, 3]. The first category of lower bounds exploits the degree of freedom offered by a d- (or an infinite-) dimensional space to show that any first-order and a certain class of second-order methods cannot obtain better rates than (4) in the regime where the number of iterations is less than O(d/n). The second category of lower bounds is based on maintaining the complexity of the functional form of the iterates, thereby establishing bounds for first-order and coordinate-descent algorithms whose step sizes are oblivious to the problem parameters (e.g., SAG, SAGA, SVRG, SDCA, SDCA without duality) for any number of iterations, regardless of d and n. In this work, we further extend the theory of oblivious finite sum algorithms, by showing that if a first-order and a coordinate-descent oracle are used, then acceleration is not possible without an explicit knowledge of the strong convexity parameter. This implies that in cases where only poor estimation of the strong convexity is available, faster rates may be obtained through ‘adaptive’ algorithms (see relevant discussions in [19, 4]). Next, we show that in the smooth and convex case, oblivious finite sum algorithms which, on average, apply the same update rule at each iteration (e.g., SAG, SDCA, SVRG, SVRG++ [2], and typically, other algorithms with a variance-reduction mechanism as described in [10, Section 3]), are bound to iteration complexity of Ω(n + L/ϵ), where L denotes the smoothness parameter (rather than Ω(n + p nL/ϵ)). To show this, we employ a restarting scheme (see [4]) which explicitly introduces the strong convexity parameter into algorithms that are designed for smooth and convex functions. Finally, we use this scheme to establish a tight dimension-free lower bound for smooth and convex finite sums which holds for oblivious algorithms with a first-order and a coordinate-descent oracle. To summarize, our contributions (in order of appearance) are the following: • In Section 2, we prove that in the setting of stochastic optimization, having finitely supported noise (as in finite sum problems) is not sufficient for obtaining linear convergence rates with 2 a linear dependence on n - one must also know exactly which individual function is being referred to by the oracle at each iteration. Deriving similar results for various settings, we show that SDCA, accelerated SDCA, SAG, SAGA, SVRG, SVRG++ and other finite sum algorithms must have a proper enumeration of the individual functions in order to obtain their stated convergence rate. • In Section 3.1, we lay the foundations of the framework of general CLI algorithms (see [3]), which enables us to formally address oblivious algorithms (e.g., when step sizes are scheduled regardless of the function at hand). In section 3.2, we improve upon [4], by showing that (in this generalized framework) the optimal iteration complexity of oblivious, deterministic or stochastic, finite sum algorithms with both first-order and coordinate-descent oracles cannot perform better than Ω(n + κ ln(1/ϵ)), unless the strong convexity parameter is provided explicitly. In particular, the richer expressiveness power of this framework allows addressing incremental gradient methods, such as Incremental Gradient Descent [6] and Incremental Aggregated Gradient [8, IAG]. • In Section 3.3, we show that, in the L-smooth and convex case, the optimal complexity bound (in terms of the accuracy parameter) of oblivious algorithms whose update rules are (on average) fixed for any iteration is Ω(n + L/ϵ) (rather then ˜O(n + p nL/ϵ), as obtained, e.g., by accelerated SDCA). To show this, we first invoke a restarting scheme (used by [4]) to explicitly introduce strong convexity into algorithms for finite sums with smooth and convex individuals, and then apply the result derived in Section 3.2. • In Section 3.4, we use the reduction introduced in Section 3.3, to show that the optimal iteration complexity of minimizing L-smooth and convex finite sums using oblivious algorithms equipped with a first-order and a coordinate-descent oracle is Ω n + p nL/ϵ . 2 The Importance of Individual Identity In the following, we address the stochastic setting of finite sum problems (1) where one is equipped with a stochastic oracle which, upon receiving a call, returns some individual function chosen uniformly at random and hides its index. We show that not knowing the identity of the function returned by the oracle (as opposed to an incremental oracle which addresses the specific individual functions chosen by the user), significantly harms the optimal attainable performance. To this end, we reduce the statistical problem of estimating the bias of a noisy coin into that of optimizing finite sums. This reduction (presented below) makes an extensive use of elementary definitions and tools from information theory, all of which can be found in [9]. First, given n ∈N, we define the following finite sum problem Fσ := 1 n n −σ 2 f + + n + σ 2 f − , (5) where n is w.l.o.g. assumed to be odd, σ ∈{−1, 1} and f +, f −are some functions (to be defined later). We then define the following discrepancy measure between F1 and F−1 for different values of n (see also [1]), δ(n) = min w∈Rd{F1(w) + F−1(w) −F ∗ 1 −F ∗ −1}, (6) where F ∗ σ := infw Fσ(w). It is easy to verify that no solution can be δ(n)/4-optimal for both F1 and F−1, at the same time. Thus, by running a given optimization algorithm long enough to obtain δ(n)/4-solution w.h.p., we can deduce the value of σ. Also, note that, one can simplify the computation of δ(n) by choosing convex f +, f −such that f +(w) = f −(−w). Indeed, in this case, we have F1(w) = F−1(−w) (in particular, F ∗ 1 = F ∗ −1), and since F1(w) + F−1(w) −F ∗ 1 −F ∗ −1 is convex, it must attain its minimum at w = 0, which yields δ(n) = 2(F1(0) −F ∗ 1 ). (7) Next, we let σ ∈{−1, 1} be drawn uniformly at random, and then use the given optimization algorithm to estimate the bias of a random variable X which, conditioned on σ, takes +1 w.p. 1/2 + σ/2n, and −1 w.p. 1/2 −σ/2n. To implement the stochastic oracle described above, 3 conditioned on σ, we draw k i.i.d. copies of X, denoted by X1, . . . , Xk, and return f −, if Xi = σ, and f +, otherwise. Now, if k is such that E[Fσ(w(k)) −F ∗ σ | σ] ≤δ(n) 40 , for both σ = −1 and σ = 1, then by Markov inequality, we have that P Fσ(w(k)) −F ∗ σ ≥δ(n)/4 σ ≤1/10 (8) (note that Fσ(w(k)) −F ∗ σ is a non-negative random variable). We may now try to guess the value of σ using the following estimator ˆσ(w(k)) = argmin σ′∈{−1,1} {Fσ′(w(k)) −F ∗ σ′}, whose probability of error, as follows by Inequality (8), is P (ˆσ ̸= σ) ≤1/10. (9) Lastly, we show that the existence of an estimator for σ with high probability of success implies that k = Ω(n2). To this end, note that the corresponding conditional dependence structure of this probabilistic setting can be modeled as follows: σ →X1, . . . , Xk →ˆσ. Thus, we have H(σ | X1, . . . , Xk) (a) ≤H(σ | ˆσ) (b) ≤Hb(P (ˆσ ̸= σ)) (c) ≤1 2, (10) where H(·) and Hb(·) denote the Shannon entropy function and the binary entropy function, respectively, (a) follows by the data processing inequality (in terms of entropy), (b) follows by Fano’s inequality and (c) follows from Equation (9). Applying standard entropy identities, we get H(σ | X1, . . . , Xk) (d) = H(X1, . . . , Xk | σ) + H(σ) −H(X1, . . . , Xk) (e) = kH(X1 | σ) + 1 −H(X1, . . . , Xk) (f) ≥kH(X1 | σ) + 1 −kH(X1), (11) where (d) follows from Bayes rule, (e) follows by the fact that Xi, conditioned on σ, are i.i.d. and (f) follows from the chain rule and the fact that conditioning reduces entropy. Combining this with Inequality (10) and rearranging, we have k ≥ 1 2(H(X1) −H(X1 | σ)) ≥ 1 2 (1/n)2 = n2 2 , where the last inequality follows from the fact that H(X1) = 1 and the following estimation for the binary entropy function: Hb(p) ≥1 −4 (p −1/2)2 (see Lemma 2, Appendix A). Thus, we arrive at the following statement. Lemma 1. The minimal number of stochastic oracle calls required to obtain δ(n)/40-optimal solution for problem (5) is ≥n2/2. Instantiating this schemes for f +, f −of various analytical properties yields the following. Theorem 1. When solving a finite sum problem (defined in 1) with a stochastic oracle, one needs at least n2/2 oracle calls in order to obtain an accuracy level of: 1. κ+1 40n2 for smooth and strongly convex individuals with condition κ. 2. L 40n2 for L-smooth and convex individuals. 3. M 2 40λn2 if M λn ≤1, and M 20n −λ 40, otherwise, for (M +λ)-Lipschitz continuous and λ-strongly convex individuals. 4 Proof 1. Define, f ±(w) = 1 2 (w ± q)⊤A (w ± q) , where A is a d × d diagonal matrix whose diagonal entries are κ, 1 . . . , 1, and q = (1, 1, 0, . . . , 0)⊤is a d-dimensional vector. One can easily verify that f ± are smooth and strongly convex functions with condition number κ, and that Fσ(w) = 1 2 w −σ nq ⊤ A w −σ nq + 1 2 1 −1 n2 q⊤Aq. Therefore, the minimizer of Fσ is (σ/n)q, and using Equation (7), we see that δ(n) = κ+1 n2 . 2. We define f ±(w) = L 2 ∥w ± e1∥2 . One can easily verify that f ± are L-smooth and convex functions, and that the minimizer of Fσ is (σ/n)e1. By Equation (7), we get δ(n) = L n2 . 3. We define f ±(w) = M∥w ± e1∥+ λ 2 ∥w∥2 , over the unit ball. Clearly, f ± are (M + λ)-Lipschitz continuous and λ-strongly convex functions. It can be verified that the minimizer of Fσ is (σ min{ M λn, 1})e1. Therefore, by Equation (7), we see that in this case we have δ(n) = ( M 2 λn2 M λn ≤1 2M n −λ o.w. . A few conclusions can be readily made from Theorem 1. First, if a given optimization algorithm obtains an iteration complexity of an order of c(n, κ) ln(1/ϵ), up to logarithmic factors (including the norm of the minimizer which, in our construction, is of an order of 1/n and coupled with the accuracy parameter), for solving smooth and strongly convex finite sum problems with a stochastic oracle, then c(n, κ) = ˜Ω n2 ln(n2/(κ + 1)) . Thus, the following holds for optimization of finite sums with smooth and strongly convex individuals. Corollary 1. In order to obtain linear convergence rate with linear dependence on n, one must know the index of the individual function addressed by the oracle. This implies that variance-reduction methods such as, SAG, SAGA, SDCA and SVRG (possibly combining with acceleration schemes), which exhibit linear dependence on n, cannot be applied when data augmentation is used. In general, this conclusion also holds for cases when one applies general first-order optimization algorithms, such as AGD, on finite sums, as this typically results in a linear dependence on n. Secondly, if a given optimization algorithm obtains an iteration complexity of an order of n + Lβ∥w(0) −w∗∥2/ϵα for solving smooth and convex finite sum problems with a stochastic oracle, then n + Lβ−αn2(α−1) = Ω(n2). Therefore, β = α and α ≥2, indicating that an iteration complexity of an order of n + L∥w(0) −w∗∥2/ϵ, as obtained by, e.g., SVRG++, is not attainable with a stochastic oracle. Similar reasoning based on the Lipschitz and strongly convex case in Theorem 1 shows that the iteration complexity guaranteed by accelerated SDCA is also not attainable in this setting. 5 3 Oblivious Optimization Algorithms In the previous section, we discussed different situations under which variance-reduction schemes are not applicable. Now, we turn to study under what conditions can one apply acceleration schemes. First, we define the framework of oblivious CLI algorithms. Next, we show that, for this family of algorithms, knowing the strong convexity parameter is crucial for obtaining accelerated rates. We then describe a restarting scheme through which we establish that stationary algorithms (whose update rule are, on average, the same for every iteration) for smooth and convex functions are sub-optimal. Finally, we use this reduction to derive a tight lower bound for smooth and convex finite sums on the iteration complexity of any oblivious algorithm (not just stationary). 3.1 Framework In the sequel, following [3], we present the analytic framework through which we derive iteration complexity bounds. This, perhaps pedantic, formulation will allows us to study somewhat subtle distinctions between optimization algorithms. First, we give a rigorous definition for a class of optimization problems which emphasizes the role of prior knowledge in optimization. Definition 1 (Class of Optimization Problems). A class of optimization problems is an ordered triple (F, I, Of), where F is a family of functions defined over some domain designated by dom(F), I is the side-information given prior to the optimization process and Of is a suitable oracle procedure which upon receiving w ∈domF and θ in some parameter set Θ, returns Of(w, θ) ⊆dom(F) for a given f ∈F (we shall omit the subscript in Of when f is clear from the context). In finite sum problems, F comprises of functions as defined in (1); the side-information may contain the smoothness parameter L, the strong convexity parameter µ and the number of individual functions n; and the oracle may allow one to query about a specific individual function (as in the case of incremental oracle, and as opposed to the stochastic oracle discussed in Section 2). We now turn to define CLI optimization algorithms (see [3] for a more comprehensive discussion). Definition 2 (CLI). An optimization algorithm is called a Canonical Linear Iterative (CLI) optimization algorithm over a class of optimization problems (F, I, Of), if given an instance f ∈F and initialization points {w(0) i }i∈J ⊆dom(F), where J is some index set, it operates by iteratively generating points such that for any i ∈J , w(k+1) i ∈ X j∈J Of w(k) j ; θ(k) ij , k = 0, 1, . . . (12) holds, where θ(k) ij ∈Θ are parameters chosen, stochastically or deterministically, by the algorithm, possibly based on the side-information. If the parameters do not depend on previously acquired oracle answers, we say that the given algorithm is oblivious. For notational convenience, we assume that the solution returned by the algorithm is stored in w(k) 1 . Throughout the rest of the paper, we shall be interested in oblivious CLI algorithms (for brevity, we usually omit the ‘CLI’ qualifier) equipped with the following two incremental oracles: Generalized first-order oracle: O(w; A, B, c, i) := A∇fi(w) + Bw + c, Steepest coordinate-descent oracle: O(w; j, i) := w + t∗ej, (13) where A, B ∈Rd×d, c ∈Rd, i ∈[n], j ∈[d], ej denotes the j’th d-dimensional unit vector and t∗∈argmint∈R fj(w1, . . . , wj−1, wj + t, wj+1, . . . , wd). We restrict the oracle parameters such that only one individual function is allowed to be accessed at each iteration. We remark that the family of oblivious algorithms with a first-order and a coordinate-descent oracle is wide and subsumes SAG, SAGA, SDCA, SDCA without duality, SVRG, SVRG++ to name a few. Also, note that coordinate-descent steps w.r.t. partial gradients can be implemented using the generalized first-order oracle by setting A to be some principal minor of the unit matrix (see, e.g., RDCM in [15]). Further, similarly to [3], we allow both first-order and coordinate-descent oracles to be used during the same optimization process. 3.2 No Strong Convexity Parameter, No Acceleration for Finite Sum Problems Having described our analytic approach, we now turn to present some concrete applications. Below, we show that in the absence of a good estimation for the strong convexity parameter, the optimal 6 iteration complexity of oblivious algorithms is Ω(n + k ln(1/ϵ)). Our proof is based on the technique used in [3, 4] (see [3, Section 2.3] for a brief introduction of the technique). Given 0 < ϵ < L, we define the following set of optimization problems (over Rd with d > 1) Fµ(w) := 1 n n X i=1 1 2w⊤Qµw −q⊤w , where (14) Qµ := L+µ 2 µ−L 2 µ−L 2 L+µ 2 µ ... µ , q := ϵR √ 2 1 1 0 ... 0 , parametrized by µ ∈(ϵ, L) (note that the individual functions are identical. We elaborate more on this below). It can be easily verified that the condition number of Fµ, which we denote by κ(Fµ), is L/µ, and that the corresponding minimizers are w∗(µ) = (ϵR/µ √ 2, ϵR/µ √ 2, 0, . . . , 0)⊤ with norm ≤R. If we are allowed to use different optimization algorithm for different µ in this setting, then we know that the optimal iteration complexity is of an order of (n + p nκ(Fµ)) ln(1/ϵ). However, if we allowed to use only one single algorithm, then we show that the optimal iteration complexity is of an order of n + κ(Fµ) ln(1/ϵ). The proof goes as follows. First, note that in this setting, the oracles defined in (13) take the following form, Generalized first-order oracle: O(w; A, B, c, i) = A(Qµw −q) + Bw + c, (15) Steepest coordinate-descent oracle: O(w; j, i) = (I −(1/(Qµ)jj)ei(Qµ)j,∗) w −qj/(Qµ)jjej. Now, since the oracle answers are linear in µ and the k’th iterate is a k-fold composition of sums of the oracle answers, it follows that w(k) 1 forms a d-dimensional vector of univariate polynomials in µ of degree ≤k with (possibly random) coefficients (formally, see Lemma 3, Appendix A). Denoting the polynomial of the first coordinate of Ew(k) 1 (µ) by s(µ), we see that for any µ ∈(ϵ, L), E∥w(k) 1 (µ) −w∗(µ)∥≥∥Ew(k) 1 (µ) −w∗(µ)∥≥ s(µ) −Rϵ √ 2µ ≥ Rϵ √ 2L √ 2s(µ)µ Rϵ −1 , where the first inequality follows by Jensen inequality and the second inequality by focusing on the first coordinate of Ew(k)(η) and w∗(η). Lastly, since the coefficients of s(µ) do not depend on µ, we have by Lemma 4 in Appendix A, that there exists δ > 0, such that for any µ ∈(L −δ, L) it holds that Rϵ √ 2L √ 2s(µ)µ Rϵ −1 ≥ Rϵ √ 2L 1 − 1 κ(Fµ) k+1 , by which we derive the following. Theorem 2. The iteration complexity of oblivious finite sum optimization algorithms equipped with a first-order and a coordinate-descent oracle whose side-information does not contain the strong convexity parameter is ˜Ω(n + κ ln(1/ϵ)). The n part of the lower bound holds for any type of finite sum algorithm and is proved in [3, Theorem 5]. The lower bound stated in Theorem 2 is tight up to logarithmic factors and is attained by, e.g., SAG [19]. Although relying on a finite sum with identical individual functions may seem somewhat disappointing, it suggests that some variance-reduction schemes can only give optimal dependence in terms of n, and that obtaining optimal dependence in terms of the condition number need to be done through other (acceleration) mechanisms (e.g., [13]). Lastly, note that, this bound holds for any number of iterations (regardless of the problem parameters). 3.3 Stationary Algorithms for Smooth and Convex Finite Sums are Sub-optimal In the previous section, we showed that not knowing the strong convexity parameter reduces the optimal attainable iteration complexity. In this section, we use this result to show that whereas general 7 optimization algorithms for smooth and convex finite sum problems obtain iteration complexity of ˜O(n + p nL/ϵ), the optimal iteration complexity of stationary algorithms (whose expected update rules are fixed) is Ω(n + L/ϵ). The proof (presented below) is based on a general restarting scheme (see Scheme 1) used in [4]. The scheme allows one to apply algorithms which are designed for L-smooth and convex problems on smooth and strongly convex finite sums by explicitly incorporating the strong convexity parameter. The key feature of this reduction is its ability to ‘preserve’ the exponent of the iteration complexity from an order of C(f)(L/ϵ)α in the non-strongly convex case to an order of (C(f)κ)α ln(1/ϵ) in the strongly convex case, where C(f) denotes some quantity which may depend on f but not on k, and α is some positive constant. SCHEME 1 RESTARTING SCHEME GIVEN AN OPTIMIZATION ALGORITHM A FOR SMOOTH CONVEX FUNCTIONS WITH f(w(k)) −f ∗≤ C(f)
¯ w(0)−w∗
2 kα FOR ANY INITIALIZATION POINT ¯w0 ITERATE FOR t = 1, 2, . . . RESTART THE STEP SIZE SCHEDULE OF A INITIALIZE A AT ¯w(0) RUN A FOR αp 4C(f)/µ ITERATIONS SET ¯w(0) TO BE THE POINT RETURNED BY A END The proof goes as follows. Suppose A is a stationary CLI optimization algorithm for L-smooth and convex finite sum problems equipped with oracles (13). Also, assume that its convergence rate for k ≥N, N ∈N is of an order of nγLβ∥w(0)−w∗∥ 2 kα , for some α, β, γ > 0. First, observe that in this case we must have β = 1. For otherwise, we get f(w(k)) −f ∗= ((νf)(w(k)) −(νf)∗)/ν ≤ nγ(νL)β/νkα = νβ−1nγLβ/kα, implying that, simply by scaling f, one can optimize to any level of accuracy using at most N iterations, which contradicts [3, Theorem 5]. Now, by [4, Lemma 1], Scheme 1 produces a new algorithm whose iteration complexity for smooth and strongly convex finite sums with condition number κ is O(N + nγ (L/ϵ)α) −→˜O(n + nγκα ln(1/ϵ)). (16) Finally, stationary algorithms are invariant under this restarting scheme. Therefore, the new algorithm cannot depend on µ. Thus, by Theorem 2, it must hold that that α ≥1 and that max{N, nγ} = Ω(n), proving the following. Theorem 3. If the iteration complexity of a stationary optimization algorithm for smooth and convex finite sum problems equipped with a first-order and a coordinate-descent oracle is of the form of the l.h.s. of (16), then it must be at least Ω(n + L/ϵ). We note that, this lower bound is tight and is attained by, e.g., SDCA. 3.4 A Tight Lower Bound for Smooth and Convex Finite Sums We now turn to derive a lower bound for finite sum problems with smooth and convex individual functions using the restarting scheme shown in the previous section. Note that, here we allow any oblivious optimization algorithm, not just stationary. The technique shown in Section 3.2 of reducing an optimization problem into a polynomial approximation problem was used in [3] to derive lower bounds for various settings. The smooth and convex case was proved only for n = 1, and a generalization for n > 1 seems to reduce to a non-trivial approximation problem. Here, using Scheme 1, we are able to avoid this difficulty by reducing the non-strongly case to the strongly convex case, for which a lower bound for a general n is known. The proof follows the same lines of the proof of Theorem 3. Given an oblivious optimization algorithm for finite sums with smooth and convex individuals equipped with oracles (13), we apply again Scheme 1 to get an algorithm for the smooth and strongly convex case, whose iteration complexity is as in (16). Now, crucially, oblivious algorithm are invariant under Scheme 1 (that 8 is, when applied on a given oblivious algorithm, Scheme 1 produces another oblivious algorithm). Therefore, using [3, Theorem 2], we obtain the following. Theorem 4. If the iteration complexity of an oblivious optimization algorithm for smooth and convex finite sum problems equipped with a first-order and a coordinate-descent oracle is of the form of the l.h.s. of (16), then it must be at least Ω n + r nL ϵ ! . This bound is tight and is obtained by, e.g., accelerated SDCA [22]. Optimality in terms of L and ϵ can be obtained simply by applying Accelerate Gradient Descent [16], or alternatively, by using an accelerated version of SVRG as presented in [17]. More generally, one can apply acceleration schemes, e.g., [13], to get an optimal dependence on ϵ. Acknowledgments We thank Raanan Tvizer and Maayan Maliach for several helpful and insightful discussions. References [1] Alekh Agarwal, Martin J Wainwright, Peter L Bartlett, and Pradeep K Ravikumar. Informationtheoretic lower bounds on the oracle complexity of convex optimization. In Advances in Neural Information Processing Systems, pages 1–9, 2009. [2] Zeyuan Allen-Zhu and Yang Yuan. Improved svrg for non-strongly-convex or sum-of-nonconvex objectives. Technical report, Technical report, arXiv preprint, 2016. [3] Yossi Arjevani and Ohad Shamir. Dimension-free iteration complexity of finite sum optimization problems. In Advances in Neural Information Processing Systems, pages 3540–3548, 2016. [4] Yossi Arjevani and Ohad Shamir. On the iteration complexity of oblivious first-order optimization algorithms. In Proceedings of the 33nd International Conference on Machine Learning, pages 908–916, 2016. [5] Yossi Arjevani and Ohad Shamir. Oracle complexity of second-order methods for finite-sum problems. arXiv preprint arXiv:1611.04982, 2016. [6] Dimitri P Bertsekas. A new class of incremental gradient methods for least squares problems. SIAM Journal on Optimization, 7(4):913–926, 1997. [7] Alberto Bietti and Julien Mairal. Stochastic optimization with variance reduction for infinite datasets with finite-sum structure. arXiv preprint arXiv:1610.00970, 2016. [8] Doron Blatt, Alfred O Hero, and Hillel Gauchman. A convergent incremental gradient method with a constant step size. SIAM Journal on Optimization, 18(1):29–51, 2007. [9] Thomas M Cover and Joy A Thomas. Elements of information theory. John Wiley & Sons, 2012. [10] Aaron Defazio, Francis Bach, and Simon 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. [11] Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [12] Guanghui Lan. An optimal randomized incremental gradient method. arXiv preprint arXiv:1507.02000, 2015. [13] 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. 9 [14] Gaëlle Loosli, Stéphane Canu, and Léon Bottou. Training invariant support vector machines using selective sampling. Large scale kernel machines, pages 301–320, 2007. [15] Yu Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [16] Yurii Nesterov. Introductory lectures on convex optimization, volume 87. Springer Science & Business Media, 2004. [17] Atsushi Nitanda. Accelerated stochastic gradient descent for minimizing finite sums. In Artificial Intelligence and Statistics, pages 195–203, 2016. [18] Maxim Raginsky and Alexander Rakhlin. Information-based complexity, feedback and dynamics in convex programming. Information Theory, IEEE Transactions on, 57(10):7036–7056, 2011. [19] Mark Schmidt, Nicolas Le Roux, and Francis Bach. Minimizing finite sums with the stochastic average gradient. Mathematical Programming, pages 1–30, 2013. [20] Shai Shalev-Shwartz. Sdca without duality. arXiv preprint arXiv:1502.06177, 2015. [21] Shai Shalev-Shwartz and Tong Zhang. Stochastic dual coordinate ascent methods for regularized loss. The Journal of Machine Learning Research, 14(1):567–599, 2013. [22] Shai Shalev-Shwartz and Tong Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. Mathematical Programming, 155(1-2):105–145, 2016. [23] Blake E Woodworth and Nati Srebro. Tight complexity bounds for optimizing composite objectives. In Advances in Neural Information Processing Systems, pages 3639–3647, 2016. 10 | 2017 | 420 |
6,920 | Flexpoint: An Adaptive Numerical Format for Efficient Training of Deep Neural Networks Urs Köster∗†, Tristan J. Webb∗, Xin Wang∗, Marcel Nassar∗, Arjun K. Bansal, William H. Constable, O˘guz H. Elibol, Scott Gray‡, Stewart Hall†, Luke Hornof, Amir Khosrowshahi, Carey Kloss, Ruby J. Pai, Naveen Rao Artificial Intelligence Products Group, Intel Corporation Abstract Deep neural networks are commonly developed and trained in 32-bit floating point format. Significant gains in performance and energy efficiency could be realized by training and inference in numerical formats optimized for deep learning. Despite advances in limited precision inference in recent years, training of neural networks in low bit-width remains a challenging problem. Here we present the Flexpoint data format, aiming at a complete replacement of 32-bit floating point format training and inference, designed to support modern deep network topologies without modifications. Flexpoint tensors have a shared exponent that is dynamically adjusted to minimize overflows and maximize available dynamic range. We validate Flexpoint by training AlexNet [1], a deep residual network [2, 3] and a generative adversarial network [4], using a simulator implemented with the neon deep learning framework. We demonstrate that 16-bit Flexpoint closely matches 32-bit floating point in training all three models, without any need for tuning of model hyperparameters. Our results suggest Flexpoint as a promising numerical format for future hardware for training and inference. 1 Introduction Deep learning is a rapidly growing field that achieves state-of-the-art performance in solving many key data-driven problems in a wide range of industries. With major chip makers’ quest for novel hardware architectures for deep learning, the next few years will see the advent of new computing devices optimized for training and inference of deep neural networks with increasing performance at decreasing cost. Typically deep learning research is done on CPU and/or GPU architectures that offer native 64-bit, 32-bit or 16-bit floating point data format and operations. Substantial improvements in hardware footprint, power consumption, speed, and memory requirements could be obtained with more efficient data formats. This calls for innovations in numerical representations and operations specifically tailored for deep learning needs. Recently, inference with low bit-width fixed point data formats has made significant advancement, whereas low bit-width training remains an open challenge [5, 6, 7]. Because training in low precision reduces memory footprint and increases the computational density of the deployed hardware infrastructure, it is crucial to efficient and scalable deep learning applications. ∗Equal contribution. †Currently with Cerebras Systems, work done while at Nervana Systems and Intel Corporation. ‡Currently with OpenAI, work done while at Nervana Systems. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we present Flexpoint, a flexible low bit-width numerical format, which faithfully maintains algorithmic parity with full-precision floating point training and supports a wide range of deep network topologies, while at the same time substantially reduces consumption of computational resources, making it amenable for specialized training hardware optimized for field deployment of already existing deep learning models. The remainder of this paper is structured as follows. In Section 2, we review relevant work in literature. In Section 3, we present the Flexpoint numerical format along with an exponent management algorithm that tracks the statistics of tensor extrema and adjusts tensor scales on a per-minibatch basis. In Section 4, we show results from training several deep neural networks in Flexpoint, showing close parity to floating point performance: AlexNet and a deep residual network (ResNet) for image classification, and the recently published Wasserstein GAN. In Section 5, we discuss specific advantages and limitations of Flexpoint, and compare its merits to those of competing low-precision training schemes. 2 Related Work In 2011, Vanhoucke et al. first showed that inference and training of deep neural networks is feasible with values of certain tensors quantized to a low-precision fixed point format [8]. More recently, an increasing number of studies demonstrated low-precision inference with substantially reduced computation. These studies involve, usually in a model-dependent manner, quantization of specific tensors into low-precision fixed point formats. These include quantization of weights and/or activations to 8-bit [8, 9, 10, 11], down to 4-bit, 2-bit [12, 13] or ternary [10], and ultimately all binary [7, 14, 5, 6]. Weights trained at full precision are commonly converted from floating point values, and bit-widths of component tensors are either pre-determined based on the characteristics of the model, or optimized per layer [11]. Low-precision inference has already made its way into production hardware such as Google’s tensor processing unit (TPU) [15]. On the other hand, reasonable successes in low-precision training have been obtained with binarized [13, 16, 17, 5] or ternarized weights [18], or binarized gradients in the case of stochastic gradient descent [19], while accumulation of activations and gradients is usually at higher precision. Motivated by the non-uniform distribution of weights and activations, Miyashita et al. [20] used a logarithmic quantizer to quantize the parameters and gradients to 6 bits without significant loss in performance. XNOR-nets focused on speeding up neural network computations by parametrizing the activations and weights as rank-1 products of binary tensors and higher precision scalar values [7]. This enables the use of kernels composed of XNOR and bit-count operations to perform highly efficient convolutions. However, additional high-precision multipliers are still needed to perform the scaling after each convolution which limits its performance. Quantized Neural Networks (QNNs), and their binary version (Binarized Nets), successfully perform low-precision inference (down to 1-bit) by keeping real-valued weights and quantizing them only to compute the gradients and performing forward inference [17, 5]. Hubara et al. found that low precision networks coupled with efficient bit shiftbased operations resulted in computational speed-up, from experiments performed using specialized GPU kernels. DoReFa-Nets utilize similar ideas as QNNs and quantize the gradients to 6-bits to achieve similar performance [6]. The authors also trained in limited precision the deepest ResNet (18 layers) so far. The closest work related to this manuscript is by Courbariaux et al. [21], who used a dynamical fixed point (DFXP) format in training a number of benchmark models. In their study, tensors are polled periodically for the fraction of overflowed entries in a given tensor: if that number exceeds a certain threshold the exponent is incremented to extend the dynamic range, and vice versa. The main drawback is that this update mechanism only passively reacts to overflows rather than anticipating and preemptively avoiding overflows; this turns out to be catastrophic for maintaining convergence of the training. 2 Figure 1: Diagrams of bit representations of different tensorial numerical formats. Red, green and blue shading each signify mantissa, exponent, and sign bits respectively. In both (a) IEEE 754 32-bit floating point and (b) IEEE 754 16-bit floating point a portion of the bit string are allocated to specify exponents. (c) illustrates a Flexpoint tensor with 16-bit mantissa and 5-bit shared exponent. 3 Flexpoint 3.1 The Flexpoint Data Format Flexpoint is a data format that combines the advantages of fixed point and floating point arithmetic. By using a common exponent for integer values in a tensor, Flexpoint reduces computational and memory requirements while automatically managing the exponent of each tensor in a user transparent manner. Flexpoint is based on tensors with an N-bit mantissa storing an integer value in two’s complement form, and an M-bit exponent e, shared across all elements of a tensor. This format is denoted as flexN+M. Fig. 1 shows an illustration of a Flexpoint tensor with a 16-bit mantissa and 5-bit exponent, i.e. flex16+5 compared to 32-bit and 16-bit floating point tensors. In contrast to floating point, the exponent is shared across tensor elements, and different from fixed point, the exponent is updated automatically every time a tensor is written. Compared to 32-bit floating point, Flexpoint reduces both memory and bandwidth requirements in hardware, as storage and communication of the exponent can be amortized over the entire tensor. Power and area requirements are also reduced due to simpler multipliers compared to floating point. Specifically, multiplication of entries of two separate tensors can be computed as a fixed point operation since the common exponent is identical across all the output elements. For the same reason, addition across elements of the same tensor can also be implemented as fixed point operations. This essentially turns the majority of computations of deep neural networks into fixed point operations. 3.2 Exponent Management These remarkable advantages come at the cost of added complexity of exponent management and dynamic range limitations imposed by sharing a single exponent. Other authors have reported on the range of values contained within tensors during neural network training: “the activations, gradients and parameters have very different ranges” and “gradients ranges slowly diminish during the training” [21]. These observations are promising indicators on the viability of numerical formats based around tensor shared exponents. Fig. 2 shows histograms of values from different types of tensors taken from a 110-layer ResNet trained on CIFAR-10 using 32-bit floating point. 3 In order to preserve a faithful representation of floating point, tensors with a shared exponent must have a sufficiently narrow dynamic range such that mantissa bits alone can encode variability. As suggested by Fig. 2, 16-bits of mantissa is sufficient to cover the majority of values of a single tensor. For performing operations such as adding gradient updates to weights, there must be sufficient mantissa overlap between tensors, putting additional requirements on number of bits needed to represent values in training, as compared to inference. Establishing that deep learning tensors conform to these requirements during training is a key finding in our present results. An alternative solution to addressing this problem is stochastic rounding [22]. Finally, to implement Flexpoint efficiently in hardware, the output exponent has to be determined before the operation is actually performed. Otherwise the intermediate result needs to be stored in high precision, before reading the new exponent and quantizing the result, which would negate much of the potential savings in hardware. Therefore, intelligent management of the exponents is required. 3.3 Exponent Management Algorithm We propose an exponent management algorithm called Autoflex, designed for iterative optimizations, such as stochastic gradient descent, where tensor operations, e.g. matrix multiplication, are performed repeatedly and outputs are stored in hardware buffers. Autoflex predicts an optimal exponent for the output of each tensor operation based on tensor-wide statistics gathered from values computed in previous iterations. The success of training in deep neural networks in Flexpoint hinges on the assumption that ranges of values in the network change sufficiently slowly, such that exponents can be predicted with high accuracy based on historical trends. If the input data is independently and identically distributed, tensors in the network, such as weights, activations and deltas, will have slowly changing exponents. Fig. 3 shows an example of training a deep neural network model. The Autoflex algorithm tracks the maximum absolute value Γ, of the mantissa of every tensor, by using a dequeue to store a bounded history of these values. Intuitively, it is then possible to estimate a trend in the stored values based on a statistical model, use it to anticipate an overflow, and increase the exponent preemptively to prevent overflow. Similarly, if the trend of Γ values decreases, the exponent can be decreased to better utilize the available range. We formalize our terminology as follows. After each kernel call, statistics are stored in the floating point representation φ of the maximum absolute values of a tensor, obtained as φ = Γκ, by multiplying the maximum absolute mantissa value Γ with scale factor κ. This scale factor is related to the exponent e by the relation κ = 2−e. Figure 2: Distributions of values for (a) weights, (b) activations and (c) weight updates, all during the first epoch (blue) and last epoch (purple) of training a ResNet trained on CIFAR-10 for 165 epochs. The horizontal axis covers the entire range of values that can be represented in 16-bit Flexpoint, with the horizontal bars indicating the dynamic range covered by the 16-bit mantissa. All tensors have a narrow peak close to the right edge of the horizontal bar, where values have close to the same precision as if the elements had individual exponents. 4 If the same tensor is reused for different computations in the network, we track the exponent e and the statistics of φ separately for each use. This allows the underlying memory for the mantissa to be shared across different uses, without disrupting the exponent management. 3.4 Autoflex Initialization At the beginning of training, the statistics queue is empty, so we use a simple trial-and-error scheme described in Algorithm 1 to initialize the exponents. We perform each operation in a loop, inspecting the output value of Γ for overflows or underutilization, and repeat until the target exponent is found. Algorithm 1 Autoflex initialization algorithm. Scales are initialized by repeatedly performing the operation and adjusting the exponent up in case of overflows or down if not all bits are utilized. 1: initialized ←False 2: κ = 1 3: procedure INITIALIZE SCALE 4: while not initialized do 5: Γ ←returned by kernel call 6: if Γ ≥2N−1 −1 then ▷overflow: increase scale κ 7: κ ←κ × 2⌊N−1 2 ⌋ 8: else if Γ < 2N−2 then ▷underflow: decrease scale κ 9: κ ←κ × 2⌈log2 max (Γ,1)⌉−(N−2) ▷Jump directly to target exponent 10: if Γ > 2⌊N−1 2 ⌋−2 then ▷Ensure enough bits for reliable jump 11: initialized ←True 12: else ▷scale κ is correct 13: initialized ←True 3.5 Autoflex Exponent Prediction After the network has been initialized by running the initialization procedure for each computation in the network, we train the network in conjunction with a scale update Algorithm 2 executed twice per minibatch, once after forward activation and once after backpropagation, for each tensor / computation in the network. We maintain a fixed length dequeue f of the maximum floating point values encountered in the previous l iterations, and predict the expected maximum value for the next iteration based on the maximum and standard deviation of values stored in the dequeue. If an overflow is encountered, the history of statistics is reset and the exponent is increased by one additional bit. Algorithm 2 Autoflex scaling algorithm. Hyperparameters are multiplicative headroom factor α = 2, number of standard deviations β = 3, and additive constant γ = 100. Statistics are computed over a moving window of length l = 16. Returns expected maximum κ for the next iteration. 1: f ←stats dequeue of length l 2: Γ ←Maximum absolute value of mantissa, returned by kernel call 3: κ ←previous scale value κ 4: procedure ADJUST SCALE 5: if Γ ≥2N−1 −1 then ▷overflow: add one bit and clear stats 6: clear f 7: Γ ←2Γ 8: f ←[f, Γκ] ▷Extend dequeue 9: χ ←α [max(f) + βstd(f) + γκ] ▷Predicted maximum value for next iteration 10: κ ←2⌈log2 χ⌉−N+1 ▷Nearest power of two 3.6 Autoflex Example We illustrate the algorithm by training a small 2-layer perceptron for 400 iterations on the CIFAR-10 dataset. During training, κ and Γ values are stored at each iteration, as shown in Fig. 3, for instance, a linear layer’s weight, activation, and update tensors. Fig. 3(a) shows the weight tensor, which is highly stable as it is only updated with small gradient steps. Γ slowly approaches its maximum 5 213 214 Γ Weights 2−17 2−16 κ 0 100 200 300 2−3.2 2−3 Φ (a) 213 214 Activations 2−11 2−10 2−9 0 100 200 300 23 24 25 Raw value Max Estimate (b) 29 211 213 Updates 2−12 2−10 2−8 0 100 200 300 20 22 24 (c) Figure 3: Evolution of different tensors during training with corresponding mantissa and exponent values. The second row shows the scale κ, adjusted to keep the maximum absolute mantissa values (Γ, first row) at the top of the dynamic range without overflowing. As the product of the two (Φ, third row) is anticipated to cross a power of two boundary, the scale is changed so as to keep the mantissa in the correct range. (a) Shows this process for a weight tensor, which is very stable and slowly changing. The black arrow indicates how scale changes are synchronized with crossings of the exponent boundary. (b) shows an activation tensor with a noisier sequence of values. (c) shows a tensor of updates, which typically displays the most frequent exponent changes. In each case the Autoflex estimate (green line) crosses the exponent boundary (gray horizontal line) before the actual data (red) does, which means that exponent changes are predicted before an overflow occurs. value of 214, at which point the κ value is updated, and Γ drops by one bit. Shown below is the corresponding floating point representation of the statistics computed from Φ, which is used to perform the exponent prediction. Using a sliding window of 16 values, the predicted maximum is computed, and used to set the exponent for the next iteration. In Fig. 3(a), the prediction crosses the exponent boundary of 23 about 20 iterations before the value itself does, safely preventing an overflow. Tensors with more variation across epochs are shown in Fig. 3(b) (activations) and Fig. 3(c) (updates). The standard deviation across iterations is higher, therefore the algorithm leaves about half a bit and one bit respectively of headroom. Even as the tensor fluctuates in magnitude by more than a factor of two, the maximum absolute value of the mantissa Γ is safely prevented from overflowing. The cost of this approach is that in the last example Γ reaches 3 bits below the cutoff, leaving the top bits zero and using only 13 of the 16 bits for representing data. 3.7 Simulation on GPU The experiments described below were performed on Nvidia GPUs using the neon deep learning framework4. In order to simulate the flex16+5 data format we stored tensors using an int16 type. Computations such as convolution and matrix multiplication were performed with a set of GPU kernels which convert the underlying int16 data format to float32 by multiplying with κ, perform operations in floating point, and convert back to int16 before returning the result as well as Γ. The kernels also have the ability to compute only Γ without writing any outputs, to prevent writing invalid data during exponent initialization. The computational performance of the GPU kernels is comparable to pure floating point kernels, so training models in this Flexpoint simulator adds little overhead. 4 Experimental Results 4.1 Convolutional Networks We trained two convolutional networks in flex16+5, using float32 as a benchmark: AlexNet [1], and a ResNet [2, 3]. The ResNet architecture is composed of modules with shortcuts in the dataflow 4Available at https://github.com/NervanaSystems/neon. 6 graph, a key feature that makes effective end-to-end training of extremely deep networks possible. These multiple divergent and convergent flows of tensor values at potentially disparate scales might pose unique challenges for training in fixed point numerical format. We built a ResNet following the design as described in [3]. The network has 12 blocks of residual modules consisting of convolutional stacks, making a deep network of 110 layers in total. We trained this model on the CIFAR-10 dataset [1] with float32 and flex16+5 data formats for 165 epochs. Fig. 4 shows misclassification error on the validation set plotted over the course of training. Learning curves match closely between float32 and flex16+5 for both networks. In contrast, models trained in float16 without any changes in hyperparameter values substantially underperformed those trained in float32 and flex16+5. 4.2 Generative Adversarial Networks Next, we validate training a generative adversarial network (GAN) in flex16+5. By virtue of an adversarial (two-player game) training process, GAN models provide a principled way of unsupervised learning using deep neural networks. The unique characteristics of GAN training, namely separate data flows through two components (generator and discriminator) of the network, in addition to feeds of alternating batches of real and generated data of drastically different statistics to the discriminator at early stages of the training, pose significant challenges to fixed point numerical representations. We built a Wasserstein GAN (WGAN) model [4], which has the advantage of a metric, namely the Wasserstein-1 distance, that is indicative of generator performance and can be estimated from discriminator output during training. We trained a WGAN model with the LSUN [23] bedroom dataset in float32, flex16+5 and float16 formats with exactly the same hyperparameter settings. As shown in Fig. 5(a), estimates of the Wasserstein distance in flex16+5 training and in float32 training closely tracked each other. In float16 training the distance deviated significantly from baseline float32, starting with an initially undertrained discriminator. Further, we found no differences in the quality of generated images between float32 and flex16+5 at specific stages of the training 5(b), as quantified by the Fréchet Inception Distance (FID) [24]. Generated images from float16 training had lower quality (significantly higher FIDs, Fig. 5(b)) with noticeably more saturated patches, examples illustrated in Fig. 5(c), 5(d) and 5(e). 0 10 20 30 40 50 0.2 0.4 0.6 Epoch Top 5 Misclassification error flex16+5 float32 float16 (a) ImageNet1k AlexNet 0 50 100 150 0.1 0.2 0.3 0.4 Epoch Top 1 Misclassification error flex16+5 float32 float16 (b) CIFAR-10 ResNet Figure 4: Convolutional networks trained in flex16+5 and float32 numerical formats. (a) AlexNet trained on ImageNet1k, graph showing top-5 misclassification on the validation set. (b) ResNet of 110 layers trained on CIFAR-10, graph showing top-1 misclassification on the validation set. 7 5 Discussion In the present work, we show that a Flexpoint data format, flex16+5, can adequately support training of modern deep learning models without any modifications of model topology or hyperparameters, achieving a numerical performance on par with float32, the conventional data format widely used in deep learning research and development. Our discovery suggests a potential gain in efficiency and performance of future hardware architectures specialized in deep neural network training. Alternatives, i.e. schemes that more aggressively quantize tensor values to lower bit precisions, also made significant progress recently. Here we list major advantages and limitations of Flexpoint, and make a detailed comparison with competing methods in the following sections. Distinct from very low precision (below 8-bit) fixed point quantization schemes which significantly alter the quantitative behavior of the original model and thus requires completely different training algorithms, Flexpoint’s philosophy is to maintain numerical parity with the original network training behavior in high-precision floating point. This brings about a number of advantages. First, all prior knowledge of network design and hyperparameter tuning for efficient training can still be fully leveraged. Second, networks trained in high-precision floating point formats can be readily deployed in Flexpoint hardware for inference, or as component of a bigger network for training. Third, no re-tuning of hyperparameters is necessary for training in Flexpoint–what works with floating point simply works in Flexpoint. Fourth, the training procedure remains exactly the same, eliminating the need of intermediate high-precision representations, with the only exception of intermediate higher 0 50,000 100,000 150,000 200,000 0 0.5 1 1.5 Generator iteration Wasserstein estimate flex16+5 float32 float16 (a) Training performance 0 5 10 15 20 25 0 100 200 300 Number of trained epochs Fréchet Inception Distance (FID) flex16+5 float32 float16 (b) Quality of generated images (c) float32 (d) flex16+5 (e) float16 Figure 5: Training performance of WGAN in flex16+5, float32 and float16 data formats. (a) Learning curves, i.e. estimated Wasserstein distance by median filtered and down-sampled values of the negative discriminator cost function, median filter kernel length 100 [4], and down-sampling by plotting every 100th value. Examples of generated images by the WGAN trained with in (c) float32, (d) flex16+5 and (e) float16 for 16 epochs. Fréchet Inception Distance (FID) estimated from 5000 samples of the generator, as in [24]. 8 precision accumulation commonly needed for multipliers and adders. Fifth, all Flexpoint tensors are managed in exactly the same way by the Autoflex algorithm, which is designed to be hidden from the user, eliminating the need to remain cognizant of different type of tensors being quantized into different bit-widths. And finally, the AutoFlex algorithm is robust enough to accommodate diverse deep network topologies, without the need of model-specific tuning of its hyperparameters. Despite these advantages, the same design philosophy of Flexpoint likely prescribes a potential limitation in performance and efficiency, especially when compared to more aggressive quantization schemes, e.g. Binarized Networks, Quantized Networks and the DoReFa-Net. However, we believe Flexpoint strikes a desirable balance between aggressive extraction of performance and support for a wide collection of existing models. Furthermore, potentials and implications for hardware architecture of other data formats in the Flexpoint family, namely flexN+M for certain (N, M), are yet to be explored in future investigations. Low-precision data formats: TensorFlow provides tools to quantize networks into 8-bit for inference [9]. TensorFlow’s numerical format shares some common features with Flexpoint: each tensor has two variables that encode the range of the tensor’s values; this is similar to Autoflex κ (although it uses fewer bits to encode the exponent). Then an integer value is used to represent the dynamic range with a dynamic precision. The dynamic fixed point (DFXP) numerical format, proposed in [25], has a similar representation as Flexpoint: a tensor consists of mantissa bits and values share a common exponent. This format was used by [21] to train various neural nets in low-precision with limited success (with difficulty to match CIFAR-10 maxout nets in float32). DFXP diverges significantly from Flexpoint in automatic exponent management: DFXP only updates the shared exponent at intervals specified by the user (e.g. per 100 minibatches) and solely based on the number of overflows occurring. Flexpoint is more suitable for training modern networks where the dynamics of the tensors might change rapidly. Low-precision networks: While allowing for very efficient forward inference, the low-precision networks discussed in Section 2 share the following shortcomings when it comes to neural network training. These methods utilize an intermediate floating point weight representation that is also updated in floating point. This requires special hardware to perform these operations in addition to increasing the memory footprint of the models. In addition, these low-precision quantizations render the models so different from the exact same networks trained in high-precision floating point formats that there is often no parity at the algorithmic level, which requires completely distinct training algorithms to be developed and optimized for these low-precision training schemes. 6 Conclusion To further scale up deep learning the future will require custom hardware that offers greater compute capability, supports ever-growing workloads, and minimizes memory and power consumption. Flexpoint is a numerical format designed to complement such specialized hardware. We have demonstrated that Flexpoint with a 16-bit mantissa and a 5-bit shared exponent achieved numerical parity with 32-bit floating point in training several deep learning models without modifying the models or their hyperparameters, outperforming 16-bit floating point under the same conditions. Thus, specifically designed formats, like Flexpoint, along with supporting algorithms, such as Autoflex, go beyond current standards and present a promising ground for future research. 7 Acknowledgements We thank Dr. Evren Tumer for his insightful comments and feedback. 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. 9 [2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. URL http://arxiv.org/abs/1512.03385. [3] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer, 2016. URL http://arxiv.org/abs/1603.05027. [4] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein GAN. arXiv preprint arXiv:1701.07875, 2017. URL http://arxiv.org/abs/1701.07875. [5] Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061, 2016. URL http://arxiv.org/abs/1609.07061. [6] Shuchang Zhou, Zekun Ni, Xinyu Zhou, He Wen, Yuxin Wu, and Yuheng Zou. DoReFa-Net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016. URL http://arxiv.org/abs/1606.06160. [7] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. XNOR-Net: ImageNet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525–542. Springer, 2016. [8] Vincent Vanhoucke, Andrew Senior, and Mark Z Mao. Improving the speed of neural networks on CPUs. In Advances in Neural Information Processing Systems (workshop on deep learning), 2011. URL http://research.google.com/pubs/archive/37631.pdf. [9] Martín Abadi and et al. TensorFlow: Large-scale machine learning on heterogeneous distributed systems, 2016. URL http://arxiv.org/abs/1603.04467. [10] Naveen Mellempudi, Abhisek Kundu, Dipankar Das, Dheevatsa Mudigere, and Bharat Kaul. Mixed low-precision deep learning inference using dynamic fixed point. arXiv preprint arXiv:1701.08978, 2017. URL http://arxiv.org/abs/1701.08978. [11] Darryl D. Lin, Sachin S. Talathi, and V. Sreekanth Annapureddy. Fixed point quantization of deep convolutional networks. In International Conference on Machine Learning, pages 2849–2858, 2016. [12] Ganesh Venkatesh, Eriko Nurvitadhi, and Debbie Marr. Accelerating deep convolutional networks using low-precision and sparsity. arXiv preprint arXiv:1610.00324, 2016. URL http://arxiv.org/abs/1610.00324. [13] Zhouhan Lin, Matthieu Courbariaux, Roland Memisevic, and Yoshua Bengio. Neural networks with few multiplications. arXiv preprint arXiv:1510.03009, 2015. URL http://arxiv.org/ abs/1510.03009. [14] Minje Kim and Paris Smaragdis. Bitwise neural networks. arXiv preprint arXiv:1601.06071, 2016. URL http://arxiv.org/abs/1601.06071. [15] Norman P Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, et al. In-datacenter performance analysis of a tensor processing unit. arXiv preprint arXiv:1704.04760, 2017. URL http: //arxiv.org/abs/1704.04760. [16] Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. BinaryConnect: Training deep neural networks with binary weights during propagations. In Advances in Neural Information Processing Systems, pages 3123–3131, 2015. URL http://arxiv.org/abs/1511.00363. [17] Matthieu Courbariaux and Yoshua Bengio. BinaryNet: Training deep neural networks with weights and activations constrained to +1 or -1. arXiv preprint arXiv:1602.02830, 2016. URL http://arxiv.org/abs/1602.02830. [18] Kyuyeon Hwang and Wonyong Sung. Fixed-point feedforward deep neural network design using weights +1, 0, and -1. In Signal Processing Systems (SiPS), 2014 IEEE Workshop on, pages 1–6. IEEE, 2014. [19] Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs. In Interspeech, pages 1058–1062, 2014. 10 [20] Daisuke Miyashita, Edward H. Lee, and Boris Murmann. Convolutional neural networks using logarithmic data representation. arXiv preprint arXiv:1603.01025, 2016. URL http: //arxiv.org/abs/1603.01025. [21] Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Training deep neural networks with low precision multiplications. In International Conference on Learning Representations (workshop contribution), 2014. URL http://arxiv.org/abs/1412.7024. [22] Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. arXiv preprint arXiv:1502.02551, 2015. URL http:// arxiv.org/abs/1502.02551. [23] Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. LSUN: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015. [24] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Günter Klambauer, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a nash equilibrium. CoRR, abs/1706.08500, 2017. URL http://arxiv.org/abs/1706.08500. [25] Darrell Williamson. Dynamically scaled fixed point arithmetic. In Communications, Computers and Signal Processing, 1991., IEEE Pacific Rim Conference on, pages 315–318. IEEE, 1991. 11 | 2017 | 421 |
6,921 | Recursive Sampling for the Nyström Method Cameron Musco MIT EECS cnmusco@mit.edu Christopher Musco MIT EECS cpmusco@mit.edu Abstract We give the first algorithm for kernel Nyström approximation that runs in linear time in the number of training points and is provably accurate for all kernel matrices, without dependence on regularity or incoherence conditions. The algorithm projects the kernel onto a set of s landmark points sampled by their ridge leverage scores, requiring just O(ns) kernel evaluations and O(ns2) additional runtime. While leverage score sampling has long been known to give strong theoretical guarantees for Nyström approximation, by employing a fast recursive sampling scheme, our algorithm is the first to make the approach scalable. Empirically we show that it finds more accurate kernel approximations in less time than popular techniques such as classic Nyström approximation and the random Fourier features method. 1 Introduction The kernel method is a powerful for applying linear learning algorithms (SVMs, linear regression, etc.) to nonlinear problems. The key idea is to map data to a higher dimensional kernel feature space, where linear relationships correspond to nonlinear relationships in the original data. Typically this mapping is implicit. A kernel function is used to compute inner products in the high-dimensional kernel space, without ever actually mapping original data points to the space. Given n data points x1, . . . , xn, the n ⇥n kernel matrix K is formed where Ki,j contains the highdimensional inner product between xi and xj, as computed by the kernel function. All computations required by a linear learning method are performed using the inner product information in K. Unfortunately, the transition from linear to nonlinear comes at a high cost. Just generating the entries of K requires ⇥(n2) time, which is prohibitive for large datasets. 1.1 Kernel approximation A large body of work seeks to accelerate kernel methods by finding a compressed, often lowrank, approximation ˜K to the true kernel matrix K. Techniques include random sampling and embedding [AMS01, BBV06, ANW14], random Fourier feature methods for shift invariant kernels [RR07, RR09, LSS13], and incomplete Cholesky factorization [FS02, BJ02]. One of the most popular techniques is the Nyström method, which constructs ˜K using a subset of “landmark” data points [WS01]. Once s data points are selected, ˜K (in factored form) takes just O(ns) kernel evaluations and O(s3) additional time to compute, requires O(ns) space to store, and can be manipulated quickly in downstream applications. E.g., inverting ˜K takes O(ns2) time. The Nyström method performs well in practice [YLM+12, GM13, TRVR16], is widely implemented [HFH+09, PVG+11, IBM14], and is used in a number of applications under different names such as “landmark isomap” [DST03] and “landmark MDS” [Pla05]. In the classic variant, landmark points are selected uniformly at random. However, significant research seeks to improve performance via data31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. dependent sampling that selects landmarks which more closely approximate the full kernel matrix than uniformly sampled landmarks [SS00, DM05, ZTK08, BW09, KMT12, WZ13, GM13, LJS16]. Theoretical work has converged on leverage score based approaches, as they give the strongest provable guarantees for both kernel approximation [DMM08, GM13] and statistical performance in downstream applications [AM15, RCR15, Wan16]. Leverage scores capture how important an individual data point is in composing the span of the kernel matrix. Unfortunately, these scores are prohibitively expensive to compute. All known approximation schemes require ⌦(n2) time or only run quickly under strong conditions on K – e.g. good conditioning or data “incoherence” [DMIMW12, GM13, AM15, CLV16]. Hence, leverage score-based approaches remain largely in the domain of theory, with limited practical impact [KMT12, LBKL15, YPW15]. 1.2 Our contributions In this work, we close the gap between strong approximation bounds and efficiency: we present a new Nyström algorithm based on recursive leverage score sampling which achieves the “best of both worlds”: it produces kernel approximations provably matching the high accuracy of leverage score methods while only requiring O(ns) kernel evaluations and O(ns2) runtime for s landmark points. Theoretically, this runtime is surprising. In the typical case when s ⌧n, the algorithm evaluates just a small subset of K, ignoring most of the kernel space inner products. Yet its performance guarantees hold for general kernels, requiring no assumptions on coherence or regularity. Empirically, the runtime’s linear dependence on n means that our method is the first leverage score algorithm that can compete with the most commonly implemented techniques, including the classic uniform sampling Nyström method and random Fourier features sampling [RR07]. Since our algorithm obtains higher quality samples, we show experimentally that it outperforms these methods on benchmark datasets – it can obtain as accurate a kernel approximation in significantly less time. Our approximations also have lower rank, so they can be stored in less space and processed more quickly in downstream learning tasks. 1.3 Paper outline Our recursive sampling algorithm is built on top of a Nyström scheme of Alaoui and Mahoney that samples landmark points based on their ridge leverage scores [AM15]. After reviewing preliminaries in Section 2, in Section 3 we analyze this scheme, which we refer to as RLS-Nyström. To simplify prior work, which studies the statistical performance of RLS-Nyström for specific kernel learning tasks [AM15, RCR15, Wan16], we prove a strong, application independent approximation guarantee: for any λ, if ˜K is constructed with s = ⇥(dλ eff log dλ eff) samples1, where dλ eff = tr(K(K + λI)−1) is the so-called “λ-effective dimensionality” of K, then with high probability, kK −˜Kk2 λ. In Appendix E, we show that this guarantee implies bounds on the statistical performance of RLSNyström for kernel ridge regression and canonical correlation analysis. We also use it to prove new results on the performance of RLS-Nyström for kernel rank-k PCA and k-means clustering – in both cases just O(k log k) samples are required to obtain a solution with good accuracy. After affirming the favorable theoretical properties of RLS-Nyström, in Section 4 we show that its runtime can be significantly improved using a recursive sampling approach. Intuitively our algorithm is simple. We show how to approximate the kernel ridge leverage scores using a uniform sample of 1 2 of our input points. While the subsampled kernel matrix still has a prohibitive n2/4 entries, we can recursively approximate it, using our same sampling algorithm. If our final Nyström approximation will use s landmarks, the recursive approximation only needs rank O(s), which lets us estimate the ridge leverage scores of the original kernel matrix in just O(ns2) time. Since n is cut in half at each level of recursion, our total runtime is O ⇣ ns2 + ns2 2 + ns2 4 + ... ⌘ = O(ns2), significantly improving upon the method of [AM15], which takes ⇥(n3) time in the worst case. Our approach builds on recent work on iterative sampling methods for approximate linear algebra [CLM+15, CMM17]. While the analysis in the kernel setting is technical, our final algorithm is 1This is within a log factor of the best possible for any low-rank approximation with error λ. 2 simple and easy to implement. We present and test a parameter-free variation of Recursive RLSNyström in Section 5, confirming superior performance compared to existing methods. 2 Preliminaries Consider an input space X and a positive semidefinite kernel function K : X ⇥X ! R. Let F be an associated reproducing kernel Hilbert space and φ : X ! F be a (typically nonlinear) feature map such that for any x, y 2 X, K(x, y) = hφ(x), φ(y)iF. Given a set of n input points x1, . . . , xn 2 X, define the kernel matrix K 2 Rn⇥n by Ki,j = K(xi, xj). It is often natural to consider the kernelized data matrix that generates K. Informally, let Φ 2 Rn⇥d0 be the matrix containing φ(x1), ..., φ(xn) as its rows (note that d0 may be infinite). K = ΦΦT . While we use Φ for intuition, in our formal proofs we replace it with any matrix B 2 Rn⇥n satisfying BBT = K (e.g. a Cholesky factor). Such a B is guaranteed to exist since K is positive semidefinite. We repeatedly use the singular value decomposition, which allows us to write any rank r matrix M 2 Rn⇥d as M = U⌃VT, where U 2 Rn⇥r and V 2 Rd⇥r have orthogonal columns (the left and right singular vectors of M), and ⌃2 Rr⇥r is a positive diagonal matrix containing the singular values: σ1(M) ≥σ2(M) ≥. . . ≥σr(M) > 0. M’s pseudoinverse is given by M+ = V⌃−1UT . 2.1 Nyström approximation The Nyström method selects a subset of “landmark” points and uses them to construct a low-rank approximation to K. Given a matrix S 2 Rn⇥s that has a single entry in each column equal to 1 so that KS is a subset of s columns from K, the associated Nyström approximation is: ˜K = KS(ST KS)+ST K. (1) ˜K can be stored in O(ns) space by separately storing KS 2 Rn⇥s and (ST KS)+ 2 Rs⇥s. Furthermore, the factors can be computed using just O(ns) evaluations of the kernel inner product to form KS and O(s3) time to compute (ST KS)+. Typically s ⌧n so these costs are significantly lower than the cost to form and store the full kernel matrix K. We view Nyström approximation as a low-rank approximation to the dataset in feature space. Recalling that K = ΦΦT , S selects s kernelized data points ST Φ and we approximate Φ using its projection onto these points. Informally, let PS 2 Rd0⇥d0 be the orthogonal projection onto the row span of ST Φ. We approximate Φ by ˜Φ def = ΦPS. We can write PS = ΦT S(ST ΦΦT S)+ST Φ. Since it is an orthogonal projection, PSPT S = P2 S = PS, and so we can write: ˜K = ˜Φ˜ΦT = ΦP2 SΦT = Φ # ΦT S(ST ΦΦT S)+ST Φ $ ΦT = KS(ST KS)+ST K. This recovers the standard Nyström approximation (1). 3 The RLS-Nyström method We now introduce the RLS-Nyström method, which uses ridge leverage score sampling to select landmark data points, and discuss its strong approximation guarantees for any kernel matrix K. 3.1 Ridge leverage scores In classical Nyström approximation (1), S is formed by sampling data points uniformly at random. Uniform sampling can work in practice, but it only gives theoretical guarantees under strong regularity or incoherence assumptions on K [Git11]. It will fail for many natural kernel matrices where the relative “importance” of points is not uniform across the dataset For example, imagine a dataset where points fall into several clusters, but one of the clusters is much larger than the rest. Uniform sampling will tend to oversample landmarks from the large cluster while undersampling or possibly missing smaller but still important clusters. Approximation of K and learning performance (e.g. classification accuracy) will decline as a result. 3 (a) Uniform landmark sampling. (b) Improved landmark sampling. Figure 1: Uniform sampling for Nyström approximation can oversample from denser parts of the dataset. A better Nyström scheme will select points that more equally cover the relevant data. To combat this issue, alternative methods compute a measure of point importance that is used to select landmarks. For example, one heuristic applies k-means clustering to the input and takes the cluster centers as landmarks [ZTK08]. A large body of theoretical work measures importance using variations on the statistical leverage scores. One natural variation is the ridge leverage score: Definition 1 (Ridge leverage scores [AM15]). For any λ > 0, the λ-ridge leverage score of data point xi with respect to the kernel matrix K is defined as lλ i (K) def = # K(K + λI)−1$ i,i , (2) where I is the n ⇥n identity matrix. For any B 2 Rn⇥n satisfying BBT = K, we can also write: lλ i (K) = bT i (BT B + λI)−1bi, (3) where bT i 2 R1⇥n is the ith row of B. For conciseness we typically write lλ i (K) as lλ i . To check that (2) and (3) are equivalent note that bT i (BT B+λI)−1bi = # B(BT B + λI)−1BT $ i,i. Using the SVD to write B = U⌃VT and accordingly K = U⌃2UT confirms that K(K+λI)−1 = B(BT B+λI)−1BT = U⌃2 # ⌃2 + λI $−1 UT . It is not hard to check (see [CLM+15]) that the ridge scores can be defined alternatively as: lλ i = min y2Rn 1 λkbT i −yT Bk2 2 + kyk2 2. (4) This formulation provides better insight into these scores. Since BBT = K, any kernel algorithm effectively works with B’s rows as data points. The ridge scores reflect the relative importance of these rows. From (4) it’s clear that lλ i 1 since we can set y to the ith standard basis vector. bi will have score ⌧1 (i.e. is less important) when it’s possible to find a more “spread out” y that uses other rows in B to approximately reconstruct bi – in other words when the row is less unique. 3.2 Sum of ridge leverage scores As is standard in leverage score methods, we don’t directly select landmarks to be the points with the highest scores. Instead, we sample each point with probability proportional to lλ i . Accordingly, the number of landmarks selected, which controls ˜K’s rank, is a random variable with expectation equal to the sum of the λ-ridge leverage scores. To ensure compact kernel approximations, we want this sum to be small. Immediately from Definition 1, we have: Fact 2. Pn i=1 lλ i (K) = tr(K(K + λI)−1). We denote dλ eff def = tr(K(K+ λI)−1). dλ eff is a natural quantity, referred to as the “effective dimension” or “degrees of freedom” for a ridge regression problem on K with regularization λ [HTF02, Zha06]. dλ eff increases monotonically as λ decreases. For any fixed λ it is essentially the smallest possible rank achievable for ˜K satisfying the approximation guarantee given by RLS-Nyström: kK −˜Kk2 < λ. 4 3.3 The basic sampling algorithm We can now introduce the RLS-Nyström method as Algorithm 1. We allow sampling each point by any probability greater than lλ i , which is useful later when we compute the scores approximately. Oversampling landmarks can only improve ˜K’s accuracy. It could cause us to take more samples, but we will always ensure that the sum of our approximate ridge leverage scores is not too large. Algorithm 1 RLS-NYSTRÖM SAMPLING input: x1, . . . , xn 2 X, kernel matrix K, ridge parameter λ > 0, failure probability δ 2 (0, 1/8) 1: Compute an over-approximation, ˜lλ i > lλ i for the λ-ridge leverage score of each x1, . . . , xn 2: Set pi := min n 1, ˜lλ i · 16 log(P ˜lλ i /δ) o . 3: Construct S 2 Rn⇥s by sampling x1, . . . , xn each independently with probability pi. In other words, for each i add a column to S with a 1 in position i with probability pi. 4: return the Nyström factors KS 2 Rn⇥s and (ST KS)+ 2 Rs⇥s. 3.4 Accuracy bounds We show that RLS-Nyström produces ˜K which spectrally approximates K up to a small additive error. This is the strongest type of approximation offered by any known Nyström method [GM13]. It guarantees provable accuracy when ˜K is used in place of K in many learning applications [CMT10]. Theorem 3 (Spectral error approximation). For any λ > 0 and δ 2 (0, 1/8), Algorithm 1 returns S 2 Rn⇥s such that with probability 1 −δ, s 2 P i pi and ˜K = KS(ST KS)+ST K satisfies: ˜K ⪯K ⪯˜K + λI. (5) When ridge scores are computed exactly, P i pi = O # dλ eff log(dλ eff/δ) $ . ⪯denotes the Loewner ordering: M ⪯N means that N −M is positive semidefinite. Note that (5) immediately implies the well studied (see e.g [GM13]) spectral norm guarantee, kK −˜Kk2 λ. Intuitively, Theorem 3 guarantees that ˜K well approximates the top of K’s spectrum (i.e. any eigenvalues > λ) while losing information about smaller, less important eigenvalues. Due to space constraints, we defer the proof to Appendix A. It relies on the view of Nyström approximation as a low-rank projection of the kernelized data (see Section 2.1) and we use an intrinsic dimension matrix Bernstein bound to show accuracy of the sampled approximation. Often the regularization parameter λ is specified for a learning task, and for near optimal performance on this task, we set the approximation factor in Theorem 3 to ✏λ. In this case we have: Corollary 4 (Tighter spectral error approximation). For any λ > 0 and δ 2 (0, 1/8), Algorithm 1 run with ridge parameter ✏λ returns S 2 Rn⇥s such that with probability 1 −δ, s = O ⇣ dλ eff ✏log dλ eff δ✏ ⌘ and ˜K = KS(ST KS)+ST K satisfies ˜K ⪯K ⪯˜K + ✏λI. Proof. This follows from Theorem 3 by noting d✏λ eff dλ eff/✏since (K+✏λI)−1 ⪯1 ✏(K+λI)−1. Corollary 4 suffices to prove that ˜K can be used in place of K without sacrificing performance on kernel ridge regression and canonical correlation tasks [AM15, Wan16]. We also use it to prove a projection-cost preservation guarantee (Theorem 12, Appendix B), which gives approximation bounds for kernel PCA and k-means clustering. Projection-cost preservation has proven a powerful concept in the matrix sketching literature [FSS13, CEM+15, CMM17, BWZ16, CW17] and we hope that extending the guarantee to kernels leads to applications beyond those considered in this work. Our results on downstream learning bounds that can be derived from Theorem 3 are summarized in Table 1. Details can be found in Appendices B and E. 5 Table 1: Downstream guarantees for ˜K obtained from RLS-Nyström (Algorithm 1). Application Guarantee Theorem Space to store ˜K Kernel Ridge Regression w/ param λ (1 + ✏) relative error risk bound Thm 16 ˜O( ndλ eff ✏) Kernel k-means Clustering (1 + ✏) relative error Thm 17 ˜O( nk ✏) Rank k Kernel PCA (1 + ✏) relative Frob norm error Thm 18 ˜O( nk ✏) Kernel CCA w/ params λx, λy ✏additive error Thm 19 ˜O( ndλx eff +nd λy eff ✏ ) ⇤For conciseness, ˜O(·) hides log factors in the failure probability, deff, and k. 4 Recursive sampling for efficient RLS-Nyström Having established strong approximation guarantees for RLS-Nyström, it remains to provide an efficient implementation. Specifically, Step 1 of Algorithm 1 naively requires ⇥(n3) time. We show that significant acceleration is possible using a recursive sampling approach. 4.1 Ridge leverage score approximation via uniform sampling The key is to estimate the leverage scores by computing (3) approximately, using a uniform sample of the data points. To ensure accuracy, the sample must be large – a constant fraction of the points. Our fast runtimes are achieved by recursively approximating this large sample. In Appendix F we prove: Lemma 5. For any B 2 Rn⇥n with BBT = K and S 2 Rn⇥s chosen by sampling each data point independently with probability 1/2, let ˜lλ i = bT i (BT SST B + λI)−1bi and pi = min{1, 16˜lλ i log(P i ˜lλ i /δ)} for any δ 2 (0, 1/8). Then with probability at least 1 −δ: 1) ˜lλ i ≥lλ i for all i 2) X i pi 64 X i lλ i log( X i lλ i /δ). The first condition ensures that the approximate scores ˜lλ i suffice for use in Algorithm 1. The second ensures that the Nyström approximation obtained will not have too many sampled landmarks. Naively computing ˜lλ i in Lemma 5 involves explicitly forming B, requiring ⌦(n2) time (e.g. ⇥(n3) via Cholesky decomposition). Fortunately, the following formula (proof in Appx. F) avoids this cost: Lemma 6. For any sampling matrix S 2 Rn⇥s, and any λ > 0: ˜lλ i def = bT i (BT SST B + λI)−1bi = 1 λ ⇣ K −KS # ST KS + λI $−1 ST K ⌘ i,i . It follows that we can compute all ˜lλ i for all i in O(ns2) time using just O(ns) kernel evaluations, to compute KS and the diagonal of K. 4.2 Recursive RLS-Nyström We apply Lemmas 5 and 6 to give an efficient recursive implementation of RLS-Nyström, Algorithm 2. We show that the output of this algorithm, S, is sampled according to approximate ridge leverage scores for K and thus satisfies the approximation guarantee of Theorem 3. Theorem 7 (Main Result). Let S 2 Rn⇥s be computed by Algorithm 2. With probability 1 −3δ, s 384 · dλ eff log(dλ eff/δ), S is sampled by overestimates of the λ-ridge leverage scores of K, and thus by Theorem 3, the Nyström approximation ˜K = KS(ST KS)+ST K satisfies: ˜K ⪯K ⪯˜K + λI. Algorithm 2 uses O(ns) kernel evaluations and O(ns2) computation time. 6 Algorithm 2 RECURSIVERLS-NYSTRÖM. input: x1, . . . , xm 2 X, kernel function K : X ⇥X ! R, ridge λ > 0, failure prob. δ 2 (0, 1/32) output: weighted sampling matrix S 2 Rm⇥s 1: if m 192 log(1/δ) then 2: return S := Im⇥m. 3: end if 4: Let ¯S be a random subset of {1, ..., m}, with each i included independently with probability 1 2. . Let ¯X = {xi1, xi2, ..., xi| ¯ S|} for ij 2 ¯S be the data sample corresponding to ¯S. . Let ¯S = [ei1, ei2, ..., ei| ¯ S|] be the sampling matrix corresponding to ¯S. 5: ˜S := RECURSIVERLS-NYSTRÖM(¯X, K, λ, δ/3). 6: ˆS := ¯S · ˜S. 7: Set ˜lλ i := 3 2λ ✓ K −KˆS ⇣ ˆST KˆS + λI ⌘−1 ˆST K ◆ i,i for each i 2 {1, . . . , m} . . By Lemma 6, equals 3 2(B(BT ˆSˆST B + λI)−1BT )i,i. K denotes the kernel matrix for datapoints {x1, . . . , xm} and kernel function K. 8: Set pi := min{1, ˜lλ i · 16 log(P ˜lλ i /δ)} for each i 2 {1, . . . , m}. 9: Initially set weighted sampling matrix S to be empty. For each i 2 {1, . . . , m}, with probability pi, append the column 1 ppi ei onto S. 10: return S. Note that in Algorithm 2 the columns of S are weighted by 1/ppi. The Nyström approximation ˜K = KS(ST KS)+ST K is not effected by column weights (see derivation in Section 2.1). However, the weighting is necessary when the output is used in recursive calls (i.e. when ˜S is used in Step 6). We prove Theorem 7 via the following intermediate result: Theorem 8. For any inputs x1, . . . , xm, K, λ > 0 and δ 2 (0, 1/32), let K be the kernel matrix for x1, . . . , xm and kernel function K and let dλ eff(K) be the effective dimension of K with parameter λ. With probability (1 −3δ), RECURSIVERLS-NYSTRÖM outputs S with s columns that satisfies: 1 2(BT B + λI) ⪯(BT SST B + λI) ⪯3 2(BT B + λI) for any B with BBT = K. (6) Additionally, s smax(dλ eff(K), δ) where smax(w, z) def = 384 · (w + 1) log ((w + 1)/z). The algorithm uses c1msmax(dλ eff(K), δ) kernel evaluations and c2msmax(dλ eff(K), δ)2 additional computation time where c1 and c2 are fixed universal constants. Theorem 8 is proved via an inductive argument, given in Appendix C. Roughly, consider in Step 6 of Algorithm 2, setting ˆS := ¯S instead of ¯S · ˜S. By Lemma 5 and the formula in Lemma 6, the leverage score approximations ˜lλ i computed in Step 7 would be good approximations to the true leverage scores, and S would satisfy Theorem 8 by a standard matrix Bernstein bound (see Lemma 9). However, if we set ˆS := ¯S, it will have n/2 columns in expectation, and the computation in Step 7 will be expensive – requiring roughly O(n3) time. By recursively calling Algorithm 8 and applying Theorem 8 inductively, we obtain ˜S satisfying with high probability: 1 2(BT ¯S¯ST B + λI) ⪯((B¯S)˜S˜ST (¯ST B) + λI) ⪯3 2(B¯S¯ST B + λI). This guarantee ensures that when we use ˆS = ˆS · ˜S in place of ¯S in Step 7, the leverage score estimates are changed only by a constant factor. Thus, sampling by these estimates, still gives us the desired guarantee (6). Further, ˜S and therefore ˆS has just O(smax(dλ eff(K), δ)) columns, so Step 7 can be performed very efficiently, within the stated runtime bounds. With Theorem 8 we can easily prove our main result, Theorem 7. Proof of Theorem 7. In our proof of Theorem 3 in Appendix A.1, we show that if 1 2(BT B + λI) ⪯(BT SST B + λI) ⪯3 2(BT B + λI) 7 for a weighted sampling matrix S, then even if we remove the weights from S so that it has all unit entries (they don’t effect the Nyström approximation), ˜K = KS(ST KS)+ST K satisfies: ˜K ⪯K ⪯˜K + λI. The runtime bounds also follow nearly directly from Theorem 8. In particular, we have established that O # nsmax(dλ eff(K), δ) $ kernel evaluations and O # nsmax(dλ eff(K), δ)2$ additional runtime are required by RECURSIVERLS-NYSTRÖM. We only needed the upper bound to prove Theorem 8, but along the way actually show that in a successful run of RECURSIVERLS-NYSTRÖM, S has ⇥ # dλ eff(K) log # dλ eff(K)/δ $$ columns. Additionally, we may assume that deff(K) ≥1/2. If it is not, then it’s not hard to check (see proof of Lemma 20) that λ must be ≥kKk. If this is the case, the guarantee of Theorem 7 is vacuous: any Nyström approximation ˜K satisfies ˜K ⪯K ⪯˜K + λI. With deff(K) ≥1/2, dλ eff(K) log # dλ eff(K)/δ $ and thus s are ⇥(smax(dλ eff(K), δ) so we conclude that Theorem 7 uses O(ns) kernel evaluations and O(ns2) additional runtime. 5 Empirical evaluation We conclude with an empirical evaluation of our recursive RLS-Nyström method. We use a variant of Algorithm 2 where, instead of choosing a regularization parameter λ, the user sets a sample size s and λ is automatically determined such that s = ⇥(dλ eff · log(dλ eff/δ)). This variant is practically appealing as it essentially yields the best possible approximation to K for a fixed sample budget. Pseudocode and proofs of correctness are included in Appendix D. 5.1 Performance of Recursive RLS-Nyström for kernel approximation We evaluate RLS-Nyström on the YearPredictionMSD, Covertype, Cod-RNA, and Adult datasets downloaded from the UCI ML Repository [Lic13] and [UKM06]. These datasets contain 515345, 581012, 331152, and 48842 data points respectively. We compare against the classic Nyström method with uniform sampling [WS01] and the random Fourier features method [RR07]. Due to the large size of the datasets, prior leverage score based Nyström approaches [DMIMW12, GM13, AM15], which require at least ⌦(n2) time are infeasible, and thus not included in our tests. We split categorical features into binary indicatory features and mean center and normalize features to have variance 1. We use a Gaussian kernel for all tests, with the width parameter σ selected via cross validation on regression and classification tasks. kK −˜Kk2 is used to measure approximation error. Since this quantity is prohibitively expensive to compute directly (it requires building the full kernel matrix K), the error is estimated using a random subset of 20,000 data points and repeated trials. Samples 0 1000 2000 3000 4000 5000 ∥K −˜K∥2 10-4 10-2 100 102 104 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features (a) Adult Samples 0 500 1000 1500 2000 ∥K −˜K∥2 10-2 100 102 104 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features (b) Covertype Samples 0 1000 2000 3000 4000 5000 ∥K −˜K∥2 10-4 10-2 100 102 104 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features (c) Cod-RNA Samples 0 1000 2000 3000 4000 5000 ∥K −˜K∥2 100 101 102 103 104 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features (d) YearPredictionMSD Figure 2: For a given number of samples, Recursive RLS-Nyström yields approximations with lower error, measured by kK −˜Kk2. Error is plotted on a logarithmic scale, averaged over 10 trials. Figure 2 confirms that Recursive RLS-Nyström consistently obtains substantially better kernel approximation error than the other methods. As we can see in Figure 3, with the exception of YearPredictionMSD, the better quality of the landmarks obtained with Recursive RLS-Nyström also translates into runtime improvements. While the cost per sample is higher for our method at O(nd + ns) time versus O(nd + s2) for uniform Nyström and O(nd) for random Fourier features, since RLS-Nyström requires fewer samples it more quickly obtains ˜K with a given accuracy. ˜K will also have lower rank, which can accelerate processing in downstream applications. 8 Runtime (sec.) 0 5 10 15 ∥K −˜K∥2 10-4 10-3 10-2 10-1 100 101 Recursive RLS-Nystrom Uniform Nystrom (a) Adult Runtime (sec.) 0 1 2 3 4 5 ∥K −˜K∥2 10-3 10-2 10-1 100 101 102 Recursive RLS-Nystrom Uniform Nystrom (b) Covertype Runtime (sec.) 0 1 2 3 4 5 ∥K −˜K∥2 10-3 10-2 10-1 100 101 102 Recursive RLS-Nystrom Uniform Nystrom (c) Cod-RNA Runtime (sec.) 0 2 4 6 8 10 ∥K −˜K∥2 100 101 102 103 Recursive RLS-Nystrom Uniform Nystrom (d) YearPredictionMSD Figure 3: Recursive RLS-Nyström obtains a fixed level of approximation faster than uniform sampling, only underperforming on YearPredictionMSD. Results for random Fourier features are not shown: while the method is faster, it never obtained high enough accuracy to be directly comparable. In Appendix G, we show that that runtime of RLS-Nyström can be further accelerated, via a heuristic approach that under-samples landmarks at each level of recursion. This approach brings the per sample cost down to approximately that of random Fourier features and uniform Nyström while nearly maintaining the same approximation quality. Results are shown in Figure 4. For datasets such as Covertype in which Recursive RLS-Nyström performs significantly better than uniform sampling, so does the accelerated method (see Figure 4b). However, the performance of the accelerated method does not degrade when leverage scores are relatively uniform – it still offers the best runtime to approximation quality tradeoff (Figure 4c). We note further runtime optimizations may be possible. Subsequent work extends fast ridge leverage score methods to distributed and streaming environments [CLV17]. Empirical evaluation of these techniques could lead to even more scalable, high accuracy Nyström methods. Samples 0 500 1000 1500 2000 Runtime (sec) 0 0.5 1 1.5 2 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features Acclerated Recursive RLS-Nystrom (a) Runtimes for Covertype. Samples 0 500 1000 1500 2000 ∥K −˜K∥2 10-2 100 102 104 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features Accelerated Recursive RLS-Nystrom (b) Errors for Covertype. Runtime (sec.) 0 1 2 3 4 5 ∥K −˜K∥2 100 101 102 103 Recursive RLS-Nystrom Uniform Nystrom Random Fourier Features Accelerated Recursive RLS-Nystrom (c) Runtime/error tradeoff for YearPredictionMSD. Figure 4: Our accelerated Recursive RLS-Nyström, nearly matches the per sample runtime of random Fourier features and uniform Nyström while still providing much better approximation. 5.2 Additional Empirical Results In Appendix G we verify the usefulness of our kernel approximations in downstream learning tasks. While full kernel methods do not scale to our large datasets, Recursive RLS-Nyström does since its runtime depends linearly on n. For example, on YearPredictionMSD the method requires 307 sec. (averaged over 5 trials) to build a 2, 000 landmark Nyström approximation for 463,716 training points. Ridge regression using the approximate kernel then requires 208 sec. for a total of 515 sec. These runtime are comparable to those of the very fast random Fourier features method, which underperforms RLS-Nyström in terms of regression and classification accuracy. Acknowledgements We would like to thank Michael Mahoney for bringing the potential of ridge leverage scores to our attention and suggesting their possible approximation via iterative sampling schemes. We would also like to thank Michael Cohen for pointing out (and fixing) an error in our original manuscript and generally for his close collaboration in our work on leverage score sampling algorithms. Finally, thanks to Haim Avron for pointing our an error in our original analysis. 9 References [AM15] Ahmed Alaoui and Michael W Mahoney. Fast randomized kernel ridge regression with statistical guarantees. In Advances in Neural Information Processing Systems 28 (NIPS), pages 775–783, 2015. [AMS01] Dimitris Achlioptas, Frank Mcsherry, and Bernhard Schölkopf. Sampling techniques for kernel methods. In Advances in Neural Information Processing Systems 14 (NIPS), 2001. [ANW14] Haim Avron, Huy Nguyen, and David Woodruff. Subspace embeddings for the polynomial kernel. In Advances in Neural Information Processing Systems 27 (NIPS), pages 2258–2266, 2014. [Bac13] Francis Bach. Sharp analysis of low-rank kernel matrix approximations. In Proceedings of the 26th Annual Conference on Computational Learning Theory (COLT), 2013. [BBV06] Maria-Florina Balcan, Avrim Blum, and Santosh Vempala. Kernels as features: On kernels, margins, and low-dimensional mappings. Machine Learning, 65(1):79–94, 2006. [BJ02] Francis Bach and Michael I. Jordan. Kernel independent component analysis. Journal of Machine Learning Research, 3(Jul):1–48, 2002. [BMD09] Christos Boutsidis, Michael W. Mahoney, and Petros Drineas. Unsupervised feature selection for the k-means clustering problem. In Advances in Neural Information Processing Systems 22 (NIPS), pages 153–161, 2009. [BW09] Mohamed-Ali Belabbas and Patrick J. Wolfe. Spectral methods in machine learning: New strategies for very large datasets. Proceedings of the National Academy of Sciences of the USA, 106:369–374, 2009. [BWZ16] Christos Boutsidis, David P. Woodruff, and Peilin Zhong. Optimal principal component analysis in distributed and streaming models. In Proceedings of the 48th Annual ACM Symposium on Theory of Computing (STOC), 2016. [CEM+15] Michael B. Cohen, Sam Elder, Cameron Musco, Christopher Musco, and Madalina Persu. Dimensionality reduction for k-means clustering and low rank approximation. In Proceedings of the 47th Annual ACM Symposium on Theory of Computing (STOC), pages 163–172, 2015. [CLL+15] Shouyuan Chen, Yang Liu, Michael Lyu, Irwin King, and Shengyu Zhang. Fast relative-error approximation algorithm for ridge regression. In Proceedings of the 31st Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 201–210, 2015. [CLM+15] Michael B. Cohen, Yin Tat Lee, Cameron Musco, Christopher Musco, Richard Peng, and Aaron Sidford. Uniform sampling for matrix approximation. In Proceedings of the 6th Conference on Innovations in Theoretical Computer Science (ITCS), pages 181–190, 2015. [CLV16] Daniele Calandriello, Alessandro Lazaric, and Michal Valko. Analysis of Nyström method with sequential ridge leverage score sampling. In Proceedings of the 32nd Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 62–71, 2016. [CLV17] Daniele Calandriello, Alessandro Lazaric, and Michal Valko. Distributed adaptive sampling for kernel matrix approximation. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. [CMM17] Michael B. Cohen, Cameron Musco, and Christopher Musco. Input sparsity time low-rank approximation via ridge leverage score sampling. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1758–1777, 2017. 10 [CMT10] Corinna Cortes, Mehryar Mohri, and Ameet Talwalkar. On the impact of kernel approximation on learning accuracy. In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 113–120, 2010. [CW17] Kenneth L. Clarkson and David P. Woodruff. Low-rank PSD approximation in inputsparsity time. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2061–2072, 2017. [DM05] Petros Drineas and Michael W Mahoney. On the Nyström method for approximating a Gram matrix for improved kernel-based learning. Journal of Machine Learning Research, 6:2153–2175, 2005. [DMIMW12] Petros Drineas, Malik Magdon-Ismail, Michael W. Mahoney, and David P. Woodruff. Fast approximation of matrix coherence and statistical leverage. Journal of Machine Learning Research, 13:3475–3506, 2012. [DMM08] Petros Drineas, Michael W Mahoney, and S Muthukrishnan. Relative-error CUR matrix decompositions. SIAM Journal on Matrix Analysis and Applications, 30(2):844– 881, 2008. [DST03] Vin De Silva and Joshua B Tenenbaum. Global versus local methods in nonlinear dimensionality reduction. In Advances in Neural Information Processing Systems 16 (NIPS), pages 721–728, 2003. [FS02] Shai Fine and Katya Scheinberg. Efficient SVM training using low-rank kernel representations. Journal of Machine Learning Research, 2:243–264, 2002. [FSS13] Dan Feldman, Melanie Schmidt, and Christian Sohler. Turning big data into tiny data: Constant-size coresets for k-means, PCA, and projective clustering. In Proceedings of the 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1434–1453, 2013. [Git11] Alex Gittens. The spectral norm error of the naive Nyström extension. arXiv:1110.5305, 2011. [GM13] Alex Gittens and Michael Mahoney. Revisiting the Nyström method for improved large-scale machine learning. In Proceedings of the 30th International Conference on Machine Learning (ICML), pages 567–575, 2013. Full version at arXiv:1303.1849. [HFH+09] Mark Hall, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer, Peter Reutemann, and Ian H Witten. The WEKA data mining software: an update. ACM SIGKDD Explorations Newsletter, 11(1):10–18, 2009. [HKZ14] Daniel Hsu, Sham M. Kakade, and Tong Zhang. Random design analysis of ridge regression. Foundations of Computational Mathematics, 14(3):569–600, 2014. [HTF02] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The elements of statistical learning: data mining, inference and prediction. Springer, 2nd edition, 2002. [IBM14] IBM Reseach Division, Skylark Team. Libskylark: Sketching-based Distributed Matrix Computations for Machine Learning. IBM Corporation, Armonk, NY, 2014. [KMT12] Sanjiv Kumar, Mehryar Mohri, and Ameet Talwalkar. Sampling methods for the Nyström method. Journal of Machine Learning Research, 13:981–1006, 2012. [LBKL15] Mu Li, Wei Bi, James T Kwok, and Bao-Liang Lu. Large-scale Nyström kernel matrix approximation using randomized SVD. IEEE Transactions on Neural Networks and Learning Systems, 26(1):152–164, 2015. [Lic13] M. Lichman. UCI machine learning repository, 2013. [LJS16] Chengtao Li, Stefanie Jegelka, and Suvrit Sra. Fast DPP sampling for Nyström with application to kernel methods. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016. 11 [LSS13] Quoc Le, Tamás Sarlós, and Alexander Smola. Fastfood - Computing Hilbert space expansions in loglinear time. In Proceedings of the 30th International Conference on Machine Learning (ICML), pages 244–252, 2013. [MU17] Michael Mitzenmacher and Eli Upfal. Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis. Cambridge university press, 2017. [PD16] Saurabh Paul and Petros Drineas. Feature selection for ridge regression with provable guarantees. Neural Computation, 28(4):716–742, 2016. [Pla05] John Platt. FastMap, MetricMap, and Landmark MDS are all Nyström algorithms. In Proceedings of the 8th International Conference on Artificial Intelligence and Statistics (AISTATS), 2005. [PVG+11] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [RCR15] Alessandro Rudi, Raffaello Camoriano, and Lorenzo Rosasco. Less is more: Nyström computational regularization. In Advances in Neural Information Processing Systems 28 (NIPS), pages 1648–1656, 2015. [RR07] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems 20 (NIPS), pages 1177–1184, 2007. [RR09] Ali Rahimi and Benjamin Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in Neural Information Processing Systems 22 (NIPS), pages 1313–1320, 2009. [SS00] Alex J Smola and Bernhard Schökopf. Sparse greedy matrix approximation for machine learning. In Proceedings of the 17th International Conference on Machine Learning (ICML), pages 911–918, 2000. [SS02] Bernhard Schölkopf and Alexander J Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2002. [SSM99] Bernhard Schölkopf, Alexander J. Smola, and Klaus-Robert Müller. Advances in kernel methods. chapter Kernel principal component analysis, pages 327–352. MIT Press, 1999. [Tro15] Joel A. Tropp. An introduction to matrix concentration inequalities. Foundations and Trends in Machine Learning, 8(1-2):1–230, 2015. [TRVR16] Stephen Tu, Rebecca Roelofs, Shivaram Venkataraman, and Benjamin Recht. Large scale kernel learning using block coordinate descent. arXiv:1602.05310, 2016. [UKM06] Andrew V Uzilov, Joshua M Keegan, and David H Mathews. Detection of non-coding RNAs on the basis of predicted secondary structure formation free energy change. BMC bioinformatics, 7(1):173, 2006. [Wan16] Weiran Wang. On column selection in approximate kernel canonical correlation analysis. arXiv:1602.02172, 2016. [Woo14] David P. Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10(1-2):1–157, 2014. [WS01] Christopher Williams and Matthias Seeger. Using the Nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems 14 (NIPS), pages 682–688, 2001. 12 [WZ13] Shusen Wang and Zhihua Zhang. Improving CUR matrix decomposition and the Nyström approximation via adaptive sampling. Journal of Machine Learning Research, 14:2729–2769, 2013. [YLM+12] Tianbao Yang, Yu-feng Li, Mehrdad Mahdavi, Rong Jin, and Zhi-Hua Zhou. Nyström method vs random Fourier features: A theoretical and empirical comparison. In Advances in Neural Information Processing Systems 25 (NIPS), pages 476–484, 2012. [YPW15] Yun Yang, Mert Pilanci, and Martin J Wainwright. Randomized sketches for kernels: Fast and optimal non-parametric regression. Annals of Statistics, 2015. [YZ13] Martin Wainwright Yuchen Zhang, John Duchi. Divide and conquer kernel ridge regression. Proceedings of the 26th Annual Conference on Computational Learning Theory (COLT), 2013. [Zha06] Tong Zhang. Learning bounds for kernel regression using effective data dimensionality. Learning, 17(9), 2006. [ZTK08] Kai Zhang, Ivor W. Tsang, and James T. Kwok. Improved Nyström low-rank approximation and error analysis. In Proceedings of the 25th International Conference on Machine Learning (ICML), pages 1232–1239, 2008. 13 | 2017 | 422 |
6,922 | Early stopping for kernel boosting algorithms: A general analysis with localized complexities Yuting Wei1 Fanny Yang2∗ Martin J. Wainwright1,2 Department of Statistics1 Department of Electrical Engineering and Computer Sciences2 UC Berkeley Berkeley, CA 94720 {ytwei, fanny-yang, wainwrig}@berkeley.edu Abstract Early stopping of iterative algorithms is a widely-used form of regularization in statistics, commonly used in conjunction with boosting and related gradienttype algorithms. Although consistency results have been established in some settings, such estimators are less well-understood than their analogues based on penalized regularization. In this paper, for a relatively broad class of loss functions and boosting algorithms (including L2-boost, LogitBoost and AdaBoost, among others), we exhibit a direct connection between the performance of a stopped iterate and the localized Gaussian complexity of the associated function class. This connection allows us to show that local fixed point analysis of Gaussian or Rademacher complexities, now standard in the analysis of penalized estimators, can be used to derive optimal stopping rules. We derive such stopping rules in detail for various kernel classes, and illustrate the correspondence of our theory with practice for Sobolev kernel classes. 1 Introduction While non-parametric models offer great flexibility, they can also lead to overfitting, and thus poor generalization performance. For this reason, procedures for fitting non-parametric models must involve some form of regularization, most commonly done by adding some type of penalty to the objective function. An alternative form of regularization is based on the principle of early stopping, in which an iterative algorithm is terminated after a pre-specified number of steps prior to convergence. While the idea of early stopping is fairly old (e.g., [31, 1, 35]), recent years have witnessed renewed interests in its properties, especially in the context of boosting algorithms and neural network training (e.g., [25, 12]). Over the past decade, a line of work has yielded some theoretical insight into early stopping, including works on classification error for boosting algorithms [3, 13, 18, 23, 39, 40], L2-boosting algorithms for regression [8, 7], and similar gradient algorithms in reproducing kernel Hilbert spaces (e.g. [11, 10, 34, 39, 26]). A number of these papers establish consistency results for particular forms of early stopping, guaranteeing that the procedure outputs a function with statistical error that converges to zero as the sample size increases. On the other hand, there are relatively few results that actually establish rate optimality of an early stopping procedure, meaning that the achieved error matches known statistical minimax lower bounds. To the best of our knowledge, Bühlmann and Yu [8] were the first to prove optimality for early stopping of L2-boosting as applied ∗Yuting Wei and Fanny Yang contributed equally to this work. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. to spline classes, albeit with a rule that was not computable from the data. Subsequent work by Raskutti et al. [26] refined this analysis of L2-boosting for kernel classes and first established an important connection to the localized Rademacher complexity; see also the related work [39, 27, 9] with rates for particular kernel classes. More broadly, relative to our rich and detailed understanding of regularization via penalization (e.g., see the books [17, 33, 32, 37] and papers [2, 20] for details), the theory for early stopping regularization is still not as well developed. In particular, for penalized estimators, it is now wellunderstood that complexity measures such as the localized Gaussian width, or its Rademacher analogue, can be used to characterize their achievable rates [2, 20, 32, 37]. Is such a general and sharp characterization also possible in the context of early stopping? The main contribution of this paper is to answer this question in the affirmative for boosting algorithms in regression and classification problems involving functions in reproducing kernel Hilbert spaces (RKHS). The remainder of this paper is organized as follows. In Section 2, we provide background on boosting methods and reproducing kernel Hilbert spaces, and then introduce the updates studied in this paper. Section 3 is devoted to statements of our main results, followed by a discussion of their consequences for particular function classes in Section 4. We provide simulations that confirm the practical effectiveness of our stopping rules and show close agreement with our theoretical predictions. The proofs for all of our results can be found in the supplemental material. 2 Background and problem formulation The goal of prediction is to learn a function that maps covariates x ∈X to responses y ∈Y. In a regression problem, the responses are typically real-valued, whereas in a classification problem, the responses take values in a finite set. In this paper, we study both regression (Y = R) and classification problems (e.g., Y = {−1, +1} in the binary case) where we observe a collection of n pairs of the form {(xi, Yi)}n i=1, with fixed covariates xi ∈X and corresponding random responses Yi ∈Y drawn independently from a distribution PY |xi. In this section, we provide some necessary background on a gradient-type algorithm which is often referred to as boosting algorithm. 2.1 Boosting and early stopping Consider a cost function φ : R × R →[0, ∞), where the non-negative scalar φ(y, θ) denotes the cost associated with predicting θ when the true response is y. Some common examples of loss functions φ that we consider in later sections include: • the least-squares loss φ(y, θ) : = 1 2(y −θ)2 that underlies L2-boosting [8], • the logistic regression loss φ(y, θ) = ln(1 + e−yθ) that underlies the LogitBoost algorithm [14, 15], and • the exponential loss φ(y, θ) = exp(−yθ) that underlies the AdaBoost algorithm [13]. The least-squares loss is typically used for regression problems (e.g., [8, 11, 10, 34, 39, 26]), whereas the latter two losses are frequently used in the setting of binary classification (e.g., [13, 23, 15]). Given some loss function φ and function space F, we define the population cost functional f 7→L(f) and the corresponding optimal (minimizing) function† via L(f) : = EY n 1 h 1 n n X i=1 φ Yi, f(xi) i , f ∗: = arg min f∈F L(f). (1) Note that with the covariates {xi}n i=1 fixed, the functional L is a non-random object. As a standard example, when we adopt the least-squares loss φ(y, θ) = 1 2(y −θ)2, the population minimizer f ∗corresponds to the conditional expectation x 7→E[Y |x]. Since we do not have access to the population distribution of the responses however, the computation of f ∗is impossible. Given our samples {Yi}n i=1, we consider instead some procedure applied to the empirical loss Ln(f) : = 1 n n X i=1 φ(Yi, f(xi)), (2) †As clarified in the sequel, our assumptions guarantee uniqueness of f ∗. where the population expectation has been replaced by an empirical expectation. For example, when Ln corresponds to the log likelihood of the samples with φ(Yi, f(xi)) = log[P(Yi; f(xi))], direct unconstrained minimization of Ln would yield the maximum likelihood estimator. It is well-known that direct minimization of Ln over a rich function class F may lead to overfitting. A classical method to mitigate this phenomenon is to minimize the sum of the empirical loss with a penalty term. Adjusting the weight on the regularization term allows for trade-off between fit to the data, and some form of regularity or smoothness of the fit. The behavior of such penalized estimation methods is quite well understood (see e.g. the books [17, 33, 32, 37] and papers [2, 20] for details). In this paper, we study a form of algorithmic regularization, based on applying a gradient-type algorithm to Ln. In particular, we consider boosting algorithms (see survey paper [7]) which involve “boosting” or improve the fit of a function via a sequence of additive updates (see e.g. [28, 13, 6, 5, 29]) and can be understood as forms of functional gradient methods [23, 15]. Instead of running until convergence, we then stop it “early”—that is, after some fixed number of steps. The way in which the number of steps is chosen is referred to as a stopping rule, and the overall procedure is referred to as early stopping of a boosting algorithm. 0 50 100 150 200 250 Iteration 0.04 0.06 0.08 0.10 0.12 Squared error |ft f * |2 n Early stopping for LogitBoost: MSE vs iteration 0 50 100 150 200 250 Iteration 0.1 0.2 0.3 0.4 0.5 Squared error |ft f * |2 n Minimum error Early stopping for AdaBoost: MSE vs iteration (a) (b) Figure 1: Plots of the squared error ∥f t −f ∗∥2 n = 1 n Pn i=1(f t(xi) −f ∗(xi))2 versus the iteration number t for (a) LogitBoost using a first-order Sobolev kernel (b) AdaBoost using the same first-order Sobolev kernel K(x, x′) = 1 + min(x, x′) which generates a class of Lipschitz functions (splines of order one). Both plots correspond to a sample size n = 100. In more detail, a broad class of boosting algorithms [23] generate a sequence {f t}∞ t=0 via updates of the form f t+1 = f t −αtgt with gt ∝arg max ∥d∥F≤1 ⟨∇Ln(f t), d(xn 1)⟩, (3) where the scalar {αt}∞ t=0 is a sequence of step sizes chosen by the user, the constraint ∥d∥F ≤1 defines the unit ball in a given function class F, ∇Ln(f) ∈Rn denotes the gradient taken at the vector f(x1), . . . , f(xn)), and ⟨h, g⟩is the usual inner product between vectors h, g ∈Rn. For non-decaying step sizes and a convex objective Ln, running this procedure for an infinite number of iterations will lead to a minimizer of the empirical loss, thus causing overfitting. In order to illustrate this phenomenon, Figure 1 provides plots of the squared error ∥f t −f ∗∥2 n : = 1 n Pn i=1 f t(xi) −f ∗(xi) 2 versus the iteration number, for LogitBoost in panel (a) and AdaBoost in panel (b). (See Section 4.2 for more details on how these experiments were set up.) In these plots, the dotted line indicates the minimum mean-squared error ρ2 n over all iterates of that particular run of the algorithm. Both plots are qualitatively similar, illustrating the existence of a “good” number of iterations to take, after which the MSE greatly increases. Hence a natural problem is to decide at what iteration T to stop such that the iterate f T satisfies bounds of the form L(f T ) −L(f ∗) ≾ρ2 n and ∥f T −f ∗∥2 n ≾ρ2 n (4) with high probability. The main results of this paper provide a stopping rule T for which bounds of the form (4) do in fact hold with high probability over the randomness in the observed responses. Moreover, as shown by our later results, under suitable regularity conditions, the expectation of the minimum squared error ρ2 n is proportional to the statistical minimax risk inf b f supf∈F E[L( bf) −L(f)], where the infimum is taken over all possible estimators bf. Coupled with our stopping time guarantee (4) this implies that our estimate achieves the minimax risk up to constant factors. As a result, our bounds are unimprovable in general (see Corollary 1). 2.2 Reproducing Kernel Hilbert Spaces The analysis of this paper focuses on algorithms with the update (3) when the function class F is a reproducing kernel Hilbert space H (RKHS, see standard sources [36, 16, 30, 4]), consisting of functions mapping a domain X to the real line R. Any RKHS is defined by a bivariate symmetric kernel function K : X × X →R which is required to be positive semidefinite, i.e. for any integer N ≥1 and a collection of points {xj}N j=1 in X, the matrix [K(xi, xj)]ij ∈RN×N is positive semidefinite. The associated RKHS is the closure of linear span of the form f(·) = P j≥1 ωjK(·, xj), where {xj}∞ j=1 is some collection of points in X, and {ωj}∞ j=1 is a real-valued sequence. For two functions f1, f2 ∈H which can be expressed as a finite sum f1(·) = Pℓ1 i=1 αiK(·, xi) and f2(·) = Pℓ2 j=1 βjK(·, xj), the inner product is defined as ⟨f1, f2⟩H = Pℓ1 i=1 Pℓ2 j=1 αiβjK(xi, xj) with induced norm ∥f1∥2 H = Pℓ1 i=1 α2 i K(xi, xi). For each x ∈X, the function K(·, x) belongs to H , and satisfies the reproducing relation ⟨f, K(·, x)⟩H = f(x) for all f ∈H . Throughout this paper, we assume that the kernel function is uniformly bounded, meaning that there is a constant L such that supx∈X K(x, x) ≤L. Such a boundedness condition holds for many kernels used in practice, including the Gaussian, Laplacian, Sobolev, other types of spline kernels, as well as any trace class kernel with trignometric eigenfunctions. By rescaling the kernel as necessary, we may assume without loss of generality that L = 1. As a consequence, for any function f such that ∥f∥H ≤r, we have by the reproducing relation that ∥f∥∞= sup x ⟨f, K(·, x)⟩H ≤∥f∥H sup x ∥K(·, x)∥H ≤r. Given samples {(xi, yi)}n i=1, by the representer theorem [19], it is sufficient to restrict ourselves to the linear subspace Hn = span{K(·, xi)}n i=1, for which all f ∈Hn can be expressed as f = 1 √n n X i=1 ωiK(·, xi) (5) for some coefficient vector ω ∈Rn. Among those functions which achieve the infimum in expression (1), let us define f ∗as the one with the minimum Hilbert norm. This definition is equivalent to restricting f ∗to be in the linear subspace Hn. 2.3 Boosting in kernel spaces For a finite number of covariates xi from i = 1 . . . n, let us define the normalized kernel matrix K ∈Rn×n with entries Kij = K(xi, xj)/n. Since we can restrict the minimization of Ln and L from H to the subspace Hn w.l.o.g., using expression (5) we can then write the function value vectors f(xn 1) : = (f(x1), . . . , f(xn)) as f(xn 1) = √nKω. As there is a one-to-one correspondence between the n-dimensional vectors f(xn 1) ∈Rn and the corresponding function f ∈Hn in H by the representer theorem, minimization of an empirical loss in the subspace Hn essentially becomes the n-dimensional problem of fitting a response vector y over the set range(K). In the sequel, all updates will thus be performed on the function value vectors f(xn 1). With a change of variable d(xn 1) = √n √ Kz we then have dt(xn 1) : = arg max ∥d∥H ≤1 ⟨∇Ln(f t), d(xn 1)⟩= √nK∇Ln(f t) √ ∇Ln(f t)K∇Ln(f t), where the maximum is taken over vectors d ∈range(K). In this paper we study gt = ⟨∇Ln(f t), dt(xn 1)⟩dt in the boosting update (3), so that the function value iterates take the form f t+1(xn 1) = f t(xn 1) −αnK∇Ln(f t), (6) where α > 0 is a constant stepsize choice. Choosing f 0(xn 1) = 0 ensures that all iterates f t(xn 1) remain in the range space of K. Our goal is to propose a stopping time T such that the averaged function bf = 1 T PT t=1 f t satisfies bounds of the type (4). Importantly, we exhibit such bounds with a statistical error term δn that is specified by the localized Gaussian complexity of the kernel class. 3 Main results We now turn to the statement of our main results, beginning with the introduction of some regularity assumptions. 3.1 Assumptions Recall from our earlier set-up that we differentiate between the empirical loss function Ln in expression (2), and the population loss L in expression (1). Apart from assuming differentiability of both functions, all of our remaining conditions are imposed on the population loss. Such conditions at the population level are weaker than their analogues at the empirical level. For a given radius r > 0, let us define the Hilbert ball around the optimal function f ∗as BH (f ∗, r) : = {f ∈H | ∥f −f ∗∥H ≤r}. (7) Our analysis makes particular use of this ball defined for the radius C2 H : = 2 max{∥f ∗∥2 H , 32, σ2}, where σ is the effective noise level defined as σ : = ( min n t | max i=1,...,n E[e((Yi−f ∗(xi))2/t2)] < ∞ o for least squares 4 (2M + 1)(1 + 2CH ) for φ′-bounded losses. (8) We assume that the population loss is m-strongly convex and M-smooth over BH (f ∗, 2CH ), meaning that the sandwich inequality m-M-condition m 2 ∥f −g∥2 n ≤L(f) −L(g) −⟨∇L(g), f(xn 1) −g(xn 1)⟩≤M 2 ∥f −g∥2 n holds for all f, g ∈BH (f ∗, 2CH ). On top of that we assume φ to be M-Lipschitz in the second argument. To be clear, here ∇L(g) denotes the vector in Rn obtained by taking the gradient of L with respect to the vector g(xn 1). It can be verified by a straightforward computation that when L is induced by the least-squares cost φ(y, θ) = 1 2(y −θ)2, the m-M-condition holds for m = M = 1. The logistic and exponential loss satisfy this condition (see supp. material), where it is key that we have imposed the condition only locally on the ball BH (f ∗, 2CH ). In addition to the least-squares cost, our theory also applies to losses L induced by scalar functions φ that satisfy the following condition: φ′-boundedness max i=1,...,n ∂φ(y, θ) ∂θ θ=f(xi) ≤B for all f ∈BH (f ∗, 2CH ) and y ∈Y. This condition holds with B = 1 for the logistic loss for all Y, and B = exp(2.5CH ) for the exponential loss for binary classification with Y = {−1, 1}, using our kernel boundedness condition. Note that whenever this condition holds with some finite B, we can always rescale the scalar loss φ by 1/B so that it holds with B = 1, and we do so in order to simplify the statement of our results. 3.2 Upper bound in terms of localized Gaussian width Our upper bounds involve a complexity measure known as the localized Gaussian width. In general, Gaussian widths are widely used to obtain risk bounds for least-squares and other types of Mestimators. In our case, we consider Gaussian complexities for “localized” sets of the form En(δ, 1) : = n f −g | f, g ∈H , ∥f −g∥H ≤1, ∥f −g∥n ≤δ o . (9) The Gaussian complexity localized at scale δ is given by Gn En(δ, 1) : = E h sup g∈En(δ,1) 1 n n X i=1 wig(xi) i , (10) where (w1, . . . , wn) denotes an i.i.d. sequence of standard Gaussian variables. An essential quantity in our theory is specified by a certain fixed point equation that is now standard in empirical process theory [32, 2, 20, 26]. The critical radius δn is the smallest positive scalar such that Gn(En(δ, 1)) δ ≤δ σ . (11) We note that past work on localized Rademacher and Gaussian complexity [24, 2] guarantee that there exists a unique δn > 0 that satisfies this condition, so that our definition is sensible. 3.2.1 Upper bounds on excess risk and empirical L2(Pn)-error With this set-up, we are now equipped to state our main theorem. It provides high-probability bounds on the excess risk and L2(Pn)-error of the estimator ¯f T : = 1 T PT t=1 f t defined by averaging the T iterates of the algorithm. Theorem 1. Consider any loss function satisfying the m-M-condition and the φ′-boundedness condition (if not least squares), for which we generate function iterates {f t}∞ t=0 of the form (6) with step size α ∈(0, min{ 1 M , M}], initialized at f 0 = 0. Then, if n is large enough such that δn ≤M m , for all iterations T = 0, 1, . . . ⌊ m 8Mδ2n ⌋, the averaged function estimate ¯f T satisfies the bounds L( ¯f T ) −L(f ∗) ≤CM 1 αmT + δ2 n m2 , and (12a) ∥¯f T −f ∗∥2 n ≤C 1 αmT + δ2 n m2 , (12b) where both inequalities hold with probability at least 1 −c1 exp(−C2 m2nδ2 n σ2 ). In our statements, constants of the form cj are universal, whereas capital Cj may depend on parameters of the joint distribution and population loss L. In the previous theorem, C2 = { m2 σ2 , 1} and C depends on the squared radius C2 H : = 2 max{∥f ∗∥2 H , 32, σ2}. In order to gain intuition for the claims in the theorem, note that (disregarding factors depending on (m, M)), for all iterations T ≲1/δ2 n, the first term 1 αmT dominates the second term δ2 n m2 , so that taking further iterations reduces the upper bound on the error until T ∼1/δ2 n, at which point the upper bound on the error is of the order δ2 n. Furthermore, note that similar bounds as in Theorem 1 can be obtained for the expected loss (over the response yi, with the design fixed) by a simple integration argument. Hence if we perform updates with step size α = 1 M , after τ : = m δ2n max{8,M} iterations, the mean squared error is bounded as E∥¯f τ −f ∗∥2 n ≤C′ δ2 n m2 , (13) where we use M ≥m and where C′ is another constant depending on CH . It is worth noting that guarantee (13) matches the best known upper bounds for kernel ridge regression (KRR)—indeed, this must be the case, since a sharp analysis of KRR is based on the same notion of localized Gaussian complexity. Thus, our results establish a strong parallel between the algorithmic regularization of early stopping, and the penalized regularization of kernel ridge regression. Moreover, as discussed in Section 3.3, under suitable regularity conditions on the RKHS, the critical squared radius δ2 n also acts as a lower bound for the expected risk, i.e. our upper bounds are not improvable in general. Compared with the work of Raskutti et al. [26], which also analyzes the kernel boosting iterates of the form (6), our theory more directly analyzes the effective function class that is explored in the boosting process by taking T steps, with the localized Gaussian width (10) appearing more naturally. In addition, our analysis applies to a broader class of loss functions beyond least-squares. In the case of reproducing kernel Hilbert spaces, it is possible to sandwich the localized Gaussian complexity by a function of the eigenvalues of the kernel matrix. Mendelson [24] provides this argument in the case of the localized Rademacher complexity, but similar arguments apply to the localized Gaussian complexity. Letting µ1 ≥µ2 ≥· · · ≥µn ≥0 denote the ordered eigenvalues of the normalized kernel matrix K, define the function R(δ) = 1 √n v u u t n X j=1 min{δ2, µj}. (14) Up to a universal constant, this function is an upper bound on the Gaussian width Gn En(δ, 1) for all δ ≥0, and up to another universal constant, it is also a lower bound for all δ ≥ 1 √n. Note that the critical radius δ2 n only depends on our observations {(xi, yi)}n i=1 through the solution of inequality (11). In many cases, with examples given in Section 4, it is possible to compute or upper bound this critical radius, so that a concrete stopping rule can indeed by calculated in advance. 3.3 Achieving minimax lower bounds We claim that when the noise Y −f(x) is Gaussian, for a broad class of kernels, upper bound (13) matches the known minimax lower bound, thus is unimprovable in general. In particular, Yang et al. [38] define the class of regular kernels, which includes the Gaussian and Sobolev kernels as particular cases. For such kernels, the authors provide a minimax lower bound over the unit ball of the Hilbert space involving δn, which implies that any estimator bf has prediction risk lower bounded as sup ∥f ∗∥H ≤1 E∥bf −f ∗∥2 n ≥cℓδ2 n. (15) Comparing the lower bound (15) with upper bound (13) for our estimator ¯f T stopped after O(1/δ2 n) many steps, it follows that the bounds proven in Theorem 1 are unimprovable apart from constant factors. We summarize our findings in the following corollary: Corollary 1. For the class of regular kernels and any function f ∗with ∥f ∗∥H ≤1, running T : = ⌊ 1 δ2n max{8,M}⌋iterations with step size α = m M and f 0 = 0 yields an estimate ¯f T such that E∥¯f T −f ∗∥2 n ≍inf b f sup ∥f ∗∥H ≤1 E∥bf −f ∗∥2 n, (16) where the infimum is taken over all measurable functions of the input data and the expectation is taken over the randomness of the response variables {Yi}n i=1. On a high level, the statement in Corollary 1 implies that stopping early essentially prevents us from overfitting to the data and automatically finds the optimal balance between low training error (i.e. fitting the data well) and low model complexity (i.e. generalizing well). 4 Consequences for various kernel classes In this section, we apply Theorem 1 to derive some concrete rates for different kernel spaces and then illustrate them with some numerical experiments. It is known that the complexity of a RKHS in association with fixed covariates {xi}n i=1 can be characterized by the decay rate of the eigenvalues {µj}n j=1 of the normalized kernel matrix K. The representation power of a kernel class is directly correlated with the eigen-decay: the faster the decay, the smaller the function class. 4.1 Theoretical predictions as a function of decay In this section, let us consider two broad types of eigen-decay: • γ-exponential decay: For some γ > 0, the kernel matrix eigenvalues satisfy a decay condition of the form µj ≤c1 exp(−c2jγ), where c1, c2 are universal constants. Examples of kernels in this class include the Gaussian kernel, which for the Lebesgue measure satisfies such a bound with γ = 2 (real line) or γ = 1 (compact domain). • β-polynomial decay: For some β > 1/2, the kernel matrix eigenvalues satisfy a decay condition of the form µj ≤c1j−2β, where c1 is a universal constant. Examples of kernels in this class include the kth-order Sobolev spaces for some fixed integer k ≥1 with Lebesgue measure on a bounded domain. We consider Sobolev spaces that consist of functions that have kth-order weak derivatives f (k) being Lebesgue integrable and f(0) = f (1)(0) = · · · = f (k−1)(0) = 0. For such classes, the β-polynomial decay condition holds with β = k. Given eigendecay conditions of these types, it is possible to compute an upper bound on the critical radius δn. In particular, using the fact that the function R from equation (14) is an upper bound on the function Gn E(δ, 1) , we can show that for γ-exponentially decaying kernels, we have δ2 n ≾(log n)1/γ n , whereas for β-polynomial kernels, we have δ2 n ≾n− 2β 2β+1 up to universal constants. Combining with our Theorem 1, we obtain the following result: Corollary 2 (Bounds based on eigendecay). Suppose we apply boosting with stepsize α = m M and initialization f 0 = 0 on the empirical loss function Ln which satisfies the m-M-condition and φ′-boundedness conditions, and is defined on covariate-response pairs {(xi, Yi)}n i=1 with Yi drawn from the distribution PY |xi. Then, the error of the averaged iterate ¯f T satisfies the following upper bounds with high probability, “≲” neglecting dependence on problem parameters such as (m, M): (a) For kernels with γ-exponential eigen-decay with respect to {xi}n i=1: ∥¯f T −f ∗∥2 n ≲ log1/γ n n when stopped after T ≍ n log1/γ n steps. (b) For kernels with β-polynomial eigen-decay with respect to {xi}n i=1: ∥¯f T −f ∗∥2 n ≲n−2β/(2β+1), when stopped after T ≍n2β/(2β+1) steps. In particular, these bounds hold for LogitBoost and AdaBoost. To the best of our knowledge, this result is the first to show non-asymptotic and optimal statistical rates for the ∥· ∥2 n-error when using early stopping LogitBoost or AdaBoost with an explicit dependence of the stopping rule on n. Our results also yield similar guarantees for L2-boosting, as has been established in past work [26]. Note that we can observe a similar trade-off between computational efficiency and statistical accuracy as in the case of kernel least-squares regression [39, 26]: although larger kernel classes (e.g. Sobolev classes) yield higher estimation errors, boosting updates reach the optimum faster than for a smaller kernel class (e.g. Gaussian kernels). 4.2 Numerical experiments We now describe some numerical experiments that provide illustrative confirmations of our theoretical predictions using the first-order Sobolev kernel as a typical example for kernel classes with polynomial eigen-decay. In particular, we consider the first-order Sobolev space of Lipschitz functions on the unit interval [0, 1], defined by the kernel K(x, x′) = 1 + min(x, x′), and with the design points {xi}n i=1 set equidistantly over [0, 1]. Note that the equidistant design yields β-polynomial decay of the eigenvalues of K with β = 1 so that δ2 n ≍n−2/3. Accordingly, our theory predicts that the stopping time T = (cn)2/3 should lead to an estimate ¯f T such that ∥¯f T −f ∗∥2 n ≾n−2/3. In our experiments for L2-Boost, we sampled Yi according to Yi = f ∗(xi)+wi with wi ∼N(0, 0.5), which corresponds to the probability distribution P(Y | xi) = N(f ∗(xi); 0.5), where f ∗(x) = |x −1 2| −1 4 is defined on the unit interval [0, 1]. By construction, the function f ∗belongs to the first-order Sobolev space with ∥f ∗∥H = 1. For LogitBoost, we sampled Yi according to Bern(p(xi)) where p(x) = exp(f ∗(x)) 1+exp(f ∗(x)) with the same f ∗. We chose f 0 = 0 in all cases, and ran the updates (6) for L2-Boost and LogitBoost with the constant step size α = 0.75. We compared various stopping rules to the oracle gold standard G, which chooses the stopping time G = arg mint≥1 ∥f t −f ∗∥2 n that yields the minimum prediction error among all iterates {f t}. Although this procedure is unimplementable in practice, but it serves as a convenient lower bound with which to compare. Figure 2 shows plots of the mean-squared error ∥¯f T −f ∗∥2 n over the sample size n averaged over 40 trials, for the gold standard T = G and stopping rules based on T = (7n)κ for different choices of κ. Error bars correspond to the standard errors computed from our simulations. Panel (a) shows the behavior for L2-boosting, whereas panel (b) shows the behavior for LogitBoost. Note that both plots are qualitatively similar and that the theoretically derived stopping rule T = (7n)κ with κ∗= 2/3 = 0.67, while slightly worse than the Gold standard, tracks its performance closely. 200 400 600 800 1000 Sample size n 0.000 0.005 0.010 0.015 0.020 0.025 Mean squared error |fT f * |2 n Good versus bad rules: L2-Boost Oracle Stop at = 1.00 Stop at = 0.67 Stop at = 0.33 26 27 28 29 210 Sample size n 10 2 Mean squared error |fT f * |2 n Good versus bad rules: L2-Boost Oracle Stop at = 1.00 Stop at = 0.67 Stop at = 0.33 (a) (b) Figure 2: The mean-squared errors for the stopped iterates ¯f T at the Gold standard, i.e. iterate with the minimum error among all unstopped updates (blue) and at T = (7n)κ (with the theoretically optimal κ = 0.67 in red, κ = 0.33 in black and κ = 1 in green) for (a) L2-Boost and (b) LogitBoost. We also performed simulations for some “bad” stopping rules, in particular for an exponent κ not equal to κ∗= 2/3, indicated by the green and black curves. In the log scale plots in Figure 3 we can clearly see that for κ ∈{0.33, 1} the performance is indeed much worse, with the difference in slope even suggesting a different scaling of the error with the number of observations n. Recalling our discussion for Figure 1, this phenomenon likely occurs due to underfitting and overfitting effects. 200 400 600 800 1000 Sample size n 0.005 0.010 0.015 0.020 0.025 0.030 Mean squared error |fT f * |2 n Good versus bad rules: LogitBoost Oracle Stop at = 1.00 Stop at = 0.67 Stop at = 0.33 26 27 28 29 210 Sample size n 10 2 Mean squared error |fT f * |2 n Good versus bad rules: LogitBoost Oracle Stop at = 1.00 Stop at = 0.67 Stop at = 0.33 (a) (b) Figure 3: Logarithmic plots of the mean-squared errors at the Gold standard in blue and at T = (7n)κ (with the theoretically optimal rule for κ = 0.67 in red, κ = 0.33 in black and κ = 1 in green) for (a) L2-Boost and (b) LogitBoost. 5 Discussion In this paper, we have proven non-asymptotic bounds for early stopping of kernel boosting for a relatively broad class of loss functions. These bounds allowed us to propose simple stopping rules which, for the class of regular kernel functions [38], yield minimax optimal rates of estimation. Although the connection between early stopping and regularization has long been studied and explored in the literature, to the best of our knowledge, this paper is the first one to establish a general relationship between the statistical optimality of stopped iterates and the localized Gaussian complexity, a quantity well-understood to play a central role in controlling the behavior of regularized estimators based on penalization [32, 2, 20, 37]. There are various open questions suggested by our results. Can fast approximation techniques for kernels be used to approximately compute optimal stopping rules without having to calculate all eigenvalues of the kernel matrix? Furthermore, we suspect that similar guarantees can be shown for the stopped estimator f T which we observed to behave similarly to the averaged estimator ¯f T in our simulations. It would be of interest to establish results on f T directly. Acknowledgements This work was partially supported by DOD Advanced Research Projects Agency W911NF-16-10552, National Science Foundation grant NSF-DMS-1612948, and Office of Naval Research Grant DOD-ONR-N00014. References [1] R. S. Anderssen and P. M. Prenter. A formal comparison of methods proposed for the numerical solution of first kind integral equations. Jour. Australian Math. Soc. (Ser. B), 22:488–500, 1981. [2] P. L. Bartlett, O. Bousquet, and S. Mendelson. Local Rademacher complexities. Annals of Statistics, 33(4):1497–1537, 2005. [3] P. L. Bartlett and M. Traskin. Adaboost is consistent. Journal of Machine Learning Research, 8(Oct):2347– 2368, 2007. [4] A. Berlinet and C. Thomas-Agnan. Reproducing kernel Hilbert spaces in probability and statistics. Kluwer Academic, Norwell, MA, 2004. [5] L. Breiman. Prediction games and arcing algorithms. Neural computation, 11(7):1493–1517, 1999. [6] L. Breiman et al. Arcing classifier (with discussion and a rejoinder by the author). Annals of Statistics, 26(3):801–849, 1998. [7] P. Bühlmann and T. Hothorn. Boosting algorithms: Regularization, prediction and model fitting. Statistical Science, pages 477–505, 2007. [8] P. Bühlmann and B. Yu. Boosting with L2 loss: Regression and classification. Journal of American Statistical Association, 98:324–340, 2003. [9] R. Camoriano, T. Angles, A. Rudi, and L. Rosasco. Nytro: When subsampling meets early stopping. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, pages 1403–1411, 2016. [10] A. Caponetto and Y. Yao. Adaptation for regularization operators in learning theory. Technical Report CBCL Paper #265/AI Technical Report #063, Massachusetts Institute of Technology, September 2006. [11] A. Caponneto. Optimal rates for regularization operators in learning theory. Technical Report CBCL Paper #264/AI Technical Report #062, Massachusetts Institute of Technology, September 2006. [12] R. Caruana, S. Lawrence, and C. L. Giles. Overfitting in neural nets: Backpropagation, conjugate gradient, and early stopping. In Advances in Neural Information Processing Systems, pages 402–408, 2001. [13] Y. Freund and R. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119–139, 1997. [14] J. Friedman, T. Hastie, R. Tibshirani, et al. Additive logistic regression: a statistical view of boosting (with discussion and a rejoinder by the authors). Annals of statistics, 28(2):337–407, 2000. [15] J. H. Friedman. Greedy function approximation: a gradient boosting machine. Annals of Statistics, 29:1189–1232, 2001. [16] C. Gu. Smoothing spline ANOVA models. Springer Series in Statistics. Springer, New York, NY, 2002. [17] L. Gyorfi, M. Kohler, A. Krzyzak, and H. Walk. A Distribution-Free Theory of Nonparametric Regression. Springer Series in Statistics. Springer, 2002. [18] W. Jiang. Process consistency for adaboost. Annals of Statistics, 21:13–29, 2004. [19] G. Kimeldorf and G. Wahba. Some results on Tchebycheffian spline functions. Jour. Math. Anal. Appl., 33:82–95, 1971. [20] V. Koltchinskii. Local Rademacher complexities and oracle inequalities in risk minimization. Annals of Statistics, 34(6):2593–2656, 2006. [21] M. Ledoux. The Concentration of Measure Phenomenon. Mathematical Surveys and Monographs. American Mathematical Society, Providence, RI, 2001. [22] M. Ledoux and M. Talagrand. Probability in Banach Spaces: Isoperimetry and Processes. Springer-Verlag, New York, NY, 1991. [23] L. Mason, J. Baxter, P. L. Bartlett, and M. R. Frean. Boosting algorithms as gradient descent. In Advances in Neural Information Processing Systems 12, pages 512–518, 1999. [24] S. Mendelson. Geometric parameters of kernel machines. In Proceedings of the Conference on Learning Theory (COLT), pages 29–43, 2002. [25] L. Prechelt. Early stopping-but when? In Neural Networks: Tricks of the trade, pages 55–69. Springer, 1998. [26] G. Raskutti, M. J. Wainwright, and B. Yu. Early stopping and non-parametric regression: An optimal data-dependent stopping rule. Journal of Machine Learning Research, 15:335–366, 2014. [27] L. Rosasco and S. Villa. Learning with incremental iterative regularization. In Advances in Neural Information Processing Systems, pages 1630–1638, 2015. [28] R. E. Schapire. The strength of weak learnability. Machine learning, 5(2):197–227, 1990. [29] R. E. Schapire. The boosting approach to machine learning: An overview. In Nonlinear estimation and classification, pages 149–171. Springer, 2003. [30] B. Schölkopf and A. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [31] O. N. Strand. Theory and methods related to the singular value expansion and Landweber’s iteration for integral equations of the first kind. SIAM J. Numer. Anal., 11:798–825, 1974. [32] S. van de Geer. Empirical Processes in M-Estimation. Cambridge University Press, 2000. [33] A. W. van der Vaart and J. Wellner. Weak Convergence and Empirical Processes. Springer-Verlag, New York, NY, 1996. [34] E. D. Vito, S. Pereverzyev, and L. Rosasco. Adaptive kernel methods using the balancing principle. Foundations of Computational Mathematics, 10(4):455–479, 2010. [35] G. Wahba. Three topics in ill-posed problems. In M. Engl and G. Groetsch, editors, Inverse and ill-posed problems, pages 37–50. Academic Press, 1987. [36] G. Wahba. Spline models for observational data. CBMS-NSF Regional Conference Series in Applied Mathematics. SIAM, Philadelphia, PN, 1990. [37] M. J. Wainwright. High-dimensional statistics: A non-asymptotic viewpoint. Cambridge University Press, 2017. [38] Y. Yang, M. Pilanci, and M. J. Wainwright. Randomized sketches for kernels: Fast and optimal nonparametric regression. Annals of Statistics, 2017. To appear. [39] Y. Yao, L. Rosasco, and A. Caponnetto. On early stopping in gradient descent learning. Constructive Approximation, 26(2):289–315, 2007. [40] T. Zhang and B. Yu. Boosting with early stopping: Convergence and consistency. Annals of Statistics, 33(4):1538–1579, 2005. | 2017 | 423 |
6,923 | Interpolated Policy Gradient: Merging On-Policy and Off-Policy Gradient Estimation for Deep Reinforcement Learning Shixiang Gu University of Cambridge Max Planck Institute sg717@cam.ac.uk Timothy Lillicrap DeepMind countzero@google.com Zoubin Ghahramani University of Cambridge Uber AI Labs zoubin@eng.cam.ac.uk Richard E. Turner University of Cambridge ret26@cam.ac.uk Bernhard Schölkopf Max Planck Institute bs@tuebingen.mpg.de Sergey Levine UC Berkeley svlevine@eecs.berkeley.edu Abstract Off-policy model-free deep reinforcement learning methods using previously collected data can improve sample efficiency over on-policy policy gradient techniques. On the other hand, on-policy algorithms are often more stable and easier to use. This paper examines, both theoretically and empirically, approaches to merging on- and off-policy updates for deep reinforcement learning. Theoretical results show that off-policy updates with a value function estimator can be interpolated with on-policy policy gradient updates whilst still satisfying performance bounds. Our analysis uses control variate methods to produce a family of policy gradient algorithms, with several recently proposed algorithms being special cases of this family. We then provide an empirical comparison of these techniques with the remaining algorithmic details fixed, and show how different mixing of off-policy gradient estimates with on-policy samples contribute to improvements in empirical performance. The final algorithm provides a generalization and unification of existing deep policy gradient techniques, has theoretical guarantees on the bias introduced by off-policy updates, and improves on the state-of-the-art model-free deep RL methods on a number of OpenAI Gym continuous control benchmarks. 1 Introduction Reinforcement learning (RL) studies how an agent that interacts sequentially with an environment can learn from rewards to improve its behavior and optimize long-term returns. Recent research has demonstrated that deep networks can be successfully combined with RL techniques to solve difficult control problems. Some of these include robotic control (Schulman et al., 2016; Lillicrap et al., 2016; Levine et al., 2016), computer games (Mnih et al., 2015), and board games (Silver et al., 2016). One of the simplest ways to learn a neural network policy is to collect a batch of behavior wherein the policy is used to act in the world, and then compute and apply a policy gradient update from this data. This is referred to as on-policy learning because all of the updates are made using data that was collected from the trajectory distribution induced by the current policy of the agent. It is straightforward to compute unbiased on-policy gradients, and practical on-policy gradient algorithms tend to be stable and relatively easy to use. A major drawback of such methods is that they tend to be data inefficient, because they only look at each data point once. Off-policy algorithms based on Q-learning and actor-critic learning (Sutton et al., 1999) have also proven to be an effective approach 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. to deep RL such as in (Mnih et al., 2015) and (Lillicrap et al., 2016). Such methods reuse samples by storing them in a memory replay buffer and train a value function or Q-function with off-policy updates. This improves data efficiency, but often at a cost in stability and ease of use. Both on- and off-policy learning techniques have their own advantages. Most recent research has worked with on-policy algorithms or off-policy algorithms, and a few recent methods have sought to make use of both on- and off-policy data for learning (Gu et al., 2017; Wang et al., 2017; O’Donoghue et al., 2017). Such algorithms hope to gain advantages from both modes of learning, whilst avoiding their limitations. Broadly speaking, there have been two basic approaches in recently proposed algorithms that make use of both on- and off-policy data and updates. The first approach is to mix some ratio of on- and off-policy gradients or update steps in order to update a policy, as in the ACER and PGQ algorithms (Wang et al., 2017; O’Donoghue et al., 2017). In this case, there are no theoretical bounds on the error induced by incorporating off-policy updates. In the second approach, an off-policy Q critic is trained but is used as a control variate to reduce on-policy gradient variance, as in the Q-prop algorithm (Gu et al., 2017). This case does not introduce additional bias to the gradient estimator, but the policy updates do not use off-policy data. We seek to unify these two approaches using the method of control variates. We introduce a parameterized family of policy gradient methods that interpolate between on-policy and off-policy learning. Such methods are in general biased, but we show that the bias can be bounded.We show that a number of recent methods (Gu et al., 2017; Wang et al., 2017; O’Donoghue et al., 2017) can be viewed as special cases of this more general family. Furthermore, our empirical results show that in most cases, a mix of policy gradient and actor-critic updates achieves the best results, demonstrating the value of considering interpolated policy gradients. 2 Preliminaries A key component of our interpolated policy gradient method is the use of control variates to mix likelihood ratio gradients with deterministic gradient estimates obtained explicitly from a state-action critic. In this section, we summarize both likelihood ratio and deterministic gradient methods, as well as how control variates can be used to combine these two approaches. 2.1 On-Policy Likelihood Ratio Policy Gradient At time t, the RL agent in state st takes action at according to its policy π(at|st), the state transitions to st+1, and the agent receives a reward r(st, at). For a parametrized policy πθ, the objective is to maximize the γ-discounted cumulative future return J(θ) = J(π) = Es0,a0,···∼π [P∞ t=0 γtr(st, at)]. Monte Carlo policy gradient methods, such as REINFORCE (Williams, 1992) and TRPO (Schulman et al., 2015), use the likelihood ratio policy gradient of the RL objective, ∇θJ(θ) = Eρπ,π[∇θ log πθ(at|st)( ˆQ(st, at) −b(st))] = Eρπ,π[∇θ log πθ(at|st) ˆA(st, at)], (1) where ˆQ(st, at) = P∞ t′=t γt′−tr(st′, at′) is the Monte Carlo estimate of the “critic” Qπ(st, at) = Est+1,at+1,···∼π|st,at[ ˆQ(st, at)], and ρπ = P∞ t=0 γtp(st = s) are the unnormalized state visitation frequencies, while b(st) is known as the baseline, and serves to reduce the variance of the gradient estimate (Williams, 1992). If the baseline estimates the value function, V π(st) = Eat∼π(·|st)[Qπ(st, at)], then ˆA(st) is an estimate of the advantage function Aπ(st, at) = Qπ(st, at) −V π(st). Likelihood ratio policy gradient methods use unbiased gradient estimates (except for the technicality detailed by Thomas (2014)), but they often suffer from high variance and are sample-intensive. 2.2 Off-Policy Deterministic Policy Gradient Policy gradient methods with function approximation (Sutton et al., 1999), or actor-critic methods, are a family of policy gradient methods which first estimate the critic, or the value, of the policy by Qw ≈Qπ, and then greedily optimize the policy πθ with respect to Qw. While it is not necessary for such algorithms to be off-policy, we primarily analyze the off-policy variants, such as (Riedmiller, 2005; Degris et al., 2012; Heess et al., 2015; Lillicrap et al., 2016). For example, DDPG Lillicrap et al. (2016), which optimizes a continuous deterministic policy πθ(at|st) = δ(at = µθ(st)), can be summarized by the following update equations, where Q′ denotes the target Q network and β denotes 2 β ν CV Examples 0 No REINFORCE (Williams, 1992),TRPO (Schulman et al., 2015) π 0 Yes Q-Prop (Gu et al., 2017) 1 DDPG (Silver et al., 2014; Lillicrap et al., 2016),SVG(0) (Heess et al., 2015) ̸= π No ≈PGQ (O’Donoghue et al., 2017), ≈ACER (Wang et al., 2017) Table 1: Prior policy gradient method objectives as special cases of IPG. some off-policy distribution, e.g. from experience replay (Lillicrap et al., 2016): w ←arg min Eβ[(Qw(st, at) −yt)2], yt = r(st, at) + γQ′(st+1, µθ(st+1)) θ ←arg max Eβ[Qw(st, µθ(st))]. (2) This provides the following deterministic policy gradient through the critic: ∇θJ(θ) ≈Eρβ[∇θQw(st, µθ(st))]. (3) This policy gradient is generally biased due to the imperfect estimator Qw and off-policy state sampling from β. Off-policy actor-critic algorithms therefore allow training the policy on off-policy samples, at the cost of introducing potentially unbounded bias into the gradient estimate. This usually makes off-policy algorithms less stable during learning, compared to on-policy algorithms using a large batch size for each update (Duan et al., 2016; Gu et al., 2017). 2.3 Off-Policy Control Variate Fitting The control variates method (Ross, 2006) is a general technique for variance reduction of a Monte Carlo estimator by exploiting a correlated variable for which we know more information such as analytical expectation. General control variates for RL include state-action baselines, and an example can be an off-policy fitted critic Qw. Q-Prop (Gu et al., 2017), for example, used ˜Qw, the first-order Taylor expansion of Qw, as the control variates, and showed improvement in stability and sample efficiency of policy gradient methods. µθ here corresponds to the mean of the stochastic policy πθ. ∇θJ(θ) = Eρπ,π[∇θ log πθ(at|st)( ˆQ(st, at) −˜Qw(st, at))] + Eρπ[∇θQw(st, µθ(st))]. (4) The gradient estimator combines both likelihood ratio and deterministic policy gradients in Eq. 1 and 3. It has lower variance and stable gradient estimates and enables more sample-efficient learning. However, one limitation of Q-Prop is that it uses only on-policy samples for estimating the policy gradient. This ensures that the Q-Prop estimator remains unbiased, but limits the use of off-policy samples for further variance reduction. 3 Interpolated Policy Gradient Our proposed approach, interpolated policy gradient (IPG), mixes likelihood ratio gradient with ˆQ, which provides unbiased but high-variance gradient estimation, and deterministic gradient through an off-policy fitted critic Qw, which provides low-variance but biased gradients. IPG directly interpolates the two terms from Eq. 1 and 3: ∇θJ(θ) ≈(1 −ν)Eρπ,π[∇θ log πθ(at|st) ˆA(st, at)] + νEρβ[∇θ ¯Qπ w(st)], (5) where we generalized the deterministic policy gradient through the critic as ∇θ ¯Qw(st) = ∇θEπ[Qπ w(st, ·)]. This generalization is to make our analysis applicable with more general forms of the critic-based control variates, as discussed in the Appendix. This gradient estimator is biased from two sources: off-policy state sampling ρβ, and inaccuracies in the critic Qw. However, as we show in Section 4, we can bound the biases for all the cases, and in some cases, the algorithm still guarantees monotonic convergence as in Kakade & Langford (2002); Schulman et al. (2015). 3.1 Control Variates for Interpolated Policy Gradient While IPG includes ν to trade off bias and variance directly, it contains a likelihood ratio gradient term, for which we can introduce a control variate (CV) Ross (2006) to further reduce the estimator variance. 3 The expression for the IPG with control variates is below, where Aπ w(st, at) = Qw(st, at) −¯Qπ w(st), ∇θJ(θ) ≈(1 −ν)Eρπ,π[∇θ log πθ(at|st) ˆA(st, at)] + νEρβ[∇θ ¯Qπ w(st)] = (1 −ν)Eρπ,π[∇θ log πθ(at|st)( ˆA(st, at) −Aπ w(st, at))] + (1 −ν)Eρπ[∇θ ¯Qπ w(st)] + νEρβ[∇θ ¯Qπ w(st)] ≈(1 −ν)Eρπ,π[∇θ log πθ(at|st)( ˆA(st, at) −Aπ w(st, at))] + Eρβ[∇θ ¯Qπ w(st)]. (6) The first approximation indicates the biased approximation from IPG, while the second approximation indicates replacing the ρπ in the control variate correction term with ρβ and merging with the last term. The second approximation is a design decision and introduces additional bias when β ̸= π but it helps simplify the expression to be analyzed more easily, and the additional benefit from the variance reduction from the control variate could still outweigh this extra bias. The biases are analyzed in Section 4. The likelihood ratio gradient term is now proportional to the residual in on- and off-policy advantage estimates ˆA(st, at) −Aπ w(st, at), and therefore, we call this term residual likelihood ratio gradient. Intuitively, if the off-policy critic estimate is accurate, this term has a low magnitude and the overall variance of the estimator is reduced. 3.2 Relationship to Prior Policy Gradient and Actor-Critic Methods Crucially, IPG allows interpolating a rich list of prior deep policy gradient methods using only three parameters: β, ν, and the use of the control variate (CV). The connection is summarized in Table 1 and the algorithm is presented in Algorithm 1. Importantly, a wide range of prior work has only explored limiting cases of the spectrum, e.g. ν = 0, 1, with or without the control variate. Our work provides a thorough theoretical analysis of the biases, and in some cases performance guarantees, for each of the method in this spectrum and empirically demonstrates often the best performing algorithms are in the midst of the spectrum. Algorithm 1 Interpolated Policy Gradient input β, ν, useCV 1: Initialize w for critic Qw, θ for stochastic policy πθ, and replay buffer R ←∅. 2: repeat 3: Roll-out πθ for E episodes, T time steps each, to collect a batch of data B = {s, a, r}1:T,1:E to R 4: Fit Qw using R and πθ, and fit baseline Vφ(st) using B 5: Compute Monte Carlo advantage estimate ˆAt,e using B and Vφ 6: if useCV then 7: Compute critic-based advantage estimate ¯At,e using B, Qw and πθ 8: Compute and center the learning signals lt,e = ˆAt,e −¯At,e and set b = 1 9: else 10: Center the learning signals lt,e = ˆAt,e and set b = ν 11: end if 12: Multiply lt,e by (1 −ν) 13: Sample D = s1:M from R and/or B based on β 14: Compute ∇θJ(θ) ≈ 1 ET P e P t ∇θ log πθ(at,e|st,e)lt,e + b M P m ∇θ ¯Qπ w(sm) 15: Update policy πθ using ∇θJ(θ) 16: until πθ converges. 3.3 ν = 1: Actor-Critic methods Before presenting our theoretical analysis, an important special case to discuss is ν = 1, which corresponds to a deterministic actor-critic method. Several advantages of this special case include that the policy can be deterministic and the learning can be done completely off-policy, as it does not have to estimate the on-policy Monte Carlo critic ˆQ. Prior work such as DDPG Lillicrap et al. (2016) and related Q-learning methods have proposed aggressive off-policy exploration strategy to exploit these properties of the algorithm. In this work, we compare alternatives such as using on-policy exploration and stochastic policy with classical DDPG algorithm designs, and show that in some domains the off-policy exploration can significantly deteriorate the performance. Theoretically, we confirm this empirical observation by showing that the bias from off-policy sampling in β increases 4 monotonically with the total variation or KL divergence between β and π. Both the empirical and theoretical results indicate that well-designed actor-critic methods with an on-policy exploration strategy could be a more reliable alternative than with an on-policy exploration. 4 Theoretical Analysis In this section, we present a theoretical analysis of the bias in the interpolated policy gradient. This is crucial, since understanding the biases of the methods can improve our intuition about its performance and make it easier to design new algorithms in the future. Because IPG includes many prior methods as special cases, our analysis also applies to those methods and other intermediate cases. We first analyze a special case and derive results for general IPG. All proofs are in the Appendix. 4.1 β ̸= π, ν = 0: Policy Gradient with Control Variate and Off-Policy Sampling This section provides an analysis of the special case of IPG with β ̸= π, ν = 1, and the control variate. Plugging in to Eq. 6, we get an expression similar to Q-Prop in Eq. 4, ∇θJ(θ) ≈Eρπ,π[∇θ log πθ(at|st)( ˆA(st, at) −Aπ w(st, at))] + Eρβ[∇θ ¯Qπ w(st)], (7) except that it also supports utilizing off-policy data for updating the policy. To analyze the bias for this gradient expression, we first introduce ˜J(π, ˜π), a local approximation to J(π), which has been used in prior theoretical work (Kakade & Langford, 2002; Schulman et al., 2015). The derivation and the bias from this approximation are discussed in the proof for Theorem 1 in the Appendix. J(π) = J(˜π) + Eρπ,π[A˜π(st, at)] ≈J(˜π) + Eρ˜π,π[A˜π(st, at)] = ˜J(π, ˜π). (8) Note that J(π) = ˜J(π, ˜π = π) and ∇πJ(π) = ∇π ˜J(π, ˜π = π). In practice, ˜π corresponds to policy πk at iteration k and π corresponds next policy πk+1 after parameter update. Thus, this approximation is often sufficiently good. Next, we write the approximate objective for Eq. 7, ˜Jβ,ν=0,CV (π, ˜π) ≜J(˜π) + Eρ˜π,π[A˜π(st, at) −A˜π w(st, at)] + Eρβ[ ¯Aπ,˜π w (st)] ≈˜J(π, ˜π) ¯Aπ,˜π w (st) = Eπ[A˜π w(st, ·)] = Eπ[Qw(st, ·)] −E˜π[Qw(st, ·)]. (9) Note that ˜Jβ,ν=0(π, ˜π = π) = ˜J(π, ˜π = π) = J(π), and ∇π ˜Jβ,ν=0(π, ˜π = π) equals Eq. 7. We can bound the absolute error between ˜Jβ,ν=0,CV (π, ˜π) and J(π) by the following theorem, where Dmax KL (πi, πj) = maxs DKL(πi(·|s), πj(·|s)) is the maximum KL divergence between πi, πj. Theorem 1. If ϵ = maxs | ¯Aπ,˜π w (s)|, ζ = maxs | ¯Aπ,˜π(s)|, then
J(π) −˜Jβ,ν=0,CV (π, ˜π)
1 ≤2 γ (1 −γ)2 ϵ q Dmax KL (˜π, β) + ζ q Dmax KL (π, ˜π) Theorem 1 contains two terms: the second term confirms ˜Jβ,ν=0,CV is a local approximation around π and deviates from J(π) as ˜π deviates, and the first term bounds the bias from off-policy sampling using the KL divergence between the policies ˜π and β. This means that the algorithm fits well with policy gradient methods which constrain the KL divergence per policy update, such as covariant policy gradient (Bagnell & Schneider, 2003), natural policy gradient (Kakade & Langford, 2002), REPS (Peters et al., 2010), and trust-region policy optimization (TRPO) (Schulman et al., 2015). 4.1.1 Monotonic Policy Improvement Guarantee Some forms of on-policy policy gradient methods have theoretical guarantees on monotonic convergence Kakade & Langford (2002); Schulman et al. (2015). Such guarantees often correspond to stable empirical performance on challenging problems, even when some of the constraints are relaxed in practice (Schulman et al., 2015; Duan et al., 2016; Gu et al., 2017). We can show that a variant of IPG allows off-policy sampling while still guaranteeing monotonic convergence. The algorithm and the proof are provided in the appendix.This algorithm is usually impractical to implement; however, IPG with trust-region updates when β ̸= π, ν = 1, CV = true approximates this monotonic algorithm, similar to how TRPO is an approximation to the theoretically monotonic algorithm proposed by Schulman et al. (2015). 5 4.2 General Bounds on the Interpolated Policy Gradient We can establish bias bounds for the general IPG algorithm, with and without the control variate, using Theorem 2. The additional term that contributes to the bias in the general case is δ, which represents the error between the advantage estimated by the off-policy critic and the true Aπ values. Theorem 2. If δ = maxs,a |A˜π(s, a) −A˜π w(s, a)|, ϵ = maxs | ¯Aπ,˜π w (s)|, ζ = maxs | ¯Aπ,˜π(s)|, ˜Jβ,ν(π, ˜π) ≜J(˜π) + (1 −ν)Eρ˜π,π[ ˆA˜π] + νEρβ[ ¯Aπ,˜π w ] ˜Jβ,ν,CV (π, ˜π) ≜J(˜π) + (1 −ν)Eρ˜π,π[ ˆA˜π −A˜π w] + Eρβ[ ¯Aπ,˜π w ] then,
J(π) −˜Jβ,ν(π, ˜π)
1 ≤ νδ 1 −γ + 2 γ (1 −γ)2 νϵ q Dmax KL (˜π, β) + ζ q Dmax KL (π, ˜π)
J(π) −˜Jβ,ν,CV (π, ˜π)
1 ≤ νδ 1 −γ + 2 γ (1 −γ)2 ϵ q Dmax KL (˜π, β) + ζ q Dmax KL (π, ˜π) This bound shows that the bias from directly mixing the deterministic policy gradient through ν comes from two terms: how well the critic Qw is approximating Qπ, and how close the off-policy sampling policy is to the actor policy. We also show that the bias introduced is proportional to ν while the variance of the high variance likelihood ratio gradient term is proportional to (1 −ν)2, so ν allows directly trading off bias and variance. Theorem 2 fully bounds bias in the full spectrum of IPG methods; this enables us to analyze how biases arise and interact and help us design better algorithms. 5 Related Work An overarching aim of this paper is to help unify on-policy and off-policy policy gradient algorithms into a single conceptual framework. Our analysis examines how Q-Prop (Gu et al., 2017), PGQ (O’Donoghue et al., 2017), and ACER (Wang et al., 2017), which are all recent works that combine on-policy with off-policy learning, are connected to each other (see Table 1). IPG with 0 < ν < 1 and without the control variate relates closely to PGQ and ACER, but differ in the details. PGQ mixes in the Q-learning Bellman error objective, and ACER mixes parameter update steps rather than directly mixing gradients. And both PGQ and ACER come with numerous additional design details that make fair comparisons with methods like TRPO and Q-Prop difficult. We instead focus on the three minimal variables of IPG and explore their settings in relation to the closely related TRPO and Q-Prop methods, in order to theoretically and empirically understand in which situations we might expect gains from mixing on- and off-policy gradients. Asides from these more recent works, the use of off-policy samples with policy gradients has been a popular direction of research (Peshkin & Shelton, 2002; Jie & Abbeel, 2010; Degris et al., 2012; Levine & Koltun, 2013). Most of these methods rely on variants of importance sampling (IS) to correct for bias. The use of importance sampling ensures unbiased estimates, but at the cost of considerable variance, as quantified by the ESS measure used by Jie & Abbeel (2010). Ignoring importance weights produces bias but, as shown in our analysis, this bias can be bounded. Therefore, our IPG estimators have higher bias as the sampling distribution deviates from the policy, while IS methods have higher variance. Among these importance sampling methods, Levine & Koltun (2013) evaluates on tasks that are the most similar to our paper, but the focus is on using importance sampling to include demonstrations, rather than to speed up learning from scratch. Lastly, there are many methods that combine on- and off-policy data for policy evaluation (Precup, 2000; Mahmood et al., 2014; Munos et al., 2016), mostly through variants of importance sampling. Combining our methods with more sophisticated policy evaluation methods will likely lead to further improvements, as done in (Degris et al., 2012). A more detailed analysis of the effect of importance sampling on bias and variance is left to future work, where some of the relevant work includes Precup (2000); Jie & Abbeel (2010); Mahmood et al. (2014); Jiang & Li (2016); Thomas & Brunskill (2016). 6 Experiments In this section, we empirically show that the three parameters of IPG can interpolate different behaviors and often achieve superior performance versus prior methods that are limiting cases of this 6 (a) IPG with ν = 0 and the control variate. (b) IPG with ν = 1. Figure 1: (a) IPG-ν = 0 vs Q-Prop on HalfCheetah-v1, with batch size 5000. IPG-β-rand30000, which uses 30000 random samples from the replay as samples from β, outperforms Q-Prop in terms of learning speed. (b) IPG-ν=1 vs other algorithms on Ant-v1. In this domain, on-policy IPG-ν=1 with on-policy exploration significantly outperforms DDPG and IPG-ν=1-OU, which use a heuristic OU (Ornstein–Uhlenbeck) process noise exploration strategy, and marginally outperforms Q-Prop. approach. Crucially, all methods share the same algorithmic structure as Algorithm 1, and we hold the rest of the experimental details fixed. All experiments were performed on MuJoCo domains in OpenAI Gym (Todorov et al., 2012; Brockman et al., 2016), with results presented for the average over three seeds. Additional experimental details are provided in the Appendix. 6.1 β ̸= π, ν = 0, with the control variate We evaluate the performance of the special case of IPG discussed in Section 4.1. This case is of particular interest, since we can derive monotonic convergence results for a variant of this method under certain conditions, despite the presence of off-policy updates. Figure 1a shows the performance on the HalfCheetah-v1 domain, when the policy update batch size is 5000 transitions (i.e. 5 episodes). “last” and “rand” indicate if β samples from the most recent transitions or uniformly from the experience replay. “last05000” would be equivalent to Q-Prop given ν = 0. Comparing “IPG-βrand05000” and “Q-Prop” curves, we observe that by drawing the same number of samples randomly from the replay buffer for estimating the critic gradient, instead of using the on-policy samples, we get faster convergence. If we sample batches of size 30000 from the replay buffer, the performance further improves. However, as seen in the “IPG-β-last30000” curve, if we instead use the 30000 most recent samples, the performance degrades. One possible explanation for this is that, while using random samples from the replay increases the bound on the bias according to Theorem 1, it also decorrelates the samples within the batch, providing more stable gradients. This is the original motivation for experience replay in the DQN method (Mnih et al., 2015), and we have shown that such decorrelated off-policy samples can similarly produce gains for policy gradient algorithms. See Table 2 for results on other domains. The results for this variant of IPG demonstrate that random sampling from the replay provides further improvement on top of Q-Prop. Note that these replay buffer samples are different from standard off-policy samples in DDPG or DQN algorithms, which often use aggressive heuristic exploration strategies. The samples used by IPG are sampled from prior policies that follow a conservative trust-region update, resulting in greater regularity but less exploration. In the next section, we show that in some cases, ensuring that the off-policy samples are not too off-policy is essential for good performance. 6.2 β = π, ν = 1 In this section, we empirically evaluate another special case of IPG, where β = π, indicating onpolicy sampling, and ν = 1, which reduces to a trust-region, on-policy variant of a deterministic actor-critic method. Although this algorithm performs actor-critic updates, the use of a trust region makes it more similar to TRPO or Q-Prop than DDPG. 7 HalfCheetah-v1 Ant-v1 Walker-v1 Humanoid-v1 β = π β ̸= π β = π β ̸= π β = π β ̸= π β = π β ̸= π IPG-ν=0.2 3356 3458 4237 4415 3047 1932 1231 920 IPG-cv-ν=0.2 4216 4023 3943 3421 1896 1411 1651 1613 IPG-ν=1 2962 4767 3469 3780 2704 805 1571 1530 Q-Prop 4178 4182 3374 3479 2832 1692 1423 1519 TRPO 2889 N.A. 1520 N.A. 1487 N.A. 615 N.A. Table 2: Comparisons on all domains with mini-batch size 10000 for Humanoid and 5000 otherwise. We compare the maximum of average test rewards in the first 10000 episodes (Humanoid requires more steps to fully converge; see the Appendix for learning curves). Results outperforming Q-Prop (or IPG-cv-ν=0 with β = π) are boldface. The two columns show results with on-policy and off-policy samples for estimating the deterministic policy gradient. Results for all domains are shown in Table 2. Figure 1b shows the learning curves on Ant-v1. Although IPG-ν=1 methods can be off-policy, the policy is updated every 5000 samples to keep it consistent with other IPG methods, while DDPG updates the policy on every step in the environment and makes other design choices Lillicrap et al. (2016). We see that, in this domain, standard DDPG becomes stuck with a mean reward of 1000, while IPG-ν=1 improves monotonically, achieving a significantly better result. To investigate why this large discrepancy arises, we also ran IPG-ν=1 with the same OU process exploration noise as DDPG, and observed large degradation in performance. This provides empirical support for Theorem 2. It is illuminating to contrast this result with the previous experiment, where the off-policy samples did not adversely alter the results. In the previous experiments, the samples came from Gaussian policies updated with trust-regions. The difference between π and β was therefore approximately bounded by the trust-regions. In the experiment with Brownian noise, the behaving policy uses temporally correlated noise, with potentially unbounded KL-divergence from the learned Gaussian policy. In this case, the off-policy samples result in excessive bias, wiping out the variance reduction benefits of off-policy sampling. In general, we observed that for the harder Ant-v1 and Walker-v1 domains, on-policy exploration is more effective, even when doing off-policy state sampling from a replay buffer. This results suggests the following lesson for designing off-policy actor-critic methods: for domains where exploration is difficult, it may be more effective to use on-policy exploration with bounded policy updates than to design heuristic exploration rules such as the OU process noise, due to the resulting reduction in bias. 6.3 General Cases of Interpolated Policy Gradient Table 2 shows the results for experiments where we compare IPG methods with varying values of ν; additional results are provided in the Appendix. β ̸= π indicates that the method uses off-policy samples from the replay buffer, with the same batch size as the on-policy batch for fair comparison. We ran sweeps over ν = {0.2, 0.4, 0.6, 0.8} and found that ν = 0.2 consistently produce better performance than Q-Prop, TRPO or prior actor-critic methods. This is consistent with the results in PGQ (O’Donoghue et al., 2017) and ACER (Wang et al., 2017), which found that their equivalent of ν = 0.1 performed best on their benchmarks. Importantly, we compared all methods with the same algorithm designs (exploration, policy, etc.), since Q-Prop and TRPO are IPG-ν=0 with and without the control variate. IPG-ν=1 is a novel variant of the actor-critic method that differs from DDPG (Lillicrap et al., 2016) and SVG(0) (Heess et al., 2015) due to the use of a trust region. The results in Table 2 suggest that, in most cases, the best performing algorithm is one that interpolates between the policy-gradient and actor-critic variants, with intermediate values of ν. 7 Discussion In this paper, we introduced interpolated policy gradient methods, a family of policy gradient algorithms that allow mixing off-policy learning with on-policy learning while satisfying performance bounds. This family of algorithms unifies and interpolates on-policy likelihood ratio policy gradient and off-policy deterministic policy gradient, and includes a number of prior works as approximate limiting cases. Empirical results confirm that, in many cases, interpolated gradients have improved sample-efficiency and stability over the prior state-of-the-art methods, and the theoretical results provide intuition for analyzing the cases in which the different methods perform well or poorly. Our hope is that this detailed analysis of interpolated gradient methods can not only provide for more effective algorithms in practice, but also give useful insight for future algorithm design. 8 Acknowledgements This work is supported by generous sponsorship from Cambridge-Tübingen PhD Fellowship, NSERC, and Google Focused Research Award. References Bagnell, J Andrew and Schneider, Jeff. Covariant policy search. IJCAI, 2003. Brockman, Greg, Cheung, Vicki, Pettersson, Ludwig, Schneider, Jonas, Schulman, John, Tang, Jie, and Zaremba, Wojciech. Openai gym. arXiv preprint arXiv:1606.01540, 2016. Degris, Thomas, White, Martha, and Sutton, Richard S. Off-policy actor-critic. arXiv preprint arXiv:1205.4839, 2012. Duan, Yan, Chen, Xi, Houthooft, Rein, Schulman, John, and Abbeel, Pieter. Benchmarking deep reinforcement learning for continuous control. International Conference on Machine Learning (ICML), 2016. Gu, Shixiang, Lillicrap, Timothy, Ghahramani, Zoubin, Turner, Richard E, and Levine, Sergey. Q-prop: Sample-efficient policy gradient with an off-policy critic. ICLR, 2017. Heess, Nicolas, Wayne, Gregory, Silver, David, Lillicrap, Tim, Erez, Tom, and Tassa, Yuval. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pp. 2944–2952, 2015. Jiang, Nan and Li, Lihong. Doubly robust off-policy value evaluation for reinforcement learning. In International Conference on Machine Learning, pp. 652–661, 2016. Jie, Tang and Abbeel, Pieter. On a connection between importance sampling and the likelihood ratio policy gradient. In Advances in Neural Information Processing Systems, pp. 1000–1008, 2010. Kakade, Sham and Langford, John. Approximately optimal approximate reinforcement learning. In International Conference on Machine Learning (ICML), volume 2, pp. 267–274, 2002. Levine, Sergey and Koltun, Vladlen. Guided policy search. In International Conference on Machine Learning (ICML), pp. 1–9, 2013. Levine, Sergey, Finn, Chelsea, Darrell, Trevor, and Abbeel, Pieter. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. 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. Mahmood, A Rupam, van Hasselt, Hado P, and Sutton, Richard S. Weighted importance sampling for off-policy learning with linear function approximation. In Advances in Neural Information Processing Systems, pp. 3014–3022, 2014. 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. Humanlevel control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. Munos, Rémi, Stepleton, Tom, Harutyunyan, Anna, and Bellemare, Marc G. Safe and efficient off-policy reinforcement learning. arXiv preprint arXiv:1606.02647, 2016. O’Donoghue, Brendan, Munos, Remi, Kavukcuoglu, Koray, and Mnih, Volodymyr. Pgq: Combining policy gradient and q-learning. ICLR, 2017. Peshkin, Leonid and Shelton, Christian R. Learning from scarce experience. In Proceedings of the Nineteenth International Conference on Machine Learning, 2002. Peters, Jan, Mülling, Katharina, and Altun, Yasemin. Relative entropy policy search. In AAAI. Atlanta, 2010. 9 Precup, Doina. Eligibility traces for off-policy policy evaluation. Computer Science Department Faculty Publication Series, pp. 80, 2000. Riedmiller, Martin. Neural fitted q iteration–first experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pp. 317–328. Springer, 2005. Ross, Sheldon M. Simulation. Burlington, MA: Elsevier, 2006. Schulman, John, Levine, Sergey, Abbeel, Pieter, Jordan, Michael I, and Moritz, Philipp. Trust region policy optimization. In ICML, pp. 1889–1897, 2015. Schulman, John, Moritz, Philipp, Levine, Sergey, Jordan, Michael, and Abbeel, Pieter. Highdimensional continuous control using generalized advantage estimation. International Conference on Learning Representations (ICLR), 2016. Silver, David, Lever, Guy, Heess, Nicolas, Degris, Thomas, Wierstra, Daan, and Riedmiller, Martin. Deterministic policy gradient algorithms. In International Conference on Machine Learning (ICML), 2014. Silver, David, Huang, Aja, Maddison, Chris J, Guez, Arthur, Sifre, Laurent, Van Den Driessche, George, Schrittwieser, Julian, Antonoglou, Ioannis, Panneershelvam, Veda, Lanctot, Marc, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. Sutton, Richard S, McAllester, David A, Singh, Satinder P, Mansour, Yishay, et al. Policy gradient methods for reinforcement learning with function approximation. In Advances in Neural Information Processing Systems (NIPS), volume 99, pp. 1057–1063, 1999. Thomas, Philip. Bias in natural actor-critic algorithms. In ICML, pp. 441–448, 2014. Thomas, Philip and Brunskill, Emma. Data-efficient off-policy policy evaluation for reinforcement learning. In International Conference on Machine Learning, pp. 2139–2148, 2016. Todorov, Emanuel, Erez, Tom, and Tassa, Yuval. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012. Wang, Ziyu, Bapst, Victor, Heess, Nicolas, Mnih, Volodymyr, Munos, Remi, Kavukcuoglu, Koray, and de Freitas, Nando. Sample efficient actor-critic with experience replay. ICLR, 2017. Williams, Ronald J. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. 10 | 2017 | 424 |
6,924 | Parameter-Free Online Learning via Model Selection Dylan J. Foster Cornell University Satyen Kale Google Research Mehryar Mohri NYU and Google Research Karthik Sridharan Cornell University Abstract We introduce an efficient algorithmic framework for model selection in online learning, also known as parameter-free online learning. Departing from previous work, which has focused on highly structured function classes such as nested balls in Hilbert space, we propose a generic meta-algorithm framework that achieves online model selection oracle inequalities under minimal structural assumptions. We give the first computationally efficient parameter-free algorithms that work in arbitrary Banach spaces under mild smoothness assumptions; previous results applied only to Hilbert spaces. We further derive new oracle inequalities for matrix classes, non-nested convex sets, and Rd with generic regularizers. Finally, we generalize these results by providing oracle inequalities for arbitrary non-linear classes in the online supervised learning model. These results are all derived through a unified meta-algorithm scheme using a novel “multi-scale” algorithm for prediction with expert advice based on random playout, which may be of independent interest. 1 Introduction A key problem in the design of learning algorithms is the choice of the hypothesis set F. This is known as the model selection problem. The choice of F is driven by inherent trade-offs. In the statistical learning setting, this can be analyzed in terms of the estimation and approximation errors. A richer or more complex F helps better approximate the Bayes predictor (smaller approximation error). On the other hand, a hypothesis set that is too complex may have too large a VC-dimension or have unfavorable Rademacher complexity, thereby resulting in looser guarantees on the difference between the loss of a hypothesis and that of the best-in class (large estimation error). In the batch setting, this problem has been extensively studied with the main ideas originating in the seminal work of [40] and [39] and the principle of Structural Risk Minimization (SRM). This is typically formulated as follows: let (Fi)i∈N be an infinite sequence of hypothesis sets (or models); the problem consists of using the training sample to select a hypothesis set Fi with a favorable estimation-approximation trade-off and choosing the best hypothesis f in Fi. If we had access to a hypothetical oracle informing us of the best choice of i for a given instance, the problem would reduce to the standard one of learning with a fixed hypothesis set. Remarkably though, techniques such as SRM or similar penalty-based model selection methods return a hypothesis f ∗ that enjoys finite-sample learning guarantees that are almost as favorable as those that would be obtained had an oracle informed us of the index i∗of the best-in-class classifier’s hypothesis set [39; 13; 36; 21; 4; 24]. Such guarantees are sometimes referred to as oracle inequalities. They can be derived even for data-dependent penalties [21; 4; 3]. Such results naturally raise the following questions in the online setting: can we develop an analogous theory of model selection in online learning? Can we design online algorithms for model selection with solutions benefiting from strong guarantees, analogous to the batch ones? Unlike the statistical setting, in online learning one cannot split samples to first learn the optimal predictor within each subclass and then later learn the optimal subclass choice. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. A series of recent works on online learning provide some positive results along that direction. On the algorithmic side, [25; 27; 30; 31] present solutions that efficiently achieve model selection oracle inequalities for the important special case where F1,F2,... is a sequence of nested balls in a Hilbert space. On the theoretical side, a different line of work focusing on general hypothesis classes [14] uses martingale-based sequential complexity measures to show that, information-theoretically, one can obtain oracle inequalities in the online setting at a level of generality comparable to that of the batch statistical learning. However, this last result is not algorithmic. The first approach that a familiar reader might think of for tackling the online model selection problem is to run for each i an online learning algorithm that minimizes regret against Fi, and then aggregate over these algorithms using the multiplicative weights algorithm for prediction with expert advice. This would work if all the losses or “experts” considered were uniformly bounded by a reasonably small quantity. However, in many reasonable problems — particularly those arising in the context of online convex optimization — the losses of predictors or experts for each Fi may grow with i. Using simple aggregation would scale our regret with the magnitude of the largest Fi and not the i∗we want to compare against. This is the main technical challenge faced in this context, and one that we fully address in this paper. Our results are based on a novel multi-scale algorithm for prediction with expert advice. This algorithm works in a situation where the different experts’ losses lie in different ranges, and guarantees that the regret to each individual expert is adapted to the range of its losses. The algorithm can also take advantage of a given prior over the experts reflecting their importance. This general, abstract setting of prediction with expert advice yields online model selection algorithms for a host of applications detailed below in a straightforward manner. First, we give efficient algorithms for model selection for nested linear classes that provide oracle inequalities in terms of the norm of the benchmark to which the algorithm’s performance is compared. Our algorithm works for any norm, which considerably generalizes previous work [25; 27; 30; 31] and gives the first polynomial time online model selection for a number of online linear optimization settings. This includes online oracle inequalities for high-dimensional learning tasks such as online PCA and online matrix prediction. We then generalize these results even further by providing oracle inequalities for arbitrary non-linear classes in the online supervised learning model. This yields algorithms for applications such as online penalized risk minimization and multiple kernel learning. 1.1 Preliminaries Notation. For a given norm ⋅, let ⋅denote the dual norm. Likewise, for any function F, F will denote its Fenchel conjugate. For a Banach space (B,⋅), the dual is (B,⋅). We use x1∶n as shorthand for a sequence of vectors (x1,...,xn). For such sequences, we will use xt[i] to denote the tth vector’s ith coordinate. We let ei denote the ith standard basis vector. ⋅p denotes the `p norm, ⋅σ denotes the spectral norm, and ⋅⌃denotes the trace norm. For any p ∈[1,∞], let p′ be such that 1 p + 1 p′ = 1. Setup and goals. We work in two closely related settings: online convex optimization (Protocol 1) and online supervised learning (Protocol 2). In online convex optimization, the learner selects decisions from a convex subset W of some Banach space B. Regret to a comparator w ∈W in this setting is defined as ∑n t=1 ft(wt) −∑n t=1 ft(w). Suppose W can be decomposed into sets W1,W2,.... For a fixed set Wk, the optimal regret, if one tailors the algorithm to compete with Wk, is typically characterized by some measure of intrinsic complexity of the class (such as Littlestone’s dimension [5] and sequential Rademacher complexity [33]), denoted Compn(Wk). We would like to develop algorithms that predict a sequence (wt) such that n t=1 ft(wt) −min w∈Wk n t=1 ft(w) ≤Compn(Wk) + Penn(k) ∀k. (1) This equation is called an oracle inequality and states that the performance of the sequence (wt) matches that of a comparator that minimizes the bias-variance tradeoff mink{minw∈Wk ∑n t=1 ft(w) + Compn(Wk)}, up to a penalty Penn(k) whose scale ideally matches that of Compn(Wk). We shall see shortly that ensuring that the scale of Penn(k) does 2 Protocol 1 Online Convex Optimization for t = 1,...,n do Learner selects strategy qt ∈∆(W) for convex decision set W. Nature selects convex loss ft∶W →R. Learner draws wt ∼qt and incurs loss ft(wt). end for indeed match is the core technical challenge in developing online oracle inequalities for commonly used classes. In the supervised learning setting we measure regret against a benchmark class F = ∞ k=1 Fk of functions f∶X →R, where X is some abstract context space, also called feature space. In this case, the desired oracle inequality has the form: n t=1 `(ˆyt,yt) −inf f∈Fk n t=1 `(f(xt),yt) ≤Compn(Fk) + Penn(k) ∀k. (2) Protocol 2 Online Supervised Learning for t = 1,...,n do Nature provides xt ∈X. Learner selects randomized strategy qt ∈∆(R). Nature provides outcome yt ∈Y. Learner draws ˆyt ∼qt and incurs loss `(ˆyt,yt). end for 2 Online Model Selection 2.1 The need for multi-scale aggregation Let us briefly motivate the main technical challenge overcome by the model selection approach we consider. The most widely studied oracle inequality in online learning has the following form n t=1 ft(wt) − n t=1 ft(w) ≤O(w2 + 1) n ⋅log((w2 + 1)n) ∀w ∈Rd. (3) In light of (1), a model selection approach to obtaining this inequality would be to split the set W = Rd into `2 norm balls of doubling radius, i.e. Wk = w w2 ≤2k. A standard fact [15] is that such a set has Compn(Wk) = 2k√n if one optimizes over it using Mirror Descent, and so obtaining the oracle inequality (1) is sufficient to recover (3), so long as Penn(k) is not too large relative to Compn(Wk). Online model selection is fundamentally a problem of prediction with expert advice [8], where the experts correspond to the different model classes one is choosing from. Our basic meta-algorithm, MULTISCALEFTPL (Algorithm 3), operates in the following setup. The algorithm has access to a finite number, N, of experts. In each round, the algorithm is required to choose one of the N experts. Then the losses of all experts are revealed, and the algorithm incurs the loss of the chosen expert. The twist from the standard setup is that the losses of all the experts are not uniformly bounded in the same range. Indeed, for the setup described for the oracle inequality (3), class Wk will produce predictions with norm as large as 2k. Therefore, here, we assume that expert i incurs losses in the range [−ci,ci], for some known parameter ci ≥0. The goal is to design an online learning algorithm whose regret to expert i scales with ci, rather than maxi ci, which is what previous algorithms for learning from expert advice (such as the standard multiplicative weights strategy or AdaHedge [12]) would achieve. Indeed, any regret bound scaling in maxi ci will be far too large to achieve (3), as the term Penn(k) will dominate. This new type of scale-sensitive regret bound, achieved by our algorithm MULTISCALEFTPL, is stated below. 3 Algorithm 3 procedure MULTISCALEFTPL(c,⇡) ▷Scale vector c with ci ≥1, prior distribution ⇡. for time t = 1,...,n: do Draw sign vectors σt+1,...,σn ∈{±1}N each uniformly at random. Compute distribution pt(σt+1∶n) = arg min p∈∆N sup gt∶gt[i]≤ci p,gt+ sup i∈[N] − t s=1 ei,gs+ 4 n s=t+1 σs[i]ci −B(i) , where B(i) = 5ci nlog4c2 i n⇡i. Play it ∼pt. Observe loss vector gt. end for end procedure Theorem 1. Suppose the loss sequence (gt)t≤n satisfies gt[i]≤ci for a sequence (ci)i∈[N] with each ci ≥1. Let ⇡∈∆N be a given prior distribution on the experts. Then, playing the strategy (pt)t≤n given by Algorithm 3, MULTISCALEFTPL yields the following regret bound:1 E n t=1 eit,gt− n t=1 ei,gt≤Oci nlog(nci⇡i) ∀i ∈[N]. (4) The proof of the theorem is deferred to Appendix A in the supplementary material due to space constraints. Briefly, the proof follows the technique of adaptive relaxations from [14]. It relies on showing that the following function of the first t loss vectors g1∶t is an admissible relaxation (see [14] for definitions): Rel(g1∶t) E σt+1,...,σn∈{±1}N sup i − t s=1 ei,gs+ 4 n s=t+1 σs[i]ci −B(i). This implies that if we play the strategy (pt)t≤n given by Algorithm 3, the regret to the ith expert is bounded by B(i) + Rel(⋅), where Rel(⋅) indicates the Rel function applied to an empty sequence of loss vectors. As a final step, we bound Rel(⋅) as O(1) using a probabilistic maximal inequality (Lemma 2 in the supplementary material), yielding the bound (4). Compared to related FTPL algorithms [34], the analysis is surprisingly delicate, as additive ci factors can spoil the desired regret bound (4) if the cis differ by orders of magnitude. The min-max optimization problem in MULTISCALEFTPL can be solved in polynomial-time using linear programming — see Appendix A.1 in the supplementary material for a full discussion. In related work, [7] simultaneously developed a multi-scale experts algorithm which could also be used in our framework. Their regret bound has sub-optimal dependence on the prior distribution over experts, but their algorithm is more efficient and is able to obtain multiplicative regret guarantees. 2.2 Online convex optimization One can readily apply MULTISCALEFTPL for online optimization problems whenever it is possible to bound the losses of the different experts a-priori. One such application is to online convex optimization, where each “expert” is a a particular OCO algorithm, and for which such a bound can be obtained via appropriate bounds on the relevant norms of the parameter vectors and the gradients of the loss functions. We detail this application — which yields algorithms for parameter-free online learning and more — below. All of the algorithms in this section are derived using a unified meta-algorithm strategy MULTISCALEOCO. 1This regret bound holds under expectation over the player’s randomization. It is assumed that each gt is selected before the randomized strategy pt is revealed, but may adapt to the distribution over pt. In fact, a slightly stronger version of this bound holds, namely E∑n t=1eit, gt−mini∈[N]∑n t=1ei, gt+ Oci n log(nci⇡i)≤0. A similar strengthening applies to all subsequent bounds. 4 The setup is as follows. We have access to N sub-algorithms, denoted ALGi for i ∈[N]. In round t, each sub-algorithm ALGi produces a prediction wi t ∈Wi, where Wi is a set in a vector space V over R containing 0. Our meta-algorithm is then required to choose one of the predictions wi t. Then, a loss function ft ∶V →R is revealed, whereupon ALGi incurs loss ft(wi t), and the meta-algorithm suffers the loss of the chosen prediction. We make the following assumption on the sub-algorithms: Assumption 1. The sub-algorithms satisfy the following conditions: • For each i ∈[N], there is an associated norm ⋅(i) such that supw∈Wiw(i) ≤Ri. • For each i ∈[N], the sequence of functions ft are Li-Lipschitz on Wi with respect to ⋅(i). • For each sub-algorithm ALGi, the iterates (wi t)t≤n enjoy a regret bound ∑n t=1 ft(wi t) − infw∈Wi ∑n t=1 ft(w) ≤Regn(i), where Regn(i) may be data- or algorithm-dependent. Algorithm 4 procedure MULTISCALEOCO({ALGi, Ri, Li}i∈[N], ⇡) ▷Collection of sub-algorithms, prior ⇡. c ←(Ri ⋅Li)i∈[N] ▷Sub-algorithm scale parameters. for t = 1, . . . , n do wi t ←ALGi( ˜f1, . . . , ˜ft−1) for each i ∈A. it ←MULTISCALEFTPL[c, ⇡](g1, . . . , gt−1). Play wt = wit t . Observe loss function ft and let ˜ft(w) = ft(w) −ft(0). gt ←˜ft(wi t)i∈[N]. end for end procedure In most applications, Wi will be a convex set and ft a convex function; this convexity is not necessary to prove a regret bound for the meta-algorithm. We simply need boundedness of the set Wi and Lipschitzness of the functions ft, as specified in Assumption 1. This assumption implies that for any i, we have ft(w) −ft(0)≤RiLi for any w ∈Wi. Thus, we can design a meta-algorithm for this setup by using MULTISCALEFTPL with ci = RiLi, which is precisely what is described in Algorithm 4. The following theorem provides a bound on the regret of MULTISCALEOCO; a direct consequence of Theorem 1. Theorem 2. Without loss of generality, assume that RiLi ≥12. Suppose that the inputs to Algorithm 4 satisfy Assumption 1. Then the iterates (wt)t≤n returned by Algorithm 4 follow the regret bound E n t=1 ft(wt) −inf w∈Wi n t=1 ft(w)≤E[Regn(i)] + ORiLi nlog(RiLin⇡i) ∀i ∈[N]. (5) Theorem 2 shows that if we use Algorithm 4 to aggregate the iterates produced by a collection of sub-algorithms (ALGi)i∈[N], the regret against any sub-algorithm i will only depend on that algorithm’s scale, not the regret of the worst sub-algorithm. Application 1: Parameter-free online learning in uniformly convex Banach spaces. As the first application of our framework, we give a generalization of the parameter-free online learning bounds found in [25; 27; 30; 31; 10] from Hilbert spaces to arbitrary uniformly convex Banach spaces. Recall that a Banach space (B,⋅) is (2,λ)-uniformly convex if 1 2⋅2 is λ-strongly convex with respect to itself [32]. Our algorithm obtains a generalization of the oracle inequality (3) for any uniformly convex (B,⋅) by running multiple instances of Mirror Descent — the workhorse of online convex optimization — and aggregating their iterates using MULTISCALEOCO. This strategy is thus efficient whenever Mirror Descent can be implemented efficiently. The collection of sub-algorithms used by MULTISCALEOCO, which was alluded to at the beginning of this section is as follows: For each 1 ≤i ≤N ∶= n + 1, set Ri = ei−1, Li = L, Wi = {w ∈B w≤Ri}, ⌘i = Ri L λ n, and ALGi = MIRRORDESCENT(⌘i,Wi,⋅2). Finally, set ⇡= Uniform([n + 1]). Mirror Descent is reviewed in detail in Appendix A.2 in the supplementary material, but the only feature of its performance of importance to our analysis is that, when configured as described above, the 2For notational convenience all Lipschitz bounds are assumed to be at least 1 without loss of generality for the remainder of the paper. 5 iterates (wi t)t≤n produced by ALGi specified above will satisfy ∑n t=1 ft(wi t) −infw∈Wi ∑n t=1 ft(w) ≤ O(RiL √ λn) on any sequence of losses that are L-Lipschitz with respect to ⋅. Using just this simple fact, combined with the regret bound for MULTISCALEOCO and a few technical details in Appendix A.2, we can deduce the following parameter-free learning oracle inequality: Theorem 3 (Oracle inequality for uniformly convex Banach spaces). The iterates (wt)t≤n produced by MULTISCALEOCO on any L-Lipschitz (w.r.t. ⋅) sequence of losses (ft)t≤n satisfy E n t=1 ft(wt) − n t=1 ft(w)≤OL ⋅(w+ 1) n ⋅log((w+ 1)Ln)λ ∀w ∈B. (6) Note that the above oracle inequality applies for any uniformly convex norm ⋅. Previous results only obtain bounds of this form efficiently when ⋅is a Hilbert space norm. As is standard for such oracle inequality results, the bound is weaker than the optimal bound if wwere selected in advance, but only by a mild log((w+ 1)Ln) factor. Proposition 1. The algorithm can be implemented in time O(TMD ⋅poly(n)) per iteration, where TMD is the time complexity of a single Mirror Descent update. In the example above, the (2,λ)-uniform convexity condition was mainly chosen for familiarity. The result can easily be generalized to related notions such as q-uniform convexity (see [37]). More generally, the approach can be used to derive oracle inequalities with respect to general strongly convex regularizer R defined over the space W. Such a bound would have the form OL ⋅ n(R(w) + 1) ⋅log((R(w) + 1)n)for typical choices of R. This example captures well-known quantile bounds [22] when one takes R to be the KL-divergence and W to be the simplex, or, in the matrix case, takes R to be the quantum relative entropy and W to be the set of density matrices, as in [18]. Application 2: Oracle inequality for many `p norms. It is instructive to think of MULTISCALEOCO as executing a (scale-sensitive) online analogue of the structural risk minimization principle. We simply specify a set of subclasses and a prior ⇡specifying the importance of each subclass, and we are guaranteed that the algorithm’s performance matches that of each sub-class, plus a penalty depending on the prior weight placed on that subclass. The advantage of this approach is that the nested structure used in the Theorem 3 is completely inessential. This leads to the exciting prospect of developing parameter-free algorithms over new and exotic set systems. One such example is given now: The MULTISCALEOCO framework allows us to obtain an oracle inequality with respect to many `p norms in Rd simultaneously. To the best of our knowledge all previous works on parameter-free online learning have only provided oracle inequalities for a single norm. Theorem 4. Fix δ > 0. Suppose that the loss functions (ft)t≤n are Lp-Lipschitz w.r.t. ⋅p′ for each p ∈[1 + δ,2]. Then there is a computationally efficient algorithm that guarantees regret E n t=1 ft(wt) − n t=1 ft(w)≤O(wp + 1)Lp nlog((wp + 1)Lp log(d)n)(p −1) (7) for all w ∈Rd and all p ∈[1 + δ,2]. The configuration in the above theorem is described in full in Appendix A.2 in the supplementary material. This strategy can be trivially extended to handle p in the range (2,∞). The inequality holds for p ≥1 + δ rather than for p ≥1 because the `1 norm is not uniformly convex, but this is easily rectified by changing the regularizer at p = 1; we omit this for simplicity of presentation. We emphasize that the choice of `p norms for the result above was somewhat arbitrary — any finite collection of norms will also work. For example, the strategy can also be applied to matrix optimization over Rd×d by replacing the `p norm with the Schatten Sp norm. The Schatten Sp norm has strong convexity parameter on the order of p −1 (which matches the `p norm up to absolute constants [2]) so the only change to practical change to the setup in Theorem 4 will be the running time TMD. Likewise, the approach applies to (p,q)-group norms as used in multi-task learning [20]. Application 3: Adapting to rank for online PCA For the online PCA task, the learner predicts from a class Wk = W ∈Rd×d W 0,Wσ ≤1,W,I= k. For a fixed value of k, such a class is 6 a convex relaxation of the set of all rank k projection matrices. After producing a prediction Wt, we experience affine loss functions ft(Wt) = I −Wt,Yt, where Yt ∈Y ∶= Y ∈Rd×d Y 0,Y σ ≤1. We leverage an analysis of online PCA due to [29] together with MULTISCALEOCO to derive an algorithm that competes with many values of the rank simultaneously. This gives the following result: Theorem 5. There is an efficient algorithm for Online PCA with regret bound E n t=1 I −Wt, Yt− min W projection rank(W )=k n t=1 I −W, Yt ≤̃ Ok√n ∀k ∈[d2]. For a fixed value of k, the above bound is already optimal up to log factors, but it holds for all k simultaneously. Application 4: Adapting to norm for Matrix Multiplicative Weights In the MATRIX MULTIPLICATIVE WEIGHTS setting [1] we consider hypothesis classes of the form Wr = W ∈Rd×d W 0,W⌃≤r. Losses are given by ft(W) = W,Yt, where Ytσ ≤1. For a fixed value of r, the well-known MATRIX MULTIPLICATIVE WEIGHTS strategy has regret against Wr bounded by O(r√nlog d). Using this strategy for fixed r as a sub-algorithm for MULTISCALEOCO, we achieve the following oracle inequality efficiently: Theorem 6. There is an efficient matrix prediction strategy with regret bound E n t=1 Wt,Yt− n t=1 W,Yt≤(W⌃+ 1) nlog dlog((W⌃+ 1)n)) ∀W 0. (8) A remark on efficiency All of our algorithms that provide bounds of the form (6) instantiate O(n) experts with MULTISCALEFTPL because, in general, the worst case w for achieving (6) can have norm as large as en. If one has an a priori bound — say B — on the range at which each ft attains its minimum, then the number of experts be reduced to O(log(B)). 2.3 Supervised learning We now consider the online supervised learning setting (Protocol 2), with the goal being to compete with a sequence of hypothesis classes (Fk)k∈[N] simultaneously. Working in this setting makes clear a key feature of the meta-algorithm approach we have adopted: We can efficiently obtain online oracle inequalities for arbitrary nonlinear function classes — so long as we have an efficient algorithm for each Fk. We obtain a supervised learning meta-algorithm by simply feeding the observed losses `(⋅,yt) (which may even be non-convex) to the meta-algorithm MULTISCALEFTPL in the same fashion as MULTISCALEOCO. The resulting strategy, which is described in detail in Appendix A.3 for completeness, is called MULTISCALELEARNING. We make the following assumptions analogous to Assumption 1, which lead to the performance guarantee for MULTISCALELEARNING given in Theorem 7 below. Assumption 2. The sub-algorithms used by MULTISCALELEARNING satisfy the following conditions: • For each i ∈[N], the iterates (ˆyi t)t≤n produced by sub-algorithm ALGi satisfy ˆyi t≤Ri. • For each i ∈[N], the function `(⋅,yt) is Li-Lipschitz on [−Ri,Ri]. • For each sub-algorithm ALGi, the iterates (ˆyi t)t≤n enjoy a regret bound ∑n t=1 `(ˆyi t,yt) − inff∈Fi ∑n t=1 `(f(xt),yt) ≤Regn(i), where Regn(i) may be data- or algorithmdependent. Theorem 7. Suppose that the inputs to Algorithm 5 satisfy Assumption 2. Then the iterates (ˆyt)t≤n produced by the algorithm enjoy the regret bound E n t=1 `(ˆyi t, yt) −inf f∈Fi n t=1 `(f(xt), yt)≤E[Regn(i)] + ORiLi n log(RiLin⇡i) ∀i ∈[N]. (9) 7 Online penalized risk minimization In the statistical learning setting, oracle inequalities for arbitrary sequences of hypothesis classes F1,...,FN are readily available. Such inequalities are typically stated in terms of complexity parameters for the classes (Fk) such as VC dimension or Rademacher complexity. For the online learning setting, it is well-known that sequential Rademacher complexity Radn(F) provides a sequential counterpart to these complexity measures [33], meaning that it generically characterizes the minimax optimal regret for Lipschitz losses. We will obtain an oracle inequality in terms of this parameter. Assumption 3. The sequence of hypothesis classes F1,...,FN are such that 1. There is an efficient algorithm ALGk producing iterates (ˆyk t )t≤n satisfying ∑n t=1 `(ˆyk t ,yt) − inff∈Fk ∑n t=1 `(f(xt),yt) ≤C ⋅L ⋅Radn(Fk) for any L-Lipschitz loss, where C is some constant. (an algorithm with this regret is always guaranteed to exist, but may not be efficient). 2. Each Fk has output range [−Rk,Rk], where Rk ≥1 without loss of generality. 3. Radn(Fk) = ⌦(Rk √n) — this is obtained by most non-trivial classes. Theorem 8 (Online penalized risk minimization). Under Assumption 3 there is an efficient (in N) algorithm that achieves the following regret bound for any L-Lipschitz loss: E n t=1 `(ˆyt, yt) −inf f∈Fk n t=1 `(f(xt), yt)≤OL ⋅Radn(Fk) ⋅ log(L ⋅Radn(Fk) ⋅k) ∀k ∈[N]. (10) As in the previous section, one can derive tighter regret bounds and more efficient (e.g. sublinear in N) algorithms if F1,F2,... are nested. Application: Multiple kernel learning Theorem 9. Let H1,...,HN be reproducing kernel Hilbert spaces for which each Hk has a kernel K such that supx∈X K(x,x) ≤Bk. Then there is an efficient learning algorithm that guarantees E n t=1 `(ˆyt, yt) − n t=1 `(f(xt), yt)≤OLBk(fHk + 1) log(LBkkn(fHk + 1)) ∀k, ∀f ∈Hk for any L-Lipschitz loss, whenever an efficient algorithm is available for the norm ball in each Hk. 3 Discussion and Further Directions Related work There are two directions in parameter-free online learning that have been explored extensively. The first considers bounds of the form (3); namely, the Hilbert space version of the more general setting explored in Section 2.2. Beginning with [26], which obtained a slightly looser rate than (3), research has focused on obtaining tighter dependence on w2 and log(n) in this type of bound [25; 27; 30; 31]; all of these algorithms run in linear time per update step. Recent work [10; 11] has extended these results to the case where the Lipschitz constant is not known in advance. These works give lower bounds for general norms, but only give efficient algorithms for Hilbert spaces. Extending Algorithm 4 to reach the Pareto frontier of regret in the unknown Lipschitz setting as described in [11] may be an interesting direction for future research. The second direction concerns so-called “quantile bounds” [9; 22; 23; 31] for experts setting, where the learner’s decision set W is the simplex ∆d and losses are bounded in `∞. The multi-scale machinery developed in the present work is not needed to obtain bounds for this setting because the losses are uniformly bounded across all model classes. Indeed, [14] recovered a basic form of quantile bound using the vanilla multiplicative weights strategy as a meta-algorithm. It is not known whether the more sophisticated data-dependent quantile bounds given in [22; 23] can be recovered in the same fashion. Losses with curvature. The O(√n)-type regret bounds provided by Algorithm 3 are appropriate when the sub-algorithms themselves incur O(√n) regret bounds. However, assuming certain curvature properties (such as strong convexity, exp-concavity, stochastic mixability, etc. [16; 38]) of the loss functions it is possible to construct sub-algorithms that admit significantly more favorable regret bounds (O(log n) or even O(1)). These are also referred to as “fast rates” in online learning. A natural direction for further study is to design a meta-algorithm that admits logarithmic or constant 8 regret to each sub-algorithm, assuming that the loss functions of interest satisfy similar curvature properties, with the regret to each individual sub-algorithm adapted to the curvature parameters for that sub-algorithm. Perhaps surprisingly, for the special case of the logistic loss, improper prediction and aggregation strategies similar to those proposed in this paper offer a way to circumvent known proper learning lower bounds [17]. This approach will be explored in detail in a forthcoming companion paper. Computational efficiency. We suspect that a running-time of O(n) to obtain inequalities like (6) may be unavoidable through our approach, since we do not make use of the relationship between sub-algorithms beyond using the nested class structure. Whether the runtime of MULTISCALEFTPL can be brought down to match O(n) is an open question. This boils down to whether or not the min-max optimization problem in the algorithm description can simultaneously be solved in 1) Linear time in the number of experts 2) strongly polynomial time in the scales ci. Acknowledgements We thank Francesco Orabona and D´avid P´al for inspiring initial discussions. Part of this work was done while DF was an intern at Google Research and while DF and KS were visiting the Simons Institute for the Theory of Computing. DF is supported by the NDSEG fellowship. References [1] Sanjeev Arora, Elad Hazan, and Satyen Kale. The multiplicative weights update method: a meta-algorithm and applications. Theory of Computing, 8(1):121–164, 2012. [2] Keith Ball, Eric A Carlen, and Elliott H Lieb. Sharp uniform convexity and smoothness inequalities for trace norms. Inventiones mathematicae, 115(1):463–482, 1994. [3] Peter L. Bartlett and Shahar Mendelson. Rademacher and Gaussian complexities: risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2003. ISSN 15324435. [4] Peter L. Bartlett, St´ephane Boucheron, and G´abor Lugosi. Model selection and error estimation. Machine Learning, 48(1-3):85–113, 2002. [5] Shai Ben-David, David Pal, and Shai Shalev-Shwartz. Agnostic online learning. In Proceedings of the 22th Annual Conference on Learning Theory, 2009. [6] St´ephane Boucheron, G´abor Lugosi, and Pascal Massart. Concentration inequalities: A nonasymptotic theory of independence. Oxford university press, 2013. [7] Sebastien Bubeck, Nikhil Devanur, Zhiyi Huang, and Rad Niazadeh. Online auctions and multiscale online learning. Accepted to The 18th ACM conference on Economics and Computation (EC 17), 2017. [8] Nicolo Cesa-Bianchi and Gabor Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [9] Kamalika Chaudhuri, Yoav Freund, and Daniel J Hsu. A parameter-free hedging algorithm. In Advances in neural information processing systems, pages 297–305, 2009. [10] Ashok Cutkosky and Kwabena A Boahen. Online convex optimization with unconstrained domains and losses. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 748–756. 2016. [11] Ashok Cutkosky and Kwabena A. Boahen. Online learning without prior information. The 30th Annual Conference on Learning Theory, 2017. [12] Steven De Rooij, Tim Van Erven, Peter D Gr¨unwald, and Wouter M Koolen. Follow the leader if you can, hedge if you must. Journal of Machine Learning Research, 15(1):1281–1316, 2014. 9 [13] Luc Devroye, L´azl´o Gy¨orfi, and G´abor Lugosi. A Probabilistic Theory of Pattern Recognition. Springer, 1996. [14] Dylan J Foster, Alexander Rakhlin, and Karthik Sridharan. Adaptive online learning. In Advances in Neural Information Processing Systems, pages 3375–3383, 2015. [15] Elad Hazan. Introduction to online convex optimization. Foundations and Trends® in Optimization, 2(3-4):157–325, 2016. [16] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [17] Elad Hazan, Tomer Koren, and Kfir Y Levy. Logistic regression: Tight bounds for stochastic and online optimization. In Proceedings of The 27th Conference on Learning Theory, pages 197–209, 2014. [18] Elad Hazan, Satyen Kale, and Shai Shalev-Shwartz. Near-optimal algorithms for online matrix prediction. SIAM J. Comput., 46(2):744–773, 2017. doi: 10.1137/120895731. [19] Sham M. Kakade, Karthik Sridharan, and Ambuj Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In Advances in Neural Information Processing Systems 21, pages 793–800. MIT Press, 2009. [20] Sham M Kakade, Shai Shalev-Shwartz, and Ambuj Tewari. Regularization techniques for learning with matrices. Journal of Machine Learning Research, 13(Jun):1865–1890, 2012. [21] Vladimir Koltchinskii. Rademacher penalties and structural risk minimization. IEEE Trans. Information Theory, 47(5):1902–1914, 2001. [22] 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, pages 1155–1175, 2015. [23] Haipeng Luo and Robert E Schapire. Achieving all with no parameters: Adanormalhedge. In Conference on Learning Theory, pages 1286–1304, 2015. [24] Pascal Massart. Concentration inequalities and model selection. Lecture Notes in Mathematics, 1896, 2007. [25] Brendan McMahan and Jacob Abernethy. Minimax optimal algorithms for unconstrained linear optimization. In Advances in Neural Information Processing Systems, pages 2724–2732, 2013. [26] Brendan Mcmahan and Matthew Streeter. No-regret algorithms for unconstrained online convex optimization. In Advances in neural information processing systems, pages 2402–2410, 2012. [27] H. Brendan McMahan and Francesco Orabona. Unconstrained online linear learning in hilbert spaces: Minimax algorithms and normal approximations. In Proceedings of The 27th Conference on Learning Theory, pages 1020–1039, 2014. [28] Arkadi Nemirovski. Prox-method with rate of convergence O(1/t) for variational inequalities with Lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM Journal on Optimization, 15(1):229–251, 2004. [29] Jiazhong Nie, Wojciech Kotłowski, and Manfred K Warmuth. Online pca with optimal regrets. In International Conference on Algorithmic Learning Theory, pages 98–112. Springer, 2013. [30] Francesco Orabona. Simultaneous model selection and optimization through parameter-free stochastic learning. In Advances in Neural Information Processing Systems, pages 1116–1124, 2014. [31] Francesco Orabona and D´avid P´al. From coin betting to parameter-free online learning. arXiv preprint arXiv:1602.04128, 2016. [32] Gilles Pisier. Martingales in banach spaces (in connection with type and cotype). course ihp, feb. 2–8, 2011. 2011. 10 [33] Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning: Random averages, combinatorial parameters, and learnability. Advances in Neural Information Processing Systems 23, pages 1984–1992, 2010. [34] Alexander. Rakhlin, Ohad Shamir, and Karthik Sridharan. Relax and randomize: From value to algorithms. In Advances in Neural Information Processing Systems 25, pages 2150–2158, 2012. [35] James Renegar. A polynomial-time algorithm, based on newton’s method, for linear programming. Mathematical Programming, 40(1):59–93, 1988. [36] John Shawe-Taylor, Peter L Bartlett, Robert C Williamson, and Martin Anthony. Structural risk minimization over data-dependent hierarchies. IEEE transactions on Information Theory, 44 (5):1926–1940, 1998. [37] Nati Srebro, Karthik Sridharan, and Ambuj Tewari. On the universality of online mirror descent. In Advances in neural information processing systems, pages 2645–2653, 2011. [38] Tim van Erven, Peter D. Gr¨unwald, Nishant A. Mehta, Mark D. Reid, and Robert C. Williamson. Fast rates in statistical and online learning. Journal of Machine Learning Research, 16:1793– 1861, 2015. [39] Vladimir Vapnik. Estimation of dependences based on empirical data, volume 40. SpringerVerlag New York, 1982. [40] Vladimir Vapnik and Alexey Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and its Applications, 16(2):264–280, 1971. 11 | 2017 | 425 |
6,925 | Predicting User Activity Level In Point Processes With Mass Transport Equation Yichen Wang⇧, Xiaojing Ye⇤, Hongyuan Zha⇧, Le Song⇧† ⇧College of Computing, Georgia Institute of Technology ⇤School of Mathematics, Georgia State University † Ant Financial {yichen.wang}@gatech.edu, xye@gsu.edu {zha,lsong}@cc.gatech.edu Abstract Point processes are powerful tools to model user activities and have a plethora of applications in social sciences. Predicting user activities based on point processes is a central problem. However, existing works are mostly problem specific, use heuristics, or simplify the stochastic nature of point processes. In this paper, we propose a framework that provides an efficient estimator of the probability mass function of point processes. In particular, we design a key reformulation of the prediction problem, and further derive a differential-difference equation to compute a conditional probability mass function. Our framework is applicable to general point processes and prediction tasks, and achieves superb predictive and efficiency performance in diverse real-world applications compared to the state of the art. 1 Introduction Online social platforms, such as Facebook and Twitter, enable users to post opinions, share information, and influence peers. Recently, user-generated event data archived in fine-grained temporal resolutions are becoming increasingly available, which calls for expressive models and algorithms to understand, predict and distill knowledge from complex dynamics of these data. Particularly, temporal point processes are well-suited to model the event pattern of user behaviors and have been successfully applied in modeling event sequence data [6, 10, 12, 21, 23, 24, 25, 26, 27, 28, 33]. A fundamental task in social networks is to predict user activity levels based on learned point process models. Mathematically, the goal is to compute E[f(N(t))], where N(·) is a given point process that is learned from user behaviors, t is a fixed future time, and f is an application-dependent function. A framework for doing this is critically important. For example, for social networking services, an accurate inference of the number of reshares of a post enables the network moderator to detect trending posts and improve its content delivery networks [13, 32]; an accurate estimate of the change of network topology (the number of new followers of a user) facilitates the moderator to identify influential users and suppress the spread of terrorist propaganda and cyber-attacks [12]; an accurate inference of the activity level (number of posts in the network) allows us to gain fundamental insight into the predictability of collective behaviors [22]. Moreover, for online merchants such as Amazon, an accurate estimate of the number of future purchases of a product helps optimizing future advertisement placements [10, 25]. Despite the prevalence of prediction problems, an accurate prediction is very challenging for two reasons. First, the function f is arbitrary. For instance, to evaluate the homogeneity of user activities, we set f(x) = x log(x) to compute the Shannon entropy; to measure the distance between a predicted activity level and a target x⇤, we set f(x) = (x −x⇤)2. However, most works [8, 9, 13, 30, 31, 32] are problem specific and only designed for the simple task with f(x) = x; hence these works are 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Simulate point process on 0, # Construct conditional intensity Compute conditional mass function on [0,#] Average &'( ) = {#),#,, #-} / 0 &1( ) , 0 ∈[0,#] # /(0|&1( , ) &'( , = {#),#,, #-} time # #) #, #1 x 0 1 0 = # # #) #, #0 0 67,(8,0) 67) 8, 0 0 = 0 (a) Samples of Hawkes process (b) Intensity functions (c) Mass transport from 0 to # (d) Unbiased estimator #) #, #0 Figure 1: An illustration of HYBRID using Hawkes process (Eq. 1). Our method first generates two samples {Hi t−} of events; then it constructs intensity functions; with these inputs, it computes conditional probability mass functions ˜φi(x, s) := P[N(s) = x|Hi s−] using a mass transport equation. Panel (c) shows the transport of conditional mass at four different times (the initial probability mass ˜φ(x, 0) is an indicator function I[x = 0], as there is no event with probability one). Finally, the average of conditional mass functions yields our estimator of the probability mass. not generalizable. Second, point process models typically have intertwined stochasticity and can co-evolve over time [12, 25], e.g., in the influence propagation problem, the information diffusion over networks can change the structure of networks, which adversely influences the diffusion process [12]. However, previous works often ignore parts of the stochasticity in the intensity function [29] or make heuristic approximations [13, 32]. Hence, there is an urgent need for a method that is applicable to an arbitrary function f and keeps all the stochasticity in the process, which is largely nonexistent to date. We propose HYBRID, a generic framework that provides an efficient estimator of the probability mass of point processes. Figure 1 illustrates our framework. We also make the following contributions: • Unifying framework. Our framework is applicable to general point processes and does not depend on specific parameterization of intensity functions. It incorporates all stochasticity in point processes and is applicable to prediction tasks with an arbitrary function f. • Technical challenges. We reformulate the prediction problem and design a random variable with reduced variance. To derive an analytical form of this random variable, we also propose a mass transport equation to compute the conditional probability mass of point processes. We further transform this equation to an Ordinary Differential Equation and provide a scalable algorithm. • Superior performance. Our framework significantly reduces the sample size to estimate the probability mass function of point processes in real-world applications. For example, to infer the number of tweeting and retweeting events of users in the co-evolution model of information diffusion and social link creation [12], our method needs 103 samples and 14.4 minutes, while Monte Carlo needs 106 samples and 27.8 hours to achieve the same relative error of 0.1. 2 Background and preliminaries Point processes. A temporal point process [1] is a random process whose realization consists of a set of discrete events {tk}, localized in time. It has been successfully applied to model user behaviors in social networks [16, 17, 19, 23, 24, 25, 28, 30]. It can be equivalently represented as a counting process N(t), which records the number of events on [0, t]. The counting process is a right continuous step function, i.e., if an event happens at t, N(t) −N(t−) = 1. Let Ht−= {tk|tk < t} be the history of events happened up to time t. An important way to characterize point processes is via the conditional intensity function λ(t) := λ(t|Ht−), a stochastic model for the time of the next event given the history. Formally, λ(t) is the conditional probability of observing an event in [t, t + dt) given events on [0, t), i.e., P {event in [t, t + dt)|Ht−} = E[dN(t)|Ht−] := λ(t)dt, where dN(t) 2 {0, 1}. The intensity function is designed to capture the phenomena of interest. Some useful forms include (i) Poisson process: the intensity is a deterministic function, and (ii) Hawkes process [15]: it captures the mutual excitation phenomena between events and its intensity is parameterized as λ(t) = ⌘+ ↵ X tk2Ht−(t −tk), (1) 2 where ⌘> 0 is the baseline intensity; the trigging kernel (t) = exp(−t) models the decay of past events’ influence over time; ↵> 0 quantifies the strength of influence from each past event. Here, the occurrence of each historical event increases the intensity by a certain amount determined by (t) and ↵, making λ(t) history-dependent and a stochastic process by itself. Monte Carlo (MC). To compute the probability mass of a point process, MC simulates n realizations of history {Hi t} using the thinning algorithm [20]. The number of events in sample i is defined as N i(t) = |Hi t|. Let φ(x, t) := P[N(t) = x], where x 2 N, be the probability mass. Then its estimator ˆφmc n (x, t) and the estimator ˆµmc n (t) for µ(t) := E[f(N(t))] are defined as ˆφmc n (x, t) = 1 n P i I[N i(t) = x] and ˆµmc n (t) = 1 n P i f(N i(t)). The root mean square error (RMSE) is defined as "(ˆµmc n (t)) = p E[ˆµmc n (t) −µ(t)]2 = p VAR[f(N(t))]/n. (2) 3 Solution overview Given an arbitrary point process N(t) that is learned from data, existing prediction methods for computing E[f(N(t))] have three major limitations: • Generalizability. Most methods [8, 9, 13, 30, 31, 32] only predict E[N(t)] and are not generalizable to an arbitrary function f. Moreover, they typically rely on specific parameterizations of the intensity functions, such as the reinforced Poisson process [13] and Hawkes process [5, 32]; hence they are not applicable to general point processes. • Approximation and heuristics. These works also ignore parts of the stochasticity in the intensity functions [29] or make heuristic approximations to the point process [13, 32]. Hence the accuracy is limited by the approximations and heuristic corrections. • Large sample size. The MC method overcomes the above limitations since it has an unbiased estimator of the probability mass. However, the high stochasticity in point processes leads to a large value of VAR[f(N(t))], which requires a large number of samples to achieve a small error. To address these challenges, we propose a generic framework with a novel estimator of the probability mass, which has a smaller sample size than MC. Our framework has the following key steps. I. New random variable. We design a random variable g(Ht−), a conditional expectation given the history. Its variance is guaranteed to be smaller than that of f(N(t)). For a fixed number of samples, the error of MC is decided by the variance of the random variable of interest, as shown in (2). Hence, to achieve the same error, applying MC to estimate the new objective EHt−[g(Ht−)] requires smaller number of samples compared with the procedure that directly estimates E[f(N(t))]. II. Mass transport equation. To compute g(Ht−), we derive a differential-difference equation that describes the evolutionary dynamics of the conditional probability mass P[N(t) = x|Ht−]. We further formulate this equation as an Ordinary Differential Equation, and provide a scalable algorithm. 4 Hybrid inference machine with probability mass transport In this section, we present technical details of our framework. We first design a new random variable for prediction; then we propose a mass transport equation to compute this random variable analytically. Finally, we combine the mass transport equation with the sampling scheme to compute the probability mass function of general point processes and solve prediction tasks with an arbitrary function f. 4.1 New random variable with reduced variance We reformulate the problem and design a new random variable g(Ht−), which has a smaller variance than f(N(t)) and the same expectation. To do this, we express E[f(N(t))] as an iterated expectation E[f(N(t))] = EHt− h EN(t)|Ht− ⇥ f(N(t))|Ht−⇤i = EHt− h g(Ht−) i , (3) where EHt−is w.r.t. the randomness of the history and EN(t)|Ht−is w.r.t. the randomness of the point process given the history. We design the random variable as a conditional expectation given the history: g(Ht−) = EN(t)|Ht−[f(N(t))|Ht−]. Theorem 1 shows that it has a smaller variance. 3 Theorem 1. For time t > 0 and an arbitrary function f, we have VAR[g(Ht−)] < VAR[f(N(t))]. Theorem 1 extends the Rao-Blackwell (RB) theorem [3] to point processes. RB says that if ˆ✓is an estimator of a parameter ✓and T is a sufficient statistic for ✓; then VAR[E[ˆ✓|T]] 6 VAR[ˆ✓], i.e., the sufficient statistic reduces uncertainty of ˆ✓. However, RB is not applicable to point processes since it studies a different problem (improving the estimator of a distribution’s parameter), while we focus on the prediction problem for general point processes, which introduces two new technical challenges: (i) Is there a definition in point processes whose role is similar to the sufficient statistic in RB? Our first contribution shows that the history Ht−contains all the necessary information in a point process and reduces the uncertainty of N(t). Hence, g(Ht−) is an improved variable for prediction. Moreover, in contrast to the RB theorem, the inequality in Theorem 1 is strict because the counting process N(t) is right-continuous in time t and not predictable [4] (a predictable process is measurable w.r.t. Ht−, such as the processes that are left-continuous). Appendix C contains details on the proof. (ii) Is g(Ht−) computable for general point processes and an arbitrary function f? An efficient computation will enable us to estimate EHt−[g(Ht−)] using the sampling method. Specifically, let ˆµn(t) = 1 n P i g(Hi t−) be the estimator computed from n samples; then from the definition of RMSE in (2), this estimator has smaller error than MC: "(ˆµn(t)) < "(ˆµmc n (t)). However, the challenge in our new formulation is that it seems very hard to compute this conditional expectation, as one typically needs another round of sampling, which is undesirable as it will increase the variance of the estimator. To address this challenge, next we propose a mass transport equation. 4.2 Transport equation for conditional probability mass function We present a novel mass transport equation that computes the conditional probability mass ˜φ(x, t) := P[N(t) = x|Ht−] of general point processes. With this definition, we derive an analytical expression for the conditional expectation: g(Ht−) = P x f(x)˜φ(x, t). The transport equation is as follows. Theorem 2 (Mass Transport Equation for Point Processes). Let λ(t) := λ(t|Ht−) be the conditional intensity function of the point process N(t) and ˜φ(x, t) := P[N(t) = x|Ht−] be its conditional probability mass function; then ˜φ(x, t) satisfies the following differential-difference equation: ˜φt(x, t) " rate of change in conditional mass := @ ˜φ(x, t) @t = 8 > < > : −λ(t)˜φ(x, t) if x = 0 −λ(t)˜φ(x, t) | {z } loss in mass, at rate λ(t) + λ(t)˜φ(x −1, t) | {z } gain in mass, at rate λ(t) if x = 1, 2, 3, · · · (4) Proof sketch. For the simplicity of notation, we set the right-hand-side of (4) to be F[˜φ], where F is a functional operator on ˜φ. We also define the inner product between functions u : N ! R and v : N ! R as (u, v) := P x u(x)v(x). The main idea in our proof is to show that the equality (v, ˜φt) = (v, F[˜φ]) holds for any test function v; then ˜φt = F[˜φ] follows from the fundamental lemma of the calculus of variations [14]. Specifically, the proof contains two parts as follows. We first prove (v, ˜φt) = (B[v], ˜φ), where B[v] is a functional operator defined as B[v] = (v(x + 1) −v(x))λ(t). This equality can be proved by the property of point processes and the definition of conditional mass. Second, we show (B[v], ˜φ) = (v, F[˜φ]) using a variable substitution technique. Mathematically, this equality means B and F are adjoint operators on the function space. Combining these two equalities yields the mass transport equation. Appendix A contains details on the proof. Mass transport dynamics. This differential-difference equation describes the time evolution of the conditional mass. Specifically, the differential term ˜φt, i.e., the instantaneous rate of change in the probability mass, is equal to a first order difference equation on the right-hand-side. This difference equation is a summation of two terms: (i) the negative loss of its own probability mass ˜φ(x, t) at rate λ(t), and (ii) the positive gain of probability mass ˜φ(x −1, t) from last state x −1 at rate λ(t). Moreover, since initially no event happens with probability one, we have ˜φ(x, 0) = I[x = 0]. Solving this transport equation on [0, t] essentially transports the initial mass to the mass at time t. 4 Algorithm 1: CONDITIONAL MASS FUNCTION Input: Ht−= {tk}K k=1, ∆⌧, set t = tK+1 Output: Conditional probability mass function ˜φ(t) for k = 0, · · · K do Construct λ(s) and Q(s) on [tk, tk+1] ; ˜φ(tk+1) = ODE45[ ˜φ(tk), Q(s), ∆⌧)] (RK Alg); end Set ˜φ(t) = ˜φ(tK+1) Algorithm 2: HYBRID MASS TRANSPORT Input: Sample size n, time t, ∆⌧ Output: ˆµn(t), ˆφn(x, t) Generate n samples of point process: ! Hi t− n i=1; for i = 1, · · · , n do ˜φi(x, t) = COND-MASS-FUNC(Hi t−, ∆⌧); end ˆφn(x, t) = 1 n P i ˜φi(x, t), ˆµn(t) = P x f(x)ˆφn(x, t) 4.3 Mass transport as a banded linear Ordinary Differential Equation (ODE) To efficiently solve the mass transport equation, we reformulate it as a banded linear ODE. Specifically, we set the upper bound for x to be M, and set ˜φ(t) to be a vector that includes the value of ˜φ(x, t) for each integer x: ˜φ(t) = (˜φ(0, t), ˜φ(1, t), · · · , ˜φ(M, t))>. With this representation of the conditional mass, the mass transport equation in (4) can be expressed as a simple banded linear ODE: ˜φ(t)0 = Q(t) ˜φ(t), (5) where ˜φ(t)0 = (˜φt(0, t), · · · , ˜φt(M, t))>, and the matrix Q(t) is a sparse bi-diagonal matrix with Qi,i = −λ(t) and Qi−1,i = λ(t). The following equation visualizes the ODE in (5) when M = 2. 0 @ ˜φt(0, t) ˜φt(1, t) ˜φt(2, t) 1 A = −λ(t) λ(t) −λ(t) λ(t) −λ(t) ! 0 @ ˜φ(0, t) ˜φ(1, t) ˜φ(2, t) 1 A . (6) This dynamic ODE is a compact representation of the transport equation in (4) and M decides the dimension of the ODE in (5). In theory, M can be unbounded. However, the conditional probability mass is tends to zero when M becomes large. Hence, in practice we choose a finite support {0, 1, · · · , M} for the conditional probability mass function. To choose a proper M, we generate samples from the point process. Suppose the largest number of events in the samples is L, we set M = 2L such that it is reasonably large. Next, with the initial probability mass ˜φ(t0) = (1, 0, · · · , 0)>, we present an efficient algorithm to solve the ODE. 4.4 Scalable algorithm for solving the ODE !" 0 !" $% !" $& !" $' $ $& $% $' $( $& ) * $& $% ) * ,* ∈[$&, $%] )(*) $% $' )(*) $' $ 1 !" $ Figure 2: Illustration of Algorithm 1 using Hawkes process. The intensity is updated after each event tk. Within [tk, tk+1], we use φ(tk) and the intensity λ(s) to solve the ODE and obtain φ(tk+1). We present the algorithm that transports the initial mass ˜φ(t0) to ˜φ(t) by solving the ODE. Since the intensity function is history-dependent and has a discrete jump when an event happens at time tk, the matrix Q(t) in the ODE is discontinuous at tk. Hence we split [0, t] into intervals [tk, tk+1]. On each interval, the intensity is continuous and we can use the classic numerical Runge-Kutta (RK) method [7] to solve the ODE. Figure 2 illustrates the overall algorithm. Our algorithm works as follows. First, with the initial intensity on [0, t1] and ˜φ(t0) as input, the RK method solves the ODE on [0, t1] and outputs ˜φ(t1). Since an event happens at t1, the intensity is updated on [t1, t2]. Next, with the updated intensity and ˜φ(t1) as the initial value, the RK method solves the ODE on [t1, t2] and outputs ˜φ(t2). This procedure repeats for each [tk, tk+1] until time t. Now we present the RK method that solves the ODE on each interval [tk, tk+1]. RK divides this interval into equally-spaced subintervals [⌧i, ⌧i+1], for i = 0, · · · , I and ∆⌧= ⌧i+1 −⌧i. It then conducts linear extrapolation on each subinterval. It starts from ⌧0 = tk and uses ˜φ(⌧0) and the approximation of the gradient ˜φ(⌧0)0 to compute ˜φ(⌧1). Next, ˜φ(⌧1) is taken as the initial value and the process is repeated until ⌧I = tk+1. Appendix D contains details of this method. The RK method approximates the gradient ˜φ(t)0 with different levels of accuracy, called states s. When s = 1, it is the Euler method, which uses the first order approximation ˜φ(⌧i+1) −˜φ(⌧i)/∆⌧. 5 We use the ODE45 solver in MATLAB and choose the stage s = 4 for RK. Moreover, the main computation in the RK method comes from the matrix-vector product. Since the matrix Q(t) is sparse and bi-diagonal with O(M) non-zero elements, the cost for this operation is only O(M). 4.5 Hybrid inference machine with mass transport equation With the conditional probability mass, we are now ready to express g(Ht−) in closed form and estimate EHt−[g(Ht−)] using the MC sampling method. We present our framework HYBRID: (i) Generate n samples {Hi t−} from a point process N(t) with a stochastic intensity λ(t). (ii) For each sample Hi t−, we compute the value of intensity function λ(s|Hi s−), for each s 2 [0, t]; then we solve (5) to compute the conditional probability mass ˜φi(x, t). (iii) We obtain the estimator of the probability mass function φ(x, t) and µ(t) by taking the average: ˆφn(x, t) = 1 n Pn i=1 ˜φi(x, t), ˆµn(t) = P x f(x)ˆφn(x, t) Algorithm 2 summarizes the above procedure. Next, we discuss two properties of HYBRID. First, our framework efficiently uses all event information in each sample. In fact, each event tk influences the transport rate of the conditional probability mass (Figure 2). This feature is in sharp contrast to MC that only uses the information of the total number of events and neglects the differences in event times. For instance, the two samples in Figure 1(a) both have three events and MC treats them equally; hence its estimator is an indicator function ˆφmc n (x, t) = I[x = 3]. However, for HYBRID, these samples have different event information and conditional probability mass functions, and our estimator in Figure 1(d) is much more informative than an indicator function. Moreover, our estimator for the probability mass is unbiased if we can solve the mass transport equation in (4) exactly. To prove this property, we show that the following equality holds for an arbitrary function f: (f, φ) = E[f(N(t))] = EHt−[g(Ht−)] = (f, EHt−[˜φ]). Then EHt−[ˆφn] = φ follows from the fundamental lemma of the calculus of variations [14]. Appendix B contains detailed derivations. In practice, we choose a reasonable finite support for the conditional probability mass in order to solve the mass transport ODE in (5). Hence our estimator is nearly unbiased. 5 Applications and extensions to multi-dimensional point processes In this section, we present two real world applications, where the point process models have intertwined stochasticity and co-evolving intensity functions. Predicting the activeness and popularity of users in social networks. The co-evolution model [12] uses a Hawkes process Nus(t) to model information diffusion (tweets/retweets), and a survival process Aus(t) to model the dynamics of network topology (link creation process). The intensity of Nus(t) depends on the network topology Aus(t), and the intensity of Aus(t) also depends on Nus(t); hence these processes co-evolve over time. We focus on two tasks in this model: (i) inferring the activeness of a user by E[P u Nus(t)], which is the number of tweets and retweets from user s; and (ii) inferring the popularity of a user by E[P u Aus(t)], which is the number of new links created to the user. Predicting the popularity of items in recommender systems. Recent works on recommendation systems [10, 25] use a point process Nui(t) to model user u’s sequential interaction with item i. The intensity function λui(t) denotes user’s interest to the item. As users interact with items over time, the user latent feature uu(t) and item latent feature iu(t) co-evolve over time, and are mutually dependent [25]. The intensity is parameterized as λui(t) = ⌘ui+uu(t)>ii(t), where ⌘ui is a baseline term representing the long-term preference, and the tendency for u to interact with i depends on the compatibility of their instantaneous latent features uu(t)>ii(t). With this model, we can infer an item’s popularity by evaluating E[P u Nui(t)], which is the number of events happened to item i. To solve these prediction tasks, we extend the transport equation to the multivariate case. Specifically, we create a new stochastic process x(t) = P u Nus(t) and compute its conditional mass function. Theorem 3 (Mass Transport for Multidimensional Point Processes). Let Nus(t) be the point process with intensity λus(t), x(t) = PU u=1 Nus(t), and ˜φ(x, t) = P[x(t) = x|Ht−] be the conditional probability mass of x(t); then ˜φ satisfies: ˜φt = − 6 P u λus(t) 7˜φ(x, t) + 6 P u λus(t) 7˜φ(x −1, t). To compute the conditional probability mass, we also solve the ODE in (5), where the diagonal and off-diagonal of Q(t) is now the negative and positive summation of intensities in all dimensions. 6 1 2 3 4 5 Test time (half day) 0.2 0.4 0.6 0.8 MAPE HYBRID MC-1e6 MC-1e3 SEISMIC RPP FPE 0.6 0.65 0.7 0.75 0.8 Training data size in proportion 0.2 0.4 0.6 0.8 MAPE HYBRID MC-1e6 MC-1e3 SEISMIC RPP FPE 1 2 3 4 5 Test time (half day) 0.2 0.4 0.6 0.8 MAPE HYBRID MC-1e6 MC-1e3 FPE 0.6 0.65 0.7 0.75 0.8 Training data size in proportion 0.2 0.4 0.6 0.8 MAPE HYBRID MC-1e6 MC-1e3 FPE (a) MAPE vs. test time (b) MAPE vs. train size (c) MAPE vs. test time (d) MAPE vs. train size Figure 3: Prediction results for user activeness and user popularity. (a,b) user activeness: predicting the number of posts per user; (c,d) user popularity: predicting the number of new links per user. Test times are the relative times after the end of train time. The train data is fixed with 70% of total data. 1 2 3 4 5 Test time (week) 0.2 0.4 0.6 0.8 MAPE HYBRID MC-1e6 MC-1e3 SEISMIC RPP FPE 0.6 0.65 0.7 0.75 0.8 Training data size in proportion 0.2 0.4 0.6 0.8 MAPE 2 4 6 8 10 Test time (day) 0.2 0.4 0.6 0.8 MAPE HYBRID MC-1e6 MC-1e3 SEISMIC RPP FPE 0.6 0.65 0.7 0.75 0.8 Training data size in proportion 0.2 0.4 0.6 0.8 MAPE (a) MAPE vs. test time (b) MAPE vs. train size (c) MAPE vs. test time (d) MAPE vs. train size Figure 4: Prediction results for item popularity. (a,b) predicting the number of watching events per program on IPTV; (c,d) predicting the number of discussions per group on Reddit. 6 Experiments In this section, we evaluate the predictive performance of HYBRID in two real world applications in Section 5 and a synthetic dataset. We use the following metrics: (i) Mean Average Percentage Error (MAPE). Given a prediction time t, we compute the MAPE |ˆµn(t) −µ(t)|/µ(t) between the estimated value and the ground truth. (ii) Rank correlation. For all users/items, we obtain two lists of ranks according to the true and estimated value of user activeness/user popularity/item popularity. The accuracy is evaluated by the Kendall-⌧rank correlation [18] between two lists. 6.1 Experiments on real world data We show HYBRID has both accuracy and efficiency improvement in predicting the activeness and popularity of users in social networks and predicting the popularity of items in recommender systems. Competitors. We use 103 samples for HYBRID and compare it with the following the state of the art. • SEISMIC [32]. It defines a self-exciting process with a post infectiousness factor. It uses the branching property of Hawkes process and heuristic corrections for prediction. • RPP [13]. It adds a reinforcement coefficient to Poisson process that depicts the self-excitation phenomena. It sets dN(t) = λ(t)dt and solves a deterministic equation for prediction. • FPE [29]. It uses a deterministic function to approximate the stochastic intensity function. • MC-1E3. It is the MC sampling method with 103 samples (same as these for HYBRID), and MC-1E6 uses 106 samples. 6.1.1 Predicting the activeness and popularity of users in social networks We use a Twitter dataset [2] that contains 280,000 users with 550,000 tweet, retweet, and link creation events during Sep. 21 - 30, 2012. This data is previously used to validate the network co-evolution model [12]. The parameters for tweeting/retweeting processes and link creation process are learned using maximum likelihood estimation [12]. SEISMIC and RPP are not designed for the popularity prediction task since they do not consider the evolution of network topology. We use p proportion of total data as the training data to learn parameters of all methods, and the rest as test data. We make predictions for each user and report the averaged results. 7 0.5 0.4 0.3 0.2 0.1 MAPE 0 2 4 6 8 10 Time (s) 104 HYBRID MC 0.5 0.4 0.3 0.2 0.1 MAPE 0 1 2 3 Time (s) 104 HYBRID MC 0.5 0.4 0.3 0.2 0.1 MAPE 0 200 400 600 800 1000 Time (s) HYBRID 0.5 0.4 0.3 0.2 0.1 MAPE 0 200 400 600 Time (s) HYBRID (a) User activeness (b) Item popularity, IPTV (c) User activeness (d) Item popularity, IPTV Figure 5: Scalability analysis: computation time as a function of error. (a,b) comparison between HYBRID and MC in different problems; (c,d) scalability plots for HYBRID. 0.71 0.69 0.41 0.39 0.21 0.13 0.00 0.25 0.50 0.75 Methods Rank correlation Methods HYBRID MC-1e6 FPE SEISMIC RPP MC-1e3 0.72 0.69 0.44 0.11 0.00 0.25 0.50 0.75 Methods Rank correlation Methods HYBRID MC-1e6 FPE MC-1e3 0.78 0.76 0.51 0.41 0.21 0.15 0.00 0.25 0.50 0.75 Methods Rank correlation Methods HYBRID MC-1e6 FPE SEISMIC RPP MC-1e3 0.77 0.75 0.58 0.51 0.31 0.21 0.00 0.25 0.50 0.75 Methods Rank correlation Methods HYBRID MC-1e6 FPE SEISMIC RPP MC-1e3 (a) User activeness (b) User popularity (c) Item popularity, IPTV (d) Item popularity, Reddit Figure 6: Rank correlation results in different problems. We vary the proportion p of training data from 0.6 to 0.8, and the error bar represents the variance over different training sets. Predictive performance. Figure 3(a) shows that MAPE increases as test time increases, since the model’s stochasticity increases. HYBRID has the smallest error. Figure 3(b) shows that MAPE decreases as training data increases since model parameters are more accurate. Moreover, HYBRID is more accurate than SEISMIC and FPE with only 60% of training data, while these works need 80%. Thus, we make accurate predictions by observing users in the early stage. This feature is important for network moderators to identify malicious users and suppress the propagation undesired content. Moreover, the consistent performance improvement shows two messages: (i) considering all the randomness is important. HYBRID is 2⇥more accurate than SEISMIC and FPE because HYBRID naturally considers all the stochasticity, but SEISMIC, FPE, and RPP need heuristics or approximations that discard parts of the stochasticity; (ii) sampling efficiently is important. To consider all the stochasticity, we need to use the sampling scheme, and HYBRID has a much smaller sample size. Specifically, HYBRID uses the same 103 samples, but has 4⇥error reduction compared with MC-1E3. MC-1E6 has a similar predictive performance as HYBRID, but needs 103⇥more samples. Scalability. How does the reduction in sample size improve the speed? Figure 5(a) shows that as the error decreases from 0.5 to 0.1, MC has higher computation cost, since it needs much more samples than HYBRID to achieve the same error. We include the plots of HYBRID in (c). In particular, to achieve the error of 0.1, MC needs 106 samples in 27.8 hours, but HYBRID only needs 14.4 minutes with 103 samples. We use the machine with 16 cores, 2.4 GHz Intel Core i5 CPU and 64 GB memory. Rank correlation. We rank all users according to the predicted level of activeness and level of popularity separately. Figure 6(a,b) show that HYBRID performs the best with the accuracy around 80%, and it consistently identifies around 30% items more correctly than FPE on both tasks. 6.1.2 Predicting the popularity of items in recommender systems In the recommendation system setting, we use two datasets from [25]. The IPTV dataset contains 7,100 users’ watching history of 436 TV programs in 11 months, with around 2M events. The Reddit dataset contains online discussions of 1,000 users in 1,403 groups, with 10,000 discussion events. The predictive and scalability performance are consistent with the application in social networks. Figure 4 shows that HYBRID is 15% more accurate than FPE and 20% than SEISMIC. Figure 5 also shows that HYBRID needs much smaller amount of computation time than MC-1E6. To achieve the error of 0.1, it takes 9.8 minutes for HYBRID and 7.5 hours for MC-1E6. Figure 6(c,d) show that HYBRID achieves the rank correlation accuracy of 77%, with 20% improvement over FPE. 8 101 102 103 104 105 number of samples 10-3 10-2 10-1 MAPE HYBRID MC 101 102 103 104 105 106 number of samples 10-3 10-2 10-1 100 MAPE Hybrid MC 101 102 103 104 105 106 number of samples 10-3 10-2 10-1 100 MAPE HYBRID MC 101 102 103 104 105 106 number of samples 10-2 10-1 100 101 MAPE HYBRID MC (a) f(x) = x (b) f(x) = x log(x) (c) f(x) = x2 (d) f(x) = exp(x) Figure 7: Error of E[f(N(t))] as a function of sample size (loglog scale). (a-d) different choices of f. 0 85 160 Counts 0 0.005 0.01 0.015 0.02 0.025 Probability 0 80 160 Counts 0 0.005 0.01 0.015 0.02 Probability 0 85 160 Counts 0 0.005 0.01 0.015 0.02 0.025 0.03 Probability 0 85 160 Counts 0 0.01 0.02 0.03 0.04 0.05 Probability (a) HYBRID, ˆφn(x, t) (b) MC, ˆφmc n (x, t) (c) HYBRID, 1 sample (d) HYBRID, 1 sample Figure 8: Comparison of estimators of probability mass functions in HYBRID and MC. (a,b) estimators with the same 1000 samples. (c,d) estimator with one sample in HYBRID. 6.2 Experiments on synthetic data We compare HYBRID with MC in two aspects: (i) the significance of the reduction in the error and sample size, and (ii) estimators of the probability mass function. We study a Hawkes process and set the parameters of its intensity function as ⌘= 1.2, and ↵= 0.5. We fix the prediction time to be t = 30. The ground truth is computed with 108 samples from MC simulations. Error vs. number of samples. In four tasks with different f, Figure 7 shows that given the same number of samples, HYBRID has a smaller error. Moreover, to achieve the same error, HYBRID needs 100⇥less samples than MC. In particular, to achieve the error of 0.01, (a) shows HYBRID needs 103 and MC needs 105 samples; (b) shows HYBRID needs 104 and MC needs 106 samples. Probability mass functions. We compare our estimator of the probability mass with MC. Figure 8(a,b) show that our estimator is much smoother than MC, because our estimator is the average of conditional probability mass functions, which are computed by solving the mass transport equation. Moreover, our estimator centers around 85, which is the ground truth of E[N(t)], while that of MC centers around 80. Hence HYBRID is more accurate. We also plot two conditional mass functions in (c,d). The average of 1000 conditional mass functions yields (a). Thus, this averaging procedure in HYBRID adjusts the shape of the estimated probability mass. On the contrary, given one sample, the estimator in MC is just an indicator function and cannot capture the shape of the probability mass. 7 Conclusions We have proposed HYBRID, a generic framework with a new formulation of the prediction problem in point processes and a novel mass transport equation. This equation efficiently uses the event information to update the transport rate and compute the conditional mass function. Moreover, HYBRID is applicable to general point processes and prediction tasks with an arbitrary function f. Hence it can take any point process models as input, and the predictive performance of our framework can be further improved with the advancement of point process models. Experiments on real world and synthetic data demonstrate that HYBRID outperforms the state of the art both in terms of accuracy and efficiency. There are many interesting lines for future research. For example, HYBRID can be generalized to marked point processes [4], where a mark is observed along with the timing of each event. 9 Acknowledgements. This project was supported in part by NSF IIS-1218749, NIH BIGDATA 1R01GM108341, NSF CAREER IIS-1350983, NSF IIS-1639792 EAGER, NSF CNS-1704701, ONR N00014-15-1-2340, DMS-1620342, CMMI-1745382, IIS-1639792, IIS-1717916, NVIDIA, Intel ISTC and Amazon AWS. References [1] O. Aalen, O. Borgan, and H. Gjessing. Survival and event history analysis: a process point of view. Springer, 2008. [2] D. Antoniades and C. Dovrolis. Co-evolutionary dynamics in social networks: A case study of twitter. arXiv preprint arXiv:1309.6001, 2013. [3] D. Blackwell. Conditional expectation and unbiased sequential estimation. The Annals of Mathematical Statistics, pages 105–110, 1947. [4] P. Brémaud. Point processes and queues. 1981. [5] J. Da Fonseca and R. Zaatour. Hawkes process: Fast calibration, application to trade clustering, and diffusive limit. Journal of Futures Markets, 34(6):548–579, 2014. [6] H. Dai, Y. Wang, R. Trivedi, and L. Song. Deep coevolutionary network: Embedding user and item features for recommendation. arXiv preprint arXiv:1609.03675, 2016. [7] J. R. Dormand and P. J. Prince. A family of embedded runge-kutta formulae. Journal of computational and applied mathematics, 6(1):19–26, 1980. [8] N. Du, L. Song, M. Gomez-Rodriguez, and H. Zha. Scalable influence estimation in continuoustime diffusion networks. In NIPS, 2013. [9] N. Du, L. Song, A. J. Smola, and M. Yuan. Learning networks of heterogeneous influence. In NIPS, 2012. [10] N. Du, Y. Wang, N. He, and L. Song. Time sensitive recommendation from recurrent user activities. In NIPS, pages 3492–3500, 2015. [11] R. M. Dudley. Real analysis and probability. Cambridge University Press, Cambridge, UK, 2002. [12] M. Farajtabar, Y. Wang, M. Gomez-Rodriguez, S. Li, H. Zha, and L. Song. Coevolve: A joint point process model for information diffusion and network co-evolution. In NIPS, pages 1954–1962, 2015. [13] S. Gao, J. Ma, and Z. Chen. Modeling and predicting retweeting dynamics on microblogging platforms. In WSDM, 2015. [14] I. M. Gelfand, R. A. Silverman, et al. Calculus of variations. Courier Corporation, 2000. [15] A. G. Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83–90, 1971. [16] N. He, Z. Harchaoui, Y. Wang, and L. Song. Fast and simple optimization for poisson likelihood models. arXiv preprint arXiv:1608.01264, 2016. [17] X. He, T. Rekatsinas, J. Foulds, L. Getoor, and Y. Liu. Hawkestopic: A joint model for network inference and topic modeling from text-based cascades. In ICML, pages 871–880, 2015. [18] M. G. Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81–93, 1938. [19] W. Lian, R. Henao, V. Rao, J. E. Lucas, and L. Carin. A multitask point process predictive model. In ICML, pages 2030–2038, 2015. [20] Y. Ogata. On lewis’ simulation method for point processes. IEEE Transactions on Information Theory, 27(1):23–31, 1981. 10 [21] J. Pan, V. Rao, P. Agarwal, and A. Gelfand. Markov-modulated marked poisson processes for check-in data. In ICML, pages 2244–2253, 2016. [22] R. Pastor-Satorras, C. Castellano, P. Van Mieghem, and A. Vespignani. Epidemic processes in complex networks. Reviews of modern physics, 87(3):925, 2015. [23] X. Tan, S. A. Naqvi, A. Y. Qi, K. A. Heller, and V. Rao. Content-based modeling of reciprocal relationships using hawkes and gaussian processes. In UAI, pages 726–734, 2016. [24] R. Trivedi, H. Dai, Y. Wang, and L. Song. Know-evolve: Deep temporal reasoning for dynamic knowledge graphs. In ICML, 2017. [25] Y. Wang, N. Du, R. Trivedi, and L. Song. Coevolutionary latent feature processes for continuoustime user-item interactions. In NIPS, pages 4547–4555, 2016. [26] Y. Wang, E. Theodorou, A. Verma, and L. Song. A stochastic differential equation framework for guiding online user activities in closed loop. arXiv preprint arXiv:1603.09021, 2016. [27] Y. Wang, G. Williams, E. Theodorou, and L. Song. Variational policy for guiding point processes. In ICML, 2017. [28] Y. Wang, B. Xie, N. Du, and L. Song. Isotonic hawkes processes. In ICML, pages 2226–2234, 2016. [29] Y. Wang, X. Ye, H. Zha, and L. Song. Predicting user activity level in point processes with mass transport equation. In NIPS, 2017. [30] S.-H. Yang and H. Zha. Mixture of mutually exciting processes for viral diffusion. In ICML, pages 1–9, 2013. [31] L. Yu, P. Cui, F. Wang, C. Song, and S. Yang. From micro to macro: Uncovering and predicting information cascading process with behavioral dynamics. In ICDM, 2015. [32] Q. Zhao, M. A. Erdogdu, H. Y. He, A. Rajaraman, and J. Leskovec. Seismic: A self-exciting point process model for predicting tweet popularity. In KDD, 2015. [33] K. Zhou, H. Zha, and L. Song. Learning social infectivity in sparse low-rank networks using multi-dimensional hawkes processes. In AISTAT, volume 31, pages 641–649, 2013. 11 | 2017 | 426 |
6,926 | The Importance of Communities for Learning to Influence Eric Balkanski Harvard University ericbalkanski@g.harvard.edu Nicole Immorlica Microsoft Research nicimm@microsoft.com Yaron Singer Harvard University yaron@seas.harvard.edu Abstract We consider the canonical problem of influence maximization in social networks. Since the seminal work of Kempe, Kleinberg, and Tardos [KKT03] there have been two, largely disjoint efforts on this problem. The first studies the problem associated with learning the generative model that produces cascades, and the second focuses on the algorithmic challenge of identifying a set of influencers, assuming the generative model is known. Recent results on learning and optimization imply that in general, if the generative model is not known but rather learned from training data, no algorithm for influence maximization can yield a constant factor approximation guarantee using polynomially-many samples, drawn from any distribution. In this paper we describe a simple algorithm for maximizing influence from training data. The main idea behind the algorithm is to leverage the strong community structure of social networks and identify a set of individuals who are influentials but whose communities have little overlap. Although in general, the approximation guarantee of such an algorithm is unbounded, we show that this algorithm performs well experimentally. To analyze its performance, we prove this algorithm obtains a constant factor approximation guarantee on graphs generated through the stochastic block model, traditionally used to model networks with community structure. 1 Introduction For well over a decade now, there has been extensive work on the canonical problem of influence maximization in social networks. First posed by Domingos and Richardson [DR01, RD02] and elegantly formulated and further developed by Kempe, Kleinberg, and Tardos [KKT03], influence maximization is the algorithmic challenge of selecting individuals who can serve as early adopters of a new idea, product, or technology in a manner that will trigger a large cascade in the social network. In their seminal paper, Kempe, Kleinberg, and Tardos characterize a family of natural influence processes for which selecting a set of individuals that maximize the resulting cascade reduces to maximizing a submodular function under a cardinality constraint. Since submodular functions can be maximized within a 1 −1/e approximation guarantee, one can then obtain desirable guarantees for the influence maximization problem. There have since been two, largely separate, agendas of research on the problem. The first line of work is concerned with learning the underlying submodular function from observations of cascades [LK03, AA05, LMF+07, GBL10, CKL11, GBS11, NS12, GLK12, DSSY12, ACKP13, DSGRZ13, FK14, DBB+14, CAD+14, DGSS14, DLBS14, NPS15, HO15]. The second line of work focuses on algorithmic challenges revolving around maximizing influence, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. assuming the underlying function that generates the diffusion process is known [KKT05, MR07, SS13, BBCL14, HS15, HK16, AS16]. In this paper, we consider the problem of learning to influence where the goal is to maximize influence from observations of cascades. This problem synthesizes both problems of learning the function from training data and of maximizing influence given the influence function. A natural approach for learning to influence is to first learn the influence function from cascades, and then apply a submodular optimization algorithm on the function learned from data. Somewhat counter-intuitively, it turns out that this approach yields desirable guarantees only under very strong learnability conditions1. In some cases, when there are sufficiently many samples, and one can observe exactly which node attempts to influence whom at every time step, these learnability conditions can be met. A slight relaxation however (e.g. when there are only partial observations [NPS15, HXKL16]), can lead to sharp inapproximability. A recent line of work shows that even when a function is statistically learnable, optimizing the function learned from data can be inapproximable [BRS17, BS17]. In particular, even when the submodular function f : 2N ! R is a coverage function (which is PMAC learnable [BDF+12, FK14]), one would need to observe exponentially many samples {Si, f(Si)}m i=1 to obtain a constant factor approximation guarantee. Since coverage functions are special cases of the well studied models of influence (independent cascade, linear and submodular threshold), this implies that when the influence function is not known but learned from data, the influence maximization problem is intractable. Learning to influence social networks. As with all impossibility results, the inapproximability discussed above holds for worst case instances, and it may be possible that such instances are rare for influence in social networks. In recent work, it was shown that when a submodular function has bounded curvature, there is a simple algorithm that can maximize the function under a cardinality constraint from samples [BRS16]. Unfortunately, simple examples show that submodular functions that dictate influence processes in social networks do not have bounded curvature. Are there other reasonable conditions on social networks that yield desirable approximation guarantees? Main result. In this paper we present a simple algorithm for learning to influence. This algorithm leverages the idea that social networks exhibit strong community structure. At a high level, the algorithm observes cascades and aims to select a set of nodes that are influential, but belong to different communities. Intuitively, when an influential node from a certain community is selected to initiate a cascade, the marginal contribution of adding another node from that same community is small, since the nodes in that community were likely already influenced. This observation can be translated into a simple algorithm which performs very well in practice. Analytically, since community structure is often modeled using stochastic block models, we prove that the algorithm obtains a constant factor approximation guarantee in such models, under mild assumptions. 1.1 Technical overview The analysis for the approximation guarantees lies at the intersection of combinatorial optimization and random graph theory. We formalize the intuition that the algorithm leverages the community structure of social networks in the standard model to analyze communities, which is the stochastic block model. Intuitively, the algorithm obtains good approximations by picking the nodes that have the largest individual influence while avoiding picking multiple nodes in the same community by pruning nodes with high influence overlap. The individual influence of nodes and their overlap are estimated by the algorithm with what we call first and second order marginal contributions of nodes, which can be estimated from samples. We then uses phase transition results of Erd˝os–Rényi random graphs and branching processes techniques to compare these individual influences for nodes in different communities in the stochastic block model and bound the overlap of pairs of nodes. The optimization from samples model. Optimization from samples was recently introduced by [BRS17] in the context of submodular optimization, we give the definition for general set functions. 1In general, the submodular function f : 2N ! R needs to be learnable everywhere within arbitrary precision, i.e. for every set S one needs to assume that the learner can produce a surrogate function ˜f : 2N ! R s.t. for every S ✓N the surrogate guarantees to be (1 −✏)f(S) ˜f(S) (1 + ✏)f(S), for ✏2 o(1)[HS16, HS17]. 2 Definition 1. A class of functions F = {f : 2N ! R} is ↵-optimizable from samples over distribution D under constraint M if there exists an algorithm s.t. for all f 2 F, given a set of samples {(Si, f(Si))}m i=1 where the sets Si are drawn i.i.d. from D, the algorithm returns S 2 M s.t.: Pr S1,...,Sm⇠D E[f(S)] ≥↵· max T 2M f(T) " ≥1 −δ, where the expectation is over the decisions of the algorithm and m 2 poly(|N|, 1/δ). We focus on bounded product distributions D, so every node a is, independently, in S ⇠D with some probability pa 2 [1/ poly(n), 1 −1/ poly(n)]. We assume this is the case throughout the paper. Influence process. We assume that the influence process follows the standard independent cascade model. In the independent cascade model, a node a influences each of its neighbors b with some probability qab, independently. Thus, given a seed set of nodes S, the set of nodes influenced is the number of nodes connected to some node in S in the random subgraph of the network which contains every edge ab independently with probability qab .We define f(S) to be the expected number of nodes influenced by S according to the independent cascade model over some weighted social network. The learning to influence model: optimization from samples for influence maximization. The learning to influence model is an interpretation of the optimization from samples model [BRS17] for the specific problem of influence maximization in social networks. We are given a collection of samples {(Si, |cc(Si)|)}m i=1 where sets Si are the seed sets of nodes and |cc(Si)| is the number of nodes influenced by Si, i.e., the number of nodes that are connected to Si in the random subgraph of the network. This number of nodes is a random variable with expected value f(Si) := E[|cc(Si)|] over the realization of the influence process. Each sample is an independent realization of the influence process. The goal is then to find a set of nodes S under a cardinality constraint k which maximizes the influence in expectation, i.e., find a set S of size at most k which maximizes the expected number of nodes f(S) influenced by seed set S. 2 The Algorithm We present the main algorithm, COPS. This algorithm is based on a novel optimization from samples technique which detects overlap in the marginal contributions of two different nodes, which is useful to avoid picking two nodes who have intersecting influence over a same collection of nodes. 2.1 Description of COPS COPS, consists of two steps. It first orders nodes in decreasing order of first order marginal contribution, which is the expected marginal contribution of a node a to a random set S ⇠D. Then, it iteratively removes nodes a whose marginal contribution overlaps with the marginal contribution of at least one node before a in the ordering. The solution is the k first nodes in the pruned ordering. Algorithm 1 COPS, learns to influence networks with COmmunity Pruning from Samples. Input: Samples S = {(S, f(S))}, acceptable overlap ↵. Order nodes according to their first order marginal contributions Iteratively remove from this ordering nodes a whose marginal contribution has overlap of at least ↵with at least one node before a in this ordering. return k first nodes in the ordering The strong performance of this algorithm for the problem of influence maximization is best explained with the concept of communities. Intuitively, this algorithm first orders nodes in decreasing order of their individual influence and then removes nodes which are in a same community. This second step allows the algorithm to obtain a diverse solution which influences multiple different communities of the social network. In comparison, previous algorithms in optimization from samples [BRS16, BRS17] only use first order marginal contributions and perform well if the function is close to linear. Due to the high overlap in influence between nodes in a same community, influence functions are far 3 from being linear and these algorithms have poor performance for influence maximization since they only pick nodes from a very small number of communities. 2.2 Computing overlap using second order marginal contributions We define second order marginal contributions, which are used to compute the overlap between the marginal contribution of two nodes. Definition 2. The second order expected marginal contribution of a node a to a random set S containing node b is vb(a) := E S⇠D:a62S,b2S[f(S [ {a}) −f(S)]. The first order marginal contribution v(a) of node a is defined similarly as the marginal contribution of a node a to a random set S, i.e., v(a) := ES⇠D:a62S[f(S [ {a}) −f(S)]. These contributions can be estimated arbitrarily well for product distributions D by taking the difference between the average value of samples containing a and b and the average value of samples containing b but not a (see Appendix B for details). The subroutine OVERLAP(a, b, ↵), ↵2 [0, 1], compares the second order marginal contribution of a to a random set containing b and the first order marginal contribution of a to a random set. If b causes the marginal contribution of a to decrease by at least a factor of 1 −↵, then we say that a has marginal contribution with overlap of at least ↵with node b. Algorithm 2 OVERLAP(a, b, ↵), returns true if a and b have marginal contributions that overlap by at least a factor ↵. Input: Samples S = {(S, f(S))}, node a, acceptable overlap ↵ If second order marginal contribution vb(a) is at least a factor of 1 −↵smaller than first order marginal contribution v(a), return Node a has overlap of at least ↵with node b OVERLAP is used to detect nodes in a same community. In the extreme case where two nodes a and b are in a community C where any node in C influences all of community C, then the second order marginal contribution vb(a) of a to random set S containing b is vb(a) = 0 since b already influences all of C so a does not add any value, while v(a) ⇡|C|. In the opposite case where a and b are in two communities which are not connected in the network, we have v(a) = vb(a) since adding b to a random set S has no impact on the value added by a. 2.3 Analyzing community structure The main benefit from COPS is that it leverages the community structure of social networks. To formalize this explanation, we analyze our algorithm in the standard model used to study the community structure of networks, the stochastic block model. In this model, a fixed set of nodes V is partitioned in communities C1, . . . , C`. The network is then a random graph G = (V, E) where edges are added to E independently and where an intra-community edge is in E with much larger probability than an inter-community edge. These edges are added with identical probability qsb C for every edge in a same community, but with different probabilities for edges inside different communities Ci and Cj. We illustrate this model in Figure 1. 3 Dense Communities and Small Seed Set in the Stochastic Block Model In this section, we show that COPS achieves a 1 −O(|Ck|−1) approximation, where Ck is the kth largest community, in the regime with dense communities and small seed set, which is described below. We show that the algorithm picks a node from each of the k largest communities with high probability, which is the optimal solution. In the next section, we show a constant factor approximation algorithm for a generalization of this setting, which requires a more intricate analysis. In order to focus on the main characteristics of the community structure as an explanation for the performance of the algorithm, we make the following simplifying assumptions for the analysis. We 4 Figure 1: An illustration of the stochastic block model with communities C1, C2, C3 and C4 of sizes 6, 4, 4 and 4. The optimal solution for influence maximization with k = 4 is in green. Picking the k first nodes in the ordering by marginal contributions without pruning, as in [BRS16], leads to a solution with nodes from only C1 (red). By removing nodes with overlapping marginal contributions, COPS obtains a diverse solution. first assume that there are no inter-community edges.2 We also assume that the random graph obtained from the stochastic block model is redrawn for every sample and that we aim to find a good solution in expectation over both the stochastic block model and the independent cascade model. Formally, let G = (V, E) be the random graph over n nodes obtained from an independent cascade process over the graph generated by the stochastic block model. Similarly as for the stochastic block model, edge probabilities for the independent cascade model may vary between different communities and are identical within a single community C, where all edges have weights qic C. Thus, an edge e between two nodes in a community C is in E with probability pC := qic C · qsb C, independently for every edge, where qic C and qsb C are the edge probabilities in the independent cascade model and the stochastic block model respectively. The total influence by seed set S is then |ccG(Si)| where ccG(S) is the set of nodes connected to S in G and we drop the subscript when it is clear from context. Thus, the objective function is f(S) := EG[|cc(S)|]. We describe the two assumptions for this section. Dense communities. We assume that for the k largest communities C, pC > 3 log |C|/|C| and C has super-constant size (|C| = !(1)). This assumption corresponds to communities where the probability pC that a node ai 2 C influences another node aj 2 C is large. Since the subgraph G[C] of G induced by a community C is an Erd˝os–Rényi random graph, we get that G[C] is connected with high probability (see Appendix C). Lemma 3. [ER60] Assume C is a “dense" community, then the subgraph G[C] of G is connected with probability 1 −O(|C|−2). Small seed set. We also assume that the seed sets S ⇠D are small enough so that they rarely intersect with a fixed community C, i.e., PrS⇠D[S\C = ;] ≥1−o(1). This assumption corresponds to cases where the set of early influencers is small, which is usually the case in cascades. The analysis in this section relies on two main lemmas. We first show that the first order marginal contribution of a node is approximately the size of the community it belongs to (Lemma 4). Thus, the ordering by marginal contributions orders elements by the size of the community they belong to. Then, we show that any node a 2 C that is s.t. that there is a node b 2 C before a in the ordering is pruned (Lemma 5). Regarding the distribution S ⇠D generating the samples, as previously mentioned, we consider any bounded product distribution. This implies that w.p. 1 −1/ poly(n), the algorithm can compute marginal contribution estimates ˜v that are all a 1/ poly(n)-additive approximation to the true marginal contributions v (See Appendix B for formal analysis of estimates). Thus, we give the analysis for the true marginal contributions, which, with probability 1 −1/ poly(n) over the samples, easily extends for arbitrarily good estimates. The following lemma shows that the ordering by first order marginal contributions corresponds to the ordering by decreasing order of community sizes that nodes belong to. Lemma 4. For all a 2 C where C is one of the k largest communities, the first order marginal contribution of node a is approximately the size of its community, i.e., (1 −o(1))|C| v(a) |C|. Proof. Assume a is a node in one of the k largest communities. Let Da and D−a denote the distributions S ⇠D conditioned on a 2 S and a 62 S respectively. We also denote marginal contributions by fS(a) := f(S [ {a}) −f(S). We obtain 2The analysis easily extends to cases where inter-community edges form with probability significantly smaller to qsb C, for all C. 5 v(a) = E S⇠D−a,G[fS(a)] ≥ Pr S⇠D−a[S \ C = ;] · Pr G [cc(a) = C] · E S⇠D−a : S\C=;, G : cc(a)=C [fS(a)] = Pr S⇠D−a[S \ C = ;] · Pr G [cc(a) = C] · |C| ≥(1 −o(1)) · |C| where the last inequality is by the small seed set assumption and since C is connected with probability 1 −o(1) (Lemma 3 and |C| = !(1) by dense community assumption). For the upper bound, v(a) is trivially at most the size of a’s community since there are no inter-community edges. The next lemma shows that the algorithm does not pick two nodes in a same community. Lemma 5. With probability 1 −o(1), for all pairs of nodes a, b such that a, b 2 C where C is one of the k largest communities, OVERLAP(a, b, ↵) = True for any constant ↵2 [0, 1). Proof. Let a, b be two nodes in one of the k largest communities C and D−a,b denote the distribution S ⇠D conditioned on a 62 S and b 2 S. Then, vb(a) = E S⇠D−a,b[fS(a)] Pr[b 2 cc(a)] · 0 + Pr[b 62 cc(a)] · |C| = o(1) o(1) · v(a) where the last equality is since G[C] is not connected w.p. O(|C|−2) by Lemma 3 and since |C| = !(1) by the dense community assumption, which concludes the proof. By combining Lemmas 4 and 5, we obtain the main result for this section (proof in Appendix D). Theorem 6. In the dense communities and small seed set setting, COPS with ↵-overlap allowed, for any constant ↵2 (0, 1) is a 1 −o(1)-approximation algorithm for learning to influence from samples from a bounded product distribution D. 4 Constant Approximation for General Stochastic Block Model In this section, we relax assumptions from the previous section and show that COPS is a constant factor approximation algorithm in this more demanding setting. Recall that G is the random graph obtained from both the stochastic block model and the independent cascade model. A main observation that is used in the analysis is to observe that the random subgraph G[C], for some community C, is an Erd˝os–Rényi random graph G|C|,pC. Relaxation of the assumptions. Instead of only considering dense communities where pC = ⌦((log |C|)/|C|), we consider both tight communities C where pC ≥(1 + ✏)/|C| for some constant ✏> 0 and loose communities C where pC (1 −✏)/|C| for some constant ✏> 0.3 We also relax the small seed set assumption to the reasonable non-ubiquitous seed set assumption. Instead of having a seed set S ⇠D rarely intersect with a fixed community C, we only assume that PrS⇠D[S \ C = ;] ≥✏for some constant ✏> 0. Again, since seed sets are of small sizes in practice, it seems reasonable that with some constant probability a community does not contain any seeds. Overview of analysis. At a high level, the analysis exploits the remarkably sharp threshold for the phase transition of Erd˝os–Rényi random graphs. This phase transition (Lemma 7) tells us that a tight community C contains w.h.p. a giant connected component with a constant fraction of the nodes from C. Thus, a single node from a tight community influences a constant fraction of its community in expectation. The ordering by first order marginal contributions thus ensures a constant factor approximation of the value from nodes in tight communities (Lemma 10). On the other hand, we show that a node from a loose community influences only at most a constant number of nodes in expectation (Lemma 8) by using branching processes. Since the algorithm checks for overlap using second order marginal contributions, the algorithm picks at most one node from any tight community (Lemma 11). Combining all the pieces together, we obtain a constant factor approximation (Theorem 12). 3Thus, we consider all possible sizes of communities except communities of size that converges to exactly 1/pC, which is unlikely to occur in practice. 6 We first state the result for the giant connected component in a tight community, which is an immediate corollary of the prominent giant connected component result in the Erd˝os–Rényi model. Lemma 7. [ER60] Let C be a tight community with |C| = !(1), then G[C] has a “giant" connected component containing a constant fraction of the nodes in C w.p. 1 −o(1). The following lemma analyzes the influence of a node in a loose community through the lenses of Galton-Watson branching processes to show that such a node influences at most a constant number of nodes in expectation. The proof is deferred to Appendix E. Lemma 8. Let C be a loose community, then f({a}) c for all a 2 C and some constant c. We can now upper bound the value of the optimal solution S?. Let C1, . . . , Ct be the t k tight communities that have at least one node in Ci that is in the optimal solution S? and that are of super-constant size, i.e., |C| = !(1). Without loss, we order these communities in decreasing order of their size |Ci|. Lemma 9. Let S? be the optimal set of nodes and Ci and t be defined as above. There exists a constant c such that f(S?) Pt i=1 |Ci| + c · k. Proof. Let S? A and S? B be a partition of the optimal nodes in nodes that are in tight communities with super-constant individual influence and nodes that are not in such a community. The influence f(S? A) is trivially upper bounded by Pt i=1 |Ci|. Next, there exists some constant c s.t. f(S? B) P a2S? B f({a}) c· where the first inequality is by submodularity and the second since nodes in loose communities have constant individual influence by Lemma 8 and nodes in tight community without super-constant individual influence have constant influence by definition. We conclude that by submodularity, f(S?) f(S? A) + f(S? B) Pt i=1 |Ci| + c · k. Next, we argue that the solution returned by the algorithm is a constant factor away from Pt i=1 |Ci|. Lemma 10. Let a be the ith node in the ordering by first order maginal contribution after the pruning and Ci be the ith largest tight community with super-constant individual influence and with at least one node in the optimal solution S?. Then, f({a}) ≥✏|Ci| for some constant ✏> 0. Proof. By definition of Ci, we have |C1| ≥· · · ≥|Ci| that are all tight communities. Let b be a node in Cj for j 2 [i], 1gc(C) be the indicator variable indicating if there is a giant component in community C, and gc(C) be this giant component. We get v(b) ≥Pr[1gc(Cj)] · Pr S⇠D−b[S \ Cj = ;] · Pr[b 2 gc(Cj)] · E[|gc(Cj)| : b 2 gc(Cj)] ≥(1 −o(1)) · ✏1 · ✏2 · ✏3|Cj| ≥✏|Cj| for some constants ✏1, ✏2, ✏3, ✏> 0 by Lemma 7 and the non-ubiquitous assumption. Similarly as in Theorem 6, if a and b are in different communities, OVERLAP(a, b, ↵) = False for ↵2 (0, 1]. Thus, there is at least one node b 2 [i j=1Cj at position i or after in the ordering after the pruning, and v(b) ≥✏|Cj| for some j 2 [i]. By the ordering by first order marginal contributions and since node a is in ith position, v(a) ≥v(b), and we get that f({a}) ≥v(a) ≥v(b) ≥✏|Cj| ≥✏|Ci|. Next, we show that the algorithm never picks two nodes from a same tight community and defer the proof to Appendix E. Lemma 11. If a, b 2 C and C is a tight community, then OVERLAP(a, b, ↵) = True for ↵= o(1). We combine the above lemmas to obtain the approximation guarantee of COPS (proof in Appendix E). Theorem 12. With overlap allowed ↵= 1/ poly(n), COPS is a constant factor approximation algorithm for learning to influence from samples drawn from a bounded product distribution D in the setting with tight and loose communities and non-ubiquitous seed sets. 5 Experiments In this section, we compare the performance of COPS and three other algorithms on real and synthetic networks. We show that COPS performs well in practice, it outperforms the previous optimization from samples algorithm and gets closer to the solution obtained when given complete access to the influence function. 7 x10$2& 0.0 0.4 0.8 1.2 1.6 2.0 0 100 200 300 400 DBLP q Performance Greedy COPS MargI Random x10$2& 0 3 6 9 12 15 0 50 100 150 200 250 300 DBLP k Performance x10$2& 0.6 0.7 0.8 0.9 1 1.1 0 100 200 300 400 Facebook q Performance x10$2& 0 3 6 9 12 15 0 50 100 150 200 250 300 Facebook k Performance 0.0 0.2 0.4 0.6 0.8 1.0 0 200 400 600 Stochastic Block Model 1 n Performance x105% x105% 0.0 0.2 0.4 0.6 0.8 1.0 0 300 600 900 1200 1500 Stochastic Block Model 2 n Performance x105% x105% 0.0 0.2 0.4 0.6 0.8 1.0 0 200 400 600 800 Erdős–Rényi n Performance x105% x105% 0.0 0.2 0.4 0.6 0.8 1.0 0 50 100 150 200 250 Preferential Attachment n Performance x105% Figure 2: Empirical performance of COPS against the GREEDY upper bound, the previous optimization from samples algorithm MARGI and a random set. Experimental setup. The first synthetic network considered is the stochastic block model, SBM 1, where communities have random sizes with one community of size significantly larger than the other communities. We maintained the same expected community size as n varied. In the second stochastic block model, SBM 2, all communities have same expected size and the number of communities was fixed as n varied. The third and fourth synthetic networks were an Erd˝os–Rényi (ER) random graph and the preferential attachment model (PA). Experiments were also conducted on two real networks publicly available ([LK15]). The first is a subgraph of the Facebook social network with n = 4k and m = 88k. The second is a subgraph of the DBLP co-authorship network, which has ground truth communities as described in [LK15], where nodes of degree at most 10 were pruned to obtain n = 54k, m = 361k and where the 1.2k nodes with degree at least 50 were considered as potential nodes in the solution. Benchmarks. We considered three different benchmarks to compare the COPS algorithm against. The standard GREEDY algorithm in the value query model is an upper bound since it is the optimal efficient algorithm given value query access to the function and COPS is in the more restricted setting with only samples. MARGI is the optimization from samples algorithm which picks the k nodes with highest first order marginal contribution ([BRS16]) and does not use second order marginal contributions. RANDOM simply returns a random set. All the samples are drawn from the product distribution with marginal probability k/n, so that samples have expected size k. We further describe the parameters of each plot in Appendix F. Empirical evaluation. COPS significantly outperforms the previous optimization from samples algorithm MARGI, getting much closer to the GREEDY upper bound. We observe that the more there is a community structure in the network, the better the performance of COPS is compared to MARGI, e.g., SBM vs ER and PA (which do not have a community structure). When the edge weight q := qi.c. for the cascades is small, the function is near-linear and MARGI performs well, whereas when it is large, there is a lot of overlap and COPS performs better. The performance of COPS as a function of the overlap allowed (experiment in Appendix F) can be explained as follows: Its performance slowly increases as the the overlap allowed increases and COPS can pick from a larger collection of nodes until it drops when it allows too much overlap and picks mostly very close nodes from a same community. For SBM 1 with one larger community, MARGI is trapped into only picking nodes from that larger community and performs even less well than RANDOM. As n increases, the number of nodes influenced increases roughly linearly for SBM 2 when the number of communities is fixed since the number of nodes per community increases linearly, which is not the case for SBM 1. 8 References [AA05] Eytan Adar and Lada A. Adamic. Tracking information epidemics in blogspace. In WI, 2005. [ACKP13] Bruno D. Abrahao, Flavio Chierichetti, Robert Kleinberg, and Alessandro Panconesi. Trace complexity of network inference. In KDD, 2013. [AS16] Rico Angell and Grant Schoenebeck. Don’t be greedy: Leveraging community structure to find high quality seed sets for influence maximization. arXiv preprint arXiv:1609.06520, 2016. [BBCL14] Christian Borgs, Michael Brautbar, Jennifer T. Chayes, and Brendan Lucier. Maximizing social influence in nearly optimal time. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014, pages 946–957, 2014. [BDF+12] Ashwinkumar Badanidiyuru, Shahar Dobzinski, Hu Fu, Robert Kleinberg, Noam Nisan, and Tim Roughgarden. Sketching valuation functions. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete Algorithms, pages 1025–1035. Society for Industrial and Applied Mathematics, 2012. [BHK] Avrim Blum, John Hopcroft, and Ravindran Kannan. Foundations of data science. [BRS16] Eric Balkanski, Aviad Rubinstein, and Yaron Singer. The power of optimization from samples. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 4017–4025, 2016. [BRS17] Eric Balkanski, Aviad Rubinstein, and Yaron Singer. The limitations of optimization from samples. In STOC, 2017. [BS17] Eric Balkanski and Yaron Singer. The sample complexity of optimizing a convex function. In COLT, 2017. [CAD+14] Justin Cheng, Lada A. Adamic, P. Alex Dow, Jon M. Kleinberg, and Jure Leskovec. Can cascades be predicted? In WWW, 2014. [CKL11] Flavio Chierichetti, Jon M. Kleinberg, and David Liben-Nowell. Reconstructing patterns of information diffusion from incomplete observations. In NIPS, 2011. [DBB+14] Abir De, Sourangshu Bhattacharya, Parantapa Bhattacharya, Niloy Ganguly, and Soumen Chakrabarti. Learning a linear influence model from transient opinion dynamics. In CIKM, 2014. [DGSS14] Hadi Daneshmand, Manuel Gomez-Rodriguez, Le Song, and Bernhard Schölkopf. Estimating diffusion network structures: Recovery conditions, sample complexity & soft-thresholding algorithm. In ICML, 2014. [DLBS14] Nan Du, Yingyu Liang, Maria-Florina Balcan, and Le Song. Influence function learning in information diffusion networks. In ICML, 2014. [DR01] Pedro Domingos and Matthew Richardson. Mining the network value of customers. In KDD, 2001. [DSGRZ13] Nan Du, Le Song, Manuel Gomez-Rodriguez, and Hongyuan Zha. Scalable influence estimation in continuous-time diffusion networks. In NIPS, 2013. [DSSY12] Nan Du, Le Song, Alexander J. Smola, and Ming Yuan. Learning networks of heterogeneous influence. In NIPS, 2012. [ER60] Paul Erdos and Alfréd Rényi. On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci, 5(1):17–60, 1960. [FK14] Vitaly Feldman and Pravesh Kothari. Learning coverage functions and private release of marginals. In COLT, 2014. [GBL10] Amit Goyal, Francesco Bonchi, and Laks VS Lakshmanan. Learning influence probabilities in social networks. In KDD, 2010. [GBS11] Manuel Gomez-Rodriguez, David Balduzzi, and Bernhard Schölkopf. Uncovering the temporal dynamics of diffusion networks. In ICML, 2011. 9 [GLK12] Manuel Gomez-Rodriguez, Jure Leskovec, and Andreas Krause. Inferring networks of diffusion and influence. ACM Transactions on Knowledge Discovery from Data, 5(4):21, 2012. [HK16] Xinran He and David Kempe. Robust influence maximization. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, pages 885–894, 2016. [HO15] Jean Honorio and Luis Ortiz. Learning the structure and parameters of large-population graphical games from behavioral data. Journal of Machine Learning Research, 16:1157–1210, 2015. [HS15] Thibaut Horel and Yaron Singer. Scalable methods for adaptively seeding a social network. In Proceedings of the 24th International Conference on World Wide Web, WWW 2015, Florence, Italy, May 18-22, 2015, pages 441–451, 2015. [HS16] Thibaut Horel and Yaron Singer. Maximization of approximately submodular functions. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 3045–3053, 2016. [HS17] Avinatan Hassidim and Yaron Singer. Submodular maximization under noise. In COLT, 2017. [HXKL16] Xinran He, Ke Xu, David Kempe, and Yan Liu. Learning influence functions from incomplete observations. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 2065–2073, 2016. [KKT03] David Kempe, Jon M. Kleinberg, and Éva Tardos. Maximizing the spread of influence through a social network. In KDD, 2003. [KKT05] David Kempe, Jon M. Kleinberg, and Éva Tardos. Influential nodes in a diffusion model for social networks. In Automata, Languages and Programming, 32nd International Colloquium, ICALP 2005, Lisbon, Portugal, July 11-15, 2005, Proceedings, pages 1127–1138, 2005. [LK03] David Liben-Nowell and Jon M. Kleinberg. The link prediction problem for social networks. In CIKM, 2003. [LK15] Jure Leskovec and Andrej Krevl. Snap datasets, stanford large network dataset collection. 2015. [LMF+07] Jure Leskovec, Mary McGlohon, Christos Faloutsos, Natalie S. Glance, and Matthew Hurst. Patterns of cascading behavior in large blog graphs. In SDM, 2007. [MR07] Elchanan Mossel and Sébastien Roch. On the submodularity of influence in social networks. In STOC, 2007. [NPS15] Harikrishna Narasimhan, David C. Parkes, and Yaron Singer. Learnability of influence in networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 3186–3194, 2015. [NS12] Praneeth Netrapalli and Sujay Sanghavi. Learning the graph of epidemic cascades. In SIGMETRICS/Performance, 2012. [RD02] Matthew Richardson and Pedro Domingos. Mining knowledge-sharing sites for viral marketing. In KDD, 2002. [SS13] Lior Seeman and Yaron Singer. Adaptive seeding in social networks. In 54th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2013, 26-29 October, 2013, Berkeley, CA, USA, pages 459–468, 2013. 10 | 2017 | 427 |
6,927 | Gradients of Generative Models for Improved Discriminative Analysis of Tandem Mass Spectra John T. Halloran Department of Public Health Sciences University of California, Davis jthalloran@ucdavis.edu David M. Rocke Department of Public Health Sciences University of California, Davis dmrocke@ucdavis.edu Abstract Tandem mass spectrometry (MS/MS) is a high-throughput technology used to identify the proteins in a complex biological sample, such as a drop of blood. A collection of spectra is generated at the output of the process, each spectrum of which is representative of a peptide (protein subsequence) present in the original complex sample. In this work, we leverage the log-likelihood gradients of generative models to improve the identification of such spectra. In particular, we show that the gradient of a recently proposed dynamic Bayesian network (DBN) [7] may be naturally employed by a kernel-based discriminative classifier. The resulting Fisher kernel substantially improves upon recent attempts to combine generative and discriminative models for post-processing analysis, outperforming all other methods on the evaluated datasets. We extend the improved accuracy offered by the Fisher kernel framework to other search algorithms by introducing Theseus, a DBN representing a large number of widely used MS/MS scoring functions. Furthermore, with gradient ascent and max-product inference at hand, we use Theseus to learn model parameters without any supervision. 1 Introduction In the past two decades, tandem mass spectrometry (MS/MS) has become an indispensable tool for identifying the proteins present in a complex biological sample. At the output of a typical MS/MS experiment, a collection of spectra is produced on the order of tens-to-hundreds of thousands, each of which is representative of a protein subsequence, called a peptide, present in the original complex sample. The main challenge in MS/MS is accurately identifying the peptides responsible for generating each output spectrum. The most accurate identification methods search a database of peptides to first score peptides, then rank and return the top-ranking such peptide. The pair consisting of a scored candidate peptide and observed spectrum is typically referred to as a peptide-spectrum match (PSM). However, PSM scores returned by such database-search methods are often difficult to compare across different spectra (i.e., they are poorly calibrated), limiting the number of spectra identified per search [15]. To combat such poor calibration, post-processors are typically used to recalibrate PSM scores [13, 19, 20]. Recent work has attempted to exploit generative scoring functions for use with discriminative classifiers to better recalibrate PSM scores; by parsing a DBN’s Viterbi path (i.e., the most probable sequence of random variables), heuristically derived features were shown to improve discriminative recalibration using support vector machines (SVMs). Rather than relying on heuristics, we look towards the more principled approach of a Fisher kernel [11]. Fisher kernels allow one to exploit the sequential-modeling strengths of generative models such as DBNs, which offer vast design flexibility for representing data sequences of varying length, for use with discriminative classifiers such as SVMs, which offer superior accuracy but often require feature vectors of fixed length. Although 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 m/z 0.0 0.2 0.4 0.6 0.8 1.0 intensity b2 b3 b5 b6 b7 b8 b9 b10 b11 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 insertions b-ions y-ions Figure 1: Example tandem mass spectrum with precursor charge c(s) = 2 and generating peptide x = LWEPLLDVLVQTK. Plotted in red and blue are, respectively, b- and y-ion peaks (discussed in Section 2.1.1), while spurious observed peaks (called insertions) are colored gray. Note y1, b1, b4, and b12 are absent fragment ions (called deletions). the number of variables in a DBN may vary given different observed sequences, a Fisher kernel utilizes the fixed-length gradient of the log-likelihood (i.e., the Fisher score) in the feature-space of a kernel-based classifier. Deriving the Fisher scores of a DBN for Rapid Identification of Peptides (DRIP) [7], we show that the DRIP Fisher kernel greatly improves upon the previous heuristic approach; at a strict FDR of 1% for the presented datasets, the heuristically derived DRIP features improve accuracy over the base feature set by an average 6.1%, while the DRIP Fisher kernel raises this average improvement to 11.7% (Table 2 in [9]), thus nearly doubling the total accuracy of DRIP post-processing. Motivated by improvements offered by the DRIP Fisher kernel, we look to extend this to other models by defining a generative model representative of the large class of existing scoring functions [2, 5, 6, 16, 10, 22, 17]. In particular, we define a DBN (called Theseus1) which, given an observed spectrum, evaluates the universe of all possible PSM scores. In this work, we use Theseus to model PSM score distributions with respect to the widely used XCorr scoring function [5]. The resulting Fisher kernel once again improves discriminative post-processing accuracy. Furthermore, with the generative model in place, we explore inferring parameters of the modeled scoring function using max-product inference and gradient-based learning. The resulting coordinate ascent learning algorithm outperforms standard maximum-likelihood learning. Most importantly, this overall learning algorithm is unsupervised which, to the authors’ knowledge, is the first MS/MS scoring function parameter estimation procedure not to rely on any supervision. We note that this overall training procedure may be adapted by the many MS/MS search algorithms whose scoring functions lie in the class modeled by Theseus. The paper is organized as follows. We discuss background information in Section 2, including the process by which MS/MS spectra are produced, the means by which spectra are identified, and related previous work. In Section 3, we extensively discuss the log-likelihood of the DRIP model and derive its Fisher scores. In Section 4, we introduce Theseus and derive gradients of its log-likelihood. We then discuss gradient-based unsupervised learning of Theseus parameters and present an efficient, monotonically convergent coordinate ascent algorithm. Finally, in Section 5, we show that DRIP and Theseus Fisher kernels substantially improve spectrum identification accuracy and that Theseus’ coordinate ascent learning algorithm provides accurate unsupervised parameter estimation. For convenience, a table of the notation used in this paper may be found in [9]. 2 Background A typical tandem mass spectrometry experiment begins by cleaving proteins into peptides using a digesting enzyme. The resulting peptides are then separated via liquid chromatography and subjected to two rounds of mass spectrometry. The first round measures the mass and charge of the intact peptide, called the precursor mass and precursor charge, respectively. Peptides are then fragmented and the fragments undergo a second round of mass spectrometry, the output of which is an observed spectrum indicative of the fragmented peptide. The x-axis of this observed spectrum denotes massto-charge (m/z), measured in thomsons (Th), and the y-axis is a unitless intensity measure, roughly proportional to the abundance of a single fragment ion with a given m/z value. A sample such observed spectrum is illustrated in Figure 1. 1In honor of Shannon’s magnetic mouse, which could learn to traverse a small maze. 2 2.1 MS/MS Database Search Let s be an observed spectrum with precursor mass m(s) and precursor charge c(s). In order to identify s, we search a database of peptides, as follows. Let P be the set of all possible peptide sequences. Each peptide x ∈P is a string x = x1x2 . . . xn comprised of characters, called amino acids. Given a peptide database D ⊆P, we wish to find the peptide x ∈D responsible for generating s. Using the precursor mass and charge, the set of peptides to be scored is constrained by setting a mass tolerance threshold, w, such that we score the set of candidate peptides D(s, D, w) = n x : x ∈D, m(x) c(s) −m(s) ≤w o , where m(x) denotes the mass of peptide x. Note that we’ve overloaded m(·) to return either a peptide’s or observed spectrum’s precursor mass; we similarly overload c(·). Given s and denoting an arbitrary scoring function as ψ(x, s), the output of a search algorithm is thus x∗= argmaxx∈D(m(s),c(s),D,w) ψ(x, s), the top-scoring PSM. 2.1.1 Theoretical Spectra In order to score a candidate peptide x, fragment ions corresponding to suffix masses (called b-ions) and prefix masses (called y-ions) are collected into a theoretical spectrum. The annotated b- and y-ions of the generating peptide for an observed spectrum are illustrated in Figure 1. Varying based on the value of c(s), the kth respective b- and y-ion pair of x are b(x, cb, k) = Pk i=1 m(xi) + cb cb , y(x, cy, k) = Pn i=n−k m(xi) + 18 + cy cy , where cb is the charge of the b-ion and cy is the charge of the y-ion. For c(s) = 1, we have cb = cy = 1, since these are the only possible, detectable fragment ions. For higher observed charge states c(s) ≥2, it is unlikely for a single fragment ion to consume the entire charge, so that we have cb + cy = c(s), where cb, cy ∈[1, c(s) −1]. The b-ion offset corresponds to the mass of a cb charged hydrogen atom, while the y-ion offset corresponds to the mass of a water molecule plus a cy charged hydrogen atom. Further fragment ions may occur, each corresponding to the loss of a molecular group off a b- or y-ion. Called neutral losses, these correspond to a loss of either water, ammonia, or carbon monoxide. These fragment ions are commonly collected into a vector v, whose elements are weighted based on their corresponding fragment ion. For instance, XCorr [5] assigns all b- and y-ions a weight of 50 and all neutral losses a weight of 10. 2.2 Previous Work Many scoring functions have been proposed for use in search algorithms. They range from simple dot-product scoring functions (X!Tandem [2], Morpheus [22]), to cross-correlation based scoring functions (XCorr [5]), to exact p-values over linear scoring functions calculated using dynamic programming (MS-GF+ [16] and XCorr p-values [10]). The recently introduced DRIP [7] scores candidate peptides without quantization of m/z measurements and allows learning the expected locations of theoretical peaks given high quality, labeled training data. In order to avoid quantization of the m/z axis, DRIP employs a dynamic alignment strategy wherein two types of prevalent phenomena are explicitly modeled: spurious observed peaks, called insertions, and absent theoretical peaks, called deletions (examples of both are displayed in Figure 1). DRIP then uses max-product inference to calculate the most probable sequences of insertions and deletions to score candidate peptides, and was shown to achieve state-of-the-art performance on a variety of datasets. In practice, scoring functions are often poorly calibrated (i.e., PSM scores from different spectra are difficult to compare to one another), leading to potentially identified spectra left on the table during statistical analysis. In order to properly recalibrate such PSM scores, several semi-supervised postprocessing methods have been proposed [13, 19, 20]. The most popular such method is Percolator [13], which, given the output target and decoy PSMs (discussed in Section 5) of a scoring algorithm and features detailing each PSM, utilizes an SVM to learn a discriminative classifier between target PSMs and decoy PSMs. PSM scores are then recalibrated using the learned decision boundary. Recent work has attempted to leverage the generative nature of the DRIP model for discriminative use by Percolator [8]. As earlier mentioned, the output of DRIP is the most probable sequence of insertions and deletions, i.e., the Viterbi path. However, DRIP’s observations are the sequences of 3 observed spectrum m/z and intensity values, so that the lengths of PSM’s Viterbi paths vary depending on the number of observed spectrum peaks. In order to exploit DRIP’s output in the feature-space of a discriminative classifier, PSM Viterbi paths were heuristically mapped to a fixed-length vector of features. The resulting heuristic features were shown to dramatically improve Percolator’s ability to discriminate between PSMs. 2.3 Fisher Kernels Using generative models to extract features for discriminative classifiers has been used to great effect in many problem domains by using Fisher kernels [11, 12, 4]. Assuming a generative model with a set of parameters θ and likelihood p(O|θ) = P H p(O, H|θ), where O is a sequence of observations and H is the set of hidden variables, the Fisher score is then Uo = ∇θ log p(O|θ). Given observations Oi and Oj of differing length (and, thus, different underlying graphs in the case of dynamic graphical models), a kernel-based classifier over these instances is trained using UOi and UOj in the feature-space. Thus, a similarity measure is learned in the gradient space, under the intuition that objects which induce similar likelihoods will induce similar gradients. 3 DRIP Fisher Scores Theoretical Spectrum Variables Observed Spectrum Variables Figure 2: Graph of DRIP, the frames (i.e., time instances) of which correspond to observed spectrum peaks. Shaded nodes represent observed variables and unshaded nodes represent hidden variables. Given an observed spectrum, the middle frame (the chunk) dynamically expands to represent the second observed peak to the penultimate observed peak. We first define, in detail, DRIP’s log-likelihood, followed by the Fisher score derivation for DRIP’s learned parameters. For discussion of the DRIP model outside the score of this work, readers are directed to [7, 8]. Denoting an observed peak as a pair (Omz, Oin) consisting of an m/z measurement and intensity measurement, respectively, let s = (Omz 1 , Oin 1 ), (Omz 2 , Oin 2 ), . . . , (Omz T , Oin T ) be an MS/MS spectrum of T peaks and x be a candidate (which, given s, we’d like to score). We denote the theoretical spectrum of x, consisting of its unique b- and y-ions sorted in ascending order, as the length-d vector v. The graph of DRIP is displayed in Figure 2, where variables which control the traversal of the theoretical spectrum are highlighted in blue and variables which control the scoring of observed peak measurements are highlighted in red. Groups of variables are collected into time instances called frames. The frames of DRIP correspond to the observed peak m/z and intensity observations, so that there are T frames in the model. Unless otherwise specified, let t be an arbitrary frame 1 ≤t ≤T. δt is a multinomial random variable which dictates the number of theoretical peaks traversed in a frame. The random variable Kt, which denotes the index of the current theoretical peak index, is a deterministic function of its parents, such that p(Kt = Kt−1 + δt|Kt−1, δt) = 1. Thus, δt > 1 corresponds to the deletion of δt −1 theoretical peaks. The parents of δt ensure that DRIP does not attempt to increment past the last theoretical peak, i.e., p(δt > d −Kt−1|d, Kt−1, it−1) = 0. Subsequently, the theoretical peak value v(Kt) is used to access a Gaussian from a collection (the mean of each Gaussian corresponds to a position along the m/z axis, learned using the EM algorithm [3]) with which to score observations. Hence, the state-space of the model is all possible traversals, from left to right, of the theoretical spectrum, accounting for all possible deletions. When scoring observed peak measurements, the Bernoulli random variable it denotes whether a peak is scored using learned Gaussians (when it = 0) or considered an insertion and scored using an 4 insertion penalty (when it = 1). When scoring m/z observations, we thus have p(Omz t |v(Kt), it = 0) = f(Omz t |µmz(v(Kt)), σ2) and p(Omz t |v(Kt), it = 1) = amz, where µmz is a vector of Gaussian means and σ2 the m/z Gaussian variance. Similarly, when scoring intensity observations, we have p(Oin t |it = 0) = f(Oin t |µin, ¯σ2) and p(Oin t |it = 1) = ain, where µin and ¯σ2 are the intensity Gaussian mean and variance, respectively. Let i0 = K0 = ∅and 1{·} denote the indicator function. Denoting DRIP’s Gaussian parameters as θ, the likelihood is thus p(s|x, θ) = T Y t=1 p(δt|Kt−1, d, it−1)1{Kt=Kt−1+δt}p(Omz t |Kt)p(Oin t ) = T Y t=1 p(δt|Kt−1, d, it−1)1{Kt=Kt−1+δt}( 1 X it=0 p(it)p(Omz t |Kt, it))( 1 X it=0 p(it)p(Oin t |it)) = T Y t=1 φ(δt, Kt−1, it, it−1). The only stochastic variables in the model are it and δt, where all other random variables are either observed or deterministic given the sequences i1:T and δ1:T . Thus, we may equivalently write p(s|x, θ) = p(i1:T , δ1:T |θ). The Fisher score of the kth m/z mean is thus ∂ ∂µmz(k) log p(s|x, θ) = 1 p(s|x,θ) ∂ ∂µmz(k)p(s|x, θ), and we have (please see [9] for the full derivation) ∂ ∂µmz(k)p(s|x, θ) = ∂ ∂µmz(k) X i1:T ,δ1:T p(i1:T , δ1:T |θ) = X i1:T ,δ1:T :Kt=k,1≤t≤T ∂ ∂µmz(k)p(i1:T , δ1:T |θ) = X i1:T ,δ1:T 1{Kt=k}p(s|x, θ) Y t:Kt=k 1 p(Omz t |Kt) ! ∂ ∂µmz(k) Y t:Kt=k p(Omz t |Kt) ! . ⇒ ∂ ∂µmz(k) log p(s|x, θ) = T X t=1 p(it, Kt = k|s, θ)p(it = 0|Kt, Omz t )(Omz t −µmz(k)) σ2 . (1) Note that the posterior in Equation 1, and thus the Fisher score, may be efficiently computed using sum-product inference. Through similar steps, we have ∂ ∂σ2(k) log p(s|x, θ) = X t p(it, Kt = k|s, θ)p(it = 0|Kt, Omz t )((Omz t −µmz(k)) 2σ4 − 1 2σ2 ) (2) ∂ ∂µin log p(s|x, θ) = X t p(it, Kt|s, θ)p(it = 0|Oin t )(Oin t −µin) ¯σ2 (3) ∂ ∂¯σ2 log p(s|x, θ) = X t p(it, Kt|s, θ)p(it = 0|Oin t )((Oin t −µin) 2¯σ4 − 1 2¯σ2 ), (4) where σ2(k) denotes the partial derivative of the variance for the kth m/z Gaussian with mean µmz(k). Let Uµ = ∇µmz log p(s, x|θ) and Uσ2 = ∇σ2(k) log p(s, x|θ). Uµ and Uσ2 are length-d vectors corresponding to the mapping of a peptide’s sequence of b- and y-ions into r-dimensional space (i.e., dimension equal to an m/z-discretized observed spectrum). Let 1 be the length-r vector of ones. Defining zmz, zi ∈Rr, the elements of which are the quantized observed spectrum m/z and intensity values, respectively, we use the following DRIP gradient-based features for SVM training in Section 5: |Uµ|1, |Uσ2|1, U T µ zmz, U T σ2zi, U T µ 1, U T σ21, ∂ ∂µin log p(s, x|θ), and ∂ ∂¯σ2 log p(s, x|θ). 4 Theseus Given an observed spectrum s, we focus on representing the universe of linear PSM scores using a DBN. Let z denote the vector resulting from preprocessing the observed spectrum, s. As a modeling example, we look to represent the popular XCorr scoring function. Using subscript τ to denote a 5 vector whose elements are shifted τ units, XCorr’s scoring function is defined as XCorr(s, x) = vT z − 75 X τ=−75 vT zτ = vT (z − 75 X τ=−75 zτ) = vT z′, where z′ = z−P75 τ=−75 zτ. Let θ ∈Rl be a vector of XCorr weights for the various types of possible fragment ions (described in Section 2.1.1). As described in [10], given c(s), we reparameterize z′ into a vector zθ such that XCorr(x, s) is rendered as a dot-product between zθ and a boolean vector u in the reparameterized space. This reparameterization readily applies to any linear MS/MS scoring function. The ith element of zθ is zθ(i) = Pl j=1 θ(j)zj(i), where zj is a vector whose element zj(i) is the sum of all higher charged fragment ions added into the singly-charged fragment ions for the jth fragment ion type. The nonzero elements of u correspond to the singly-charged b-ions of x and we have uT zθ = Pn i=1 zθ(m(xi) + 1) = Pn i=1 Pl j=1 θ(j)zj(m(xi) + 1) = vT z′ = XCorr(s, x). Figure 3: Graph of Theseus. Shaded nodes are observed random variables and unshaded nodes are hidden (i.e., stochastic). The model is unrolled for n + 1 frames, including B0 in frame zero. Plate notation denotes M repetitions of the model, where M is the number of discrete precursor masses allowed by the precursor-mass tolerance threshold, w. Our generative model is illustrated in Figure 3. n is the maximum possible peptide length and m is one of M discrete precursor masses (dictated by the precursor-mass tolerance threshold, w, and m(s)). A hypothesis is an instantiation of random variables across all frames in the model, i.e., for the set of all possible sequences of Xi random variables, X1:n = X1, X2, . . . , Xn, a hypothesis is x1:n ∈X1:n. In our case, each hypothesis corresponds to a peptide and the corresponding log-likelihood its XCorr score. Each frame after the first contains an amino acid random variable so that we accumulate b-ions in successive frames and access the score contribution for each such ion. For frame i, Xi is a random amino acid and Bi the accumulated mass up to the current frame. B0 and Bn are observed to zero and m, respectively, enforcing the boundary conditions that all length-n PSMs considered begin with mass zero and end at a particular precursor mass. For i > 0, Bi is a deterministic function of its parents, p(Bi|Bi−1, Xi) = p(Bi = Bi−1 + m(Xi)) = 1. Thus, hypotheses which do not respect these mass constraints receive probability zero, i.e., p(Bn ̸= m|Bn−1, Xn) = 0. m is observed to the value of the current precursor mass being considered. Let A be the set of amino acids, where |A| = 20. Given Bi and m, the conditional distribution of Xi changes such that p(Xi ∈A|Bi−1 < m) = αU{A}, p(Xi = κ|Bi−1 ≥m) = 1, where U{·} is the uniform distribution over the input set and κ /∈A, m(κ) = 0. Thus, when the accumulated mass is less than m, Xi is a random amino acid and, otherwise, Xi deterministically takes on a value with zero mass. To recreate XCorr scores, α = 1/|A|, though, in general, any desired mass function may be used for p(Xi ∈A|Bi−1 < m). Si is a virtual evidence child [18], i.e., a leaf node whose conditional distribution need not be normalized to compute probabilistic quantities of interest in the DBN. For our model, we have p(Si|Bi < m, θ) = exp(zθ(Bi)) = exp(P|θ| i=1 θizi(Bi)) and p(Si|Bi ≥m, θ) = 1. Let t′ denote 6 the first frame in which m(X1:n) ≥m. The log-likelihood is then log p(s, X1:n|θ) = log p(X1:n, B0:n, S1:n−1) = log(1{B0=0}( n−1 Y i=1 p(Xi|m, Bi−1)p(Bi = Bi−1 + m(Xi))p(Si|m, Bi, θ))1{Bn−1+m(Xn)=m}) = log 1{B0=0 ∧m(X1:n)=m} + log( n Y i=t′+1 p(Xi|m, Bi−1)p(Bi = Bi−1 + m(Xi))p(Si|m, Bi, θ))+ log( t′ Y i=1 p(Xi|m, Bi−1)p(Bi = Bi−1 + m(Xi))p(Si|m, Bi, θ)) = log 1{m(X1:n)=m} + log 1 + log( t′ Y i=1 exp(zθ(Bi))) = log 1{m(X1:n)=m} + t′ X i=1 zθ(Bi) = log 1{B0=0 ∧m(X1:n)=m} + XCorr(X1:t′, s) The ith element of Theseus’ Fisher score is thus ∂ ∂θ(i) log p(s|θ) = ∂ ∂θ(i) log X x1:n p(s, x1:n|θ) = 1 p(s|θ) ∂ ∂θ(i) X x1:n p(s, x1:n|θ) = 1 p(s|θ) X x1:n 1{b0=0 ∧m(x1:n)=m}( t′ X j=1 zi(bj)) t′ Y j=1 exp(zθ(bj)), (5) While Equation 5 is generally difficult to compute, we calculate it efficiently using sum-product inference. Note that when the peptide sequence is observed, i.e., X1:n = ˆx, we have ∂ ∂θ(i) log p(s, ˆx|θ) = P j z(m(ˆx1:j)). Using the model’s Fisher scores, Theseus’ parameters θ may be learned via maximum likelihood estimation. Given a dataset of spectra s1, s2, . . . , sn, we present an alternate learning algorithm (Algorithm 1) which converges monotonically to a local optimum (proven in [9]). Within each iteration, Algorithm 1 uses max-product inference to efficiently infer the most probable PSMs per iteration, mitigating the need for training labels. θ is maximized in each iteration using gradient ascent. Algorithm 1 Theseus Unsupervised Learning Algorithm 1: while not converged do 2: for i = 1, . . . , n do 3: ˆxi ←argmaxxi∈P log p(si, xi|θ) 4: end for 5: θ ←argmaxθ Pn i=1 log p(si, ˆxi|θ) 6: end while 5 Results Measuring peptide identification performance is complicated by the fact that ground-truth is unavailable for real-world data. Thus, in practice, it is most common to estimate the false discovery rate (FDR) [1] by searching a decoy database of peptides which are unlikely to occur in nature, typically generated by shuffling entries in the target database [14]. For a particular score threshold, t, FDR is then calculated as the proportion of decoys scoring better than t to the number of targets scoring better than t. Once the target and decoy PSMs are calculated, a curve displaying the FDR threshold vs. the number of correctly identified targets at each given threshold may be calculated. In place of FDR along the x-axis, we use the q-value [14], defined to be the minimum FDR threshold at which a given score is deemed to be significant. As many applications require a search algorithm perform well at low thresholds, we only plot q ∈[0, 0.1]. The same datasets and search settings used to evaluate DRIP’s heuristically derived features in [8] are adapted in this work. MS-GF+ (one of the most accurate search algorithms in wide use, plotted 7 for reference) was run using version 9980, with PSMs ranked by E-value and Percolator features calculated using msgf2pin. All database searches were run using a ±3.0Th mass tolerance, XCorr flanking peaks not allowed in Crux searches, and all search algorithm settings otherwise left to their defaults. Peptides were derived from the protein databases using trypsin cleavage rules without suppression of proline and a single fixed carbamidomethyl modification was included. Gradient-based feature representations derived from DRIP and XCorr were used to train an SVM classifier [13] and recalibrate PSM scores. Theseus training and computation of XCorr Fisher scores were performed using a customized version of Crux v2.1.17060 [17]. For an XCorr PSM, a feature representation is derived directly using both ∇θ log p(s|θ) and ∇θ log p(s, x|θ) as defined in Section 4, representing gradient information for both the distribution of PSM scores and the individual PSM score, respectively. DRIP gradient-based features, as defined in Section 3, were derived using a customized version of the DRIP Toolkit [8].Figure 4 displays the resulting search accuracy for four worm and yeast datasets. For the uncalibrated search results in Figure 5, we show that XCorr parameters may be learned without supervision using Theseus, and that the presented coordinate descent algorithm (which estimates the most probable PSMs to take a step in the objective space) converges to a much better local optimum than maximum likelihood estimation. 0.02 0.04 0.06 0.08 0.10 q-value 0 5 10 15 Spectra identified (1000’s) DRIP Fisher DRIP XCorr p-value Fisher XCorr p-value XCorr Fisher XCorr MS-GF+ 0.02 0.04 0.06 0.08 0.10 q-value 5 7 10 12 15 Spectra identified (1000’s) (b) Worm-1 0.02 0.04 0.06 0.08 0.10 q-value 4 6 8 10 Spectra identified (1000’s) (c) Worm-2 0.02 0.04 0.06 0.08 0.10 q-value 2 4 6 8 Spectra identified (1000’s) (d) Worm-3 0.02 0.04 0.06 0.08 0.10 q-value 3 4 5 6 7 Spectra identified (1000’s) (e) Worm-4 0.02 0.04 0.06 0.08 0.10 q-value 6 8 10 12 14 Spectra identified (1000’s) (f) Yeast-1 0.02 0.04 0.06 0.08 0.10 q-value 6 8 10 12 14 Spectra identified (1000’s) (g) Yeast-2 0.02 0.04 0.06 0.08 0.10 q-value 6 8 10 12 14 Spectra identified (1000’s) (h) Yeast-3 0.02 0.04 0.06 0.08 0.10 q-value 6 8 10 12 14 Spectra identified (1000’s) (i) Yeast-4 Figure 4: Search accuracy plots measured by q-value versus number of spectra identified for worm (C. elegans) and yeast (Saccharomyces cerevisiae) datasets. All methods are post-processed using the Percolator SVM classifier [13]. “DRIP” augments the standard set of DRIP features with DRIP-Viterbi-path parsed PSM features (described in [8]) and “DRIP Fisher” augments the heuristic set with gradient-based DRIP features. “XCorr,” “XCorr p-value,” and “MS-GF+” use their standard sets of Percolator features (described in [8]), while “XCorr p-value Fisher” and “XCorr Fisher” augment the standard XCorr feature sets with gradient-based Theseus features. 8 0.02 0.04 0.06 0.08 0.10 q-value 0 5 10 Spectra identified (1000’s) XCorr p-value Coordinate Ascent XCorr p-value MLE XCorr p-value XCorr Coordinate Ascent XCorr MLE XCorr 0.02 0.04 0.06 0.08 0.10 q-value 4 6 8 10 12 Spectra identified (1000’s) (b) Yeast-1 0.02 0.04 0.06 0.08 0.10 q-value 5 7 10 12 Spectra identified (1000’s) (c) Yeast-2 Figure 5: Search accuracy of Theseus’ learned scoring function parameters. Coordinate ascent parameters are learned using Algorithm 1 and MLE parameters are learned using gradient ascent. 5.1 Discussion DRIP gradient-based post-processing improves upon the heuristically derived features in all cases, and does so substantially on a majority of datasets. In the case of the yeast datasets, this distinguishes DRIP post-processing performance from all competitors and leads to state-of-the-art identification accuracy. Furthermore, we note that both XCorr and XCorr p-value post-processing performance are greatly improved using the gradient-based features derived using Theseus, raising performance above the highly similar MS-GF+ in several cases. Particularly noteworthy is the substantial improvement in XCorr accuracy which, using gradient-based information, is nearly competitive with its p-value counterpart. Considering the respective runtimes of the underlying search algorithms, this thus presents a tradeoff for a researcher considering search time and accuracy. In practice, the DRIP and XCorr p-value computations are at least an order of magnitude slower than XCorr computation in Crux [21]. Thus, the presented work not only improves state-of-the-art accuracy, but also improves the accuracy of simpler, yet significantly faster, search algorithms. Owing to max-product inference in graphical models, we also show that Theseus may be used to effectively learn XCorr model parameters (Figure 5) without supervision. Furthermore, we show that XCorr p-values are also made more accurate by training the underlying scoring function for which p-values are computed. This marks a novel step towards unsupervised training of uncalibrated scoring functions, as unsupervised learning has been extensively explored for post-processor recalibration, but has remained an open problem for MS/MS database-search scoring functions. The presented learning framework, as well as the presented XCorr gradient-based feature representation, may be adapted by many of the widely scoring functions represented by Theseus [2, 5, 6, 16, 10, 22, 17]. Many exciting avenues are open for future work. Leveraging the large breadth of graphical models research, we plan to explore other learning paradigms using Theseus (for instance, estimating other PSMs using k-best Viterbi in order to discriminatively learn parameters using algorithms such as max-margin learning). Perhaps most exciting, we plan to further investigate the peptide-to-observedspectrum mapping derived from DRIP Fisher scores. Under this mapping, we plan to explore learning distance metrics between PSMs in order to identify proteins from peptides. Acknowledgments: This work was supported by the National Center for Advancing Translational Sciences (NCATS), National Institutes of Health, through grant UL1 TR001860. References [1] Y. Benjamini and Y. Hochberg. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society B, 57:289–300, 1995. [2] R. Craig and R. C. Beavis. Tandem: matching proteins with tandem mass spectra. Bioinformatics, 20:1466–1467, 2004. [3] 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 (Methodological), 39:1–22, 1977. [4] Charles Elkan. Deriving tf-idf as a fisher kernel. In International Symposium on String Processing and Information Retrieval, pages 295–300. Springer, 2005. 9 [5] J. K. Eng, A. L. McCormack, and J. R. Yates, III. An approach to correlate tandem mass spectral data of peptides with amino acid sequences in a protein database. Journal of the American Society for Mass Spectrometry, 5:976–989, 1994. [6] Jimmy K Eng, Tahmina A Jahan, and Michael R Hoopmann. Comet: An open-source ms/ms sequence database search tool. Proteomics, 13(1):22–24, 2013. [7] John T. Halloran, Jeff A. Bilmes, and William S. Noble. Learning peptide-spectrum alignment models for tandem mass spectrometry. In Uncertainty in Artificial Intelligence (UAI), Quebec City, Quebec Canada, July 2014. AUAI. [8] John T Halloran, Jeff A Bilmes, and William S Noble. Dynamic bayesian network for accurate detection of peptides from tandem mass spectra. Journal of Proteome Research, 15(8):2749– 2759, 2016. [9] John T. Halloran and David M. Rocke. Gradients of Generative Models for Improved Discriminative Analysis of Tandem Mass Spectra: Supplementary Materials, 2017. [10] J Jeffry Howbert and William S Noble. Computing exact p-values for a cross-correlation shotgun proteomics score function. Molecular & Cellular Proteomics, pages mcp–O113, 2014. [11] T. Jaakkola and D. Haussler. Exploiting generative models in discriminative classifiers. In Advances in Neural Information Processing Systems, Cambridge, MA, 1998. MIT Press. [12] Tommi S Jaakkola, Mark Diekhans, and David Haussler. Using the fisher kernel method to detect remote protein homologies. In ISMB, volume 99, pages 149–158, 1999. [13] L. K¨all, J. Canterbury, J. Weston, W. S. Noble, and M. J. MacCoss. A semi-supervised machine learning technique for peptide identification from shotgun proteomics datasets. Nature Methods, 4:923–25, 2007. [14] Uri Keich, Attila Kertesz-Farkas, and William Stafford Noble. Improved false discovery rate estimation procedure for shotgun proteomics. Journal of proteome research, 14(8):3148–3161, 2015. [15] Uri Keich and William Stafford Noble. On the importance of well-calibrated scores for identifying shotgun proteomics spectra. Journal of proteome research, 14(2):1147–1160, 2014. [16] Sangtae Kim and Pavel A Pevzner. Ms-gf+ makes progress towards a universal database search tool for proteomics. Nature communications, 5, 2014. [17] Sean McIlwain, Kaipo Tamura, Attila Kertesz-Farkas, Charles E Grant, Benjamin Diament, Barbara Frewen, J Jeffry Howbert, Michael R Hoopmann, Lukas K¨all, Jimmy K Eng, et al. Crux: rapid open source protein tandem mass spectrometry analysis. Journal of proteome research, 2014. [18] J. Pearl. Probabilistic Reasoning in Intelligent Systems : Networks of Plausible Inference. Morgan Kaufmann, 1988. [19] M. Spivak, J. Weston, L. Bottou, L. K¨all, and W. S. Noble. Improvements to the Percolator algorithm for peptide identification from shotgun proteomics data sets. Journal of Proteome Research, 8(7):3737–3745, 2009. PMC2710313. [20] M. Spivak, J. Weston, D. Tomazela, M. J. MacCoss, and W. S. Noble. Direct maximization of protein identifications from tandem mass spectra. Molecular and Cellular Proteomics, 11(2):M111.012161, 2012. PMC3277760. [21] Shengjie Wang, John T Halloran, Jeff A Bilmes, and William S Noble. Faster and more accurate graphical model identification of tandem mass spectra using trellises. Bioinformatics, 32(12):i322–i331, 2016. [22] C. D. Wenger and J. J. Coon. A proteomics search algorithm specifically designed for highresolution tandem mass spectra. Journal of proteome research, 2013. 10 | 2017 | 428 |
6,928 | On the Optimization Landscape of Tensor Decompositions Rong Ge Duke University rongge@cs.duke.edu Tengyu Ma Facebook AI Research tengyuma@cs.stanford.edu Abstract Non-convex optimization with local search heuristics has been widely used in machine learning, achieving many state-of-art results. It becomes increasingly important to understand why they can work for these NP-hard problems on typical data. The landscape of many objective functions in learning has been conjectured to have the geometric property that “all local optima are (approximately) global optima”, and thus they can be solved efficiently by local search algorithms. However, establishing such property can be very difficult. In this paper, we analyze the optimization landscape of the random over-complete tensor decomposition problem, which has many applications in unsupervised leaning, especially in learning latent variable models. In practice, it can be efficiently solved by gradient ascent on a non-convex objective. We show that for any small constant ε > 0, among the set of points with function values (1 + ε)-factor larger than the expectation of the function, all the local maxima are approximate global maxima. Previously, the best-known result only characterizes the geometry in small neighborhoods around the true components. Our result implies that even with an initialization that is barely better than the random guess, the gradient ascent algorithm is guaranteed to solve this problem. Our main technique uses Kac-Rice formula and random matrix theory. To our best knowledge, this is the first time when Kac-Rice formula is successfully applied to counting the number of local optima of a highly-structured random polynomial with dependent coefficients. 1 Introduction Non-convex optimization is the dominating algorithmic technique behind many state-of-art results in machine learning, computer vision, natural language processing and reinforcement learning. Local search algorithms through stochastic gradient methods are simple, scalable and easy to implement. Surprisingly, they also return high-quality solutions for practical problems like training deep neural networks, which are NP-hard in the worst case. It has been conjectured [DPG+14, CHM+15] that on typical data, the landscape of the training objectives has the nice geometric property that all local minima are (approximate) global minima. Such property assures the local search algorithms to converge to global minima [GHJY15, LSJR16, NP06, SQW15]. However, establishing it for concrete problems can be challenging. Despite recent progress on understanding the optimization landscape of various machine learning problems (see [GHJY15, BBV16, BNS16, Kaw16, GLM16, HM16, HMR16] and references therein), a comprehensive answer remains elusive. Moreover, all previous techniques fundamentally rely on the spectral structure of the problems. For example, in [GLM16] allows us to pin down the set of the critical points (points with vanishing gradients) as approximate eigenvectors of some matrix. Among 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. these eigenvectors we can further identify all the local minima. The heavy dependency on linear algebraic structure limits the generalization to problems with non-linearity (like neural networks). Towards developing techniques beyond linear algebra, in this work, we investigate the optimization landscape of tensor decomposition problems. This is a clean non-convex optimization problem whose optimization landscape cannot be analyzed by the previous approach. It also connects to the training of neural networks with many shared properties [NPOV15] . For example, in comparison with the matrix case where all the global optima reside on a (connected) Grassmannian manifold, for both tensors and neural networks all the global optima are isolated from each other. Besides the technical motivations above, tensor decomposition itself is also the key algorithmic tool for learning many latent variable models, mixture of Gaussians, hidden Markov models, dictionary learning [Cha96, MR06, HKZ12, AHK12, AFH+12, HK13], just to name a few. In practice, local search heuristics such as alternating least squares [CLA09], gradient descent and power method [KM11] are popular and successful. Tensor decomposition also connects to the learning of neural networks [GLM17, JSA15, CS16]. For example, The work [GLM17] shows that the objective of learning one-hidden-layer network is implicitly decomposing a sequence of tensors with shared components, and uses the intuition from tensor decomposition to design better objective functions that provably recovers the parameters under Gaussian inputs. Concretely, we consider decomposing a random 4-th order tensor T of the rank n of the following form, T = n X i=1 ai ⊗ai ⊗ai ⊗ai . We are mainly interested in the over-complete regime where n ≫d. This setting is particularly challenging, but it is crucial for unsupervised learning applications where the hidden representations have higher dimension than the data [AGMM15, DLCC07]. Previous algorithmic results either require access to high order tensors [BCMV14, GVX13], or use complicated techniques such as FOOBI [DLCC07] or sum-of-squares relaxation [BKS15, GM15, HSSS16, MSS16]. In the worst case, most tensor problems are NP-hard [Hås90, HL13]. Therefore we work in the average case where vectors ai ∈Rd are assumed to be drawn i.i.d from Gaussian distribution N(0, I). We call ai’s the components of the tensor. We are given the entries of tensor T and our goal is to recover the components a1, . . . , an. We will analyze the following popular non-convex objective, max f(x) = X i,j,k,l∈[d]4 Ti,j,k,lxixjxkxl = n X i=1 ⟨ai, x⟩4 (1.1) s.t. ∥x∥= 1. It is known that for n ≪d2, the global maxima of f is close to one of ± 1 √ da1, . . . , ± 1 √ dan. Previously, Ge et al. [GHJY15] show that for the orthogonal case where n ≤d and all the ai’s are orthogonal, objective function f(·) have only 2n local maxima that are approximately ± 1 √ da1, . . . , ± 1 √ dan. However, the technique heavily uses the orthogonality of the components and is not generalizable to over-complete case. Empirically, projected gradient ascent and power methods find one of the components ai’s even if n is significantly larger than d. The local geometry for the over-complete case around the true components is known: in a small neighborhood of each of ± 1 √ dai’s, there is a unique local maximum [AGJ15]. Algebraic geometry techniques [CS13, ASS15] can show that f(·) has an exponential number of other critical points, while these techniques seem difficult to extend to the characterization of local maxima. It remains a major open question whether there are any other spurious local maxima that gradient ascent can potentially converge to. Main results. We show that there are no spurious local maxima in a large superlevel set that contains all the points with function values slightly larger than that of the random initialization. Theorem 1.1. Let ε, ζ ∈(0, 1/3) be two arbitrary constants and d be sufficiently large. Suppose d1+ε < n < d2−ε. Then, with high probability over the randomness of ai’s, we have that in the superlevel set L = x ∈Sd−1 : f(x) ≥3(1 + ζ)n , (1.2) there are exactly 2n local maxima with function values (1 ± o(1))d2, each of which is eO( p n/d3)close to one of ± 1 √ da1, . . . , ± 1 √ dan. Previously, the best known result [AGJ15] only characterizes the geometry in small neighborhoods around the true components, that is, there exists one local maximum in each of the small constant neighborhoods around each of the true components ai’s. (It turns out in such neighborhoods, the objective function is actually convex.) We significantly enlarge this region to the superlevel set L, on which the function f is not convex and has an exponential number of saddle points, but still doesn’t have any spurious local maximum. Note that a random initialization z on the unit sphere has expected function value E[f(z)] = 3n. Therefore the superlevel set L contains all points that have function values barely larger than that of the random guess. Hence, Theorem 1.1 implies that with a slightly better initialization than the random guess, gradient ascent and power method1 are guaranteed to find one of the components in polynomial time. (It is known that after finding one component, it can be peeled off from the tensor and the same algorithm can be repeated to find all other components.) Corollary 1.2. In the setting of Theorem 1.1, with high probability over the choice of ai’s, we have that given any starting point x0 that satisfies f(x0) ≥3(1 + ζ)n, stochastic projected gradient descent2 will find one of the ± 1 √ dai’s up to eO( p n/d3) Euclidean error in polynomial time. We also strengthen Theorem 1.1 and Corollary 1.2 (see Theorem 3.1) slightly – the same conclusion still holds with ζ = O( p d/n) that is smaller than a constant. Note that the expected value of a random initialization is 3n and we only require an initialization that is slightly better than random guess in function value. We remark that a uniformly random point x on the unit sphere are not in the set L with high probability. It’s an intriguing open question to characterize the landscape in the complement of the set L. We also conjecture that from random initialization, it suffices to use constant number of projected gradient descent (with optimal step size) to achieve the function value 3(1 + ζ)n with ζ = O( p d/n). This conjecture — an interesting question for future work — is based on the hypothesis that the first constant number of steps of gradient descent can make similar improvements as the first step does (which is equal to c √ dn for a universal constant c). As a comparison, previous works such as [AGJ15] require an initialization with function value Θ(d2) ≫n. Anandkumar et al. [AGJ16] analyze the dynamics of tensor power method with a delicate initialization that is independent with the randomness of the tensor. Thus it is not suitable for the situation where the initialization comes from the result of another algorithm, and it does not have a direct implication on the landscape of f(·). We note that the local maximum of f(·) corresponds to the robust eigenvector of the tensor. Using this language, our theorem says that a robust eigenvector of an over-complete tensor with random components is either one of those true components or has a small correlation with the tensor in the sense that ⟨T, x⊗4⟩is small. This improves significantly upon the understanding of robust eigenvectors [ASS15] under an interesting random model. The condition n > d1+ε should be artificial. The under-complete case (n < d) can be proved by re-using the proof of [GHJY15] with the observation that local optima are preserved by linear transformation. The intermediate regime when d < n < d1+ε should be analyzable by Kac-Rice formula using similar techniques, but our current proof cannot capture it directly. Since the proof in this paper is already involved, we leave this case to future work. The condition n < d2−ε matches the best over-completeness level that existing polynomial algorithm can handle [DLCC07, MSS16]. 1Power method is exactly equivalent to gradient ascent with a properly chosen finite learning rate 2We note that by stochastic gradient descent we meant the algorithm that is analyzed in [GHJY15]. To get a global maximum in polynomial time (polynomial in log(1/ε) to get ε precision), one also needs to slightly modify stochastic gradient descent in the following way: run SGD until 1/d accuracy and then switch to gradient descent. Since the problem is locally strongly convex, the local convergence is linear. Our techniques The proof of Theorem 1.1 uses Kac-Rice formula (see, e.g., [AT09]), which is based on a counting argument. To build up the intuition, we tentatively view the unit sphere as a collection of discrete points, then for each point x one can compute the probability (with respect to the randomness of the function) that x is a local maximum. Adding up all these probabilities will give us the expected number of local maxima. In continuous space, such counting argument has to be more delicate since the local geometry needs to be taken into account. This is formalized by Kac-Rice formula (see Lemma 2.2). However, Kac-Rice formula only gives a closed form expression that involves the integration of the expectation of some complicated random variable. It’s often very challenging to simplify the expression to obtain interpretable results. Before our work, Auffinger et al. [AA ˇC13, AA+13] have successfully applied Kac-Rice formula to characterize the landscape of polynomials with random Gaussian coefficients. The exact expectation of the number of local minima can be computed there, because the Hessian of a random polynomial is a Gaussian orthogonal ensemble, whose eigenvalue distribution is well-understood with closed form expression. Our technical contribution here is successfully applying Kac-Rice formula to structured random non-convex functions where the formula cannot be exactly evaluated. The Hessian and gradients of f(·) have much more complicated distributions compared to the Gaussian orthogonal ensemble. As a result, the Kac-Rice formula is difficult to be evaluated exactly. We instead cut the space Rd into regions and use different techniques to estimate the number of local maxima. See a proof overview in Section 3. We believe our techniques can be extended to 3rd order tensors and can shed light on the analysis of other non-convex problems with structured randomness. Organization In Section 2 we introduce preliminaries regarding manifold optimization and Kac-Rice formula. We give a detailed explanation of our proof strategy in Section 3. The technical details are deferred to the supplementary material. We also note that the supplementary material contains an extended version of the preliminary and proof overview section below. 2 Notations and Preliminaries We use Idd to denote the identity matrix of dimension d × d. Let ∥· ∥denote the spectral norm of a matrix or the Euclidean norm of a vector. Let ∥·∥F denote the Frobenius norm of a matrix or a tensor. Gradient, Hessian, and local maxima on manifold We have a constrained optimization problem over the unit sphere Sd−1, which is a smooth manifold. Thus we define the local maxima with respect to the manifold. It’s known that projected gradient descent for Sd−1 behaves pretty much the same on the manifold as in the usual unconstrained setting [BAC16]. In supplementary material we give a brief introduction to manifold optimization, and the definition of gradient and Hessian. We refer the readers to the book [AMS07] for more backgrounds. Here we use grad f and Hess f to denote the gradient and the Hessian of f on the manifold Sd−1. We compute them in the following claim. Claim 2.1. Let f : Sd−1 →R be f(x) := 1 4 Pn i=1⟨ai, x⟩4. Let Px = Idd −xx⊤. Then the gradient and Hessian of f on the sphere can be written as, grad f(x) = Px n X i=1 ⟨ai, x⟩3ai , Hess f(x) = 3 n X i=1 ⟨ai, x⟩2Pxaia⊤ i Px − n X i=1 ⟨ai, x⟩4 ! Px , A local maximum of a function f on the manifold Sd−1 satisfies grad f(x) = 0, and Hess f(x) ⪯0. Let Mf be the set of all local maxima, i.e. Mf = x ∈Sd−1 : grad f(x) = 0, Hess f(x) ⪯0 . Kac-Rice formula Kac-Rice formula is a general tool for computing the expected number of special points on a manifold. Suppose there are two random functions P(·) : Rd →Rd and Q(·) : Rd →Rk, and an open set B in Rk. The formula counts the expected number of point x ∈Rd that satisfies both P(x) = 0 and Q(x) ∈B. Suppose we take P = ∇f and Q = ∇2f, and let B be the set of negative semidefinite matrices, then the set of points that satisfies P(x) = 0 and Q ∈B is the set of all local maxima Mf. Moreover, for any set Z ⊂Sd−1, we can also augment Q by Q = [∇2f, x] and choose B = {A : A ⪯0} ⊗Z. With this choice of P, Q, Kac-Rice formula can count the number of local maxima inside the region Z. For simplicity, we will only introduce Kac-Rice formula for this setting. We refer the readers to [AT09, Chapter 11&12] for more backgrounds. Lemma 2.2 (Informally stated). Let f be a random function defined on the unit sphere Sd−1 and let Z ⊂Sd−1. Under certain regularity conditions3 on f and Z, we have E [|Mf ∩Z|] = Z x E [| det(Hess f)| · 1(Hess f ⪯0)1(x ∈Z) | grad f(x) = 0] pgrad f(x)(0)dx . (2.1) where dx is the usual surface measure on Sd−1 and pgrad f(x)(0) is the density of grad f(x) at 0. Formula for the number of local maxima In this subsection, we give a concrete formula for the number of local maxima of our objective function (1.1) inside the superlevel set L (defined in equation (1.2)). Taking Z = L in Lemma 2.2, it boils down to estimating the quantity on the right hand side of (2.1). We remark that for the particular function f as defined in (1.1) and Z = L, the integrand in (2.1) doesn’t depend on the choice of x. This is because for any x ∈Sd−1, (Hess f, grad f, 1(x ∈L)) has the same joint distribution, as characterized below: Lemma 2.3. Let f be the random function defined in (1.1). Let α1, . . . , αn ∈N(0, 1), and b1, . . . , bn ∼N(0, Idd−1) be independent Gaussian random variables. Let M = ∥α∥4 4 · Idd−1 −3 n X i=1 α2 i bib⊤ i and g = n X i=1 α3 i bi (2.2) Then, we have that for any x ∈Sd−1, (Hess f, grad f, f) has the same joint distribution as (−M, g, ∥α∥4 4). Using Lemma 2.2 (with Z = L) and Lemma 2.3, we derive the following formula for the expectation of our random variable E [|Mf ∩L|]. Later we will later use Lemma 2.2 slightly differently with another choice of Z. Lemma 2.4. Using the notation of Lemma 2.3, let pg(·) denote the density of g. Then, E [|Mf ∩L|] = Vol(Sd−1) · E h |det(M)| 1(M ⪰0)1(∥α∥4 4 ≥3(1 + ζ)n) | g = 0 i pg(0) . (2.3) 3 Proof Overview In this section, we give a high-level overview of the proof of the main Theorem. We will prove a slightly stronger version of Theorem 1.1. Let γ be a universal constant that is to be determined later. Define the set L1 ⊂Sd−1 as, L1 := ( x ∈Sd−1 : n X i=1 ⟨ai, x⟩4 ≥3n + γ √ nd ) . (3.1) Indeed we see that L (defined in (1.2)) is a subset of L1 when n ≫d. We prove that in L1 there are exactly 2n local maxima. Theorem 3.1 (main). There exists universal constants γ, β such that the following holds: suppose d2/ logO(1) ≥n ≥βd log2 d and L1 be defined as in (3.1), then with high probability over the choice of a1, . . . , an, we have that the number of local maxima in L1 is exactly 2n: |Mf ∩L1| = 2n . (3.2) Moreover, each of the local maximum in L1 is eO( p n/d3)-close to one of ± 1 √ da1, . . . , ± 1 √ dan. In order to count the number of local maxima in L1, we use the Kac-Rice formula (Lemma 2.4). Recall that what Kac-Rice formula gives an expression that involves the complicated expectation 3We omit the long list of regularity conditions here for simplicity. See more details at [AT09, Theorem 12.1.1] E h |det(M)| 1(M ⪰0)1(∥α∥4 4 ≥3(1 + ζ)n) | g = 0 i . Here the difficulty is to deal with the determinant of a random matrix M (defined in Lemma 2.3), whose eigenvalue distribution does not admit an analytical form. Moreover, due to the existence of the conditioning and the indicator functions, it’s almost impossible to compute the RHS of the Kac-Rice formula (equation (2.3)) exactly. Local vs. global analysis: The key idea to proceed is to divide the superlevel set L1 into two subsets L1 = (L1 ∩L2) ∪Lc 2, where L2 := {x ∈Sd−1 : ∀i, ∥Pxai∥2 ≥(1 −δ)d, and |⟨ai, x⟩|2 ≤δd} . (3.3) Here δ is a sufficiently small universal constant that is to be chosen later. We also note that Lc 2 ⊂L1 and hence L1 = (L1 ∩L2) ∪Lc 2. Intuitively, the set L1 ∩L2 contains those points that do not have large correlation with any of the ai’s; the compliment Lc 2 is the union of the neighborhoods around each of the desired vector 1 √ da1, . . . , 1 √ dan. We will refer to the first subset L1 ∩L2 as the global region, and refer to the Lc 2 as the local region. We will compute the number of local maxima in sets L1 ∩L2 and Lc 2 separately using different techniques. We will show that with high probability L1 ∩L2 contains no local maxima using KacRice formula (see Theorem 3.2). Then, we show that Lc 2 contains exactly 2n local maxima (see Theorem 3.3) using a different and more direct approach. Global analysis. The key benefit of have such division to local and global regions is that for the global region, we can avoid evaluating the value of the RHS of the Kac-Rice formula. Instead, we only need to have an estimate: Note that the number of local optima in L1 ∩L2, namely |Mf ∩L1 ∩L2|, is an integer nonnegative random variable. Thus, if we can show its expectation E [|Mf ∩L1 ∩L2|] is much smaller than 1, then Markov’s inequality implies that with high probability, the number of local maxima will be exactly zero. Concretely, we will use Lemma 2.2 with Z = L1 ∩L2, and then estimate the resulting integral using various techniques in random matrix theory. It remains quite challenging even if we are only shooting for an estimate. Concretely, we get the following Theorem Theorem 3.2. Let sets L1, L2 be defined as in equation (3.3) and n ≥βd log2 d. There exists universal small constant δ ∈(0, 1) and universal constants γ, β, and a high probability event G0, such that the expected number of local maxima in L1 ∩L2 conditioned on G0 is exponentially small: E |Mf ∩L1 ∩L2| G0 ≤2−d/2 . See Section 3.1 for an overview of the analysis. The purpose and definition of G0 are more technical and can be found in Section 3 of the supplementary material around equation (3.3) (3,4) and (3.5). We also prove that G0 is indeed a high probability event in supplementary material. 4 Local analysis. In the local region Lc 2, that is, the neighborhoods of a1, . . . , an, we will show there are exactly 2n local maxima. As argued above, it’s almost impossible to get exact numbers out of the Kac-Rice formula since it’s often hard to compute the complicated integral. Moreover, Kac-Rice formula only gives the expected number but not high probability bounds. However, here the observation is that the local maxima (and critical points) in the local region are well-structured. Thus, instead, we show that in these local regions, the gradient and Hessian of a point x are dominated by the terms corresponding to components {ai}’s that are highly correlated with x. The number of such terms cannot be very large (by restricted isometry property, see Section B.5 of the supplementary material). As a result, we can characterize the possible local maxima explicitly, and eventually show there is exactly one local maximum in each of the local neighborhoods around {± 1 √ dai}’s. Similar (but weaker) analysis was done before in [AGJ15]. We formalize the guarantee for local regions in the following theorem, which is proved in Section 5 of the supplementary material. In Section 3.2 of the supplementary material, we also discuss the key ideas of the proof of this Theorem. Theorem 3.3. Suppose 1/δ2 · d log d ≤n ≤d2/ logO(1) d. Then, with high probability over the choice a1, . . . , an, we have, |Mf ∩L1 ∩Lc 2| = 2n . (3.4) Moreover, each of the point in L ∩Lc 2 is eO( p n/d3)-close to one of ± 1 √ da1, . . . , ± 1 √ dan. 4We note again that the supplementary material contains more details in each section even for sections in the main text. The main Theorem 3.1 is a direct consequence of Theorem 3.2 and Theorem 3.3. The formal proof can be found in Section 3 of the supplementary material. In the next subsections we sketch the basic ideas behind the proof of Theorem 3.2 and Theorem 3.3. Theorem 3.2 is the crux of the technical part of the paper. 3.1 Estimating the Kac-Rice formula for the global region The general plan to prove Theorem 3.2 is to use random matrix theory to estimate the RHS of the Kac-Rice formula. We begin by applying Kac-Rice formula to our situation. We note that we dropped the effect of G0 in all of the following discussions since G0 only affects some technicality that appears in the details of the proof in the supplementary material. Applying Kac-Rice formula. The first step to apply Kac-Rice formula is to characterize the joint distribution of the gradient and the Hessian. We use the notation of Lemma 2.3 for expressing the joint distribution of (Hess f, grad f, 1(x ∈L1 ∩L2)). For any fix x ∈Sd−1, let αi = ⟨ai, x⟩and bi = Pxai (where Px = Id −xx⊤) and M = ∥α∥4 4 · Idd−1 − 3 Pn i=1 α2 i bib⊤ i and g = Pn i=1 α3 i bi as defined in (2.2). In order to apply Kac-Rice formula, we’d like to compute the joint distribution of the gradient and the Hessian. We have that (Hess f, grad f, 1(x ∈L1 ∩L2)) has the same distribution as (M, g, 1(E1 ∩E2 ∩E′ 2)),where E1 corresponds to the event that x ∈L1, E1 = n ∥α∥4 4 ≥3n + γ √ nd o , and events E2 and E′ 2 correspond to the events that x ∈L2. We separate them out to reflect that E2 and E′ 2 depends the randomness of αi’s and bi’s respectively. E2 = ∥α∥2 ∞≤δd , and E′ 2 = ∀i ∈[n], ∥bi∥2 ≥(1 −δ)d . Using Kac-Rice formula (Lemma 2.2 with Z = L1 ∩L2), we conclude that E [|Mf ∩L1 ∩L2|] = Vol(Sd−1) · E [|det(M)| 1(M ⪰0)1(E1 ∩E2 ∩E′ 2) | g = 0] pg(0) . (3.5) Next, towards proving Theorem 3.2 we will estimate the RHS of (3.5) using various techniques. Conditioning on α. We observe that the distributions of the gradient g and Hessian M on the RHS of equation 3.5 are fairly complicated. In particular, we need to deal with the interactions of αi’s (the components along x) and bi’s (the components in the orthogonal subspace of x). Therefore, we use the law of total expectation to first condition on α and take expectation over the randomness of bi’s, and then take expectation over αi’s. Let pg|α denotes the density of g | α, using the law of total expectation, we have, E [|det(M)| 1(M ⪰0)1(E1 ∩E2 ∩E′ 2) | g = 0] pg(0) = E E [|det(M)| 1(M ⪰0)1(E′ 2) | g = 0, α] 1(E1)1(E2)pg|α(0) . (3.6) Note that the inner expectation of RHS of (3.6) is with respect to the randomness of bi’s and the outer one is with respect to αi’s. For notional convenience we define h(·) : Rn →R as h(α) := Vol(Sd−1) E [det(M)1(M ⪰0)1(E′ 2) | g = 0, α] 1(E1)1(E2)pg|α(0) . Then, using the Kac-Rice formula (equation (2.3))5 and equation (3.5), we obtain the following explicit formula for the number of local maxima in L1 ∩L2. E [|Mf ∩L1 ∩L2|] = E [h(α)] . (3.7) We note that pg|α(0) has an explicit expression since g | α is Gaussian. For the ease of exposition, we separate out the hard-to-estimate part from h(α), which we call W(α): W(α) := E [det(M)1(M ⪰0)1(E′ 2) | g = 0, α] 1(E1)1(E2) . (3.8) 5In Section C of the supplementary material, we rigorously verify the regularity condition of Kac-Rice formula. Therefore by definition, we have that h(α) = Vol(Sd−1)W(α)pg|α(0). Now, since we have conditioned on α, the distributions of the Hessian, namely M | α, is a generalized Wishart matrix which is slightly easier than before. However there are still several challenges that we need to address in order to estimate W(α). How to control det(M)1(M ⪰0)? Recall that M = ∥α∥4 4 −3 P α2 i bib⊤ i , which is a generalized Wishart matrix whose eigenvalue distribution has no (known) analytical expression. The determinant itself by definition is a high-degree polynomial over the entries, and in our case, a complicated polynomial over the random variables αi’s and vectors bi’s. We also need to properly exploit the presence of the indicator function 1(M ⪰0), since otherwise, the desired statement will not be true – the function f has an exponential number of critical points. Fortunately, in most of the cases, we can use the following simple claim that bounds the determinant from above by the trace. The inequality is close to being tight when all the eigenvalues of M are similar to each other. More importantly, it uses naturally the indicator function 1(M ⪰0)! Later we will see how to strengthen it when it’s far from tight. Claim 3.4. We have that det(M)1(M ⪰0) ≤ |tr(M)| d −1 d−1 1(M ⪰0) The claim is a direct consequence of AM-GM inequality on the eigenvalue of M. (Note that M is of dimension (d −1) × (d −1). we give a formal proof in Section 3.1 of the supplementary material). It follows that W(α) ≤E |tr(M)|d−1 (d −1)d−1 | g = 0, α 1(E1) . (3.9) Here we dropped the indicators for events E2 and E′ 2 since they are not important for the discussion below. It turns out that |tr(M)| is a random variable that concentrates very well, and thus we have E |tr(M)|d−1 ≈| E [tr(M)] |d−1. It can be shown that (see Proposition 4.3 in the supplementary material for the detailed calculation), E [tr(M) | g = 0, α] = (d −1) ∥α∥4 4 −3∥α∥2 + 3∥α∥8 8/∥α∥6 6 . Therefore using equation (3.9) and equation above, we have that W(α) ≤ ∥α∥4 4 −3∥α∥2 + 3∥α∥8 8/∥α∥6 6 d−1 1(E0)1(E1) . Note that since g | α has Gaussian distribution, we have, pg|α(0) = (2π)−d/2(∥α∥6 6)−d/2 . Thus using two equations above, we can bound E [h(α)] by E [h(α)] ≤Vol(Sd−1) E h ∥α∥4 4 −3∥α∥2 + 3∥α∥8 8/∥α∥6 6 d−1 · (2π)−d/2(∥α∥6 6)−d/21(E0)1(E1) i . (3.10) Therefore, it suffices to control the RHS of (3.10), which is much easier than the original Kac-Rice formula. However, it turns out that RHS of (3.10) is roughly cd for some constant c > 1! Roughly speaking, this is because the high powers of a random variables is very sensitive to its tail. Two sub-cases according to max |αi|. We aim to find a tighter bond of E[h(α)] by re-using the idea in equation (3.10). Intuitively we can consider two separate situations events: the event F0 when all of the αi’s are close to constant and the complementary event F c 0. Formally, let τ = Kn/d where K is a universal constant that will be determined later. Let F0 be the event that .F0 = ∥α∥4 ∞≤τ . Then we control E [h(α)1(F0)] and E [h(α)1(F c 0)] separately. For the former, we basically need to reuse the equation (3.10) with an indicator function inserted inside the expectation. For the latter, we make use of the large coordinate, which contributes to the −3α2 i bib⊤ i term in M and makes the probability of 1(M ⪰0) extremely small. As a result det(M)1(M ⪰0) is almost always 0. We formalized the two cases as below: Proposition 3.5. Let K ≥2 · 103 be a universal constant. Let τ = Kn/d and let γ, β be sufficiently large constants (depending on K). Then for any n ≥βd log2 d, we have that E [h(α)1(F0)] ≤(0.3)d/2 . Proposition 3.6. In the setting of Proposition 3.5, we have E [h(α)1(F c 0)] ≤n · (0.3)d/2 . We see that Theorem 3.2 can be obtained as a direct consequence of Proposition 3.5, Proposition 3.6 and equation (3.7). Due to space limit, we refer the readers to the supplementary material for an extended version of proof overview and the full proofs. 4 Conclusion We analyze the optimization landscape of the random over-complete tensor decomposition problem using the Kac-Rice formula and random matrix theory. We show that in the superlevel set L that contains all the points with function values barely larger than the random guess, there are exactly 2n local maxima that correspond to the true components. This implies that with an initialization slight better than the random guess, local search algorithms converge to the desired solutions. We believe our techniques can be extended to 3rd order tensors, or other non-convex problems with structured randomness. The immediate open question is whether there is any other spurious local maximum outside this superlevel set. Answering it seems to involve solving difficult questions in random matrix theory. Another potential approach to unravel the mystery behind the success of the non-convex methods is to analyze the early stage of local search algorithms and show that they will enter the superlevel set L quickly from a good initialization. References [AA+13] Antonio Auffinger, Gerard Ben Arous, et al. Complexity of random smooth functions on the high-dimensional sphere. The Annals of Probability, 41(6):4214–4247, 2013. [AA ˇC13] Antonio Auffinger, Gérard Ben Arous, and Jiˇrí ˇCern`y. Random matrices and complexity of spin glasses. Communications on Pure and Applied Mathematics, 66(2):165–201, 2013. [AFH+12] Anima Anandkumar, Dean P. Foster, Daniel Hsu, Sham M. Kakade, and Yi-Kai Liu. A spectral algorithm for latent Dirichlet allocation. In Advances in Neural Information Processing Systems 25, 2012. [AGJ15] Animashree Anandkumar, Rong Ge, and Majid Janzamin. Learning overcomplete latent variable models through tensor methods. In Proceedings of the Conference on Learning Theory (COLT), Paris, France, 2015. [AGJ16] Anima Anandkumar, Rong Ge, and Majid Janzamin. Analyzing tensor power method dynamics in overcomplete regime. JMLR, 2016. [AGMM15] 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, 2015. [AHK12] Anima Anandkumar, Daniel Hsu, and Sham M. Kakade. A method of moments for mixture models and hidden Markov models. In COLT, 2012. [AMS07] P.A. Absil, R. Mahony, and R. Sepulchre. Optimization Algorithms on Matrix Manifolds. Princeton University Press, 2007. [ASS15] H. Abo, A. Seigal, and B. Sturmfels. Eigenconfigurations of Tensors. ArXiv e-prints, May 2015. [AT09] Robert J Adler and Jonathan E Taylor. Random fields and geometry. Springer Science & Business Media, 2009. [BAC16] N. Boumal, P.-A. Absil, and C. Cartis. Global rates of convergence for nonconvex optimization on manifolds. ArXiv e-prints, May 2016. [BBV16] Afonso S Bandeira, Nicolas Boumal, and Vladislav Voroninski. On the low-rank approach for semidefinite programs arising in synchronization and community detection. arXiv preprint arXiv:1602.04426, 2016. [BCMV14] Aditya Bhaskara, Moses Charikar, Ankur Moitra, and Aravindan Vijayaraghavan. Smoothed analysis of tensor decompositions. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 594–603. ACM, 2014. [BKS15] 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. [BNS16] Srinadh Bhojanapalli, Behnam Neyshabur, and Nathan Srebro. Global optimality of local search for low rank matrix recovery. arXiv preprint arXiv:1605.07221, 2016. [Cha96] Joseph T. Chang. Full reconstruction of Markov models on evolutionary trees: Identifiability and consistency. Mathematical Biosciences, 137:51–73, 1996. [CHM+15] Anna Choromanska, Mikael Henaff, Michael Mathieu, Gérard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015. [CLA09] P. Comon, X. Luciani, and A. De Almeida. Tensor decompositions, alternating least squares and other tales. Journal of Chemometrics, 23(7-8):393–405, 2009. [CS13] Dustin Cartwright and Bernd Sturmfels. The number of eigenvalues of a tensor. Linear algebra and its applications, 438(2):942–952, 2013. [CS16] Nadav Cohen and Amnon Shashua. Convolutional rectifier networks as generalized tensor decompositions. CoRR, abs/1603.00162, 2016. [DLCC07] L. De Lathauwer, J. Castaing, and J.-F. Cardoso. Fourth-order cumulant-based blind identification of underdetermined mixtures. Signal Processing, IEEE Transactions on, 55(6):2965–2973, 2007. [DPG+14] Yann N Dauphin, Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, Surya Ganguli, and Yoshua Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In Advances in neural information processing systems, pages 2933–2941, 2014. [GHJY15] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In Proceedings of The 28th Conference on Learning Theory, pages 797–842, 2015. [GLM16] Rong Ge, Jason D Lee, and Tengyu Ma. Matrix completion has no spurious local minimum. arXiv preprint arXiv:1605.07272, 2016. [GLM17] R. Ge, J. D. Lee, and T. Ma. Learning One-hidden-layer Neural Networks with Landscape Design. ArXiv e-prints, November 2017. [GM15] Rong Ge and Tengyu Ma. Decomposing overcomplete 3rd order tensors using sum-of-squares algorithms. arXiv preprint arXiv:1504.05287, 2015. [GVX13] N. Goyal, S. Vempala, and Y. Xiao. Fourier pca. arXiv preprint arXiv:1306.5825, 2013. [Hås90] Johan Håstad. Tensor rank is np-complete. Journal of Algorithms, 11(4):644–654, 1990. [HK13] Daniel Hsu and Sham M. Kakade. Learning mixtures of spherical Gaussians: moment methods and spectral decompositions. In Fourth Innovations in Theoretical Computer Science, 2013. [HKZ12] Daniel Hsu, Sham M. Kakade, and Tong Zhang. A spectral algorithm for learning hidden Markov models. Journal of Computer and System Sciences, 78(5):1460–1480, 2012. [HL13] Christopher J Hillar and Lek-Heng Lim. Most tensor problems are np-hard. Journal of the ACM (JACM), 60(6):45, 2013. [HM16] Moritz Hardt and Tengyu Ma. Identity matters in deep learning. CoRR, abs/1611.04231, 2016. [HMR16] Moritz Hardt, Tengyu Ma, and Benjamin Recht. Gradient descent learns linear dynamical systems. CoRR, abs/1609.05191, 2016. [HSSS16] Samuel B. Hopkins, Tselil Schramm, Jonathan Shi, and David Steurer. Fast spectral algorithms from sum-of-squares proofs: tensor decomposition and planted sparse vectors. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 178–191, 2016. [JSA15] M. Janzamin, H. Sedghi, and A. Anandkumar. Beating the Perils of Non-Convexity: Guaranteed Training of Neural Networks using Tensor Methods. ArXiv e-prints, June 2015. [Kaw16] K. Kawaguchi. Deep Learning without Poor Local Minima. ArXiv e-prints, May 2016. [KM11] Tamara G Kolda and Jackson R Mayo. Shifted power method for computing tensor eigenpairs. SIAM Journal on Matrix Analysis and Applications, 32(4):1095–1124, 2011. [LSJR16] Jason D. Lee, Max Simchowitz, Michael I. Jordan, and Benjamin Recht. Gradient descent only converges to minimizers. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 1246–1257, 2016. [MR06] Elchanan Mossel and Sébastian Roch. Learning nonsingular phylogenies and hidden Markov models. Annals of Applied Probability, 16(2):583–614, 2006. [MSS16] Tengyu Ma, Jonathan Shi, and David Steurer. Polynomial-time tensor decompositions with sum-of-squares. In FOCS 2016, to appear, 2016. [NP06] Yurii Nesterov and Boris T Polyak. Cubic regularization of newton method and its global performance. Mathematical Programming, 108(1):177–205, 2006. [NPOV15] A. Novikov, D. Podoprikhin, A. Osokin, and D. Vetrov. Tensorizing Neural Networks. ArXiv e-prints, September 2015. [SQW15] Ju Sun, Qing Qu, and John Wright. When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096, 2015. | 2017 | 429 |
6,929 | Continual Learning with Deep Generative Replay Hanul Shin Massachusetts Institute of Technology SK T-Brain skyshin@mit.edu Jung Kwon Lee∗, Jaehong Kim∗, Jiwon Kim SK T-Brain {jklee,xhark,jk}@sktbrain.com Abstract Attempts to train a comprehensive artificial intelligence capable of solving multiple tasks have been impeded by a chronic problem called catastrophic forgetting. Although simply replaying all previous data alleviates the problem, it requires large memory and even worse, often infeasible in real world applications where the access to past data is limited. Inspired by the generative nature of the hippocampus as a short-term memory system in primate brain, we propose the Deep Generative Replay, a novel framework with a cooperative dual model architecture consisting of a deep generative model (“generator”) and a task solving model (“solver”). With only these two models, training data for previous tasks can easily be sampled and interleaved with those for a new task. We test our methods in several sequential learning settings involving image classification tasks. 1 Introduction One distinctive ability of humans and large primates is to continually learn new skills and accumulate knowledge throughout the lifetime [6]. Even in small vertebrates such as rodents, established connections between neurons seem to last more than an year [13]. Besides, primates incorporate new information and expand their cognitive abilities without seriously perturbing past memories. This flexible memory system results from a good balance between synaptic plasticity and stability [1]. Continual learning in deep neural networks, however, suffers from a phenomenon called catastrophic forgetting [22], in which a model’s performance on previously learned tasks abruptly degrades when trained for a new task. In artificial neural networks, inputs coincide with the outputs by implicit parametric representation. Therefore training them towards a new objective can cause almost complete forgetting of former knowledge. Such problem has been a key obstacle to continual learning for deep neural network through sequential training on multiple tasks. Previous attempts to alleviate catastrophic forgetting often relied on episodic memory system that stores past data [31]. In particular, recorded examples are regularly replayed with real samples drawn from the new task, and the network parameters are jointly optimized. While a network trained in this manner performs as well as separate networks trained solely on each task [29], a major drawback of memory-based approach is that it requires large working memory to store and replay past inputs. Moreover, such data storage and replay may not be viable in some real-world situations. Notably, humans and large primates learn new knowledge even from limited experiences and still retain past memories. While several biological mechanisms contribute to this at multiple levels, the most apparent distinction between primate brains and artificial neural networks is the existence of separate, interacting memory systems [26]. The Complementary Learning Systems (CLS) theory illustrates the significance of dual memory systems involving the hippocampus and the neocortex. The hippocampal system rapidly encodes recent experiences, and the memory trace that lasts for ∗Equal Contribution 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. a short period is reactivated during sleep or conscious and unconscious recall [8]. The memory is consolidated in the neocortex through the activation synchronized with multiple replays of the encoded experience [27]–a mechanism which inspired the use of experience replay [23] in training reinforcement learning agents. Recent evidence suggests that the hippocampus is more than a simple experience replay buffer. Reactivation of the memory traces yields rather flexible outcomes. Altering the reactivation causes a defect in consolidated memory [35], while co-stimulating certain memory traces in the hippocampus creates a false memory that was never experienced [28]. These properties suggest that the hippocampus is better paralleled with a generative model than a replay buffer. Specifically, deep generative models such as deep Boltzmann machines [32] or a variational autoencoder [17] can generate high-dimensional samples that closely match observed inputs. We now propose an alternative approach to sequentially train deep neural networks without referring to past data. In our deep generative replay framework, the model retains previously acquired knowledge by the concurrent replay of generated pseudo-data. In particular, we train a deep generative model in the generative adversarial networks (GANs) framework [10] to mimic past data. Generated data are then paired with corresponding response from the past task solver to represent old tasks. Called the scholar model, the generator-solver pair can produce fake data and desired target pairs as much as needed, and when presented with a new task, these produced pairs are interleaved with new data to update the generator and solver networks. Thus, a scholar model can both learn the new task without forgetting its own knowledge and teach other models with generated input-target pairs, even when the network configuration is different. As deep generative replay supported by the scholar network retains the knowledge without revisiting actual past data, this framework can be employed to various practical situation involving privacy issues. Recent advances on training generative adversarial networks suggest that the trained models can reconstruct real data distribution in a wide range of domains. Although we tested our models on image classification tasks, our model can be applied to any task as long as the trained generator reliably reproduces the input space. 2 Related Works The term catastrophic forgetting or catastrophic interference was first introduced by McCloskey and Cohen in 1980’s [22]. They claimed that catastrophic interference is a fundamental limitation of neural networks and a downside of its high generalization ability. While the cause of catastrophic forgetting has not been studied analytically, it is known that the neural networks parameterize the internal features of inputs, and training the networks on new samples causes alteration in already established representations. Several works illustrate empirical consequences in sequential learning settings [7, 29], and provide a few primitive solutions [16, 30] such as replaying all previous data. 2.1 Comparable methods A branch of works assumes a particular situation where access to previous data is limited to the current task[12, 18, 20]. These works focus on optimizing network parameters while minimizing alterations to already consolidated weights. It is suggested that regularization methods such as dropout [33] and L2 regularization help reduce interference of new learning [12]. Furthermore, elastic weight consolidation (EWC) proposed in [18] demonstrates that protecting certain weights based on their importance to the previous tasks tempers the performance loss. Other attempts to sequentially train a deep neural network capable of solving multiple tasks reduce catastrophic interference by augmenting the networks with task-specific parameters. In general, layers close to inputs are shared to capture universal features, and independent output layers produce taskspecific outputs. Although separate output layers are free of interference, alteration on earlier layers still causes some performance loss on older tasks. Lowering learning rates on some parameters is also known to reduce forgetting [9]. A recently proposed method called Learning without Forgetting (LwF) [21] addresses the problem of sequential learning in image classification tasks while minimizing alteration on shared network parameters. In this framework, the network’s response to new task input prior to fine-tuning indirectly represents knowledge about old tasks and is maintained throughout the learning process. 2 2.2 Complementary Learning System(CLS) theory A handful of works are devoted to designing a complementary networks architecture to alleviate catastrophic forgetting. When the training data for previous tasks are not accessible, only pseudoinputs and pseudo-targets produced by a memory network can be fed into the task network. Called a pseudorehearsal technique, this method is claimed to maintain old input-output patterns without accessing real data [31]. When the tasks are as elementary as coupling two binary patterns, simply feeding random noises and corresponding responses suffices [2]. A more recent work proposes an architecture that resembles the structure of the hippocampus to facilitate continual learning for more complex data such as small binary pixel images [15]. However, none of them demonstrates scalability to high-dimensional inputs similar to those appear in real world due to the difficulty of generating meaningful high-dimensional pseudoinputs without further supervision. Our generative replay framework differs from aforementioned pseudorehearsal techniques in that the fake inputs are generated from learned past input distribution. Generative replay has several advantages over other approaches because the network is jointly optimized using an ensemble of generated past data and real current data. The performance is therefore equivalent to joint training on accumulated real data as long as the generator recovers the input distribution. The idea of generative replay also appears in Mocanu et al. [24], in which they trained Restricted Boltzmann Machine to recover past input distribution. 2.3 Deep Generative Models Generative model refers to any model that generates observable samples. Specifically, we consider deep generative models based on deep neural networks that maximize the likelihood of generated samples being in given real distribution [11]. Some deep generative models such as variational autoencoders [17] and the GANs [10] are able to mimic complex samples like images. The GANs framework defines a zero-sum game between a generator G and a discriminator D. While the discriminator learns to distinguish between the generated samples from real samples by comparing two data distributions, the generator learns to mimic the real distribution as closely as possible. The objective of two networks is thereby defined as: min G max D V (D, G) = Ex∼pdata(x)[log D(x)] + Ez∼pz(z)[log(1 −D(G(z)))] 3 Generative Replay We first define several terminologies. In our continual learning framework, we define the sequence of tasks to be solved as a task sequence T = (T1, T2, · · · , TN) of N tasks. Definition 1 A task Ti is to optimize a model towards an objective on data distribution Di, from which the training examples (xi, yi)’s are drawn. Next, we call our model a scholar, as it is capable of learning a new task and teaching its knowledge to other networks. Note that the term scholar differs from standard notion of teacher-student framework of ensemble models [5], in which the networks either teach or learn only. Definition 2 A scholar H is a tuple ⟨G, S⟩, where a generator G is a generative model that produces real-like samples and a solver S is a task solving model parameterized by θ. The solver has to perform all tasks in the task sequence T. The full objective is thereby given as to minimize the unbiased sum of losses among all tasks in the task sequence E(x,y)∼D[L(S(x; θ), y)], where D is the entire data distribution and L is a loss function. While being trained for task Ti, the model is fed with samples drawn from Di. 3.1 Proposed Method We consider sequential training on our scholar model. However, training a single scholar model while referring to the recent copy of the network is equivalent to training a sequence of scholar models (Hi)N i=1 where the n-th scholar Hn (n > 1) learns the current task Tn and the knowledge of previous scholar Hn−1. Therefore, we describe our full training procedure as in Figure 1(a). 3 Training the scholar model from another scholar involves two independent procedures of training the generator and the solver. First, the new generator receives current task input x and replayed inputs x′ from previous tasks. Real and replayed samples are mixed at a ratio that depends on the desired importance of a new task compared to the older tasks. The generator learns to reconstruct cumulative input space, and the new solver is trained to couple the inputs and targets drawn from the same mix of real and replayed data. Here, the replayed target is past solver’s response to replayed input. Formally, the loss function of the i-th solver is given as Ltrain(θi) = rE(x,y)∼Di[L(S(x; θi), y)] + (1 −r) Ex′∼Gi−1[L(S(x′; θi), S(x′; θi−1))] (1) where θi are network parameters of the i-th scholar and r is a ratio of mixing real data. As we aim to evaluate the model on original tasks, test loss differs from the training loss: Ltest(θi) = rE(x,y)∼Di[L(S(x; θi), y)] + (1 −r) E(x,y)∼Dpast[L(S(x; θi), y)] (2) where Dpast is a cumulative distribution of past data. Second loss term is ignored in both functions when i = 1 because there is no replayed data to refer to for the first solver. We build our scholar model with a solver that has suitable architecture for solving a task sequence and a generator trained in the generative adversarial networks framework. However, our framework can employ any deep generative model as a generator. (b) Training Generator (c) Training Solver 𝒙′ 𝑮𝒆𝒏𝒆𝒓𝒂𝒕𝒐𝒓 𝑆𝑜𝑙𝑣𝑒𝑟 𝒙 𝑰𝒏𝒑𝒖𝒕 𝑇𝑎𝑟𝑔𝑒𝑡 𝑮𝒆𝒏𝒆𝒓𝒂𝒕𝒐𝒓 𝑆𝑜𝑙𝑣𝑒𝑟 𝑁𝑒𝑤 𝑆𝑐ℎ𝑜𝑙𝑎𝑟 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑇𝑎𝑠𝑘 𝑂𝑙𝑑 𝑆𝑐ℎ𝑜𝑙𝑎𝑟 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑅𝑒𝑝𝑙𝑎𝑦 𝒙′ 𝒚′ 𝑮𝒆𝒏𝒆𝒓𝒂𝒕𝒐𝒓 𝑺𝒐𝒍𝒗𝒆𝒓 𝒙 𝒚 𝑰𝒏𝒑𝒖𝒕 𝑻𝒂𝒓𝒈𝒆𝒕 𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑜𝑟 𝑺𝒐𝒍𝒗𝒆𝒓 𝑁𝑒𝑤 𝑆𝑐ℎ𝑜𝑙𝑎𝑟 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑇𝑎𝑠𝑘 𝑂𝑙𝑑 𝑆𝑐ℎ𝑜𝑙𝑎𝑟 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑅𝑒𝑝𝑙𝑎𝑦 (a) Sequential Training 𝑇𝑎𝑠𝑘1 𝑆𝑐ℎ𝑜𝑙𝑎𝑟1 𝑇𝑎𝑠𝑘2 𝑆𝑐ℎ𝑜𝑙𝑎𝑟2 𝑇𝑎𝑠𝑘3 𝑆𝑐ℎ𝑜𝑙𝑎𝑟3 𝑇𝑎𝑠𝑘𝑁 𝑆𝑐ℎ𝑜𝑙𝑎𝑟𝑁 Figure 1: Sequential training of scholar models. (a) Training a sequence of scholar models is equivalent to continuous training of a single scholar while referring to its most recent copy. (b) A new generator is trained to mimic a mixed data distribution of real samples x and replayed inputs x′ from previous generator. (c) A new solver learns from real input-target pairs (x, y) and replayed input-target pairs (x′, y′), where replayed response y′ is obtained by feeding generated inputs into previous solver. 3.2 Preliminary Experiment Prior to our main experiments, we show that the trained scholar model alone suffices to train an empty network. We tested our model on classifying MNIST handwritten digit database [19]. Sequence of scholar models were trained from scratch through generative replay from previous scholar. The accuracy on classifying full test data is shown in Table 1. We observed that the scholar model transfers knowledge without losing information. Table 1: Test accuracy of sequentially learned solver measured on full test data from MNIST database. The first solver learned from real data, and subsequent solvers learned from previous scholar networks. Solver1 → Solver2 → Solver3 → Solver4 → Solver5 Accuracy(%) 98.81% 98.64% 98.58% 98.53% 98.56% 4 Experiments In this section, we show the applicability of generative replay framework on various sequential learning settings. Generative replay based on a trained scholar network is superior to other continual learning approaches in that the quality of the generative model is the only constraint of the task performance. In other words, training the networks with generative replay is equivalent to joint training on entire data when the generative model is optimal. To draw the best possible result, we used WGAN-GP [14] technique in training the generator. 4 As a base experiment, we test if generative replay enables sequential learning while compromising performance on neither the old tasks nor a new task. In section 4.1, we sequentially train the networks on independent tasks to examine the extent of forgetting. In section 4.2, we train the networks on two different yet related domains. We demonstrate that generative replay not only enables continual learning on our design of the scholar network but also compatible with other known structures. In section 4.3, we show that our scholar network can gather knowledge from different tasks to perform a meta-task, by training the network on disjoint subsets of training data. We compare the performance of the solver trained with variants of replay methods. Our model with generative replay is denoted in the figure as GR. We specify the upper bound by assuming a situation when the generator is perfect. Therefore, we replayed actual past data paired with the predicted targets from the old solver network. We denote this case as ER for exact replay. We also consider the opposite case when the generated samples do not resemble the real distribution at all. Such case is denoted as Noise. A baseline of naively trained solver network is denoted as None. We use the same notation throughout this section. 4.1 Learning independent tasks The most common experimental formulation used in continual learning literature [34, 18] is a simple image classification problem where the inputs are images from MNIST handwritten digit database [19], but pixel values of inputs are shuffled by a random permutation sequence unique to each task. The solver has to classify permuted inputs into the original classes. Since the most, if not all pixels are switched between the tasks, the tasks are technically independent from each other, being a good measure of memory retention strength of a network. (a) (b) Figure 2: Results on MNIST pixel permutation tasks. (a) Test performances on each task during sequential training. Performances for previous tasks dropped without replaying real or meaningful fake data. (b) Average test accuracy on learnt tasks. Higher accuracy is achieved when the replayed inputs better resembled real data. We observed that generative replay maintains past knowledge by recalling former task data. In Figure 2(a), the solver with generative replay (orange) maintained the former task performances throughout sequential training on multiple tasks, in contrast to the naively trained solver (violet). An average accuracy measured on cumulative tasks is illustrated in Figure 2(b). While the solver with generative replay achieved almost full performance on trained tasks, sequential training on a solver alone incurred catastrophic forgetting (violet). Replaying random gaussian noises paired with recorded responses did not help tempering performance loss (pink). 4.2 Learning new domains Training independent tasks on the same network is inefficient because no information is to be shared. We thus demonstrate the merit of our model in more reasonable settings where the model benefits from solving multiple tasks. A model operating in multiple domains has several advantages over a model that only works in a single domain. First, the knowledge of one domain can help better and faster understanding of other domains if the domains are not completely independent. Second, generalization over multiple domains may result in more universal knowledge that is applicable to unseen domains. Such phenomenon is 5 also observed in infants learning to categorize objects [3, 4]. Encountering similar but diverse objects, young children can infer the properties shared within the category, and can make a guess of which category that the new object may belong to. We tested if the model can incorporate the knowledge of a new domain with generative replay. In particular, we sequentially trained our model on classifying MNIST and Street View House Number (SVHN) dataset [25], and vice versa. Experimental details are provided in supplementary materials. (a) MNIST to SVHN (b) SVHN to MNIST Figure 3: Accuracy on classifying samples from two different domains. (a) The models are trained on MNIST then on SVHN dataset or (b) vice versa. When the previous data are recalled by generative replay (orange), knowledge of the first domain is retained as if the real inputs with predicted responses are replayed (green). Sequential training on the solver alone incurs forgetting on the former domain, thereby resulting in low average performance (violet). 1000 iterations 2000 iterations 5000 iterations 10000 iterations 20000 iterations Figure 4: Samples from trained generator in MNIST to SVHN experiment after training on SVHN dataset for 1000, 2000, 5000, 10000, and 20000 iterations. The samples are diverted into ones that mimic either SVHN or MNIST input images. Figure 3 illustrates the performance on the original task (thick curves) and the new task (dim curves). A solver trained alone lost its performance on the old task when no data are replayed (purple). Since MNIST and SVHN input data share similar spatial structure, the performance on the former task did not drop to zero, yet the decline was critical. In contrast, the solver with generative replay (orange) maintained its performance on the first task while accomplishing the second one. The results were no worse than replaying past real inputs paired with predicted responses from the old solver (green). In both cases, the model trained without any replay data achieved slightly better performance on new task, as the network was solely optimized to solve the second task. Generative replay is compatible with other continual learning models as well. For instance, Learning without Forgetting (LwF), which replays current task inputs to revoke past knowledge, can be augmented with generative models that produce samples similar to former task inputs. Because LwF requires the context information of which task is being performed to use task-specific output layers, we tested the performance separately on each task. Note that our scholar model with generative replay does not need the task context. In Figure 5, we compare the performance of LwF algorithm with a variant LwF-GR, where the task-specific generated inputs are fed to maintain older network responses. We used the same training regime as proposed in the original literature, namely warming up the new network head for some amount of the time and then fine tuning the whole network. The solver trained with original LwF algorithm loses performance on the first task when fine-tuning begins, due to alteration to shared 6 Figure 5: Performance of LwF and LwF augmented with generative replay (LwF-GR) on classifying samples from each domain. The networks were trained on SVHN then on MNIST database. Test accuracy on SVHN classification task (thick curves) dropped when the shared parameters were fine-tuned, but generative replay greatly tempered the loss (orange). Both networks achieved high accuracy on MNIST classification (dim curves). network (green). However, with generative replay, the network maintains most of the past knowledge (orange). 4.3 Learning new classes To illustrate that generative replay can recollect the past knowledge even when the inputs and targets are highly biased between the tasks, we propose a new experiment in which the network is sequentially trained on disjoint data. In particular, we assume a situation where the agent can access examples of only a few classes at a time. The agent eventually has to correctly classify examples from all classes after being sequentially trained on mutually exclusive subsets of classes. We tested the networks on MNIST handwritten digit database. Note that training the artificial neural networks independently on classes is difficult in standard settings, as the network responses may change to match the new target distribution. Hence replaying inputs and outputs that represent former input and target distributions is necessary to train a balanced network. We thus compare the variants described earlier in this section from the perspective of whether the input and target distributions of cumulative real data is recovered. For ER and GR models, both the input and target distributions represent cumulative distribution. Noise model maintains cumulative target distributions, but the input distribution only mirrors current distribution. None model has current distribution for both. Figure 6: The models were sequentially trained on 5 tasks where each task is defined to classify MNIST images belong to 2 out of 10 labels. In this case, the networks are given with examples of 0 and 1 during the first task, 2 and 3 for the second, and in the same manner. Only our networks achieved test performance close to the upper bound. In Figure 6, we divided MNIST dataset into 5 disjoint subsets, each of which contains samples from only 2 classes. When the networks are sequentially trained on the subsets, we observed that a naively trained classifier completely forgot previous classes and only learned the new subset of data (purple). Recovering only the past output distribution without a meaningful input distribution did not help retaining knowledge, as evidenced by the model with a noise generator (pink). When both the input 7 and output distributions are reconstructed, generative replay evoked previously learnt classes, and the model was able to discriminate all encountered classes (orange). Figure 7: Generated samples from trained generator after the task 1, 2, 3, 4, and 5. The generator is trained to reproduce cumulative data distribution. Because we assume that the past data are completely discarded, we trained the generator to mimic both current inputs and the generated samples from the previous generator. The generator thus reproduces cumulative input distribution of all encountered examples so far. As shown in Figure 7, generated samples from trained generator include examples equally from encountered classes. 5 Discussion We introduce deep generative replay framework, which allows sequential learning on multiple tasks by generating and rehearsing fake data that mimics former training examples. The trained scholar model comprising a generator and a solver serves as a knowledge base of a task. Although we described a cascade of knowledge transfer between a sequence of scholar models, a little change in formulation proposes a solution to other topically relevant problems. For instance, if the previous scholar model is just a past copy of the same network, it can learn multiple tasks without explicitly partitioning the training procedure. As comparable approaches, regularization methods such as EWC and careful training the shared parameters as in LwF have shown that catastrophic forgetting could be alleviated by protecting former knowledge of the network. However, regularization approaches constrain the network with additional loss terms for protecting weights, so they potentially suffer from the tradeoff between the performances on new and old tasks. To guarantee good performances on both tasks, one should train on a huge network that is much larger than normally needed. Also, the network has to maintain the same structure throughout all tasks when the constraint is given specific to each parameter as in EWC. Drawbacks of LwF framework are also twofold: the performance highly depends on the relevance of the tasks, and the training time for one task linearly increases with the number of former tasks. The deep generative replay mechanism benefits from the fact that it maintains the former knowledge solely with input-target pairs produced from the saved networks, so it allows ease of balancing the former and new task performances and flexible knowledge transfer. Most importantly, the network is jointly optimized towards task objectives, hence guaranteed to achieve the full performance when the former input spaces are recovered by the generator. One defect of the generative replay framework is that the efficacy of the algorithm heavily depends on the quality of the generator. Indeed, we observed some performance loss while training the model on SVHN dataset within same setting employed in section 4.3. Detailed analysis is provided in supplementary materials. We acknowledge that EWC, LwF, and ours are not completely exclusive, as they contribute to memory retention at different levels. Nevertheless, each method poses some constraints on training procedure or network configurations, and there is no straightforward mixture of any two frameworks. We believe a good mix of the three frameworks would give a better solution to the chronic problem in continual learning. Future works of generative replay may extend to reinforcement learning domain or the form of continuously evolving network that maintains knowledge from past copy of the self. Also, we expect the improvements in training deep generative models would directly aid the performance of generative replay framework on more complex domains. 8 Acknowledgement We would like to thank Hyunsoo Kim, Risto Vuorio, Joon Hyuk Yang, Junsik Kim and our reviewers for their valuable feedback and discussion that greatly assisted this research. References [1] W. C. Abraham and A. Robins. Memory retention–the synaptic stability versus plasticity dilemma. Trends in neurosciences, 28(2):73–78, 2005. [2] B. Ans and S. Rousset. Avoiding catastrophic forgetting by coupling two reverberating neural networks. Comptes Rendus de l’Académie des Sciences-Series III-Sciences de la Vie, 320(12):989–997, 1997. [3] D. A. Baldwin, E. M. Markman, and R. L. Melartin. Infants’ ability to draw inferences about nonobvious object properties: Evidence from exploratory play. Child development, 64(3):711– 728, 1993. [4] M. H. Bornstein and M. E. Arterberry. The development of object categorization in young children: Hierarchical inclusiveness, age, perceptual attribute, and group versus individual analyses. Developmental psychology, 46(2):350, 2010. [5] T. G. Dietterich. Ensemble methods in machine learning. In International workshop on multiple classifier systems, pages 1–15. Springer, 2000. [6] J. Fagot and R. G. Cook. Evidence for large long-term memory capacities in baboons and pigeons and its implications for learning and the evolution of cognition. Proceedings of the National Academy of Sciences, 103(46):17564–17567, 2006. [7] R. M. French. Catastrophic forgetting in connectionist networks. Trends in cognitive sciences, 3(4):128–135, 1999. [8] H. Gelbard-Sagiv, R. Mukamel, M. Harel, R. Malach, and I. Fried. Internally generated reactivation of single neurons in human hippocampus during free recall. Science, 322(5898):96– 101, 2008. [9] R. Girshick, J. Donahue, T. Darrell, and J. 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. [10] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems (NIPS), 2014. [11] I. J. Goodfellow. NIPS 2016 tutorial: Generative adversarial networks. CoRR, abs/1701.00160, 2017. [12] I. J. Goodfellow, M. Mirza, D. Xiao, A. Courville, and Y. Bengio. An empirical investigation of catastrophic forgetting in gradient-based neural networks. arXiv preprint arXiv:1312.6211, 2013. [13] J. Grutzendler, N. Kasthuri, and W.-B. Gan. Long-term dendritic spine stability in the adult cortex. Nature, 420(6917):812–816, 2002. [14] I. Gulrajani, F. Ahmed, M. Arjovsky, V. Dumoulin, and A. Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. [15] M. Hattori. A biologically inspired dual-network memory model for reduction of catastrophic forgetting. Neurocomputing, 134:262–268, 2014. [16] G. E. Hinton and D. C. Plaut. Using fast weights to deblur old memories. In Proceedings of the ninth annual conference of the Cognitive Science Society, pages 177–186, 1987. 9 [17] D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [18] J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins, A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526, 2017. [19] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [20] S.-W. Lee, J.-H. Kim, J.-W. Ha, and B.-T. Zhang. Overcoming catastrophic forgetting by incremental moment matching. arXiv preprint arXiv:1703.08475, 2017. [21] Z. Li and D. Hoiem. Learning without forgetting. In European Conference on Computer Vision, pages 614–629. Springer, 2016. [22] M. McCloskey and N. J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. Psychology of learning and motivation, 24:109–165, 1989. [23] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [24] D. C. Mocanu, M. T. Vega, E. Eaton, P. Stone, and A. Liotta. Online contrastive divergence with generative replay: Experience replay without storing data. CoRR, abs/1610.05555, 2016. [25] 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 workshop on deep learning and unsupervised feature learning, volume 2011, page 5, 2011. [26] R. C. O’Reilly and K. A. Norman. Hippocampal and neocortical contributions to memory: Advances in the complementary learning systems framework. Trends in cognitive sciences, 6(12):505–510, 2002. [27] J. O’Neill, B. Pleydell-Bouverie, D. Dupret, and J. Csicsvari. Play it again: reactivation of waking experience and memory. Trends in neurosciences, 33(5):220–229, 2010. [28] S. Ramirez, X. Liu, P.-A. Lin, J. Suh, M. Pignatelli, R. L. Redondo, T. J. Ryan, and S. Tonegawa. Creating a false memory in the hippocampus. Science, 341(6144):387–391, 2013. [29] R. Ratcliff. Connectionist models of recognition memory: Constraints imposed by learning and forgetting functions. Psychological review, 97(2):285–308, 1990. [30] A. Robins. Catastrophic forgetting in neural networks: the role of rehearsal mechanisms. In Artificial Neural Networks and Expert Systems, 1993. Proceedings., First New Zealand International Two-Stream Conference on, pages 65–68. IEEE, 1993. [31] A. Robins. Catastrophic forgetting, rehearsal and pseudorehearsal. Connection Science, 7(2):123–146, 1995. [32] R. Salakhutdinov and G. Hinton. Deep boltzmann machines. In Artificial Intelligence and Statistics, pages 448–455, 2009. [33] N. Srivastava, G. E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. [34] R. K. Srivastava, J. Masci, S. Kazerounian, F. Gomez, and J. Schmidhuber. Compete to compute. In Advances in neural information processing systems, pages 2310–2318, 2013. [35] R. Stickgold and M. P. Walker. Sleep-dependent memory consolidation and reconsolidation. Sleep medicine, 8(4):331–343, 2007. 10 | 2017 | 43 |
6,930 | Counterfactual Fairness Matt Kusner ∗ The Alan Turing Institute and University of Warwick mkusner@turing.ac.uk Joshua Loftus ∗ New York University loftus@nyu.edu Chris Russell ∗ The Alan Turing Institute and University of Surrey crussell@turing.ac.uk Ricardo Silva The Alan Turing Institute and University College London ricardo@stats.ucl.ac.uk Abstract Machine learning can impact people with legal or ethical consequences when it is used to automate decisions in areas such as insurance, lending, hiring, and predictive policing. In many of these scenarios, previous decisions have been made that are unfairly biased against certain subpopulations, for example those of a particular race, gender, or sexual orientation. Since this past data may be biased, machine learning predictors must account for this to avoid perpetuating or creating discriminatory practices. In this paper, we develop a framework for modeling fairness using tools from causal inference. Our definition of counterfactual fairness captures the intuition that a decision is fair towards an individual if it the same in (a) the actual world and (b) a counterfactual world where the individual belonged to a different demographic group. We demonstrate our framework on a real-world problem of fair prediction of success in law school. 1 Contribution Machine learning has spread to fields as diverse as credit scoring [20], crime prediction [5], and loan assessment [25]. Decisions in these areas may have ethical or legal implications, so it is necessary for the modeler to think beyond the objective of maximizing prediction accuracy and consider the societal impact of their work. For many of these applications, it is crucial to ask if the predictions of a model are fair. Training data can contain unfairness for reasons having to do with historical prejudices or other factors outside an individual’s control. In 2016, the Obama administration released a report2 which urged data scientists to analyze “how technologies can deliberately or inadvertently perpetuate, exacerbate, or mask discrimination." There has been much recent interest in designing algorithms that make fair predictions [4, 6, 10, 12, 14, 16–19, 22, 24, 36–39]. In large part, the literature has focused on formalizing fairness into quantitative definitions and using them to solve a discrimination problem in a certain dataset. Unfortunately, for a practitioner, law-maker, judge, or anyone else who is interested in implementing algorithms that control for discrimination, it can be difficult to decide which definition of fairness to choose for the task at hand. Indeed, we demonstrate that depending on the relationship between a protected attribute and the data, certain definitions of fairness can actually increase discrimination. ∗Equal contribution. This work was done while JL was a Research Fellow at the Alan Turing Institute. 2https://obamawhitehouse.archives.gov/blog/2016/05/04/big-risks-big-opportunities-intersection-big-dataand-civil-rights 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we introduce the first explicitly causal approach to address fairness. Specifically, we leverage the causal framework of Pearl [30] to model the relationship between protected attributes and data. We describe how techniques from causal inference can be effective tools for designing fair algorithms and argue, as in DeDeo [9], that it is essential to properly address causality in fairness. In perhaps the most closely related prior work, Johnson et al. [15] make similar arguments but from a non-causal perspective. An alternative use of causal modeling in the context of fairness is introduced independently by [21]. In Section 2, we provide a summary of basic concepts in fairness and causal modeling. In Section 3, we provide the formal definition of counterfactual fairness, which enforces that a distribution over possible predictions for an individual should remain unchanged in a world where an individual’s protected attributes had been different in a causal sense. In Section 4, we describe an algorithm to implement this definition, while distinguishing it from existing approaches. In Section 5, we illustrate the algorithm with a case of fair assessment of law school success. 2 Background This section provides a basic account of two separate areas of research in machine learning, which are formally unified in this paper. We suggest Berk et al. [1] and Pearl et al. [29] as references. Throughout this paper, we will use the following notation. Let A denote the set of protected attributes of an individual, variables that must not be discriminated against in a formal sense defined differently by each notion of fairness discussed. The decision of whether an attribute is protected or not is taken as a primitive in any given problem, regardless of the definition of fairness adopted. Moreover, let X denote the other observable attributes of any particular individual, U the set of relevant latent attributes which are not observed, and let Y denote the outcome to be predicted, which itself might be contaminated with historical biases. Finally, ˆY is the predictor, a random variable that depends on A, X and U, and which is produced by a machine learning algorithm as a prediction of Y . 2.1 Fairness There has been much recent work on fair algorithms. These include fairness through unawareness [12], individual fairness [10, 16, 24, 38], demographic parity/disparate impact [36], and equality of opportunity [14, 37]. For simplicity we often assume A is encoded as a binary attribute, but this can be generalized. Definition 1 (Fairness Through Unawareness (FTU)). An algorithm is fair so long as any protected attributes A are not explicitly used in the decision-making process. Any mapping ˆY : X →Y that excludes A satisfies this. Initially proposed as a baseline, the approach has found favor recently with more general approaches such as Grgic-Hlaca et al. [12]. Despite its compelling simplicity, FTU has a clear shortcoming as elements of X can contain discriminatory information analogous to A that may not be obvious at first. The need for expert knowledge in assessing the relationship between A and X was highlighted in the work on individual fairness: Definition 2 (Individual Fairness (IF)). An algorithm is fair if it gives similar predictions to similar individuals. Formally, given a metric d(·, ·), if individuals i and j are similar under this metric (i.e., d(i, j) is small) then their predictions should be similar: ˆY (X(i), A(i)) ≈ˆY (X(j), A(j)). As described in [10], the metric d(·, ·) must be carefully chosen, requiring an understanding of the domain at hand beyond black-box statistical modeling. This can also be contrasted against population level criteria such as Definition 3 (Demographic Parity (DP)). A predictor ˆY satisfies demographic parity if P( ˆY |A = 0) = P( ˆY |A = 1). Definition 4 (Equality of Opportunity (EO)). A predictor ˆY satisfies equality of opportunity if P( ˆY = 1|A = 0, Y = 1) = P( ˆY = 1|A = 1, Y = 1). These criteria can be incompatible in general, as discussed in [1, 7, 22]. Following the motivation of IF and [15], we propose that knowledge about relationships between all attributes should be taken into consideration, even if strong assumptions are necessary. Moreover, it is not immediately clear 2 for any of these approaches in which ways historical biases can be tackled. We approach such issues from an explicit causal modeling perspective. 2.2 Causal Models and Counterfactuals We follow Pearl [28], and define a causal model as a triple (U, V, F) of sets such that • U is a set of latent background variables,which are factors not caused by any variable in the set V of observable variables; • F is a set of functions {f1, . . . , fn}, one for each Vi ∈V , such that Vi = fi(pai, Upai), pai ⊆V \{Vi} and Upai ⊆U. Such equations are also known as structural equations [2]. The notation “pai” refers to the “parents” of Vi and is motivated by the assumption that the model factorizes as a directed graph, here assumed to be a directed acyclic graph (DAG). The model is causal in that, given a distribution P(U) over the background variables U, we can derive the distribution of a subset Z ⊆V following an intervention on V \ Z. An intervention on variable Vi is the substitution of equation Vi = fi(pai, Upai) with the equation Vi = v for some v. This captures the idea of an agent, external to the system, modifying it by forcefully assigning value v to Vi, for example as in a randomized experiment. The specification of F is a strong assumption but allows for the calculation of counterfactual quantities. In brief, consider the following counterfactual statement, “the value of Y if Z had taken value z”, for two observable variables Z and Y . By assumption, the state of any observable variable is fully determined by the background variables and structural equations. The counterfactual is modeled as the solution for Y for a given U = u where the equations for Z are replaced with Z = z. We denote it by YZ←z(u) [28], and sometimes as Yz if the context of the notation is clear. Counterfactual inference, as specified by a causal model (U, V, F) given evidence W, is the computation of probabilities P(YZ←z(U) | W =w), where W, Z and Y are subsets of V . Inference proceeds in three steps, as explained in more detail in Chapter 4 of Pearl et al. [29]: 1. Abduction: for a given prior on U, compute the posterior distribution of U given the evidence W = w; 2. Action: substitute the equations for Z with the interventional values z, resulting in the modified set of equations Fz; 3. Prediction: compute the implied distribution on the remaining elements of V using Fz and the posterior P(U |W = w). 3 Counterfactual Fairness Given a predictive problem with fairness considerations, where A, X and Y represent the protected attributes, remaining attributes, and output of interest respectively, let us assume that we are given a causal model (U, V, F), where V ≡A ∪X. We postulate the following criterion for predictors of Y . Definition 5 (Counterfactual fairness). Predictor ˆY is counterfactually fair if under any context X = x and A = a, P( ˆYA←a (U) = y | X = x, A = a) = P( ˆYA←a′(U) = y | X = x, A = a), (1) for all y and for any value a′ attainable by A. This notion is closely related to actual causes [13], or token causality in the sense that, to be fair, A should not be a cause of ˆY in any individual instance. In other words, changing A while holding things which are not causally dependent on A constant will not change the distribution of ˆY . We also emphasize that counterfactual fairness is an individual-level definition. This is substantially different from comparing different individuals that happen to share the same “treatment” A = a and coincide on the values of X, as discussed in Section 4.3.1 of [29] and the Supplementary Material. Differences between Xa and Xa′ must be caused by variations on A only. Notice also that this definition is agnostic with respect to how good a predictor ˆY is, which we discuss in Section 4. Relation to individual fairness. IF is agnostic with respect to its notion of similarity metric, which is both a strength (generality) and a weakness (no unified way of defining similarity). Counterfactuals and similarities are related, as in the classical notion of distances between “worlds” corresponding to different counterfactuals [23]. If ˆY is a deterministic function of W ⊂A ∪X ∪U, as in several of 3 A X Y U A X Y U (a) (b) A Y UY UA Employed A Y UY UA Prejudiced Qualifications a Employeda Ya Employed Y a0 a0 a0 Employed A Y UY UA Prejudiced Qualifications (c) (d) (e) Figure 1: (a), (b) Two causal models for different real-world fair prediction scenarios. See Section 3.1 for discussion. (c) The graph corresponding to a causal model with A being the protected attribute and Y some outcome of interest, with background variables assumed to be independent. (d) Expanding the model to include an intermediate variable indicating whether the individual is employed with two (latent) background variables Prejudiced (if the person offering the job is prejudiced) and Qualifications (a measure of the individual’s qualifications). (e) A twin network representation of this system [28] under two different counterfactual levels for A. This is created by copying nodes descending from A, which inherit unaffected parents from the factual world. our examples to follow, then IF can be defined by treating equally two individuals with the same W in a way that is also counterfactually fair. Relation to Pearl et al. [29]. In Example 4.4.4 of [29], the authors condition instead on X, A, and the observed realization of ˆY , and calculate the probability of the counterfactual realization ˆYA←a′ differing from the factual. This example conflates the predictor ˆY with the outcome Y , of which we remain agnostic in our definition but which is used in the construction of ˆY as in Section 4. Our framing makes the connection to machine learning more explicit. 3.1 Examples To provide an intuition for counterfactual fairness, we will consider two real-world fair prediction scenarios: insurance pricing and crime prediction. Each of these correspond to one of the two causal graphs in Figure 1(a),(b). The Supplementary Material provides a more mathematical discussion of these examples with more detailed insights. Scenario 1: The Red Car. A car insurance company wishes to price insurance for car owners by predicting their accident rate Y . They assume there is an unobserved factor corresponding to aggressive driving U, that (a) causes drivers to be more likely have an accident, and (b) causes individuals to prefer red cars (the observed variable X). Moreover, individuals belonging to a certain race A are more likely to drive red cars. However, these individuals are no more likely to be aggressive or to get in accidents than any one else. We show this in Figure 1(a). Thus, using the red car feature X to predict accident rate Y would seem to be an unfair prediction because it may charge individuals of a certain race more than others, even though no race is more likely to have an accident. Counterfactual fairness agrees with this notion: changing A while holding U fixed will also change X and, consequently, ˆY . Interestingly, we can show (Supplementary Material) that in a linear model, regressing Y on A and X is equivalent to regressing on U, so off-the-shelf regression here is counterfactually fair. Regressing Y on X alone obeys the FTU criterion but is not counterfactually fair, so omitting A (FTU) may introduce unfairness into an otherwise fair world. Scenario 2: High Crime Regions. A city government wants to estimate crime rates by neighborhood to allocate policing resources. Its analyst constructed training data by merging (1) a registry of residents containing their neighborhood X and race A, with (2) police records of arrests, giving each resident a binary label with Y = 1 indicating a criminal arrest record. Due to historically segregated housing, the location X depends on A. Locations X with more police resources have larger numbers of arrests Y . And finally, U represents the totality of socioeconomic factors and policing practices that both influence where an individual may live and how likely they are to be arrested and charged. This can all be seen in Figure 1(b). In this example, higher observed arrest rates in some neighborhoods are due to greater policing there, not because people of different races are any more or less likely to break the law. The label Y = 0 4 does not mean someone has never committed a crime, but rather that they have not been caught. If individuals in the training data have not already had equal opportunity, algorithms enforcing EO will not remedy such unfairness. In contrast, a counterfactually fair approach would model differential enforcement rates using U and base predictions on this information rather than on X directly. In general, we need a multistage procedure in which we first derive latent variables U, and then based on them we minimize some loss with respect to Y . This is the core of the algorithm discussed next. 3.2 Implications One simple but important implication of the definition of counterfactual fairness is the following: Lemma 1. Let G be the causal graph of the given model (U, V, F). Then ˆY will be counterfactually fair if it is a function of the non-descendants of A. Proof. Let W be any non-descendant of A in G. Then WA←a(U) and WA←a′(U) have the same distribution by the three inferential steps in Section 2.2. Hence, the distribution of any function ˆY of the non-descendants of A is invariant with respect to the counterfactual values of A. This does not exclude using a descendant W of A as a possible input to ˆY . However, this will only be possible in the case where the overall dependence of ˆY on A disappears, which will not happen in general. Hence, Lemma 1 provides the most straightforward way to achieve counterfactual fairness. In some scenarios, it is desirable to define path-specific variations of counterfactual fairness that allow for the inclusion of some descendants of A, as discussed by [21, 27] and the Supplementary Material. Ancestral closure of protected attributes. Suppose that a parent of a member of A is not in A. Counterfactual fairness allows for the use of it in the definition of ˆY . If this seems counterintuitive, then we argue that the fault should be at the postulated set of protected attributes rather than with the definition of counterfactual fairness, and that typically we should expect set A to be closed under ancestral relationships given by the causal graph. For instance, if Race is a protected attribute, and Mother’s race is a parent of Race, then it should also be in A. Dealing with historical biases and an existing fairness paradox. The explicit difference between ˆY and Y allows us to tackle historical biases. For instance, let Y be an indicator of whether a client defaults on a loan, while ˆY is the actual decision of giving the loan. Consider the DAG A →Y , shown in Figure 1(c) with the explicit inclusion of set U of independent background variables. Y is the objectively ideal measure for decision making, the binary indicator of the event that the individual defaults on a loan. If A is postulated to be a protected attribute, then the predictor ˆY = Y = fY (A, U) is not counterfactually fair, with the arrow A →Y being (for instance) the result of a world that punishes individuals in a way that is out of their control. Figure 1(d) shows a finer-grained model, where the path is mediated by a measure of whether the person is employed, which is itself caused by two background factors: one representing whether the person hiring is prejudiced, and the other the employee’s qualifications. In this world, A is a cause of defaulting, even if mediated by other variables3. The counterfactual fairness principle however forbids us from using Y : using the twin network 4 of Pearl [28], we see in Figure 1(e) that Ya and Ya′ need not be identically distributed given the background variables. In contrast, any function of variables not descendants of A can be used a basis for fair decision making. This means that any variable ˆY defined by ˆY = g(U) will be counterfactually fair for any function g(·). Hence, given a causal model, the functional defined by the function g(·) minimizing some predictive error for Y will satisfy the criterion, as proposed in Section 4.1. We are essentially learning a projection of Y into the space of fair decisions, removing historical biases as a by-product. Counterfactual fairness also provides an answer to some problems on the incompatibility of fairness criteria. In particular, consider the following problem raised independently by different authors (e.g., 3For example, if the function determining employment fE(A, P, Q) ≡I(Q>0,P =0 or A̸=a) then an individual with sufficient qualifications and prejudiced potential employer may have a different counterfactual employment value for A = a compared to A = a′, and a different chance of default. 4In a nutshell, this is a graph that simultaneously depicts “multiple worlds” parallel to the factual realizations. In this graph, all multiple worlds share the same background variables, but with different consequences in the remaining variables depending on which counterfactual assignments are provided. 5 [7, 22]), illustrated below for the binary case: ideally, we would like our predictors to obey both Equality of Opportunity and the predictive parity criterion defined by satisfying P(Y = 1 | ˆY = 1, A = 1) = P(Y = 1 | ˆY = 1, A = 0), as well as the corresponding equation for ˆY = 0. It has been shown that if Y and A are marginally associated (e.g., recidivism and race are associated) and Y is not a deterministic function of ˆY , then the two criteria cannot be reconciled. Counterfactual fairness throws a light in this scenario, suggesting that both EO and predictive parity may be insufficient if Y and A are associated: assuming that A and Y are unconfounded (as expected for demographic attributes), this is the result of A being a cause of Y . By counterfactual fairness, we should not want to use Y as a basis for our decisions, instead aiming at some function Y⊥A of variables which are not caused by A but are predictive of Y . ˆY is defined in such a way that is an estimate of the “closest” Y⊥A to Y according to some preferred risk function. This makes the incompatibility between EO and predictive parity irrelevant, as A and Y⊥A will be independent by construction given the model assumptions. 4 Implementing Counterfactual Fairness As discussed in the previous Section, we need to relate ˆY to Y if the predictor is to be useful, and we restrict ˆY to be a (parameterized) function of the non-descendants of A in the causal graph following Lemma 1. We next introduce an algorithm, then discuss assumptions that can be used to express counterfactuals. 4.1 Algorithm Let ˆY ≡gθ(U, X⊁A) be a predictor parameterized by θ, such as a logistic regression or a neural network, and where X⊁A ⊆X are non-descendants of A. Given a loss function l(·, ·) such as squared loss or log-likelihood, and training data D ≡{(A(i), X(i), Y (i))} for i = 1, 2, . . . , n, we define L(θ) ≡Pn i=1 E[l(y(i), gθ(U (i), x(i) ⊁A)) | x(i), a(i)]/n as the empirical loss to be minimized with respect to θ. Each expectation is with respect to random variable U (i) ∼PM(U | x(i), a(i)) where PM(U | x, a) is the conditional distribution of the background variables as given by a causal model M that is available by assumption. If this expectation cannot be calculated analytically, Markov chain Monte Carlo (MCMC) can be used to approximate it as in the following algorithm. 1: procedure FAIRLEARNING(D, M) ▷Learned parameters ˆθ 2: For each data point i ∈D, sample m MCMC samples U (i) 1 , . . . , U (i) m ∼PM(U | x(i), a(i)). 3: Let D′ be the augmented dataset where each point (a(i), x(i), y(i)) in D is replaced with the corresponding m points {(a(i), x(i), y(i), u(i) j )}. 4: ˆθ ←argminθ P i′∈D′ l(y(i′), gθ(U (i′), x(i′) ⊁A)). 5: end procedure At prediction time, we report ˜Y ≡E[ ˆY (U ⋆, x⋆ ⊁A) | x⋆, a⋆] for a new data point (a⋆, x⋆). Deconvolution perspective. The algorithm can be understood as a deconvolution approach that, given observables A ∪X, extracts its latent sources and pipelines them into a predictive model. We advocate that counterfactual assumptions must underlie all approaches that claim to extract the sources of variation of the data as “fair” latent components. As an example, Louizos et al. [24] start from the DAG A →X ←U to extract P(U | X, A). As U and A are not independent given X in this representation, a type of penalization is enforced to create a posterior Pfair(U |A, X) that is close to the model posterior P(U | A, X) while satisfying Pfair(U |A = a, X) ≈Pfair(U |A = a′, X). But this is neither necessary nor sufficient for counterfactual fairness. The model for X given A and U must be justified by a causal mechanism, and that being the case, P(U | A, X) requires no postprocessing. As a matter of fact, model M can be learned by penalizing empirical dependence measures between U and pai for a given Vi (e.g. Mooij et al. [26]), but this concerns M and not ˆY , and is motivated by explicit assumptions about structural equations, as described next. 6 4.2 Designing the Input Causal Model Model M must be provided to algorithm FAIRLEARNING. Although this is well understood, it is worthwhile remembering that causal models always require strong assumptions, even more so when making counterfactual claims [8]. Counterfactuals assumptions such as structural equations are in general unfalsifiable even if interventional data for all variables is available. This is because there are infinitely many structural equations compatible with the same observable distribution [28], be it observational or interventional. Having passed testable implications, the remaining components of a counterfactual model should be understood as conjectures formulated according to the best of our knowledge. Such models should be deemed provisional and prone to modifications if, for example, new data containing measurement of variables previously hidden contradict the current model. We point out that we do not need to specify a fully deterministic model, and structural equations can be relaxed as conditional distributions. In particular, the concept of counterfactual fairness holds under three levels of assumptions of increasing strength: Level 1. Build ˆY using only the observable non-descendants of A. This only requires partial causal ordering and no further causal assumptions, but in many problems there will be few, if any, observables which are not descendants of protected demographic factors. Level 2. Postulate background latent variables that act as non-deterministic causes of observable variables, based on explicit domain knowledge and learning algorithms5. Information about X is passed to ˆY via P(U | x, a). Level 3. Postulate a fully deterministic model with latent variables. For instance, the distribution P(Vi | pai) can be treated as an additive error model, Vi =fi(pai)+ei [31]. The error term ei then becomes an input to ˆY as calculated from the observed variables. This maximizes the information extracted by the fair predictor ˆY . 4.3 Further Considerations on Designing the Input Causal Model One might ask what we can lose by defining causal fairness measures involving only noncounterfactual causal quantities, such as enforcing P( ˆY = 1 | do(A = a)) = P( ˆY = 1 | do(A = a′)) instead of our counterfactual criterion. The reason is that the above equation is only a constraint on an average effect. Obeying this criterion provides no guarantees against, for example, having half of the individuals being strongly “negatively” discriminated and half of the individuals strongly “positively” discriminated. We advocate that, for fairness, society should not be satisfied in pursuing only counterfactually-free guarantees. While one may be willing to claim posthoc that the equation above masks no balancing effect so that individuals receive approximately the same distribution of outcomes, that itself is just a counterfactual claim in disguise. Our approach is to make counterfactual assumptions explicit. When unfairness is judged to follow only some “pathways” in the causal graph (in a sense that can be made formal, see [21, 27]), nonparametric assumptions about the independence of counterfactuals may suffice, as discussed by [27]. In general, nonparametric assumptions may not provide identifiable adjustments even in this case, as also discussed in our Supplementary Material. If competing models with different untestable assumptions are available, there are ways of simultaneously enforcing a notion of approximate counterfactual fairness in all of them, as introduced by us in [32]. Other alternatives include exploiting bounds on the contribution of hidden variables [29, 33]. Another issue is the interpretation of causal claims involving demographic variables such as race and sex. Our view is that such constructs are the result of translating complex events into random variables and, despite some controversy, we consider counterproductive to claim that e.g. race and sex cannot be causes. An idealized intervention on some A at a particular time can be seen as a notational shortcut to express a conjunction of more specific interventions, which may be individually doable but jointly impossible in practice. It is the plausibility of complex, even if impossible to practically manipulate, causal chains from A to Y that allows us to claim that unfairness is real [11]. Experiments for constructs exist, such as randomizing names in job applications to make them race-blind. They do not contradict the notion of race as a cause, and can be interpreted as an intervention on a particular aspect of the construct “race,” such as “race perception” (e.g. Section 4.4.4 of [29]). 5In some domains, it is actually common to build a model entirely around latent constructs with few or no observable parents nor connections among observed variables [2]. 7 5 Illustration: Law School Success We illustrate our approach on a practical problem that requires fairness, the prediction of success in law school. A second problem, understanding the contribution of race to police stops, is described in the Supplementary Material. Following closely the usual framework for assessing causal models in the machine learning literature, the goal of this experiment is to quantify how our algorithm behaves with finite sample sizes while assuming ground truth compatible with a synthetic model. Problem definition: Law school success The Law School Admission Council conducted a survey across 163 law schools in the United States [35]. It contains information on 21,790 law students such as their entrance exam scores (LSAT), their grade-point average (GPA) collected prior to law school, and their first year average grade (FYA). Given this data, a school may wish to predict if an applicant will have a high FYA. The school would also like to make sure these predictions are not biased by an individual’s race and sex. However, the LSAT, GPA, and FYA scores, may be biased due to social factors. We compare our framework with two unfair baselines: 1. Full: the standard technique of using all features, including sensitive features such as race and sex to make predictions; 2. Unaware: fairness through unawareness, where we do not use race and sex as features. For comparison, we generate predictors ˆY for all models using logistic regression. Fair prediction. As described in Section 4.2, there are three ways in which we can model a counterfactually fair predictor of FYA. Level 1 uses any features which are not descendants of race and sex for prediction. Level 2 models latent ‘fair’ variables which are parents of observed variables. These variables are independent of both race and sex. Level 3 models the data using an additive error model, and uses the independent error terms to make predictions. These models make increasingly strong assumptions corresponding to increased predictive power. We split the dataset 80/20 into a train/test set, preserving label balance, to evaluate the models. As we believe LSAT, GPA, and FYA are all biased by race and sex, we cannot use any observed features to construct a counterfactually fair predictor as described in Level 1. In Level 2, we postulate that a latent variable: a student’s knowledge (K), affects GPA, LSAT, and FYA scores. The causal graph corresponding to this model is shown in Figure 2, (Level 2). This is a short-hand for the distributions: GPA ∼N(bG + wK G K + wR GR + wS GS, σG), FYA ∼N(wK F K + wR F R + wS F S, 1), LSAT ∼Poisson(exp(bL + wK L K + wR LR + wS LS)), K ∼N(0, 1) We perform inference on this model using an observed training set to estimate the posterior distribution of K. We use the probabilistic programming language Stan [34] to learn K. We call the predictor constructed using K, Fair K. Know GPA LSAT FYA Race Sex GPA LSAT FYA Race Sex Level 2 Level 3 ✏G ✏L ✏F 0 1 2 3 −1.0 −0.5 0.0 0.5 pred_zfya density type original swapped 0 1 2 3 −1.0 −0.5 0.0 0.5 pred_zfya density type original swapped 0 1 2 3 −1.0 −0.5 0.0 0.5 pred_zfya density type original swapped 0 1 2 3 −1.0 −0.5 0.0 0.5 pred_zfya density type original swapped 0.0 0.5 1.0 1.5 2.0 −0.5 0.0 0.5 pred_zfya density type original swapped 0.0 0.5 1.0 1.5 2.0 −0.4 0.0 0.4 0.8 pred_zfya density type original swapped 0.0 0.5 1.0 1.5 2.0 −0.4 0.0 0.4 0.8 pred_zfya density type original swapped 0.0 0.5 1.0 1.5 2.0 −0.4 0.0 0.4 0.8 pred_zfya density type original swapped FYA V FYA V FYA V FYA V FYA V FYA V FYA V density density density density density density density density female $ male black $ white asian $ white mexican $ white Full Unaware original data counterfactual Figure 2: Left: A causal model for the problem of predicting law school success fairly. Right: Density plots of predicted FYAa and FYAa′. In Level 3, we model GPA, LSAT, and FYA as continuous variables with additive error terms independent of race and sex (that may in turn be correlated with one-another). This model is shown 8 Table 1: Prediction results using logistic regression. Note that we must sacrifice a small amount of accuracy to ensuring counterfactually fair prediction (Fair K, Fair Add), versus the models that use unfair features: GPA, LSAT, race, sex (Full, Unaware). Full Unaware Fair K Fair Add RMSE 0.873 0.894 0.929 0.918 in Figure 2, (Level 3), and is expressed by: GPA = bG + wR GR + wS GS + ϵG, ϵG ∼p(ϵG) LSAT = bL + wR LR + wS LS + ϵL, ϵL ∼p(ϵL) FYA = bF + wR F R + wS F S + ϵF , ϵF ∼p(ϵF ) We estimate the error terms ϵG, ϵL by first fitting two models that each use race and sex to individually predict GPA and LSAT. We then compute the residuals of each model (e.g., ϵG =GPA−ˆYGPA(R, S)). We use these residual estimates of ϵG, ϵL to predict FYA. We call this Fair Add. Accuracy. We compare the RMSE achieved by logistic regression for each of the models on the test set in Table 1. The Full model achieves the lowest RMSE as it uses race and sex to more accurately reconstruct FYA. Note that in this case, this model is not fair even if the data was generated by one of the models shown in Figure 2 as it corresponds to Scenario 3. The (also unfair) Unaware model still uses the unfair variables GPA and LSAT, but because it does not use race and sex it cannot match the RMSE of the Full model. As our models satisfy counterfactual fairness, they trade off some accuracy. Our first model Fair K uses weaker assumptions and thus the RMSE is highest. Using the Level 3 assumptions, as in Fair Add we produce a counterfactually fair model that trades slightly stronger assumptions for lower RMSE. Counterfactual fairness. We would like to empirically test whether the baseline methods are counterfactually fair. To do so we will assume the true model of the world is given by Figure 2, (Level 2). We can fit the parameters of this model using the observed data and evaluate counterfactual fairness by sampling from it. Specifically, we will generate samples from the model given either the observed race and sex, or counterfactual race and sex variables. We will fit models to both the original and counterfactual sampled data and plot how the distribution of predicted FYA changes for both baseline models. Figure 2 shows this, where each row corresponds to a baseline predictor and each column corresponds to the counterfactual change. In each plot, the blue distribution is density of predicted FYA for the original data and the red distribution is this density for the counterfactual data. If a model is counterfactually fair we would expect these distributions to lie exactly on top of each other. Instead, we note that the Full model exhibits counterfactual unfairness for all counterfactuals except sex. We see a similar trend for the Unaware model, although it is closer to being counterfactually fair. To see why these models seem to be fair w.r.t. to sex we can look at weights of the DAG which generates the counterfactual data. Specifically the DAG weights from (male,female) to GPA are (0.93,1.06) and from (male,female) to LSAT are (1.1,1.1). Thus, these models are fair w.r.t. to sex simply because of a very weak causal link between sex and GPA/LSAT. 6 Conclusion We have presented a new model of fairness we refer to as counterfactual fairness. It allows us to propose algorithms that, rather than simply ignoring protected attributes, are able to take into account the different social biases that may arise towards individuals based on ethically sensitive attributes and compensate for these biases effectively. We experimentally contrasted our approach with previous fairness approaches and show that our explicit causal models capture these social biases and make clear the implicit trade-off between prediction accuracy and fairness in an unfair world. We propose that fairness should be regulated by explicitly modeling the causal structure of the world. Criteria based purely on probabilistic independence cannot satisfy this and are unable to address how unfairness is occurring in the task at hand. By providing such causal tools for addressing fairness questions we hope we can provide practitioners with customized techniques for solving a wide array of fairness modeling problems. 9 Acknowledgments This work was supported by the Alan Turing Institute under the EPSRC grant EP/N510129/1. CR acknowledges additional support under the EPSRC Platform Grant EP/P022529/1. We thank Adrian Weller for insightful feedback, and the anonymous reviewers for helpful comments. References [1] Berk, R., Heidari, H., Jabbari, S., Kearns, M., and Roth, A. Fairness in criminal justice risk assessments: The state of the art. arXiv:1703.09207v1, 2017. 2 [2] Bollen, K. Structural Equations with Latent Variables. John Wiley & Sons, 1989. 3, 7 [3] Bollen, K. and (eds.), J. Long. Testing Structural Equation Models. SAGE Publications, 1993. 13 [4] Bolukbasi, Tolga, Chang, Kai-Wei, Zou, James Y, Saligrama, Venkatesh, and Kalai, Adam T. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In Advances in Neural Information Processing Systems, pp. 4349–4357, 2016. 1 [5] Brennan, Tim, Dieterich, William, and Ehret, Beate. Evaluating the predictive validity of the compas risk and needs assessment system. Criminal Justice and Behavior, 36(1):21–40, 2009. 1 [6] Calders, Toon and Verwer, Sicco. Three naive bayes approaches for discrimination-free classification. Data Mining and Knowledge Discovery, 21(2):277–292, 2010. 1 [7] Chouldechova, A. Fair prediction with disparate impact: a study of bias in recidivism prediction instruments. Big Data, 2:153–163, 2017. 2, 6 [8] Dawid, A. P. Causal inference without counterfactuals. Journal of the American Statistical Association, pp. 407–448, 2000. 7 [9] DeDeo, Simon. Wrong side of the tracks: Big data and protected categories. arXiv preprint arXiv:1412.4643, 2014. 2 [10] Dwork, Cynthia, Hardt, Moritz, Pitassi, Toniann, Reingold, Omer, and Zemel, Richard. Fairness through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, pp. 214–226. ACM, 2012. 1, 2 [11] Glymour, C. and Glymour, M. R. Commentary: Race and sex are causes. Epidemiology, 25(4): 488–490, 2014. 7 [12] Grgic-Hlaca, Nina, Zafar, Muhammad Bilal, Gummadi, Krishna P, and Weller, Adrian. The case for process fairness in learning: Feature selection for fair decision making. NIPS Symposium on Machine Learning and the Law, 2016. 1, 2 [13] Halpern, J. Actual Causality. MIT Press, 2016. 3 [14] Hardt, Moritz, Price, Eric, Srebro, Nati, et al. Equality of opportunity in supervised learning. In Advances in Neural Information Processing Systems, pp. 3315–3323, 2016. 1, 2 [15] Johnson, Kory D, Foster, Dean P, and Stine, Robert A. Impartial predictive modeling: Ensuring fairness in arbitrary models. arXiv preprint arXiv:1608.00528, 2016. 2 [16] Joseph, Matthew, Kearns, Michael, Morgenstern, Jamie, Neel, Seth, and Roth, Aaron. Rawlsian fairness for machine learning. arXiv preprint arXiv:1610.09559, 2016. 1, 2 [17] Kamiran, Faisal and Calders, Toon. Classifying without discriminating. In Computer, Control and Communication, 2009. IC4 2009. 2nd International Conference on, pp. 1–6. IEEE, 2009. [18] Kamiran, Faisal and Calders, Toon. Data preprocessing techniques for classification without discrimination. Knowledge and Information Systems, 33(1):1–33, 2012. 10 [19] Kamishima, Toshihiro, Akaho, Shotaro, and Sakuma, Jun. Fairness-aware learning through regularization approach. In Data Mining Workshops (ICDMW), 2011 IEEE 11th International Conference on, pp. 643–650. IEEE, 2011. 1 [20] Khandani, Amir E, Kim, Adlar J, and Lo, Andrew W. Consumer credit-risk models via machine-learning algorithms. Journal of Banking & Finance, 34(11):2767–2787, 2010. 1 [21] Kilbertus, N., Carulla, M. R., Parascandolo, G., Hardt, M., Janzing, D., and Schölkopf, B. Avoiding discrimination through causal reasoning. Advances in Neural Information Processing Systems 30, 2017. 2, 5, 7 [22] Kleinberg, J., Mullainathan, S., and Raghavan, M. Inherent trade-offs in the fair determination of risk scores. Proceedings of The 8th Innovations in Theoretical Computer Science Conference (ITCS 2017), 2017. 1, 2, 6 [23] Lewis, D. Counterfactuals. Harvard University Press, 1973. 3 [24] Louizos, Christos, Swersky, Kevin, Li, Yujia, Welling, Max, and Zemel, Richard. The variational fair autoencoder. arXiv preprint arXiv:1511.00830, 2015. 1, 2, 6 [25] Mahoney, John F and Mohen, James M. Method and system for loan origination and underwriting, October 23 2007. US Patent 7,287,008. 1 [26] Mooij, J., Janzing, D., Peters, J., and Scholkopf, B. Regression by dependence minimization and its application to causal inference in additive noise models. In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 745–752, 2009. 6 [27] Nabi, R. and Shpitser, I. Fair inference on outcomes. arXiv:1705.10378v1, 2017. 5, 7, 16 [28] Pearl, J. Causality: Models, Reasoning and Inference. Cambridge University Press, 2000. 3, 4, 5, 7 [29] Pearl, J., Glymour, M., and Jewell, N. Causal Inference in Statistics: a Primer. Wiley, 2016. 2, 3, 4, 7, 12, 16 [30] Pearl, Judea. Causal inference in statistics: An overview. Statistics Surveys, 3:96–146, 2009. 2 [31] Peters, J., Mooij, J. M., Janzing, D., and Schölkopf, B. Causal discovery with continuous additive noise models. Journal of Machine Learning Research, 15:2009–2053, 2014. URL http://jmlr.org/papers/v15/peters14a.html. 7 [32] Russell, C., Kusner, M., Loftus, J., and Silva, R. When worlds collide: integrating different counterfactual assumptions in fairness. Advances in Neural Information Processing Systems, 31, 2017. 7, 13 [33] Silva, R. and Evans, R. Causal inference through a witness protection program. Journal of Machine Learning Research, 17(56):1–53, 2016. 7 [34] Stan Development Team. Rstan: the r interface to stan, 2016. R package version 2.14.1. 8 [35] Wightman, Linda F. Lsac national longitudinal bar passage study. lsac research report series. 1998. 8 [36] Zafar, Muhammad Bilal, Valera, Isabel, Rodriguez, Manuel Gomez, and Gummadi, Krishna P. Learning fair classifiers. arXiv preprint arXiv:1507.05259, 2015. 1, 2 [37] Zafar, Muhammad Bilal, Valera, Isabel, Rodriguez, Manuel Gomez, and Gummadi, Krishna P. Fairness beyond disparate treatment & disparate impact: Learning classification without disparate mistreatment. arXiv preprint arXiv:1610.08452, 2016. 2 [38] Zemel, Richard S, Wu, Yu, Swersky, Kevin, Pitassi, Toniann, and Dwork, Cynthia. Learning fair representations. ICML (3), 28:325–333, 2013. 2 [39] Zliobaite, Indre. A survey on measuring indirect discrimination in machine learning. arXiv preprint arXiv:1511.00148, 2015. 1 11 | 2017 | 430 |
6,931 | Efficient Online Linear Optimization with Approximation Algorithms Dan Garber Technion - Israel Institute of Technology dangar@technion.ac.il Abstract We revisit the problem of online linear optimization in case the set of feasible actions is accessible through an approximated linear optimization oracle with a factor ↵multiplicative approximation guarantee. This setting is in particular interesting since it captures natural online extensions of well-studied offline linear optimization problems which are NP-hard, yet admit efficient approximation algorithms. The goal here is to minimize the ↵-regret which is the natural extension of the standard regret in online learning to this setting. We present new algorithms with significantly improved oracle complexity for both the full information and bandit variants of the problem. Mainly, for both variants, we present ↵-regret bounds of O(T −1/3), were T is the number of prediction rounds, using only O(log(T)) calls to the approximation oracle per iteration, on average. These are the first results to obtain both average oracle complexity of O(log(T)) (or even poly-logarithmic in T) and ↵-regret bound O(T −c) for a constant c > 0, for both variants. 1 Introduction In this paper we revisit the problem of Online Linear Optimization (OLO) [14], which is a specialized case of Online Convex Optimization (OCO) [12] with linear loss functions, in case the feasible set of actions is accessible through an oracle for approximated linear optimization with a multiplicative approximation error guarantee. In the standard setting of OLO, a decision maker is repeatedly required to choose an action, a vector in some fixed feasible set in Rd. After choosing his action, the decision maker incurs loss (or payoff) given by the inner product between his selected vector and a vector chosen by an adversary. This game between the decision maker and the adversary then repeats itself. In the full information variant of the problem, after the decision maker receives his loss (payoff) on a certain round, he gets to observe the vector chosen by the adversary. In the bandit version of the problem, the decision maker only observes his loss (payoff) and does not get to observe the adversary’s vector. The standard goal of the decision maker in OLO is to minimize a quantity known as regret, which measures the difference between the average loss of the decision maker on a game of T consecutive rounds (where T is fixed and known in advance), and the average loss of the best feasible action in hindsight (i.e., chosen with knowledge of all actions of the adversary throughout the T rounds) (in case of payoffs this difference is reversed). The main concern when designing algorithms for choosing the actions of the decision maker, is guaranteeing that the regret goes to zero as the length of the game T increases, as fast as possible (i.e., the rate of the regret in terms of T). It should be noted that in this paper we focus on the case in which the adversary is oblivious (a.k.a. non-adaptive), which means the adversary chooses his entire sequence of actions for the T rounds beforehand. While there exist well known algorithms for choosing the decision maker’s actions which guarantee optimal regret bounds in T, such as the celebrated Follow the Perturbed Leader (FPL) and Online Gradient Descent (OGD) algorithms [14, 17, 12], efficient implementation of these algorithms hinges 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. on the ability to efficiently solve certain convex optimization problems (e.g., linear minimization for FPL or Euclidean projection for OGD) over the feasible set (or the convex hull of feasible points). However, when the feasible set corresponds for instance to the set of all possible solutions to some NP-Hard optimization problem, no such efficient implementations are known (or even widely believed to exist), and thus these celebrated regret-minimizing procedures cannot be efficiently applied. Luckily, many NP-Hard linear optimization problems (i.e., the objective function to either minimize or maximize is linear) admit efficient approximation algorithms with a multiplicative approximation guarantee. Some examples include MAX-CUT (factor 0.87856 approximation due to [9]) , METRIC TSP (factor 1.5 approximation due to [6]), MINIMUM WEIGHTED VERTEX COVER (factor 2 approximation [4]), and WEIGHTED SET COVER (factor (log n + 1) approximation due to [7]). It is thus natural to ask wether an efficient factor ↵approximation algorithm for an NP-Hard offline linear optimization problem could be used to construct, in a generic way, an efficient algorithm for the online version of the problem. Note that in this case, even efficiently computing the best fixed action in hindsight is not possible, and thus, minimizing regret via an efficient algorithm does not seem likely (given an approximation algorithm we can however compute in hindsight a decision that corresponds to at most (at least) ↵times the average loss (payoff) of the best fixed decision in hindsight). In their paper [13], Kakade, Kalai and Ligett were the first to address this question in a fully generic way. They showed that using only an ↵-approximation oracle for the set of feasible actions, it is possible, at a high level, to construct an online algorithm which achieves vanishing (expected) ↵-regret, which is the difference between the average loss of the decision maker and ↵times the average loss of the best fixed point in hindsight (for loss minimization problems and ↵≥1; a corresponding definition exists for payoff maximization problems and ↵< 1). Concretely, [13] showed that one can guarantee O(T −1/2) expected ↵-regret in the full-information setting, which is optimal, and O(T −1/3) in the bandit setting under the additional assumption of the availability of a Barycentric Spanner (which we discuss in the sequel). While the algorithm in [13] achieves an optimal ↵-regret bound (in terms of T) for the full information setting, in terms of computational complexity, the algorithm requires, in worst case, to perform on each round O(T) calls to the approximation oracle, which might be prohibitive and render the algorithm inefficient, since as discussed, in general, T is assumed to grow to infinity and thus the dependence of the runtime on T is of primary interest. Similarly, their algorithm for the bandit setting requires O(T 2/3) calls to the approximation oracle per iteration. The main contribution of our work is in providing new low ↵-regret algorithms for the full information and bandit settings with significantly improved oracle complexities. A detailed comparison with [13] is given in Table 1. Concretely, for the full-information setting, we show it is possible to achieve O(T −1/3) expected ↵-regret using only O(log(T)) calls to the approximation oracle per iteration, on average, which significantly improves over the O(T) bound of [13]1. We also show a bound of O(T −1/2) on the expected ↵-regret (which is optimal) using only O( p T log(T)) calls to the oracle per iteration, on average, which gives nearly quadratic improvement over [13]. In the bandit setting we show it is possible to obtain a O(T −1/3) bound on the expected ↵-regret (same as in [13]) using only O(log(T)) calls to the oracle per iteration, on average, under the same assumption on the availability of a Barycentric Spanner (BS). It is important to note that while there exist algorithms for OLO with bandit feedback which guarantee ˜O(T −1/2) expected regret [1, 11] (where the ˜O(·) hides poly-logarithmic factors in T), these require on each iteration to either solve to arbitrarily small accuracy a convex optimization problem over the feasible set [1], or sample a point from the feasible set according to a specified distribution [11], both of which cannot be implemented efficiently in our setting. On the other-hand, as we formally show in the sequel, at a high level, using a BS (originally introduced in [2]) simply requires to find a single set of d points from the feasible set which span the entire space Rd (assuming this is possible, otherwise the set could be mapped to a lower dimensional space). The process of finding these vectors can be viewed as a preprocessing step and thus can be carried out offline. Moreover, as discussed in [13], for many NP-Hard problems it is possible to compute a BS in polynomial time and thus even this preprocessing step is efficient. Importantly, [13] shows that the approximation oracle by itself is not strong enough to guarantee non-trivial ↵-regret in the bandit setting, and hence this assumption on the availability of a BS seems reasonable. Since the 1as we show in the appendix, even if we relax the algorithm of [13] to only guarantee O(T −1/3) ↵-regret, it will still require O(T 2/3) calls to the oracle per iteration, on average. 2 full information bandit information Reference ↵−regret oracle complexity ↵−regret oracle complexity KKL [13] T −1/2 T T −1/3 T 2/3 This paper (Thm. 4.1, 4.2) T −1/3 log(T) T −1/3 log(T) This paper (Thm. 4.1) T −1/2 p T log(T) Table 1: comparison of expected ↵−regret bounds and average number of calls to the approximation oracle per iteration. In all bounds we give only the dependence on the length of the game T and omit all other dependencies which we treat as constants. In the bandit setting we report the expected number of calls to the oracle per iteration. best general regret bound known using a BS is O(T −1/3), the ↵-regret bound of our bandit algorithm is the best achievable to date via an efficient algorithm. Technically, the main challenge in the considered setting is that as discussed, we cannot readily apply standard tools such as FPL and OGD. At a high level, in [13] it was shown that it is possible to apply the OGD method by replacing the exact projection step of OGD with an iterative algorithm which finds an infeasible point, but one that both satisfies the projection property required by OGD and is dominated by a convex combination of feasible points for every relevant linear loss (payoff) function. Unfortunately, in worst case, the number of queries to the approximation oracle required by this so-called projection algorithm per iteration is linear in T. While our online algorithms are also based on an application of OGD, our approach to computing the so-called projections is drastically different than [13], and is based on a coupling of two cutting plane methods, one that is based on the Ellipsoid method, and the other that resembles Gradient Descent. This approach might be of independent interest and might prove useful to similar problems. 1.1 Additional related work Kalai and Vempala [14] showed that approximation algorithms which have point-wise approximation guarantee, such as the celebrated MAX-CUT algorithm of [9], could be used to instantiate their Follow the Perturbed Leader framework to achieve low ↵-regret. However this construction is far from generic and requires the oracle to satisfy additional non-trivial conditions. This approach was also used in [3]. In [14] it was also shown that FPL could be instantiated with a FPTAS to achieve low ↵-regret, however the approximation factor in the FPTAS needs to be set to roughly (1 + O(T −1/2)), which may result in prohibitive running times even if a FPTAS for the underlying problem is available. Similarly, in [8] it was shown that if the approximation algorithm is based on solving a convex relaxation of the original, possibly NP-Hard, problem, this additional structure can be used with the FPL framework to achieve low ↵-regret efficiently. To conclude all of the latter works consider specialized cases in which the approximation oracle satisfies additional non-trivial assumptions beyond its approximation guarantee, whereas here, similarly to [13], we will be interested in a generic as possible conversion from the offline problem to the online one, without imposing additional structure on the offline oracle. 2 Preliminaries 2.1 Online linear optimization with approximation oracles Let K, F be compact sets of points in Rd + (non-negative orthant in Rd) such that maxx2K kxk R, maxf2F kfk F, for some R > 0, F > 0 (throughout this work we let k · k denote the standard Euclidean norm), and for all x 2 K, f 2 F it holds that C ≥x · f ≥0, for some C > 0. We assume K is accessible through an approximated linear optimization oracle OK : Rd + ! K with parameter ↵> 0 such that: 8c 2 Rd + : OK(c) 2 K and ⇢ OK(c) · c ↵minx2K x · c if ↵≥1; OK(c) · c ≥↵maxx2K x · c if ↵< 1. Here K is the feasible set of actions for the player, and F is the set of all possible loss/payoff vectors2. 2we note that both of our assumptions that K ⇢Rd +, F ⇢Rd + and that the oracle takes inputs from Rd + are made for ease of presentation and clarity, and since these naturally hold for many NP-Hard optimization problem that are relevant to our setting. Nevertheless, these assumptions could be easily generalized as done in [13]. 3 Since naturally a factor ↵> 1 for the approximation oracle is reasonable only for loss minimization problems, and a value ↵< 1 is reasonable for payoff maximization problems, throughout this work it will be convenient to use the value of ↵to differentiate between minimization problems and maximization problems. Given a sequence of linear loss/payoff functions {f1, ..., fT } 2 FT and a sequence of feasible points {x1, ...., xT } 2 KT , we define the ↵−regret of the sequence {xt}t2[T ] with respect to the sequence {ft}t2[T ] as ↵−regret({(xt, ft)}t2[T ]) := 8 < : 1 T PT t=1 xt · ft −↵· minx2K 1 T PT t=1 x · ft if ↵≥1; ↵· maxx2K 1 T PT t=1 x · ft −1 T PT t=1 xt · ft if ↵< 1. (1) When the sequences {xt}t2[T ], {ft}t2[T ] are obvious from context we will simply write ↵−regret without stating these sequences. Also, when the sequence {xt}t2[T ] is randomized we will use E[↵−regret] to denote the expected ↵-regret. 2.1.1 Online linear optimization with full information In OLO with full information, we consider a repeated game of T prediction rounds, for a fixed T, where on each round t, the decision maker is required to choose a feasible action xt 2 K. After committing to his choice, a linear loss function ft 2 F is revealed, and the decision maker incurs loss of xt · ft. In the payoff version, the decision maker incurs payoff of xt · ft. The game then continues to the next round. The overall goal of the decision maker is to guarantee that ↵−regret({(xt, ft)}t2[T ]) = O(T −c) for some c > 0, at least in expectation (in fact using randomization is mandatory since K need not be convex). Here we assume that the adversary is oblivious (aka non-adaptive), i.e., the sequence of losses/payoffs f1, ..., fT is chosen in advance (before the first round), and does not depend on the actions of the decision maker. 2.1.2 Bandit feedback The bandit version of the problem is identical to the full information setting with one crucial difference: on each round t, after making his choice, the decision maker does not observe the vector ft, but only the value of his loss/payoff, given by xt · ft. 2.2 Additional notation For any two sets S, K ⇢Rd and a scalar β 2 R we define the sets S +K := {x+y | x 2 S, y 2 K}, βS := {βx | x 2 S}. We also denote by CH(K) the convex-hull of all points in a set K. For a convex and compact set S ⇢Rd and a point x 2 Rd we define dist(x, S) := minz2S kz −xk. We let B(c, r) denote the Euclidean ball or radius r centered in c. 2.3 Basic algorithmic tools We now briefly describe two very basic ideas that are essential for constructing our algorithms, namely the extended approximation oracle and the online gradient descent without feasibility method. These were already suggested in [13] to obtain their low ↵-regret algorithms. We note that in the appendix we describe in more detail the approach of [13] and discuss its shortcomings in obtaining oracle-efficient algorithms. 2.3.1 The extended approximation oracle As discussed, a key difficulty of our setting that prevents us from directly applying well studied algorithms for OLO, is that essentially all standard algorithms require to exactly solve (or up to arbitrarily small error) some linear/convex optimization problem over the convexification of the feasible set CH(K). However, not only that our approximation oracle OK(·) cannot perform exact minimization, even for ↵= 1 it is applicable only with inputs in Rd +, and hence cannot optimize in all directions. A natural approach, suggested in [13], to overcome the approximation error of the oracle OK(·), is to consider optimization with respect to the convex set CH(↵K) (i.e. convex hull of all points in K scaled by a factor of ↵) instead of CH(K). Indeed, if we consider for instance the case ↵≥1, it is straightforward to see that for any c 2 Rd +, OK(c) · c ↵minx2K x · c = 4 ↵minx2CH(K) x · c = minx2CH(↵K) x · c. Thus, in a certain sense, OK(·) can optimize with respect to CH(↵K) for all directions in Rd +, although the oracle returns points in the original set K. The following lemma shows that one can easily extend the oracle OK(·) to optimize with respect to all directions in Rd. Lemma 2.1 (Extended approximation oracle). Given c 2 Rd write c = c+ + c−where c+ equals to c on all non-negative coordinates of c and zero everywhere else, and c−equals c on all negative coordinates and zero everywhere else. The extended approximation oracle is a mapping ˆOK : Rd ! (K + B(0, (1 + ↵)R), K) defined as: ˆOK(c) = (v, s) := ⇢ (OK(c+) −↵R¯c−, OK(c+)) if ↵≥1; (OK(−c−) −R¯c+, OK(−c−)) if ↵< 1, (2) where for any vector v 2 Rd we denote ¯v = v/kvk if kvk > 0 and ¯v = 0 otherwise, and it satisfies the following three properties: 1. v · c minx2↵K x · c 2. 8f 2 F: s · f v · f if ↵≥1 and s · f ≥v · f if ↵< 1 3. kvk (↵+ 2)R The proof is given in the appendix for completeness. It is important to note that while the extended oracle provides solutions with values at least as low as any point in CH(↵K), still in general the output point v need not be in either K or CH(↵K), which means that it is not a feasible point to play in our OLO setting, nor does it allow us to optimize over CH(↵K). This is why we also need the oracle to output the feasible point s 2 K which dominates v for any possible loss/payoff vector in F. While we will use the outputs v to solve a certain optimization problem involving CH(↵K), this dominance relation will be used to convert the solutions to these optimization problems into feasible plays for our OLO algorithms. 2.3.2 Online gradient descent with and without feasibility As in [13], our online algorithms will be based on the well known Online Gradient Descent method (OGD) for online convex optimization, originally due to [17]. For a sequence of loss vectors {f1, ..., fT } ⇢Rd OGD produces a sequence of plays {x1, ..., xT } ⇢S, for a convex and compact set S ⇢Rd via the following updates: 8t ≥1 : yt+1 xt−⌘ft, xt+1 arg minx2S kx −yt+1k2, where x1 is initialized to some arbitrary point in S and ⌘is some pre-determined step-size. The obvious difficulty in applying OGD to online linear optimization over S = CH(↵K) is the step of computing xt+1 by projecting yt+1 onto the feasible set S, since as discussed, even with the extended approximation oracle, one cannot exactly optimize over CH(↵K). Instead we will consider a variant of OGD which may produce infeasible points, i.e., outside of S, but which guarantees low regret with respect to any point in S. This algorithm, which we refer to as online gradient descent without feasibility, is given below (Algorithm 1). Algorithm 1 Online Gradient Descent Without Feasibility 1: input: learning rate ⌘> 0 2: x1 some point in S 3: for t = 1 . . . T do 4: play xt and receive loss/payoff vector ft 2 Rd 5: yt+1 ⇢ xt −⌘ft for losses xt + ⌘ft for payoffs 6: find xt+1 2 Rd such that 8z 2 S : kz −xt+1k2 kz −yt+1k2 (3) 7: end for Lemma 2.2. [Online gradient descent without feasibility] Fix ⌘> 0. Suppose Algorithm 1 is applied for T rounds and let {ft}T t=1 ⇢Rd be the sequence of observed loss/payoff vectors, and let {xt}T t=1 5 be the sequence of points played by the algorithm. Then for any x 2 S it holds that 1 T PT t=1 xt · ft −1 T PT t=1 x · ft 1 2T ⌘kx1 −xk2 + ⌘ 2T PT t=1 kftk2 for losses; 1 T PT t=1 x · ft −1 T PT t=1 xt · ft 1 2T ⌘kx1 −xk2 + ⌘ 2T PT t=1 kftk2 for payoffs. The proof is given in the appendix for completeness. 3 Oracle-efficient Computation of (infeasible) Projections onto CH(↵K) In this section we detail our main technical tool for obtaining oracle-efficient online algorithms, i.e., our algorithm for computing projections, in the sense of Eq. (3), onto the convex set CH(↵K). Before presenting our projection algorithm, Algorithm 2 and detailing its theoretical guarantees, we first present the main algorithmic building block in the algorithm, which is described in the following lemma. Lemma 3.1 shows that for any point x 2 Rd, we can either find a near-by point p which is a convex combination of points outputted by the extended approximation oracle (and hence, p is dominated by a convex combination of feasible points in K for any vector in F, as discussed in Section 2.3.1), or we can find a separating hyperplane that separates x from CH(↵K) with sufficiently large margin. We achieve this by running the well known Ellipsoid method [10, 5] in a very specialized way. This application of the Ellipsoid method is similar in spirit to those in [15, 16], which applied this idea to computing correlated equilibrium in games and algorithmic mechanism design, though the implementation details and the way in which we apply this technique are quite different. The proof of the following lemma is given in the appendix. Lemma 3.1 (Separation-or-Decomposition via the Ellipsoid method). Fix x 2 Rd, ✏ 2 (0, (↵+ 2)R], and a positive integer N ≥cd2 ln ⇣ (↵+1)R+kxk ✏ ⌘ , where c is a positive universal constant. Consider an attempt to apply the Ellipsoid method for N iterations to the following feasibility problem: find w 2 Rd such that: 8z 2 ↵K : (x −z) · w ≥✏ and kwk 1, (4) such that each iteration of the Ellipsoid method applies the following consecutive steps: 1. (v, s) ˆOK(−w), where w is the current iterate. If (x −v) · w < ✏, use v −x as a separating hyperplane for the Ellipsoid method and continue to to the next iteration 2. if kwk > 1, use w as a separating hyperplane for the Ellipsoid method and continue to the next iteration 3. otherwise (kwk 1 and (x −v) · w ≥✏), declare Problem (4) feasible and return the vector w. Then, if the Ellipsoid method terminates declaring Problem 4 feasible, the returned vector w is a feasible solution to Problem (4). Otherwise (the Ellipsoid method completes N iterations without declaring Problem (4) feasible), let (v1, s1), ..., (vN, sN) be the outputs of the extended approximation oracle gathered throughout the run of the algorithm, and let (a1, ..., aN) be an optimal solution to the following convex optimization problem: min (a1,...,aN) 1 2 ((((( N X i=1 aivi −x ((((( 2 such that 8i 2 {1, ..., N} : ai ≥0, N X i=1 ai = 1. (5) Then the point p = PN i=1 aivi satisfies kx −pk 3✏. We are now ready to present our algorithm for computing projections onto CH(↵K) (in the sense of Eq. (3)). Consider now an attempt to project a point y 2 Rd, and note that in particular, y itself is a valid projection (again, in the sense of Eq. (3)), however, in general, it is not a feasible point nor is it dominated by a convex combination of feasible points. When attempting to project y 2 Rd, our algorithm continuously applies the separation-or-decomposition procedure described in Lemma 3.1. 6 In case the procedure returns a decomposition, then by Lemma 3.1, we have a point that is sufficiently close to y and is dominated for any vector in F by a convex combination (given explicitly) of feasible points in K. Otherwise, the procedure returns a separating hyperplane which can be used to to “pull y closer" to CH(↵K) in a way that the resulting point still satisfies the projection inequality given in Eq. (3), and the process then repeats itself. Since each time we obtain a hyperplane separating our current iterate from CH(↵K), we pull the current iterate sufficiently towards CH(↵K), this process must terminate. Lemma 3.2 gives exact bounds on the performance of the algorithm. Algorithm 2 (infeasible) Projection onto CH(↵K) 1: input: point y 2 Rd, tolerance ✏> 0 2: ˜y y/ max{1, kyk/(↵R)} 3: for t = 1 . . . do 4: call the SEPARATION-OR-DECOMPOSTION procedure (Lemma 3.1) with parameters (˜y, ✏) 5: if the procedure outputs a separating hyperplane w then 6: ˜y ˜y −✏w 7: else 8: let (a1, ..., aN), {(v1, s1), ..., (vN, sN)} be the decomposition returned 9: return ˜y, (a1, ..., aN), {(v1, s1), ..., (vN, sN)} 10: end if 11: end for Lemma 3.2. Fix y 2 Rd and ✏2 (0, (↵+ 2)R]. Algorithm 2 terminates after at most d↵2R2/✏2e iterations, returning a point ˜y 2 Rd, a distribution (a1, ..., aN) and a set {(v1, s1), ..., (vN, sN)} outputted by the extended approximation oracle, where N is as defined in Lemma 3.1, such that 1. 8z 2 CH(↵K) : k˜y −zk2 ky −zk2 , 2. kp −˜yk 3✏ for p := X i2[N] aivi. Moreover, if the for loop was entered a total number of k times, then the final value of ˜y satisfies dist2(˜y, CH(↵K)) min{2↵2R2, dist2(y, CH(↵K)) −(k −1)✏2}, and the overall number of queries to the approximation oracle is O * kd2 ln ((↵+ 1)R/✏) + . It is important to note that the worst case iteration bound in Lemma 3.2 does not seem so appealing for our purposes, since it depends polynomially on 1/✏, and in our online algorithms naturally we will need to take ✏= O(T −c) for some c > 0, which seems to contradict our goal of achieving poly-logarithmic in T oracle complexity, at least on average. However, as Lemma 3.2 shows, the more iterations Algorithm 2 performs, the closer it brings its final iterate to the set CH(↵K). Thus, as we will show when analyzing the oracle complexity of our online algorithms, while a single call to Algorithm 2 can be expensive, when calling it sequentially, where each input is a small perturbation of the output of the previous call, the average number of iterations performed per such call cannot be too high. 4 Efficient Algorithms for the Full Information and Bandit Settings We now turn to present our online algorithms for the full-information and bandit settings together with their regret bounds and oracle-complexity guarantees. 4.1 Algorithm for the full information setting Our algorithm for the full-information setting, Algorithm 3, is given below. Theorem 4.1. [Main Theorem] Fix ⌘> 0, ✏2 (0, (↵+ 2)R]. Suppose Algorithm 3 is applied for T rounds and let {ft}T t=1 ✓F be the sequence of observed loss/payoff vectors, and let {st}T t=1 be the sequence of points played by the algorithm. Then it holds that E ⇥ ↵−regret * {(st, ft)}t2[T ] +⇤ ↵2R2T −1⌘−1 + ⌘F 2/2 + 3F✏, and the average number of calls to the approximation oracle of K per iteration is upper bounded by K(⌘, ✏) := O ** 1 + * ⌘↵RF + ⌘2F 2+ ✏−2+ d2 ln ((↵+ 1)R/✏) + . 7 Algorithm 3 Online Gradient Descent with Infeasible Projections onto CH(↵K) 1: input: learning rate ⌘> 0, projection error parameter ✏> 0 2: s1 some point in K, ˜y1 ↵s1 3: for t = 1 . . . T do 4: play st and receive loss/payoff vector ft 2 F 5: yt+1 ⇢ ˜yt −⌘ft if ↵≥1 ˜yt + ⌘ft if ↵< 1 6: call Algorithm 2 with inputs (yt+1, ✏) to obtain an approximated projection ˜yt+1, a distribution (a1, ..., aN) and {(v1, s1), ..., (vN, sN)} ✓Rd ⇥K, for some N 2 N. 7: sample st+1 2 {s1, ..., sN} according to distribution (a1, ..., aN) 8: end for In particular, setting ⌘= ↵RT −2/3/F, ✏= ↵RT −1/3 gives E [↵−regret] = O * ↵RFT −1/3+ , K = O * d2 ln * ↵+1 ↵T ++ . Alternatively, setting ⌘ = ↵RT −1/2/F, ✏= ↵RT −1/2 gives E [↵−regret] = O * ↵RFT −1/2+ , K = O ⇣p Td2 ln * ↵+1 ↵T +⌘ . The proof is given in the appendix. 4.2 Algorithm for the bandit information setting Our algorithm for the bandit setting follows from a very well known reduction from the bandit setting to the full information setting, also applied in the bandit algorithm of [13]. The algorithm simply simulates the full information algorithm, Algorithm 3, by providing it with estimated loss/payoff vectors ˆf1, ...,ˆfT instead of the true vectors f1, ..., fT which are not available in the bandit setting. This reduction is based on the use of a Barycentric Spanner (defined next) for the feasible set K. As standard, we assume the points in K span the entire space Rd, otherwise we can reformulate the problem in a lower-dimensional space, in which this assumption holds. Definition 4.1 (Barycentric Spanner3). We say that a set of d vectors {q1, ..., qd} ⇢Rd is a Barycentric Spanner with parameter β > 0 for a set S ⇢Rd, denoted by β-BS(S), if it holds that {q1, ..., qd} ⇢S, and the matrix Q := Pd i=1 qiq> i is not singular and maxi2[d] kQ−1qik β. Importantly, as discussed in [13], the assumption on the availability of such a set β-BS(K) seems reasonable, since i) for many sets that correspond to the set of all possible solutions to some wellstudied NP-Hard optimization problem, one can still construct in poly(d) time a barycentric spanner with β = poly(d), ii) β-BS(K) needs to be constructed only once and then stored in memory (overall d vectors in Rd), and hence its construction can be viewed as a pre-processing step, and iii) as illustrated in [13], without further assumptions, the approximation oracle by itself is not sufficient to guarantee nontrivial regret bounds in the bandit setting. The algorithm and the proof of the following theorem are given in the appendix. Theorem 4.2. Fix ⌘> 0, ✏2 (0, (↵+ 2)R], γ 2 (0, 1). Suppose Algorithm 5 is applied for T rounds and let {ft}T t=1 ✓F be the sequence of observed loss/payoff vectors, and let {ˆst}T t=1 be the sequence of points played by the algorithm. Then it holds that E ⇥ ↵−regret * {(ˆst, ft)}t2[T ] +⇤ ↵2R2⌘−1T −1 + ⌘d2C2β2γ−1/2 + 3✏F + γC, and the expected number of calls to the approximation oracle of K per iteration is upper bounded by E [K(⌘, ✏, γ)] := O ** 1 + * ⌘↵βdCR + (⌘dCβ)2/γ + ✏−2+ d2 ln ((↵+ 1)R/✏) + . In particular, setting ⌘= ↵R βdC T −2/3, ✏= ↵RT −1/3, γ = T −1/3 gives E [↵−regret] = O * (↵βdCR + ↵RF + C)T −1/3+ , E[K] = O * d2 ln * ↵+1 ↵T ++ . 3this definition is somewhat different than the classical one given in [2], however it is equivalent to a C-approximate barycentric spanner [2], with an appropriately chosen constant C(β). 8 References [1] Jacob Abernethy, Elad Hazan, and Alexander Rakhlin. Competing in the dark: An efficient algorithm for bandit linear optimization. In COLT, pages 263–274, 2008. [2] Baruch Awerbuch and Robert D Kleinberg. Adaptive routing with end-to-end feedback: Distributed learning and geometric approaches. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, pages 45–53. ACM, 2004. [3] Maria-Florina Balcan and Avrim Blum. Approximation algorithms and online mechanisms for item pricing. In Proceedings of the 7th ACM Conference on Electronic Commerce, pages 29–35. ACM, 2006. [4] Reuven Bar-Yehuda and Shimon Even. A linear-time approximation algorithm for the weighted vertex cover problem. Journal of Algorithms, 2(2):198–203, 1981. [5] Sébastien Bubeck. Convex optimization: Algorithms and complexity. Foundations and Trends R⃝in Machine Learning, 8(3-4):231–357, 2015. [6] Nicos Christofides. Worst-case analysis of a new heuristic for the travelling salesman problem. Technical report, DTIC Document, 1976. [7] V. Chvatal. A greedy heuristic for the set-covering problem. Mathematics of Operations Research, 4(3):233–235, 1979. [8] Takahiro Fujita, Kohei Hatano, and Eiji Takimoto. Combinatorial online prediction via metarounding. In ALT, pages 68–82. Springer, 2013. [9] Michel X Goemans and David P Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM (JACM), 42(6):1115–1145, 1995. [10] M. Grötschel, L. Lovász, and A. Schrijver. The ellipsoid method and its consequences in combinatorial optimization. Combinatorica, 1(2):169–197, 1981. [11] Elad Hazan, Zohar Shay Karnin, and Raghu Meka. Volumetric spanners: an efficient exploration basis for learning. In COLT, volume 35, pages 408–422, 2014. [12] Elad Hazan and Haipeng Luo. Variance-reduced and projection-free stochastic optimization. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pages 1263–1271, 2016. [13] Sham M. Kakade, Adam Tauman Kalai, and Katrina Ligett. Playing games with approximation algorithms. SIAM J. Comput., 39(3):1088–1106, 2009. [14] Adam Kalai and Santosh Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71(3):291–307, 2005. [15] Christos H Papadimitriou and Tim Roughgarden. Computing correlated equilibria in multi-player games. Journal of the ACM (JACM), 55(3):14, 2008. [16] S Matthew Weinberg. Algorithms for strategic agents. PhD thesis, Massachusetts Institute of Technology, 2014. [17] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Machine Learning, Proceedings of the Twentieth International Conference (ICML 2003), August 21-24, 2003, Washington, DC, USA, pages 928–936, 2003. 9 | 2017 | 431 |
6,932 | Inhomogeneous Hypergraph Clustering with Applications Pan Li Department ECE UIUC panli2@illinois.edu Olgica Milenkovic Department ECE UIUC milenkov@illinois.edu Abstract Hypergraph partitioning is an important problem in machine learning, computer vision and network analytics. A widely used method for hypergraph partitioning relies on minimizing a normalized sum of the costs of partitioning hyperedges across clusters. Algorithmic solutions based on this approach assume that different partitions of a hyperedge incur the same cost. However, this assumption fails to leverage the fact that different subsets of vertices within the same hyperedge may have different structural importance. We hence propose a new hypergraph clustering technique, termed inhomogeneous hypergraph partitioning, which assigns different costs to different hyperedge cuts. We prove that inhomogeneous partitioning produces a quadratic approximation to the optimal solution if the inhomogeneous costs satisfy submodularity constraints. Moreover, we demonstrate that inhomogenous partitioning offers significant performance improvements in applications such as structure learning of rankings, subspace segmentation and motif clustering. 1 Introduction Graph partitioning or clustering is a ubiquitous learning task that has found many applications in statistics, data mining, social science and signal processing [1, 2]. In most settings, clustering is formally cast as an optimization problem that involves entities with different pairwise similarities and aims to maximize the total “similarity” of elements within clusters [3, 4, 5], or simultaneously maximize the total similarity within cluster and dissimilarity between clusters [6, 7, 8]. Graph partitioning may be performed in an agnostic setting, where part of the optimization problem is to automatically learn the number of clusters [6, 7]. Although similarity among entities in a class may be captured via pairwise relations, in many realworld problems it is necessary to capture joint, higher-order relations between subsets of objects. From a graph-theoretic point of view, these higher-order relations may be described via hypergraphs, where objects correspond to vertices and higher-order relations among objects correspond to hyperedges. The vertex clustering problem aims to minimize the similarity across clusters and is referred to as hypergraph partitioning. Hypergraph clustering has found a wide range of applications in network motif clustering, semi-supervised learning, subspace clustering and image segmentation. [8, 9, 10, 11, 12, 13, 14, 15]. Classical hypergraph partitioning approaches share the same setup: A nonnegative weight is assigned to every hyperedge and if the vertices in the hyperedge are placed across clusters, a cost proportional to the weight is charged to the objective function [9, 11]. We refer to this clustering procedure as homogenous hyperedge clustering and refer to the corresponding partition as a homogeneous partition (H-partition). Clearly, this type of approach prohibits the use of information regarding how different vertices or subsets of vertices belonging to a hyperedge contribute to the higher-order relation. A more appropriate formulation entails charging different costs to different cuts of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. c(M3) M3(Product) M1(Reactant) M2(Reactant) c(M1) c(M2) 1 2 3 4 5 6 7 8 9 H-‐partition InH-‐partition 10 Graph
partition Figure 1: Clusters obtained using homogenous and inhomogeneous hypergraph partitioning and graph partitioning (based on pairwise relations). Left: Each reaction is represented by a hyperedge. Three different cuts of a hyperedge are denoted by c(M3), c(M1), and c(M2), based on which vertex is “isolated” by the cut. The graph partition only takes into account pairwise relations between reactants, corresponding to w(c(M3)) = 0. The homogenous partition enforces the three cuts to have the same weight, w(c(M3)) = w(c(M1)) = w(c(M2)), while an inhomogenous partition is not required to satisfy this constraint. Right: Three different clustering results based on optimally normalized cuts for a graph partition, a homogenous partition (H-partition) and an inhomogenous partition (InH-partition) with 0.01 w(c(M1)) ≤w(c(M3)) ≤0.44 w(c(M1)). hyperedges, thereby endowing hyperedges with vector weights capturing these costs. To illustrate the point, consider the example of metabolic networks [16]. In these networks, vertices describe metabolites while edges describe transformative, catalytic or binding relations. Metabolic reactions are usually described via equations that involve more than two metabolites, such as M1 + M2 →M3. Here, both metabolites M1 and M2 need to be present in order to complete the reaction that leads to the creation of the product M3. The three metabolites play different roles: M1, M2 are reactants, while M3 is the product metabolite. A synthetic metabolic network involving reactions with three reagents as described above is depicted in Figure 1, along with three different partitions induced by a homogeneous, inhomogeneous and classical graph cut. As may be seen, the hypergraph cuts differ in terms of how they split or group pairs of reagents. The inhomogeneous clustering preserves all but one pairing, while the homogenous clustering splits two pairings. The graph partition captures only pairwise relations between reactants and hence, the optimal normalized cut over the graph splits six reaction triples. The differences between inhomogenous, homogenous, and pairwise-relation based cuts are even more evident for large graphs and they may lead to significantly different partitioning performance in a number of important partitioning applications. The problem of inhomogeneous hypergraph clustering has not been previously studied in the literature. The main results of the paper are efficient algorithms for inhomogenous hypergraph partitioning with theoretical performance guarantees and extensive testing of inhomogeneous partitioning in applications such as hierarchical biological network studies, structure learning of rankings and subspace clustering1 (All proofs and discussions of some applications are relegated to the Supplementary Material). The algorithmic methods are based on transforming hypergraphs into graphs and subsequently performing spectral clustering based on the normalized Laplacian of the derived graph. A similar approach for homogenous clustering has been used under the name of Clique Expansion [14]. However, the projection procedure, which is the key step of Clique Expansion, differs significantly from the projection procedure used in our work, as the inhomogenous clustering algorithm allows non-uniform expansion of one hyperedge while Clique Expansion only allows for uniform expansions. A straightforward analysis reveals that the normalized hypergraph cut problem [11] and the normalized Laplacian homogeneous hypergraph clustering algorithms [9, 11] are special cases of our proposed algorithm, where the costs assigned to the hyperedges take a very special form. Furthermore, we show that when the costs of the proposed inhomogeneous hyperedge clustering are submodular, the projection procedure is guaranteed to find a constant-approximation solution for several graph-cut related entities. Hence, the inhomogeneous clustering procedure has the same quadratic approximation properties as spectral graph clustering [17]. 2 Preliminaries and Problem Formulation A hypergraph H = (V, E) is described in terms of a vertex set V = {v1, v2, ..., vn} and a set of hyperedges E. A hyperedge e ∈E is a subset of vertices in V . For an arbitrary set S, we let |S| stand for the cardinality of the set, and use δ(e) = |e| to denote the size of a hyperedge. If for all e ∈E, δ(e) equals a constant ∆, the hypergraph is called a ∆-uniform hypergraph. 1The code for experiments can be found at https://github.com/lipan00123/InHclustering. 2 Let 2e denote the power set of e. An inhomogeneous hyperedge (InH-hyperedge) is a hyperedge with an associated weight function we : 2e →R≥0. The weight we(S) indicates the cost of cutting/partitioning the hyperedge e into two subsets, S and e/S. A consistent weight we(S) satisfies the following properties: we(∅) = 0 and we(S) = we(e/S). The definition also allows we(·) to be enforced only for a subset of 2e. However, for singleton sets S = {v} ∈e, we({v}) has to be specified. The degree of a vertex v is defined as dv = P e: v∈e we({v}), while the volume of a subset of vertices S ⊆V is defined as volH(S) = X v∈S dv. (1) Let (S, ¯S) be a partition of the vertices V . Define the hyperedge boundary of S as ∂S = {e ∈ E|e ∩S ̸= ∅, e ∩¯S ̸= ∅} and the corresponding set volume as volH(∂S) = X e∈∂S we(e ∩S) = X e∈E we(e ∩S), (2) where the second equality holds since we(∅) = we(e) = 0. The task of interest is to minimize the normalized cut NCut of the hypergraph with InH-hyperedges, i.e., to solve the following optimization problem arg min S NCutH(S) = arg min S volH(∂S) 1 volH(S) + 1 volH( ¯S) . (3) One may also extend the notion of InH hypergraph partitioning to k-way InH-partition. For this purpose, we let (S1, S2, ..., Sk) be a k-way partition of the vertices V , and define the k-way normalized cut for inH-partition according to NCutH(S1, S2, ..., Sk) = k X i=1 volH(∂Si) volH(Si) . (4) Similarly, the goal of a k-way inH-partition is to minimize NCutH(S1, S2, ..., Sk). Note that if δ(e) = 2 for all e ∈E, the above definitions are consistent with those used for graphs [18]. 3 Inhomogeneous Hypergraph Clustering Algorithms Motivated by the homogeneous clustering approach of [14], we propose an inhomogeneous clustering algorithm that uses three steps: 1) Projecting each InH-hyperedge onto a subgraph; 2) Merging the subgraphs into a graph; 3) Performing classical spectral clustering based on the normalized Laplacian (described in the Supplementary Material, along with the complexity of all algorithmic steps). The novelty of our approach is in introducing the inhomogenous clustering constraints via the projection step, and stating an optimization problem that provides the provably best weight splitting for projections. All our theoretical results are stated for the NCut problem, but the proposed methods may be used as heuristics for k-way NCuts. Suppose that we are given a hypergraph with inhomogeneous hyperedge weights, H = (V, E, w). For each InH-hyperedge (e, we), we aim to find a complete subgraph Ge = (V (e), E(e), w(e)) that “best” represents this InH-hyperedge; here, V (e) = e, E(e) = {{v, ˜v}|v, ˜v ∈e, v ̸= ˜v}, and w(e) : E(e) →R denotes the hyperedge weight vector. The goal is to find the graph edge weights that provide the best approximation to the split hyperedge weight according to: min w(e),β(e) β(e) s.t. we(S) ≤ X v∈S,˜v∈e/S w(e) v˜v ≤β(e) we(S), for all S ∈2e s.t. we(S) is defined. (5) Upon solving for the weights w(e), we construct a graph G = (V, Eo, w), where V are the vertices of the hypergraph, Eo is the complete set of edges, and where the weights wv˜v, are computed via wv˜v ≜ X e∈E w(e) v˜v , ∀{v, ˜v} ∈Eo. (6) 3 This step represents the projection weight merging procedure, which simply reduces to the sum of weights of all hyperedge projections on a pair of vertices. Due to the linearity of the volumes (1) and boundaries (2) of sets S of vertices, for any S ⊂V , we have VolH(∂S) ≤VolG(∂S) ≤β∗VolH(∂S), VolH(S) ≤VolG(S) ≤β∗VolH(S), (7) where β∗= maxe∈E β(e). Applying spectral clustering on G = (V, Eo, w) produces the desired partition (S∗, ¯ S∗). The next result is a consequence of combining the bounds of (7) with the approximation guarantees of spectral graph clustering (Theorem 1 [17]). Theorem 3.1. If the optimization problem (5) is feasible for all InH-hyperedges and the weights wv˜v obtained from (6) are nonnegative for all {v, ˜v} ∈Eo, then α∗= NCutH(S∗) satisfies (β∗)3αH ≥(α∗)2 8 ≥α2 H 8 . (8) where αH is the optimal value of normalized cut of the hypergraph H. There are no guarantees that the wv˜v will be nonnegative: The optimization problem (5) may result in solutions w(e) that are negative. The performance of spectral methods in the presence of negative edge weights is not well understood [19, 20]; hence, it would be desirable to have the weights wv˜v generated from (6) be nonnegative. Unfortunately, imposing nonngativity constraints in the optimization problem may render it infeasible. In practice, one may use (wv˜v)+ = max{wv˜v, 0} to remove negative weights (other choices, such as (wv˜v)+ = P e(w(e) v˜v )+ do not appear to perform well). This change invalidates the theoretical result of Theorem 3.1, but provides solutions with very good empirical performance. The issues discussed are illustrated by the next example. Example 3.1. Let e = {1, 2, 3}, (we({1}), we({2}), we({3})) = (0, 0, 1). The solution to the weight optimization problem is (β(e), w(e) 12 , w(e) 13 , w(e) 23 ) = (1, −1/2, 1/2, 1/2). If all components w(e) are constrained to be nonnegative, the optimization problem is infeasible. Nevertheless, the above choice of weights is very unlikely to be encountered in practice, as we({1}), we({2}) = 0 indicates that vertices 1 and 2 have no relevant connections within the given hyperedge e, while we({3}) = 1 indicates that vertex 3 is strongly connected to 1 and 2, which is a contradiction. Let us assume next that the negative weight is set to zero. Then, we adjust the weights ((w(e) 12 )+, w(e) 13 , w(e) 23 ) = (0, 1/2, 1/2), which produce clusterings ((1,3)(2)) or ((2,3)(1)); both have zero costs based on we. Another problem is that arbitrary choices for we may cause the optimization problem to be infeasible (5) even if negative weights of w(e) are allowed, as illustrated by the following example. Example 3.2. Let e = {1, 2, 3, 4}, with we({1, 4}) = we({2, 3}) = 1 and we(S) = 0 for all other choices of sets S. To force the weights to zero, we require w(e) v˜v = 0 for all pairs v˜v, which fails to work for we({1, 4}), we({2, 3}). For a hyperedge e, the degrees of freedom for we are 2δ(e)−1 −1, as two values of we are fixed, while the other values are paired up by symmetry. When δ(e) > 3, we have δ(e) 2 < 2δ(e)−1 −1, which indicates that the problem is overdetermined/infeasible. In what follows, we provide sufficient conditions for the optimization problem to have a feasible solution with nonnegative values of the weights w(e). Also, we provide conditions for the weights we that result in a small constant β∗and hence allow for quadratic approximations of the optimum solution. Our results depend on the availability of information about the weights we: In practice, the weights have to be inferred from observable data, which may not suffice to determine more than the weight of singletons or pairs of elements. Only the values of we({v}) are known. In this setting, we are only given information about how much each node contributes to a higher-order relation, i.e., we are only given the values of we({v}), v ∈V . Hence, we have δ(e) costs (equations) and δ(e) ≥3 variables, which makes the problem underdetermined and easy to solve. The optimal βe = 1 is attained by setting for all edges {v, ˜v} w(e) v˜v = 1 δ(e) −2 [we({v}) + we({˜v})] − 1 (δ(e) −1)(δ(e) −2) X v′∈e we({v′}). (9) The components of we(·) with positive coefficients in (3) are precisely those associated with the endpoints of edges v˜v. Using simple algebraic manipulations, one can derive the conditions under which the values w(e) v˜v are nonnegative, and these are presented in the Supplementary Material. 4 The solution to (9) produces a perfect projection with β(e) = 1. Unfortunately, one cannot guarantee that the solution is nonnegative. Hence, the question of interest is to determine for what types of cuts can one can deviate from a perfect projection but ensure that the weights are nonnegative. The proposed approach is to set the unspecified values of we(·) so that the weight function becomes submodular, which guarantees nonnegative weights we v˜v that can constantly approximate we(·), although with a larger approximation constant β. Submodular weights we(S). As previously discussed, when δ(e) > 3, the optimization problem (5) may not have any feasible solutions for arbitrary choices of weights. However, we show next that if the weights we are submodular, then (5) always has a nonnegative solution. We start by recalling the definition of a submodular function. Definition 3.2. A function we : 2e →R≥0 that satisfies we(S1) + we(S2) ≥we(S1 ∩S2) + we(S1 ∪S2) for all S1, S2 ∈2e, is termed submodular. Theorem 3.3. If we is submodular, then w∗(e) v˜v = X S∈2e/{∅,e} we(S) 2|S|(δ(e) −|S|)1|{v,˜v}∩S|=1 (10) − we(S) 2(|S| + 1)(δ(e) −|S| −1)1|{v,˜v}∩S|=0 − we(S) 2(|S| −1)(δ(e) −|S| + 1)1|{v,˜v}∩S|=2 is nonnegative. For 2 ≤δ(e) ≤7, the function above is a feasible solution for the optimization problem (5) with parameters β(e) listed in Table 1. Table 1: Feasible values of β(e) for δ(e) |δ(e)| 2 3 4 5 6 7 β 1 1 3/2 2 4 6 Theorem 3.3 also holds when some weights in the set we are not specified, but may be completed to satisfy submodularity constraints (See Example 3.3). Example 3.3. Let e = {1, 2, 3, 4}, (we({1}), we({2}), we({3}), we({4})) = (1/3, 1/3, 1, 1). Solving (9) yields w(e) 12 = −1/9 and β(e) = 1. By completing the missing components in we as (we({1, 2}), we({1, 3}), we({1, 4})) = (2/3, 1, 1) leads to submodular weights (Observe that completions are not necessarily unique). Then, the solution of (10) gives w(e) 12 = 0 and β(e) ∈(1, 2/3], which is clearly larger than one. Remark 3.1. It is worth pointing out that β = 1 when δ(e) = 3, which asserts that homogeneous triangle clustering may be performed via spectral methods on graphs without any weight projection distortion [9]. The above results extend this finding to the inhomogeneous case whenever the weights are submodular. In addition, triangle clustering based on random walks [21] may be extended to the inhomogeneous case. Also, (10) lead to an optimal approximation ratio β(e) if we restrict w(e) to be a linear mapping of we, which is formally stated next. Theorem 3.4. Suppose that for all pairs of {v, ˜v} ∈Eo, w(e) v˜v is a linear function of we, denoted by w(e) v˜v = fv˜v(we), where {fv˜v}{v˜v∈E(e)} depends on δ(e) but not on we. Then, when δ(e) ≤7, the optimal values of β for the following optimization problem depend only on δ(e), and are equal to those listed in Table 1. min {fv˜v}{v,˜v}∈Eo,β max submodular we β (11) s.t. we(S) ≤ X v∈S,˜v∈e/S fv˜v(we) ≤βwe(S), for all S ∈2e. Remark 3.2. Although we were able to prove feasibility (Theorem 3.3) and optimality of linear solutions (Theorem 3.4) only for small values of δ(e), we conjecture the results to be true for all δ(e). 5 The following theorem shows that if the weights we of hyperedges in a hypergraph are generated from graph cuts of a latent weighted graph, then the projected weights of hyperedges are proportional to the corresponding weights in the latent graph. Theorem 3.5. Suppose that Ge = (V (e), E(e), w(e)) is a latent graph that generates hyperedge weights we according to the following procedure: for any S ⊆e, we(S) = P v∈S,˜v∈e/S w(e) v˜v . Then, equation (10) establishes that w∗(e) v˜v = β(e)w(e) v˜v , for all v˜v ∈E(e), with β(e) = 2δ(e)−2 δ(e)(δ(e)−1). Theorem 3.5 establishes consistency of the linear map (10), and also shows that the min-max optimal approximation ratio for linear functions equals Ω(2δ(e)/δ(e)2). An independent line of work [22], based on Gomory-Hu trees (non-linear), established that submodular functions represent nonnegative solutions of the optimization problem (5) with β(e) = δe −1. Therefore, an unrestricted solution of the optimization problem (5) ensures that β(e) ≤δe −1. As practical applications almost exclusively involve hypergraphs with small, constant δ(e), the Gomory-Hu tree approach in this case is suboptimal in approximation ratio compared to (10). The expression (10) can be rewritten as w∗(e) = M we, where M is a matrix that only depends on δ(e). Hence, the projected weights can be computed in a very efficient and simple manner, as opposed to constructing the Gomory-Hu tree or solving (5) directly. In the rare case that one has to deal with hyperedges for which δ(e) is large, the Gomory-Hu tree approach and a solution of (5) may be preferred. 4 Related Work and Discussion One contribution of our work is to introduce the notion of an inhomogenous partition of hyperedges and a new hypergraph projection method that accompanies the procedure. Subsequent edge weight merging and spectral clustering are standardly used in hypergraph clustering algorithms, and in particular in Zhou’s normalized hypergraph cut approach [11], Clique Expansion, Star Expansion and Clique Averaging [14]. The formulation closest to ours is Zhou’s method [11]. In the aforementioned hypergraph clustering method for H-hyperedges, each hyperedge e is assigned a scalar weight wH e . For the projection step, Zhou used wH e /δ(e) for the weight of each pair of endpoints of e. If we view the H-hyperedge as an InH-hyperedge with weight function we, where we(S) = wH e |S|(δ(e) − |S|)/δ(e) for all S ∈2e, then our definition of the volume/cost of the boundary (2) is identical to that of Zhou’s. With this choice of we, the optimization problem (5) outputs w(e) v˜v = wH e /δ(e), with β(e) = 1, which are the same values as those obtained via Zhou’s projection. The degree of a vertex in [11] is defined as dv = P e∈E h(e, v)wH e = P e∈E δ(e) δ(e)−1we({v}), which is a weighted sum of the we({v}) and thus takes a slightly different form when compared to our definition. As a matter of fact, for uniform hypergraphs, the two forms are same. Some other hypergraph clustering algorithms, such as Clique expansion and Star expansion, as shown by Agarwal et al. [23], represent special cases of our method for uniform hypergraphs as well. The Clique Averaging method differs substantially from all the aforedescribed methods. Instead of projecting each hyperedge onto a subgraph and then combining the subgraphs into a graph, the algorithm performs a one-shot projection of the whole hypergraph onto a graph. The projection is based on a ℓ2-minimization rule, which may not allow for constant-approximation solutions. It is unknown if the result of the procedure can provide a quadratic approximation for the optimum solution. Clique Averaging also has practical implementation problems and high computational complexity, as it is necessary to solve a linear regression with n2 variable and nδ(e) observations. In the recent work on network motif clustering [9], the hyperedges are deduced from a graph where they represent so called motifs. Benson et. al [9] proved that if the motifs have three vertices, resulting in a three-uniform hypergraph, their proposed algorithm satisfies the Cheeger inequality for motifs2. In the described formulation, when cutting an H-hyperedge with weight wH e , one is required to pay wH e . Hence, recasting this model within our setting, we arrive at inhomogenous weights we(S) = wH e , for all S ∈2e, for which (5) yields w(e) v˜v = wH e /(δ(e) −1) and β(e) = ⌊δ2(e) 4 ⌋/(δ(e) −1), 2The Cheeger inequality [17] arises in the context of minimizing the conductance of a graph, which is related to the normalized cut. 6 identical to the solution of [9]. Furthermore, given the result of our Theorem 3.1, one can prove that the algorithm of [9] offers a quadratic-factor approximation for motifs involving more than three vertices, a fact that was not established in the original work [9]. All the aforementioned algorithms essentially learn the spectrum of Laplacian matrices obtained through hypergraph projection. The ultimate goal of projections is to avoid solving the NP-hard problem of learning the spectrum of certain hypergraph Laplacians [24]. Methods that do not rely on hypergraph projection, including optimization with the total variance of hypergraphs [12, 13], tensor spectral methods [25] and nonlinear Laplacian spectral methods [26], have also been reported in the literature. These techniques were exclusively applied in homogeneous settings, and they typically have higher complexity and smaller spectral gaps than the projection-based methods. A future line of work is to investigate whether these methods can be extended to the inhomogeneous case. Yet another relevant line of work pertains to the statistical analysis of hypergraph partitioning methods for generalized stochastic block models [27, 28]. 5 Applications Network motif clustering. Real-world networks exhibit rich higher-order connectivity patterns frequently referred to as network motifs [29]. Motifs are special subgraphs of the graph and may be viewed as hyperedges of a hypergraph over the same set of vertices. Recent work has shown that hypergraph clustering based on motifs may be used to learn hidden high-order organization patterns in networks [9, 8, 21]. However, this approach treats all vertices and edges within the motifs in the same manner, and hence ignores the fact that each structural unit within the motif may have a different relevance or different role. As a result, the vertices of the motifs are partitioned with a uniform cost. However, this assumption is hardly realistic as in many real networks, only some vertices of higher-order structures may need to be clustered together. Hence, inhomogenous hyperedges are expected to elucidate more subtle high-order organizations of network. We illustrate the utility of InH-partition on the Florida Bay foodweb [30] and compare our findings to those of [9]. The Florida Bay foodweb comprises 128 vertices corresponding to different species or organisms that live in the Bay, and 2106 directed edges indicating carbon exchange between two species. The Foodweb essentially represents a layered flow network, as carbon flows from so called producers organisms to high-level predators. Each layer of the network consists of “similar” species that play the same role in the food chain. Clustering of the species may be performed by leveraging the layered structure of the interactions. As a network motif, we use a subgraph of four species, and correspondingly, four vertices denoted by vi, for i = 1, 2, 3, 4. The motif captures, among others, relations between two producers and two consumers: The producers v1 and v2 both transmit carbons to v3 and v4, and all types of carbon flow between v1 and v2, v3 and v4 are allowed (see Figure 2 Left). Such a motif is the smallest structural unit that captures the fact that carbon exchange occurs in uni-direction between layers, while is allowed freely within layers. The inhomogeneous hyperedge costs are assigned according to the following heuristics: First, as v1 and v2 share two common carbon recipients (predators) while v3 and v4 share two common carbon sources (preys), we set we({vi}) = 1 for i = 1, 2, 3, 4, and we({v1, v2}) = 0, we({v1, v3}) = 2, and we({v1, v4}) = 2. Based on the solution of the optimization problem (5), one can construct a weighted subgraph whose costs of cuts match the inhomogeneous costs, with β(e) = 1. The graph is depicted in Figure 2 (left). Our approach is to perform hierarchical clustering via iterative application of the InH-partition method. In each iteration, we construct a hypergraph by replacing the chosen motif subnetwork by an hyperedge. The result is shown in Figure 2. At the first level, we partitioned the species into three clusters corresponding to producers, primary consumers and secondary consumers. The producer cluster is homogeneous in so far that it contains only producers, a total of nine of them. At the second level, we partitioned the obtained primary-consumer cluster into two clusters, one of which almost exclusively comprises invertebrates (28 out of 35), while the other almost exclusively comprises forage fishes. The secondary-consumer cluster is partitioned into two clusters, one of which comprises top-level predators, while the other cluster mostly consists of predatory fishes and birds. Overall, we recovered five clusters that fit five layers ranging from producers to top-level consumers. It is easy to check that the producer, invertebrate and top-level predator clusters exhibit high functional similarity of species (> 80%). An exact functional classification of forage and predatory fishes is not known, but our layered network appears to capture an overwhelmingly large number of prey-predator relations among these species. Among the 1714 edges, obtained after removing isolated vertices and detritus species vertices, only five edges point in the opposite direction from a higher to a lower-level 7 Primary consumers Secondary consumers Producers Invertebrates Forage fishes Predatory fishes & Birds Top-‐level Predators v1 v2 v3 v4 1 0 0 0 0 1 v1 v2 v3 v4 Projection Motif: Microfauna Pelagic fishes Crabs & Benthic fishes Macroinvertebrates Motif (Benson’16): Projection Figure 2: Motif clustering in the Florida Bay food web. Left: InHomogenous case. Left-top: Hyperedge (network motif) & the weighted induced subgraph; Left-bottom: Hierarchical clustering structure and five clusters via InH-partition. The vertices belonging to different clusters are distinguished by the colors of vertices. Edges with a uni-direction (right to left) are colored black while other edges are kept blue. Right: Homogenous partitioning [9] with four clusters. Grey vertices are not connected by motifs and thus unclassified. cluster, two of which go from predatory fishes to forage fishes. Detailed information about the species and clusters is provided in the Supplementary Material. In comparison, the related work of Benson et al. [9] which used homogenous hypergraph clustering and triangular motifs reported a very different clustering structure. The corresponding clusters covered less than half of the species (62 out of 128) as many vertices were not connected by the triangle motif; in contrast, 127 out of 128 vertices were covered by our choice of motif. We attribute the difference between our results and the results of [9] to the choices of the network motif. A triangle motif, used in [9] leaves a large number of vertices unclustered and fails to enforce a hierarchical network structure. On the other hand, our fan motif with homogeneous weights produces a giant cluster as it ties all the vertices together, and the hierarchical decomposition is only revealed when the fan motif is used with inhomogeneous weights. In order to identify hierarchical network structures, instead of hypergraph clustering, one may use topological sorting to rank species based on their carbon flows [31]. Unfortunately, topological sorting cannot use biological side information and hence fails to automatically determine the boundaries of the clusters. Learning the Riffled Independence Structure of Ranking Data. Learning probabilistic models for ranking data has attracted significant interest in social and political sciences as well as in machine learning [32, 33]. Recently, a probabilistic model, termed the riffled-independence model, was shown to accurately describe many benchmark ranked datasets [34]. In the riffled independence model, one first generates two rankings over two disjoint sets of element independently, and then riffle shuffles the rankings to arrive at an interleaved order. The structure learning problem in this setting reduces to distinguishing the two categories of elements based on limited ranking data. More precisely, let Q be the set of candidates to be ranked, with |Q| = n. A full ranking is a bijection σ : Q →[n], and for an a ∈Q, σ(a) denotes the position of candidate a in the ranking σ. We use σ(a) < (>)σ(b) to indicate that a is ranked higher (lower) than b in σ. If S ⊆Q, we use σS : S →[|S|] to denote the ranking σ projected onto the set S. We also use S(σ) ≜{σ(a)|a ∈S} to denote the subset of positions of elements in S. Let P(E) denote the probability of the event E. Riffled independence asserts that there exists a riffled-independent set S ⊂Q, such that for a fixed ranking σ′ over [n], P(σ = σ′) = P(σS = σ′ S)P(σQ/S = σ′ Q/S)P(S(σ) = S(σ′)). Suppose that we are given a set of rankings Σ = {σ(1), σ(2), ..., σ(m)} drawn independently according to some probability distribution P. If P has a riffled-independent set S∗, the structure learning problem is to find S∗. In [34], the described problem was cast as an optimization problem over all possible subsets of Q, with the objective of minimizing the Kullback-Leibler divergence between the ranking distribution with riffled independence and the empirical distribution of Σ [34]. A simplified version of the optimization problem reads as arg min S⊂Q F(S) ≜ X (i,j,k)∈Ωcross S, ¯ S Ii;j,k + X (i,j,k)∈Ωcross ¯ S,S Ii;j,k, (12) where Ωcross A,B ≜{(i, j, k)|i ∈A, j, k ∈B}, and where Ii;j,k denotes the estimated mutual information between the position of the candidate i and two “comparison candidates” j, k. If 1σ(j)<σ(k) 8 Party Candidates Fianna Fáil 1,4,13 Fine Gael 2,5,6 Independent 3,7,8,9 Others 10, 11,12,14 {1,2,3,4,5,6,7,8,9,10,11,12,13,14} {1,4,13} {2,3,5,6,7,8,9,10,11,12,14} {2,5,6} {3,7,8,9,10,11,12,14} {7,8,9} {3,10,11,12,14} ... ... ... Fianna F´ail Fine Gael Independent 101 102 103 Sample Complexity m 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Success Rate 0 0.2 0.4 0.6 0.8 1 Triple-Sampling Probability r 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Success Rate InH-Par-F.F. InH-Par-F.G. InH-Par-Ind. InH-Par-All Apar-F.F. Apar-F.G. Apar-Ind. Apar-All Figure 3: Election dataset. Left-top: parties and candidates; Left-bottom: hierarchical partitioning structure of Irish election detected by InH-Par; Middle: Success rate vs Sample Complexity; Right: Success rate vs Triple-sampling Rate. denotes the indicator function of the underlying event, we may write Ii;j,k ≜ˆI(σ(i); 1σ(j)<σ(k)) = X σ(i) X 1σ(j)<σ(k) ˆP(σ(i), 1σ(j)<σ(k)) log ˆP(σ(i), 1σ(j)<σ(k)) ˆP(σ(i))P(1σ(j)<σ(k)) , (13) where ˆP denotes an estimate of the underlying probability. If i and j, k are in different riffledindependent sets, the estimated mutual information ˆI(σ(i); 1σ(j)<σ(k)) converges to zero as the number of samples increases. When the number of samples is small, one may use mutual information estimators described in [35, 36, 37]. One may recast the above problem as an InH-partition problem over a hypergraph where each candidate represents a vertex in the hypergraph, and Ii;j,k represents the inhomogeneous cost we({i}) for the hyperedge e = {i, j, k}. Note that as mutual information ˆI(σ(i); 1σ(j)<σ(k)) is in general asymmetric, one would not have been able to use H-partitions. The optimization problem reduces to minS volH(∂S). The two optimization tasks are different, and we illustrate next that the InH-partition outperforms the original optimization approach AnchorsPartition (Apar) [34] both on synthetic data and real data. Due to space limitations, synthetic data and a subset of the real dataset results are listed in the Supplementary Material. Here, we analyzed the Irish House of Parliament election dataset (2002) [38]. The dataset consists of 2490 ballots fully ranking 14 candidates. The candidates were from a number of parties, where Fianna Fáil (F.F.) and Fine Gael (F.G.) are the two largest (and rival) Irish political parties. Using InHpartition (InH-Par), one can split the candidates iteratively into two sets (See Figure 3) which yields to meaningful clusters that correspond to large parties: {1, 4, 13} (F.F.), {2, 5, 6} (F.G.), {7, 8, 9} (Ind.). We compared InH-partition with Apar based on their performance in detecting these three clusters using a small training set: We independently sampled m rankings 100 times and executed both algorithms to partition the set of candidates iteratively. During the partitioning procedure, “party success” was declared if one exactly detected one of the three party clusters (“F.F.”, “F.G.” & “Ind.”). “All” was used to designate that all three party clusters were detected completely correctly. InH-partition outperforms Apar in recovering the cluster Ind. and achieved comparable performance for cluster F.F., although it performs a little worse than Apar for cluster F.G.; InH-partition also offers superior overall performance compared to Apar. We also compared InH-partition with APar in the large sample regime (m = 2490), using only a subset of triple comparisons (hyperedges) sampled independently with probability r (This strategy significantly reduces the complexity of both algorithms). The average is computed over 100 independent runs. The results are shown in Figure 3, highlighting the robustness of InH-partition with respect to missing triples. Additional test on ranking data are described in the Supplementary Material, along with new results on subspace clustering, motion segmentation and others. 6 Acknowledgement The authors gratefully acknowledge many useful suggestions by the reviewers. They are also indebted to the reviewers for providing many additional and relevant references. This work was supported in part by the NSF grant CCF 1527636. 9 References [1] A. K. Jain, M. N. Murty, and P. J. Flynn, “Data clustering: a review,” ACM computing surveys (CSUR), vol. 31, no. 3, pp. 264–323, 1999. [2] A. Y. Ng, M. I. Jordan, and Y. Weiss, “On spectral clustering: Analysis and an algorithm,” in Advances in Neural Information Processing Systems (NIPS), 2002, pp. 849–856. [3] S. R. Bulò and M. Pelillo, “A game-theoretic approach to hypergraph clustering,” in Advances in Neural Information Processing Systems (NIPS), 2009, pp. 1571–1579. [4] M. Leordeanu and C. Sminchisescu, “Efficient hypergraph clustering,” in International Conference on Artificial Intelligence and Statistics (AISTATS), 2012, pp. 676–684. [5] H. Liu, L. J. Latecki, and S. Yan, “Robust clustering as ensembles of affinity relations,” in Advances in Neural Information Processing Systems (NIPS), 2010, pp. 1414–1422. [6] N. Bansal, A. Blum, and S. Chawla, “Correlation clustering,” in The 43rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), 2002, pp. 238–247. [7] N. Ailon, M. Charikar, and A. Newman, “Aggregating inconsistent information: ranking and clustering,” Journal of the ACM (JACM), vol. 55, no. 5, p. 23, 2008. [8] P. Li, H. Dau, G. Puleo, and O. Milenkovic, “Motif clustering and overlapping clustering for social network analysis,” in IEEE Conference on Computer Communications (INFOCOM), 2017, pp. 109–117. [9] A. R. Benson, D. F. Gleich, and J. Leskovec, “Higher-order organization of complex networks,” Science, vol. 353, no. 6295, pp. 163–166, 2016. [10] H. Yin, A. R. Benson, J. Leskovec, and D. F. Gleich, “Local higher-order graph clustering,” in Proceedings of the 23rd ACM International Conference on Knowledge Discovery and Data Mining (SIGKDD), 2017, pp. 555–564. [11] D. Zhou, J. Huang, and B. Schölkopf, “Learning with hypergraphs: Clustering, classification, and embedding,” in Advances in neural information processing systems, 2007, pp. 1601–1608. [12] M. Hein, S. Setzer, L. Jost, and S. S. Rangapuram, “The total variation on hypergraphs-learning on hypergraphs revisited,” in Advances in Neural Information Processing Systems (NIPS), 2013, pp. 2427–2435. [13] C. Zhang, S. Hu, Z. G. Tang, and T. H. Chan, “Re-revisiting learning on hypergraphs: confidence interval and subgradient method,” in International Conference on Machine Learning (ICML), 2017, pp. 4026–4034. [14] S. Agarwal, J. Lim, L. Zelnik-Manor, P. Perona, D. Kriegman, and S. Belongie, “Beyond pairwise clustering,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), vol. 2, 2005, pp. 838–845. [15] S. Kim, S. Nowozin, P. Kohli, and C. D. Yoo, “Higher-order correlation clustering for image segmentation,” in Advances in Neural Information Processing Systems (NIPS), 2011, pp. 1530– 1538. [16] H. Jeong, B. Tombor, R. Albert, Z. N. Oltvai, and A.-L. Barabási, “The large-scale organization of metabolic networks,” Nature, vol. 407, no. 6804, pp. 651–654, 2000. [17] F. R. Chung, “Four proofs for the cheeger inequality and graph partition algorithms,” in Proceedings of ICCM, vol. 2, 2007, p. 378. [18] J. Shi and J. Malik, “Normalized cuts and image segmentation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 22, no. 8, pp. 888–905, 2000. [19] J. Kunegis, S. Schmidt, A. Lommatzsch, J. Lerner, E. W. De Luca, and S. Albayrak, “Spectral analysis of signed graphs for clustering, prediction and visualization,” in SIAM International Conference on Data Mining (ICDM), 2010, pp. 559–570. [20] A. V. Knyazev, “Signed laplacian for spectral clustering revisited,” arXiv preprint arXiv:1701.01394, 2017. [21] C. Tsourakakis, J. Pachocki, and M. Mitzenmacher, “Scalable motif-aware graph clustering,” arXiv preprint arXiv:1606.06235, 2016. 10 [22] N. R. Devanur, S. Dughmi, R. Schwartz, A. Sharma, and M. Singh, “On the approximation of submodular functions,” arXiv preprint arXiv:1304.4948, 2013. [23] S. Agarwal, K. Branson, and S. Belongie, “Higher order learning with graphs,” in International Conference on Machine Learning (ICML). ACM, 2006, pp. 17–24. [24] G. Li, L. Qi, and G. Yu, “The z-eigenvalues of a symmetric tensor and its application to spectral hypergraph theory,” Numerical Linear Algebra with Applications, vol. 20, no. 6, pp. 1001–1029, 2013. [25] A. R. Benson, D. F. Gleich, and J. Leskovec, “Tensor spectral clustering for partitioning higherorder network structures,” in Proceedings of the 2015 SIAM International Conference on Data Mining (ICDM), 2015, pp. 118–126. [26] A. Louis, “Hypergraph markov operators, eigenvalues and approximation algorithms,” in Proceedings of the forty-seventh annual ACM symposium on Theory of computing (STOC), 2015, pp. 713–722. [27] D. Ghoshdastidar and A. Dukkipati, “Consistency of spectral partitioning of uniform hypergraphs under planted partition model,” in Advances in Neural Information Processing Systems (NIPS), 2014, pp. 397–405. [28] ——, “Consistency of spectral hypergraph partitioning under planted partition model,” arXiv preprint arXiv:1505.01582, 2015. [29] R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon, “Network motifs: simple building blocks of complex networks,” Science, vol. 298, no. 5594, pp. 824–827, 2002. [30] “Florida bay trophic exchange matrix,” http://vlado.fmf.uni-lj.si/pub/networks/data/bio/ foodweb/Florida.paj. [31] S. Allesina, A. Bodini, and C. Bondavalli, “Ecological subsystems via graph theory: the role of strongly connected components,” Oikos, vol. 110, no. 1, pp. 164–176, 2005. [32] P. Awasthi, A. Blum, O. Sheffet, and A. Vijayaraghavan, “Learning mixtures of ranking models,” in Advances in Neural Information Processing Systems (NIPS), 2014, pp. 2609–2617. [33] C. Meek and M. Meila, “Recursive inversion models for permutations,” in Advances in Neural Information Processing Systems (NIPS), 2014, pp. 631–639. [34] J. Huang, C. Guestrin et al., “Uncovering the riffled independence structure of ranked data,” Electronic Journal of Statistics, vol. 6, pp. 199–230, 2012. [35] J. Jiao, K. Venkat, Y. Han, and T. Weissman, “Maximum likelihood estimation of functionals of discrete distributions,” IEEE Transactions on Information Theory, vol. 63, no. 10, pp. 6774– 6798, 2017. [36] Y. Bu, S. Zou, Y. Liang, and V. V. Veeravalli, “Estimation of KL divergence: optimal minimax rate,” arXiv preprint arXiv:1607.02653, 2016. [37] W. Gao, S. Oh, and P. Viswanath, “Demystifying fixed k-nearest neighbor information estimators,” in IEEE International Symposium on Information Theory (ISIT), 2017, pp. 1267–1271. [38] I. C. Gormley and T. B. Murphy, “A latent space model for rank data,” in Statistical Network Analysis: Models, Issues, and New Directions. Springer, 2007, pp. 90–102. 11 | 2017 | 432 |
6,933 | Runtime Neural Pruning Ji Lin∗ Department of Automation Tsinghua University lin-j14@mails.tsinghua.edu.cn Yongming Rao∗ Department of Automation Tsinghua University raoyongming95@gmail.com Jiwen Lu Department of Automation Tsinghua University lujiwen@tsinghua.edu.cn Jie Zhou Department of Automation Tsinghua University jzhou@tsinghua.edu.cn Abstract In this paper, we propose a Runtime Neural Pruning (RNP) framework which prunes the deep neural network dynamically at the runtime. Unlike existing neural pruning methods which produce a fixed pruned model for deployment, our method preserves the full ability of the original network and conducts pruning according to the input image and current feature maps adaptively. The pruning is performed in a bottom-up, layer-by-layer manner, which we model as a Markov decision process and use reinforcement learning for training. The agent judges the importance of each convolutional kernel and conducts channel-wise pruning conditioned on different samples, where the network is pruned more when the image is easier for the task. Since the ability of network is fully preserved, the balance point is easily adjustable according to the available resources. Our method can be applied to off-the-shelf network structures and reach a better tradeoff between speed and accuracy, especially with a large pruning rate. 1 Introduction Deep neural networks have been proven to be effective in various areas. Despite the great success, the capability of deep neural networks comes at the cost of huge computational burdens and large power consumption, which is a big challenge for real-time deployments, especially for embedded systems. To address this, several neural pruning methods have been proposed [11, 12, 13, 25, 38] to reduce the parameters of convolutional networks, which achieve competitive or even slightly better performance. However, these works mainly focus on reducing the number of network weights, which have limited effects on speeding up the computation. More specifically, fully connected layers are proven to be more redundant and contribute more to the overall pruning rate, while convolutional layers are the most computationally dense part of the network. Moreover, such pruning strategy usually leads to an irregular network structure, i.e. with part of sparsity in convolution kernels, which needs a special algorithm for speeding up and is hard to harvest actual computational savings. A surprisingly effective approach to trade accuracy for the size and the speed is to simply reduce the number of channels in each convolutional layer. For example, Changpinyo et al. [27] proposed a method to speed up the network by deactivating connections between filters in convolutional layers, achieving a better tradeoff between the accuracy and the speed. All these methods above prune the network in a fixed way, obtaining a static model for all the input images. However, it is obvious that some of the input sample are easier for recognition, which can be ∗indicates equal contribution 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. recognized by simple and fast models. Some other samples are more difficult, which require more computational resources. This property is not exploited in previous neural pruning methods, where input samples are treated equally. Since some of the weights are lost during the pruning process, the network will lose the ability for some hard tasks forever. We argue that preserving the whole ability of the network and pruning the neural network dynamically according to the input image is desirable to achieve better speed and accuracy tradeoff compared to static pruning methods, which will also not harm the upper bound ability of the network. In this paper, we propose a Runtime Neural Pruning (RNP) framework by pruning the neural network dynamically at the runtime. Different from existing methods that produce a fixed pruned model for deployment, our method preserves the full ability of the original network and prunes the neural network according to the input image and current feature maps. More specifically, we model the pruning of each convolutional layer as a Markov decision process (MDP), and train an agent with reinforcement learning to learn the best policy for pruning. Since the whole ability of the original network is preserved, the balance point can be easily adjusted according to the available resources, thus one single trained model can be adjusted for various devices from embedded systems to large data centers. Experimental results on the CIFAR [22] and ImageNet [36] datasets show that our framework successfully learns to allocate different amount of computational resources for different input images, and achieves much better performance at the same cost. 2 Related Work Network pruning: There has been several works focusing on network pruning, which is a valid way to reduce the network complexity. For example, Hanson and Pratt [13] introduced hyperbolic and exponential biases to the pruning objective. Damage [25] and Surgeon [14] pruned the networks with second-order derivatives of the objective. Han et al. [11, 12] iteratively pruned near-zero weights to obtain a pruned network with no loss of accuracy. Some other works exploited more complicated regularizers. For example, [27, 44] introduced structured sparsity regularizers on the network weights, [32] put them to the hidden units. [17] pruned neurons based on the network output. Anwar et al. [2] considered channel-wise and kernel-wise sparsity, and proposed to use particle filters to decide the importance of connections and paths. Another aspect focuses on deactivating some subsets of connections inside a fixed network architecture. LeCun et al. [24] removed connections between the first two convolutional feature maps in a uniform manner. Depth multiplier method was proposed in [16] to reduce the number of filters in each convolutional layer by a factor in a uniform manner. These methods produced a static model for all the samples, failing to exploit the different property of input images. Moreover, most of them produced irregular network structures after pruning, which makes it hard to harvest actual computational savings directly. Deep reinforcement learning: Reinforcement learning [29] aims to enable the agent to decide the behavior from its experiences. Unlike conventional machine learning methods, reinforcement learning is supervised through the reward signals of actions. Deep reinforcement learning [31] is a combination of deep learning and reinforcement learning, which has been widely used in recent years. For examples, Mnih et al. [31] combined reinforcement learning with CNN and achieved the humanlevel performance in the Atari game. Caicedo et al. [8] introduced reinforcement learning for active object localization. Zhang et al. [45] employed reinforcement learning for vision control in robotics. Reinforcement learning is also adopted for feature selection to build a fast classifier. [4, 15, 21]. Dynamic network: Dynamic network structures and executions have been studied in previous works [7, 28, 33, 39, 40]. Some input-dependent execution methods rely on a pre-defined strategy. Cascade methods [26, 28, 39, 40] relied on manually-selected thresholds to control execution. Dynamic Capacity Network [1] used a specially designed method to calculate a saliency map for control execution. Other conditional computation methods activate part of a network under a learned policy. Begio et al. [6] introduced Stochastic Times Smooth neurons as gaters for conditional computation within a deep neural network, producing a sparse binary gater to be computed as a function of the input. [5] selectively activated output of a fully-connected neural network, according to a control policy parametrized as the sigmoid of an affine transformation from last activation. Liu et al. [30] proposed Dynamic Deep Neural Networks (D2NN), a feed-forward deep neural network that allows selective execution with self-defined topology, where the control policy is learned using single step reinforcement learning. 2 encoder RNN conv kernels Ki-1 feature maps Fi-1 decoder global pooling prune encoder decoder global pooling prune ... calculated pruned feature maps Fi feature maps Fi+1 conv kernels Ki Figure 1: Overall framework of our RNP. RNP consists of two sub-networks: the backbone CNN network and the decision network. The convolution kernels of backbone CNN network are dynamically pruned according to the output Q-value of decision network, conditioned on the state forming from the last calculated feature maps. 3 Runtime Neural Pruning The overall framework of our RNP is shown in Figure 1. RNP consists of two sub-networks, the backbone CNN network and the decision network which decides how to prune the convolution kernels conditioned on the input image and current feature maps. The backbone CNN network can be any kinds of CNN structure. Since convolutional layers are the most computationally dense layers in a CNN, we focus on the pruning of convolutional layers in this work, leaving fully connected layers as a classifier. 3.1 Bottom-up Runtime Pruning We denote the backbone CNN with m convolutional layers as C, with convolutional layers denoted as C1, C2, ..., Cm, whose kernels are K1, K2, ..., Km, respectively, with number of channels as ni, i = 1, 2, ..., m. These convolutional layers produce feature maps F1, F2, ..., Fm as shown in Figure 1, with the size of ni × H × W, i = 1, 2, ..., m. The goal is to find and prune the redundant convolutional kernels in Ki+1, given feature maps Fi, i = 1, 2, ..., m −1, to reduce computation and achieve maximum performance simultaneously. Taking the i-th layer as an example, we denote our goal as the following objective: min Ki+1,h EFi[Lcls(conv(Fi, K[h(Fi)])) + Lpnt(h(Fi))], (1) where Lcls is the loss of the classification task, Lpnt is the penalty term representing the tradeoff between the speed and the accuracy, h(Fi) is the conditional pruning unit that produces a list of indexes of selected kernels according to input feature map, K[·] is the indexing operation for kernel pruning and conv(x1, x2) is the convolutional operation for input feature map x1 and kernel x2. Note that our framework infers through standard convolutional layer after pruning, which can be easily boosted by utilizing GPU-accelerated neural network library such as cuDNN [9]. To solve the optimization problem in (1), we divide the whole problem into two sub-problems of {K} and h, and adopt an alternate training strategy to solve each sub-problem independently with the neural network optimizer such as RMSprop [42]. For an input sample, there are totally m decisions of pruning to be made. A straightforward idea is using the optimized decisions under certain penalty to supervise the decision network. However, for a backbone CNN with m layers, the time complexity of collecting the supervised signal is O(Qm i=1 nm), which is NP-hard and unacceptable for prevalent very deep architecture such as 3 VGG [37] and ResNet [3]. To simplify the training problem, we employ the following two strategies: 1) model the network pruning as a Markov decision process (MDP) [34] and train the decision network by reinforcement learning; 2) redefine the action of pruning to reduce the number of decisions. 3.2 Layer-by-layer Markov Decision Process The decision network consists of an encoder-RNN-decoder structure, where the encoder E embeds feature map Fi into fixed-length code, RNN R aggregates codes from previous stages, and the decoder D outputs the Q-value of each action. We formulate key elements in Markov decision process (MDP) based on the decision network to adopt deep Q-learning in our RNP framework as follows. State: Given feature map Fi, we first extract a dense feature embedding pFi with global pooling, as commonly conducted in [10, 35], whose length is ni. Since the number of channels for different convolutional layers are different, the length of pFi varies. To address this, we use the encoder E (a fully connected layer) to project the pooled feature into a fixed-length embedding E(pFi). E(pFi) from different layers are associated in a bottom-up way with a RNN structure, which produces a latent code R(E(pFi)), regarded as embedded state information for reinforcement learning. The decoder (also a fully connected layer) produces the Q-value for decision. Action: The actions for each pruning are defined in an incremental way. For convolution kernel Ki with ni output channels, we determine which output channels are calculated and which to prune. To simplify the process, we group the output feature maps into k sets, denoted as F′ 1, F′ 2, ..., F′ k. One extreme case is k = ni, where one single output channel forms a set. The actions a1, a2, ..., ak are defined as follows: taking actions ai yields calculating the feature map groups F′ 1, F′ 2, ..., F′ i, i = 1, 2, ..., k. Hence the feature map groups with lower index are calculated more, and the higher indexed feature map groups are calculated only when the sample is difficult enough. Specially, the first feature map group is always calculated, which we mention as base feature map group. Since we do not have state information for the first convolutional layer, it is not pruned, with totally m −1 actions to take. Though the definitions of actions are rather simple, one can easily extend the definition for more complicated network structures. Like Inception [41] and ResNet [3], we define the action based on unit of a single block by sharing pruning rate inside the block, which is more scalable and can avoid considering about the sophisticated structures. Reward: The reward of each action taken at the t-th step with action ai is defined as: rt(ai) = −αLcls + (i −1) × p, if inference terminates (t = m −1), (i −1) × p, otherwise (t < m −1) (2) where p is a negative penalty that can be manually set. The reward was set according to the loss for the original task. We took the negative loss −αLcls as the final reward so that if a task is completed better, the final reward of the chain will be higher, i.e., closer to 0. α is a hyper-parameter to rescale Lcls into a proper range, since Lcls varies a lot for different network structures and different tasks. Taking actions that calculate more feature maps, i.e., with higher i, will bring higher penalty due to more computations. For t = 1, ..., m −2, the reward is only about the computation penalty, while at the last step, the chain will get a final reward of −αLcls to assess how well the pruned network completes the task. The key step of the Markov decision model is to decide the best action at certain state. In other words, it is to find the optimal decision policy. By introducing the Q-learning method [31, 43], we define Q(ai, st) as the expectation value of taking action ai at state st. So the policy is defined as π = argmaxaiQ(ai, st). Therefore, the optimal action-value function can be written as: Q(st, ai) = max π E[rt + γrt+1 + γ2rt+2 + ...|π], (3) where γ is the discount factor in Q-learning, providing a tradeoff between the immediate reward and the prediction of future rewards. We use the decision network to approximate the expected Q-value Q∗(st, ai), with all the decoders sharing parameters and outputting a k-length vector, each representing the Q∗of corresponding action. If the estimation is optimal, we will have Q∗(st, ai) = Q(st, ai) exactly. 4 According to the Bellman equation [3], we adopt the squared mean error (MSE) as a criterion for training to keep decision network self-consistent. So we rewrite the objective for sub-problem of h in optimization problem 1 as: min θ Lre = E[r(st, ai) + γ max ai Q(st+1, ai) −Q(st, ai)]2, (4) where θ is the weights of decision network. In our proposed framework, a series of states are created for an given input image. And the training is conducted using ϵ-greedy strategy that selects actions following π with probability ϵ and select random actions with probability 1 −ϵ, while inference is conducted greedily. The backbone CNN network and decision network is trained alternately. Algorithm 1 details the training procedure of the proposed method. Algorithm 1 Runtime neural pruning for solving optimization problem (1): Input: training set with labels {X} Output: backbone CNN C, decision network D 1: initialize: train C in normal way or initialize C with pre-trained model 2: for i ←1, 2, ..., M do 3: // train decision network 4: for j ←1, 2, ..., N1 do 5: Sample random minibatch from {X} 6: Forward and sample ϵ-greedy actions {st, at} 7: Compute corresponding rewards {rt} 8: Backward Q values for each stage and generate ∇θLre 9: Update θ using ∇θLre 10: end for 11: // fine-tune backbone CNN 12: for k ←1, 2, ..., N2 do 13: Sample random minibatch from {X} 14: Forward and calculate Lcls after runtime pruning by D 15: Backward and generate ∇CLcls 16: Update C using ∇CLcls 17: end for 18: end for 19: return C and D It is worth noticing that during the training of agent, we manually set a fixed penalty for different actions and reach a balance status. While during deployment, we can adjust the penalty by compensating the output Q∗of each action with relative penalties accordingly to switch between different balance point of accuracy and computation costs, since penalty is input-independent. Thus one single model can be deployed to different systems according to the available resources. 4 Experiments We conducted experiments on three different datasets including CIFAR-10, CIFAR-100 [22] and ILSVRC2012 [36] to show the effectiveness of our method. For CIFAR-10, we used a four convolutional layer network with 3 × 3 kernels. For CIFAR-100 and ILSVRC2012, we used the VGG-16 network for evaluation. For results on the CIFAR dataset, we compared the results obtained by our RNP and naive channel reduction methods. For results on the ILSVRC2012 dataset, we compared the results achieved by our RNP with recent state-of-the-art network pruning methods. 4.1 Implementation Details We trained RNP in an alternative manner, where the backbone CNN network and the decision network were trained iteratively. To help the training converge faster, we first initialized the CNN with random pruning, where decisions were randomly made. Then we fixed the CNN parameters and trained the decision network, regarding the backbone CNN as a environment, where the agent can take actions and get corresponding rewards. We fixed the decision network and fine-tuned the backbone CNN following the policy of the decision network, which helps CNN specialize in a specific task. The 5 initialization was trained using SGD, with an initial learning rate 0.01, decay by a factor of 10 after 120, 160 epochs, with totally 200 epochs in total. The other training progress was conducted using RMSprop [42] with the learning rate of 1e-6. For the ϵ-greedy strategy, the hyper-parameter ϵ was annealed linearly from 1.0 to 0.1 in the beginning and fixed at 0.1 thereafter. For most experiments, we set the number of convolutional group to k = 4, which is a tradeoff between the performance and the complicity. Increasing k will enable more possible pruning combinations, while at the same time making it harder for reinforcement learning with an enlarged action space. Since the action is taken conditioned on the current feature map, the first convolutional layer is not pruned, where we have totally m −1 decisions to make, forming a decision sequence. During the training, we set the penalty for extra feature map calculation as p = −0.1, which is adjusted during the deployment. The scale α factor was set such that the average αLcls is approximately 1 to make the relative difference more significant. For experiments on VGG-16 model, we define the actions based on unit of a single block by sharing pruning rate inside the block as mentioned in Section 3.2 to simplify implementation and accelerate convergence. For vanilla baseline methods comparison on CIFAR, we evaluated the performance of normal neural network with the same computations. More specifically, we calculated the average number of multiplications of every convolution layer and rounded it up to the nearest number of channels sharing same computations, which resulted in an identical network topology with reduced convolutional channels. We trained the vanilla baseline network with the SGD until convergence for comparison. All our experiments were implemented using the modified Caffe toolbox [20]. 4.2 Intuitive Experiments To have an intuitive understanding of our framework, we first conducted a simple experiment to show the effectiveness and undergoing logic of our RNP. We considered a 3-category classification problem, consisting of male faces, female faces and background samples. It is intuitive to think that separating male faces from female faces is a much more difficult task than separating faces from background, needing more detailed attention, so more resources should be allocated to face images than background images. In other words, a good tradeoff for RNP is to prune the neural network more when dealing with background images and keep more convolutional channels when inputting a face image. To validate this idea, we constructed a 3-category dataset using Labeled Faces in the Wild [18] dataset, which we referred to as LFW-T. More specifically, we randomly cropped 3000 images for both male and female faces, and also 3000 background images randomly cropped from LFW. We used the attributes from [23] as labels for male and female faces. All these images were resized to 32 × 32 pixels. We held out 2000 images for testing and the remaining for training. For this experiment, we designed a 3-layer convolutional network with two fully connected layers. All convolutional kernels are 3 × 3 and with 32, 32, 64 output channels respectively. We followed the same training protocol as mentioned above with p = 0.1, and focused on the difference between different classes. The original network achieved 91.1% accuracy. By adjusting the penalty, we managed to get a certain point of accuracy-computation tradeoff, where computations (multiplications) were reduced by a factor of 2, while obtaining even slightly higher accuracy of 91.75%. We looked into the average computations of different classes by counting multiplications of convolutional layers. The results were shown in Figure 2. For the whole network, RNP allocated more computations on faces images than background images, at approximately a ratio of 2, which clearly demonstrates the effectiveness of RNP. However, since the first convolutional layers and fully connected layers were not pruned, to get the absolute ratio of pruning rate, we also studied the pruning of a certain convolutional layer. In this case, we selected the last convolutional layer conv3. The results are shown on the right figure. We see that for this certain layer, computations for face images are almost 5 times of background images. The differences in computations show that RNP is able to find the relative difficulty of different tasks and exploit such property to prune the neural network accordingly. 4.3 Results CIFAR-10 & CIFAR-100: For CIFAR-10 and CIFAR-100, we used a four-layer convolutional network and the VGG-16 network for experiments, respectively. The goal of these two experiments is to compare our RNP with vanilla baseline network, where the number of convolutional layers was 6 0 0.1 0.2 0.3 0.4 0.5 0.6 Average Male Female Background #Multiply (mil.) Average Mults. of Conv3 (original: 1.180M mults.) 0 0.5 1 1.5 2 2.5 3 Average Male Female Background #Multiply (mil.) Average Mults. of Whole Network (original: 4.950M mults.) (a) (b) Figure 2: The average multiplication numbers of different classes in our intuitive experiment. We show the computation numbers for both the whole network (on the left) and the fully pruned convolutional layer conv3 (on the right). The results show that RNP succeeds to focus more on faces images by preserving more convolutional channels while prunes the network more when dealing with background images, reaching a good tradeoff between accuracy and speed. 0 5 10 15 20 25 #Multiply (mil.) 0.72 0.74 0.76 0.78 0.8 0.82 0.84 0.86 Accuracy (%) RNP vanilla 0 100 200 300 400 #Multiply (mil.) 0.52 0.54 0.56 0.58 0.6 0.62 0.64 0.66 Accuracy (%) RNP vanilla Figure 3: The results on CIFAR-10 (on the left) and CIFAR-100 (on the right). For vanilla curve, the rightmost point is the full model and the leftmost is the 1 4 model. RNP outperforms naive channel reduction models consistently by a very large margin. reduced directly from the beginning. The fully connected layers of standard VGG-16 are too redundant for CIFAR-100, so we eliminated one of the fully connected layer and set the inner dimension as 512. The modified VGG-16 model was easier to converge and actually slightly outperformed the original model on CIFAR-100. The results are shown in Figure 3. We see that for vanilla baseline method, the accuracy suffered from a stiff drop when computations savings were than 2.5 times. While our RNP consistently outperformed the baseline model, and achieved competitive performance even with a very large computation saving rate. ILSVRC2012: We compared our RNP with recent state-of-the-art neural pruning methods [19, 27, 46] on the ImageNet dataset using the VGG-16 model, which won the 2-nd place in ILSVRC2014 challenge. We evaluated the top-5 error using single-view testing on ILSVRC2012-val set and trained RNP model using ILSVRC2012-train set. The view was the center 224×224 region cropped from the Table 1: Comparisons of increase of top-5 error on ILSVRC2012-val (%) with recent state-of-the-art methods, where we used 10.1% top-5 error baseline as the reference. Speed-up 3× 4× 5× 10× Jaderberg et al. [19] ([46]’s implementation) 2.3 9.7 29.7 Asymmetric [46] 3.84 Filter pruning [27] (our implementation) 3.2 8.6 14.6 Ours 2.32 3.23 3.58 4.89 7 Figure 4: Visualization of the original images and the feature maps of four convolutional groups, respectively. The presented feature maps are the average of corresponding convolutional groups. Table 2: GPU inference time under different theoretical speed-up ratios on ILSVRC2012-val set. Speed-up solution Increase of top-5 error (%) Mean inference time (ms) VGG-16 (1×) 0 3.26 (1.0×) Ours (3×) 2.32 1.38 (2.3×) Ours (4×) 3.23 1.07 (3.0×) Ours (5×) 3.58 0.880 (3.7×) Ours (10×) 4.89 0.554 (5.9×) resized images whose shorter side is 256 by following [46]. RNP was fine-tuned based on the public available model 2 which achieves 10.1% top-5 error on ILSVRC2012-val set. Results are shown in Table 1, where speed-up is the theoretical speed-up ratio computed by the complexity. We see that RNP achieves similar performance with a relatively small speed-up ratio with other methods and outperforms other methods by a significant margin with a large speed-up ratio. We further conducted our experiments on larger ratio (10×) and found RNP only suffered slight drops (1.31% compared to 5×), far beyond others’ results on 5× setting. 4.4 Analysis Analysis of Feature Maps: Since we define the actions in an incremental way, the convolutional channels of lower index are calculated more (a special case is the base network that is always calculated). The convolutional groups with higher index are increments to the lower-indexed ones, so the functions of different convolution groups might be similar to "low-frequency" and "highfrequency" filters. We visualized different functions of convolutional groups by calculating average feature maps produced by each convolutional group. Specially, we took CIFAR-10 as example and visualized the feature maps of conv2 with k = 4. The results are shown in Figure 4. From the figure, we see that the base convolutional groups have highest activations to the input images, which can well describe the overall appearance of the object. While convolutional groups with higher index have sparse activations, which can be considered as a compensation to the base convolutional groups. So the undergoing logic of RNP is to judge when it is necessary to compensate the base convolutional groups with higher ones: if tasks are easy, RNP will prune the high-order feature maps for speed, otherwise bring in more computations to pursue accuracy. Runtime Analysis: One advantage of our RNP is its convenience for deployment, which makes it easy to harvest actual computational time savings. Therefore, we measured the actual runtime under GPU acceleration, where we measured the actual inference time for VGG-16 on ILSVRC2012-val set. Inference time were measured on a Titan X (Pascal) GPU with batch size 64. Table 2 shows the GPU inference time of different settings. We see that our RNP generalizes well on GPU. 2http://www.robots.ox.ac.uk/~vgg/research/very_deep/ 8 5 Conclusion In this paper, we have proposed a Runtime Neural Pruning (RNP) framework to prune the neural network dynamically. Since the ability of network is fully preserved, the balance point is easily adjustable according to the available resources. Our method can be applied to off-the-shelf network structures and reaches a better tradeoff between speed and accuracy. Experimental results demonstrated the effectiveness of the proposed approach. Acknowledgements We would like to thank Song Han, Huazhe (Harry) Xu, Xiangyu Zhang and Jian Sun for their generous help and insightful advice. This work is supported by the National Natural Science Foundation of China under Grants 61672306 and the National 1000 Young Talents Plan Program. The corresponding author of this work is Jiwen Lu. References [1] Amjad Almahairi, Nicolas Ballas, Tim Cooijmans, Yin Zheng, Hugo Larochelle, and Aaron Courville. Dynamic capacity networks. arXiv preprint arXiv:1511.07838, 2015. [2] Sajid Anwar, Kyuyeon Hwang, and Wonyong Sung. Structured pruning of deep convolutional neural networks. arXiv preprint arXiv:1512.08571, 2015. [3] Richard Bellman. Dynamic programming and lagrange multipliers. PNAS, 42(10):767–769, 1956. [4] Djalel Benbouzid, Róbert Busa-Fekete, and Balázs Kégl. Fast classification using sparse decision dags. arXiv preprint arXiv:1206.6387, 2012. [5] Emmanuel Bengio, Pierre-Luc Bacon, Joelle Pineau, and Doina Precup. Conditional computation in neural networks for faster models. arXiv preprint arXiv:1511.06297, 2015. [6] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. [7] Tolga Bolukbasi, Joseph Wang, Ofer Dekel, and Venkatesh Saligrama. Adaptive neural networks for fast test-time prediction. arXiv preprint arXiv:1702.07811, 2017. [8] Juan C Caicedo and Svetlana Lazebnik. Active object localization with deep reinforcement learning. In ICCV, pages 2488–2496, 2015. [9] Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cudnn: Efficient primitives for deep learning. arXiv preprint arXiv:1410.0759, 2014. [10] Michael Figurnov, Maxwell D Collins, Yukun Zhu, Li Zhang, Jonathan Huang, Dmitry Vetrov, and Ruslan Salakhutdinov. Spatially adaptive computation time for residual networks. arXiv preprint arXiv:1612.02297, 2016. [11] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. [12] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In NIPS, pages 1135–1143, 2015. [13] Stephen José Hanson and Lorien Y Pratt. Comparing biases for minimal network construction with back-propagation. In NIPS, pages 177–185, 1989. [14] Babak Hassibi, David G Stork, et al. Second order derivatives for network pruning: Optimal brain surgeon. NIPS, pages 164–164, 1993. [15] He He, Jason Eisner, and Hal Daume. Imitation learning by coaching. In Advances in Neural Information Processing Systems, pages 3149–3157, 2012. [16] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 9 [17] Hengyuan Hu, Rui Peng, Yu-Wing Tai, and Chi-Keung Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016. [18] Gary B Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical report, Technical Report 07-49, University of Massachusetts, Amherst, 2007. [19] Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. arXiv preprint arXiv:1405.3866, 2014. [20] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [21] Sergey Karayev, Tobias Baumgartner, Mario Fritz, and Trevor Darrell. Timely object recognition. In Advances in Neural Information Processing Systems, pages 890–898, 2012. [22] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. [23] Neeraj Kumar, Alexander Berg, Peter N Belhumeur, and Shree Nayar. Describable visual attributes for face verification and image search. PAMI, 33(10):1962–1977, 2011. [24] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [25] Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In NIPS, pages 598–605, 1990. [26] Sam Leroux, Steven Bohez, Elias De Coninck, Tim Verbelen, Bert Vankeirsbilck, Pieter Simoens, and Bart Dhoedt. The cascading neural network: building the internet of smart things. Knowledge and Information Systems, pages 1–24, 2017. [27] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. [28] Haoxiang Li, Zhe Lin, Xiaohui Shen, Jonathan Brandt, and Gang Hua. A convolutional neural network cascade for face detection. In CVPR, pages 5325–5334, 2015. [29] Michael L Littman. Reinforcement learning improves behaviour from evaluative feedback. Nature, 521(7553):445–451, 2015. [30] Lanlan Liu and Jia Deng. Dynamic deep neural networks: Optimizing accuracy-efficiency trade-offs by selective execution. arXiv preprint arXiv:1701.00299, 2017. [31] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [32] Kenton Murray and David Chiang. Auto-sizing neural networks: With applications to n-gram language models. arXiv preprint arXiv:1508.05051, 2015. [33] Augustus Odena, Dieterich Lawson, and Christopher Olah. Changing model behavior at test-time using reinforcement learning. arXiv preprint arXiv:1702.07780, 2017. [34] Martin L Puterman. Markov decision processes: discrete stochastic dynamic programming. John Wiley & Sons, 2014. [35] 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. [36] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 115(3):211–252, 2015. [37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [38] Nikko Ström. Phoneme probability estimation with dynamic sparsely connected artificial neural networks. The Free Speech Journal, 5:1–41, 1997. 10 [39] Chen Sun, Manohar Paluri, Ronan Collobert, Ram Nevatia, and Lubomir Bourdev. Pronet: Learning to propose object-specific boxes for cascaded neural networks. In CVPR, pages 3485–3493, 2016. [40] Yi Sun, Xiaogang Wang, and Xiaoou Tang. Deep convolutional network cascade for facial point detection. In CVPR, pages 3476–3483, 2013. [41] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016. [42] Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2), 2012. [43] Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992. [44] Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In NIPS, pages 2074–2082, 2016. [45] Fangyi Zhang, Jürgen Leitner, Michael Milford, Ben Upcroft, and Peter Corke. Towards vision-based deep reinforcement learning for robotic motion control. arXiv preprint arXiv:1511.03791, 2015. [46] Xiangyu Zhang, Jianhua Zou, Kaiming He, and Jian Sun. Accelerating very deep convolutional networks for classification and detection. PAMI, 38(10):1943–1955, 2016. 11 | 2017 | 433 |
6,934 | Train longer, generalize better: closing the generalization gap in large batch training of neural networks Elad Hoffer∗, Itay Hubara∗, Daniel Soudry Technion - Israel Institute of Technology, Haifa, Israel {elad.hoffer, itayhubara, daniel.soudry}@gmail.com Abstract Background: Deep learning models are typically trained using stochastic gradient descent or one of its variants. These methods update the weights using their gradient, estimated from a small fraction of the training data. It has been observed that when using large batch sizes there is a persistent degradation in generalization performance - known as the "generalization gap" phenomenon. Identifying the origin of this gap and closing it had remained an open problem. Contributions: We examine the initial high learning rate training phase. We find that the weight distance from its initialization grows logarithmically with the number of weight updates. We therefore propose a "random walk on a random landscape" statistical model which is known to exhibit similar "ultra-slow" diffusion behavior. Following this hypothesis we conducted experiments to show empirically that the "generalization gap" stems from the relatively small number of updates rather than the batch size, and can be completely eliminated by adapting the training regime used. We further investigate different techniques to train models in the large-batch regime and present a novel algorithm named "Ghost Batch Normalization" which enables significant decrease in the generalization gap without increasing the number of updates. To validate our findings we conduct several additional experiments on MNIST, CIFAR-10, CIFAR-100 and ImageNet. Finally, we reassess common practices and beliefs concerning training of deep models and suggest they may not be optimal to achieve good generalization. 1 Introduction For quite a few years, deep neural networks (DNNs) have persistently enabled significant improvements in many application domains, such as object recognition from images (He et al., 2016); speech recognition (Amodei et al., 2015); natural language processing (Luong et al., 2015) and computer games control using reinforcement learning (Silver et al., 2016; Mnih et al., 2015). The optimization method of choice for training highly complex and non-convex DNNs, is typically stochastic gradient decent (SGD) or some variant of it. Since SGD, at best, finds a local minimum of the non-convex objective function, substantial research efforts are invested to explain DNNs ground breaking results. It has been argued that saddle-points can be avoided (Ge et al., 2015) and that "bad" local minima in the training error vanish exponentially (Dauphin et al., 2014; Choromanska et al., 2015; Soudry & Hoffer, 2017). However, it is still unclear why these complex models tend to generalize well to unseen data despite being heavily over-parameterized (Zhang et al., 2017). A specific aspect of generalization has recently attracted much interest. Keskar et al. (2017) focused on a long observed phenomenon (LeCun et al., 1998a) – that when a large batch size is used while 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. ∗Equal contribution (a) Training error (b) Validation error Figure 1: Impact of batch size on classification error training DNNs, the trained models appear to generalize less well. This remained true even when the models were trained "without any budget or limits, until the loss function ceased to improve" (Keskar et al., 2017). This decrease in performance has been named the "generalization gap". Understanding the origin of the generalization gap, and moreover, finding ways to decrease it, may have a significant practical importance. Training with large batch size immediately increases parallelization, thus has the potential to decrease learning time. Many efforts have been made to parallelize SGD for Deep Learning (Dean et al., 2012; Das et al., 2016; Zhang et al., 2015), yet the speed-ups and scale-out are still limited by the batch size. In this study we suggest a first attempt to tackle this issue. First, • We propose that the initial learning phase can be described using a high-dimensional "random walk on a random potential" process, with an "ultra-slow" logarithmic increase in the distance of the weights from their initialization, as we observe empirically. Inspired by this hypothesis, we find that • By simply adjusting the learning rate and batch normalization the generalization gap can be significantly decreased (for example, from 5% to 1% −2%). • In contrast to common practices (Montavon et al., 2012) and theoretical recommendations (Hardt et al., 2016), generalization keeps improving for a long time at the initial high learning rate, even without any observable changes in training or validation errors. However, this improvement seems to be related to the distance of the weights from their initialization. • There is no inherent "generalization gap": large-batch training can generalize as well as small batch training by adapting the number of iterations. 2 Training with a large batch Training method. A common practice of training deep neural networks is to follow an optimization "regime" in which the objective is minimized using gradient steps with a fixed learning rate and a momentum term (Sutskever et al., 2013). The learning rate is annealed over time, usually with an exponential decrease every few epochs of training data. An alternative to this regime is to use an adaptive per-parameter learning method such as Adam (Kingma & Ba, 2014), Rmsprop (Dauphin et al.) or Adagrad (Duchi et al., 2011). These methods are known to benefit the convergence rate of SGD based optimization. Yet, many current studies still use simple variants of SGD (Ruder, 2016) for all or part of the optimization process (Wu et al., 2016), due to the tendency of these methods to converge to a lower test error and better generalization. Thus, we focused on momentum SGD, with a fixed learning rate that decreases exponentially every few epochs, similarly to the regime employed by He et al. (2016). The convergence of SGD is also known to be affected by the batch size (Li et al., 2014), but in this work we will focus on generalization. Most of our results were conducted on the Resnet44 topology, introduced by He et al. (2016). We strengthen our findings with additional empirical results in section 6. 2 Empirical observations of previous work. Previous work by Keskar et al. (2017) studied the performance and properties of models which were trained with relatively large batches and reported the following observations: • Training models with large batch size increase the generalization error (see Figure 1). • This "generalization gap" seemed to remain even when the models were trained without limits, until the loss function ceased to improve. • Low generalization was correlated with "sharp" minima2 (strong positive curvature), while good generalization was correlated with "flat" minima (weak positive curvature). • Small-batch regimes were briefly noted to produce weights that are farther away from the initial point, in comparison with the weights produced in a large-batch regime. Their hypothesis was that a large estimation noise (originated by the use of mini-batch rather than full batch) in small mini-batches encourages the weights to exit out of the basins of attraction of sharp minima, and towards flatter minima which have better generalization.In the next section we provide an analysis that suggest a somewhat different explanation. 3 Theoretical analysis Notation. In this paper we examine Stochastic Gradient Descent (SGD) based training of a Deep Neural Network (DNN). The DNN is trained on a finite training set of N samples. We define w as the vector of the neural network parameters, and Ln (w) as loss function on sample n. We find w by minimizing the training loss. L (w) ≜1 N N X n=1 Ln (w) , using SGD. Minimizing L (w) requires an estimate of the gradient of the negative loss. g ≜1 N N X n=1 gn ≜−1 N N X n=1 ∇Ln (w) where g is the true gradient, and gn is the per-sample gradient. During training we increment the parameter vector w using only the mean gradient ˆg computed on some mini-batch B – a set of M randomly selected sample indices. ˆg ≜1 M X n∈B gn . In order to gain a better insight into the optimization process and the empirical results, we first examine simple SGD training, in which the weights at update step t are incremented according to the mini-batch gradient ∆wt = ηˆgt. With respect to the randomness of SGD, Eˆgt = g = −∇L (wt) , and the increments are uncorrelated between different mini-batches3. For physical intuition, one can think of the weight vector wt as a particle performing a random walk on the loss (“potential”) landscape L (wt). Thus, for example, adding momentum term to the increment is similar to adding inertia to the particle. Motivation. In complex systems (such as DNNs) where we do not know the exact shape of the loss, statistical physics models commonly assume a simpler description of the potential as a random process. For example, Dauphin et al. (2014) explained the observation that local minima tend to have 2It was later pointed out (Dinh et al., 2017) that certain "degenerate" directions, in which the parameters can be changed without affecting the loss, must be excluded from this explanation. For example, for any c > 0 and any neuron, we can multiply all input weights by c and divide the output weights by c: this does not affect the loss, but can generate arbitrarily strong positive curvature. 3Either exactly (with replacement) or approximately (without replacement): see appendix section A. 3 low error using an analogy between L (w), the DNN loss surface, and the high-dimensional Gaussian random field analyzed in Bray & Dean (2007), which has zero mean and auto-covariance E (L (w1) L (w2)) = f ∥w1 −w2∥2 (1) for some function f, where the expectation now is over the randomness of the loss. This analogy resulted with the hypothesis that in DNNs, local minima with high loss are indeed exponentially vanishing, as in Bray & Dean (2007). Only recently, similar results are starting to be proved for realistic neural network models (Soudry & Hoffer, 2017). Thus, a similar statistical model of the loss might also give useful insights for our empirical observations. Model: Random walk on a random potential. Fortunately, the high dimensional case of a particle doing a “random walk on a random potential” was extensively investigated already decades ago (Bouchaud & Georges, 1990). The main result of that investigation was that the asymptotic behavior of the auto-covariance of a random potential4, E (L (w1) L (w2)) ∼∥w1 −w2∥α , α > 0 (2) in a certain range, determines the asymptotic behavior of the random walker in that range: E ∥wt −w0∥2 ∼(log t) 4 α . (3) This is called an “ultra-slow diffusion” in which, typically ∥wt −w0∥∼(log t)2/α , in contrast to standard diffusion (on a flat potential), in which we have ∥wt −w0∥∼ √ t . The informal reason for this behavior (for any α > 0), is that for a particle to move a distance d, it has to pass potential barriers of height ∼dα/2, from eq. (2). Then, to climb (or go around) each barrier takes exponentially long time in the height of the barrier: t ∼exp(dα/2). Inverting this relation, we get eq. d ∼(log(t))2/α. In the high-dimensional case, this type of behavior was first shown numerically and explained heuristically by Marinari et al. (1983), then rigorously proven for the case of a discrete lattice by Durrett (1986), and explained in the continuous case by Bouchaud & Comtet (1987). 3.1 Comparison with empirical results and implications To examine this prediction of ultra slow diffusion and find the value of α, in Figure 2a, we examine ∥wt −w0∥during the initial training phase over the experiment shown in Figure 1. We found that the weight distance from initialization point increases logarithmically with the number of training iterations (weight updates), which matches our model with α = 2: ∥wt −w0∥∼log t . (4) Interestingly, the value of α = 2 matches the statistics of the loss estimated in appendix section B. Moreover, in Figure 2a, we find that a very similar logarithmic graph is observed for all batch sizes. Yet, there are two main differences. First, each graph seems to have a somewhat different slope (i.e., it is multiplied by different positive constant), which peaks at M = 128 and then decreases with the mini-batch size. This indicates a somewhat different diffusion rate for different batch sizes. Second, since we trained all models for a constant number of epochs, smaller batch sizes entail more training iterations in total. Thus, there is a significant difference in the number of iterations and the corresponding weight distance reached at the end of the initial learning phase. This leads to the following informal argument (which assumes flat minima are indeed important for generalization). During the initial training phase, to reach a minima of "width" d the weight vector wt has to travel at least a distance d, and this takes a long time – about exp(d) iterations. Thus, to reach wide ("flat") minima we need to have the highest possible diffusion rates (which do not result in numerical instability) and a large number of training iterations. In the next sections we will implement these conclusions in practice. 4 Matching weight increment statistics for different mini-batch sizes First, to correct the different diffusion rates observed for different batch sizes, we will aim to match the statistics of the weights increments to that of a small batch size. 4Note that this form is consistent with eq. (1), if f (x) = xα/2. 4 (a) Before learning rate adjustment and GBN (b) After learning rate adjustment and GBN Figure 2: Euclidean distance of weight vector from initialization Learning rate. Recall that in this paper we investigate SGD, possibly with momentum, where the weight updates are proportional to the estimated gradient. ∆w ∝ηˆg , (5) where η is the learning rate, and we ignore for now the effect of batch normalization. In appendix section A, we show that the covariance matrix of the parameters update step ∆w is, cov (∆w, ∆w) ≈η2 M 1 N N X n=1 gng⊤ n ! (6) in the case of uniform sampling of the mini-batch indices (with or without replacement), when M ≪N. Therefore, a simple way to make sure that the covariance matrix stays the same for all mini-batch sizes is to choose η ∝ √ M , (7) i.e., we should increase the learning rate by the square root of the mini-batch size. We note that Krizhevsky (2014) suggested a similar learning rate scaling in order to keep the variance in the gradient expectation constant, but chose to use a linear scaling heuristics as it reached better empirical result in his setting. Later on, Li (2017) suggested the same. Naturally, such an increase in the learning rate also increases the mean steps E [∆w]. However, we found that this effect is negligible since E [∆w] is typically orders of magnitude lower than the standard deviation. Furthermore, we can match both the first and second order statistics by adding multiplicative noise to the gradient estimate as follows: ˆg = 1 M N X n∈B gnzn , where zn ∼N 1, σ2 are independent random Gaussian variables for which σ2 ∝M. This can be verified by using similar calculation as in appendix section A. This method keeps the covariance constant when we change the batch size, yet does not change the mean steps E [∆w]. In both cases, for the first few iterations, we had to clip or normalize the gradients to prevent divergence. Since both methods yielded similar performance 5 (due the negligible effect of the first order statistics), we preferred to use the simpler learning rate method. It is important to note that other types of noise (e.g., dropout (Srivastava et al., 2014), dropconnect (Wan et al., 2013), label noise (Szegedy et al., 2016)) change the structure of the covariance matrix and not just its scale, thus the second order statistics of the small batch increment cannot be accurately matched. Accordingly, we did not find that these types of noise helped to reduce the generalization gap for large batch sizes. Lastly, note that in our discussion above (and the derivations provided in appendix section A) we assumed each per-sample gradient gn does not depend on the selected mini-batch. However, this ignores the influence of batch normalization. We take this into consideration in the next subsection. 5a simple comparison can be seen in appendix (figure 3) 5 Ghost Batch Normalization. Batch Normalization (BN) (Ioffe & Szegedy, 2015), is known to accelerate the training, increase the robustness of neural network to different initialization schemes and improve generalization. Nonetheless, since BN uses the batch statistics it is bounded to depend on the choosen batch size. We study this dependency and observe that by acquiring the statistics on small virtual ("ghost") batches instead of the real large batch we can reduce the generalization error. In our experiments we found out that it is important to use the full batch statistic as suggested by (Ioffe & Szegedy, 2015) for the inference phase. Full details are given in Algorithm 1. This modification by itself reduce the generalization error substantially. Algorithm 1: Ghost Batch Normalization (GBN), applied to activation x over a large batch BL with virtual mini-batch BS. Where BS < BL. Require: Values of x over a large-batch: BL = {x1...m} size of virtual batch |BS|; Parameters to be learned: γ, β, momentum η Training Phase: Scatter BL to {X1, X2, ...X|BL|/|BS|} = {x1...|BS|, x|BS|+1...2|BS|...x|BL|−|BS|...m} µl B ← 1 |BS| P|BS| i=1 Xl i for l = 1, 2, 3 . . . {calculate ghost mini-batches means} σl B ← q 1 |BS| P|BS| i=1 (Xl i −µB)2 + ϵ for l = 1, 2, 3 . . . {calculate ghost mini-batches std} µrun = (1 −η)|BS|µrun + P|BL|/|BS| i=1 (1 −η)i · η · µl B σrun = (1 −η)|BS|σrun + P|BL|/|BS| i=1 (1 −η)i · η · σl B return γ Xl−µl B σl B + β Test Phase: return γ X−µl run σrun + β {scale and shift} We note that in a multi-device distributed setting, some of the benefits of "Ghost BN" may already occur, since batch-normalization is often preformed on each device separately to avoid additional communication cost. Thus, each device computes the batch norm statistics using only its samples (i.e., part of the whole mini-batch). It is a known fact, yet unpublished, to the best of the authors knowledge, that this form of batch norm update helps generalization and yields better results than computing the batch-norm statistics over the entire batch. Note that GBN enables flexibility in the small (virtual) batch size which is not provided by the commercial frameworks (e.g., TensorFlow, PyTorch) in which the batch statistics is calculated on the entire, per-device, batch. Moreover, in those commercial frameworks, the running statistics are usually computed differently from "Ghost BN", by weighting each update part equally. In our experiments we found it to worsen the generalization performance. Implementing both the learning rate and GBN adjustments seem to improve generalization performance, as we shall see in section 6. Additionally, as can be seen in Figure 6, the slopes of the logarithmic weight distance graphs seem to better matched, indicating similar diffusion rates. We also observe some constant shift, which we believe is related to the gradient clipping. Since this shift only increased the weight distances, we assume it does not harm the performance. 5 Adapting number of weight updates eliminates generalization gap According to our conclusions in section 3, the initial high-learning rate training phase enables the model to reach farther locations in the parameter space, which may be necessary to find wider local minima and better generalization. Examining figure 2b, the next obvious step to match the graphs for different batch sizes is to increase the number of training iterations in the initial high learning rate regime. And indeed we noticed that the distance between the current weight and the initialization point can be a good measure to decide upon when to decrease the learning rate. Note that this is different from common practices. Usually, practitioners decrease the learning rate after validation error appears to reach a plateau. This practice is due to the long-held belief that the optimization process should not be allowed to decrease the training error when validation error "flatlines", for fear of overfitting (Girosi et al., 1995). However, we observed that substantial improvement to the final accuracy can be obtained by continuing the optimization using the same 6 (a) Validation error (b) Validation error - zoomed Figure 3: Comparing generalization of large-batch regimes, adapted to match performance of smallbatch training. learning rate even if the training error decreases while the validation plateaus. Subsequent learning rate drops resulted with a sharp validation error decrease, and better generalization for the final model. These observations led us to believe that "generalization gap" phenomenon stems from the relatively small number of updates rather than the batch size. Specifically, using the insights from Figure 2 and our model, we adapted the training regime to better suit the usage of large mini-batch. We "stretched" the time-frame of the optimization process, where each time period of e epochs in the original regime, will be transformed to |BL| |BS|e epochs according to the mini-batch size used. This modification ensures that the number of optimization steps taken is identical to those performed in the small batch regime. As can be seen in Figure 3, combining this modification with learning rate adjustment completely eliminates the generalization gap observed earlier 6. 6 Experiments Experimental setting. We experimented with a set of popular image classification tasks: • MNIST (LeCun et al., 1998b) - Consists of a training set of 60K and a test set of 10K 28 × 28 gray-scale images representing digits ranging from 0 to 9. • CIFAR-10 and CIFAR-100 (Krizhevsky, 2009) - Each consists of a training set of size 50K and a test set of size 10K. Instance are 32 × 32 color images representing 10 or 100 classes. • ImageNet classification task Deng et al. (2009) - Consists of a training set of size 1.2M samples and test set of size 50K. Each instance is labeled with one of 1000 categories. To validate our findings, we used a representative choice of neural network models. We used the fully-connected model, F1, as well as shallow convolutional models C1 and C3 suggested by Keskar et al. (2017). As a demonstration of more current architectures, we used the models: VGG (Simonyan, 2014) and Resnet44 (He et al., 2016) for CIFAR10 dataset, Wide-Resnet16-4 (Zagoruyko, 2016) for CIFAR100 dataset and Alexnet (Krizhevsky, 2014) for ImageNet dataset. In each of the experiments, we used the training regime suggested by the original work, together with a momentum SGD optimizer. We use a batch of 4096 samples as "large batch" (LB) and a small batch (SB) of either 128 (F1,C1,VGG,Resnet44,C3,Alexnet) or 256 (WResnet). We compare the original training baseline for small and large batch, as well as the following methods7: • Learning rate tuning (LB+LR): Using a large batch, while adapting the learning rate to be larger so that ηL = q |BL| |BS|ηS where ηS is the original learning rate used for small batch, ηL is the adapted learning rate and |BL|, |BS| are the large and small batch sizes, respectively. • Ghost batch norm (LB+LR+GBN): Additionally using the "Ghost batch normalization" method in our training procedure. The "ghost batch size" used is 128. • Regime adaptation: Using the tuned learning rate as well as ghost batch-norm, but with an adapted training regime. The training regime is modified to have the same number of 6Additional graphs, including comparison to non-adapted regime, are available in appendix (figure 2). 7Code is available at https://github.com/eladhoffer/bigBatch. 7 iterations for each batch size used - effectively multiplying the number of epochs by the relative size of the large batch. Results. Following our experiments, we can establish an empirical basis to our claims. Observing the final validation accuracy displayed in Table 1, we can see that in accordance with previous works the move from a small-batch (SB) to a large-batch (LB) indeed incurs a substantial generalization gap. However, modifying the learning-rate used for large-batch (+LR) causes much of this gap to diminish, following with an additional improvement by using the Ghost-BN method (+GBN). Finally, we can see that the generalization gap completely disappears when the training regime is adapted (+RA), yielding validation accuracy that is good-as or better than the one obtained using a small batch. We additionally display results obtained on the more challenging ImageNet dataset in Table 2 which shows similar impact for our methods. Table 1: Validation accuracy results, SB/LB represent small and large batch respectively. GBN stands for Ghost-BN, and RA stands for regime adaptation Network Dataset SB LB +LR +GBN +RA F1 (Keskar et al., 2017) MNIST 98.27% 97.05% 97.55% 97.60% 98.53% C1 (Keskar et al., 2017) Cifar10 87.80% 83.95% 86.15% 86.4% 88.20% Resnet44 (He et al., 2016) Cifar10 92.83% 86.10% 89.30% 90.50% 93.07% VGG (Simonyan, 2014) Cifar10 92.30% 84.1% 88.6% 91.50% 93.03% C3 (Keskar et al., 2017) Cifar100 61.25% 51.50% 57.38% 57.5% 63.20% WResnet16-4 (Zagoruyko, 2016) Cifar100 73.70% 68.15% 69.05% 71.20% 73.57% Table 2: ImageNet top-1 results using Alexnet topology (Krizhevsky, 2014), notation as in Table 1. Network LB size Dataset SB LB8 +LR8 +GBN +RA Alexnet 4096 ImageNet 57.10% 41.23% 53.25% 54.92% 59.5% Alexnet 8192 ImageNet 57.10% 41.23% 53.25% 53.93% 59.5% 7 Discussion There are two important issues regarding the use of large batch sizes. First, why do we get worse generalization with a larger batch, and how do we avoid this behaviour? Second, can we decrease the training wall clock time by using a larger batch (exploiting parallelization), while retaining the same generalization performance as in small batch? This work tackles the first issue by investigating the random walk behaviour of SGD and the relationship of its diffusion rate to the size of a batch. Based on this and empirical observations, we propose simple set of remedies to close down the generalization gap between the small and large batch training strategies: (1) Use SGD with momentum, gradient clipping, and a decreasing learning rate schedule; (2) adapt the learning rate with batch size (we used a square root scaling); (3) compute batch-norm statistics over several partitions ("ghost batch-norm"); and (4) use a sufficient number of high learning rate training iterations. Thus, the main point arising from our results is that, in contrast to previous conception, there is no inherent generalization problem with training using large mini batches. That is, model training using large mini-batches can generalize as well as models trained using small mini-batches. Though this answers the first issues, the second issue remained open: can we speed up training by using large batch sizes? Not long after our paper first appeared, this issue was also answered. Using a Resnet model on Imagenet Goyal et al. (2017) showed that, indeed, significant speedups in training could be achieved using a large batch size. This further highlights the ideas brought in this work and their importance to future scale-up, especially since Goyal et al. (2017) used similar training practices to those we 8 Due to memory limitation those experiments were conducted with batch of 2048. 8 described above. The main difference between our works is the use of a linear scaling of the learning rate9, similarly to Krizhevsky (2014), and as suggested by Bottou (2010). However, we found that linear scaling works less well on CIFAR10, and later work found that linear scaling rules work less well for other architectures on ImageNet (You et al., 2017). We also note that current "rules of thumb" regarding optimization regime and explicitly learning rate annealing schedule may be misguided. We showed that good generalization can result from extensive amount of gradient updates in which there is no apparent validation error change and training error continues to drop, in contrast to common practice. After our work appeared, Soudry et al. (2017) suggested an explanation to this, and to the logarithmic increase in the weight distance observed in Figure 2. We show this behavior happens even in simple logistic regression problems with separable data. In this case, we exactly solve the asymptotic dynamics and prove that w(t) = log(t) ˆw + O(1) where ˆw is to the L2 maximum margin separator. Therefore, the margin (affecting generalization) improves slowly (as O(1/ log(t)), even while the training error is very low. Future work, based on this, may be focused on finding when and how the learning rate should be decreased while training. Conclusion. In this work we make a first attempt to tackle the "generalization gap" phenomenon. We argue that the initial learning phase can be described using a high-dimensional "random walk on a random potential" process, with a an "ultra-slow" logarithmic increase in the distance of the weights from their initialization, as we observe empirically. Following this observation we suggest several techniques which enable training with large batch without suffering from performance degradation. This implies that the problem is not related to the batch size but rather to the amount of updates. Moreover we introduce a simple yet efficient algorithm "Ghost-BN" which improves the generalization performance significantly while keeping the training time intact. Acknowledgments We wish to thank Nir Ailon, Dar Gilboa, Kfir Levy and Igor Berman for their feedback on the initial manuscript. The research was partially supported by the Taub Foundation, 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. References Amodei, D., Anubhai, R., Battenberg, E., et al. Deep speech 2: End-to-end speech recognition in english and mandarin. arXiv preprint arXiv:1512.02595, 2015. Bottou, L. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT’2010, pp. 177–186. Springer, 2010. Bouchaud, J. P. and Georges, A. Anomalous diffusion in disordered media: statistical mechanisms, models and physical applications. Physics reports, 195:127–293, 1990. Bouchaud, J. P. and Comtet, A. Anomalous diffusion in random media of any dimensionality. J. Physique, 48: 1445–1450, 1987. Bray, A. J. and Dean, D. S. Statistics of critical points of Gaussian fields on large-dimensional spaces. Physical Review Letters, 98(15):1–5, 2007. Choromanska, A., Henaff, M., Mathieu, M., Arous, G. B., and LeCun, Y. The Loss Surfaces of Multilayer Networks. AISTATS15, 38, 2015. Das, D., Avancha, S., Mudigere, D., et al. Distributed deep learning using synchronous stochastic gradient descent. arXiv preprint arXiv:1602.06709, 2016. Dauphin, Y., de Vries, H., Chung, J., and Bengio, Y. Rmsprop and equilibrated adaptive learning rates for non-convex optimization. corr abs/1502.04390 (2015). Dauphin, Y., Pascanu, R., and Gulcehre, C. Identifying and attacking the saddle point problem in highdimensional non-convex optimization. In NIPS, pp. 1–9, 2014. Dean, J., Corrado, G., Monga, R., et al. Large scale distributed deep networks. In NIPS, pp. 1223–1231, 2012. Deng, J., Dong, W., Socher, R., et al. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. 9e.g., Goyal et al. (2017) also used an initial warm-phase for the learning rate, however, this has a similar effect to the gradient clipping we used, since this clipping was mostly active during the initial steps of training. 9 Dinh, L., Pascanu, R., Bengio, S., and Bengio, Y. Sharp minima can generalize for deep nets. arXiv preprint arXiv:1703.04933, 2017. Duchi, J., Hazan, E., and Singer, Y. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011. Durrett, R. Multidimensional random walks in random environments with subclassical limiting behavior. Communications in Mathematical Physics, 104(1):87–102, 1986. Ge, R., Huang, F., Jin, C., and Yuan, Y. Escaping from saddle points-online stochastic gradient for tensor decomposition. In COLT, pp. 797–842, 2015. Girosi, F., Jones, M., and Poggio, T. Regularization theory and neural networks architectures. Neural computation, 7(2):219–269, 1995. Goyal, P., Dollár, P., Girshick, R., et al. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. Hardt, M., Recht, B., and Singer, Y. Train faster, generalize better: Stability of stochastic gradient descent. ICML, pp. 1–24, 2016. He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016. Ioffe, S. and Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. Keskar, N. S., Mudigere, D., Nocedal, J., Smelyanskiy, M., and Tang, P. T. P. On large-batch training for deep learning: Generalization gap and sharp minima. In ICLR, 2017. Kingma, D. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Krizhevsky, A. Learning multiple layers of features from tiny images. 2009. Krizhevsky, A. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014. LeCun, Y., Bottou, L., and Orr, G. Efficient backprop in neural networks: Tricks of the trade (orr, g. and müller, k., eds.). Lecture Notes in Computer Science, 1524, 1998a. LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998b. Li, M. Scaling Distributed Machine Learning with System and Algorithm Co-design. PhD thesis, Intel, 2017. Li, M., Zhang, T., Chen, Y., and Smola, A. J. Efficient mini-batch training for stochastic optimization. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 661–670. ACM, 2014. Luong, M.-T., Pham, H., and Manning, C. D. Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025, 2015. Marinari, E., Parisi, G., Ruelle, D., and Windey, P. Random Walk in a Random Environment and 1f Noise. Physical Review Letters, 50(1):1223–1225, 1983. Mnih, V., Kavukcuoglu, K., Silver, D., et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. Montavon, G., Orr, G., and Müller, K.-R. Neural Networks: Tricks of the Trade. 2 edition, 2012. ISBN 978-3-642-35288-1. Ruder, S. An overview of gradient descent optimization algorithms. CoRR, abs/1609.04747, 2016. Silver, D., Huang, A., Maddison, C. J., et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. Simonyan, K. e. a. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. Soudry, D., Hoffer, E., and Srebro, N. The Implicit Bias of Gradient Descent on Separable Data. ArXiv e-prints, October 2017. Soudry, D. and Hoffer, E. Exponentially vanishing sub-optimal local minima in multilayer neural networks. arXiv preprint arXiv:1702.05777, 2017. Srivastava, N., Hinton, G. E., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. Sutskever, I., Martens, J., Dahl, G., and Hinton, G. On the importance of initialization and momentum in deep learning. In International conference on machine learning, pp. 1139–1147, 2013. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., and Wojna, Z. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826, 2016. Wan, L., Zeiler, M., Zhang, S., LeCun, Y., and Fergus, R. Regularization of neural networks using dropconnect. ICML’13, pp. III–1058–III–1066. JMLR.org, 2013. Wu, Y., Schuster, M., Chen, Z., et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. CoRR, abs/1609.08144, 2016. You, Y., Gitman, I., and Ginsburg, B. Scaling sgd batch size to 32k for imagenet training. arXiv preprint arXiv:1708.03888, 2017. Zagoruyko, K. Wide residual networks. In BMVC, 2016. Zhang, C., Bengio, S., Hardt, M., Recht, B., and Vinyals, O. Understanding deep learning requires rethinking generalization. In ICLR, 2017. 10 Zhang, S., Choromanska, A. E., and LeCun, Y. Deep learning with elastic averaging sgd. In NIPS, pp. 685–693, 2015. 11 | 2017 | 434 |
6,935 | Monte-Carlo Tree Search by Best Arm Identification Emilie Kaufmann CNRS & Univ. Lille, UMR 9189 (CRIStAL), Inria SequeL Lille, France emilie.kaufmann@univ-lille1.fr Wouter M. Koolen Centrum Wiskunde & Informatica, Science Park 123, 1098 XG Amsterdam, The Netherlands wmkoolen@cwi.nl Abstract Recent advances in bandit tools and techniques for sequential learning are steadily enabling new applications and are promising the resolution of a range of challenging related problems. We study the game tree search problem, where the goal is to quickly identify the optimal move in a given game tree by sequentially sampling its stochastic payoffs. We develop new algorithms for trees of arbitrary depth, that operate by summarizing all deeper levels of the tree into confidence intervals at depth one, and applying a best arm identification procedure at the root. We prove new sample complexity guarantees with a refined dependence on the problem instance. We show experimentally that our algorithms outperform existing elimination-based algorithms and match previous special-purpose methods for depth-two trees. 1 Introduction We consider two-player zero-sum turn-based interactions, in which the sequence of possible successive moves is represented by a maximin game tree T . This tree models the possible actions sequences by a collection of MAX nodes, that correspond to states in the game in which player A should take action, MIN nodes, for states in the game in which player B should take action, and leaves which specify the payoff for player A. The goal is to determine the best action at the root for player A. For deterministic payoffs this search problem is primarily algorithmic, with several powerful pruning strategies available [20]. We look at problems with stochastic payoffs, which in addition present a major statistical challenge. Sequential identification questions in game trees with stochastic payoffs arise naturally as robust versions of bandit problems. They are also a core component of Monte Carlo tree search (MCTS) approaches for solving intractably large deterministic tree search problems, where an entire sub-tree is represented by a stochastic leaf in which randomized play-out and/or evaluations are performed [4]. A play-out consists in finishing the game with some simple, typically random, policy and observing the outcome for player A. For example, MCTS is used within the AlphaGo system [21], and the evaluation of a leaf position combines supervised learning and (smart) play-outs. While MCTS algorithms for Go have now reached expert human level, such algorithms remain very costly, in that many (expensive) leaf evaluations or play-outs are necessary to output the next action to be taken by the player. In this paper, we focus on the sample complexity of Monte-Carlo Tree Search methods, about which very little is known. For this purpose, we work under a simplified model for MCTS already studied by [22], and that generalizes the depth-two framework of [10]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1.1 A simple model for Monte-Carlo Tree Search We start by fixing a game tree T , in which the root is a MAX node. Letting L be the set of leaves of this tree, for each ℓ∈L we introduce a stochastic oracle Oℓthat represents the leaf evaluation or play-out performed when this leaf is reached by an MCTS algorithm. In this model, we do not try to optimize the evaluation or play-out strategy, but we rather assume that the oracle Oℓproduces i.i.d. samples from an unknown distribution whose mean µℓis the value of the position ℓ. To ease the presentation, we focus on binary oracles (indicating the win or loss of a play-out), in which the oracle Oℓis a Bernoulli distribution with unknown mean µℓ(the probability of player A winning the game in the corresponding state). Our algorithms can be used without modification in case the oracle is a distribution bounded in [0,1]. For each node s in the tree, we denote by C(s) the set of its children and by P(s) its parent. The root is denoted by s0. The value (for player A) of any node s is recursively defined by Vℓ= µℓif ℓ∈L and Vs = { maxc∈C(s) Vc if s is a MAX node, minc∈C(s) Vc if s is a MIN node. The best move is the action at the root with highest value, s∗= argmax s∈C(s0) Vs. To identify s∗(or an ϵ-close move), an MCTS algorithm sequentially selects paths in the game tree and calls the corresponding leaf oracle. At round t, a leaf Lt ∈L is chosen by this adaptive sampling rule, after which a sample Xt ∼OLt is collected. We consider here the same PAC learning framework as [22, 10], in which the strategy also requires a stopping rule, after which leaves are no longer evaluated, and a recommendation rule that outputs upon stopping a guess ˆsτ ∈C(s0) for the best move of player A. Given a risk level δ and some accuracy parameter ϵ ≥0 our goal is have a recommendation ˆsτ ∈C(s0) whose value is within ϵ of the value of the best move, with probability larger than 1 −δ, that is P(V (s0) −V (ˆsτ) ≤ϵ) ≥1 −δ. An algorithm satisfying this property is called (ϵ,δ)-correct. The main challenge is to design (ϵ,δ)-correct algorithms that use as few leaf evaluations τ as possible. Related work The model we introduce for Monte-Carlo Tree Search is very reminiscent of a stochastic bandit model. In those, an agent repeatedly selects one out of several probability distributions, called arms, and draws a sample from the chosen distribution. Bandits models have been studied since the 1930s [23], mostly with a focus on regret minimization, where the agent aims to maximize the sum of the samples collected, which are viewed as rewards [18]. In the context of MCTS, a sample corresponds to a win or a loss in one play-out, and maximizing the number of successful play-outs (that correspond to simulated games) may be at odds with identifying quickly the next best action to take at the root. In that, our best action identification problem is closer to a so-called Best Arm Identification (BAI) problem. The goal in the standard BAI problem is to find quickly and accurately the arm with highest mean. The BAI problem in the fixed-confidence setting [7] is the special case of our simple model for a tree of depth one. For deeper trees, rather than finding the best arm (i.e. leaf), we are interested in finding the best action at the root. As the best root action is a function of the means of all leaves, this is a more structured problem. Bandit algorithms, and more recently BAI algorithms have been successfully adapted to tree search. Building on the UCB algorithm [2], a regret minimizing algorithm, variants of the UCT algorithm [17] have been used for MCTS in growing trees, leading to successful AIs for games. However, there are only very weak theoretical guarantees for UCT. Moreover, observing that maximizing the number of successful play-outs is not the target, recent work rather tried to leverage tools from the BAI literature. In [19, 6] Sequential Halving [14] is used for exploring game trees. The latter algorithm is a state-of-the-art algorithm for the fixed-budget BAI problem [1], in which the goal is to identify the best arm with the smallest probability of error based on a given budget of draws. The proposed SHOT (Sequential Halving applied tO Trees) algorithm [6] is compared empirically to the UCT approach of [17], showing improvements in some cases. A hybrid approach mixing SHOT and UCT is also studied [19], still without sample complexity guarantees. 2 In the fixed-confidence setting, [22] develop the first sample complexity guarantees in the model we consider. The proposed algorithm, FindTopWinner is based on uniform sampling and eliminations, an approach that may be related to the Successive Eliminations algorithm [7] for fixed-confidence BAI in bandit models. FindTopWinner proceeds in rounds, in which the leaves that have not been eliminated are sampled repeatedly until the precision of their estimates doubled. Then the tree is pruned of every node whose estimated value differs significantly from the estimated value of its parent, which leads to the possible elimination of several leaves. For depth-two trees, [10] propose an elimination procedure that is not round-based. In this simpler setting, an algorithm that exploits confidence intervals is also developed, inspired by the LUCB algorithm for fixed-confidence BAI [13]. Some variants of the proposed M-LUCB algorithm appear to perform better in simulations than elimination based algorithms. We now investigate this trend further in deeper trees, both in theory and in practice. Our Contribution. In this paper, we propose a generic architecture, called BAI-MCTS, that builds on a Best Arm Identification (BAI) algorithm and on confidence intervals on the node values in order to solve the best action identification problem in a tree of arbitrary depth. In particular, we study two specific instances, UGapE-MCTS and LUCB-MCTS, that rely on confidence-based BAI algorithms [8, 13]. We prove that these are (ϵ,δ)-correct and give a high-probability upper bound on their sample complexity. Both our theoretical and empirical results improve over the elimination-based state-of-the-art algorithm, FindTopWinner [22]. 2 BAI-MCTS algorithms We present a generic class of algorithms, called BAI-MCTS, that combines a BAI algorithm with an exploration of the tree based on confidence intervals on the node values. Before introducing the algorithm and two particular instances, we first explain how to build such confidence intervals, and also introduce the central notion of representative child and representative leaf. 2.1 Confidence intervals and representative nodes For each leaf ℓ∈L, using the past observations from this leaf we may build a confidence interval Iℓ(t) = [Lℓ(t),Uℓ(t)], where Uℓ(t) (resp. Lℓ(t)) is an Upper Confidence Bound (resp. a Lower Confidence Bound) on the value V (ℓ) = µℓ. The specific confidence interval we shall use will be discussed later. These confidence intervals are then propagated upwards in the tree using the following construction. For each internal node s, we recursively define Is(t) = [Ls(t),Us(t)] with Ls(t) = { maxc∈C(s) Lc(t) for a MAX node s, minc∈C(s) Lc(t) for a MIN node s, Us(t) = { maxc∈C(s) Uc(t) for a MAX node s, minc∈C(s) Uc(t) for a MIN node s. Note that these intervals are the tightest possible on the parent under the sole assumption that the child confidence intervals are all valid. A similar construction was used in the OMS algorithm of [3] in a different context. It is easy to convince oneself (or prove by induction, see Appendix B.1) that the accuracy of the confidence intervals is preserved under this construction, as stated below. Proposition 1. Let t ∈N. One has ⋂ℓ∈L (µℓ∈Iℓ(t)) ⇒⋂s∈T (Vs ∈Is(t)). We now define the representative child cs(t) of an internal node s as cs(t) = { argmaxc∈C(s) Uc(t) if s is a MAX node, argminc∈C(s) Lc(t) if s is a MIN node, and the representative leaf ℓs(t) of a node s ∈T , which is the leaf obtained when going down the tree by always selecting the representative child: ℓs(t) = s if s ∈L, ℓs(t) = ℓcs(t)(t) otherwise. The confidence intervals in the tree represent the statistically plausible values in each node, hence the representative child can be interpreted as an “optimistic move” in a MAX node and a “pessimistic move” in a MIN node (assuming we play against the best possible adversary). This is reminiscent of the behavior of the UCT algorithm [17]. The construction of the confidence intervals and associated representative children are illustrated in Figure 1. 3 (a) Children (b) Parent Figure 1: Construction of confidence interval and representative child (in red) for a MAX node. Input: a BAI algorithm Initialization: t = 0. while not BAIStop({s ∈C(s0)}) do Rt+1 = BAIStep({s ∈C(s0)}) Sample the representative leaf Lt+1 = ℓRt+1(t) Update the information about the arms. t = t + 1. end Output: BAIReco({s ∈C(s0)}) Figure 2: The BAI-MCTS architecture 2.2 The BAI-MCTS architecture In this section we present the generic BAI-MCTS algorithm, whose sampling rule combines two ingredients: a best arm identification step which selects an action at the root, followed by a confidence based exploration step, that goes down the tree starting from this depth-one node in order to select the representative leaf for evaluation. The structure of a BAI-MCTS algorithm is presented in Figure 2. The algorithm depends on a Best Arm Identification (BAI) algorithm, and uses the three components of this algorithm: • the sampling rule BAIStep(S) selects an arm in the set S • the stopping rule BAIStop(S) returns True if the algorithm decides to stop • the recommendation rule BAIReco(S) selects an arm as a candidate for the best arm In BAI-MCTS, the arms are the depth-one nodes, hence the information needed by the BAI algorithm to make a decision (e.g. BAIStep for choosing an arm, or BAIStop for stopping) is information about depth-one nodes, that has to be updated at the end of each round (last line in the while loop). Different BAI algorithms may require different information, and we now present two instances that rely on confidence intervals (and empirical estimates) for the value of the depth-one nodes. 2.3 UGapE-MCTS and LUCB-MCTS Several Best Arm Identification algorithms may be used within BAI-MCTS, and we now present two variants, that are respectively based on the UGapE [8] and the LUCB [13] algorithms. These two algorithms are very similar in that they exploit confidence intervals and use the same stopping rule, however the LUCB algorithm additionally uses the empirical means of the arms, which within BAI-MCTS requires defining an estimate ˆVs(t) of the value of the depth-one nodes. The generic structure of the two algorithms is similar. At round t + 1 two promising depth-one nodes are computed, that we denote by bt and ct. Among these two candidates, the node whose confidence interval is the largest (that is, the most uncertain node) is selected: Rt+1 = argmax i∈{bt,ct} [Ui(t) −Li(t)]. Then, following the BAI-MCTS architecture, the representative leaf of Rt+1 (computed by going down the tree) is sampled: Lt+1 = ℓRt+1(t). The algorithm stops whenever the confidence intervals of the two promising arms overlap by less than ϵ: τ = inf {t ∈N ∶Uct(t) −Lbt(t) < ϵ}, and it recommends ˆsτ = bτ. In both algorithms that we detail below bt represents a guess for the best depth-one node, while ct is an “optimistic” challenger, that has the maximal possible value among the other depth-one nodes. Both nodes need to be explored enough in order to discover the best depth-one action quickly. 4 UGapE-MCTS. In UGapE-MCTS, introducing for each depth-one node the index Bs(t) = max s′∈C(s0)/{s}Us′(t) −Ls(t), the promising depth-one nodes are defined as bt = argmin a∈C(s0) Ba(t) and ct = argmax b∈C(s0)/{bt} Ub(t). LUCB-MCTS. In LUCB-MCTS, the promising depth-one nodes are defined as bt = argmax a∈C(s0) ˆVa(t) and ct = argmax b∈C(s0)/{bt} Ub(t), where ˆVs(t) = ˆµℓs(t)(t) is the empirical mean of the reprentative leaf of node s. Note that several alternative definitions of ˆVs(t) may be proposed (such as the middle of the confidence interval Is(t), or maxa∈C(s) ˆVa(t)), but our choice is crucial for the analysis of LUCB-MCTS, given in Appendix C. 3 Analysis of UGapE-MCTS In this section we first prove that UGapE-MCTS and LUCB-MCTS are both (ϵ,δ)-correct. Then we give in Theorem 3 a high-probability upper bound on the number of samples used by UGapE-MCTS. A similar upper bound is obtained for LUCB-MCTS in Theorem 9, stated in Appendix C. 3.1 Choosing the Confidence Intervals From now on, we assume that the confidence intervals on the leaves are of the form Lℓ(t) = ˆµℓ(t) − ¿ Á Á Àβ(Nℓ(t),δ) 2Nℓ(t) and Uℓ(t) = ˆµℓ(t) + ¿ Á Á Àβ(Nℓ(t),δ) 2Nℓ(t) . (1) β(s,δ) is some exploration function, that can be tuned to have a δ-PAC algorithm, as expressed in the following lemma, whose proof can be found in Appendix B.2 Lemma 2. If δ ≤max(0.1∣L∣,1), for the choice β(s,δ) = ln(∣L∣/δ) + 3lnln(∣L∣/δ) + (3/2)ln(lns + 1) (2) both UGapE-MCTS and LUCB-MCTS satisfy P(V (s∗) −V (ˆsτ) ≤ϵ) ≥1 −δ. An interesting practical feature of these confidence intervals is that they only depend on the local number of draws Nℓ(t), whereas most of the BAI algorithms use exploration functions that depend on the number of rounds t. Hence the only confidence intervals that need to be updated at round t are those of the ancestors of the selected leaf, which can be done recursively. Moreover, β(s,δ) scales with ln(ln(s)), and not ln(s), leveraging some tools recently introduced to obtain tighter confidence intervals [12, 15]. The union bound over L (that may be an artifact of our current analysis) however makes the exploration function of Lemma 2 still a bit over-conservative and in practice, we recommend the use of β(s,δ) = ln(ln(es)/δ). Finally, similar correctness results (with slightly larger exploration functions) may be obtained for confidence intervals based on the Kullback-Leibler divergence (see [5]), which are known to lead to better performance in standard best arm identification problems [16] and also depth-two tree search problems [10]. However, the sample complexity analysis is much more intricate, hence we stick to the above Hoeffding-based confidence intervals for the next section. 3.2 Complexity term and sample complexity guarantees We first introduce some notation. Recall that s∗is the optimal action at the root, identified with the depth-one node satisfying V (s∗) = V (s0), and define the second-best depth-one node as s∗ 2 = 5 argmaxs∈C(s0)/{s∗} Vs. Recall P(s) denotes the parent of a node s different from the root. Introducing furthermore the set Anc(s) of all the ancestors of a node s, we define the complexity term by H∗ ϵ (µ) ∶= ∑ ℓ∈L 1 ∆2 ℓ∨∆2∗∨ϵ2 , where ∆∗ ∶= V (s∗) −V (s∗ 2) ∆ℓ ∶= maxs∈Anc(ℓ)/{s0} ∣Vs −V (P(s))∣ (3) The intuition behind these squared terms in the denominator is the following. We will sample a leaf ℓ until we either prune it (by determining that it or one of its ancestors is a bad move), prune everyone else (this happens for leaves below the optimal arm) or reach the required precision ϵ. Theorem 3. Let δ ≤min(1,0.1∣L∣). UGapE-MCTS using the exploration function (2) is such that, with probability larger than 1 −δ, (V (s∗) −V (ˆsτ) < ϵ) and, letting ∆ℓ,ϵ = ∆ℓ∨∆∗∨ϵ, τ ≤8H∗ ϵ (µ)ln ∣L∣ δ + ∑ ℓ 16 ∆ 2 ℓ,ϵ lnln 1 ∆ 2 ℓ,ϵ + 8H∗ ϵ (µ)[3lnln ∣L∣ δ + 2lnln(8eln ∣L∣ δ + 24elnln ∣L∣ δ )] + 1. Remark 4. If β(Na(t),δ) is changed to β(t,δ), one can still prove (ϵ,δ) correctness and furthermore upper bound the expectation of τ. However the algorithm becomes less efficient to implement, since after each leaf observation, ALL the confidence intervals have to be updated. In practice, this change lowers the probability of error but does not effect significantly the number of play-outs used. 3.3 Comparison with previous work To the best of our knowledge1, the FindTopWinner algorithm [22] is the only algorithm from the literature designed to solve the best action identification problem in any-depth trees. The number of play-outs of this algorithm is upper bounded with high probability by ∑ ℓ∶∆ℓ>2ϵ ( 32 ∆2 ℓ ln 16∣L∣ ∆ℓδ + 1) + ∑ ℓ∶∆ℓ≤2ϵ ( 8 ϵ2 ln 8∣L∣ ϵδ + 1) One can first note the improvement in the constant in front of the leading term in ln(1/δ), as well as the presence of the lnln(1/∆ℓ,ϵ2) second order, that is unavoidable in a regime in which the gaps are small [12]. The most interesting improvement is in the control of the number of draws of 2ϵ-optimal leaves (such that ∆ℓ≤2ϵ). In UGapE-MCTS, the number of draws of such leaves is at most of order (ϵ ∨∆2 ∗)−1 ln(1/δ), which may be significantly smaller than ϵ−1 ln(1/δ) if there is a gap in the best and second best value. Moreover, unlike FindTopWinner and M-LUCB [10] in the depth two case, UGapE-MCTS can also be used when ϵ = 0, with provable guarantees. Regarding the algorithms themselves, one can note that M-LUCB, an extension of LUCB suited for depth-two tree, does not belong to the class of BAI-MCTS algorithms. Indeed, it has a “reversed” structure, first computing the representative leaf for each depth-one node: ∀s ∈C(s0),Rs,t = ℓs(t) and then performing a BAI step over the representative leaves: ˜Lt+1 = BAIStep(Rs,t,s ∈C(s0)). This alternative architecture can also be generalized to deeper trees, and was found to have empirical performance similar to BAI-MCTS. M-LUCB, which will be used as a benchmark in Section 4, also distinguish itself from LUCB-MCTS by the fact that it uses an exploration rate that depends on the global time β(t,δ) and that bt is the empirical maximin arm (which can be different from the arm maximizing ˆVs). This alternative choice is not yet supported by theoretical guarantees in deeper trees. Finally, the exploration step of BAI-MCTS algorithm bears some similarity with the UCT algorithm [17], as it goes down the tree choosing alternatively the move that yields the highest UCB or the lowest LCB. However, the behavior of BAI-MCTS is very different at the root, where the first move is selected using a BAI algorithm. Another key difference is that BAI-MCTS relies on exact confidence 1In a recent paper, [11] independently proposed the LUCBMinMax algorithm, that differs from UGapEMCTS and LUCB-MCTS only by the way the best guess bt is picked. The analysis is very similar to ours, but features some refined complexity measure, in which ∆ℓ(that is the maximal distance between consecutive ancestors of the leaf, see (3)) is replaced by the maximal distance between any ancestors of that leaf. Similar results could be obtained for our two algorithms following the same lines. 6 intervals: each interval Is(t) is shown to contain with high probability the corresponding value Vs, whereas UCT uses more heuristic confidence intervals, based on the number of visits of the parent node, and aggregating all the samples from descendant nodes. Using UCT in our setting is not obvious as it would require to define a suitable stopping rule, hence we don’t include a comparison with this algorithm in Section 4. A hybrid comparison between UCT and FindTopWinner is proposed in [22], providing UCT with the random number of samples used by the the fixed-confidence algorithm. It is shown that FindTopWinner has the advantage for hard trees that require many samples. Our experiments show that our algorithms in turn always dominate FindTopWinner. 3.4 Proof of Theorem 3. Letting Et = ⋂ℓ∈L (µℓ∈Iℓ(t)) and E = ⋂t∈N Et, we upper bound τ assuming the event E holds, using the following key result, which is proved in Appendix D. Lemma 5. Let t ∈N. Et ∩(τ > t) ∩(Lt+1 = ℓ) ⇒ Nℓ(t) ≤8β(Nℓ(t),δ) ∆2 ℓ∨∆2 ∗∨ϵ2 . An intuition behind this result is the following. First, using that the selected leaf ℓis a representative leaf, it can be seen that the confidence intervals from sD = ℓto s0 are nested (Lemma 11). Hence if Et holds, V (sk) ∈Iℓ(t) for all k = 1,...,D, which permits to lower bound the width of this interval (and thus upper bound Nℓ(t)) as a function of the V (sk) (Lemma 12). Then Lemma 13 exploits the mechanism of UGapE to further relate this width to ∆∗and ϵ. Another useful tool is the following lemma, that will allow to leverage the particular form of the exploration function β to obtain an explicit upper bound on Nℓ(τ). Lemma 6. Let β(s) = C + 3 2 ln(1 + ln(s)) and define S = sup{s ≥1 ∶aβ(s) ≥s}. Then S ≤aC + 2aln(1 + ln(aC)). This result is a consequence of Theorem 16 stated in Appendix F, that uses the fact that for C ≥ −ln(0.1) and a ≥8, it holds that 3 2 C(1 + ln(aC)) C (1 + ln(aC)) −3 2 ≤1.7995564 ≤2. On the event E, letting τℓbe the last instant before τ at which the leaf ℓhas been played before stopping, one has Nℓ(τ −1) = Nℓ(τℓ) that satisfies by Lemma 5 Nℓ(τℓ) ≤8β(Nℓ(τℓ),δ) ∆2 ℓ∨∆2∗∨ϵ2 . Applying Lemma 6 with a = aℓ= 8 ∆2 ℓ∨∆2 ∗∨ϵ2 and C = ln ∣L∣ δ + 3lnln ∣L∣ δ leads to Nℓ(τ −1) ≤aℓ(C + 2ln(1 + ln(aℓC))). Letting ∆ℓ,ϵ = ∆ℓ∨∆∗∨ϵ and summing over arms, we find τ = 1 + ∑ ℓ Nℓ(τ −1) ≤1 + ∑ ℓ 8 ∆ 2 ℓ,ϵ ⎛ ⎜ ⎝ ln ∣L∣ δ + 3lnln ∣L∣ δ + 2lnln ⎛ ⎜ ⎝ 8eln ∣L∣ δ + 3lnln ∣L∣ δ ∆ 2 ℓ,ϵ ⎞ ⎟ ⎠ ⎞ ⎟ ⎠ = 1 + ∑ ℓ 8 ∆ 2 ℓ,ϵ ⎛ ⎜ ⎝ ln ∣L∣ δ + 2lnln 1 ∆ 2 ℓ,ϵ ⎞ ⎟ ⎠ + 8H∗ ϵ (µ)[3lnln ∣L∣ δ + 2lnln(8eln ∣L∣ δ + 24elnln ∣L∣ δ )]. To conclude the proof, we remark that from the proof of Lemma 2 (see Appendix B.2) it follows that on E, V (s∗) −V (ˆsτ) < ϵ and that E holds with probability larger than 1 −δ. 7 4 Experimental Validation In this section we evaluate the performance of our algorithms in three experiments. We evaluate on the depth-two benchmark tree from [10], a new depth-three tree and the random tree ensemble from [22]. We compare to the FindTopWinner algorithm from [22] in all experiments, and in the depth-two experiment we include the M-LUCB algorithm from [10]. Its relation to BAI-MCTS is discussed in Section 3.3. For our BAI-MCTS algorithms and for M-LUCB we use the exploration rate β(s,δ) = ln ∣L∣ δ + ln(ln(s) + 1) (a stylized version of Lemma 2 that works well in practice), and we use the KL refinement of the confidence intervals (1). To replicate the experiment from [22], we supply all algorithms with δ = 0.1 and ϵ = 0.01. For comparing with [10] we run all algorithms with ϵ = 0 and δ = 0.1∣L∣(undoing the conservative union bound over leaves. This excessive choice, which might even exceed one, does not cause a problem, as the algorithms depend on δ ∣L∣= 0.1). In none of our experiments the observed error rate exceeds 0.1. Figure 3 shows the benchmark tree from [10, Section 5] and the performance of four algorithms on it. We see that the special-purpose depth-two M-LUCB performs best, very closely followed by both our new arbitrary-depth LUCB-MCTS and UGapE-MCTS methods. All three use significantly fewer samples than FindTopWinner. Figure 4 (displayed in Appendix A for the sake of readability) shows a full 3-way tree of depth 3 with leafs drawn uniformly from [0,1]. Again our algorithms outperform the previous state of the art by an order of magnitude. Finally, we replicate the experiment from [22, Section 4]. To make the comparison as fair as possible, we use the proven exploration rate from (2). On 10K full 10-ary trees of depth 3 with Bernoulli leaf parameters drawn uniformly at random from [0,1] the average numbers of samples are: LUCB-MCTS 141811, UGapE-MCTS 142953 and FindTopWinner 2254560. To closely follow the original experiment, we do apply the union bound over leaves to all algorithms, which are run with ϵ = 0.01 and δ = 0.1. We did not observe any error from any algorithm (even though we allow 10%). Our BAI-MCTS algorithms deliver an impressive 15-fold reduction in samples. 0.45 0.45 0.35 0.30 0.45 0.50 0.55 905 875 2941 798 199 200 2931 212 81 82 2498 92 0.35 0.40 0.60 629 630 2932 752 287 279 2930 248 17 17 418 22 0.30 0.47 0.52 197 193 1140 210 123 123 739 44 20 20 566 21 Figure 3: The 3 × 3 tree of depth 2 that is the benchmark in [10]. Shown below the leaves are the average numbers of pulls for 4 algorithms: LUCB-MCTS (0.89% errors, 2460 samples), UGapEMCTS (0.94%, 2419), FindTopWinner (0%, 17097) and M-LUCB (0.14%, 2399). All counts are averages over 10K repetitions with ϵ = 0 and δ = 0.1 ⋅9. 5 Lower bounds and discussion Given a tree T , a MCTS model is parameterized by the leaf values, µ ∶= (µℓ)ℓ∈L, which determine the best root action: s∗= s∗(µ). For µ ∈[0,1]∣L∣, We define Alt(µ) = {λ ∈[0,1]∣L∣∶s∗(λ) ≠s∗(µ)}. Using the same technique as [9] for the classic best arm identification problem, one can establish the following (non explicit) lower bound. The proof is given in Appendix E. 8 Theorem 7. Assume ϵ = 0. Any δ-correct algorithm satisfies Eµ[τ] ≥T ∗(µ)d(δ,1 −δ), where T ∗(µ)−1 ∶= sup w∈Σ∣L∣ inf λ∈Alt(µ) ∑ ℓ∈L wℓd(µℓ,λℓ) (4) with Σk = {w ∈[0,1]i ∶∑k i=1 wi = 1} and d(x,y) = xln(x/y) + (1 −x)ln((1 −x)/(1 −y)) is the binary Kullback-Leibler divergence. This result is however not directly amenable for comparison with our upper bounds, as the optimization problem defined in Lemma 7 is not easy to solve. Note that d(δ,1 −δ) ≥ln(1/(2.4δ)) [15], thus our upper bounds have the right dependency in δ. For depth-two trees with K (resp. M) actions for player A (resp. B), we can moreover prove the following result, that suggests an intriguing behavior. Lemma 8. Assume ϵ = 0 and consider a tree of depth two with µ = (µi,j)1≤i≤K,1≤j≤M such that ∀(i,j),µ1,1 > µi,1, µi,1 < µi,j. The supremum in the definition of T ∗(µ)−1 can be restricted to ˜ΣK,M ∶= {w ∈ΣK×M ∶wi,j = 0 if i ≥2 and j ≥2} and T ∗(µ)−1= max w∈˜ΣK,M min i=2,...,K a=1,...,M [w1,ad(µ1,a, w1,aµ1,a + wi,1µi,1 w1,a + wi,1 )+wi,1d(µi,1, w1,aµ1,a + wi,1µi,1 w1,a + wi,1 )]. It can be extracted from the proof of Theorem 7 (see Appendix E) that the vector w∗(µ) that attains the supremum in (4) represents the average proportions of selections of leaves by any algorithm matching the lower bound. Hence, the sparsity pattern of Lemma 8 suggests that matching algorithms should draw many of the leaves much less than O(ln(1/δ)) times. This hints at the exciting prospect of optimal stochastic pruning, at least in the asymptotic regime δ →0. As an example, we numerically solve the lower bound optimization problem (which is a concave maximization problem) for µ corresponding to the benchmark tree displayed in Figure 3 to obtain T ∗(µ) = 259.9 and w∗= (0.3633,0.1057,0.0532),(0.3738,0,0),(0.1040,0,0). With δ = 0.1 we find kl(δ,1 −δ) = 1.76 and the lower bound is Eµ[τ] ≥456.9. We see that there is a potential improvement of at least a factor 4. Future directions An (asymptotically) optimal algorithm for BAI called Track-and-Stop was developed by [9]. It maintains the empirical proportions of draws close to w∗(ˆµ), adding forced exploration to ensure ˆµ →µ. We believe that developing this line of ideas for MCTS would result in a major advance in the quality of tree search algorithms. The main challenge is developing efficient solvers for the general optimization problem (4). For now, even the sparsity pattern revealed by Lemma 8 for depth two does not give rise to efficient solvers. We also do not know how this sparsity pattern evolves for deeper trees, let alone how to compute w∗(µ). Acknowledgments. Emilie Kaufmann acknowledges the support of the French Agence Nationale de la Recherche (ANR), under grant ANR-16-CE40-0002 (project BADASS). Wouter Koolen acknowledges support from the Netherlands Organization for Scientific Research (NWO) under Veni grant 639.021.439. References [1] J-Y. Audibert, S. Bubeck, and R. Munos. Best Arm Identification in Multi-armed Bandits. In Proceedings of the 23rd Conference on Learning Theory, 2010. [2] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2):235–256, 2002. [3] L. Borsoniu, R. Munos, and E. Páll. An analysis of optimistic, best-first search for minimax sequential decision making. In ADPRL14, 2014. [4] C. Browne, E. Powley, D. Whitehouse, S. Lucas, P. Cowling, P. Rohlfshagen, S. Tavener, D. Perez, S. Samothrakis, and S. Colton. A survey of monte carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in games,, 4(1):1–49, 2012. 9 [5] O. Cappé, A. Garivier, O-A. Maillard, R. Munos, and G. Stoltz. Kullback-Leibler upper confidence bounds for optimal sequential allocation. Annals of Statistics, 41(3):1516–1541, 2013. [6] T. Cazenave. Sequential halving applied to trees. IEEE Transactions on Computational Intelligence and AI in Games, 7(1):102–105, 2015. [7] E. Even-Dar, S. Mannor, and Y. Mansour. Action Elimination and Stopping Conditions for the Multi-Armed Bandit and Reinforcement Learning Problems. Journal of Machine Learning Research, 7:1079–1105, 2006. [8] V. Gabillon, M. Ghavamzadeh, and A. Lazaric. Best Arm Identification: A Unified Approach to Fixed Budget and Fixed Confidence. In Advances in Neural Information Processing Systems, 2012. [9] A. Garivier and E. Kaufmann. Optimal best arm identification with fixed confidence. In Proceedings of the 29th Conference On Learning Theory (COLT), 2016. [10] A. Garivier, E. Kaufmann, and W.M. Koolen. Maximin action identification: A new bandit framework for games. In Proceedings of the 29th Conference On Learning Theory, 2016. [11] Ruitong Huang, Mohammad M. Ajallooeian, Csaba Szepesvári, and Martin Müller. Structured best arm identification with fixed confidence. In 28th International Conference on Algorithmic Learning Theory (ALT), 2017. [12] K. Jamieson, M. Malloy, R. Nowak, and S. Bubeck. lil’UCB: an Optimal Exploration Algorithm for Multi-Armed Bandits. In Proceedings of the 27th Conference on Learning Theory, 2014. [13] S. Kalyanakrishnan, A. Tewari, P. Auer, and P. Stone. PAC subset selection in stochastic multi-armed bandits. In International Conference on Machine Learning (ICML), 2012. [14] Z. Karnin, T. Koren, and O. Somekh. Almost optimal Exploration in multi-armed bandits. In International Conference on Machine Learning (ICML), 2013. [15] E. Kaufmann, O. Cappé, and A. Garivier. On the Complexity of Best Arm Identification in Multi-Armed Bandit Models. Journal of Machine Learning Research, 17(1):1–42, 2016. [16] E. Kaufmann and S. Kalyanakrishnan. Information complexity in bandit subset selection. In Proceeding of the 26th Conference On Learning Theory., 2013. [17] L. Kocsis and C. Szepesvári. Bandit based monte-carlo planning. In Proceedings of the 17th European Conference on Machine Learning, ECML’06, pages 282–293, Berlin, Heidelberg, 2006. Springer-Verlag. [18] T.L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [19] T. Pepels, T. Cazenave, M. Winands, and M. Lanctot. Minimizing simple and cumulative regret in monte-carlo tree search. In Computer Games Workshop, ECAI, 2014. [20] Aske Plaat, Jonathan Schaeffer, Wim Pijls, and Arie de Bruin. Best-first fixed-depth minimax algorithms. Artificial Intelligence, 87(1):255 – 293, 1996. [21] David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529:484–489, 2016. [22] K. Teraoka, K. Hatano, and E. Takimoto. Efficient sampling method for monte carlo tree search problem. IEICE Transactions on Infomation and Systems, pages 392–398, 2014. [23] W.R. Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25:285–294, 1933. 10 | 2017 | 435 |
6,936 | Deep Learning for Precipitation Nowcasting: A Benchmark and A New Model Xingjian Shi, Zhihan Gao, Leonard Lausen, Hao Wang, Dit-Yan Yeung Department of Computer Science and Engineering Hong Kong University of Science and Technology {xshiab,zgaoag,lelausen,hwangaz,dyyeung}@cse.ust.hk Wai-kin Wong, Wang-chun Woo Hong Kong Observatory Hong Kong, China {wkwong,wcwoo}@hko.gov.hk Abstract With the goal of making high-resolution forecasts of regional rainfall, precipitation nowcasting has become an important and fundamental technology underlying various public services ranging from rainstorm warnings to flight safety. Recently, the Convolutional LSTM (ConvLSTM) model has been shown to outperform traditional optical flow based methods for precipitation nowcasting, suggesting that deep learning models have a huge potential for solving the problem. However, the convolutional recurrence structure in ConvLSTM-based models is location-invariant while natural motion and transformation (e.g., rotation) are location-variant in general. Furthermore, since deep-learning-based precipitation nowcasting is a newly emerging area, clear evaluation protocols have not yet been established. To address these problems, we propose both a new model and a benchmark for precipitation nowcasting. Specifically, we go beyond ConvLSTM and propose the Trajectory GRU (TrajGRU) model that can actively learn the location-variant structure for recurrent connections. Besides, we provide a benchmark that includes a real-world large-scale dataset from the Hong Kong Observatory, a new training loss, and a comprehensive evaluation protocol to facilitate future research and gauge the state of the art. 1 Introduction Precipitation nowcasting refers to the problem of providing very short range (e.g., 0-6 hours) forecast of the rainfall intensity in a local region based on radar echo maps1, rain gauge and other observation data as well as the Numerical Weather Prediction (NWP) models. It significantly impacts the daily lives of many and plays a vital role in many real-world applications. Among other possibilities, it helps to facilitate drivers by predicting road conditions, enhances flight safety by providing weather guidance for regional aviation, and avoids casualties by issuing citywide rainfall alerts. In addition to the inherent complexities of the atmosphere and relevant dynamical processes, the ever-growing need for real-time, large-scale, and fine-grained precipitation nowcasting poses extra challenges to the meteorological community and has aroused research interest in the machine learning community [23, 25]. 1The radar echo maps are Constant Altitude Plan Position Indicator (CAPPI) images which can be converted to rainfall intensity maps using the Marshall-Palmer relationship or Z-R relationship [19]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The conventional approaches to precipitation nowcasting used by existing operational systems rely on optical flow [28]. In a modern day nowcasting system, the convective cloud movements are first estimated from the observed radar echo maps by optical flow and are then used to predict the future radar echo maps using semi-Lagrangian advection. However, these methods are unsupervised from the machine learning point of view in that they do not take advantage of the vast amount of existing radar echo data. Recently, progress has been made by utilizing supervised deep learning [15] techniques for precipitation nowcasting. Shi et al. [23] formulated precipitation nowcasting as a spatiotemporal sequence forecasting problem and proposed the Convolutional Long Short-Term Memory (ConvLSTM) model, which extends the LSTM [7] by having convolutional structures in both the input-to-state and state-to-state transitions, to solve the problem. Using the radar echo sequences for model training, the authors showed that ConvLSTM is better at capturing the spatiotemporal correlations than the fully-connected LSTM and gives more accurate predictions than the Real-time Optical flow by Variational methods for Echoes of Radar (ROVER) algorithm [28] currently used by the Hong Kong Observatory (HKO). However, despite their pioneering effort in this interesting direction, the paper has some deficiencies. First, the deep learning model is only evaluated on a relatively small dataset containing 97 rainy days and only the nowcasting skill score at the 0.5mm/h rain-rate threshold is compared. As real-world precipitation nowcasting systems need to pay additional attention to heavier rainfall events such as rainstorms which cause more threat to the society, the performance at the 0.5mm/h threshold (indicating raining or not) alone is not sufficient for demonstrating the algorithm’s overall performance [28]. In fact, as the area Deep Learning for Precipitation Nowcasting is still in its early stage, it is not clear how models should be evaluated to meet the need of real-world applications. Second, although the convolutional recurrence structure used in ConvLSTM is better than the fullyconnected recurrent structure in capturing spatiotemporal correlations, it is not optimal and leaves room for improvement. For motion patterns like rotation and scaling, the local correlation structure of consecutive frames will be different for different spatial locations and timestamps. It is thus inefficient to use convolution which uses a location-invariant filter to represent such location-variant relationship. Previous attempts have tried to solve the problem by revising the output of a recurrent neural network (RNN) from the raw prediction to be some location-variant transformation of the input, like optical flow or dynamic local filter [5, 3]. However, not much research has been conducted to address the problem by revising the recurrent structure itself. In this paper, we aim to address these two problems by proposing both a benchmark and a new model for precipitation nowcasting. For the new benchmark, we build the HKO-7 dataset which contains radar echo data from 2009 to 2015 near Hong Kong. Since the radar echo maps arrive in a stream in the real-world scenario, the nowcasting algorithms can adopt online learning to adapt to the newly emerging patterns dynamically. To take into account this setting, we use two testing protocols in our benchmark: the offline setting in which the algorithm can only use a fixed window of the previous radar echo maps and the online setting in which the algorithm is free to use all the historical data and any online learning algorithm. Another issue for the precipitation nowcasting task is that the proportions of rainfall events at different rain-rate thresholds are highly imbalanced. Heavier rainfall occurs less often but has a higher real-world impact. We thus propose the Balanced Mean Squared Error (B-MSE) and Balanced Mean Absolute Error (B-MAE) measures for training and evaluation, which assign more weights to heavier rainfalls in the calculation of MSE and MAE. We empirically find that the balanced variants of the loss functions are more consistent with the overall nowcasting performance at multiple rain-rate thresholds than the original loss functions. Moreover, our experiments show that training with the balanced loss functions is essential for deep learning models to achieve good performance at higher rain-rate thresholds. For the new model, we propose the Trajectory Gated Recurrent Unit (TrajGRU) model which uses a subnetwork to output the state-to-state connection structures before state transitions. TrajGRU allows the state to be aggregated along some learned trajectories and thus is more flexible than the Convolutional GRU (ConvGRU) [2] whose connection structure is fixed. We show that TrajGRU outperforms ConvGRU, Dynamic Filter Network (DFN) [3] as well as 2D and 3D Convolutional Neural Networks (CNNs) [20, 27] in both a synthetic MovingMNIST++ dataset and the HKO-7 dataset. Using the new dataset, testing protocols, training loss and model, we provide extensive empirical evaluation of seven models, including a simple baseline model which always predicts the last frame, two optical flow based models (ROVER and its nonlinear variant), and four representative deep learning models (TrajGRU, ConvGRU, 2D CNN, and 3D CNN). We also provide a large-scale 2 benchmark for precipitation nowcasting. Our experimental validation shows that (1) all the deep learning models outperform the optical flow based models, (2) TrajGRU attains the best overall performance among all the deep learning models, and (3) after applying online fine-tuning, the models tested in the online setting consistently outperform those in the offline setting. To the best of our knowledge, this is the first comprehensive benchmark of deep learning models for the precipitation nowcasting problem. Besides, since precipitation nowcasting can be viewed as a video prediction problem [22, 27], our work is the first to provide evidence and justification that online learning could potentially be helpful for video prediction in general. 2 Related Work Deep learning for precipitation nowcasting and video prediction For the precipitation nowcasting problem, the reflectivity factors in radar echo maps are first transformed to grayscale images before being fed into the prediction algorithm [23]. Thus, precipitation nowcasting can be viewed as a type of video prediction problem with a fixed “camera”, which is the weather radar. Therefore, methods proposed for predicting future frames in natural videos are also applicable to precipitation nowcasting and are related to our paper. There are three types of general architecture for video prediction: RNN based models, 2D CNN based models, and 3D CNN based models. Ranzato et al. [22] proposed the first RNN based model for video prediction, which uses a convolutional RNN with 1 × 1 state-state kernel to encode the observed frames. Srivastava et al. [24] proposed the LSTM encoder-decoder network which uses one LSTM to encode the input frames and another LSTM to predict multiple frames ahead. The model was generalized in [23] by replacing the fully-connected LSTM with ConvLSTM to capture the spatiotemporal correlations better. Later, Finn et al. [5] and De Brabandere et al. [3] extended the model in [23] by making the network predict the transformation of the input frame instead of directly predicting the raw pixels. Ruben et al. [26] proposed to use both an RNN that captures the motion and a CNN that captures the content to generate the prediction. Along with RNN based models, 2D and 3D CNN based models were proposed in [20] and [27] respectively. Mathieu et al. [20] treated the frame sequence as multiple channels and applied 2D CNN to generate the prediction while [27] treated them as the depth and applied 3D CNN. Both papers show that Generative Adversarial Network (GAN) [6] is helpful for generating sharp predictions. Structured recurrent connection for spatiotemporal modeling From a higher-level perspective, precipitation nowcasting and video prediction are intrinsically spatiotemporal sequence forecasting problems in which both the input and output are spatiotemporal sequences [23]. Recently, there is a trend of replacing the fully-connected structure in the recurrent connections of RNN with other topologies to enhance the network’s ability to model the spatiotemporal relationship. Other than the ConvLSTM which replaces the full-connection with convolution and is designed for dense videos, the SocialLSTM [1] and the Structural-RNN (S-RNN) [11] have been proposed sharing a similar notion. SocialLSTM defines the topology based on the distance between different people and is designed for human trajectory prediction while S-RNN defines the structure based on the given spatiotemporal graph. All these models are different from our TrajGRU in that our model actively learns the recurrent connection structure. Liang et al. [17] have proposed the Structure-evolving LSTM, which also has the ability to learn the connection structure of RNNs. However, their model is designed for the semantic object parsing task and learns how to merge the graph nodes automatically. It is thus different from TrajGRU which aims at learning the local correlation structure for spatiotemporal data. Benchmark for video tasks There exist benchmarks for several video tasks like online object tracking [29] and video object segmentation [21]. However, there is no benchmark for the precipitation nowcasting problem, which is also a video task but has its unique properties since radar echo map is a completely different type of data and the data is highly imbalanced (as mentioned in Section 1). The large-scale benchmark created as part of this work could help fill the gap. 3 Model In this section, we present our new model for precipitation nowcasting. We first introduce the general encoding-forecasting structure used in this paper. Then we review the ConvGRU model and present our new TrajGRU model. 3 3.1 Encoding-forecasting Structure We adopt a similar formulation of the precipitation nowcasting problem as in [23]. Assume that the radar echo maps form a spatiotemporal sequence ⟨I1, I2, . . .⟩. At a given timestamp t, our model generates the most likely K-step predictions, ˆIt+1, ˆIt+2, . . . , ˆIt+K, based on the previous J observations including the current one: It−J+1, It−J+2, . . . , It. Our encoding-forecasting network first encodes the observations into n layers of RNN states: H1 t , H2 t , . . . , Hn t = h(It−J+1, It−J+2, . . . , It), and then uses another n layers of RNNs to generate the predictions based on these encoded states: ˆIt+1, ˆIt+2, . . . , ˆIt+K = g(H1 t , H2 t , . . . , Hn t ). Figure 1 illustrates our encoding-forecasting structure for n = 3, J = 2, K = 2. We insert downsampling and upsampling layers between the RNNs, which are implemented by convolution and deconvolution with stride. The reason to reverse the order of the forecasting network is that the high-level states, which have captured the global spatiotemporal representation, could guide the update of the low-level states. Moreover, the low-level states could further influence the prediction. This structure is more reasonable than the previous structure [23] which does not reverse the link of the forecasting network because we are free to plug in additional RNN layers on top and no skip-connection is required to aggregate the low-level information. One can choose any type of RNNs like ConvGRU or our newly proposed TrajGRU in this general encoding-forecasting structure as long as their states correspond to tensors. 3.2 Convolutional GRU The main formulas of the ConvGRU used in this paper are given as follows: Zt = σ(Wxz ∗Xt + Whz ∗Ht−1), Rt = σ(Wxr ∗Xt + Whr ∗Ht−1), H′ t = f(Wxh ∗Xt + Rt ◦(Whh ∗Ht−1)), Ht = (1 −Zt) ◦H′ t + Zt ◦Ht−1. (1) The bias terms are omitted for notational simplicity. ‘∗’ is the convolution operation and ‘◦’ is the Hadamard product. Here, Ht, Rt, Zt, H′ t ∈RCh×H×W are the memory state, reset gate, update gate, and new information, respectively. Xt ∈RCi×H×W is the input and f is the activation, which is chosen to be leaky ReLU with negative slope equals to 0.2 [18] througout the paper. H, W are the height and width of the state and input tensors and Ch, Ci are the channel sizes of the state and input tensors, respectively. Every time a new input arrives, the reset gate will control whether to clear the previous state and the update gate will control how much the new information will be written to the state. 3.3 Trajectory GRU When used for capturing spatiotemporal correlations, the deficiency of ConvGRU and other ConvRNNs is that the connection structure and weights are fixed for all the locations. The convolution operation basically applies a location-invariant filter to the input. If the inputs are all zero and the reset gates are all one, we could rewrite the computation process of the new information at a specific location (i, j) at timestamp t, i.e, H′ t,:,i,j, as follows: H′ t,:,i,j = f(Whhconcat(⟨Ht−1,:,p,q | (p, q) ∈N h i,j⟩)) = f( |N h i,j| X l=1 Wl hhHt−1,:,pl,i,j,ql,i,j). (2) Here, N h i,j is the ordered neighborhood set at location (i, j) defined by the hyperparameters of the state-to-state convolution such as kernel size, dilation and padding [30]. (pl,i,j, ql,i,j) is the lth neighborhood location of position (i, j). The concat(·) function concatenates the inner vectors in the set and Whh is the matrix representation of the state-to-state convolution weights. As the hyperparameter of convolution is fixed, the neighborhood set N h i,j stays the same for all locations. However, most motion patterns have different neighborhood sets for different locations. For example, rotation and scaling generate flow fields with different angles pointing to different directions. It would thus be more reasonable to have a location-variant connection structure as H′ t,:,i,j = f( L X l=1 Wl hhHt−1,:,pl,i,j(θ),ql,i,j(θ)), (3) 4 RNN RNN RNN Downsample Downsample Convolution RNN RNN RNN Downsample Downsample Convolution RNN RNN RNN Upsample Upsample Convolution RNN RNN RNN Upsample Upsample Convolution Encoder Forecaster Figure 1: Example of the encoding-forecasting structure used in the paper. In the figure, we use three RNNs to predict two future frames ˆI3, ˆI4 given the two input frames I1, I2. The spatial coordinates G are concatenated to the input frame to ensure the network knows the observations are from different locations. The RNNs can be either ConvGRU or TrajGRU. Zeros are fed as input to the RNN if the input link is missing. (a) For convolutional RNN, the recurrent connections are fixed over time. (b) For trajectory RNN, the recurrent connections are dynamically determined. Figure 2: Comparison of the connection structures of convolutional RNN and trajectory RNN. Links with the same color share the same transition weights. (Best viewed in color) where L is the total number of local links, (pl,i,j(θ), ql,i,j(θ)) is the lth neighborhood parameterized by θ. Based on this observation, we propose the TrajGRU, which uses the current input and previous state to generate the local neighborhood set for each location at each timestamp. Since the location indices are discrete and non-differentiable, we use a set of continuous optical flows to represent these “indices”. The main formulas of TrajGRU are given as follows: Ut, Vt = γ(Xt, Ht−1), Zt = σ(Wxz ∗Xt + L X l=1 Wl hz ∗warp(Ht−1, Ut,l, Vt,l)), Rt = σ(Wxr ∗Xt + L X l=1 Wl hr ∗warp(Ht−1, Ut,l, Vt,l)), H′ t = f(Wxh ∗Xt + Rt ◦( L X l=1 Wl hh ∗warp(Ht−1, Ut,l, Vt,l))), Ht = (1 −Zt) ◦H′ t + Zt ◦Ht−1. (4) Here, L is the total number of allowed links. Ut, Vt ∈RL×H×W are the flow fields that store the local connection structure generated by the structure generating network γ. The Wl hz, Wl hr, Wl hh are the weights for projecting the channels, which are implemented by 1 × 1 convolutions. The warp(Ht−1, Ut,l, Vt,l) function selects the positions pointed out by Ut,l, Vt,l from Ht−1 via the bilinear sampling kernel [10, 9]. If we denote M = warp(I, U, V) where M, I ∈RC×H×W and U, V ∈RH×W , we have: Mc,i,j = H X m=1 W X n=1 Ic,m,n max(0, 1 −|i + Vi,j −m|) max(0, 1 −|j + Ui,j −n|). (5) The advantage of such a structure is that we could learn the connection topology by learning the parameters of the subnetwork γ. In our experiments, γ takes the concatenation of Xt and Ht−1 as the input and is fixed to be a one-hidden-layer convolutional neural network with 5 × 5 kernel size and 32 feature maps. Thus, γ has only a small number of parameters and adds nearly no cost to the overall computation. Compared to a ConvGRU with K × K state-to-state convolution, TrajGRU is able to learn a more efficient connection structure with L < K2. For ConvGRU and TrajGRU, the number of model parameters is dominated by the size of the state-to-state weights, which is O(L × C2 h) for TrajGRU and O(K2 × C2 h) for ConvGRU. If L is chosen to be smaller than K2, the 5 Table 1: Comparison of TrajGRU and the baseline models in the MovingMNIST++ dataset. ‘Conv-Kα-Dβ’ refers to the ConvGRU with kernel size α × α and dilation β × β. ‘Traj-Lλ’ refers to the TrajGRU with λ links. We replace the output layer of the ConvGRU-K5-D1 model to get the DFN. Conv-K3-D2 Conv-K5-D1 Conv-K7-D1 Traj-L5 Traj-L9 Traj-L13 TrajGRU-L17 DFN Conv2D Conv3D #Parameters 2.84M 4.77M 8.01M 2.60M 3.42M 4.00M 4.77M 4.83M 29.06M 32.52M Test MSE ×10−2 1.495 1.310 1.254 1.351 1.247 1.170 1.138 1.461 1.681 1.637 Standard Deviation ×10−2 0.003 0.004 0.006 0.020 0.015 0.022 0.019 0.002 0.001 0.002 number of parameters of TrajGRU can also be smaller than the ConvGRU and the TrajGRU model is able to use the parameters more efficiently. Illustration of the recurrent connection structures of ConvGRU and TrajGRU is given in Figure 2. Recently, Jeon & Kim [12] has used similar ideas to extend the convolution operations in CNN. However, their proposed Active Convolution Unit (ACU) focuses on the images where the need for location-variant filters is limited. Our TrajGRU focuses on videos where location-variant filters are crucial for handling motion patterns like rotations. Moreover, we are revising the structure of the recurrent connection and have tested different number of links while [12] fixes the link number to 9. 4 Experiments on MovingMNIST++ Before evaluating our model on the more challenging precipitation nowcasting task, we first compare TrajGRU with ConvGRU, DFN and 2D/3D CNNs on a synthetic video prediction dataset to justify its effectiveness. The previous MovingMNIST dataset [24, 23] only moves the digits with a constant speed and is not suitable for evaluating different models’ ability in capturing more complicated motion patterns. We thus design the MovingMNIST++ dataset by extending MovingMNIST to allow random rotations, scale changes, and illumination changes. Each frame is of size 64 × 64 and contains three moving digits. We use 10 frames as input to predict the next 10 frames. As the frames have illumination changes, we use MSE instead of cross-entropy for training and evaluation 2. We train all models using the Adam optimizer [14] with learning rate equal to 10−4 and momentum equal to 0.5. For the RNN models, we use the encoding-forecasting structure introduced previously with three RNN layers. All RNNs are either ConvGRU or TrajGRU and all use the same set of hyperparameters. For TrajGRU, we initialize the weight of the output layer of the structure generating network to zero. The strides of the middle downsampling and upsampling layers are chosen to be 2. The numbers of filters for the three RNNs are 64, 96, 96 respectively. For the DFN model, we replace the output layer of ConvGRU with a 11 × 11 local filter and transform the previous frame to get the prediction. For the RNN models, we train them for 200,000 iterations with norm clipping threshold equal to 1 and batch size equal to 4. For the CNN models, we train them for 100,000 iterations with norm clipping threshold equal to 50 and batch size equal to 32. The detailed experimental configuration of the models for the MovingMNIST++ experiment can be found in the appendix. We have also tried to use conditional GAN for the 2D and 3D models but have failed to get reasonable results. Table 1 gives the results of different models on the same test set that contains 10,000 sequences. We train all models using three different seeds to report the standard deviation. We can find that TrajGRU with only 5 links outperforms ConvGRU with state-to-state kernel size 3 × 3 and dilation 2 × 2 (9 links). Also, the performance of TrajGRU improves as the number of links increases. TrajGRU with L = 13 outperforms ConvGRU with 7 × 7 state-to-state kernel and yet has fewer parameters. Another observation from the table is that DFN does not perform well in this synthetic dataset. This is because DFN uses softmax to enhance the sparsity of the learned local filters, which fails to model illumination change because the maximum value always gets smaller after convolving with a positive kernel whose weights sum up to 1. For DFN, when the pixel values get smaller, it is impossible for them to increase again. Figure 3 visualizes the learned structures of TrajGRU. We can see that the network has learned reasonable local link patterns. 2The MSE for the MovingMNIST++ experiment is averaged by both the frame size and the length of the predicted sequence. 6 Figure 3: Selected links of TrajGRU-L13 at different frames and layers. We choose one of the 13 links and plot an arrow starting from each pixel to the pixel that is referenced by the link. From left to right we display the learned structure at the first, second and third layer of the encoder. The links displayed here have learned behaviour for rotations. We sub-sample the displayed links for the first layer for better readability. We include animations for all layers and links in the supplementary material. (Best viewed when zoomed in.) 5 Benchmark for Precipitation Nowcasting 5.1 HKO-7 Dataset The HKO-7 dataset used in the benchmark contains radar echo data from 2009 to 2015 collected by HKO. The radar CAPPI reflectivity images, which have resolution of 480×480 pixels, are taken from an altitude of 2km and cover a 512km × 512km area centered in Hong Kong. The data are recorded every 6 minutes and hence there are 240 frames per day. The raw logarithmic radar reflectivity factors are linearly transformed to pixel values via pixel = ⌊255 × dBZ+10 70 + 0.5⌋and are clipped to be between 0 and 255. The raw radar echo images generated by Doppler weather radar are noisy due to factors like ground clutter, sea clutter, anomalous propagation and electromagnetic interference [16]. To alleviate the impact of noise in training and evaluation, we filter the noisy pixels in the dataset and generate the noise masks by a two-stage process described in the appendix. As rainfall events occur sparsely, we select the rainy days based on the rain barrel information to form our final dataset, which has 812 days for training, 50 days for validation and 131 days for testing. Our current treatment is close to the real-life scenario as we are able to train an additional model that classifies whether or not it will rain on the next day and applies our precipitation nowcasting model if this coarser-level model predicts that it will be rainy. The radar reflectivity values are converted to rainfall intensity values (mm/h) using the Z-R relationship: dBZ = 10 log a + 10b log R where R is the rain-rate level, a = 58.53 and b = 1.56. The overall statistics and the average monthly rainfall distribution of the HKO-7 dataset are given in the appendix. 5.2 Evaluation Methodology As the radar echo maps arrive in a stream, nowcasting algorithms can apply online learning to adapt to the newly emerging spatiotemporal patterns. We propose two settings in our evaluation protocol: (1) the offline setting in which the algorithm always receives 5 frames as input and predicts 20 frames ahead, and (2) the online setting in which the algorithm receives segments of length 5 sequentially and predicts 20 frames ahead for each new segment received. The evaluation protocol is described more systematically in the appendix. The testing environment guarantees that the same set of sequences is tested in both the offline and online settings for fair comparison. For both settings, we evaluate the skill scores for multiple thresholds that correspond to different rainfall levels to give an all-round evaluation of the algorithms’ nowcasting performance. Table 2 shows the distribution of different rainfall levels in our dataset. We choose to use the thresholds 0.5, 2, 5, 10, 30 to calculate the CSI and Heidke Skill Score (HSS) [8]. For calculating the skill score at a specific threshold τ, which is 0.5, 2, 5, 10 or 30, we first convert the pixel values in prediction and ground-truth to 0/1 by thresholding with τ. We then calculate the TP (prediction=1, truth=1), FN (prediction=0, truth=1), FP (prediction=1, truth=0), and TN (prediction=0, truth=0). The CSI score is calculated as TP TP+FN+FP and the HSS score is calculated as TP×TN−FN×FP (TP+FN)(FN+TN)+(TP+FP)(FP+TN). During the computation, the masked points are ignored. 7 Table 2: Rain rate statistics in the HKO-7 benchmark. Rain Rate (mm/h) Proportion (%) Rainfall Level 0 ≤ x < 0.5 90.25 No / Hardly noticeable 0.5 ≤ x < 2 4.38 Light 2 ≤ x < 5 2.46 Light to moderate 5 ≤ x < 10 1.35 Moderate 10 ≤ x < 30 1.14 Moderate to heavy 30 ≤ x 0.42 Rainstorm warning As shown in Table 2, the frequencies of different rainfall levels are highly imbalanced. We propose to use the weighted loss function to help solve this problem. Specifically, we assign a weight w(x) to each pixel according to its rainfall intensity x: w(x) = 1, x < 2 2, 2 ≤x < 5 5, 5 ≤x < 10 10, 10 ≤x < 30 30, x ≥30 . Also, the masked pixels have weight 0. The resulting B-MSE and B-MAE scores are computed as B-MSE = 1 N PN n=1 P480 i=1 P480 j=1 wn,i,j(xn,i,j −ˆxn,i,j)2 and B-MAE = 1 N PN n=1 P480 i=1 P480 j=1 wn,i,j|xn,i,j − ˆxn,i,j|, where N is the total number of frames and wn,i,j is the weight corresponding to the (i, j)th pixel in the nth frame. For the conventional MSE and MAE measures, we simply set all the weights to 1 except the masked points. 5.3 Evaluated Algorithms We have evaluated seven nowcasting algorithms, including the simplest model which always predicts the last frame, two optical flow based methods (ROVER and its nonlinear variant), and four deep learning methods (TrajGRU, ConvGRU, 2D CNN, and 3D CNN). Specifically, we have evaluated the performance of deep learning models in the online setting by fine-tuning the algorithms using AdaGrad [4] with learning rate equal to 10−4. We optimize the sum of B-MSE and B-MAE during offline training and online fine-tuning. During the offline training process, all models are optimized by the Adam optimizer with learning rate equal to 10−4 and momentum equal to 0.5 and we train these models with early-stopping on the sum of B-MSE and B-MAE. For RNN models, the training batch size is set to 4. For the CNN models, the training batch size is set to 8. For TrajGRU and ConvGRU models, we use a 3-layer encoding-forecasting structure with the number of filters for the RNNs set to 64, 192, 192. We use kernel size equal to 5 × 5, 5 × 5, 3 × 3 for the ConvGRU models while the number of links is set to 13, 13, 9 for the TrajGRU model. We also train the ConvGRU model with the original MSE and MAE loss, which is named “ConvGRU-nobal”, to evaluate the improvement by training with the B-MSE and B-MAE loss. The other model configurations including ROVER, ROVER-nonlinear and deep models are included in the appendix. 5.4 Evaluation Results The overall evaluation results are summarized in Table 3. In order to analyze the confidence interval of the results, we train 2D CNN, 3D CNN, ConvGRU and TrajGRU models using three different random seeds and report the standard deviation in Table 4. We find that training with balanced loss functions is essential for good nowcasting performance of heavier rainfall. The ConvGRU model that is trained without balanced loss, which best represents the model in [23], has worse nowcasting score than the optical flow based methods at the 10mm/h and 30mm/h thresholds. Also, we find that all the deep learning models that are trained with the balanced loss outperform the optical flow based models. Among the deep learning models, TrajGRU performs the best and 3D CNN outperforms 2D CNN, which shows that an appropriate network structure is crucial to achieving good performance. The improvement of TrajGRU over the other models is statistically significant because the differences in B-MSE and B-MAE are larger than three times their standard deviation. Moreover, the performance with online fine-tuning enabled is consistently better than that without online fine-tuning, which verifies the effectiveness of online learning at least for this task. 8 Table 3: HKO-7 benchmark result. We mark the best result within a specific setting with bold face and the second best result by underlining. Each cell contains the mean score of the 20 predicted frames. In the online setting, all algorithms have used the online learning strategy described in the paper. ‘↑’ means that the score is higher the better while ‘↓’ means that the score is lower the better. ‘r ≥τ’ means the skill score at the τmm/h rainfall threshold. For 2D CNN, 3D CNN, ConvGRU and TrajGRU models, we train the models with three different random seeds and report the mean scores. Algorithms CSI ↑ HSS ↑ B-MSE ↓B-MAE ↓ r ≥0.5 r ≥2 r ≥5 r ≥10 r ≥30 r ≥0.5 r ≥2 r ≥5 r ≥10 r ≥30 Offline Setting Last Frame 0.4022 0.3266 0.2401 0.1574 0.0692 0.5207 0.4531 0.3582 0.2512 0.1193 15274 28042 ROVER + Linear 0.4762 0.4089 0.3151 0.2146 0.1067 0.6038 0.5473 0.4516 0.3301 0.1762 11651 23437 ROVER + Non-linear 0.4655 0.4074 0.3226 0.2164 0.0951 0.5896 0.5436 0.4590 0.3318 0.1576 10945 22857 2D CNN 0.5095 0.4396 0.3406 0.2392 0.1093 0.6366 0.5809 0.4851 0.3690 0.1885 7332 18091 3D CNN 0.5109 0.4411 0.3415 0.2424 0.1185 0.6334 0.5825 0.4862 0.3734 0.2034 7202 17593 ConvGRU-nobal 0.5476 0.4661 0.3526 0.2138 0.0712 0.6756 0.6094 0.4981 0.3286 0.1160 9087 19642 ConvGRU 0.5489 0.4731 0.3720 0.2789 0.1776 0.6701 0.6104 0.5163 0.4159 0.2893 5951 15000 TrajGRU 0.5528 0.4759 0.3751 0.2835 0.1856 0.6731 0.6126 0.5192 0.4207 0.2996 5816 14675 Online Setting 2D CNN 0.5112 0.4363 0.3364 0.2435 0.1263 0.6365 0.5756 0.4790 0.3744 0.2162 6654 17071 3D CNN 0.5106 0.4344 0.3345 0.2427 0.1299 0.6355 0.5736 0.4766 0.3733 0.2220 6690 16903 ConvGRU 0.5511 0.4737 0.3742 0.2843 0.1837 0.6712 0.6105 0.5183 0.4226 0.2981 5724 14772 TrajGRU 0.5563 0.4798 0.3808 0.2914 0.1933 0.6760 0.6164 0.5253 0.4308 0.3111 5589 14465 Table 4: Confidence intervals of selected deep models in the HKO-7 benchmark. We train 2D CNN, 3D CNN, ConvGRU and TrajGRU using three different random seeds and report the standard deviation of the test scores. Algorithms CSI HSS B-MSE B-MAE r ≥0.5 r ≥2 r ≥5 r ≥10 r ≥30 r ≥0.5 r ≥2 r ≥5 r ≥10 r ≥30 Offline Setting 2D CNN 0.0032 0.0023 0.0015 0.0001 0.0025 0.0032 0.0025 0.0018 0.0003 0.0043 90 95 3D CNN 0.0043 0.0027 0.0016 0.0024 0.0024 0.0042 0.0028 0.0018 0.0031 0.0041 44 26 ConvGRU 0.0022 0.0018 0.0031 0.0008 0.0022 0.0022 0.0021 0.0040 0.0010 0.0038 52 81 TrajGRU 0.0020 0.0024 0.0025 0.0031 0.0031 0.0019 0.0024 0.0028 0.0039 0.0045 18 32 Online Setting 2D CNN 0.0002 0.0005 0.0002 0.0002 0.0012 0.0002 0.0005 0.0002 0.0003 0.0019 12 12 3D CNN 0.0004 0.0003 0.0002 0.0003 0.0008 0.0004 0.0004 0.0003 0.0004 0.0001 23 27 ConvGRU 0.0006 0.0012 0.0017 0.0019 0.0024 0.0006 0.0012 0.0019 0.0023 0.0031 30 69 TrajGRU 0.0008 0.0004 0.0002 0.0002 0.0002 0.0007 0.0004 0.0002 0.0002 0.0003 10 20 Table 5: Kendall’s τ coefficients between skill scores. Higher absolute value indicates stronger correlation. The numbers with the largest absolute values are shown in bold face. Skill Scores CSI HSS r ≥0.5 r ≥2 r ≥5 r ≥10 r ≥30 r ≥0.5 r ≥2 r ≥5 r ≥10 r ≥30 MSE -0.24 -0.39 -0.39 -0.07 -0.01 -0.33 -0.42 -0.39 -0.06 0.01 MAE -0.41 -0.57 -0.55 -0.25 -0.27 -0.50 -0.60 -0.55 -0.24 -0.26 B-MSE -0.70 -0.57 -0.61 -0.86 -0.84 -0.62 -0.55 -0.61 -0.86 -0.84 B-MAE -0.74 -0.59 -0.58 -0.82 -0.92 -0.67 -0.57 -0.59 -0.83 -0.92 Based on the evaluation results, we also compute the Kendall’s τ coefficients [13] between the MSE, MAE, B-MSE, B-MAE and the CSI, HSS at different thresholds. As shown in Table 5, B-MSE and B-MAE have stronger correlation with the CSI and HSS in most cases. 6 Conclusion and Future Work In this paper, we have provided the first large-scale benchmark for precipitation nowcasting and have proposed a new TrajGRU model with the ability of learning the recurrent connection structure. We have shown TrajGRU is more efficient in capturing the spatiotemporal correlations than ConvGRU. For future work, we plan to test if TrajGRU helps improve other spatiotemporal learning tasks like visual object tracking and video segmentation. We will also try to build an operational nowcasting system using the proposed algorithm. 9 Acknowledgments This research has been supported by General Research Fund 16207316 from the Research Grants Council and Innovation and Technology Fund ITS/205/15FP from the Innovation and Technology Commission in Hong Kong. The first author has also been supported by the Hong Kong PhD Fellowship. References [1] Alexandre Alahi, Kratarth Goel, Vignesh Ramanathan, Alexandre Robicquet, Li Fei-Fei, and Silvio Savarese. Social LSTM: Human trajectory prediction in crowded spaces. In CVPR, 2016. [2] Nicolas Ballas, Li Yao, Chris Pal, and Aaron Courville. Delving deeper into convolutional networks for learning video representations. In ICLR, 2016. [3] Bert De Brabandere, Xu Jia, Tinne Tuytelaars, and Luc Van Gool. Dynamic filter networks. In NIPS, 2016. [4] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011. [5] Chelsea Finn, Ian Goodfellow, and Sergey Levine. Unsupervised learning for physical interaction through video prediction. In NIPS, 2016. [6] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. [7] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. [8] Robin J Hogan, Christopher AT Ferro, Ian T Jolliffe, and David B Stephenson. Equitability revisited: Why the “equitable threat score” is not equitable. Weather and Forecasting, 25(2):710–726, 2010. [9] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In CVPR, 2017. [10] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In NIPS, 2015. [11] Ashesh Jain, Amir R Zamir, Silvio Savarese, and Ashutosh Saxena. Structural-RNN: Deep learning on spatio-temporal graphs. In CVPR, 2016. [12] Yunho Jeon and Junmo Kim. Active convolution: Learning the shape of convolution for image classification. In CVPR, 2017. [13] Maurice G Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81–93, 1938. [14] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [15] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [16] Hansoo Lee and Sungshin Kim. Ensemble classification for anomalous propagation echo detection with clustering-based subset-selection method. Atmosphere, 8(1):11, 2017. [17] Xiaodan Liang, Liang Lin, Xiaohui Shen, Jiashi Feng, Shuicheng Yan, and Eric P Xing. Interpretable structure-evolving LSTM. In CVPR, 2017. [18] Andrew L Maas, Awni Y Hannun, and Andrew Y Ng. Rectifier nonlinearities improve neural network acoustic models. In ICML, 2013. [19] John S Marshall and W Mc K Palmer. The distribution of raindrops with size. Journal of Meteorology, 5(4):165–166, 1948. [20] Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square error. In ICLR, 2016. [21] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams, Luc Van Gool, Markus Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In CVPR, 2016. [22] MarcAurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. Video (language) modeling: a baseline for generative models of natural videos. arXiv preprint arXiv:1412.6604, 2014. [23] Xingjian Shi, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In NIPS, 2015. [24] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhutdinov. Unsupervised learning of video representations using LSTMs. In ICML, 2015. [25] Juanzhen Sun, Ming Xue, James W Wilson, Isztar Zawadzki, Sue P Ballard, Jeanette Onvlee-Hooimeyer, Paul Joe, Dale M Barker, Ping-Wah Li, Brian Golding, et al. Use of NWP for nowcasting convective 10 precipitation: Recent progress and challenges. Bulletin of the American Meteorological Society, 95(3):409– 426, 2014. [26] Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In ICLR, 2017. [27] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In NIPS, 2016. [28] Wang-chun Woo and Wai-kin Wong. Operational application of optical flow techniques to radar-based rainfall nowcasting. Atmosphere, 8(3):48, 2017. [29] Yi Wu, Jongwoo Lim, and Ming-Hsuan Yang. Online object tracking: A benchmark. In CVPR, 2013. [30] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. In ICLR, 2016. 11 | 2017 | 436 |
6,937 | Scalable Model Selection for Belief Networks Zhao Song†, Yusuke Muraoka∗, Ryohei Fujimaki∗, Lawrence Carin† †Department of ECE, Duke University Durham, NC 27708, USA {zhao.song, lcarin}@duke.edu ∗NEC Data Science Research Laboratories Cupertino, CA 95014, USA {ymuraoka, rfujimaki}@nec-labs.com Abstract We propose a scalable algorithm for model selection in sigmoid belief networks (SBNs), based on the factorized asymptotic Bayesian (FAB) framework. We derive the corresponding generalized factorized information criterion (gFIC) for the SBN, which is proven to be statistically consistent with the marginal log-likelihood. To capture the dependencies within hidden variables in SBNs, a recognition network is employed to model the variational distribution. The resulting algorithm, which we call FABIA, can simultaneously execute both model selection and inference by maximizing the lower bound of gFIC. On both synthetic and real data, our experiments suggest that FABIA, when compared to state-of-the-art algorithms for learning SBNs, (i) produces a more concise model, thus enabling faster testing; (ii) improves predictive performance; (iii) accelerates convergence; and (iv) prevents overfitting. 1 Introduction The past decade has witnessed a dramatic increase in popularity of deep learning [20], stemming from its state-of-the-art performance across many domains, including computer vision [19], reinforcement learning [27], and speech recognition [15]. However, one important issue in deep learning is that its performance is largely determined by the underlying model: a larger and deeper network tends to possess more representational power, but at the cost of being more prone to overfitting [32], and increased computation. The latter issue presents a challenge for deployment to devices with constrained resources [2]. Inevitably, an appropriate model-selection method is required to achieve good performance. Model selection is here the task of selecting the number of layers and the number of nodes in each layer. Despite the rapid advancement in performance of deep models, little work has been done to address the problem of model selection. As a basic approach, cross-validation selects a model according to a validation score. However, this is not scalable, as its complexity is exponential with respect to the number of layers in the network: O(JLMAX MAX ), where JMAX and LMAX represent the maximum allowed numbers of nodes in each layer and number of layers, respectively. In Alvarez and Salzmann [2], a constrained optimization approach was proposed to infer the number of nodes in convolutional neural networks (CNNs); the key idea is to incorporate a sparse group Lasso penalty term to shrink all edges flowing into a node. Based on the shrinkage mechanism of the truncated gamma-negative binomial process, Zhou et al. [36] showed that the number of nodes in Poisson gamma belief networks (PGBNs) can be learned. Furthermore, we empirically observe that the shrinkage priors employed in Gan et al. [11], Henao et al. [14], Song et al. [31] can potentially perform model selection in certain tasks, even though this was not explicitly discussed in those works. One common problem for these approaches, however, is that the hyperparameters need to be tuned in order to achieve good performance, which may be time-consuming for some applications involving deep networks. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The factorized asymptotic Bayesian (FAB) approach has recently been shown as a scalable modelselection framework for latent variable models. Originally proposed for mixture models [9], it was later extended to the hidden Markov model (HMM) [8], latent feature model (LFM) [12], and relational model [22]. By maximizing the approximate marginal log-likelihood, FAB introduces an ℓ0 regularization term on latent variables, which can automatically estimate the model structure by eliminating irrelevant latent features through an expectation maximization [7] (EM)-like alternating optimization, with low computational cost. Figure 1: Requirement for removal of nodes in (Left) SBN and (Right) FNN (dashed circles denote nodes that can be removed). Note that a node in the SBN can be removed only if all of its connected edges shrink. For FNN, shrinkage of all incoming edges eliminates a node. We develop here a scalable model selection algorithm within the FAB framework to infer the size of SBNs [28], a popular component of deep models, e.g., deep belief networks (DBN) [16] and deep Poisson factor analysis (DPFA) [10], and we assume here the depth of the SBN is fixed. Since the mean-field assumption used in FAB does not hold in SBNs, we employ a recognition network [18, 29, 25, 26] to represent the variational distribution. As our method combines the advantages of FAB Inference and Autoencoding variational Bayesian (VB) frameworks, we term it as FABIA. To handle large datasets, we also derive a scalable version of FABIA with mini-batches. As opposed to previous works, which predefine the SBN size [28, 30, 25, 5, 11, 6, 31, 26], FABIA determines it automatically. It should be noted that model selection in SBNs is more challenging than CNNs and feedforward neural networks (FNNs). As shown in Figure 1, simply imposing a sparsity prior or a group sparsity prior as employed in CNNs [2] and SBNs [11, 14, 31] does not necessarily shrink a node in SBN, since such approaches cannot guarantee to shrink all edges connected to a node. FABIA possesses the following distinguishing features: (i) a theoretical guarantee that its objective function, the generalized factorized information criterion (gFIC), is statistically consistent with the model’s marginal log-likelihood; and (ii) prevention of overfitting in large networks when the amount of training data is not sufficiently large, thanks to an intrinsic shrinkage mechanism. We also detail that FABIA has important connections with previous work on model regularization, such as Dropout [32], Dropconnect [35], shrinkage priors [11, 36, 14, 31], and automatic relevance determination (ARD) [34]. 2 Background An SBN is a directed graphical model for which the distribution of each layer is determined by the preceding layer via the sigmoid function, defined as σ(x) ≜1/[1 + exp(−x)]. Let h(l) denote the lth hidden layer with Jl units, and v represent the visible layer with M units. The generative model of the SBN, with L hidden layers, is represented as p(h(L)|b) = JL Y i=1 [σ(bi)]h(L) i [σ(−bi)]1−h(L) i , p(h(l)|h(l+1)) = Jl Y i=1 [σ(ψ(l) i )]h(l) i [σ(−ψ(l) i )]1−h(l) i where l = 1, . . . , L−1, ψ(l) i = W (l) i· h(l+1)+c(l) i , and b corresponds to prior parameters; the notation i· means the ith row of a matrix. For the link function of the visible layer, i.e., p(v|h(1)), we use the sigmoid function for binary data and the multinomial function for count data, as in Mnih and Gregor [25], Carlson et al. [6]. One difficulty of learning SBNs is the evaluation of the expectation with respect to the posterior distribution of hidden variables [31]. In Mnih and Gregor [25], a recognition network under the variational auto-encoding (VAE) framework [18] was proposed to approximate this intractable expectation. Compared with the Gibbs sampler employed in Gan et al. [11], Carlson et al. [6], Song et al. [31], the recognition network enables fast sampling of hidden variables in blocks. The variational parameters in 2 the recognition network can be learned via stochastic gradient descent (SGD), as shown in the neural variational inference and learning (NVIL) algorithm [25], for which multiple variance reduction techniques have been proposed to obtain better gradient estimates. Note that all previous work on learning SBNs assumes that a model with a fixed number of nodes in each layer has been provided. To select a model for an SBN, we follow the FAB framework [9], which infers the structure of a latent variable model by Bayesian inference. Let θ = {W, b, c} denote the model parameters and M be the model, with the goal in the FAB framework being to obtain the following maximum-likelihood (ML) estimate: c MML = arg max M N X n=1 ln p(vn|M) = arg max M N X n=1 ln X hn Z p(vn, hn|θ)p(θ|M) dθ (1) As a key feature of the FAB framework, the ℓ0 penalty term on hn induced by approximating (1) can remove irrelevant latent variables from the model (“shrinkage mechanism"). In practice, we can start from a large model and gradually reduce its size through this “shrinkage mechanism" until convergence. Although a larger model has more representational capacity, a smaller model with similar predictive performance is preferred in practice, given a computational budget. A smaller model also enables faster testing, a desirable property in many machine learning tasks. Furthermore, a smaller model implies more robustness to overfitting, a common danger in deeper and larger models with insufficient training data. Since the integration in (1) is in general intractable, Laplace’s method [23] is employed in FAB inference for approximation. Consequently, gFIC can be derived as a surrogate function of the marginal log-likelihood. By maximizing the variational lower bound of gFIC, one obtains estimates of both parameters and the underlying model size. Note that while FAB inference uses the mean-field approximation for the variational distribution [9, 8, 22, 21], the same does not hold for SBNs, due to the correlation within hidden variables given the data. In contrast, the recognition network has been designed to approximate the posterior distribution of hidden variables with more fidelity [18, 29, 25]. Therefore, it can be a better candidate for the variational distribution in our task. 3 The FABIA Algorithm 3.1 gFIC for SBN Following the FAB inference approach, we first lower bound the marginal log-likelihood in (1) via a variational distribution q(h|φ) as 1 ln X hn Z p(vn, hn|θ)p(θ|M) dθ ≥ X hn q(hn|φ) ln R p(vn, hn|θ) p(θ|M) dθ q(hn|φ) . By applying Laplace’s method [23], we obtain ln p(v, h|M) = Dθ 2 ln(2π N ) + N X n=1 ln p(vn, hn|bθ) + ln p(bθ|M) −1 2 M X m=1 ln |Ψm| + O(1) (2) where Dθ refers to the dimension of θ, bθ represents the ML estimate of θ, and Ψm represents the negative Hessian of the log-likelihood with respect to Wm·. Since ln |Ψm| in (2) cannot be represented with an analytical form, we must approximate it first, for the purpose of efficient optimization of the marginal log-likelihood. Following the gFIC [13] approach, we propose performing model selection in SBNs by introducing the shrinkage mechanism from this approximation. We start by providing the following assumptions, which are useful in the proof of our main theoretical results in Theorem 1. Assumption 1. The matrix PN n=1 ηn hT n hn has full rank with probability 1 as N →∞, where ηn ∈(0, 1). 1For derivation clarity, we assume only one hidden layer and drop the bias term in the SBN 3 Note that this full-rank assumption implies that the SBN can preserve information in the large-sample limit, based on the degeneration analysis of gFIC [13]. Assumption 2. hn,j, ∀j is generated from a Bernoulli distribution as hn,j ∼Ber(τj), where τj > 0. Theorem 1. As N →∞, ln |Ψm| can be represented with the following equality: ln |Ψm| = X j ln X n hn,j −ln N + O(1) (3) Proof. We first compute the negative Hessian as Ψm = −1 N ∂ ∂W T m· ∂Wm· X n ln p(vn, hn|θ) = 1 N X n σ(Wm·hn) σ(−Wm·hn) hT n hn. From Assumption 1, Ψm has full rank, since σ(x) ∈(0, 1), ∀x ∈R. Furthermore, the determinant of Ψm is bounded, since Ψm ij ∈(0, 1), ∀i, j. Next, we define the following diagonal matrix Λ ≜diag (P n hn,1) N , . . . , (P n hn,J) N . From Assumption 2, limN→∞Pr[P n hn,j = 0] = 0, ∀j. Therefore, Λ is full-rank and its determinant is bounded, when N →∞. Subsequently, we can decompose it as Ψm = Λ F (4) where F also has full rank and bounded determinant. Finally, applying the log determinant operator to the right side of (4) leads to our conclusion. To obtain the gFIC for SBN, we first follow the previous FAB approaches [9, 12, 22] to assume the log-prior of θ to be constant with respect to N, i.e., limN→∞ ln p(θ|M) N = 0. We then apply Theorem 1 to (2) and have gFICSBN = max q Eq −M 2 X j ln X n hn,j + N X n=1 ln p(vn, hn|bθ) + MJ −Dθ 2 ln N + H(q) (5) where H(q) is the entropy for the variational distribution q(h). As a key quantity in (5), M 2 P j(ln P n hn,j) can be viewed as a regularizer over the model to execute model selection. This term directly operates on hidden nodes to perform shrinkage, which distinguishes our approach from previous work [11, 14, 31], where sparsity priors are assigned over edges. As illustrated in Figure 1, these earlier approaches do not necessarily shrink hidden nodes, as setting up a prior or a penalty term to shrink all edges connected to a node is very challenging in SBNs. Furthermore, the introduction of this quantity does not bring any cost of tuning parameters with crossvalidation. In contrast, the Lagrange parameter in Alvarez and Salzmann [2] and hyperparameters for priors in Gan et al. [11], Henao et al. [14], Zhou et al. [36], Song et al. [31] all need to be properly set, which may be time-consuming in certain applications involving deep and large networks. Under the same regularity conditions as Hayashi and Fujimaki [12], gFICSBN is statistically consistent with the marginal log-likelihood, an important property of the FAB framework. Corollary 1. As N →∞, ln p(v|M) = gFICSBN + O(1). Proof. The conclusion holds as a direct extension of the consistency results in Hayashi and Fujimaki [12]. 3.2 Optimization of gFIC The gFICSBN in (5) cannot be directly optimized, because (i) the ML estimator bθ is in general not available, and (ii) evaluation of the expectation over hidden variables is computationally expensive. Instead, the proposed FABIA algorithm optimizes the lower bound as gFICSBN ≥−M 2 X j ln X n Eq(hn,j) + N X n=1 Eq ln p(vn, hn|θ) + H(q) (6) 4 where we use the following facts to get the lower bound: (i) p(vn, hn|bθ) ≥p(vn, hn|θ), ∀θ; (ii) the concavity of the logarithm function; (iii) Dθ ≤MJ; and (iv) the maximum of all possible variational distributions q in (5). This leaves the choice of the form of the variational distribution. We could use the mean-field approximation as in previous FAB approaches [9, 8, 12, 13, 22, 21]. However, this approximation fails to capture the dependencies between hidden variables in SBN, as discussed in Song et al. [31]. Instead, we follow the recent auto-encoding VB approach [18, 29, 25, 26] to model the variational distribution with a recognition network, which maps vn to q(hn|vn, φ). Specifically, q(hn|vn, φ) = QJ j=1 q(hn,j|vn, φ) = QJ j=1 Ber[σ(φj·vn)], where φ ∈RJ×M parameterizes the recognition network. Not only does using a recognition network allow us to more accurately model the variational distribution, it also enables faster sampling of hidden variables. The optimization of the lower bound in (6) can be executed via SGD; we use the Adam algorithm [17] as our optimizer. To reduce gradient variance, we employ the NVIL algorithm to estimate gradients in both generative and recognition networks. We also note that other methods, such as the importancesampled objectives method [5, 26, 24], can be used and such an extension is left for future work. Since M 2 P j ln P n Eq(hn,j) in (6) is only dependent on q, gradients of the generative model in our FABIA algorithm and NVIL should be the same. However, gradients of the recognition network in FABIA are regularized to shrink the model, which is lacking in the standard VAE framework. We note that FABIA is a flexible framework, as its shrinkage term can be combined with any gradientbased variational auto-encoding methods to perform model selection, where only minimal changes to the gradients of the recognition network of the original methods are necessary. A node j at level l will be removed from the model if it satisfies 1 N PN n=1 Eq(h(l) n,j) ≤ϵ(l), where ϵ(l) is a threshold parameter to control the model size. This criterion has an intuitive interpretation that a node should be removed if the proportion of its samples equaling 1 is small. When the expectation is not exact, such as in the top layers, we use samples drawn from the recognition network to approximate it. 3.3 Minibatch gFIC To handle large datasets, we adapt the gFICSBN developed in (5) to use minibatches (which is also appropriate for online learning). Suppose that each mini-batch contains Nmini data points, and currently we have seen T mini-batches, an unbiased estimator for (5) (up to constant terms) is then ^ gFICSBN = max q Eq −M 2 X j ln Nmini X i=1 hi+NT ,j + T Nmini X i=1 ln p(vi+NT , hi+NT |bθ) q(hi+NT |φ) + MJ −Dθ 2 ln NT +1 (7) where NT = (T −1)Nmini. Derivation details are provided in Supplemental Materials. An interesting observation in (7) is that ^ gFICSBN can automatically adjust shrinkage over time: At the beginning of the optimization, i.e., when T is small, the shrinkage term M 2 P j ln(PNmini i=1 hi+NT ,j) is more dominant in (7). As T becomes larger, the model is more stable and shrinkage gradually disappears. This phenomenon is also observed in our experiments in Section 5. 3.4 Computational complexity The NVIL algorithm has complexity O(MJNtrain) for computing gradients in both the generative model and recognition network. FABIA needs an extra model selection step, also with complexity O(MJNtrain) per step. As the number of training iteration increases, the additional cost to perform model selection is offset by the reduction of time when computing gradients, as observed in Figure 3. In test, the complexity is O(MJNtestK) per step, with K being the number of samples taken to compute the variational lower bound. Therefore, shrinkage of nodes can linearly reduce the testing time. 5 4 Related Work Dropout As a standard approach to regularize deep models, Dropout [32] randomly removes a certain number of hidden units during training. Note that FABIA shares this important characteristic by directly operating on nodes, instead of edges, to regularize the model, which has a more direct connection with model selection. One important difference is that in each training iteration, Dropout updates only a subset of the model; in contrast, FABIA updates every parameter in the model, which enables faster convergence. Shrinkage prior The shrinkage sparsity-inducing approach aims to shrink edges in a model, by employing either shrinkage priors [11, 14, 36, 31] or a random mask [35] on the weight matrix. In FABIA, the penalty term derived in gFIC of (5) also has the shrinkage property, but the shrinkage effect is instead imposed on the nodes. Furthermore, shrinkage priors are usually approached from the Bayesian framework, where Markov chain Monte Carlo (MCMC) is often needed for inference. In contrast, FABIA integrates the shrinkage mechanism from gFIC into the auto-encoding VB approach and thus is scalable to large deep models. Group Sparsity Application of group sparsity can be viewed as an extension of the shrinkage prior, with the key idea being to enforce sparsity on entire rows (columns) of the weight matrix [2]. This corresponds to the ARD prior [34] where each row (column) has an individual hyperparameter. In FNNs and CNNs, this is equivalent to node shrinkage in FABIA for SBNs. The structure of SBNs precludes a direct application of the group sparsity approach for model selection, but there exists an interesting opportunity for future work to extend FABIA to FNNs and CNNs. Nonparametric Prior In Adams et al. [1], a cascading Indian buffet process (IBP) based approach was proposed to infer the structure of the Gaussian belief network with continuous hidden units, for which the inference was performed via MCMC. By employing the nonparametric properties of the IBP prior, this approach can adjust the model size with observations. Due to the high computational cost of MCMC, however, it may not be scalable to large problems. 5 Experiments We test the proposed FABIA algorithm on synthetic data, as well as real image and count data. For comparison, we use the NVIL algorithm [25] as a baseline method, which does not have the model selection procedure. Both FABIA and NVIL are implemented in Theano [4] and tested on a machine with 3.0GHz CPU and 64GB RAM. The learning rate in Adam is set to be 0.001 and we follow the default settings of other parameters in all of our experiments. We set the threshold parameter ϵ(l) to be 0.001, ∀l unless otherwise stated. We also tested Dropout but did not notice any clear improvement. The purpose of these experiments is to show that FABIA can automatically learn the model size, and achieve better or competitive performance with a more compact model. 5.1 Synthetic Dataset The synthetic data are generated from a one-layer SBN and a two-layer SBN, with M = 30 visible units in both cases. We simulate 1250 data points, and then follow an 80/20% split to obtain the training and test sets. For the one-layer case, we employ a true model with 5 nodes and initialize FABIA and NVIL with 25 nodes. For the two-layer case, the true network has the structure of 10-5 2, and we initialize FABIA and NVIL with a network of 25-15. We compare the inferred SBN structure and test log-likelihood for FABIA, the NVIL algorithm initialized with the same model size as FABIA (denoted as “NVIL"), and the NVIL algorithm initialized with the true model size (denoted as “NVIL (True)”). One hundred independent random trials are conducted to report statistics. Figure 2(a) shows the mean and standard deviation of the number of nodes inferred by FABIA, as a function of iteration number. In both one- and two-layer cases, the mean of the inferred model size is very close to the ground truth. In Figure 2(b), we compare the convergence in terms of the test log-likelihood for different algorithms: FABIA has almost the same convergence speed as NVIL with 2We list the number of nodes in the deeper layer first in all of our experiments. 6 0 1 2 3 4 5 6 7 Iteration 1e2 0 5 10 15 20 25 Number of nodes Level 1 0 1 2 3 4 5 6 7 Iteration 1e2 0 5 10 15 20 25 Number of nodes Level 1 Level 2 (a) 0 50 100 150 200 Time (seconds) −19.5 −19.0 −18.5 −18.0 −17.5 −17.0 −16.5 −16.0 Test log-likelihood FABIA NVIL (True) NVIL 0 50 100 150 200 250 Time (seconds) −19.0 −18.5 −18.0 −17.5 −17.0 −16.5 Test log-likelihood FABIA NVIL (True) NVIL (b) Figure 2: (a) Inferred number of nodes from FABIA in (Left) one- and (Right) two-layer cases; (b) Test log-likelihood for different methods in (Left) one- and (Right) two-layer cases. the true model, both of which have remarkable gaps over the NVIL variant initialized with the same model size as FABIA. 5.2 Image Modeling We use the publicly available MNIST dataset, which contains 60, 000 training and 10, 000 test images of size 28 × 28. Our performance metric is the variational lower bound of the test log-likelihood. The mini-batches for FABIA and NVIL are set to 100. For this dataset we compared FABIA with the VB approach in Gan et al. [11] and Rec-MCEM in Song et al. [31]. The VB approach in Gan et al. [11] can potentially shrink nodes, due to the three parameter beta-normal (TPBN) prior [3]. We claim a node h(l) j can be removed from the model, if its adjacent weight matrices satisfy P k[W (l) k,j]2/J(l−1) < 10−8 and P k[W (l+1) j,k ]2/J(l+1) < 10−8. We run the code provided in https://github.com/ zhegan27/dsbn_aistats2015 and use default parameter settings to report the VB results. We also implemented the Rec-MCEM approach but only observed shrinkage of edges, not nodes. Table 1: Model size, test variational lower bound (VLB) (in nats), and test time (in seconds) on the MNIST dataset. Note that FABIA and VB start from the same model size as NVIL and Rec-MCEM. Method Size VLB Time VB 81 -117.04 8.94 Rec-MCEM 200 -116.70 8.52 NVIL 200 -115.63 8.47 FABIA 107 −114.96 6.88 VB 200-11 -113.69 22.37 Rec-MCEM 200-200 -106.54 12.25 NVIL 200-200 -105.62 12.34 FABIA 135-93 −104.92 9.18 NVIL 200-200-200 -101.99 15.66 FABIA 136-77-72 −101.14 10.97 Table 1 shows the variational lower bound of the test log-likelihood, model size, and test time for different algorithms. FABIA achieves the highest test log-likelihood in all cases and converges to smaller models, compared to NVIL. FABIA also benefits from its more compact model to have the smallest test time. Furthermore, we observe that VB always overshrinks nodes in the top layer, which might be related to the settings of hyperparameters. Unlike VB, FABIA avoids the difficult task of tuning hyperparameters to balance predictive performance and model size. We also notice that the deeper layer in the two-layer model did not shrink in VB, as our experiments suggest that all nodes in the deeper layer still have connections with nodes in adjacent layers. Figure 3 shows the variational lower bound of the test log-likelihood and number of nodes in FABIA, as a function of CPU time, for different initial model sizes. Additional plots as a function of the number of iterations are provided in Supplemental Materials, which are similar to Figure 3. We note that FABIA initially has a similar log-likelihood that gradually outperforms NVIL, which can be explained by the fact that FABIA initially needs additional time to perform the shrinkage step but later converges to a smaller and better model. This gap becomes more obvious when we increase the number of hidden units from 200 to 500. The deteriorating performance of NVIL is most likely due to overfitting. In contrast, FABIA is robust to the change of the initial model size. 7 0.0 0.5 1.0 1.5 2.0 Time (seconds) 1e5 −130 −125 −120 −115 −110 −105 −100 Test log-likelihood Fabia NVIL 0.0 0.5 1.0 1.5 2.0 Time (seconds) 1e5 80 100 120 140 160 180 200 Number of nodes Level 1 Level 2 Level 3 (a) 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Time (seconds) 1e5 −140 −135 −130 −125 −120 −115 −110 −105 −100 Test log-likelihood Fabia NVIL 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Time (seconds) 1e5 100 150 200 250 300 350 400 450 500 Number of nodes Level 1 Level 2 Level 3 (b) Figure 3: Test log-likelihood and the number of nodes in FABIA, as a function of CPU time on the MNIST dataset, for an SBN with initial size as (a) 200-200-200 (b) 500-500-500. 5.3 Topic Modeling The two benchmarks we used for topic modeling are Reuters Corpus Volume I (RCV1) and Wikipedia, as in Gan et al. [10], Henao et al. [14]. RCV1 contains 794,414 training and 10,000 testing documents, with a vocabulary size of 10,000. Wikipedia is composed of 9,986,051 training documents, 1,000 test documents, and 7,702 words. The performance metric we use is the predictive perplexity on the test set, which cannot be directly evaluated. Instead, we follow the approach of 80/20% split on the test set, with details provided in Gan et al. [10]. We compare FABIA against DPFA [10], deep Poisson factor modeling (DPFM) [14], MCEM [31], Over-RSM [33], and NVIL. For both FABIA and NVIL, we use a mini-batch of 200 documents. The results for other methods are cited from corresponding references. We test DPFA and DPFM with the publicly available code provided by the authors; however, no shrinkage of nodes are observed in our experiments. Table 2 shows the perplexities of different algorithms on the RCV1 and Wikipedia datasets, respectively. Both FABIA and NVIL outperform other methods with marked margins. 100 400 1000 2000 # of nodes in the 1st layer 800 850 900 950 1000 Test Perplexity RCV1 FABIA NVIL 100 400 1000 2000 # of nodes in the 1st layer 600 650 700 750 800 850 900 950 1000 Test Perplexity Wikipedia FABIA NVIL Figure 4: Test perplexities as a function of number of nodes in the first layer, in the two-layer case. Interestingly, we note that FABIA does not shrink any nodes in the first layer, which is likely due to the fact that these two datasets have a large number of visible units and thus a sufficiently large first hidden layer is necessary. This requirement of a large first hidden layer to properly model the data may also explain why NVIL does not overfit on these datasets as much as it does on MNIST; the training set of these datasets being sufficiently large is another possible explanation. We also computed test time but did not observe any clear improvement of FABIA over NVIL, which may be explained by the fact that most of the computation is spent on the first layer in these two benchmarks. In Figure 4, we vary the number of hidden units in the first layer and fix the number of nodes in other layers to be 400. We use early stopping for NVIL to prevent it from overfitting with larger networks. For the networks with 100 and 400 nodes in the first layer, FABIA and NVIL have roughly the same perplexities. Once the number of nodes is increased to 1000, FABIA starts to outperform NVIL with remarkable gaps, which implies that FABIA can handle the overfitting problem, as a consequence of its shrinkage mechanism for model selection. We also observed that setting a larger ϵ(1) for the first layer in the 2000 units case for FABIA can stabilize its performance; 8 Table 2: Test perplexities and model size on the benchmarks. FABIA starts from a model initialized with 400 hidden units in each layer. RCV1 Wikipedia Size Perplexity Size Perplexity Over-RSM 128 1060 MCEM 128 1023 DPFA-SBN 1024-512-256 964 1024-512-256 770 DPFA-RBM 128-64-32 920 128-64-32 942 DPFM 128-64 908 128-64 783 NVIL 400-400 857 400-400 735 FABIA 400-156 856 400-151 730 we choose this value by cross-validation. The results for three layers are similar and are included in Supplemental Materials. 6 Conclusion and Future Work We develop an automatic method to select the number of hidden units in SBNs. The proposed gFIC criterion is proven to be statistically consistent with the model’s marginal log-likelihood. By maximizing gFIC, the FABIA algorithm can simultaneously execute model selection and inference tasks. Furthermore, we show that FABIA is a flexible framework that can be combined with autoencoding VB approaches. Our experiments on various datasets suggest that FABIA can effectively select a more-compact model and achieve better held-out performance. Our future work will be to extend FABIA to importance-sampling-based VAEs [5, 26, 24]. We also aim to explicitly select the number of layers in SBNs, and to tackle other popular deep models, such as CNNs and FNNs. Finally, investigating the effect of FABIA’s shrinkage mechanism on the gradient noise is another interesting direction. Acknowledgements The authors would like to thank Ricardo Henao for helpful discussions, and the anonymous reviewers for their insightful comments and suggestions. Part of this work was done during the internship of the first author at NEC Laboratories America, Cupertino, CA. This research was supported in part by ARO, DARPA, DOE, NGA, ONR, NSF, and the NEC Fellowship. References [1] Adams, R., Wallach, H., and Ghahramani, Z. (2010). Learning the structure of deep sparse graphical models. In International Conference on Artificial Intelligence and Statistics, pages 1–8. [2] Alvarez, J. M. and Salzmann, M. (2016). Learning the number of neurons in deep networks. In Advances in Neural Information Processing Systems, pages 2270–2278. [3] Armagan, A., Clyde, M., and Dunson, D. B. (2011). Generalized beta mixtures of Gaussians. In Advances in Neural Information Processing Systems, pages 523–531. [4] Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D., and Bengio, Y. (2010). Theano: A CPU and GPU math compiler in python. In Proc. 9th Python in Science Conf, pages 1–7. [5] Bornschein, J. and Bengio, Y. (2015). Reweighted wake-sleep. In International Conference on Learning Representations. [6] Carlson, D., Hsieh, Y.-P., Collins, E., Carin, L., and Cevher, V. (2016). Stochastic spectral descent for discrete graphical models. IEEE J. Sel. Topics Signal Process., 10(2):296–311. [7] Dempster, A. P., Laird, N. M., and Rubin, D. B. (1977). Maximum likelihood from incomplete data via the EM algorithm. J. Roy. Statist. Soc. Ser. B, pages 1–38. 9 [8] Fujimaki, R. and Hayashi, K. (2012). Factorized asymptotic Bayesian hidden Markov models. In International Conference on Machine Learning, pages 799–806. [9] Fujimaki, R. and Morinaga, S. (2012). Factorized asymptotic Bayesian inference for mixture modeling. In International Conference on Artificial Intelligence and Statistics, pages 400–408. [10] Gan, Z., Chen, C., Henao, R., Carlson, D., and Carin, L. (2015a). Scalable deep Poisson factor analysis for topic modeling. In International Conference on Machine Learning, pages 1823–1832. [11] Gan, Z., Henao, R., Carlson, D., and Carin, L. (2015b). Learning deep sigmoid belief networks with data augmentation. In International Conference on Artificial Intelligence and Statistics, pages 268–276. [12] Hayashi, K. and Fujimaki, R. (2013). Factorized asymptotic Bayesian inference for latent feature models. In Advances in Neural Information Processing Systems, pages 1214–1222. [13] Hayashi, K., Maeda, S.-i., and Fujimaki, R. (2015). Rebuilding factorized information criterion: Asymptotically accurate marginal likelihood. In International Conference on Machine Learning, pages 1358–1366. [14] Henao, R., Gan, Z., Lu, J., and Carin, L. (2015). Deep Poisson factor modeling. In Advances in Neural Information Processing Systems, pages 2800–2808. [15] Hinton, G., Deng, L., Yu, D., Dahl, G., Mohamed, A.-r., Jaitly, N., Senior, A., Vanhoucke, V., Nguyen, P., Kingsbury, B., et al. (2012). Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Process. Mag., 29(6):82–97. [16] Hinton, G., Osindero, S., and Teh, Y.-W. (2006). A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554. [17] Kingma, D. P. and Ba, J. L. (2015). Adam: A method for stochastic optimization. In International Conference on Learning Representations. [18] Kingma, D. P. and Welling, M. (2014). Auto-encoding variational Bayes. In International Conference on Learning Representations. [19] Krizhevsky, A., Sutskever, I., and Hinton, G. E. (2012). Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097–1105. [20] LeCun, Y., Bengio, Y., and Hinton, G. (2015). Deep learning. Nature, 521(7553):436–444. [21] Liu, C., Feng, L., and Fujimaki, R. (2016). Streaming model selection via online factorized asymptotic Bayesian inference. In International Conference on Data Mining, pages 271–280. [22] Liu, C., Feng, L., Fujimaki, R., and Muraoka, Y. (2015). Scalable model selection for large-scale factorial relational models. In International Conference on Machine Learning, pages 1227–1235. [23] MacKay, D. J. (2003). Information theory, inference and learning algorithms. Cambridge University Press. [24] Maddison, C. J., Mnih, A., and Teh, Y. W. (2017). The concrete distribution: A continuous relaxation of discrete random variables. In International Conference on Learning Representations. [25] Mnih, A. and Gregor, K. (2014). Neural variational inference and learning in belief networks. In International Conference on Machine Learning, pages 1791–1799. [26] Mnih, A. and Rezende, D. (2016). Variational inference for Monte Carlo objectives. In International Conference on Machine Learning, pages 2188–2196. [27] Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I., King, H., Kumaran, D., Wierstra, D., Legg, S., and Hassabis, D. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540):529–533. [28] Neal, R. M. (1992). Connectionist learning of belief networks. Artificial Intelligence, 56(1):71–113. [29] Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, pages 1278–1286. [30] Saul, L. K., Jaakkola, T., and Jordan, M. I. (1996). Mean field theory for sigmoid belief networks. Journal of Artificial Intelligence Research, 4:61–76. 10 [31] Song, Z., Henao, R., Carlson, D., and Carin, L. (2016). Learning sigmoid belief networks via Monte Carlo expectation maximization. In International Conference on Artificial Intelligence and Statistics, pages 1347–1355. [32] Srivastava, N., Hinton, G. E., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. (2014). Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958. [33] Srivastava, N., Salakhutdinov, R. R., and Hinton, G. E. (2013). Modeling documents with deep Boltzmann machines. In Uncertainty in Artificial Intelligence, pages 616–624. [34] Tipping, M. E. (2001). Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1:211–244. [35] Wan, L., Zeiler, M., Zhang, S., LeCun, Y., and Fergus, R. (2013). Regularization of neural networks using dropconnect. In International Conference on Machine Learning, pages 1058–1066. [36] Zhou, M., Cong, Y., and Chen, B. (2015). The Poisson Gamma belief network. In Advances in Neural Information Processing Systems, pages 3043–3051. 11 | 2017 | 437 |
6,938 | Collaborative Deep Learning in Fixed Topology Networks Zhanhong Jiang1, Aditya Balu1, Chinmay Hegde2, and Soumik Sarkar1 1Department of Mechanical Engineering, Iowa State University, zhjiang, baditya, soumiks@iastate.edu 2Department of Electrical and Computer Engineering , Iowa State University, chinmay@iastate.edu Abstract There is significant recent interest to parallelize deep learning algorithms in order to handle the enormous growth in data and model sizes. While most advances focus on model parallelization and engaging multiple computing agents via using a central parameter server, aspect of data parallelization along with decentralized computation has not been explored sufficiently. In this context, this paper presents a new consensus-based distributed SGD (CDSGD) (and its momentum variant, CDMSGD) algorithm for collaborative deep learning over fixed topology networks that enables data parallelization as well as decentralized computation. Such a framework can be extremely useful for learning agents with access to only local/private data in a communication constrained environment. We analyze the convergence properties of the proposed algorithm with strongly convex and nonconvex objective functions with fixed and diminishing step sizes using concepts of Lyapunov function construction. We demonstrate the efficacy of our algorithms in comparison with the baseline centralized SGD and the recently proposed federated averaging algorithm (that also enables data parallelism) based on benchmark datasets such as MNIST, CIFAR-10 and CIFAR-100. 1 Introduction In this paper, we address the scalability of optimization algorithms for deep learning in a distributed setting. Scaling up deep learning [1] is becoming increasingly crucial for large-scale applications where the sizes of both the available data as well as the models are massive [2]. Among various algorithmic advances, many recent attempts have been made to parallelize stochastic gradient descent (SGD) based learning schemes across multiple computing agents. An early approach called Downpour SGD [3], developed within Google’s disbelief software framework, primarily focuses on model parallelization (i.e., splitting the model across the agents). A different approach known as elastic averaging SGD (EASGD) [4] attempts to improve perform multiple SGDs in parallel; this method uses a central parameter server that helps in assimilating parameter updates from the computing agents. However, none of the above approaches concretely address the issue of data parallelization, which is an important issue for several learning scenarios: for example, data parallelization enables privacy-preserving learning in scenarios such as distributed learning with a network of mobile and Internet-of-Things (IoT) devices. A recent scheme called Federated Averaging SGD [5] attempts such a data parallelization in the context of deep learning with significant success; however, they still use a central parameter server. In contrast, deep learning with decentralized computation can be achieved via gossip SGD algorithms [6, 7], where agents communicate probabilistically without the aid of a parameter server. However, decentralized computation in the sense of gossip SGD is not feasible in many real life applications. For instance, consider a large (wide-area) sensor network [8, 9] or multi-agent robotic 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Table 1: Comparisons between different optimization approaches Method f ∇f Step Size Con.Rate D.P. D.C. C.C.T. SGD Str-con Lip. Con. O(γk) No No No Downpour SGD [3] Nonconvex Lip. Con.&Ada. N/A Yes No No EASGD [4] Str-con Lip. Con. O(γk) No No No Gossip SGD [7] Str-con Lip.&Bou. Con. O(γk) No Yes No Str-con Lip.&Bou. Dim. O( 1 k) FedAvg [5] Nonconvex Lip. Con. N/A Yes No No CDSGD [This paper] Str-con Lip.&Bou. Con. O(γk) Yes Yes Yes Str-con Lip.&Bou. Dim. O( 1 kϵ ) Nonconvex Lip.&Bou. Con. N/A Nonconvex Lip.&Bou. Dim. N/A Con.Rate: convergence rate, Str-con: strongly convex. Lip.&Bou.: Lipschitz continuous and bounded. Con.: constant and Con.&Ada.: constant&adagrad. Dim.: diminishing. γ ∈(0, 1) is a positive constant. ϵ ∈(0.5, 1] is a positive constant. D.P.: data parallelism. D.C.: decentralized computation. C.C.T.: constrained communication topology. network that aims to learn a model of the environment in a collaborative manner [10, 11]. For such cases, it may be infeasible for arbitrary pairs of agents to communicate on-demand; typically, agents are only able to communicate with their respective neighbors in a communication network in a fixed (or evolving) topology. Contribution: This paper introduces a new class of approaches for deep learning that enables both data parallelization and decentralized computation. Specifically, we propose consensus-based distributed SGD (CDSGD) and consensus-based distributed momentum SGD (CDMSGD) algorithms for collaborative deep learning that, for the first time, satisfies all three requirements: data parallelization, decentralized computation, and constrained communication over fixed topology networks. Moreover, while most existing studies solely rely on empirical evidence from simulations, we present rigorous convergence analysis for both (strongly) convex and non-convex objective functions, with both fixed and diminishing step sizes using a Lyapunov function construction approach. Our analysis reveals several advantages of our method: we match the best existing rates of convergence in the centralized setting, while simultaneously supporting data parallelism as well as constrained communication topologies; to our knowledge, this is the first approach that achieves all three desirable properties; see Table 1 for a detailed comparison. Finally, we validate our algorithms’ performance on benchmark datasets, such as MNIST, CIFAR-10, and CIFAR-100. Apart from centralized SGD as a baseline, we also compare performance with that of Federated Averaging SGD as it also enables data parallelization. Empirical evidence (for a given number of agents and other hyperparametric conditions) suggests that while our method is slightly slower, we can achieve higher accuracy compared to the best available algorithm (Federated Averaging (FedAvg)). Empirically, the proposed framework in this work is suitable for situations without central parameter servers, but also robust to a central parameter server failture situation. Related work: Apart from the algorithms mentioned above, a few other related works exist, including a distributed system called Adam for large deep neural network (DNN) models [12] and a distributed methodology by Strom [13] for DNN training by controlling the rate of weight-update to reduce the amount of communication. Natural Gradient Stochastic Gradient Descent (NG-SGD) based on model averaging [14] and staleness-aware async-SGD [15] have also been developed for distributed deep learning. A method called CentralVR [16] was proposed for reducing the variance and conducting parallel execution with linear convergence rate. Moreover, a decentralized algorithm based on gossip protocol called the multi-step dual accelerated (MSDA) [17] was developed for solving deterministically smooth and strongly convex distributed optimization problems in networks with a provable optimal linear convergence rate. A new class of decentralized primal-dual methods [18] was also proposed recently in order to improve inter-node communication efficiency for distributed convex optimization problems. To minimize a finite sum of nonconvex functions over a network, the authors in [19] proposed a zeroth-order distributed algorithm (ZENITH) that was globally convergent with a sublinear rate. From the perspective of distributed optimization, the proposed algorithms have similarities with the approaches of [20, 21]. However, we distinguish our work due to the collaborative learning aspect with data parallelization and extension to the stochastic setting and nonconvex objective functions. In [20] the authors only considered convex objective functions in a 2 deterministic setting, while the authors in [21] presented results for non-convex optimization problems in a deterministic setting. Our proof techniques are different from those in [20, 21] with the choice of Lyapunov function, as well as the notion of stochastic Lyapunov gradient. More importantly, we provide an extensive and thorough suite of numerical comparisons with both centralized methods and distributed methods on benchmark datasets. The rest of the paper is organized as follows. While section 2 formulates the distributed, unconstrained stochastic optimization problem, section 3 presents the CDSGD algorithm and the Lyapunov stochastic gradient required for analysis presented in section 4. Validation experiments and performance comparison results are described in section 5. The paper is summarized, concluded in section 6 along with future research directions. Detailed proofs of analytical results, extensions (e.g., effect of diminishing step size) and additional experiments are included in the supplementary section 7. 2 Formulation We consider the standard (unconstrained) empirical risk minimization problem typically used in machine learning problems (such as deep learning): min 1 n n X i=1 f i(x), (1) where x ∈Rd denotes the parameter of interest and f : Rd →R is a given loss function, and f i is the function value corresponding to a data point i. In this paper, we are interested in learning problems where the computational agents exhibit data parallelism, i.e., they only have access to their own respective training datasets. However, we assume that the agents can communicate over a static undirected graph G = (V, E), where V is a vertex set (with nodes corresponding to agents) and E is an edge set. With N agents, we have V = {1, 2, ..., N} and E ⊆V × V. If (j, l) ∈E, then Agent j can communicate with Agent l. The neighborhood of agent j ∈V is defined as: Nb(j) ≜{l ∈V : (j, l) ∈E or j = l}. Throughout this paper we assume that the graph G is connected. Let Dj, j = 1, . . . , n denote the subset of the training data (comprising nj samples) corresponding to the jth agents such that PN j=1 nj = n. With this setup, we have the following simplification of Eq. 1: min 1 n N X j=1 X i∈Dj f i(x) = N n N X j=1 X i∈Dj f i j(x), (2) where, fj(x) = 1 N f(x) is the objective function specific to Agent j. This formulation enables us to state the optimization problem in a distributed manner, where f(x) = PN j=1 fj(x). 1 Furthermore, the problem (1) can be reformulated as min N n 1T F(x) := N n N X j=1 X i∈Dj f i j(xj) (3a) s.t. xj = xl ∀(j, l) ∈E, (3b) where x := (x1, x2, . . . , xN)T ∈RN×d and F(x) can be written as F(x) = X i∈D1 f i 1(x1), X i∈D2 f i 2(x2), . . . , X i∈DN f i N(xN) T (4) Note that with d > 1, the parameter set x as well as the gradient ∇F(x) correspond to matrix variables. However, for simplicity in presenting our analysis, we set d = 1 in this paper, which corresponds to the case where x and ∇F(x) are vectors. 1Note that in our formulation, we are assuming that every agent has the same local objective function while in general distributed optimization problems they can be different. 3 We now introduce several key definitions and assumptions that characterize the objective functions and the agent interaction matrix. Definition 1. A function f : Rd →R is H-strongly convex, if for all x, y ∈Rd, we have f(y) ≥ f(x) + ∇f(x)T (y −x) + H 2 ∥y −x∥2. Definition 2. A function f : Rd →R is γ-smooth if for all x, y ∈Rd, we have f(y) ≤f(x) + ∇f(x)T (y −x) + γ 2 ∥y −x∥2. As a consequence of Definition 2, we can conclude that ∇f is Lipschitz continuous, i.e., ∥∇f(y) − ∇f(x)∥≤γ∥y −x∥[22]. Definition 3. A function c is said to be coercive if it satisfies: c(x) →∞when∥x∥→∞. Assumption 1. The objective functions fj : Rd →R are assumed to satisfy the following conditions: a) Each fj is γj-smooth; b) each fj is proper (not everywhere infinite) and coercive; and c) each fj is Lj-Lipschitz continuous, i.e., |fj(y) −fj(x)| < Lj∥y −x∥∀x, y ∈Rd. As a consequence of Assumption 1, we can conclude that PN j=1 fj(xj) possesses Lipschitz continuous gradient with parameter γm := maxjγj. Similarly, each fj is strongly convex with Hj such that PN j=1 fj(xj) is strongly convex with Hm = minjHj. Regarding the communication network, we use Π to denote the agent interaction matrix, where the element πjl signifies the link weight between agents j and l. Assumption 2. a) If (j, l) /∈E, then πjl = 0; b) ΠT = Π; c) null{I −Π} = span{1}; and d) I ⪰Π ≻−I. The main outcome of Assumption 2 is that the probability transition matrix is doubly stochastic and that we have λ1(Π) = 1 > λ2(Π) ≥· · · ≥λN(Π) ≥0, where λz(Π) denotes the z-th largest eigenvalue of Π. 3 Proposed Algorithm 3.1 Consensus Distributed SGD For solving stochastic optimization problems, SGD and its variants have been commonly used to centralized and distributed problem formulations. Therefore, the following algorithm is proposed based on SGD and the concept of consensus to solve the problem laid out in Eq. 2, xj k+1 = X l∈Nb(j) πjlxl k −αgj(xj k) (5) where Nb(j) indicates the neighborhood of agent j, α is the step size, gj(xj k) is stochastic gradient of fj at xj k, which corresponds to a minibatch of sampled data points at the kth epoch. More formally, gj(xj k) = 1 b′ P q′∈D′ ∇f q′ j (xj k), where b′ is the size of the minibatch D′ randomly selected from the data subset Dj. While the pseudo-code of CDSGD is shown below in Algorithm 1, momentum versions of CDSGD based on Polyak momentum [23] and Nesterov momentum [24] are also presented in the supplementary section 7. In experiments, Nesterov momentum is used as it has been shown in the traditional SGD implementations that the Nesterov variant outperforms the Polyak momentum. Note, that mini-batch implementations of these algorithms are straightforward, hence, 4 are not discussed here in detail, and that the convergence analysis of momentum variants is out of scope in this paper and will be presented in our future work. Algorithm 1: CDSGD Input : m, α, N Initialize: xj 0, (j = 1, 2, . . . , N) Distribute the training dataset to N agents. for each agent do for k = 0 : m do Randomly shuffle the corresponding data subset Dj (without replacement) wj k+1 = P l∈Nb(j) πjlxl k xj k+1 = wj k+1 −αgj(xj k) end end 3.2 Tools for convergence analysis We now analyze the convergence properties of the iterates {xj k} generated by Algorithm 1. The following section summarizes some key intermediate concepts required to establish our main results. First, we construct an appropriate Lyapunov function that will enable us to establish convergence. Observe that the update law in Alg. 1 can be expressed as: xk+1 = Πxk −αg(xk), (6) where g(xk) = [g1(x1 k)g2(x2 k)...gN(xN k )]T Denoting wk = Πxk, the update law can be re-written as xk+1 = wk −αg(xk). Moreover, xk+1 = xk −xk + wk −αg(xk). Rearranging the last equality yields the following relation: xk+1 = xk −α(g(xk) + α−1(xk −wk)) = xk −α(g(xk) + α−1(I −Π)xk) (7) where the last term in Eq. 7 is the Stochastic Lyapunov Gradient. From Eq. 7, we observe that the “effective" gradient step is given by g(xk) + α−1(I −Π)xk. Rewriting ∇J i(xk) = g(xk) + α−1(I −Π)xk, the updates of CDSGD can be expressed as: xk+1 = xk −α∇J i(xk). (8) The above expression naturally motivates the following Lyapunov function candidate: V (x, α) := N n 1T F(x) + 1 2α∥x∥2 I−Π (9) where ∥· ∥I−Π denotes the norm with respect to the PSD matrix I −Π. Since PN j=1 fj(xj) has a γm-Lipschitz continuous gradient, ∇V (x) also is a Lipschitz continuous gradient with parameter: ˆγ := γm + α−1λmax(I −Π) = γm + α−1(1 −λN(Π)). Similarly, as PN j=1 fj(xj) is Hm-strongly convex, then V (x) is strongly convex with parameter: ˆH := Hm + (2α)−1λmin(I −Π) = Hm + (2α)−1(1 −λ2(Π)). Based on Definition 1, V has a unique minimizer, denoted by x∗with V ∗= V (x∗). Correspondingly, using strong convexity of V , we can obtain the relation: 2 ˆH(V (x) −V ∗) ≤∥∇V (x)∥2 for all x ∈RN. (10) From strong convexity and the Lipschitz continuous property of ∇fj, the constants Hm and γm further satisfy Hm ≤γm and hence, ˆH ≤ˆγ. Next, we introduce two key lemmas that will help establish our main theoretical guarantees. Due to space limitations, all proofs are deferred to the supplementary material in Section 7. 5 Lemma 1. Under Assumptions 1 and 2, the iterates of CDSGD satisfy ∀k ∈N: E[V (xk+1)] −V (xk) ≤−α∇V (xk)T E[∇J i(xk)] + ˆγ 2 α2E[∥∇J i(xk)∥2] (11) At a high level, since E[∇J i(xk)] is the unbiased estimate of ∇V (xk), using the updates ∇J i(xk) will lead to sufficient decrease in the Lyapunov function. However, unbiasedness is not enough, and we also need to control higher order moments of ∇J i(xk) to ensure convergence. Specifically, we consider the variance of ∇J i(xk): V ar[∇J i(xk)] := E[∥∇J i(xk)∥2] −∥E[∇J i(xk)]∥2 (12) To bound the variance of ∇J i(xk), we use a standard assumption presented in [25] in the context of (centralized) deep learning. Such an assumption aims at providing an upper bound for the “gradient noise" caused by the randomness in the minibatch selection at each iteration. Assumption 3. a) There exist scalars ζ2 ≥ζ1 > 0 such that ∇V (xk)T E[∇J i(xk)] ≥ ζ1∥∇V (xk)∥2 and ∥E[∇J i(xk)]∥≤ζ2∥∇V (xk)∥for all k ∈N; b) There exist scalars Q ≥0 and QV ≥0 such that V ar[∇J i(xk)] ≤Q + QV ∥∇V (xk)∥2 for all k ∈N. Remark 1. While Assumption 3(a) guarantees the sufficient descent of V in the direction of −∇J i(xk), Assumption 3(b) states that the variance of ∇J i(xk) is bounded above by the second moment of ∇V (xk). The constant Q can be considered to represent the second moment of the “gradient noise" in ∇J i(xk). Therefore, the second moment of ∇J i(xk) can be bounded above as E[∥∇J i(xk)∥2] ≤Q + Qm∥∇V (xk)∥2, where Qm := QV + ζ2 2 ≥ζ2 1 > 0. Lemma 2. Under Assumptions 1, 2, and 3, the iterates of CDSGD satisfy ∀k ∈N: E[V (xk+1)] −V (xk) ≤−(ζ1 −ˆγ 2 αQm)α∥∇V (xk)∥2 + ˆγ 2 α2Q . (13) In Lemma 2, the first term is strictly negative if the step size satisfies the following necessary condition: 0 < α ≤2ζ1 ˆγQm (14) However, in latter analysis, when such a condition is substituted into the convergence analysis, it may produce a larger upper bound. For obtaining a tight upper bound, we impose a sufficient condition for the rest of analysis as follows: 0 < α ≤ ζ1 ˆγQm (15) As ˆγ is a function of α, the above inequality can be rewritten as 0 < α ≤ζ1−(1−λN(Π))Qm γmQm . 4 Main Results We now present our main theoretical results establishing the convergence of CDSGD. First, we show that for most generic loss functions (whether convex or not), CDSGD achieves consensus across different agents in the graph, provided the step size (which is fixed across iterations) does not exceed a natural upper bound. Proposition 1. (Consensus with fixed step size) Under Assumptions 1 and 2, the iterates of CDSGD (Algorithm 1) satisfy ∀k ∈N: E[∥xj k −sk∥] ≤ αL 1 −λ2(Π) (16) where α satisfies 0 < α ≤ ζ1−(1−λN(Π))Qm γmQm and L is an upper bound of E[∥g(xk)∥], ∀k ∈N (defined properly and discussed in Lemma 4 in the supplementary section 7) and sk = 1 N PN j=1 xj k represents the average parameter estimate. The proof of this proposition can be adapted from [26, Lemma 1]. Next, we show that for strongly convex loss functions, CDSGD converges linearly to a neighborhood of the global optimum. 6 Theorem 1. (Convergence of CDSGD with fixed step size, strongly convex case) Under Assumptions 1, 2 and 3, the iterates of CDSGD satisfy the following inequality ∀k ∈N: E[V (xk) −V ∗] ≤(1 −α ˆHζ1)k−1(V (x1) −V ∗) + α2ˆγQ 2 k−1 X l=0 (1 −α ˆHζ1)l = (1 −(αHm + 1 −λ2(Π))ζ1)k−1(V (x1) −V ∗) + (α2γm + α(1 −λN(Π)))Q 2 k−1 X l=0 (1 −(αHm + 1 −λ2(Π))ζ1)l (17) when the step size satisfies 0 < α ≤ζ1−(1−λN(Π))Qm γmQm . A detailed proof is presented in the supplementary section 7. We observe from Theorem 1 that the sequence of Lyapunov function values {V (xk)} converges linearly to a neighborhood of the optimal value, i.e., limk→∞E[V (xk) −V ∗] ≤αˆγQ 2 ˆ Hζ1 = (αγm+1−λN(Π))Q 2(Hm+α−1(1−λ2(Π))ζ1 . We also observe that the term on the right hand side decreases with the spectral gap of the agent interaction matrix Π, i.e., 1 −λ2(Π), which suggests an interesting relation between convergence and topology of the graph. Moreover, we observe that the upper bound is proportional to the step size parameter α, and smaller step sizes lead to smaller radii of convergence. (However, choosing a very small step-size may negatively affect the convergence rate of the algorithm). Finally, if the gradient in this context is not stochastic (i.e., the parameter Q = 0), then linear convergence to the optimal value is achieved, which matches known rates of convergence with (centralized) gradient descent under strong convexity and smoothness assumptions. Remark 2. Since E[ N n 1T F(xk)] ≤E[V (xk)] and N n 1T F(x∗) = V ∗, the sequence of objective function values are themselves upper bounded as follows: E[ N n 1T F(xk)−N n 1T F(x∗)] ≤E[V (xk)− V ∗]. Therefore, using Theorem 1 we can establish analogous convergence rates in terms of the true objective function values { N n 1T F(xk)} as well. The above convergence result for CDSGD is limited to the case when the objective functions are strongly convex. However, most practical deep learning systems (such as convolutional neural network learning) involve optimizing over highly non-convex objective functions, which are much harder to analyze. Nevertheless, we show that even under such situations, CDSGD exhibits a (weaker) notion of convergence. Theorem 2. (Convergence of CDSGD with fixed step size, nonconvex case) Under Assumptions 1, 2, and 3, the iterates of CDSGD satisfy ∀m ∈N: E[ m X k=1 ∥∇V (xk)∥2] ≤ˆγmαQ ζ1 + 2(V (x1) −Vinf) ζ1α = (γmα + 1 −λN(Π))mQ ζ1 + 2(V (x1) −Vinf) ζ1α . (18) when the step size satisfies 0 < α ≤ζ1−(1−λN(Π))Qm γmQm . Remark 3. Theorem 2 states that when in the absence of “gradient noise" (i.e., when Q = 0), the quantity E[Pm k=1 ∥∇V (xk)∥2] remains finite. Therefore, necessarily {∥∇V (xk)∥} →0 and the estimates approach a stationary point. On the other hand, if the gradient calculations are stochastic, then a similar claim cannot be made. However, for this case we have the upper bound limm→∞E[ 1 m Pm k=1 ∥∇V (xk)∥2] ≤(γmα+1−λN(Π))Q ζ1 . This tells us that while we cannot guarantee convergence in terms of sequence of objective function values, we can still assert that the average of the second moment of gradients is strictly bounded from above even for the case of nonconvex objective functions. Moreover, the upper bound cannot be solely controlled via the step-size parameter α (which is different from what is implied in the strongly convex case by Theorem 1). In general, the upper bound becomes tighter as λN(Π) increases; however, an increase in λN(Π) may result in a commensurate increase in λ2(Π), leading to worse connectivity in the graph and adversely affecting consensus among agents. Again, our upper bounds are reflective of interesting tradeoffs between consensus and convergence in the gradients, and their dependence on graph topology. 7 0 1000 2000 3000 4000 5000 Number of epochs 0.0 0.2 0.4 0.6 0.8 1.0 accs cifar10 experiment SGD CDSGD (a) 0 200 400 600 800 1000 Number of epochs 0.0 0.2 0.4 0.6 0.8 1.0 accs cifar10 experiment SGD CDSGD CDMSGD Federated Averaging (b) Figure 1: Average training (solid lines) and validation (dash lines) accuracy for (a) comparison of CDSGD with centralized SGD and (b) CDMSGD with Federated average method The above results are for fixed step size α, and we can prove complementary results for CDSGD even for the (more prevalent) case of diminishing step size αk. These are presented in the supplementary material due to space constraints. 5 Experimental Results This section presents the experimental results using the benchmark image recognition dataset, CIFAR10. We use a deep convolutional nerual network (CNN) model (with 2 convolutional layers with 32 filters each followed by a max pooling layer, then 2 more convolutional layers with 64 filters each followed by another max pooling layer and a dense layer with 512 units, ReLU activation is used in convolutional layers) to validate the proposed algorithm. We use a fully connected topology with 5 agents and uniform agent interaction matrix except mentioned otherwise. A mini-batch size of 128 and a fixed step size of 0.01 are used in these experiments. The experiments are performed using Keras and TensorFlow [27, 28] and the codes will be made publicly available soon. While we included the training and validation accuracy plots for the different case studies here, the corresponding training loss plots, results with other becnmark datasets such as MNIST and CIFAR-100 and decaying as well as different fixed step sizes are presented in the supplementary section 7. 5.1 Performance comparison with benchmark methods We begin with comparing the accuracy of CDSGD with that of the centralized SGD algorithm as shown in Fig. 1(a). While the CDSGD convergence rate is significantly slower compared to SGD as expected, it is observed that CDSGD can eventually achieve high accuracy, comparable with centralized SGD. However, another interesting observation is that the generalization gap (the difference between training and validation accuracy as defined in [29]) for the proposed CDSGD algorithm is significantly smaller than that of SGD which is an useful property. We also compare both CDSGD and CDMSGD with the Federated averaging SGD (FedAvg) algorithm which also performs data parallelization (see Fig. 1(b)). For the sake of comparison, we use same number of agents and choose E = 1 and C = 1 as the hyperparameters in the FedAvg algorithm as it is close to a fully connected topology scenario as considered in the CDSGD and CDMSGD experiments. As CDSGD is significantly slow, we mainly compare the CDMSGD with FedAvg which have similar convergence rates (CDMSGD being slightly slower). The main observation is that CDMSGD performs better than FedAvg at the steady state and can achieve centralized SGD level performance. It is important to note that FedAvg does not perform decentralized computation. Essentially it runs a brute force parameter averaging on a central parameter server at every epoch (i.e., consensus at every epoch) and then broadcasts the updated parameters to the agents. Hence, it tends to be slightly faster than CDMSGD which uses a truly decentralized computation over a network. 5.2 Effect of network size and topology In this section, we investigate the effects of network size and topology on the performance of the proposed algorithms. Figure 2(a) shows the change in training performance as the number of agents grow from 2 to 8 and to 16. Although with increase in number of agents, the convergence rate slows down, all networks are able to achieve similar accuracy levels. Finally, we investigate the impact of network sparsity (as quantified by the second largest eigenvalue) on the learning performance. The primary observation is convergence of average accuracy value happens faster for sparser networks 8 0 200 400 600 800 1000 Number of epochs 0.0 0.2 0.4 0.6 0.8 1.0 accs cifar10 experiment 2 Agents 8 Agents 16 Agents (a) 0 200 400 600 800 1000 Number of e ochs 0.0 0.2 0.4 0.6 0.8 1.0 accs 0.00 0.01 0.02 0.03 0.04 Variance among agents for accs cifar10 ex eriment Fully Connected with λ2(() = 0 S arse To ology with λ2(() = 0.54 S arse To ology with λ2(() = 0.86 (b) Figure 2: Average training (solid lines) and validation (dash lines) accuracy along with accuracy variance over agents for CDMSGD algorithm with (a) varying network size and (b) varying network topology (higher second largest eigenvalue). This is similar to the trend observed for FedAvg algorithm while reducing the Client fraction (C) which makes the (stochastic) agent interaction matrix sparser. However, from the plot of the variance of accuracy values over agents (a smooth version using moving average filter), it can be observed that the level of consensus is more stable for denser networks compared to that for sparser networks. This is also expected as discussed in Proposition 1. Note, with the availability of a central parameter server (as in federated averaging), sparser topology may be useful for a faster convergence, however, consensus (hence, topology density) is critical for a collaborative learning paradigm with decentralized computation. 6 Conclusion and Future Work This paper addresses the collaborative deep learning (and many other machine learning) problem in a completely distributed manner (i.e., with data parallelism and decentralized computation) over networks with fixed topology. We establish a consensus based distributed SGD framework and proposed associated learning algorithms that can prove to be extremely useful in practice. Using a Lyapunov function construction approach, we show that the proposed CDSGD algorithm can achieve linear convergence rate with sufficiently small fixed step size and sublinear convergence rate with diminishing step size (see supplementary section 7 for details) for strongly convex and Lipschitz differentiable objective functions. Moreover, decaying gradients can be observed for the nonconvex objective functions using CDSGD. Relevant experimental results using benchmark datasets show that CDSGD can achieve centralized SGD level accuracy with sufficient training epochs while maintaining a significantly low generalization error. The momentum variant of the proposed algorithm, CDMSGD can outperform recently proposed FedAvg algorithm which also uses data parallelism but does not perform a decentralized computation, i.e., uses a central parameter server. The effects of network size and topology are also explored experimentally which conforms to the analytical understandings. While current and future research is focusing on extensive testing and validation of the proposed framework especially for large networks, a few technical research directions include: (i) collaborative learning with extreme non-IID data; (ii) collaborative learning over directed time-varying graphs; and (iii) understanding the dependencies between learning rate and consensus. Acknowledgments This paper is based upon research partially supported by the USDA-NIFA under Award no. 201767021-25965, the National Science Foundation under Grant No. CNS-1464279 and No. CCF1566281. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the funding agencies. 9 References [1] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [2] Suyog Gupta, Wei Zhang, and Josh Milthorpe. Model accuracy and runtime tradeoff in distributed deep learning. arXiv preprint arXiv:1509.04210, 2015. [3] 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. [4] 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. [5] H Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, et al. Communicationefficient learning of deep networks from decentralized data. arXiv preprint arXiv:1602.05629, 2016. [6] Michael Blot, David Picard, Matthieu Cord, and Nicolas Thome. Gossip training for deep learning. arXiv preprint arXiv:1611.09726, 2016. [7] Peter H Jin, Qiaochu Yuan, Forrest Iandola, and Kurt Keutzer. How to scale distributed deep learning? arXiv preprint arXiv:1611.04581, 2016. [8] Kushal Mukherjee, Asok Ray, Thomas Wettergren, Shalabh Gupta, and Shashi Phoha. Real-time adaptation of decision thresholds in sensor networks for detection of moving targets. Automatica, 47(1):185 – 191, 2011. [9] Chao Liu, Yongqiang Gong, Simon Laflamme, Brent Phares, and Soumik Sarkar. Bridge damage detection using spatiotemporal patterns extracted from dense sensor network. Measurement Science and Technology, 28(1):014011, 2017. [10] H.-L. Choi and J. P. How. Continuous trajectory planning of mobile sensors for informative forecasting. Automatica, 46(8):1266–1275, 2010. [11] D. K. Jha, P. Chattopadhyay, S. Sarkar, and A. Ray. Path planning in gps-denied environments with collective intelligence of distributed sensor networks. International Journal of Control, 89, 2016. [12] Trishul M Chilimbi, Yutaka Suzue, Johnson Apacible, and Karthik Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In OSDI, volume 14, pages 571–582, 2014. [13] Nikko Strom. Scalable distributed dnn training using commodity gpu cloud computing. In INTERSPEECH, volume 7, page 10, 2015. [14] Hang Su and Haoyu Chen. Experiments on parallel training of deep neural network using model averaging. arXiv preprint arXiv:1507.01239, 2015. [15] Wei Zhang, Suyog Gupta, Xiangru Lian, and Ji Liu. Staleness-aware async-sgd for distributed deep learning. arXiv preprint arXiv:1511.05950, 2015. [16] Soham De and Tom Goldstein. Efficient distributed sgd with variance reduction. In Data Mining (ICDM), 2016 IEEE 16th International Conference on, pages 111–120. IEEE, 2016. [17] Kevin Scaman, Francis Bach, Sébastien Bubeck, Yin Tat Lee, and Laurent Massoulié. Optimal algorithms for smooth and strongly convex distributed optimization in networks. arXiv preprint arXiv:1702.08704, 2017. [18] Guanghui Lan, Soomin Lee, and Yi Zhou. Communication-efficient algorithms for decentralized and stochastic optimization. arXiv preprint arXiv:1701.03961, 2017. [19] Davood Hajinezhad, Mingyi Hong, and Alfredo Garcia. Zenith: A zeroth-order distributed algorithm for multi-agent nonconvex optimization. 10 [20] Angelia Nedic and Asuman Ozdaglar. Distributed subgradient methods for multi-agent optimization. IEEE Transactions on Automatic Control, 54(1):48–61, 2009. [21] Jinshan Zeng and Wotao Yin. On nonconvex decentralized gradient descent. arXiv preprint arXiv:1608.05766, 2016. [22] Angelia Nedi´c and Alex Olshevsky. Stochastic gradient-push for strongly convex functions on time-varying directed graphs. IEEE Transactions on Automatic Control 61.12, pages 3936–3947, 2016. [23] Boris T Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 4(5):1–17, 1964. [24] Yurii Nesterov. Introductory lectures on convex optimization: A basic course, volume 87. Springer Science & Business Media, 2013. [25] Léon Bottou, Frank E Curtis, and Jorge Nocedal. Optimization methods for large-scale machine learning. arXiv preprint arXiv:1606.04838, 2016. [26] Kun Yuan, Qing Ling, and Wotao Yin. On the convergence of decentralized gradient descent. arXiv preprint arXiv:1310.7063, 2013. [27] François Chollet. Keras. https://github.com/fchollet/keras, 2015. [28] 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. [29] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. CoRR, abs/1611.03530, 2016. [30] Angelia Nedi´c and Alex Olshevsky. Distributed optimization over time-varying directed graphs. IEEE Transactions on Automatic Control, 60(3):601–615, 2015. [31] S. Ram, A. Nedic, and V. Veeravalli. A new class of distributed optimization algorithms: application to regression of distributed data. Optimization Methods and Software, 27(1):71– 88, 2012. 11 | 2017 | 438 |
6,939 | On the Complexity of Learning Neural Networks Le Song Georgia Institute of Technology Atlanta, GA 30332 lsong@cc.gatech.edu Santosh Vempala Georgia Institute of Technology Atlanta, GA 30332 vempala@gatech.edu John Wilmes Georgia Institute of Technology Atlanta, GA 30332 wilmesj@gatech.edu Bo Xie Georgia Institute of Technology Atlanta, GA 30332 bo.xie@gatech.edu Abstract The stunning empirical successes of neural networks currently lack rigorous theoretical explanation. What form would such an explanation take, in the face of existing complexity-theoretic lower bounds? A first step might be to show that data generated by neural networks with a single hidden layer, smooth activation functions and benign input distributions can be learned efficiently. We demonstrate here a comprehensive lower bound ruling out this possibility: for a wide class of activation functions (including all currently used), and inputs drawn from any logconcave distribution, there is a family of one-hidden-layer functions whose output is a sum gate, that are hard to learn in a precise sense: any statistical query algorithm (which includes all known variants of stochastic gradient descent with any loss function) needs an exponential number of queries even using tolerance inversely proportional to the input dimensionality. Moreover, this hard family of functions is realizable with a small (sublinear in dimension) number of activation units in the single hidden layer. The lower bound is also robust to small perturbations of the true weights. Systematic experiments illustrate a phase transition in the training error as predicted by the analysis. 1 Introduction It is well-known that Neural Networks (NN’s) provide universal approximate representations [11, 6, 2] and under mild assumptions, i.e., any real-valued function can be approximated by a NN. This holds for a wide class of activation functions (hidden layer units) and even with only a single hidden layer (although there is a trade-off between depth and width [8, 20]). Typically learning a NN is done by stochastic gradient descent applied to a loss function comparing the network’s current output to the values of the given training data; for regression, typically the function is just the least-squares error. Variants of gradient descent include drop-out, regularization, perturbation, batch gradient descent etc. In all cases, the training algorithm has the following form: Repeat: 1. Compute a fixed function FW (.) defined by the current network weights W on a subset of training examples. 2. Use FW (.) to update the current weights W. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The empirical success of this approach raises the question: what can NN’s learn efficiently in theory? In spite of much effort, at the moment there are no satisfactory answers to this question, even with reasonable assumptions on the function being learned and the input distribution. When learning involves some computationally intractable optimization problem, e.g., learning an intersection of halfspaces over the uniform distribution on the Boolean hypercube, then any training algorithm is unlikely to be efficient. This is the case even for improper learning (when the complexity of the hypothesis class being used to learn can be greater than the target class). Such lower bounds are unsatisfactory to the extent they rely on discrete (or at least nonsmooth) functions and distributions. What if we assume that the function to be learned is generated by a NN with a single hidden layer of smooth activation units, and the input distribution is benign? Can such functions be learned efficiently by gradient descent? Our main result is a lower bound, showing a simple and natural family of functions generated by 1-hidden layer NN’s using any known activation function (e.g., sigmoid, ReLU), with each input drawn from a logconcave input distribution (e.g., Gaussian, uniform in an interval), are hard to learn by a wide class of algorithms, including those in the general form above. Our finding implies that efficient NN training algorithms need to use stronger assumptions on the target function and input distribution, more so than Lipschitzness and smoothness even when the true data is generated by a NN with a single hidden layer. The idea of the lower bound has two parts. First, NN updates can be viewed as statistical queries to the input distribution. Second, there are many very different 1-layer networks, and in order to learn the correct one, any algorithm that makes only statistical queries of not too small accuracy has to make an exponential number of queries. The lower bound uses the SQ framework of Kearns [13] as generalized by Feldman et al. [9]. 1.1 Statistical query algorithms A statistical query (SQ) algorithm is one that solves a computational problem over an input distribution; its interaction with the input is limited to querying the expected value of of a bounded function up to a desired accuracy. More precisely, for any integer t > 0 and distribution D over X, a VSTAT(t) oracle takes as input a query function f : X →[0, 1] with expectation p = ED(f(x)) and returns a value v such that E x∼D(f(x)) −v ≤max ( 1 t , r p(1 −p) t ) . The bound on the RHS is the standard deviation of t independent Bernoulli coins with desired expectation, i.e., the error that even a random sample of size t would yield. In this paper, we study SQ algorithms that access the input distribution only via the VSTAT(t) oracle. The remaining computation is unrestricted and can use randomization (e.g., to determine which query to ask next). In the case of an algorithm training a neural network via gradient descent, the relevant query functions are derivatives of the loss function. The statistical query framework was first introduced by Kearns for supervised learning problems [14] using the STAT(τ) oracle, which, for τ ∈R+, responds to a query function f : X →[0, 1] with a value v such that | ED(f)−v| ≤τ. The STAT(√τ) oracle can be simulated by the VSTAT(O(1/τ)) oracle. The VSTAT oracle was introduced by [9] who extended these oracles to general problems over distributions. 1.2 Main result We will describe a family C of functions f : Rn →R that can be computed exactly by a small NN, but cannot be efficiently learned by an SQ algorithm. While our result applies to all commonly used activation units, we will use sigmoids as a running example. Let σ(z) be the sigmoid gate that goes to 0 for z < 0 and goes to 1 for z > 0. The sigmoid gates have sharpness parameter s, i.e., σ(x) = σs(x) = (1 + e−sx)−1. Note that the parameter s also bounds the Lipschitz constant of σ(x). 2 A function f : Rn →R can be computed exactly by a single layer NN with sigmoid gates precisely when it is of the form f(x) = h(σ(g(x)), where g : Rn →Rm and h : Rm →R are affine, and σ acts component-wise. Here, m is the number of hidden units, or sigmoid gates, of the of the NN. In the case of a learning problem for a class C of functions f : X →R, the input distribution to the algorithm is over labeled examples (x, f ∗(x)), where x ∼D for some underlying distribution D on X, and f ∗∈C is a fixed concept (function). As mentioned in the introduction, we can view a typical NN learning algorithm as a statistical query (SQ) algorithm: in each iteration, the algorithm constructs a function based on its current weights (typically a gradient or subgradient), evaluates it on a batch of random examples from the input distribution, then uses the evaluations to update the weights of the NN. Then we have the following result. Theorem 1.1. Let n ∈N, and let λ, s ≥1. There exists an explicit family C of functions f : Rn → [−1, 1], representable as a single hidden layer neural network with O(s√n log(λsn)) sigmoid units of sharpness s, a single output sum gate and a weight matrix with condition number O(poly(n, s, λ)), and an integer t = Ω(s2n) s.t. the following holds. Any (randomized) SQ algorithm A that uses λLipschitz queries to VSTAT(t) and weakly learns C with probability at least 1/2, to within regression error 1/ √ t less than any constant function over i.i.d. inputs from any logconcave distribution of unit variance on R requires 2Ω(n)/(λs2) queries. The Lipschitz assumption on the statistical queries is satisfied by all commonly used algorithms for training neural networks can be simulated with Lipschitz queries (e.g., gradients of natural loss functions with regularizers). This assumption can be omitted if the output of the hard-to-learn family C is represented with bounded precision. Informally, Theorem 1.1 shows that there exist simple realizable functions that are not efficiently learnable by NN training algorithms with polynomial batch sizes, assuming the algorithm allows for error as much as the standard deviation of random samples for each query. We remark that in practice, large batch sizes are seldom used for training NNs, not just for efficiency, but also since moderately noisy gradient estimates are believed to be useful for avoiding bad local minima. Even NN training algorithms with larger batch sizes will require Ω(t) samples to achieve lower error, whereas the NNs that represent functions in our class C have only eO( √ t) parameters. Our lower bound extends to a broad family of activation units, including all the well-known ones (ReLU, sigmoid, softplus etc., see Section 3.1). In the case of sigmoid gates, the functions of C take the following form (cf. Figure 1.1). For a set S ⊆{1, . . . , n}, we define fm,S(x1, . . . , xn) = φm(P i∈S xi), where φm(x) = −(2m + 1) + m X k=−m σ x −(4k −1) s + σ (4k + 1) s −x . (1.1) Then C = {fm,S : S ⊆{1, . . . , n}}. We call the functions fm,S, along with φm, the s-wave functions. It is easy to see that they are smooth and bounded. Furthermore, the size of the NN representing this hard-to-learn family of functions is only ˜O(s√n), assuming the query functions (e.g., gradients of loss function) are poly(s, n)-Lipschitz. We note that the lower bounds hold regardless of the architecture of the model, i.e., NN used to learn. Our lower bounds are asymptotic, but we show empirically in Section 4 that they apply even at practical values of n and s. We experimentally observe a threshold for the quantity s√n, above which stochastic gradient descent fails to train the NN to low error—that is, regression error below that of the best constant approximation— regardless of choices of gates, architecture used to learning, learning rate, batch size, etc. The condition number upper bound for C is significant in part because there do exist SQ algorithms for learning certain families of simple NNs with time complexity polynomial in the condition number of the weight matrix (the tensor factorization based algorithm of Janzamin et al. [12] can easily be seen to be SQ). Our results imply that this dependence cannot be substantially improved (see Section 1.3). Remark 1. The class of input distributions can be relaxed further. Rather than being a product distribution, it suffices if the distribution is in isotropic position and invariant under reflections across 3 σ(1/s + x) σ(1/s −x) ψ(x) = σ(1/s + x) + σ(1/s −x) −1 φm(x) = ψ(x) + ψ(x −4/s) + ψ(x + 4/s) + · · · Figure 1.1: (a) The sigmoid function, the L1-function ψ constructed from sigmoid functions, and the nearly-periodic “wave” function φ constructed from ψ. (b) The architecture of the NNs computing the wave functions. and permutations of coordinate axes. And instead of being logconcave, it suffices for marginals to be unimodal with variance σ, density O(1/σ) at the mode, and density Ω(1/σ) within a standard deviation of the mode. Overall, our lower bounds suggest that even the combination of small network size, smooth, standard activation functions, and benign input distributions is insufficient to make learning a NN easy, even improperly via a very general family of algorithms. Instead, stronger structural assumptions on the NN, such as a small condition number, and very strong structural properties on the input distribution, are necessary to make learning tractable. It is our hope that these insights will guide the discovery of provable efficiency guarantees. 1.3 Related Work There is much work on complexity-theoretic hardness of learning neural networks [4, 7, 15]. These results have shown the hardness of learning functions representable as small (depth 2) neural networks over discrete input distributions. Since these input distributions bear little resemblance to the realworld data sets on which NNs have seen great recent empirical success, it is natural to wonder whether more realistic distributional assumptions might make learning NNs tractable. Our results suggest that benign input distributions are insufficient, even for functions realized as small networks with standard, smooth activation units. Recent independent work of Shamir [17] shows a smooth family of functions for which the gradient of the squared loss function is not informative for training a NN over a Gaussian input distribution (more generally, for distributions with rapidly decaying Fourier coefficients). In fact, for this setting the paper shows an exponentially small bound on the gradient, relying on the fine structure of the Gaussian distribution and of the smooth functions (see [16] for a follow-up with experiments and further ideas). These smooth functions cannot be realized in small NNs using the most commonly studied activation units (though a related non-smooth family of functions for which the bounds apply can be realized by larger NNs using ReLU units). In contrast our bounds are (a) in the more general SQ framework, and in particular apply regardless of the loss function, regularization scheme, or specific variant of gradient descent (b) apply to functions actually realized as small NNs using any of a wide family of activation units (c) apply to any logconcave input distribution and (d) are robust to small perturbations of the input layer weights. Also related is the tensor-based algorithm of Janzamin et al. [12] to learn a 1-layer network under nondegeneracy assumptions on the weight matrix. The complexity is polynomial in the dimension, size of network being learned and condition number of the weight matrix. Since their tensor decomposition can also be implemented as a statistical query algorithm, our results give a lower bound indicating that such a polynomial dependence on the dimension and condition number is unavoidable. Other algorithmic results for learning NNs apply in very restricted settings. For example, polynomialtime bounds are known for learning NNs with a single hidden ReLU layer over Gaussian inputs under 4 the assumption that the hidden units use disjoint sets of inputs [5], as well as for learning a single ReLU [10] and for learning sparse polynomials via NNs [1]. 1.4 Proof ideas To prove Theorem 1.1, we wish to estimate the number of queries used by a statistical query algorithm learning the family of s-wave functions, regardless of the strategy employed by the algorithm. To that end, we estimate the statistical dimension of the family of s-wave functions. Statistical dimension is a key concept in the study of SQ algorithms, and is known to characterize the query complexity of supervised learning via SQ algorithms [3, 19, 9]. Briefly, a family C of distributions (e.g., over labeled examples) has “statistical dimension d with average correlation ¯γ” if every (1/d)-fraction of C has average correlation ¯γ; this condition implies that C cannot be learned with fewer than O(d) queries to VSTAT(O(1/¯γ)). See Section 2 for precise statements. The SQ literature for supervised learning of boolean functions is rich. However, lower bounds for regression problems in the SQ framework have so far not appeared in the literature, and the existing notions of statistical dimension are too weak for this setting. We state a new, strengthened notion of statistical dimension for regression problems (Definition 2), and show that lower bounds for this dimension transfer to query complexity bounds (Theorem 2.1). The essential difference from the statistical dimension for learning is that we must additionally bound the average covariances of indicator functions (or, rather, continuous analogues of indicators) on the outputs of functions in C. The essential claim in our lower bounds is therefore in showing that a typical pair of (indicator functions on outputs of) s-wave functions has small covariance. In other words, to prove Theorem 1.1, it suffices to upper-bound the quantity E[(χ ◦fm,S)(χ ◦fm,T )] −E[χ ◦fm,S]E[χ ◦fm,T ) (1.2) for most pairs fm,S, fm,T of s-wave functions, where χ is some smoothed version of an indicator function. Write h(t) = χ(φm(t)), so χ(fm,S(x1, . . . , xn)) = h(P i∈S xi). We have E (x1,...,xn)∼D(h( X i∈S xi)h( X i∈T xi) | X i∈S∩T xi = z) = E xi,i∈S\T(h( X i∈S\T xi + z)) E xi,i∈T \S(h( X i∈T \S xi + z)) . So to estimate Eq. (1.2), it suffices to show that the expectation of h(P i∈S xi) doesn’t change much when we condition on the value of z = P i∈S∩T xi. We now observe that if χ is Lipschitz, and φm is “close to” a periodic function with period θ > 0, then h is also “close to” a periodic function with period θ > 0 (see Section 3 for a precise statement). Under this near-periodicity assumption, we are now able to show for any logconcave distribution D′ on R of variance σ > θ, and any translation z ∈R, that E x∼D(h(x + z) −h(x)) = O θ σ E x∼D(|h(x)|) . In particular, conditioning on the value of z = P i∈S∩T xi has little effect on the value of h(P i∈S xi). The combination of these observations gives the query complexity lower bound. Precise statements of some of the technical lemmas are given in Section 3; the complete proof appears in the full version of this paper [18]. 2 Statistical dimension We now give a precise definition of the statistical dimension with average correlation for regression problems, extending the concept introduced in [9]. Let C be a finite family of functions f : X →R over some domain X, and let D be a distribution over X. The average covariance and the average correlation of C with respect to D are CovD(C) = 1 |C|2 X f,g∈C CovD(f, g) and ρD(C) = 1 |C|2 X f,g∈C ρD(f, g) 5 where ρD(f, g) = CovD(f, g)/ p Var(f) Var(g) when both Var(f) and Var(g) are nonzero, and ρD(f, g) = 0 otherwise. For y ∈R and ϵ > 0, we define the ϵ-soft indicator function χ(ϵ) y : R →R as χ(ϵ) y (x) = χy(x) = max{0, 1/ϵ −(1/ϵ)2|x −y|}. So χy is (1/ϵ)2-Lipschitz, is supported on (y −ϵ, y + ϵ), and has norm ∥χy∥1 = 1. Definition 2. Let ¯γ > 0, let D be a probability distribution over some domain X, and let C be a family of functions f : X →[−1, 1] that are identically distributed as random variables over D. The statistical dimension of C relative to D with average covariance ¯γ and precision ϵ, denoted by ϵ-SDA(C, D, ¯γ), is defined to be the largest integer d such that the following holds: for every y ∈R and every subset C′ ⊆C of size |C′| > |C|/d, we have ρD(C′) ≤¯γ. Moreover, CovD(C′ y) ≤(max{ϵ, µ(y)})2¯γ where C′ y = {χ(ϵ) y ◦f : f ∈C} and µ(y) = ED(χ(ϵ) y ◦f) for some f ∈C. Note that the parameter µ(y) is independent of the choice of f ∈C. The application of this notion of dimension is given by the following theorem. Theorem 2.1. Let D be a distribution on a domain X and let C be a family of functions f : X →[−1, 1] identically distributed as random variables over D. Suppose there is d ∈R and λ ≥1 ≥¯γ > 0 such that ϵ-SDA(C, D, ¯γ) ≥d, where ϵ ≤¯γ/(2λ). Let A be a randomized algorithm learning C over D with probability greater than 1/2 to regression error less than Ω(1) −2√¯γ. If A only uses queries to VSTAT(t) for some t = O(1/¯γ), which are λ-Lipschitz at any fixed x ∈X, then A uses Ω(d) queries. A version of the theorem for Boolean functions is proved in [9]. For completeness, in the full version of this paper [18] we include a proof of Theorem 2.1, following ideas in [19, Theorem 2]. As a consequence of Theorem 2.1, there is no need to consider an SQ algorithm’s query strategy in order to obtain lower bounds on its query complexity. Instead, the lower bounds follow directly from properties of the concept class itself, in particular from bounds on average covariances of indicator functions. Theorem 1.1 will therefore follow from Theorem 2.1 by analyzing the statistical dimension of the s-wave functions. 3 Estimates of statistical dimension for one-layer functions We now present the most general context in which we obtain SQ lower bounds. A function φ : R →R is (M, δ, θ)-quasiperiodic if there exists a function ˜φ : R →R which is periodic with period θ such that |φ(x) −˜φ(x)| < δ for all x ∈[−M, M]. In particular, any periodic function with period θ is (M, δ, θ)-quasiperiodic for all M, δ > 0. Lemma 3.1. Let n ∈N and let θ > 0. There exists ¯γ = O(θ2/n) such that for all ϵ > 0, there exist M = O(√n log(n/(ϵθ)) and δ = Ω(ϵ3θ/√n) and a family C0 of affine functions g : Rn →R of bounded operator norm with the following property. Suppose φ : R →[−1, 1] is (M, δ, θ)quasiperiodic and Varx∼U(0,θ)(φ(x)) = Ω(1). Let D be logconcave distribution with unit variance on R. Then for C = {φ ◦g : g ∈C0}, we have ϵ-SDA(C, Dn, ¯γ) ≥2Ω(n)ϵθ2. Furthermore, the functions of C are identically distributed as random variables over Dn. In other words, we have statistical dimension bounds (and hence query complexity bounds) for functions that are sufficiently close to periodic. However, the activation units of interest are generally monotonic increasing functions such as sigmoids and ReLUs that are quite far from periodic. Hence, in order to apply Lemma 3.1 in our context, we must show that the activation units of interest can be combined to make nearly periodic functions. As an intermediate step, we analyze activation functions in L1(R), i.e., functions whose absolute value has bounded integral over the whole real line. These L1-functions analyzed in our framework are themselves constructed as affine combinations of the usual activation functions. For example, for the sigmoid unit with sharpness s, we study the following L1-function (cf. (1.1)): ψ(x) = σ 1 s + x + σ 1 s −x −1. (3.1) 6 We now describe the properties of the integrable functions ψ that will be used in the proof. Definition 3. For ψ ∈L1(R), we say the essential radius of ψ is the number r ∈R such that R r −r |ψ| = (5/6)∥ψ∥1. Definition 4. We say ψ ∈L1(R) has the mean bound property if for all x ∈R and ϵ > 0, we have ψ(x) = O 1 ϵ Z x+ϵ x−ϵ |ψ(x)| . In particular, if ψ is bounded, and monotonic nonincreasing (resp. nondecreasing) for sufficiently large positive (resp. negative) inputs, then ψ satisfies Definition 4. Alternatively, it suffices for ψ to have bounded first derivative. To complete the proof of Theorem 1.1, we show that we can combine activation units ψ satisfying the above properties in a function which is close to periodic, i.e., which satisfies the hypotheses of Lemma 3.1 above. Lemma 3.2. Let ψ ∈L1(R) have the mean bound property and let r > 0 be such that ψ has essential radius at most r and ∥ψ∥1 = Θ(r). Let M, δ > 0. Then there is a pair of affine functions h : Rm →R and g : R →Rm such that if φ(x) = h(ψ(g(x))), where ψ is applied component-wise, then φ is (M, δ, 4r)-quasiperiodic. Furthermore, φ(x) ∈[−1, 1] for all x ∈R, and Varx∼U(0,4r)(φ(x)) = Ω(1), and we may take m = (1/r) · O(max{m1, M}), where m1 satisfies Z ∞ m1 (|ψ(x)| + |ψ(−x)|)dx < 4δr . We now sketch how Lemmas 3.1 and 3.2 imply Theorem 1.1 for sigmoid units. Sketch of proof of Theorem 1.1. The sigmoid function σ with sharpness s is not even in L1(R), so it is unsuitable as the function ψ of Lemma 3.2. Instead, we define ψ to be an affine combination of σ gates as in Eq. (3.1). Then ψ satisfies the hypotheses of Lemma 3.2. Let θ = 4r and let ¯γ = O(θ2/n) be as given by the statement of Lemma 3.1. Let ϵ = ¯γ/(2λ), and let M = O(√n log(n/(ϵθ)) and δ = Ω(ϵ3θ/√n) be as given by the statement of Lemma 3.1. By Lemma 3.2, there is m ∈N and functions h : Rm →R and g : R →Rm such that φ = h ◦ψ ◦g is (M, δ, θ)-quasiperiodic and satisfies the hypotheses of Lemma 3.1. Therefore, we have a family C0 of affine functions f : Rn →R such that for C = {φ◦f : f ∈C0} satisfies ϵ-SDA(C, D, ¯γ) ≥2Ω(n)ϵθ2. Therefore, the functions in C satisfy the hypothesis of Theorem 2.1, giving the query complexity lower bound. All details are given in the full version of the paper [18]. 3.1 Different activation functions Similar proofs give corresponding lower bounds for activation functions other than sigmoids. In every case, we reduce to gates satisfying the hypotheses of Lemma 3.2 by constructing an appropriate L1-function ψ as an affine combination of of the activation functions. For example, let σ(x) = σs(x) = max{0, sx} denote the ReLU unit with slope s. Then the affine combination ψ(x) = σ(x + 1/s) −σ(x) + σ(−x + 1/s) −σ(−x) −1 (3.2) is in L1(R), and is zero for |x| ≥1/s (and hence has the mean bound property and essential radius O(1/s)). The proof of Theorem 1.1 therefore goes through almost identically, the slope-s ReLU units replacing the s-sharp sigmoid units. In particular, there is a family of single hidden layer NNs using O(s√n log(λsn) slope-s ReLU units, which is not learned by any SQ algorithm using fewer than 2Ω(n)/(λs2) queries to VSTAT(O(s2n)), when inputs are drawn i.i.d. from a logconcave distribution. Similarly, we can consider the s-sharp softplus function σ(x) = log(exp(sx) + 1). Then Eq. (3.2) again gives an appropriate L1(R) function to which we can apply Lemma 3.2 and therefore follow the proof of Theorem 1.1. For softsign functions σ(x) = x/(|x| + 1), we use the affine combination ψ(x) = σ(x + 1) + σ(−x + 1) . 7 (a) normal distribution (b) exp(−|xi|) distribution (c) uniform l1 ball (d) normal distribution (e) exp(−|xi|) distribution (f) uniform l1 ball Figure 4.1: Test error vs sharpness times square-root of dimension. Each curve corresponds to a different input dimension n. The flat line corresponds to the best error by a constant function. In the case of softsign functions, this function ψ converges much more slowly to zero as |x| →∞ compared to sigmoid units. Hence, in order to obtain an adequate quasiperiodic function as an affine combination of ψ-units, a much larger number of ψ-units is needed: the bound on the number m of units in this case is polynomial in the Lipschitz parameter λ of the query functions, and a larger polynomial in the input dimension n. The case of other commonly used activation functions, such as ELU (exponential linear) or LReLU (Leaky ReLU), is similar to those discussed above. 4 Experiments In the experiments, we show how the errors, E(f(x) −y)2, change with respect to the sharpness parameter s and the input dimension n for two input distributions: 1) multivariate normal distribution, 2) coordinate-wise independent exp(−|xi|), and 3) uniform in the l1 ball {x : P i |xi| ≤n}. For a given sharpness parameter s ∈{0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2}, input dimension d ∈ {50, 100, 200} and input distribution, we generate the true function according to Eqn. 1.1. There are a total of 50,000 training data points and 1000 test data points. We then learn the true function with fully-connected neural networks of both ReLU and sigmoid activation functions. The best test error is reported among the following different hyper-parameters. The number of hidden layers we used is 1, 2, and 4. The number of hidden units per layer varies from 4n to 8n. The training is carried out using SGD with 0.9 momentum, and we enumerate learning rates from 0.1, 0.01 and 0.001 and batch sizes from 64, 128 and 256. From Theorem 1.1, learning such functions should become difficult as s√n increases over a threshold. In Figure 4.1, we illustrate this phenomenon. Each curve corresponds to a particular input dimension n and each point in the curve corresponds to a particular smoothness parameter s. The x-axis is s√n and the y-axis denotes the test errors. We can see that at roughly s√n = 5, the problem becomes hard even empirically. Acknowledgments The authors are grateful to Vitaly Feldman for discussions about statistical query lower bounds, and for suggestions that simplified the presentation of our results, and also to Adam Kalai for an inspiring discussion. This research was supported in part by NSF grants CCF-1563838 and CCF-1717349. 8 References [1] Alexandr Andoni, Rina Panigrahy, Gregory Valiant, and Li Zhang. Learning polynomials with neural networks. In International Conference on Machine Learning, pages 1908–1916, 2014. [2] Andrew R Barron. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Transactions on Information theory, 39(3):930–945, 1993. [3] Avrim Blum, Merrick Furst, Jeffrey Jackson, Michael Kearns, Yishay Mansour, and Steven Rudich. Weakly learning DNF and characterizing statistical query learning using Fourier analysis. In STOC, pages 253–262, 1994. [4] Avrim Blum and Ronald L. Rivest. Training a 3-node neural network is NP-complete. Neural Networks, 5(1):117–127, 1992. [5] Alon Brutzkus and Amir Globerson. Globally optimal gradient descent for a convnet with gaussian inputs. CoRR, abs/1702.07966, 2017. [6] George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals, and Systems (MCSS), 2(4):303–314, 1989. [7] Amit Daniely and Shai Shalev-Shwartz. Complexity theoretic limitations on learning dnf’s. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 815–830, 2016. [8] Ronen Eldan and Ohad Shamir. The power of depth for feedforward neural networks. In Conference on Learning Theory, pages 907–940, 2016. [9] Vitaly Feldman, Elena Grigorescu, Lev Reyzin, Santosh Vempala, and Ying Xiao. Statistical algorithms and a lower bound for planted clique. In Proceedings of the 45th annual ACM Symposium on Theory of Computing, pages 655–664. ACM, 2013. [10] Surbhi Goel, Varun Kanade, Adam R. Klivans, and Justin Thaler. Reliably learning the ReLU in polynomial time. CoRR, abs/1611.10258, 2016. [11] Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural networks, 2(5):359–366, 1989. [12] Majid Janzamin, Hanie Sedghi, and Anima Anandkumar. Generalization bounds for neural networks through tensor factorization. CoRR, abs/1506.08473, 2015. [13] Michael Kearns. Efficient noise-tolerant learning from statistical queries. Journal of the ACM, 45(6):983–1006, 1998. [14] Michael J. Kearns. Efficient noise-tolerant learning from statistical queries. In Proceedings of the Twenty-Fifth Annual ACM Symposium on Theory of Computing, May 16-18, 1993, San Diego, CA, USA, pages 392–401, 1993. [15] Adam R. Klivans. Cryptographic hardness of learning. In Encyclopedia of Algorithms, pages 475–477. 2016. [16] Shai Shalev-Shwartz, Ohad Shamir, and Shaked Shammah. Failures of deep learning. CoRR, abs/1703.07950, 2017. [17] Ohad Shamir. Distribution-specific hardness of learning neural networks. CoRR, abs/1609.01037, 2016. [18] Le Song, Santosh Vempala, John Wilmes, and Bo Xie. On the complexity of learning neural networks. arXiv preprint arXiv:1707.04615, 2017. [19] B. Szörényi. Characterizing statistical query learning:simplified notions and proofs. In ALT, pages 186–200, 2009. [20] Matus Telgarsky. Benefits of depth in neural networks. arXiv preprint arXiv:1602.04485, 2016. 9 | 2017 | 439 |
6,940 | Nonlinear random matrix theory for deep learning Jeffrey Pennington Google Brain jpennin@google.com Pratik Worah Google Research pworah@google.com Abstract Neural network configurations with random weights play an important role in the analysis of deep learning. They define the initial loss landscape and are closely related to kernel and random feature methods. Despite the fact that these networks are built out of random matrices, the vast and powerful machinery of random matrix theory has so far found limited success in studying them. A main obstacle in this direction is that neural networks are nonlinear, which prevents the straightforward utilization of many of the existing mathematical results. In this work, we open the door for direct applications of random matrix theory to deep learning by demonstrating that the pointwise nonlinearities typically applied in neural networks can be incorporated into a standard method of proof in random matrix theory known as the moments method. The test case for our study is the Gram matrix Y T Y , Y = f(WX), where W is a random weight matrix, X is a random data matrix, and f is a pointwise nonlinear activation function. We derive an explicit representation for the trace of the resolvent of this matrix, which defines its limiting spectral distribution. We apply these results to the computation of the asymptotic performance of single-layer random feature networks on a memorization task and to the analysis of the eigenvalues of the data covariance matrix as it propagates through a neural network. As a byproduct of our analysis, we identify an intriguing new class of activation functions with favorable properties. 1 Introduction The list of successful applications of deep learning is growing at a staggering rate. Image recognition (Krizhevsky et al., 2012), audio synthesis (Oord et al., 2016), translation (Wu et al., 2016), and speech recognition (Hinton et al., 2012) are just a few of the recent achievements. Our theoretical understanding of deep learning, on the other hand, has progressed at a more modest pace. A central difficulty in extending our understanding stems from the complexity of neural network loss surfaces, which are highly non-convex functions, often of millions or even billions (Shazeer et al., 2017) of parameters. In the physical sciences, progress in understanding large complex systems has often come by approximating their constituents with random variables; for example, statistical physics and thermodynamics are based in this paradigm. Since modern neural networks are undeniably large complex systems, it is natural to consider what insights can be gained by approximating their parameters with random variables. Moreover, such random configurations play at least two privileged roles in neural networks: they define the initial loss surface for optimization, and they are closely related to random feature and kernel methods. Therefore it is not surprising that random neural networks have attracted significant attention in the literature over the years. Another useful technique for simplifying the study of large complex systems is to approximate their size as infinite. For neural networks, the concept of size has at least two axes: the number 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. of samples and the number of parameters. It is common, particularly in the statistics literature, to consider the mean performance of a finite-capacity model against a given data distribution. From this perspective, the number of samples, m, is taken to be infinite relative to the number of parameters, n, i.e. n/m ! 0. An alternative perspective is frequently employed in the study of kernel or random feature methods. In this case, the number of parameters is taken to be infinite relative to the number of samples, i.e. n/m ! 1. In practice, however, most successful modern deep learning architectures tend to have both a large number of samples and a large number of parameters, often of roughly the same order of magnitude. (One simple explanation for this scaling may just be that the other extremes tend to produce over- or under-fitting). Motivated by this observation, in this work we explore the infinite size limit in which both the number of samples and the number of parameters go to infinity at the same rate, i.e. n, m ! 1 with n/m = φ, for some finite constant φ. This perspective puts us squarely in the regime of random matrix theory. An abundance of matrices are of practical and theoretical interest in the context of random neural networks. For example, the output of the network, its Jacobian, and the Hessian of the loss function with respect to the weights are all interesting objects of study. In this work we focus on the computation of the eigenvalues of the matrix M ⌘1 mY T Y , where Y = f(WX), W is a Gaussian random weight matrix, X is a Gaussian random data matrix, and f is a pointwise activation function. In many ways, Y is a basic primitive whose understanding is necessary for attacking more complicated cases; for example, Y appears in the expressions for all three of the matrices mentioned above. But studying Y is also quite interesting in its own right, with several interesting applications to machine learning that we will explore in Section 4. 1.1 Our contribution The nonlinearity of the activation function prevents us from leveraging many of the existing mathematical results from random matrix theory. Nevertheless, most of the basic tools for computing spectral densities of random matrices still apply in this setting. In this work, we show how to overcome some of the technical hurdles that have prevented explicit computations of this type in the past. In particular, we employ the so-called moments method, deducing the spectral density of M from the traces tr M k. Evaluating the traces involves computing certain multi-dimensional integrals, which we show how to evaluate, and enumerating a certain class of graphs, for which we derive a generating function. The result of our calculation is a quartic equation which is satisfied by the trace of the resolvent of M, G(z) = −E[tr(M −zI)−1]. It depends on two parameters that together capture the only relevant properties of the nonlinearity f: ⌘, the Gaussian mean of f 2, and ⇣, the square of the Gaussian mean of f 0. Overall, the techniques presented here pave the way for studying other types of nonlinear random matrices relevant for the theoretical understanding of neural networks. 1.2 Applications of our results We show that the training loss of a ridge-regularized single-layer random-feature least-squares memorization problem with regularization parameter γ is related to −γ2G0(−γ). We observe increased memorization capacity for certain types of nonlinearities relative to others. In particular, for a fixed value of γ, the training loss is lower if ⌘/⇣is large, a condition satisfied by a large class of activation functions, for example when f is close to an even function. We believe this observation could have an important practical impact in designing next-generation activation functions. We also examine the eigenvalue density of M and observe that if ⇣= 0 the distribution collapses to the Marchenko-Pastur distribution (Marˇcenko & Pastur, 1967), which describes the eigenvalues of the Wishart matrix XT X. We therefore make the surprising observation that there exist functions f such that f(WX) has the same singular value distribution as X. Said another way, the eigenvalues of the data covariance matrix are unchanged in distribution after passing through a single nonlinear layer of the network. We conjecture that this property is actually satisfied through arbitrary layers of the network, and find supporting numerical evidence. This conjecture may be regarded as a claim about the universality of our results with respect to the distribution of X. Note that preserving the first moment of this distribution is also an effect achieved through batch normalization (Ioffe & Szegedy, 2015), although higher moments are not necessarily preserved. We therefore offer the hypothesis that choosing activation functions with ⇣= 0 might lead to improved training performance, in the same way that batch normalization does, at least early in training. 2 1.3 Related work The study of random neural networks has a relatively long history, with much of the initial work focusing on approaches from statistical physics and the theory of spin glasses. For example, Amit et al. (1985) analyze the long-time behavior of certain dynamical models of neural networks in terms of an Ising spin-glass Hamiltonian, and Gardner & Derrida (1988) examine the storage capacity of neural networks by studying the density of metastable states of a similar spin-glass system. More recently, Choromanska et al. (2015) studied the critical points of random loss surfaces, also by examining an associated spin-glass Hamiltonian, and Schoenholz et al. (2017) developed an exact correspondence between random neural networks and statistical field theory. In a somewhat tangential direction, random neural networks have also been investigated through their relationship to kernel methods. The correspondence between infinite-dimensional neural networks and Gaussian processes was first noted by Neal (1994a,b). In the finite-dimensional setting, the approximate correspondence to kernel methods led to the development random feature methods that can accelerate the training of kernel machines (Rahimi & Recht, 2007). More recently, a duality between random neural networks with general architectures and compositional kernels was explored by Daniely et al. (2016). In the last several years, random neural networks have been studied from many other perspectives. Saxe et al. (2014) examined the effect of random initialization on the dynamics of learning in deep linear networks. Schoenholz et al. (2016) studied how information propagates through random networks, and how that affects learning. Poole et al. (2016) and Raghu et al. (2016) investigated various measures of expressivity in the context of deep random neural networks. Despite this extensive literature related to random neural networks, there has been relatively little research devoted to studying random matrices with nonlinear dependencies. The main focus in this direction has been kernel random matrices and robust statistics models (El Karoui et al., 2010; Cheng & Singer, 2013). In a closely-related contemporaneous work, Louart et al. (2017) examined the resolvent of Gram matrix Y Y T in the case where X is deterministic. 2 Preliminaries Throughout this work we will be relying on a number of basic concepts from random matrix theory. Here we provide a lightning overview of the essentials, but refer the reader to the more pedagogical literature for background (Tao, 2012). 2.1 Notation Let X 2 Rn0⇥m be a random data matrix with i.i.d. elements Xiµ ⇠N(0, σ2 x) and W 2 Rn1⇥n0 be a random weight matrix with i.i.d. elements Wij ⇠N(0, σ2 w/n0). As discussed in Section 1, we are interested in the regime in which both the row and column dimensions of these matrices are large and approach infinity at the same rate. In particular, we define φ ⌘n0 m , ⌘n0 n1 , (1) to be fixed constants as n0, n1, m ! 1. In what follows, we will frequently consider the limit that n0 ! 1 with the understanding that n1 ! 1 and m ! 1, so that eqn. (1) is satisfied. We denote the matrix of pre-activations by Z = WX. Let f : R ! R be a function with zero mean and finite moments, Z dz p 2⇡e−z2 2 f(σwσxz) = 0, """" Z dz p 2⇡e−z2 2 f(σwσxz)k """" < 1 for k > 1 , (2) and denote the matrix of post-activations Y = f(Z), where f is applied pointwise. We will be interested in the Gram matrix, M = 1 mY Y T 2 Rn1⇥n1 . (3) 3 2.2 Spectral density and the Stieltjes transform The empirical spectral density of M is defined as, ⇢M(t) = 1 n1 n1 X j=1 δ (t −λj(M)) , (4) where δ is the Dirac delta function, and the λj(M), j = 1, . . . , n1, denote the n1 eigenvalues of M, including multiplicity. The limiting spectral density is defined as the limit of eqn. (4) as n1 ! 1, if it exists. For z 2 C \ supp(⇢M) the Stieltjes transform G of ⇢M is defined as, G(z) = Z ⇢M(t) z −t dt = −1 n1 E ⇥ tr(M −zIn1)−1⇤ , (5) where the expectation is with respect to the random variables W and X. The quantity (M −zIn1)−1 is the resolvent of M. The spectral density can be recovered from the Stieltjes transform using the inversion formula, ⇢M(λ) = −1 ⇡lim ✏!0+ Im G(λ + i✏) . (6) 2.3 Moment method One of the main tools for computing the limiting spectral distributions of random matrices is the moment method, which, as the name suggests, is based on computations of the moments of ⇢M. The asymptotic expansion of eqn. (5) for large z gives the Laurent series, G(z) = 1 X k=0 mk zk+1 , (7) where mk is the kth moment of the distribution ⇢M, mk = Z dt ⇢M(t)tk = 1 n1 E ⇥ tr M k⇤ . (8) If one can compute mk, then the density ⇢M can be obtained via eqns. (7) and (6). The idea behind the moment method is to compute mk by expanding out powers of M inside the trace as, 1 n1 E ⇥ tr M k⇤ = 1 n1 E 2 4 X i1,...,ik2[n1] Mi1i2Mi2i3 · · · Mik−1ikMiki1 3 5 , (9) and evaluating the leading contributions to the sum as the matrix dimensions go to infinity, i.e. as n0 ! 1. Determining the leading contributions involves a complicated combinatorial analysis, combined with the evaluation of certain nontrivial high-dimensional integrals. In the next section and the supplementary material, we provide an outline for how to tackle these technical components of the computation. 3 The Stieltjes transform of M 3.1 Main result The following theorem characterizes G as the solution to a quartic polynomial equation. Theorem 1. For M, φ, , σw, and σx defined as in Section 2.1, and constants ⌘and ⇣defined as, ⌘= Z dz e−z2/2 p 2⇡f(σwσxz)2 and ⇣= " σwσx Z dz e−z2/2 p 2⇡f 0(σwσxz) #2 , (10) 4 the Stieltjes transform of the spectral density of M satisfies, G(z) = z P ✓1 z ◆ + 1 − z , (11) where, P = 1 + (⌘−⇣)tPφP + PφP t⇣ 1 −PφP t⇣, (12) and Pφ = 1 + (P −1)φ , P = 1 + (P −1) . (13) The proof of Theorem 1 is relatively long and complicated, so it’s deferred to the supplementary material. The main idea underlying the proof is to translate the calculation of the moments in eqn. (7) into two subproblems, one of enumerating certain connected outer-planar graphs, and another of evaluating integrals that correspond to cycles in those graphs. The complexity resides both in characterizing which outer-planar graphs contribute at leading order to the moments, and also in computing those moments explicitly. A generating function encapsulating these results (P from Theorem 1) is shown to satisfy a relatively simple recurrence relation. Satisfying this recurrence relation requires that P solve eqn. (12). Finally, some bookkeeping relates G to P. 3.2 Limiting cases 3.2.1 ⌘= ⇣ In Section 3 of the supplementary material, we use a Hermite polynomial expansion of f to show that ⌘= ⇣if and only if f is a linear function. In this case, M = ZZT , where Z = WX is a product of Gaussian random matrices. Therefore we expect G to reduce to the Stieltjes transform of a so-called product Wishart matrix. In (Dupic & Castillo, 2014), a cubic equation defining the Stieltjes transform of such matrices is derived. Although eqn. (11) is generally quartic, the coefficient of the quartic term vanishes when ⌘= ⇣(see Section 4 of the supplementary material). The resulting cubic polynomial is in agreement with the results in (Dupic & Castillo, 2014). 3.2.2 ⇣= 0 Another interesting limit is when ⇣= 0, which significantly simplifies the expression in eqn. (12). Without loss of generality, we can take ⌘= 1 (the general case can be recovered by rescaling z). The resulting equation is, z G2 + ⇣/ 1 − φ 0 z −1 ⌘ G + φ = 0 , (14) which is precisely the equation satisfied by the Stieltjes transform of the Marchenko-Pastur distribution with shape parameter φ/ . Notice that when = 1, the latter is the limiting spectral distribution of XXT , which implies that Y Y T and XXT have the same limiting spectral distribution. Therefore we have identified a novel type of isospectral nonlinear transformation. We investigate this observation in Section 4.1. 4 Applications 4.1 Data covariance Consider a deep feedforward neural network with lth-layer post-activation matrix given by, Y l = f(W lY l−1), Y 0 = X . (15) The matrix Y l(Y l)T is the lth-layer data covariance matrix. The distribution of its eigenvalues (or the singular values of Y l) determine the extent to which the input signals become distorted or stretched as they propagate through the network. Highly skewed distributions indicate strong anisotropy in the embedded feature space, which is a form of poor conditioning that is likely to derail or impede learning. A variety of techniques have been developed to alleviate this problem, the most popular of which is batch normalization. In batch normalization, the variance of individual activations across the batch (or dataset) is rescaled to equal one. The covariance is often ignored — variants that attempt to 5 = 1 ( = 0) = 1/4 ( = 0.498) = 0 ( = 0.733) = -1/4 ( = 0.884) = -1 ( = 1) 5 10 50 100 500 1000 5000 0.005 0.010 0.050 0.100 0.500 1 n0 d(1, 1) (a) L = 1 = 1 ( = 0) = 1/4 ( = 0.498) = 0 ( = 0.733) = -1/4 ( = 0.884) = -1 ( = 1) 5 10 50 100 500 1000 5000 0.005 0.010 0.050 0.100 0.500 1 n0 d(1, 10) (b) L = 10 Figure 1: Distance between the (a) first-layer and (b) tenth-layer empirical eigenvalue distributions of the data covariance matrices and our theoretical prediction for the first-layer limiting distribution ¯⇢1, as a function of network width n0. Plots are for shape parameters φ = 1 and = 3/2. The different curves correspond to different piecewise linear activation functions parameterize by ↵: ↵= −1 is linear, ↵= 0 is (shifted) relu, and ↵= 1 is (shifted) absolute value. In (a), for all ↵, we see good convergence of the empirical distribution ⇢1 to our asymptotic prediction ¯⇢1. In (b), in accordance with our conjecture, we find good agreement between ¯⇢1 and the tenth-layer empirical distribution ⇣= 0, but not for other values of ⇣. This provides evidence that when ⇣= 0 the eigenvalue distribution is preserved by the nonlinear transformations. fully whiten the activations can be very slow. So one aspect of batch normalization, as it is used in practice, is that it preserves the trace of the covariance matrix (i.e. the first moment of its eigenvalue distribution) as the signal propagates through the network, but it does not control higher moments of the distribution. A consequence is that there may still be a large imbalance in singular values. An interesting question, therefore, is whether there exist efficient techniques that could preserve or approximately preserve the full singular value spectrum of the activations as they propagate through the network. Inspired by the results of Section 3.2.2, we hypothesize that choosing an activation function with ⇣= 0 may be one way to approximately achieve this behavior, at least early in training. From a mathematical perspective, this hypothesis is similar to asking whether our results in eqn. (11) are universal with respect to the distribution of X. We investigate this question empirically. Let ⇢l be the empirical eigenvalue density of Y l(Y l)T , and let ¯⇢1 be the limiting density determined by eqn. (11) (with = 1). We would like to measure the distance between ¯⇢1 and ⇢l in order to see whether the eigenvalues propagate without getting distorted. There are many options that would suffice, but we choose to track the following metric, d(¯⇢1, ⇢l) ⌘ Z dλ |¯⇢1(λ) −⇢l(λ)| . (16) To observe the effect of varying ⇣, we utilize a variant of the relu activation function with non-zero slope for negative inputs, f↵(x) = [x]+ + ↵[−x]+ −1+↵ p 2⇡ q 1 2(1 + ↵2) − 1 2⇡(1 + ↵)2 . (17) One may interpret ↵as (the negative of) the ratio of the slope for negative x to the slope for positive x. It is straightforward to check that f↵has zero Gaussian mean and that, ⌘= 1, ⇣= (1 −↵)2 2(1 + ↵2) −2 ⇡(1 + ↵)2 , (18) so we can adjust ⇣(without affecting ⌘) by changing ↵. Fig. 1(a) shows that for any value of ↵(and thus ⇣) the distance between ¯⇢1 and ⇢1 approaches zero as the network width increases. This offers 6 β = -∞ β = -8 β = -6 β = -4 β = -2 β = 0 β = 2 -8 -6 -4 -2 0 2 4 0.0 0.2 0.4 0.6 0.8 1.0 log10(γ/η) Etrain (a) φ = 1 2, = 1 2 β = -∞ β = -8 β = -6 β = -4 β = -2 β = 0 β = 2 -8 -6 -4 -2 0 2 4 0.0 0.2 0.4 0.6 0.8 1.0 log10(γ/η) Etrain (b) φ = 1 2, = 3 4 Figure 2: Memorization performance of random feature networks versus ridge regularization parameter γ. Theoretical curves are solid lines and numerical solutions to eqn. (19) are points. β ⌘log10(⌘/⇣−1) distinguishes classes of nonlinearities, with β = −1 corresponding to a linear network. Each numerical simulation is done with a different randomly-chosen function f and the specified β. The good agreement confirms that no details about f other than β are relevant. In (a), there are more random features than data points, allowing for perfect memorization unless the function f is linear, in which case the model is rank constrained. In (b), there are fewer random features than data points, and even the nonlinear models fail to achieve perfect memorization. For a fixed amount of regularization γ, curves with larger values of β (smaller values of ⇣) have lower training loss and hence increased memorization capacity. numerical evidence that eqn. (11) is in fact the correct asymptotic limit. It also shows how quickly the asymptotic behavior sets in, which is useful for interpreting Fig. 1(b), which shows the distance between ¯⇢1 and ⇢10. Observe that if ⇣= 0, ⇢10 approaches ¯⇢1 as the network width increases. This provides evidence for the conjecture that the eigenvalues are in fact preserved as they propagate through the network, but only when ⇣= 0, since we see the distances level off at some finite value when ⇣6= 0. We also note that small non-zero values of ⇣may not distort the eigenvalues too much. These observations suggest a new method of tuning the network for fast optimization. Recent work (Pennington et al., 2017) found that inducing dynamical isometry, i.e. equilibrating the singular value distribution of the input-output Jacobian, can greatly speed up training. In our context, by choosing an activation function with ⇣⇡0, we can induce a similar type of isometry, not of the input-output Jacobian, but of the data covariance matrix as it propagates through the network. We conjecture that inducing this additional isometry may lead to further training speed-ups, but we leave further investigation of these ideas to future work. 4.2 Asymptotic performance of random feature methods Consider the ridge-regularized least squares loss function defined by, L(W2) = 1 2n2mkY −W T 2 Y k2 F + γkW2k2 F , Y = f(WX) , (19) where X 2 Rn0⇥m is a matrix of m n0-dimensional features, Y 2 Rn2⇥m is a matrix of regression targets, W 2 Rn1⇥n0 is a matrix of random weights and W2 2 Rn1⇥n2 is a matrix of parameters to be learned. The matrix Y is a matrix of random features1. The optimal parameters are, W ⇤ 2 = 1 mY QYT , Q = ✓1 mY T Y + γIm ◆−1 . (20) 1We emphasize that we are using an unconvential notation for the random features – we call them Y in order to make contact with the previous sections. 7 Our problem setup and analysis are similar to that of (Louart et al., 2017), but in contrast to that work, we are interested in the memorization setting in which the network is trained on random input-output pairs. Performance on this task is then a measure of the capacity of the model, or the complexity of the function class it belongs to. In this context, we take the data X and the targets Y to be independent Gaussian random matrices. From eqns. (19) and (20), the expected training loss is given by, Etrain = EW,X,Y [L(W ⇤ 2 )] = EW,X,Y γ2 m tr YT YQ2 4 = EW,X γ2 m tr Q2 4 = −γ2 m @ @γ EW,X [tr Q] . (21) It is evident from eqn. (5) and the definition of Q that EW,X [tr Q] is related to G(−γ). However, our results from the previous section cannot be used directly because Q contains the trace Y T Y , whereas G was computed with respect to Y Y T . Thankfully, the two matrices differ only by a finite number of zero eigenvalues. Some simple bookkeeping shows that 1 mEW,X [tr Q] = (1 −φ/ ) γ −φ G(−γ) . (22) From eqn. (11) and its total derivative with respect to z, an equation for G0(z) can be obtained by computing the resultant of the two polynomials and eliminating G(z). An equation for Etrain follows; see Section 4 of the supplementary material for details. An analysis of this equation shows that it is homogeneous in γ, ⌘, and ⇣, i.e., for any λ > 0, Etrain(γ, ⌘, ⇣) = Etrain(λγ, λ⌘, λ⇣) . (23) In fact, this homogeneity is entirely expected from eqn. (19): an increase in the regularization constant γ can be compensated by a decrease in scale of W2, which, in turn, can be compensated by increasing the scale of Y , which is equivalent to increasing ⌘and ⇣. Owing to this homogeneity, we are free to choose λ = 1/⌘. For simplicity, we set ⌘= 1 and examine the two-variable function Etrain(γ, 1, ⇣). The behavior when γ = 0 is a measure of the capacity of the model with no regularization and depends on the value of ⇣, Etrain(0, 1, ⇣) = ⇢[1 −φ]+ if ⇣= 1 and < 1, [1 −φ/ ]+ otherwise. (24) As discussed in Section 3.2, when ⌘= ⇣= 1, the function f reduces to the identity. With this in mind, the various cases in eqn. (24) are readily understood by considering the effective rank of the random feature matrix Y. In Fig. 2, we compare our theoretical predictions for Etrain to numerical simulations of solutions to eqn. (19). The different curves explore various ratios of β ⌘log10(⌘/⇣−1) and therefore probe different classes of nonlinearities. For each numerical simulation, we choose a random quintic polynomial f with the specified value of β (for details on this choice, see Section 3 of the supplementary material). The excellent agreement between theory and simulations confirms that Etrain depends only on β and not on any other details of f. The black curves correspond to the performance of a linear network. The results show that for ⇣very close to ⌘, the models are unable to utilize their nonlinearity unless the regularization parameter is very small. Conversely, for ⇣close to zero, the models exploits the nonlinearity very efficiently and absorb large amounts of regularization without a significant drop in performance. This suggests that small ⇣might provide an interesting class of nonlinear functions with enhanced expressive power. See Fig. 3 for some examples of activation functions with this property. 5 Conclusions In this work we studied the Gram matrix M = 1 mY T Y , where Y = f(WX) and W and X are random Gaussian matrices. We derived a quartic polynomial equation satisfied by the trace of the resolvent of M, which defines its limiting spectral density. In obtaining this result, we demonstrated 8 f (1)(x) f (2)(x) f (3)(x) f (4)(x) Figure 3: Examples of activation functions and their derivatives for which ⌘= 1 and ⇣= 0. In red, f (1) = c1 / −1 + p 5e−2x20 ; in green, f (2)(x) = c2 / sin(2x) + cos(3x/2) −2e−2x −e−9/80 ; in orange, f (3)(x) = c3 / |x| − p 2/⇡ 0 ; and in blue, f (4)(x) = c4 / 1 − 4 p 3e−x2 2 0 erf(x). If we let σw = σx = 1, then eqn. (2) is satisfied and ⇣= 0 for all cases. We choose the normalization constants ci so that ⌘= 1. that pointwise nonlinearities can be incorporated into a standard method of proof in random matrix theory known as the moments method, thereby opening the door for future study of other nonlinear random matrices appearing in neural networks. We applied our results to a memorization task in the context of random feature methods and obtained an explicit characterizations of the training error as a function of a ridge regression parameter. The training error depends on the nonlinearity only through two scalar quantities, ⌘and ⇣, which are certain Gaussian integrals of f. We observe that functions with small values of ⇣appear to have increased capacity relative to those with larger values of ⇣. We also make the surprising observation that for ⇣= 0, the singular value distribution of f(WX) is the same as the singular value distribution of X. In other words, the eigenvalues of the data covariance matrix are constant in distribution when passing through a single nonlinear layer of the network. We conjectured and found numerical evidence that this property actually holds when passing the signal through multiple layers. Therefore, we have identified a class of activation functions that maintains approximate isometry at initialization, which could have important practical consequences for training speed. Both of our applications suggest that functions with ⇣⇡0 are a potentially interesting class of activation functions. This is a large class of functions, as evidenced in Fig. 3, among which are many types of nonlinearities that have not been thoroughly explored in practical applications. It would be interesting to investigate these nonlinearities in future work. References Amit, Daniel J, Gutfreund, Hanoch, and Sompolinsky, Haim. Spin-glass models of neural networks. Physical Review A, 32(2):1007, 1985. Cheng, Xiuyuan and Singer, Amit. The spectrum of random inner-product kernel matrices. Random Matrices: Theory and Applications, 2(04):1350010, 2013. Choromanska, Anna, Henaff, Mikael, Mathieu, Michael, Arous, Gérard Ben, and LeCun, Yann. The loss surfaces of multilayer networks. In AISTATS, 2015. Daniely, A., Frostig, R., and Singer, Y. Toward Deeper Understanding of Neural Networks: The Power of Initialization and a Dual View on Expressivity. arXiv:1602.05897, 2016. Dupic, Thomas and Castillo, Isaac Pérez. Spectral density of products of wishart dilute random matrices. part i: the dense case. arXiv preprint arXiv:1401.7802, 2014. El Karoui, Noureddine et al. The spectrum of kernel random matrices. The Annals of Statistics, 38 (1):1–50, 2010. Gardner, E and Derrida, B. Optimal storage properties of neural network models. Journal of Physics A: Mathematical and general, 21(1):271, 1988. 9 Hinton, Geoffrey, Deng, Li, Yu, Dong, Dahl, George E., Mohamed, Abdel-rahman, Jaitly, Navdeep, Senior, Andrew, Vanhoucke, Vincent, Nguyen, Patrick, Sainath, Tara N, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. Ioffe, Sergey and Szegedy, Christian. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of The 32nd International Conference on Machine Learning, pp. 448–456, 2015. Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097– 1105, 2012. Louart, Cosme, Liao, Zhenyu, and Couillet, Romain. A random matrix approach to neural networks. arXiv preprint arXiv:1702.05419, 2017. Marˇcenko, Vladimir A and Pastur, Leonid Andreevich. Distribution of eigenvalues for some sets of random matrices. Mathematics of the USSR-Sbornik, 1(4):457, 1967. Neal, Radford M. Priors for infinite networks (tech. rep. no. crg-tr-94-1). University of Toronto, 1994a. Neal, Radford M. Bayesian Learning for Neural Networks. PhD thesis, University of Toronto, Dept. of Computer Science, 1994b. Oord, Aaron van den, Dieleman, Sander, Zen, Heiga, Simonyan, Karen, Vinyals, Oriol, Graves, Alex, Kalchbrenner, Nal, Senior, Andrew, and Kavukcuoglu, Koray. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016. Pennington, J, Schoenholz, S, and Ganguli, S. Resurrecting the sigmoid in deep learning through dynamical isometry: theory and practice. In Advances in neural information processing systems, 2017. Poole, B., Lahiri, S., Raghu, M., Sohl-Dickstein, J., and Ganguli, S. Exponential expressivity in deep neural networks through transient chaos. arXiv:1606.05340, June 2016. Raghu, M., Poole, B., Kleinberg, J., Ganguli, S., and Sohl-Dickstein, J. On the expressive power of deep neural networks. arXiv:1606.05336, June 2016. Rahimi, Ali and Recht, Ben. Random features for large-scale kernel machines. In In Neural Infomration Processing Systems, 2007. Saxe, A. M., McClelland, J. L., and Ganguli, S. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. International Conference on Learning Representations, 2014. Schoenholz, S. S., Gilmer, J., Ganguli, S., and Sohl-Dickstein, J. Deep Information Propagation. ArXiv e-prints, November 2016. Schoenholz, S. S., Pennington, J., and Sohl-Dickstein, J. A Correspondence Between Random Neural Networks and Statistical Field Theory. ArXiv e-prints, 2017. Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le, Q., Hinton, G., and Dean, J. Outrageously large neural language models using sparsely gated mixtures of experts. ICLR, 2017. URL http://arxiv.org/abs/1701.06538. Tao, Terence. Topics in random matrix theory, volume 132. American Mathematical Society Providence, RI, 2012. Wu, Yonghui, Schuster, Mike, Chen, Zhifeng, Le, Quoc V., Norouzi, Mohammad, Macherey, Wolfgang, Krikun, Maxim, Cao, Yuan, Gao, Qin, Macherey, Klaus, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. 10 | 2017 | 44 |
6,941 | A Sample Complexity Measure with Applications to Learning Optimal Auctions Vasilis Syrgkanis Microsoft Research vasy@microsoft.com Abstract We introduce a new sample complexity measure, which we refer to as split-sample growth rate. For any hypothesis H and for any sample S of size m, the splitsample growth rate ˆτH(m) counts how many different hypotheses can empirical risk minimization output on any sub-sample of S of size m/2. We show that the expected generalization error is upper bounded by O q log(ˆτH(2m)) m . Our result is enabled by a strengthening of the Rademacher complexity analysis of the expected generalization error. We show that this sample complexity measure, greatly simplifies the analysis of the sample complexity of optimal auction design, for many auction classes studied in the literature. Their sample complexity can be derived solely by noticing that in these auction classes, ERM on any sample or sub-sample will pick parameters that are equal to one of the points in the sample. 1 Introduction The seminal work of [11] gave a recipe for designing the revenue maximizing auction in auction settings where the private information of players is a single number and when the distribution over this number is completely known to the auctioneer. The latter raises the question of how has the auction designer formed this prior distribution over the private information. Recent work, starting from [4], addresses the question of how to design optimal auctions when having access only to samples of values from the bidders. We refer the reader to [5] for an overview of the existing results in the literature. [4, 9, 10, 2] give bounds on the sample complexity of optimal auctions without computational efficiency, while recent work has also focused on getting computationally efficient learning bounds [5, 13, 6]. This work solely focuses on sample complexity and not computational efficiency and thus is more related to [4, 9, 10, 2]. The latter work, uses tools from supervised learning, such as pseudodimension [12] (a variant of VC dimension for real-valued functions), compression bounds [8] and Rademacher complexity [12, 14] to bound the sample complexity of simple auction classes. Our work introduces a new measure of sample complexity, which is a strengthening the Rademacher complexity analysis and hence could also be of independent interest outside the scope of the sample complexity of optimal auctions. Moreover, for the case of auctions, this measure greatly simplifies the analysis of their sample complexity in many cases. In particular, we show that in general PAC learning settings, the expected generalization error is upper bounded by the Rademacher complexity not of the whole class of hypotheses, but rather only over the class of hypotheses that could be the outcome of running Expected Risk Minimization (ERM) on a subset of the samples of half the size. If the number of these hypotheses is small, then the latter immediately yields a small generalization error. We refer to the growth rate of the latter set of hypotheses as the split-sample growth rate. This measure of complexity is not restricted to auction design and could be relevant to general statistical learning theory. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. We then show that for many auction classes such as single-item auctions with player-specific reserves, single item t-level auctions and multiple-item item pricing auctions with additive buyers, the splitsample growth rate can be very easily bounded. The argument boils down to just saying that the Empirical Risk Minimization over this classes will set the parameters of the auctions to be equal to some value of some player in the sample. Then a simple counting argument gives bounds of the same order as in prior work in the literature that used the pseudo-dimension [9, 10]. In multi-item settings we also get improvements on the sample complexity bound. Split-sample growth rate is similar in spirit to the notion of local Rademacher complexity [3], which looks at the Rademacher complexity on a subset of hypotheses with small empirical error. In particular, our proof is based on a refinement of the classic analysis Rademacher complexity analysis of generalization error (see e.g. [14]). However, our bound is more structural, restricting the set to outcomes of the chosen ERM process on a sub-sample of half the size. Moreover, we note that counting the number of possible outputs of ERM also has connections to a counting argument made in [1] in the context of pricing mechanisms. However, in essence the argument there is restricted to transductive settings where the sample “features” are known in advance and fixed and thereby the argument is much more straightforward and more similar to standard notions of “effective hypothesis space” used in VC-dimension arguments. Our new measure of sample complexity is applicable in the general statistical learning theory framework and hence could have applications beyond auctions. To convey a high level intuition of settings where split-sample growth could simplify the sample complexity analysis, suppose that the output hypothesis of ERM is uniquely defined by a constant number of sample points (e.g. consider linear separators and assume that the loss is such that the output of ERM is uniquely characterized by choosing O(d) points from the sample). Then this means that the number of possible hypotheses on any subset of size m/2, is at most O( m d ) = O(md). Then the split sample growth rate analysis immediately yields that the expected generalization error is O( p d · log(m)/m), or equivalently the sample complexity of learning over this hypothesis class to within an ϵ error is O(d · log(1/ϵ)/ϵ2). 2 Preliminaries We look at the sample complexity of optimal auctions. We consider the case of m items, and n bidders. Each bidder has a value function vi drawn independently from a distribution Di and we denote with D the joint distribution. We assume we are given a sample set S = {v1, . . . , vm}, of m valuation vectors, where each vt ∼D. Let H denote the class of all dominant strategy truthful single item auctions (i.e. auctions where no player has incentive to report anything else other than his true value to the auction, independent of what other players do). Moreover, let r(h, v) = n X i=1 ph i (v) (1) where ph i (·) is the payment function of mechanism h, and r(h, v) is the revenue of mechanism h on valuation vector v. Finally, let RD(h) = Ev∼D [r(h, v)] (2) be the expected revenue of mechanism h under the true distribution of values D. Given a sample S of size m, we want to compute a dominant strategy truthful mechanism hS, such that: ES [RD(hS)] ≥sup h∈H RD(h) −ϵ(m) (3) where ϵ(m) →0 as m →∞. We refer to ϵ(m) as the expected generalization error. Moreover, we define the sample complexity of an auction class as: Definition 1 (Sample Complexity of Auction Class). The (additive error) sample complexity of an auction class H and a class of distributions D, for an accuracy target ϵ is defined as the smallest number of samples m(ϵ), such that for any m ≥m(ϵ): ES [RD(hS)] ≥sup h∈H RD(h) −ϵ (4) 2 We might also be interested in a multiplcative error sample complexity, i.e. ES [RD(hS)] ≥(1 −ϵ) sup h∈H RD(h) (5) The latter is exactly the notion that is used in [4, 5]. If one assumes that the optimal revenue on the distribution is lower bounded by some constant quantity, then an additive error implies a multiplicative error. For instance, if one assumes that player values are bounded away from zero with significant probability, then that implies a lower bound on revenue. Such assumptions for instance, are made in the work of [9]. We will focus on additive error in this work. We will also be interested in proving high probability guarantees, i.e. with probability 1 −δ: RD(hS) ≥sup h∈H RD(h) −ϵ(m, δ) (6) where for any δ, ϵ(m, δ) →0 as m →∞. 3 Generalization Error via the Split-Sample Growth Rate We turn to the general PAC learning framework, and we give generalization guarantees in terms of a new notion of complexity of a hypothesis space H, which we denote as split-sample growth rate. Consider an arbitrary hypothesis space H and an arbitrary data space Z, and suppose we are given a set S of m samples {z1, . . . , zm}, where each zt is drawn i.i.d. from some distribution D on Z. We are interested in maximizing some reward function r : H × Z →[0, 1], in expectation over distribution D. In particular, denote with RD(h) = Ez∼D [r(h, z)]. We will look at the Expected Reward Maximization algorithm on S, with some fixed tie-breaking rule. Specifically, if we let RS(h) = 1 m m X t=1 r(h, zt) (7) then ERM is defined as: hS = arg sup h∈H RS(h) (8) where ties are broken based on some pre-defined manner. We define the notion of a split-sample hypothesis space: Definition 2 (Split-Sample Hypothesis Space). For any sample S, let ˆHS, denote the set of all hypothesis hT output by the ERM algorithm (with the pre-defined tie-breaking rule), on any subset T ⊂S, of size ⌈|S|/2⌉, i.e.: ˆHS = {hT : T ⊂S, |T| = ⌈|S|/2⌉} (9) Based on the split-sample hypothesis space, we also define the split-sample growth rate of a hypothesis space H at value m, as the largest possible size of ˆHS for any set S of size m. Definition 3 (Split-Sample Growth Rate). The split-sample growth rate of a hypothesis H and an ERM process for H, is defined as: ˆτH(m) = sup S:|S|=m | ˆHS| (10) We first show that the generalization error is upper bounded by the Rademacher complexity evaluated on the split-sample hypothesis space of the union of two samples of size m. The Rademacher complexity R(S, H) of a sample S of size m and a hypothesis space H is defined as: R(S, H) = Eσ " sup h∈H 2 m X zt∈S σt · r(h, zt) # (11) where σ = (σ1, . . . , σm) and each σt is an independent binary random variable taking values {−1, 1}, each with equal probability. 3 Lemma 1. For any hypothesis space H, and any fixed ERM process, we have: ES [RD(hS)] ≥sup h∈H RD(h) −ES,S′ h R(S, ˆHS∪S′) i , (12) where S and S′ are two independent samples of some size m. Proof. Let h∗be the optimal hypothesis for distribution D. First we re-write the left hand side, by adding and subtracting the expected empirical reward: ES [RD(hS)] = ES [RS(hS)] −ES [RS(hS) −RD(hS)] ≥ES [RS(h∗)] −ES [RS(hS) −RD(hS)] (hS maximizes empirical reward) = RD(h∗) −ES [RS(hS) −RD(hS)] (h∗is independent of S) Thus it suffices to upper bound the second quantity in the above equation. Since RD(h) = ES′ [RS′(h)] for a fresh sample S′ of size m, we have: ES [RS(hS) −RD(hS)] = ES [RS(hS) −ES′ [RS′(hS)]] = ES,S′ [RS(hS) −RS′(hS)] Now, consider the set ˆHS∪S′. Since S is a subset of S ∪S′ of size |S ∪S′|/2, we have by the definition of the split-sample hypothesis space that hS ∈ˆHS∪S′. Thus we can upper bound the latter quantity by taking a supremum over h ∈ˆHS∪S′: ES [RS(hS) −RD(hS)] ≤ES,S′ " sup h∈ˆ HS∪S′ RS(h) −RS′(h) # = ES,S′ " sup h∈ˆ HS∪S′ 1 m m X t=1 (r(h, zt) −r(h, z′ t)) # Now observe, that we can rename any sample zt ∈S to z′ t and sample z′ t ∈S′ to zt. By doing show we do not change the distribution. Moreover, we do not change the quantity HS∪S′, since S ∪S′ is invariant to such swaps. Finally, we only change the sign of the quantity (r(h, zt) −r(h, z′ t)). Thus if we denote with σt ∈{−1, 1}, a Rademacher variable, we get the above quantity is equal to: ES,S′ " sup h∈ˆ HS∪S′ 1 m m X t=1 (r(h, zt) −r(h, z′ t)) # = ES,S′ " sup h∈ˆ HS∪S′ 1 m m X t=1 σt (r(h, zt) −r(h, z′ t)) # (13) for any vector σ = (σ1, . . . , σm) ∈{−1, 1}m. The latter also holds in expectation over σ, where σt is randomly drawn between {−1, 1} with equal probability. Hence: ES [RS(hS) −RD(hS)] ≤ES,S′,σ " sup h∈ˆ HS∪S′ 1 m m X t=1 σt (r(h, zt) −r(h, z′ t)) # By splitting the supremma into a positive and negative part and observing that the two expected quantities are identical, we get: ES [RS(hS) −RD(hS)] ≤2ES,S′,σ " sup h∈ˆ HS∪S′ 1 m m X t=1 σtr(h, zt) # = ES,S′ h R(S, ˆHS∪S′) i where R(S, H) denotes the Rademacher complexity of a sample S and hypothesis H. Observe, that the latter theorem is a strengthening of the fact that the Rademacher complexity upper bounds the generalization error, simply because: ES,S′ h R(S, ˆHS∪S′) i ≤ES,S′ [R(S, H)] = ES [R(S, H)] (14) Thus if we can bound the Rademacher complexity of H, then the latter lemma gives a bound on the generalization error. However, the reverse might not be true. Finally, we show our main theorem, which shows that if the split-sample hypothesis space has small size, then we immediately get a generalization bound, without the need to further analyze the Rademacher complexity of H. 4 Theorem 2 (Main Theorem). For any hypothesis space H, and any fixed ERM process, we have: ES [RD(hS)] ≥sup h∈H RD(h) − r 2 log(ˆτH(2m)) m (15) Moreover, with probability 1 −δ: RD(hS) ≥sup h∈H RD(h) −1 δ r 2 log(ˆτH(2m)) m (16) Proof. By applying Massart’s lemma (see e.g. [14]) we have that: R(S, ˆHS∪S′) ≤ s 2 log(| ˆHS∪S′|) m ≤ r 2 log(ˆτH(2m)) m (17) Combining the above with Lemma 1, yields the first part of the theorem. Finally, the high probability statement follows from observing that the random variable suph∈H RD(h) −RD(hS) is non-negative and by applying Markov’s inequality: with probability 1 −δ sup h∈H RD(h) −RD(hS) ≤1 δ ES sup h∈H RD(h) −RD(hS) ≤1 δ r 2 log(ˆτH(2m)) m (18) The latter theorem can be trivially extended to the case when r : H × Z →[α, β], leading to a bound of the form: ES [RD(hS)] ≥sup h∈H RD(h) −(β −α) r 2 log(ˆτH(2m)) m (19) We note that unlike the standard Rademacher complexity, which is defined as R(S, H), our bound, which is based on bounding R(S, ˆHS∪S′) for any two datasets S, S′ of equal size, does not imply a high probability bound via McDiarmid’s inequality (see e.g. Chapter 26 of [14] of how this is done for Rademacher complexity analysis), but only via Markov’s inequality. The latter yields a worse dependence on the confidence δ on the high probability bound of 1/δ, rather than log(1/δ). The reason for the latter is that the quantity R(S, ˆHS∪S′), depends on the sample S, not only in terms of on which points to evaluate the hypothesis, but also on determining the hypothesis space ˆHS∪S′. Hence, the function: f(z1, . . . , zm) = ES′ sup h∈ˆ H{z1,...,zm}∪S′ 1 m m X t=1 σt (r(h, zt) −r(h, z′ t)) (20) does not satisfy the stability property that |f(z) −f(z′′ i , z−i)| ≤ 1 m. The reason being that the supremum is taken over a different hypothesis space in the two inputs. This is unlike the case of the function: f(z1, . . . , zm) = ES′ " sup h∈H 1 m m X t=1 σt (r(h, zt) −r(h, z′ t)) # (21) which is used in the standard Rademacher complexity bound analysis, which satisfies the latter stability property. Resolving whether this worse dependence on δ is necessary is an interesting open question. 4 Sample Complexity of Auctions via Split-Sample Growth We now present the application of the latter measure of complexity to the analysis of the sample complexity of revenue optimal auctions. Thoughout this section we assume that the revenue of any auction lies in the range [0, 1]. The results can be easily adapted to any other range [α, β], by 5 re-scaling the equations, which will lead to blow-ups in the sample complexity of the order of an extra (β −α) multiplicative factor. This limits the results here to bounded distributions of values. However, as was shown in [5], one can always cap the distribution of values up to some upper bound, for the case of regular distributions, by losing only an ϵ fraction of the revenue. So one can apply the results below on this capped distribution. Single bidder and single item. Consider the case of a single bidder and single item auction. In this setting, it is known by results in auction theory [11] that an optimal auction belongs to the hypothesis class H = {post a reserve price r for r ∈[0, 1]}. We consider, the ERM rule, which for any set S, in the case of ties, it favors reserve prices that are equal to some valuation vt ∈S. Wlog assume that samples v1, . . . , vm are ordered in increasing order. Observe, that for any set S, this ERM rule on any subset T of S, will post a reserve price that is equal to some value vt ∈T. Any other reserve price in between two values [vt, vt+1] is weakly dominated by posting r = vt+1, as it does not change which samples are allocated and we can only increase revenue. Thus the space ˆHS is a subset of {post a reserve price r ∈{v1, . . . , vm}. The latter is of size m. Thus the split-sample growth of H is ˆτH(m) ≤m. This yields: ES [RD(hS)] ≥sup h∈H RD(h) − r 2 log(2m) m (22) Equivalently, the sample complexity is mH(ϵ) = O log(1/ϵ) ϵ2 . Multiple i.i.d. regular bidders and single item. In this case, it is known by results in auction theory [11] that the optimal auction belongs to the space of hypotheses H consisting of second price auctions with some reserve r ∈[0, 1]. Again if we consider ERM which in case of ties favors a reserve that equals to a value in the sample (assuming that is part of the tied set, or outputs any other value otherwise), then observe that for any subset T of a sample S, ERM on that subset will pick a reserve price that is equal to one of the values in the samples S. Thus ˆτH(m) ≤n · m. This yields: ES [RD(hS)] ≥sup h∈H RD(h) − r 2 log(2 · n · m) m (23) Equivalently, the sample complexity is mH(ϵ) = O log(n/ϵ2) ϵ2 . Non-i.i.d. regular bidders, single item, second price with player specific reserves. In this case, it is known by results in auction theory [11] that the optimal auction belongs to the space of hypotheses HSP consisting of second price auctions with some reserve ri ∈[0, 1] for each player i. Again if we consider ERM which in case of ties favors a reserve that equals to a value in the sample (assuming that is part of the tied set, or outputs any other value otherwise), then observe that for any subset T of a sample S, ERM on that subset will pick a reserve price ri that is equal to one of the values vi t of player i in the sample S. There are m such possible choices for each player, thus mn possible choices of reserves in total. Thus ˆτH(m) ≤mn. This yields: ES [RD(hS)] ≥ sup h∈HSP RD(h) − r 2n log(2m) m (24) If H is the space of all dominant strategy truthful mechanisms, then by prophet inequalities (see [7]), we know that suph∈HSP RD(h) ≥1 2 suph∈H RD(h). Thus: ES [RD(hS)] ≥1 2 sup h∈H RD(h) − r 2n log(2m) m (25) Non-i.i.d. irregular bidders single item. In this case it is known by results in auction theory [11] that the optimal auction belongs to the space of hypotheses H consisting of all virtual welfare maximizing auctions: For each player i, pick a monotone function ˆφi(vi) ∈[−1, 1] and allocate to the player with the highest non-negative virtual value, charging him the lowest value he could have bid and still win the item. In this case, we will first coarsen the space of all possible auctions. 6 In particular, we will consider the class of t-level auctions of [9]. In this class, we constrain the value functions ˆφi(vi) to only take values in the discrete ϵ grid in [0, 1]. We will call this class Hϵ. An equivalent representation of these auctions is by saying that for each player i, we define a vector of thresholds 0 = θi 0 ≤θi 1 ≤. . . ≤θi s ≤θi s+1 = 1, with s = 1/ϵ. The index of a player is the largest j for which vi ≥θj. Then we allocate the item to the player with the highest index (breaking ties lexicographically) and charge the minimum value he has to bid to continue to win. Observe that on any sample S of valuation vectors, it is always weakly better to place the thresholds θi j on one of the values in the set S. Any other threshold is weakly dominated, as it does not change the allocation. Thus for any subset T of a set S of size m, we have that the thresholds of each player i will take one of the values of player i that appears in set S. We have 1/ϵ thresholds for each player, hence m1/ϵ combinations of thresholds for each player and mn/ϵ combinations of thresholds for all players. Thus ˆτH(m) ≤mn/ϵ. This yields: ES [RD(hS)] ≥sup h∈Hϵ RD(h) − r 2n log(2m) ϵ · m (26) Moreover, by [9] we also have that: sup h∈Hϵ RD(h) ≥sup h∈H RD(h) −ϵ (27) Picking, ϵ = 2n log(2m) m 1/3 , we get: ES [RD(hS)] ≥sup h∈H RD(h) −2 2n log(2m) m 1/3 (28) Equivalently, the sample complexity is mH(ϵ) = O n log(1/ϵ) ϵ3 . k items, n bidders, additive valuations, grand bundle pricing. If the reserve price was anonymous, then the reserve price output by ERM on any subset of a sample S of size m, will take the value of one of the m total values for the items of the buyers in S. So ˆτH(m) = m · n. If the reserve price was not anonymous, then for each buyer ERM will pick one of the m total item values, so ˆτH(m) ≤mn. Thus the sample complexity is mH(ϵ) = O n log(1/ϵ) ϵ2 . k items, n bidders, additive valuations, item prices. If reserve prices are anonymous, then each reserve price on item j computed by ERM on any subset of a sample S of size m, will take the value of one of the player’s values for item j, i.e. n · m. So ˆτH(m) = (n · m)k. If reserve prices are not anonymous, then the reserve price on item j for player i will take the value of one of the player’s values for the item. So ˆτH(m) ≤mn·k. Thus the sample complexity is mH(ϵ) = O nk log(1/ϵ) ϵ2 . k items, n bidders, additive valuations, best of grand bundle pricing and item pricing. ERM on the combination will take values on any subset of a sample S of size m, that is at most the product of the values of each of the classes (bundle or item pricing). Thus, for anonymous pricing: ˆτH(m) = (m · n)k+1 and for non-anonymous pricing: ˆτH(m) ≤mn(k+1). Thus the sample complexity is mH(ϵ) = O n(k+1) log(1/ϵ) ϵ2 . In the case of a single bidder, we know that the best of bundle pricing or item pricing is a 1/8 approximation to the overall best truthful mechanism for the true distribution of values, assuming values for each item are drawn independently. Thus in the latter case we have: ES [RD(hS)] ≥1 6 sup h∈H RD(h) − r 2(k + 1) log(2m) m (29) where H is the class of all truthful mechanisms. Comparison with [10]. The latter three applications were analyzed by [10], via the notion of the pseudo-dimension, but their results lead to sample complexity bounds of O( nk log(nk) log(1/ϵ) ϵ2 ). Thus the above simpler analysis removes the extra log factor on the dependence. 7 References [1] M. F. Balcan, A. Blum, J. D. Hartline, and Y. Mansour. Mechanism design via machine learning. In 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS’05), pages 605–614, Oct 2005. [2] Maria-Florina F Balcan, Tuomas Sandholm, and Ellen Vitercik. Sample complexity of automated mechanism design. In Advances in Neural Information Processing Systems, pages 2083–2091, 2016. [3] Peter L. Bartlett, Olivier Bousquet, and Shahar Mendelson. Local rademacher complexities. Ann. Statist., 33(4):1497–1537, 08 2005. [4] Richard Cole and Tim Roughgarden. The sample complexity of revenue maximization. In 46th, pages 243–252. ACM, 2014. [5] Nikhil R. Devanur, Zhiyi Huang, and Christos-Alexandros Psomas. The sample complexity of auctions with side information. In Proceedings of the Forty-eighth Annual ACM Symposium on Theory of Computing, STOC ’16, pages 426–439, New York, NY, USA, 2016. ACM. [6] Yannai A. Gonczarowski and Noam Nisan. Efficient empirical revenue maximization in singleparameter auction environments. CoRR, abs/1610.09976, 2016. [7] Jason D. Hartline and Tim Roughgarden. Simple versus optimal mechanisms. In Proceedings of the 10th ACM Conference on Electronic Commerce, EC ’09, pages 225–234, New York, NY, USA, 2009. ACM. [8] Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine learning, 2(4):285–318, 1988. [9] Jamie Morgenstern and Tim Roughgarden. The pseudo-dimension of near-optimal auctions. In Proceedings of the 28th International Conference on Neural Information Processing Systems, NIPS’15, pages 136–144, Cambridge, MA, USA, 2015. MIT Press. [10] Jamie Morgenstern and Tim Roughgarden. Learning simple auctions. In COLT 2016, 2016. [11] Roger B Myerson. Optimal auction design. Mathematics of operations research, 6(1):58–73, 1981. [12] D. Pollard. Convergence of Stochastic Processes. Springer Series in Statistics. 2011. [13] Tim Roughgarden and Okke Schrijvers. Ironing in the dark. In Proceedings of the 2016 ACM Conference on Economics and Computation, EC ’16, pages 1–18, New York, NY, USA, 2016. ACM. [14] S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. 8 | 2017 | 440 |
6,942 | On Optimal Generalizability in Parametric Learning Ahmad Beirami∗ beirami@seas.harvard.edu Meisam Razaviyayn† razaviya@usc.edu Shahin Shahrampour∗ shahin@seas.harvard.edu Vahid Tarokh∗ vahid@seas.harvard.edu Abstract We consider the parametric learning problem, where the objective of the learner is determined by a parametric loss function. Employing empirical risk minimization with possibly regularization, the inferred parameter vector will be biased toward the training samples. Such bias is measured by the cross validation procedure in practice where the data set is partitioned into a training set used for training and a validation set, which is not used in training and is left to measure the outof-sample performance. A classical cross validation strategy is the leave-one-out cross validation (LOOCV) where one sample is left out for validation and training is done on the rest of the samples that are presented to the learner, and this process is repeated on all of the samples. LOOCV is rarely used in practice due to the high computational complexity. In this paper, we first develop a computationally efficient approximate LOOCV (ALOOCV) and provide theoretical guarantees for its performance. Then we use ALOOCV to provide an optimization algorithm for finding the regularizer in the empirical risk minimization framework. In our numerical experiments, we illustrate the accuracy and efficiency of ALOOCV as well as our proposed framework for the optimization of the regularizer. 1 Introduction We consider the parametric supervised/unsupervised learning problem, where the objective of the learner is to build a predictor based on a set of historical data. Let zn = {zi}n i=1, where zi ∈ Z denotes the data samples at the learner’s disposal that are assumed to be drawn i.i.d. from an unknown density function p(·), and Z is compact. We assume that the learner expresses the objective in terms of minimizing a parametric loss function ℓ(z; θ), which is a function of the parameter vector θ. The learner solves for the unknown parameter vector θ ∈Θ ⊆Rk, where k denotes the number of parameters in the model class, and Θ is a convex, compact set. Let L(θ) ≜E{ℓ(z; θ)} (1) be the risk associated with the parameter vector θ, where the expectation is with respect to the density p(·) that is unknown to the learner. Ideally, the goal of the learner is to choose the parameter vector θ∗such that θ∗∈arg minθ∈Θ L(θ) = arg minθ∈Θ E{ℓ(z; θ)}. Since the density function p(·) is unknown, the learner cannot compute θ∗and hence cannot achieve the ideal performance of L(θ∗) = minθ∈Θ L(θ) associated with the model class Θ. Instead, one can consider the minimiza∗School of Engineering and Applied Sciences, Harvard University, Cambridge, MA 02138, USA. †Department of Industrial and Systems Engineering, University of Southern California, Los Angeles, CA 90089, USA. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. tion of the empirical version of the problem through the empirical risk minimization framework: bθ(zn) ∈arg min θ∈Θ X i∈[n] ℓ(zi; θ) + r(θ), where [n] ≜{1, 2, . . . , n} and r(θ) is some regularization function. While the learner can evaluate her performance on the training data samples (also called the in-sample empirical risk, i.e., 1 n Pn i=1 ℓ(zi; bθ(zn))), it is imperative to assess the average performance of the learner on fresh test samples, i.e., L(bθ(zn)), which is referred to as the out-of-sample risk. A simple and universal approach to measuring the out-of-sample risk is cross validation [1]. Leave-one-out cross validation (LOOCV), which is a popular exhaustive cross validation strategy, uses (n −1) of the samples for training while one sample is left out for testing. This procedure is repeated on the n samples in a round-robin fashion, and the learner ends up with n estimates for the out-of-sample loss corresponding to each sample. These estimates together form a cross validation vector which can be used for the estimation of the out-of-sample performance, model selection, and tuning the model hyperparameters. While LOOCV provides a reliable estimate of the out-of-sample loss, it brings about an additional factor of n in terms of computational cost, which makes it practically impossible because of the high computational cost of training when the number of samples is large. Contribution: Our first contribution is to provide an approximation for the cross validation vector, called ALOOCV, with much lower computational cost. We compare its performance with LOOCV in problems of reasonable size where LOOCV is tractable. We also test it on problems of large size where LOOCV is practically impossible to implement. We describe how to handle quasi-smooth loss/regularizer functions. We also show that ALOOCV is asymptotically equivalent to Takeuchi information criterion (TIC) under certain regularity conditions. Our second contribution is to use ALOOCV to develop a gradient descent algorithm for jointly optimizing the regularization hyperparameters as well as the unknown parameter vector θ. We show that multiple hyperparameters could be tuned using the developed algorithm. We emphasize that the second contribution would not have been possible without the developed estimator as obtaining the gradient of the LOOCV with respect to tuning parameters is computationally expensive. Our experiments show that the developed method handles quasi-smooth regularized loss functions as well as number of tuning parameters that is on the order of the training samples. Finally, it is worth mentioning that although the leave-one-out cross validation scenario is considered in our analyses, the results and the algorithms can be extended to the leave-q-out cross validation and bootstrap techniques. Related work: A main application of cross validation (see [1] for a recent survey) is in model selection [2–4]. On the theoretical side, the proposed approximation on LOOCV is asymptotically equivalent to Takeuchi information criterion (TIC) [4–7], under certain regularity conditions (see [8] for a proof of asymptotic equivalence of AIC and LOOCV in autoregressive models). This is also related to Barron’s predicted square error (PSE) [9] and Moody’s effective number of parameters for nonlinear systems [10]. Despite these asymptotic equivalences our main focus is on the nonasymptotic performance of ALOOCV. ALOOCV simplifies to the closed form derivation of the LOOCV for linear regression, called PRESS (see [11, 12]). Hence, this work can be viewed as an approximate extension of this closed form derivation for an arbitrary smooth regularized loss function. This work is also related to the concept of influence functions [13], which has recently received renewed interest [14]. In contrast to methods based on influence functions that require large number of samples due to their asymptotic nature, we empirically show that the developed ALOOCV works well even when the number of samples and features are small and comparable to each other. In particular, ALOOCV is capable of predicting overfitting and hence can be used for model selection and choosing the regularization hyperparameter. Finally, we expect that the idea of ALOOCV can be extended to derive computationally efficient approximate bootstrap estimators [15]. Our second contribution is a gradient descent optimization algorithm for tuning the regularization hyperparameters in parametric learning problems. A similar approach has been taken for tuning the single parameter in ridge regression where cross validation can be obtained in closed form [16]. Most of the existing methods, on the other hand, ignore the response and carry out the optimization solely based on the features, e.g., Stein unbiased estimator of the risk for multiple parameter selection [17,18]. 2 Bayesian optimization has been used for tuning the hyperparameters in the model [19–23], which postulates a prior on the parameters and optimizes for the best parameter. Bayesian optimization methods are generally derivative free leading to slow convergence rate. In contrast, the proposed method is based on a gradient descent method. Other popular approaches to the tuning of the optimization parameters include grid search and random search [24–26]. These methods, by nature, also suffer from slow convergence. Finally, model selection has been considered as a bi-level optimization [27,28] where the training process is modeled as a second level optimization problem within the original problem. These formulations, similar to many other bi-level optimization problems, often lead to computationally intensive algorithms that are not scalable. We remark that ALOOCV can also be used within Bayesian optimization, random search, and grid search methods. Further, resource allocation can be used for improving the optimization performance in all of such methods. 2 Problem Setup To facilitate the presentation of the ideas, let us define the following concepts. Throughout, we assume that all the vectors are in column format. Definition 1 (regularization vector/regularized loss function) We suppose that the learner is concerned with M regularization functions r1(θ), . . . , rM(θ) in addition to the main loss function ℓ(z; θ). We define the regularization vector r(θ) as r(θ) ≜(r1(θ), . . . , rM(θ))⊤. Further, let λ = (λ1, . . . , λM)⊤be the vector of regularization parameters. We call wn(z; θ, λ) the regularized loss function given by wn(z; θ, λ) ≜ℓ(z; θ) + 1 nλ⊤r(θ) = ℓ(z; θ) + 1 n X m∈[M] λmrm(θ). The above definition encompasses many popular learning problems. For example, elastic net regression [31] can be cast in this framework by setting r1(θ) = ∥θ∥1 and r2(θ) = 1 2∥θ∥2 2. Definition 2 (empirical risk/regularized empirical risk) Let the empirical risk be defined as bLzn(θ) = 1 n Pn i=1 ℓ(zi; θ). Similarly, let the regularized empirical risk be defined as c Wzn(θ, λ) = 1 n Pn i=1{wn(zi; θ, λ)}. Definition 3 (regularized empirical risk minimization) We suppose that the learner solves the empirical risk minimization problem by selecting bθλ(zn) as follows: bθλ(zn) ∈arg min θ∈Θ n c Wzn(θ, λ) o = arg min θ∈Θ X i∈[n] ℓ(zi; θ) + λ⊤r(θ) . (2) Once the learner solves for bθλ(zn), the empirical risk corresponding to bθλ(zn) can be readily computed by bLzn(bθλ(zn)) = 1 n P i∈[n] ℓ(zi; bθλ(zn)). While the learner can evaluate her performance on the observed data samples (also called the in-sample empirical risk, i.e., bLzn(bθλ(zn))), it is imperative to assess the performance of the learner on unobserved fresh samples, i.e., L(bθλ(zn)) (see (1)), which is referred to as the out-of-sample risk. To measure the out-of-sample risk, it is a common practice to perform cross validation as it works outstandingly well in many practical situations and is conceptually universal and simple to implement. Leave-one-out cross validation (LOOCV) uses all of the samples but one for training, which is left out for testing, leading to an n-dimensional cross validation vector of out-of-sample estimates. Let us formalize this notion. Let zn\i ≜(z1, . . . , zi−1, zi+1, . . . , zn) denote the set of the training examples excluding zi. 3 Definition 4 (LOOCV empirical risk minimization/cross validation vector) Let bθλ(zn\i) be the estimated parameter over the training set zn\i, i.e., bθλ(zn\i) ∈arg min θ∈Rk n c Wzn\i(θ, λ) o = arg min θ∈Rk X j∈[n]\i ℓ(zj; θ) + λ⊤r(θ) . (3) The cross validation vector is given by {CVλ,i(zn)}i∈[n] where CVλ,i(zn) ≜ℓ(zi; bθλ(zn\i)), and the cross validation out-of-sample estimate is given by CVλ(zn) ≜1 n Pn i=1 CVλ,i(zn). The empirical mean and the empirical variance of the n-dimensional cross validation vector are used by practitioners as surrogates on assessing the out-of-sample performance of a learning method. The computational cost of solving the problem in (3) is n times that of the original problem in (2). Hence, while LOOCV provides a simple yet powerful tool to estimate the out-of-sample performance, the additional factor of n in terms of the computational cost makes LOOCV impractical in large-scale problems. One common solution to this problem is to perform validation on fewer number of samples, where the downside is that the learner would obtain a much more noisy and sometimes completely unstable estimate of the out-of-sample performance compared to the case where the entire LOOCV vector is at the learner’s disposal. On the other hand, ALOOCV described next will provide the benefits of LOOCV with negligible additional computational cost. We emphasize that the presented problem formulation is general and includes a variety of parametric machine learning tasks, where the learner empirically solves an optimization problem to minimize some loss function. 3 Approximate Leave-One-Out Cross Validation (ALOOCV) We assume that the regularized loss function is three times differentiable with continuous derivatives (see Assumption 1). This includes many learning problems, such as the L2 regularized logistic loss function. We later comment on how to handle the ℓ1 regularizer function in LASSO. To proceed, we need one more definition. Definition 5 (Hessian/empirical Hessian) Let H(θ) denote the Hessian of the risk function defined as H(θ) ≜∇2 θL(θ). Further, let b Hzn(θ, λ) denote the empirical Hessian of the regularized loss function, defined as b Hzn(θ, λ) ≜bEzn ∇2 θwn(z; θ, λ) = 1 n Pn i=1 ∇2 θwn(zi; θ, λ). Similarly, we define b Hzn(θ, λ) ≜bEzn\i ∇2 θwn(z; θ, λ) = 1 n−1 P i∈[n]\i ∇2 θwn(zi; θ, λ). Next we present the set of assumptions we need to prove the main result of the paper. Assumption 1 We assume that (a) There exists θ∗∈Θ◦,3 such that ∥bθλ(zn) −θ∗∥∞= op(1).4 (b) wn(z; θ) is of class C3 as a function of θ for all z ∈Z. (c) H(θ∗) ≻0 is positive definite. Theorem 1 Under Assumption 1, let eθ (i) λ (zn) ≜bθλ(zn) + 1 n −1 b Hzn\i bθλ(zn), λ −1 ∇θℓ(zi; bθλ(zn)), (4) assuming the inverse exists. Then, bθλ(zn\i) −eθ (i) λ (zn) = 1 n −1 b Hzn\i bθλ(zn), λ −1 ε(i) λ,n, (5) 3(·)◦denotes the interior operator. 4Xn = op(an) implies that Xn/an approaches 0 in probability with respect to the density function p(·). 4 with high probability where ε(i) λ,n = ε(i),1 λ,n −ε(i),2 λ,n , (6) and ε(i),1 λ,n is defined as ε(i),1 λ,n ≜1 2 X j∈[n]\i X κ∈[k] (bθλ(zn) −bθλ(zn\i))⊤ ∂ ∂θκ ∇2 θwn−1(zj; ζi,j,1 λ,κ (zn), λ) (bθλ(zn) −bθλ(zn\i))beκ, (7) where beκ is κ-th standard unit vector, and such that for all κ ∈[k], ζi,j,1 λ,κ (zn) = αi,j,1 κ bθλ(zn) + (1 −αi,j,1 κ )bθλ(zn\i) for some 0 ≤αi,j,1 κ ≤1. Further, ε(i),2 λ,n is defined as ε(i),2 λ,n ≜ X j∈[n]\i X κ,ν∈[k] be⊤ ν (bθλ(zn)−bθλ(zn\i)) ∂2 ∂θκ∂θν ∇⊤ θ wn−1(zj; ζi,j,2 λ,κ,ν(zn), λ) (bθλ(zn)−bθλ(zn\i))beκ, (8) such that for κ, ν ∈[k], ζ(i),2 λ,κ,ν(zn) = αi,j,2 κ,ν bθλ(zn)+(1−αi,j,2 κ,ν )bθλ(zn\i) for some 0 ≤αi,j,2 κ,ν ≤1. Further, we have5 ∥bθλ(zn) −bθλ(zn\i))∥∞= Op 1 n , (9) ∥bθλ(zn\i) −eθ (i) λ (zn)∥∞= Op 1 n2 . (10) See the appendix for the proof. Inspired by Theorem 1, we provide an approximation on the cross validation vector. Definition 6 (approximate cross validation vector) Let ACVλ,i(zn) = ℓ zi; eθ (i) λ (zn) . We call {ACVλ,i(zn)}i∈[n] the approximate cross validation vector. We further call ACVλ(zn) ≜1 n n X i=1 ACVλ,i(zn) (11) the approximate cross validation estimator of the out-of-sample loss. We remark that the definition can be extended to leave-q-out and q-fold cross validation by replacing the index i to an index set S with |S| = q, comprised of the q left-out samples in (4). The cost of the computation of {eθ (i) λ (zn)}i∈[n] is upper bounded by O(np+C(n, p)) where C(n, p) is the computational cost of solving for bθλ(zn) in (2); see [14]. Note that the empirical risk minimization problem posed in (2) requires time at least Ω(np). Hence, the overall cost of computation of {eθ (i) λ (zn)}i∈[n] is dominated by solving (2). On the other hand, the cost of computing the true cross validation performance by naively solving n optimization problems {bθλ(zn\i)}i∈[n] posed in (3) would be O(nC(n, p)) which would necessarily be Ω(n2p) making it impractical for largescale problems. Corollary 2 The approximate cross validation vector is exact for kernel ridge regression. That is, given that the regularized loss function is quadratic in θ, we have eθ (i) λ (zn) = bθλ(zn\i) for all i ∈[n] . Proof We notice that the error term ε(i) λ,n in (6) only depends on the third derivative of the loss function in a neighborhood of bθλ(zn). Hence, provided that the regularized loss function is quadratic in θ, ε(i) λ,n = 0 for all i ∈[n]. ■ 5Xn = Op(an) implies that Xn/an is stochastically bounded with respect to the density function p(·). 5 The fact that the cross validation vector could be obtained for kernel ridge regression in closed form without actually performing cross validation is not new, and the method is known as PRESS [11]. In a sense, the presented approximation could be thought of as an extension of this idea to more general loss and regularizer functions while losing the exactness property. We remark that the idea of ALOOCV is also related to that of the influence functions. In particular, influence functions have been used in [14] to derive an approximation on LOOCV for neural networks with large sample sizes. However, we notice that methods based on influence functions usually underestimate overfitting making them impractical for model selection. In contrast, we empirically demonstrate the effectiveness of ALOOCV in capturing overfitting and model selection. In the case of ℓ1 regularizer we assume that the support set of bθλ(zn) and bθλ(zn\i) are the same. Although this would be true for large enough n under Assumption 1, it is not necessarily true for a given sample zn when sample i is left out. Provided that the support set of bθλ(zn\i) is known we use the developed machinery in Theorem 1 on the subset of parameters that are non-zero. Further, we ignore the ℓ1 regularizer term in the regularized loss function as it does not contribute to the Hessian matrix locally, and we assume that the regularized loss function is otherwise smooth in the sense of Assumption 1. In this case, the cost of calculating ALOOCV would scale with O(npa log(1/ϵ)) where pa denotes the number of non-zero coordinates in the solution bθλ(zn). We remark that although the nature of guarantees in Theorem 1 are asymptotic, we have experimentally observed that the estimator works really well even for n and p as small as 50 in elastic net regression, logistic regression, and ridge regression. Next, we also provide an asymptotic characterization of the approximate cross validation. Lemma 3 Under Assumption 1, we have ACVλ(zn) = bLzn(bθλ(zn)) + bRzn(bθλ(zn), λ) + Op 1 n2 , (12) where bRzn(θ, λ) ≜ 1 n(n −1) X i∈[n] ∇⊤ θ ℓ(zi; θ) h b Hzn\i(θ, λ) i−1 ∇θℓ(zi; θ). (13) Note that in contrast to the ALOOCV (in Theorem 1), the Op(1/n2) error term here depends on the second derivative of the loss function with respect to the parameters, consequently leading to worse performance, and underestimation of overfitting. 4 Tuning the Regularization Parameters Thus far, we presented an approximate cross validation vector that closely follows the predictions provided by the cross validation vector, while being computationally inexpensive. In this section, we use the approximate cross validation vector to tune the regularization parameters for the optimal out-of-sample performance. We are interested in solving minλ CVλ(zn) = 1 n Pn i=1 ℓ zi; bθλ zn\i . To this end, we need to calculate the gradient of bθλ(zn) with respect to λ, which is given in the following lemma. Lemma 4 We have ∇λbθλ(zn) = −1 n h b Hzn bθλ(zn), λ i−1 ∇θr(bθλ(zn)). Corollary 5 We have ∇λbθλ(zn\i) = − 1 n−1 h b Hzn\i bθλ(zn\i), λ i−1 ∇θr(bθλ(zn\i)). In order to apply first order optimization methods for minimizing CVλ(zn), we need to compute its gradient with respect to the tuning parameter vector λ. Applying the simple chain rule implies ∇λCVλ(zn) = 1 n n X i=1 ∇⊤ λ bθλ(zn\i) ∇θℓ zi; bθλ zn\i (14) = − 1 n(n −1) n X i=1 ∇⊤ θ r bθλ(zn\i) h b Hzn\i bθλ(zn\i) i−1 ∇θℓ zi; bθλ zn\i , (15) 6 0 100 200 300 400 500 600 700 800 Iteration Number 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Loss ALOOCV Out-of-Sample Loss Elapsed time: 28 seconds Figure 1: The progression of the loss when Algorithm 1 is applied to ridge regression with diagonal regressors. 0 100 200 300 400 500 600 700 800 Iteration Number 0.1 0.15 0.2 0.25 0.3 0.35 mean( 1,..., m) mean( m+1, ..., p) Figure 2: The progression of λ’s when Algorithm 1 is applied to ridge regression with diagonal regressors. where (15) follows by substituting ∇λbθλ(zn\i) from Corollary 5. However, (15) is computationally expensive and almost impossible in practice even for medium size datasets. Hence, we use the ALOOCV from (4) (Theorem 1) in (14) to approximate the gradient. Let g(i) λ (zn) ≜− 1 n −1∇⊤ θ r eθ (i) λ (zn) b Hzn\i eθ (i) λ (zn) −1 ∇θℓ zi; eθ (i) λ (zn) . (16) Further, motivated by the suggested ALOOCV, let us define the approximate gradient gλ(zn) as gλ(zn) ≜ 1 n P i∈[n] g(i) λ (zn) . Based on our numerical experiments, this approximate gradient closely follows the gradient of the cross validation, i.e., ∇λCVλ(zn) ≈gλ(zn). Note that this approximation is straightforward to compute. Therefore, using this approximation, we can apply the first order optimization algorithm 1 to optimize the tuning parameter λ. Although Algorithm 1 is Algorithm 1 Approximate gradient descent algorithm for tuning λ Initialize the tuning parameter λ0, choose a step-size selection rule, and set t = 0 for t = 0, 1, 2, . . . do calculate the approximate gradient gλt(zn) set λt+1 = λt −αtgλt(zn) end for more computationally efficient compared to LOOCV (saving a factor of n), it might still be computationally expensive for large values of n as it still scales linearly with n. Hence, we also present an online version of the algorithm using the stochastic gradient descent idea; see Algorithm 2. Algorithm 2 Stochastic (online) approximate gradient descent algorithm for tuning λ Initialize the tuning parameter λ0 and set t = 0 for t = 0, 1, 2, . . . do choose a random index it ∈{1, . . . , n} calculate the stochastic gradient g(it) λt (zn) using (16) set λt+1 = λt −αtg(it) λt (zn) end for 5 Numerical Experiments Ridge regression with diagonal regressors: We consider the following regularized loss function: wn(z; θ, λ) = ℓ(z; θ) + 1 nλ⊤r(θ) = 1 2(y −θ⊤x)2 + 1 2nθ⊤diag(λ)θ. 7 Histogram of Figure 3: The histogram of the normalized difference between LOOCV and ALOOCV for 5 runs of the algorithm on randomly selected samples for each λ in Table 1 (MNIST dataset with n = 200 and p = 400). λ bLzn L CV ACV IF 3.3333 0.0637 (0.0064) 0.1095 (0.0168) 0.1077 (0.0151) 0.1080 (0.0152) 0.0906 (0.0113) 1.6667 0.0468 (0.0051) 0.1021 (0.0182) 0.1056 (0.0179) 0.1059 (0.0179) 0.0734 (0.0100) 0.8333 0.0327 (0.0038) 0.0996 (0.0201) 0.1085 (0.0214) 0.1087 (0.0213) 0.0559 (0.0079) 0.4167 0.0218 (0.0026) 0.1011 (0.0226) 0.1158 (0.0256) 0.1155 (0.0254) 0.0397 (0.0056) 0.2083 0.0139 (0.0017) 0.1059 (0.0256) 0.1264 (0.0304) 0.1258 (0.0300) 0.0267 (0.0038) 0.1042 0.0086 (0.0011) 0.1131 (0.0291) 0.1397 (0.0356) 0.1386 (0.0349) 0.0171 (0.0024) 0.0521 0.0051 (0.0006) 0.1219 (0.0330) 0.1549 (0.0411) 0.1534 (0.0402) 0.0106 (0.0015) Table 1: The results of logistic regression (in-sample loss, out-of-sample loss, LOOCV, and ALOOCV, and Influence Function LOOCV) for different regularization parameters on MNIST dataset with n = 200 and p = 400. The numbers in parentheses represent the standard error. n p λ bLzn L ACV 1e5 0.6578 0.6591 0.6578 (0.0041) 1e4 0.5810 0.6069 0.5841 (0.0079) 1e3 0.5318 0.5832 0.5444 (0.0121) 1e2 0.5152 0.5675 0.5379 (0.0146) 1e1 0.4859 0.5977 0.5560 (0.0183) 1e0 0.4456 0.6623 0.6132 (0.0244) Table 2: The results of logistic regression (insample loss, out-of-sample loss, CV, ACV) on CIFAR-10 dataset with n = 9600 and p = 3072. ℓ(zi; bθλ(zn)) CV ACV IF 0.0872 8.5526 8.6495 0.2202 0.0920 2.1399 2.1092 0.2081 0.0926 10.8783 9.4791 0.2351 0.0941 3.5210 3.3162 0.2210 0.0950 5.7753 6.1859 0.2343 0.0990 5.2626 5.0554 0.2405 0.1505 12.0483 11.5281 0.3878 Table 3: Comparison of the leave-one-out estimates on the 8 outlier samples with highest in-sample loss in the MNIST dataset. In other words, we consider one regularization parameter per each model parameter. To validate the proposed optimization algorithm, we consider a scenario with p = 50 where x is drawn i.i.d. from N(0, Ip). We let y = θ∗⊤x + ϵ where θ1 = . . . = θ40 = 0 and θ41, . . . , θ50 ∼N(0, 1) i.i.d, and ϵ ∼N(0, 0.1). We draw n = 150 samples from this model, and apply Algorithm 1 to optimize for λ = (λ1, . . . , λ50). The problem is designed in such a way that out of 50 features, the first 40 are irrelevant while the last 10 are important. We initialize the algorithm with λ1 1 = . . . = λ1 50 = 1/3 and compute ACV using Theorem 1. Recall that in this case, ACV is exactly equivalent to CV (see Corollary 2). Figure 1 plots ALOOCV, the out-of-sample loss, and the mean value of λ calculated over the irrelevant and relevant features respectively. As expected, the λ for an irrelevant feature is set to a larger number, on the average, compared to that of a relevant feature. Finally, we remark that the optimization of 50 tuning parameters in 800 iterations took a mere 28 seconds on a PC. 8 0 2 4 6 8 10 12 14 16 18 20 0 500 1000 1500 2000 2500 3000 3500 4000 4500 Out-of-Sample Loss Online Batch Estimated CV and Actual CV 7 7.5 8 8.5 9 3300 3400 3500 3600 3700 3800 Actual CV Out-of-Sample Loss Estimated CV n = 70 p = 50 No. of iterations (Algo. 1) (Algo. 2) ACV CV ACV and CV loss 70 80 90 100 110 120 130 140 150 p 0 0.5 1 1.5 2 2.5 3 3.5 Computation Time LOOCV Approximate LOOCV 70 80 90 100 110 120 130 140 150 4 6 8 10 12 14 16 18 20 22 Run time ratio LOOCV/ALOOCV n = 200 Figure 4: The application of Algorithms 1 and 2 to elastic net regression. The left panel shows the loss vs. number of iterations. The right panel shows the run-time vs. n (the sample size). Logistic regression: The second example that we consider is logistic regression: wn(z; θ, λ) = ℓ(z; θ) + 1 nλ⊤r(θ) = H(y|| sigmoid(θ0 + θ⊤x)) + 1 2nλ∥θ∥2 2. where H(·||·) for any u ∈[0, 1] and v ∈(0, 1) is given by H(u||v) := u log 1 v + (1 −u) log 1 1−v, and denotes the binary cross entropy function, and sigmoid(x) := 1/(1 + e−x) denotes the sigmoid function. In this case, we only consider a single regularization parameter. Since the loss and regularizer are smooth, we resort to Theorem 1 to compute ACV. We applied logistic regression on MNIST and CIFAR-10 image datasets where we used each pixel in the image as a feature according to the aforementioned loss function. In MNIST, we classify the digits 2 and 3 while in CIFAR-10, we classify “bird” and “cat.” As can be seen in Tables 1 and 2, ACV closely follows CV on the MNIST dataset. On the other hand, the approximation of LOOCV based on influence functions [14] performs poorly in the regime where the model is significantly overfit and hence it cannot be used for effective model selection. On CIFAR-10, ACV takes ≈1s to run per each sample, whereas CV takes ≈60s per each sample requiring days to run for each λ even for this medium sized problem. The histogram of the normalized difference between CV and ACV vectors is plotted in Figure 3 for 5 runs of the algorithm for each λ in Table 1. As can be seen, CV and ACV are almost always within 5% of each other. We have also plotted the loss for the eight outlier samples with the highest in-sample loss in the MNIST dataset in Table 3. As can be seen, ALOOCV closely follows LOOCV even when the leave-one-out loss is two orders of magnitude larger than the in-sample loss for these outliers. On the other hand, the approximation based on the influence functions fails to capture the out-of-sample performance and the outliers in this case. Elastic net regression: Finally, we consider the popular elastic net regression problem [31]: wn(z; θ, λ) = ℓ(z; θ) + 1 nλ⊤r(θ) = 1 2(y −θ⊤x)2 + 1 nλ1∥θ∥1 + 1 2nλ2∥θ∥2 2. In this case, there are only two regularization parameters to be optimized for the quasi-smooth regularized loss. Similar to the previous case, we consider y = θ∗⊤x + ϵ where θκ = κρκψκ where ρκ is a Bernoulli(1/2) RV and ψκ ∼N(0, 1). Hence, the features are weighted non-uniformly in y and half of them are zeroed out on the average. We apply both Algorithms 1 and 2 where we used the approximation in Theorem 1 and the explanation on how to handle ℓ1 regularizers to compute ACV. We initialized with λ1 = λ2 = 0. As can be seen on the left panel (Figure 4), ACV closely follows CV in this case. Further, we see that both algorithms are capable of significantly reducing the loss after only a few iterations. The right panel compares the run-time of the algorithms vs. the number of samples. This confirms our analysis that the run-time of CV scales quadratically with O(n2) as opposed to O(n) in ACV. This impact is more signified in the inner panel where the run-time ratio is plotted. Acknowledgement This work was supported in part by DARPA under Grant No. W911NF-16-1-0561. The authors are thankful to Jason D. Lee (USC) who brought to their attention the recent work [14] on influence functions for approximating leave-one-out cross validation. 9 References [1] Sylvain Arlot and Alain Celisse. A survey of cross-validation procedures for model selection. Statistics surveys, 4:40–79, 2010. [2] Seymour Geisser. The predictive sample reuse method with applications. Journal of the American Statistical Association, 70(350):320–328, 1975. [3] Peter Craven and Grace Wahba. Smoothing noisy data with spline functions. Numerische Mathematik, 31(4):377–403, 1978. [4] Kenneth P Burnham and David R Anderson. Model selection and multimodel inference: a practical information-theoretic approach. Springer Science & Business Media, 2003. [5] Hirotugu Akaike. Statistical predictor identification. Annals of the Institute of Statistical Mathematics, 22(1):203–217, 1970. [6] Hirotogu Akaike. Information theory and an extension of the maximum likelihood principle. In Selected Papers of Hirotugu Akaike, pages 199–213. Springer, 1998. [7] K Takeuchi. Distribution of informational statistics and a criterion of model fitting. suri-kagaku (mathematical sciences) 153 12-18, 1976. [8] Mervyn Stone. Cross-validation and multinomial prediction. Biometrika, pages 509–515, 1974. [9] Andrew R Barron. Predicted squared error: a criterion for automatic model selection. 1984. [10] John E Moody. The effective number of parameters: An analysis of generalization and regularization in nonlinear learning systems. In Advances in neural information processing systems, pages 847–854, 1992. [11] David M Allen. The relationship between variable selection and data agumentation and a method for prediction. Technometrics, 16(1):125–127, 1974. [12] Ronald Christensen. Plane answers to complex questions: the theory of linear models. Springer Science & Business Media, 2011. [13] R Dennis Cook and Sanford Weisberg. Characterizations of an empirical influence function for detecting influential cases in regression. Technometrics, 22(4):495–508, 1980. [14] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. International Conference on Machine Learning, 2017. [15] Bradley Efron. Better bootstrap confidence intervals. Journal of the American statistical Association, 82(397):171–185, 1987. [16] Gene H Golub, Michael Heath, and Grace Wahba. Generalized cross-validation as a method for choosing a good ridge parameter. Technometrics, 21(2):215–223, 1979. [17] Charles-Alban Deledalle, Samuel Vaiter, Jalal Fadili, and Gabriel Peyr´e. Stein Unbiased GrAdient estimator of the Risk (SUGAR) for multiple parameter selection. SIAM Journal on Imaging Sciences, 7(4):2448–2487, 2014. [18] Sathish Ramani, Zhihao Liu, Jeffrey Rosen, Jon-Fredrik Nielsen, and Jeffrey A Fessler. Regularization parameter selection for nonlinear iterative image restoration and MRI reconstruction using GCV and SURE-based methods. IEEE Transactions on Image Processing, 21(8):3659– 3672, 2012. [19] Jonas Moˇckus. Application of Bayesian approach to numerical methods of global and stochastic optimization. Journal of Global Optimization, 4(4):347–365, 1994. [20] Jonas Moˇckus. On Bayesian methods for seeking the extremum. In Optimization Techniques IFIP Technical Conference, pages 400–404. Springer, 1975. [21] Eric Brochu, Vlad M Cora, and Nando De Freitas. A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv preprint arXiv:1012.2599, 2010. [22] Frank Hutter, Holger H Hoos, and Kevin Leyton-Brown. Sequential model-based optimization for general algorithm configuration. In International Conference on Learning and Intelligent Optimization, pages 507–523. Springer, 2011. 10 [23] Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical Bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pages 2951– 2959, 2012. [24] James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(Feb):281–305, 2012. [25] Chris Thornton, Frank Hutter, Holger H Hoos, and Kevin Leyton-Brown. Auto-weka: Combined selection and hyperparameter optimization of classification algorithms. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 847–855. ACM, 2013. [26] Katharina Eggensperger, Matthias Feurer, Frank Hutter, James Bergstra, Jasper Snoek, Holger Hoos, and Kevin Leyton-Brown. Towards an empirical foundation for assessing Bayesian optimization of hyperparameters. In NIPS workshop on Bayesian Optimization in Theory and Practice, pages 1–5, 2013. [27] Gautam Kunapuli, K Bennett, Jing Hu, and Jong-Shi Pang. Bilevel model selection for support vector machines. In CRM Proceedings and Lecture Notes, volume 45, pages 129–158, 2008. [28] Kristin P Bennett, Jing Hu, Xiaoyun Ji, Gautam Kunapuli, and Jong-Shi Pang. Model selection via bilevel optimization. In 2006 Intl. Joint Conf. on Neural Networks IJCNN’06, pages 1922– 1929, 2006. [29] Kevin Swersky, Jasper Snoek, and Ryan P Adams. Multi-task Bayesian optimization. In Advances in neural information processing systems, pages 2004–2012, 2013. [30] Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hyperband: Bandit-based configuration evaluation for hyperparameter optimization. Proc. of ICLR, 17, 2017. [31] Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(2):301–320, 2005. 11 | 2017 | 441 |
6,943 | K-Medoids for K-Means Seeding James Newling Idiap Research Institue and ´Ecole polytechnique f´ed´erale de Lausanne james.newling@idiap.ch Franc¸ois Fleuret Idiap Research Institue and ´Ecole polytechnique f´ed´erale de Lausanne francois.fleuret@idiap.ch Abstract We show experimentally that the algorithm clarans of Ng and Han (1994) finds better K-medoids solutions than the Voronoi iteration algorithm of Hastie et al. (2001). This finding, along with the similarity between the Voronoi iteration algorithm and Lloyd’s K-means algorithm, motivates us to use clarans as a K-means initializer. We show that clarans outperforms other algorithms on 23/23 datasets with a mean decrease over k-means-++ (Arthur and Vassilvitskii, 2007) of 30% for initialization mean squared error (MSE) and 3% for final MSE. We introduce algorithmic improvements to clarans which improve its complexity and runtime, making it a viable initialization scheme for large datasets. 1 Introduction 1.1 K-means and K-medoids The K-means problem is to find a partitioning of points, so as to minimize the sum of the squares of the distances from points to their assigned partition’s mean. In general this problem is NP-hard, and in practice approximation algorithms are used. The most popular of these is Lloyd’s algorithm, henceforth lloyd, which alternates between freezing centers and assignments, while updating the other. Specifically, in the assignment step, for each point the nearest (frozen) center is determined. Then during the update step, each center is set to the mean of points assigned to it. lloyd has applications in data compression, data classification, density estimation and many other areas, and was recognised in Wu et al. (2008) as one of the top-10 algorithms in data mining. The closely related K-medoids problem differs in that the center of a cluster is its medoid, not its mean, where the medoid is the cluster member which minimizes the sum of dissimilarities between itself and other cluster members. In this paper, as our application is K-means initialization, we focus on the case where dissimilarity is squared distance, although K-medoids generalizes to non-metric spaces and arbitrary dissimilarity measures, as discussed in §SM-A. By modifying the update step in lloyd to compute medoids instead of means, a viable K-medoids algorithm is obtained. This algorithm has been proposed at least twice (Hastie et al., 2001; Park and Jun, 2009) and is often referred to as the Voronoi iteration algorithm. We refer to it as medlloyd. Another K-medoids algorithm is clarans of Ng and Han (1994, 2002), for which there is no direct K-means equivalent. It works by randomly proposing swaps between medoids and non-medoids, accepting only those which decrease MSE. We will discuss how clarans works, what advantages it has over medlloyd, and our motivation for using it for K-means initialization in §2 and §SM-A. 1.2 K-means initialization lloyd is a local algorithm, in that far removed centers and points do not directly influence each other. This property contributes to lloyd’s tendency to terminate in poor minima if not well initial31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. ⋆ ⃝⋆ ⃝⋆ initial: ⋆ ⃝ ⋆ ⃝⋆ final: ⋆⃝ ⋆ ⃝⋆ initial: ⋆⃝ ⋆⃝⋆ final: Figure 1: N = 3 points, to be partitioned into K = 2 clusters with lloyd, with two possible initializations (top) and their solutions (bottom). Colors denote clusters, stars denote samples, rings denote means. Initialization with clarans enables jumping between the initializations on the left and right, ensuring that when lloyd eventually runs it avoids the local minimum on the left. ized. Good initialization is key to guaranteeing that the refinement performed by lloyd is done in the vicinity of a good solution, an example showing this is given in Figure 1. In the comparative study of K-means initialization methods of Celebi et al. (2013), 8 schemes are tested across a wide range of datasets. Comparison is done in terms of speed (time to run initialization+lloyd) and energy (final MSE). They find that 3/8 schemes should be avoided, due to poor performance. One of these schemes is uniform initialization, henceforth uni, where K samples are randomly selected to initialize centers. Of the remaining 5/8 schemes, there is no clear best, with results varying across datasets, but the authors suggest that the algorithm of Bradley and Fayyad (1998), henceforth bf, is a good choice. The bf scheme of Bradley and Fayyad (1998) works as follows. Samples are separated into J (= 10) partitions. lloyd with uni initialization is performed on each of the partitions, providing J centroid sets of size K. A superset of JK elements is created by concatenating the J center sets. lloyd is then run J times on the superset, initialized at each run with a distinct center set. The center set which obtains the lowest MSE on the superset is taken as the final initializer for the final run of lloyd on all N samples. Probably the most widely implemented initialization scheme other than uni is k-means++ (Arthur and Vassilvitskii, 2007), henceforth km++. Its popularity stems from its simplicity, low computational complexity, theoretical guarantees, and strong experimental support. The algorithm works by sequentially selecting K seeding samples. At each iteration, a sample is selected with probability proportional to the square of its distance to the nearest previously selected sample. The work of Bachem et al. (2016) focused on developing sampling schemes to accelerate km++, while maintaining its theoretical guarantees. Their algorithm afk-mc2 results in as good initializations as km++, while using only a small fraction of the KN distance calculations required by km++. This reduction is important for massive datasets. In none of the 4 schemes discussed is a center ever replaced once selected. Such refinement is only performed during the running of lloyd. In this paper we show that performing refinement during initialization with clarans, before the final lloyd refinement, significantly lowers K-means MSEs. 1.3 Our contribution and paper summary We compare the K-medoids algorithms clarans and medlloyd, finding that clarans finds better local minima, in §3 and §SM-A. We offer an explanation for this, which motivates the use of clarans for initializing lloyd (Figure 2). We discuss the complexity of clarans, and briefly show how it can be optimised in §4, with a full presentation of acceleration techniques in §SM-D. Most significantly, we compare clarans with methods uni, bf, km++ and afk-mc2 for K-means initialization, and show that it provides significant reductions in initialization and final MSEs in §5. We thus provide a conceptually simple initialization scheme which is demonstrably better than km++, which has been the de facto initialization method for one decade now. Our source code at https://github.com/idiap/zentas is available under an open source license. It consists of a C++ library with Python interface, with several examples for diverse data types (sequence data, sparse and dense vectors), metrics (Levenshtein, l1, etc.) and potentials (quadratic as in K-means, logarithmic, etc.). 1.4 Other Related Works Alternatives to lloyd have been considered which resemble the swapping approach of clarans. One is by Hartigan (1975), where points are randomly selected and reassigned. Telgarsky and 2 Vattani (2010) show how this heuristic can result in better clustering when there are few points per cluster. The work most similar to clarans in the K-means setting is that of Kanungo et al. (2002), where it is indirectly shown that clarans finds a solution within a factor 25 of the optimal K-medoids clustering. The local search approximation algorithm they propose is a hybrid of clarans and lloyd, alternating between the two, with sampling from a kd-tree during the clarans-like step. Their source code includes an implementation of an algorithm they call ‘Swap’, which is exactly the clarans algorithm of Ng and Han (1994). 2 Two K-medoids algorithms Like km++ and afk-mc2, K-medoids generalizes beyond the standard K-means setting of Euclidean metric with quadratic potential, but we consider only the standard setting in the main body of this paper, referring the reader to SM-A for a more general presentation. In Algorithm 1, medlloyd is presented. It is essentially lloyd with the update step modified for K-medoids. Algorithm 1 two-step iterative medlloyd algorithm (in vector space with quadratic potential). 1: Initialize center indices c(k), as distinct elements of {1, . . . , N}, where index k ∈ {1, . . . , K}. 2: do 3: for i = 1 : N do 4: a(i) ←arg min k∈{1,...,K} ∥x(i)−x(c(k))∥2 5: end for 6: for k = 1 : K do 7: c(k) ← 8: arg min i:a(i)=k X i′:a(i′)=k ∥x(i)−x(i′)∥2 9: end for 10: while c(k) changed for at least one k Algorithm 2 swap-based clarans algorithm (in a vector space and with quadratic potential). 1: nr ←0 2: Initialize center indices C ⊂{1, . . . , N} 3: ψ−←PN i=1 mini′∈C ∥x(i) −x(i′)∥2 4: while nr ≤Nr do 5: sample i−∈C and i+ ∈{1, . . . , N} \ C 6: ψ+ ←PN i=1 7: mini′∈C\{i−}∪{i+} ∥x(i) −x(i′)∥2 8: if ψ+ < ψ−then 9: C ←C \ {i−} ∪{i+} 10: nr ←0, ψ−←ψ+ 11: else 12: nr ←nr + 1 13: end if 14: end while In Algorithm 2, clarans is presented. Following a random initialization of the K centers (line 2), it proceeds by repeatedly proposing a random swap (line 5) between a center (i−) and a noncenter (i+). If a swap results in a reduction in energy (line 8), it is implemented (line 9). clarans terminates when Nr consecutive proposals have been rejected. Alternative stopping criteria could be number of accepted swaps, rate of energy decrease or time. We use Nr = K2 throughout, as this makes proposals between all pairs of clusters probable, assuming balanced cluster sizes. clarans was not the first swap-based K-medoids algorithm, being preceded by pam and clara of Kaufman and Rousseeuw (1990). It can however provide better complexity than other swap-based algorithms if certain optimisations are used, as discussed in §4. When updating centers in lloyd and medlloyd, assignments are frozen. In contrast, with swapbased algorithms such as clarans, assignments change along with the medoid index being changed (i−to i+). As a consequence, swap-based algorithms look one step further ahead when computing MSEs, which helps them escape from the minima of medlloyd. This is described in Figure 2. 3 A Simple Simulation Study for Illustration We generate simple 2-D data, and compare medlloyd, clarans, and baseline K-means initializers km++ and uni, in terms of MSEs. The data is described in Figure 3, where sample initializations are also presented. Results in Figure 4 show that clarans provides significantly lower MSEs than medlloyd, an observation which generalizes across data types (sequence, sparse, etc), metrics (Levenshtein, l∞, etc), and potentials (exponential, logarithmic, etc), as shown in Appendix SM-A. 3 • • • • • • • x(1) x(2) x(3) x(4) x(5) x(6) x(7) Figure 2: Example with N = 7 samples, of which K = 2 are medoids. Current medoid indices are 1 and 4. Using medlloyd, this is a local minimum, with final clusters {x(1)}, and the rest. clarans may consider swap (i−, i+) = (4, 7) and so escape to a lower MSE. The key to swapbased algorithms is that cluster assignments are never frozen. Specifically, when considering the swap of x(4) and x(7), clarans assigns x(2), x(3) and x(4) to the cluster of x(1) before computing the new MSE. σ = 2−6 σ = 2−4 0 19 σ = 2−2 uni medlloyd ++ clarans Figure 3: (Column 1) Simulated data in R2. For each cluster center g ∈{0, . . . , 19}2, 100 points are drawn from N(g, σ2I), illustrated here for σ ∈{2−6, 2−4, 2−2}. (Columns 2,3,4,5) Sample initializations. We observe ‘holes’ for methods uni, medlloyd and km++. clarans successfully fills holes by removing distant, underutilised centers. The spatial correlation of medlloyd’s holes are due to its locality of updating. 4 Complexity and Accelerations lloyd requires KN distance calculations to update K centers, assuming no acceleration technique such as that of Elkan (2003) is used. The cost of several iterations of lloyd outweighs initialization with any of uni, km++ and afk-mc2. We ask if the same is true with clarans initialization, and find that the answer depends on how clarans is implemented. clarans as presented in Ng and Han (1994) is O(N 2) in computation and memory, making it unusable for large datasets. To make clarans scalable, we have investigated ways of implementing it in O(N) memory, and devised optimisations which make its complexity equivalent to that of lloyd. clarans consists of two main steps. The first is swap evaluation (line 6) and the second is swap implementation (scope of if-statement at line 8). Proposing a good swap becomes less probable as MSE decreases, thus as the number of swap implementations increases the number of consecutive rejected proposals (nr) is likely to grow large, illustrated in Figure 5. This results in a larger fraction of time being spent in the evaluation step. 2−102−9 2−8 2−7 2−6 2−5 2−4 2−3 2−2 2−1 σ 2−4 20 24 28 212 216 init MSE/σ2 2−102−9 2−8 2−7 2−6 2−5 2−4 2−3 2−2 2−1 σ 2−4 20 24 28 212 216 final MSE/σ2 medlloyd uni ++ clarans Figure 4: Results on simulated data. For 400 values of σ ∈[2−10, 2−1], initialization (left) and final (right) MSEs relative to true cluster variances. For σ ∈[2−5, 2−2] km++ never results in minimal MSE (MSE/σ2 = 1), while clarans does for all σ. Initialization MSE with medlloyd is on average 4 times lower than with uni, but most of this improvement is regained when lloyd is subsequently run (final MSE/σ2). 4 0 500 1000 1500 2000 accepted swaps (implementations) 20 210 Nr evaluations Figure 5: The number of consecutive swap proposal rejections (evaluations) before one is accepted (implementations), for simulated data (§3) with σ = 2−4. We will now discuss optimisations in order of increasing algorithmic complexity, presenting their computational complexities in terms of evaluation and implementation steps. The explanations here are high level, with algorithmic details and pseudocode deferred to §SM-D. Level -2 To evaluate swaps (line 6), simply compute all KN distances. Level -1 Keep track of nearest centers. Now to evaluate a swap, samples whose nearest center is x(i−) need distances to all K samples indexed by C \ {i−} ∪{i+} computed in order to determine the new nearest. Samples whose nearest is not x(i−) only need the distance to x(i+) computed to determine their nearest, as either, (1) their nearest is unchanged, or (2) it is x(i+). Level 0 Also keep track of second nearest centers, as in the implementation of Ng and Han (1994), which recall is O(N 2) in memory and computes all distances upfront. Doing so, nearest centers can be determined for all samples by computing distances to x(i+). If swap (i−, i+) is accepted, samples whose new nearest is x(i+) require K distance calculations to recompute second nearests. Thus from level -1 to 0, computation is transferred from evaluation to implementation, which is good, as implementation is less frequently performed, as illustrated in Figure 5. Level 1 Also keep track, for each cluster center, of the distance to the furthest cluster member as well as the maximum, over all cluster members, of the minimum distance to another center. Using the triangle inequality, one can then frequently eliminate computation for clusters which are unchanged by proposed swaps with just a single center-to-center distance calculation. Note that using the triangle inequality requires that the K-medoids dissimilarity is metric based, as is the case in the K-means initialization setting. Level 2 Also keep track of center-to-center distances. This allows whole clusters to be tagged as unchanged by a swap, without computing any distances in the evaluation step. We have also considered optimisations which, unlike levels -2 to 2, do not result in the exact same clustering as clarans, but provide additional acceleration. One such optimisation uses random subsampling to evaluate proposals, which helps significantly when N/K is large. Another optimisation which is effective during initial rounds is to not implement the first MSE reducing swap found, but to rather continue searching for approximately as long as swap implementation takes, thus balancing time between searching (evaluation) and implementing swaps. Details can be found in §SM-D.3. The computational complexities of these optimisations are in Table 1. Proofs of these complexities rely on there being O(N/K) samples changing their nearest or second nearest center during a swap. In other words, for any two clusters of sizes n1 and n2, we assume n1 = Ω(n2). Using level 2 complexities, we see that if a fraction p(C) of proposals reduce MSE, then the expected complexity is O(N(1 + 1/(p(C)K))). One cannot marginalise C out of the expectation, as C may have no MSE reducing swaps, that is p(C) = 0. If p(C) is O(K), we obtain complexity O(N) per swap, which is equivalent to the O(KN) for K center updates of lloyd. In Table 2, we consider run times and distance calculation counts on simulated data at the various levels of optimisation. 5 Results We first compare clarans with uni, km++, afk-mc2 and bf on the first 23 publicly available datasets in Table 3 (datasets 1-23). As noted in Celebi et al. (2013), it is common practice to run initialization+lloyd several time and retain the solution with the lowest MSE. In Bachem et al. (2016) methods are run a fixed number of times, and mean MSEs are compared. However, when comparing minimum MSEs over several runs, one should take into account that methods vary in their time requirements. 5 -2 -1 0 1 2 1 evaluation NK N N N K + K N K 1 implementation 1 1 N N N K2 evaluations, K implementations K3N K2N K2N NK + K3 KN memory N N N N N + K2 Table 1: The complexities at different levels of optimisation of evaluation and implementation, in terms of required distance calculations, and overall memory. We see at level 2 that to perform K2 evaluations and K implementations is O(KN), equivalent to lloyd. -2 -1 0 1 2 log2(# dcs ) 44.1 36.5 35.5 29.4 26.7 time [s] 407 19.2 15.6 Table 2: Total number of distance calculations (# dcs ) and time required by clarans on simulation data of §3 with σ = 2−4 at different optimisation levels. dataset # N dim K TL [s] a1 1 3000 2 40 1.94 a2 2 5250 2 70 1.37 a3 3 7500 2 100 1.69 birch1 4 100000 2 200 21.13 birch2 5 100000 2 200 15.29 birch3 6 100000 2 200 16.38 ConfLong 7 164860 3 22 30.74 dim032 8 1024 32 32 1.13 dim064 9 1024 64 32 1.19 dim1024 10 1024 1024 32 7.68 europe 11 169308 2 1000 166.08 dataset # N dim K TL [s] housec8 12 34112 3 400 18.71 KDD∗ 13 145751 74 200 998.83 mnist 14 10000 784 300 233.48 Mopsi 15 13467 2 100 2.14 rna∗ 16 20000 8 200 6.84 s1 17 5000 2 30 1.20 s2 18 5000 2 30 1.50 s3 19 5000 2 30 1.39 s4 20 5000 2 30 1.44 song∗ 21 20000 90 200 71.10 susy∗ 22 20000 18 200 24.50 yeast 23 1484 8 40 1.23 Table 3: The 23 datasets. Column ‘TL’ is time allocated to run with each initialization scheme, so that no new runs start after TL elapsed seconds. The starred datasets are those used in Bachem et al. (2016), the remainder are available at https://cs.joensuu.fi/sipu/datasets. Rather than run each method a fixed number of times, we therefore run each method as many times as possible in a given time limit, ‘TL’. This dataset dependent time limit, given by columns TL in Table 3, is taken as 80× the time of a single run of km+++lloyd. The numbers of runs completed in time TL by each method are in columns 1-5 of Table 4. Recall that our stopping criterion for clarans is K2 consecutively rejected swap proposals. We have also experimented with stopping criterion based on run time and number of swaps implemented, but find that stopping based on number of rejected swaps best guarantees convergence. We use K2 rejections for simplicity, although have found that fewer than K2 are in general needed to obtain minimal MSEs. We use the fast lloyd implementation accompanying Newling and Fleuret (2016) with the ‘auto’ flag set to select the best exact accelerated algorithm, and run until complete convergence. For initializations, we use our own C++/Cython implementation of level 2 optimised clarans, the implementation of afk-mc2 of Bachem et al. (2016), and km++ and bf of Newling and Fleuret (2016). The objective of Bachem et al. (2016) was to prove and experimentally validate that afk-mc2 produces initialization MSEs equivalent to those of km++, and as such lloyd was not run during experiments. We consider both initialization MSE, as in Bachem et al. (2016), and final MSE after lloyd has run. The latter is particularly important, as it is the objective we wish to minimize in the K-means problem. In addition to considering initialization and final MSEs, we also distinguish between mean and minimum MSEs. We believe the latter is important as it captures the varying time requirements, and as mentioned it is common to run lloyd several times and retain the lowest MSE clustering. In Table 4 we consider two MSEs, namely mean initialization MSE and minimum final MSE. 6 runs completed mean initial mse minimum final mse km ++ afk mc2 uni bf cla rans km ++ afk mc2 uni cla rans km ++ afk mc2 uni bf cla rans 1 135 65 138 8 29 1 0.97 2 0.63 0.59 0.58 0.59 0.61 0.57 2 81 24 85 5 7 1 0.99 1.96 0.62 0.6 0.59 0.61 0.63 0.58 3 82 21 87 6 4 1 0.99 2.07 0.63 0.6 0.61 0.62 0.63 0.59 4 79 27 95 28 5 1 0.99 1.54 0.69 0.66 0.66 0.66 0.66 0.66 5 85 22 137 27 6 1 1 3.8 0.62 0.62 0.62 0.64 0.63 0.59 6 68 22 77 23 4 1 0.98 2.35 0.67 0.64 0.64 0.68 0.68 0.63 7 84 66 75 38 46 1 1 1.17 0.73 0.64 0.64 0.64 0.64 0.64 8 84 29 88 5 19 1 0.98 43.1 0.65 0.65 0.65 0.66 0.66 0.63 9 81 29 90 5 16 1 1.01 >102 0.66 0.66 0.66 0.66 0.69 0.63 10 144 52 311 24 18 1 0.99 >102 0.72 0.62 0.61 0.62 0.62 0.59 11 70 25 28 15 4 1 1 20.2 0.72 0.67 0.67 2.25 2.4 0.64 12 80 27 81 21 4 1 0.99 2.09 0.77 0.7 0.7 0.73 0.74 0.69 13 102 74 65 56 5 1 1 4 0.77 0.69 0.69 0.75 0.75 0.69 14 88 43 276 83 4 1 1 1 0.87 0.6 0.6 0.6 0.61 0.6 15 91 23 52 7 4 1 1 25 0.6 0.57 0.57 3.71 3.62 0.51 16 107 28 86 28 4 1 0.99 24.5 0.62 0.62 0.61 2.18 2.42 0.56 17 84 31 85 5 25 1 1.01 2.79 0.7 0.66 0.65 0.67 0.69 0.65 18 100 39 100 7 30 1 0.99 2.24 0.69 0.65 0.65 0.66 0.66 0.64 19 88 36 83 6 24 1 1.05 1.55 0.71 0.65 0.65 0.66 0.67 0.65 20 88 36 87 6 24 1 1.01 1.65 0.71 0.65 0.64 0.64 0.65 0.64 21 96 52 98 67 4 1 1 1.14 0.8 0.67 0.66 0.71 0.7 0.65 22 116 48 134 67 4 1 1 1.04 0.81 0.69 0.69 0.69 0.69 0.69 23 82 31 81 5 6 1 1 1.18 0.74 0.65 0.65 0.65 0.67 0.64 gm 90 34 93 14 8 1 1 4.71 0.7 0.64 0.64 0.79 0.8 0.62 Table 4: Summary of results on the 23 datasets (rows). Columns 1 to 5 contain the number of initialization+lloyd runs completed in time limit TL. Columns 6 to 14 contain MSEs relative to the mean initialization MSE of km++. Columns 6 to 9 are mean MSEs after initialization but before lloyd, and columns 10 to 14 are minimum MSEs after lloyd. The final row (gm) contains geometric means of all columns. clarans consistently obtains the lowest across all MSE measurements, and has a 30% lower initialization MSE than km++ and afk-mc2, and a 3% lower final minimum MSE. 0.5 0.6 0.7 0.8 0.9 1.0 1.1 initialisation MSE (2) (1) (3) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 dataset 0.5 0.6 0.7 0.8 0.9 1.0 1.1 final MSE km++ clarans Figure 6: Initialization (above) and final (below) MSEs for km++ (left bars) and clarans (right bars), with minumum (1), mean (2) and mean + standard deviation (3) of MSE across all runs. For all initialization MSEs and most final MSEs, the lowest km++ MSE is several standard deviations higher than the mean clarans MSE. 7 5.1 Baseline performance We briefly discuss findings related to algorithms uni, bf, afk-mc2 and km++. Results in Table 4 corroborate the previously established finding that uni is vastly outperformed by km++, both in initialization and final MSEs. Table 4 results also agree with the finding of Bachem et al. (2016) that initialization MSEs with afk-mc2 are indistinguishable from those of km++, and moreover that final MSEs are indistinguishable. We observe in our experiments that runs with km++ are faster than those with afk-mc2 (columns 1 and 2 of Table 4). We attribute this to the fast blas-based km++ implementation of Newling and Fleuret (2016). Our final baseline finding is that MSEs obtained with bf are in general no better than those with uni. This is not in strict agreement with the findings of Celebi et al. (2013). We attribute this discrepancy to the fact that experiments in Celebi et al. (2013) are in the low K regime (K < 50, N/K > 100). Note that Table 4 does not contain initialization MSEs for bf, as bf does not initialize with data points but with means of sub-samples, and it would thus not make sense to compare bf initialization with the 4 seeding methods. 5.2 clarans performance Having established that the best baselines are km++ and afk-mc2, and that they provide clusterings of indistinguishable quality, we now focus on the central comparison of this paper, that between km++ with clarans. In Figure 6 we present bar plots summarising all runs on all 23 datasets. We observe a very low variance in the initialization MSEs of clarans. We speculatively hypothesize that clarans often finds a globally minimal initialization. Figure 6 shows that clarans provides significantly lower initialization MSEs than km++. The final MSEs are also significantly better when initialization is done with clarans, although the gap in MSE between clarans and km++ is reduced when lloyd has run. Note, as seen in Table 4, that all 5 initializations for dataset 7 result in equally good clusterings. As a supplementary experiment, we considered initialising with km++ and clarans in series, thus using the three stage clustering km+++clarans+lloyd. We find that this can be slightly faster than just clarans+lloyd with identical MSEs. Results of this experiment are presented in §SM-I. We perform a final experiment measure the dependence of improvement on K in §SM-I, where we see the improvement is most significant for large K. 6 Conclusion and Future Works In this paper, we have demonstrated the effectiveness of the algorithm clarans at solving the kmedoids problem. We have described techniques for accelerating clarans, and most importantly shown that clarans works very effectively as an initializer for lloyd, outperforming other initialization schemes, such as km++, on 23 datasets. An interesting direction for future work might be to develop further optimisations for clarans. One idea could be to use importance sampling to rapidly obtain good estimates of post-swap energies. Another might be to propose two swaps simultaneously, as considered in Kanungo et al. (2002), which could potentially lead to even better solutions, although we have hypothesized that clarans is already finding globally optimal initializations. All source code is made available under a public license. It consists of generic C++ code which can be extended to various data types and metrics, compiling to a shared library with extensions in Cython for a Python interface. It can currently be found in the git repository https://github. com/idiap/zentas. Acknowledgments James Newling was funded by the Hasler Foundation under the grant 13018 MASH2. 8 References Arthur, D. and Vassilvitskii, S. (2007). K-means++: The advantages of careful seeding. In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’07, pages 1027–1035, Philadelphia, PA, USA. Society for Industrial and Applied Mathematics. Bachem, O., Lucic, M., Hassani, S. H., and Krause, A. (2016). Fast and provably good seedings for k-means. In Neural Information Processing Systems (NIPS). Bradley, P. S. and Fayyad, U. M. (1998). Refining initial points for k-means clustering. In Proceedings of the Fifteenth International Conference on Machine Learning, ICML ’98, pages 91–99, San Francisco, CA, USA. Morgan Kaufmann Publishers Inc. Celebi, M. E., Kingravi, H. A., and Vela, P. A. (2013). A comparative study of efficient initialization methods for the k-means clustering algorithm. Expert Syst. Appl., 40(1):200–210. Elkan, C. (2003). Using the triangle inequality to accelerate k-means. In Machine Learning, Proceedings of the Twentieth International Conference (ICML 2003), August 21-24, 2003, Washington, DC, USA, pages 147–153. Hartigan, J. A. (1975). Clustering Algorithms. John Wiley & Sons, Inc., New York, NY, USA, 99th edition. Hastie, T. J., Tibshirani, R. J., and Friedman, J. H. (2001). The elements of statistical learning : data mining, inference, and prediction. Springer series in statistics. Springer, New York. Kanungo, T., Mount, D. M., Netanyahu, N. S., Piatko, C. D., Silverman, R., and Wu, A. Y. (2002). A local search approximation algorithm for k-means clustering. In Proceedings of the Eighteenth Annual Symposium on Computational Geometry, SCG ’02, pages 10–18, New York, NY, USA. ACM. Kaufman, L. and Rousseeuw, P. J. (1990). Finding groups in data : an introduction to cluster analysis. Wiley series in probability and mathematical statistics. Wiley, New York. A WileyInterscience publication. Lewis, D. D., Yang, Y., Rose, T. G., and Li, F. (2004). Rcv1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397. Newling, J. and Fleuret, F. (2016). Fast k-means with accurate bounds. In Proceedings of the International Conference on Machine Learning (ICML), pages 936–944. Ng, R. T. and Han, J. (1994). Efficient and effective clustering methods for spatial data mining. In Proceedings of the 20th International Conference on Very Large Data Bases, VLDB ’94, pages 144–155, San Francisco, CA, USA. Morgan Kaufmann Publishers Inc. Ng, R. T. and Han, J. (2002). Clarans: A method for clustering objects for spatial data mining. IEEE Transactions on Knowledge and Data Engineering, pages 1003–1017. Park, H.-S. and Jun, C.-H. (2009). A simple and fast algorithm for k-medoids clustering. Expert Syst. Appl., 36(2):3336–3341. Telgarsky, M. and Vattani, A. (2010). Hartigan’s method: k-means clustering without voronoi. In AISTATS, volume 9 of JMLR Proceedings, pages 820–827. JMLR.org. Wu, X., Kumar, V., Quinlan, J. R., Ghosh, J., Yang, Q., Motoda, H., McLachlan, G., Ng, A., Liu, B., Yu, P., Zhou, Z.-H., Steinbach, M., Hand, D., and Steinberg, D. (2008). Top 10 algorithms in data mining. Knowledge and Information Systems, 14(1):1–37. Yujian, L. and Bo, L. (2007). A normalized levenshtein distance metric. IEEE Trans. Pattern Anal. Mach. Intell., 29(6):1091–1095. 9 | 2017 | 442 |
6,944 | Learning Deep Structured Multi-Scale Features using Attention-Gated CRFs for Contour Prediction Dan Xu1 Wanli Ouyang2 Xavier Alameda-Pineda3 Elisa Ricci4 Xiaogang Wang5 Nicu Sebe1 1The University of Trento, 2The University of Sydney, 3Perception Group, INRIA 4University of Perugia, 5The Chinese University of Hong Kong dan.xu@unitn.it, wanli.ouyang@sydney.edu.au, xavier.alameda-pineda@inria.fr elisa.ricci@unipg.it, xgwang@ee.cuhk.edu.hk, niculae.sebe@unitn.it Abstract Recent works have shown that exploiting multi-scale representations deeply learned via convolutional neural networks (CNN) is of tremendous importance for accurate contour detection. This paper presents a novel approach for predicting contours which advances the state of the art in two fundamental aspects, i.e. multi-scale feature generation and fusion. Different from previous works directly considering multi-scale feature maps obtained from the inner layers of a primary CNN architecture, we introduce a hierarchical deep model which produces more rich and complementary representations. Furthermore, to refine and robustly fuse the representations learned at different scales, the novel Attention-Gated Conditional Random Fields (AG-CRFs) are proposed. The experiments ran on two publicly available datasets (BSDS500 and NYUDv2) demonstrate the effectiveness of the latent AG-CRF model and of the overall hierarchical framework. 1 Introduction Considered as one of the fundamental tasks in low-level vision, contour detection has been deeply studied in the past decades. While early works mostly focused on low-level cues (e.g. colors, gradients, textures) and hand-crafted features [3, 25, 22], more recent methods benefit from the representational power of deep learning models [31, 2, 38, 19, 24]. The ability to effectively exploit multi-scale feature representations is considered a crucial factor for achieving accurate predictions of contours in both traditional [29] and CNN-based [38, 19, 24] approaches. Restricting the attention on deep learning-based solutions, existing methods [38, 24] typically derive multi-scale representations by adopting standard CNN architectures and considering directly the feature maps associated to different inner layers. These maps are highly complementary: while the features from the first layers are responsible for predicting fine details, the ones from the higher layers are devoted to encode the basic structure of the objects. Traditionally, concatenation and weighted averaging are very popular strategies to combine multi-scale representations (see Fig. 1.a). While these strategies typically lead to an increased detection accuracy with respect to single-scale models, they severly simplify the complex relationship between multi-scale feature maps. The motivational cornerstone of this study is the following research question: is it worth modeling and exploiting complex relationships between multiple scales of a deep representation for contour detection? In order to provide an answer and inspired by recent works exploiting graphical models within deep learning architectures [5, 39], we introduce Attention-Gated Conditional Random Fields (AG-CRFs), which allow to learn robust feature map representations at each scale by exploiting the information available from other scales. This is achieved by incorporating an attention mechanism [27] seamlessly integrated into the multi-scale learning process under the form of gates [26]. Intuitively, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the attention mechanism will further enhance the quality of the learned multi-scale representation, thus improving the overall performance of the model. We integrated the proposed AG-CRFs into a two-level hierarchical CNN model, defining a novel Attention-guided Multi-scale Hierarchical deepNet (AMH-Net) for contour detection. The hierarchical network is able to learn richer multi-scale features than conventional CNNs, the representational power of which is further enhanced by the proposed AG-CRF model. We evaluate the effectiveness of the overall model on two publicly available datasets for the contour detection task, i.e. BSDS500 [1] and NYU Depth v2 [33]. The results demonstrate that our approach is able to learn rich and complementary features, thus outperforming state-of-the-art contour detection methods. Related work. In the last few years several deep learning models have been proposed for detecting contours [31, 2, 41, 38, 24, 23]. Among these, some works explicitly focused on devising multi-scale CNN models in order to boost performance. For instance, the Holistically-Nested Edge Detection method [38] employed multiple side outputs derived from the inner layers of a primary CNN and combine them for the final prediction. Liu et al. [23] introduced a framework to learn rich deep representations by concatenating features derived from all convolutional layers of VGG16. Bertasius et al. [2] considered skip-layer CNNs to jointly combine feature maps from multiple layers. Maninis et al. [24] proposed Convolutional Oriented Boundaries (COB), where features from different layers are fused to compute oriented contours and region hierarchies. However, these works combine the multi-scale representations from different layers adopting concatenation and weighted averaging schemes while not considering the dependency between the features. Furthermore, these works do not focus on generating more rich and diverse representations at each CNN layer. The combination of multi-scale representations has been also widely investigated for other pixel-level prediction tasks, such as semantic segmentation [43], visual saliency detection [21] and monocular depth estimation [39], and different deep architectures have been designed. For instance, to effectively aggregate the multi-scale information, Yu et al. [43] introduced dilated convolutions. Yang et al. [42] proposed DAG-CNNs where multi-scale feature outputs from different ReLU layers are combined through element-wise addition operator. However, none of these works incorporate an attention mechanism into a multi-scale structured feature learning framework. Attention models have been successfully exploited in deep learning for various tasks such as image classification [37], speech recognition [4] and image caption generation [40]. However, to our knowledge, this work is the first to introduce an attention model for estimating contours. Furthermore, we are not aware of previous studies integrating the attention mechanism into a probabilistic (CRF) framework to control the message passing between hidden variables. We model the attention as gates [26], which have been used in previous deep models such as restricted Boltzman machine for unsupervised feature learning [35], LSTM for sequence learning [12, 6] and CNN for image classification [44]. However, none of these works explore the possibility of jointly learning multi-scale deep representations and an attention model within a unified probabilistic graphical model. 2 Attention-Gated CRFs for Deep Structured Multi-Scale Feature Learning 2.1 Problem Definition and Notation Given an input image I and a generic front-end CNN model with parameters Wc, we consider a set of S multi-scale feature maps F = {fs}S s=1. Being a generic framework, these feature maps can be the output of S intermediate CNN layers or of another representation, thus s is a virtual scale. The feature map at scale s, fs can be interpreted as a set of feature vectors, fs = {f i s}N i=1, where N is the number of pixels. Opposite to previous works adopting simple concatenation or weighted averaging schemes [16, 38], we propose to combine the multi-scale feature maps by learning a set of latent feature maps hs = {hi s}N i=1 with a novel Attention-Gated CRF model sketched in Fig.1. Intuitively, this allows a joint refinement of the features by flowing information between different scales. Moreover, since the information from one scale may or may not be relevant for the pixels at another scale, we utilise the concept of gate, previously introduced in the literature in the case of graphical models [36], in our CRF formulation. These gates are binary random hidden variables that permit or block the flow of information between scales at every pixel. Formally, gi se,sr ∈{0, 1} is the gate at pixel i of scale sr (receiver) from scale se (emitter), and we also write gse,sr = {gi se,sr}N i=1. Precisely, when gi se,sr = 1 then the hidden variable hi sr is updated taking (also) into account the 2 fs+1 fs+1 (a) Multi-Scale Neural Network (b) Multi-Scale CRFs fs fs−1 fs−1 fs I I hs−1 hs−1 hs hs hs+1 hs+1 fs+1 · · · · · · (c) Attention-Gated CRFs fs−1 fs I gs−1,s gs,s+1 hs−1 hs hs+1 · · · · · · · · · · · · Figure 1: An illustration of different schemes for multi-scale deep feature learning and fusion. (a) the traditional approach (e.g. concatenation, weighted average), (b) CRF implementing multi-scale feature fusion (c) the proposed AG-CRF-based approach. information from the se-th layer, i.e. hse. As shown in the following, the joint inference of the hidden features and the gates leads to estimating the optimal features as well as the corresponding attention model, hence the name Attention-Gated CRFs. 2.2 Attention-Gated CRFs Given the observed multi-scale feature maps F of image I, the objective is to estimate the hidden multiscale representation H = {hs}S s=1 and, accessorily the attention gate variables G = {gse,sr}S se,sr=1. To do that, we formalize the problem within a conditional random field framework and write the Gibbs distribution as P(H, G|I, Θ) = exp (−E(H, G, I, Θ)) /Z (I, Θ), where Θ is the set of parameters and E is the energy function. As usual, we exploit both unary and binary potentials to couple the hidden variables between them and to the observations. Importantly, the proposed binary potential is gated, and thus only active when the gate is open. More formally the general form1 of the energy function writes: E(H, G, I, Θ) = X s X i φh(hi s, f i s) | {z } Unary potential + X se,sr X i,j gi se,srψh(hi sr, hj se) | {z } Gated pairwise potential . (1) The first term of the energy function is a classical unary term that relates the hidden features to the observed multi-scale CNN representations. The second term synthesizes the theoretical contribution of the present study because it conditions the effect of the pair-wise potential ψh(hi se, hj sr) upon the gate hidden variable gi se,sr. Fig. 1c depicts the model formulated in Equ.(1). If we remove the attention gate variables, it becomes a general multi-scale CRFs as shown in Fig. 1b. Given that formulation, and as it is typically the case in conditional random fields, we exploit the mean-field approximation in order to derive a tractable inference procedure. Under this generic form, the mean-field inference procedure writes: q(hi s) ∝exp φh(hi s, f i s) + X s′̸=s X j Eq(gi s′,s){gi s′,s}Eq(hj s′){ψh(hi s, hj s′)} , (2) q(gi s′,s) ∝exp gi s′,sEq(hi s) n X j Eq(hj s′) n ψh(hi s, hj s′) o o , (3) where Eq stands for the expectation with respect to the distribution q. Before deriving these formulae for our precise choice of potentials, we remark that, since the gate is a binary variable, the expectation of its value is the same as q(gi s′,s = 1). By defining: Mi s′,s = Eq(his) nP j Eq(hj s′) n ψh(hi s, hj s′) oo , the expected value of the gate writes: αi s,s′ = Eq(gi s′,s){gi s′,s} = q(gi s′,s = 1) q(gi s′,s = 0) + q(gi s′,s = 1) = σ −Mi s′,s , (4) where σ() denotes the sigmoid function. This finding is specially relevant in the framework of CNN since many of the attention models are typically obtained after applying the sigmoid function to the 1One could certainly include a unary potential for the gate variables as well. However this would imply that there is a way to set/learn the a priori distribution of opening/closing a gate. In practice we did not observe any notable difference between using or skipping the unary potential on g. 3 features derived from a feed-forward network. Importantly, since the quantity Mi s′,s depends on the expected values of the hidden features hi s, the AG-CRF framework extends the unidirectional connection from the features to the attention model, to a bidirectional connection in which the expected value of the gate allows to refine the distribution of the hidden features as well. 2.3 AG-CRF Inference In order to construct an operative model we need to define the unary and gated potentials φh and ψh. In our case, the unary potential corresponds to an isotropic Gaussian: φh(hi s, f i s) = −ai s 2 ∥hi s −f i s∥2, (5) where ai s > 0 is a weighting factor. The gated binary potential is specifically designed for a two-fold objective. On the one hand, we would like to learn and further exploit the relationships between hidden vectors at the same, as well as at different scales. On the other hand, we would like to exploit previous knowledge on attention models and include linear terms in the potential. Indeed, this would implicitly shape the gate variable to include a linear operator on the features. Therefore, we chose a bilinear potential: ψh(hi s, hj s′) = ˜hi sKi,j s,s′ ˜hj s′, (6) where ˜hi s = (hi⊤ s , 1)⊤and Ki,j s,s′ ∈R(Cs+1)×(Cs′+1) being Cs the size, i.e. the number of channels, of the representation at scale s. If we write this matrix as Ki,j s,s′ = (Li,j s,s′, li,j s,s′; lj,i⊤ s′,s , 1), then Li,j s,s′ exploits the relationships between hidden variables, while li,j s,s′ and lj,i s′,s implement the classically used linear relationships of the attention models. In order words, ψh models the pair-wise relationships between features with the upper-left block of the matrix. Furthemore, ψh takes into account the linear relationships by completing the hidden vectors with the unity. In all, the energy function writes: E(H, G, I, Θ) = − X s X i ai s 2 ∥hi s −f i s∥2 + X se,sr X i,j gi se,sr ˜hi srKi,j sr,se ˜hj se. (7) Under these potentials, we can consequently update the mean-field inference equations to: q(hi s) ∝exp −ai s 2 (∥hi s∥−2hi⊤ s f i s) + X s′̸=s αi s,s′hi⊤ s X j (Li,j s,s′ ¯hj s′ + li,j s,s′) , (8) where ¯hj s′ is the expected a posteriori value of hj s′. The previous expression implies that the a posteriori distribution for hi s is a Gaussian. The mean vector of the Gaussian and the function M write: ¯hi s = 1 ais ai sf i s+ X s′̸=s αi s,s′ X j (Li,j s,s′ ¯hj s′+li,j s,s′) Mi s′,s = X j ¯hi sLi,j s,s′ ¯hj s′ + ¯hi⊤ s li,j s,s′ + ¯hj⊤ s′ lj,i s′,s which concludes the inference procedure. Furthermore, the proposed framework can be simplified to obtain the traditional attention models. In most of the previous studies, the attention variables are computed directly from the multi-scale features instead of computing them from the hidden variables. Indeed, since many of these studies do not propose a probabilistic formulation, there are no hidden variables and the attention is computed sequentially through the scales. We can emulate the same behavior within the AG-CRF framework by modifying the gated potential as follows: ˜ψh(hi s, hj s′, f i s, f j s′) = hi sLi,j s,s′hj s′ + f i⊤ s li,j s,s′ + f j⊤ s′ lj,i s′,s. (9) This means that we keep the pair-wise relationships between hidden variables (as in any CRF) and let the attention model be generated by a linear combination of the observed features from the CNN, as it is traditionally done. The changes in the inference procedure are straightforward and reported in the supplementary material due to space constraints. We refer to this model as partially-latent AG-CRFs (PLAG-CRFs), whereas the more general one is denoted as fully-latent AG-CRFs (FLAG-CRFs). 2.4 Implementation with neural network for joint learning In order to infer the hidden variables and learn the parameters of the AG-CRFs together with those of the front-end CNN, we implement the AG-CRFs updates in neural network with several steps: 4 AG-CRF AG-CRF AG-CRF AG-CRF C D M D D C M D D D C M D D D C C C C C C D L C D L Front-End CNN C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D D D D L D L C Convolution M Max-pooling D Deconvolution L Loss HIERARCHY 1 HIERARCHY 2 fl f C l f M l f D l f M0 l f C0 l Figure 2: An overview of the proposed AMH-Net for contour detection. (i) message passing from the se-th scale to the current sr-th scale is performed with hse→sr ← Lse→sr ⊗hse, where ⊗denotes the convolutional operation and Lse→sr denotes the corresponding convolution kernel, (ii) attention map estimation q(gse,sr = 1) ←σ(hsr ⊙(Lse→sr ⊗hse) + lse→sr ⊗hse + lsr→se ⊗hsr), where Lse→sr, lse→sr and lsr→se are convolution kernels and ⊙ represents element-wise product operation, and (iii) attention-gated message passing from other scales and adding unary term: ¯hsr = fsr ⊕asr P se̸=sr(q(gse,sr = 1) ⊙hse→sr), where asr encodes the effect of the ai sr for weighting the message and can be implemented as a 1 × 1 convolution. The symbol ⊕denotes element-wise addition. In order to simplify the overall inference procedure, and because the magnitude of the linear term of ψh is in practice negligible compared to the quadratic term, we discard the message associated to the linear term. When the inference is complete, the final estimate is obtained by convolving all the scales. 3 Exploiting AG-CRFs with a Multi-scale Hierarchical Network AMH-Net Architecture. The proposed Attention-guided Multi-scale Hierarchical Network (AMHNet), as sketched in Figure 2, consists of a multi-scale hierarchical network (MH-Net) together with the AG-CRF model described above. The MH-Net is constructed from a front-end CNN architecture such as the widely used AlexNet [20], VGG [34] and ResNet [17]. One prominent feature of MH-Net is its ability to generate richer multi-scale representations. In order to do that, we perform distinct non-linear mappings (deconvolution D, convolution C and max-pooling M) upon fl, the CNN feature representation from an intermediate layer l of the front-end CNN. This leads to a three-way representation: f D l , f C l and f M l . Remarkably, while D upsamples the feature map, C maintains its original size and M reduces it, and different kernel size is utilized for them to have different receptive fields, then naturally obtaining complementary inter- and multi-scale representations. The f C l and f M l are further aligned to the dimensions of the feature map f D l by the deconvolutional operation. The hierarchy is implemented in two levels. The first level uses an AG-CRF model to fuse the three representations of each layer l, thus refining the CNN features within the same scale. The second level of the hierarchy uses an AG-CRF model to fuse the information coming from multiple CNN layers. The proposed hierarchical multi-scale structure is general purpose and able to involve an arbitrary number of layers and of diverse intra-layer representations. End-to-End Network Optimization. The parameters of the model consist of the front-end CNN parameters, Wc, the parameters to produce the richer decomposition from each layer l, Wl, the parameters of the AG-CRFs of the first level of the hierarchy, {WI l}L l=1, and the parameters of the AG-CRFs of the second level of the hierarchy, WII. L is the number of intermediate layers used from the front-end CNN. In order to jointly optimize all these parameters we adopt deep supervision [38] and we add an optimization loss associated to each AG-CRF module. In addition, since the contour detection problem is highly unbalanced, i.e. contour pixels are significantly less than non-contour pixels, we employ the modified cross-entropy loss function of [38]. Given a training data 5 set D = {(Ip, Ep)}P p=1 consisting of P RGB-contour groundtruth pairs, the loss function ℓwrites: ℓ W = X p β X ekp∈E+ p log P ek p = 1|Ip; W + 1 −β X ekp∈E− p log P ek p = 0|Ip; W , (10) where β = |E+ p |/(|E+ p | + |E− p |), E+ p is the set of contour pixels of image p and W is the set of all parameters. The optimization is performed via the back-propagation algorithm with standard stochastic gradient descent. AMH-Net for contour detection. After training of the whole AMH-Net, the optimized network parameters W are used for the contour detection task. Given a new test image I, the L + 1 classifiers produce a set of contour prediction maps {ˆEl}L+1 l=1 = AMH-Net(I; W). The ˆEl are obtained from the AG-CRFs with elementary operations as detailed in the supplementary material. We inspire from [38] to fuse the multiple scale predictions thus obtaining an average prediction ˆE = P l ˆEl/(L + 1). 4 Experiments 4.1 Experimental Setup Datasets. To evaluate the proposed approach we employ two different benchmarks: the BSDS500 and the NYUDv2 datasets. The BSDS500 dataset is an extended dataset based on BSDS300 [1]. It consists of 200 training, 100 validation and 200 testing images. The groundtruth pixel-level labels for each sample are derived considering multiple annotators. Following [38, 41], we use all the training and validation images for learning the proposed model and perform data augmentation as described in [38]. The NYUDv2 [33] contains 1449 RGB-D images and it is split into three subsets, comprising 381 training, 414 validation and 654 testing images. Following [38] in our experiments we employ images at full resolution (i.e. 560 × 425 pixels) both in the training and in the testing phases. Evaluation Metrics. During the test phase standard non-maximum suppression (NMS) [9] is first applied to produce thinned contour maps. We then evaluate the detection performance of our approach according to different metrics, including the F-measure at Optimal Dataset Scale (ODS) and Optimal Image Scale (OIS) and the Average Precision (AP). The maximum tolerance allowed for correct matches of edge predictions to the ground truth is set to 0.0075 for the BSDS500 dataset, and to .011 for the NYUDv2 dataset as in previous works [9, 14, 38]. Implementation Details. The proposed AMH-Net is implemented under the deep learning framework Caffe [18]. The implementation code is available on Github2. The training and testing phase are carried out on an Nvidia Titan X GPU with 12GB memory. The ResNet50 network pretrained on ImageNet [8] is used to initialize the front-end CNN of AMH-Net. Due to memory constraints, our implementation only considers three scales, i.e. we generate multi-scale features from three different layers of the front-end CNN (i.e. res3d, res4f, res5c). In our CRF model we consider dependencies between all scales. Within the AG-CRFs, the kernel size for all convolutional operations is set to 3 × 3 with stride 1 and padding 1. To simplify the model optimization, the parameters ai sr are set as 0.1 for all scales during training. We choose this value as it corresponds to the best performance after cross-validation in the range [0, 1]. The initial learning rate is set to 1e-7 in all our experiments, and decreases 10 times after every 10k iterations. The total number of iterations for BSDS500 and NYUD v2 is 40k and 30k, respectively. The momentum and weight decay parameters are set to 0.9 and 0.0002, as in [38]. As the training images have different resolution, we need to set the batch size to 1, and for the sake of smooth convergence we updated the parameters only every 10 iterations. 4.2 Experimental Results In this section, we present the results of our evaluation, comparing our approach with several state of the art methods. We further conduct an in-depth analysis of our method, to show the impact of different components on the detection performance. Comparison with state of the art methods. We first consider the BSDS500 dataset and compare the performance of our approach with several traditional contour detection methods, including Felz-Hut [11], MeanShift [7], Normalized Cuts [32], ISCRA [30], gPb-ucm [1], SketchTokens [22], 2https://github.com/danxuhk/AttentionGatedMulti-ScaleFeatureLearning 6 Figure 3: Qualitative results on the BSDS500 (left) and the NYUDv2 (right) test samples. The 2nd (4th) and 3rd (6th) columns are the ground-truth and estimated contour maps respectively. Table 1: BSDS500 dataset: quantitative results. Method ODS OIS AP Human .800 .800 Felz-Hutt[11] .610 .640 .560 Mean Shift[7] .640 .680 .560 Normalized Cuts[32] .641 .674 .447 ISCRA[30] .724 .752 .783 gPb-ucm[1] .726 .760 .727 Sketch Tokens[22] .727 .746 .780 MCG[28] .747 .779 .759 DeepEdge[2] .753 .772 .807 DeepContour[31] .756 .773 .797 LEP[46] .757 .793 .828 HED[38] .788 .808 .840 CEDN[41] .788 .804 .834 COB [24] .793 .820 .859 RCF [23] (not comp.) .811 .830 – AMH-Net (fusion) .798 .829 .869 Table 2: NYUDv2 dataset: quantitative results. Method ODS OIS AP gPb-ucm [1] .632 .661 .562 OEF [15] .651 .667 – Silberman et al. [33] .658 .661 – SemiContour [45] .680 .700 .690 SE [10] .685 .699 .679 gPb+NG [13] .687 .716 .629 SE+NG+ [14] .710 .723 .738 HED (RGB) [38] .720 .734 .734 HED (HHA) [38] .682 .695 .702 HED (RGB + HHA) [38] .746 .761 .786 RCF (RGB) + HHA) [23] .757 .771 – AMH-Net (RGB) .744 .758 .765 AMH-Net (HHA) .716 .729 .734 AMH-Net (RGB+HHA) .771 .786 .802 MCG [28], LEP [46], and more recent CNN-based methods, including DeepEdge [2], DeepContour [31], HED [38], CEDN [41], COB [24]. We also report results of the RCF method [23], although they are not comparable because in [23] an extra dataset (Pascal Context) was used during RCF training to improve the results on BSDS500. In this series of experiments we consider AMH-Net with FLAG-CRFs. The results of this comparison are shown in Table 1 and Fig. 4a. AMH-Net obtains an F-measure (ODS) of 0.798, thus outperforms all previous methods. The improvement over the second and third best approaches, i.e. COB and HED, is 0.5% and 1.0%, respectively, which is not trivial to achieve on this challenging dataset. Furthermore, when considering the OIS and AP metrics, our approach is also better, with a clear performance gap. To perform experiments on NYUDv2, following previous works [38] we consider three different types of input representations, i.e. RGB, HHA [14] and RGB-HHA data. The results corresponding to the use of both RGB and HHA data (i.e. RGB+HHA) are obtained by performing a weighted average of the estimates obtained from two AMH-Net models trained separately on RGB and HHA representations. As baselines we consider gPb-ucm [1], OEF [15], the method in [33], SemiContour [45], SE [10], gPb+NG [13], SE+NG+ [14], HED [38] and RCF [23]. In this case the results are comparable to the RCF [23] since the experimental protocol is exactly the same. All of them are reported in Table 2 and Fig. 4b. Again, our approach outperforms all previous methods. In particular, the increased performance with respect to HED [38] and RCF [23] confirms the benefit of the proposed multi-scale feature learning and fusion scheme. Examples of qualitative results on the BSDS500 and the NYUDv2 datasets are shown in Fig. 3. Ablation Study. To further demonstrate the effectiveness of the proposed model and analyze the impact of the different components of AMH-Net on the countour detection task, we conduct an 7 Recall 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Precision 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 [F=0.800] Human [F=0.798] AMH-Net [F=0.793] COB [F=0.788] CEDN [F=0.788] HED [F=0.757] LEP [F=0.756] DeepContour [F=0.753] DeepEdge [F=0.747] MCG [F=0.727] SketchTokens [F=0.726] UCM [F=0.724] ISCRA [F=0.641] Normalized Cuts [F=0.640] MeanShift [F=0.610] Felz-Hut (a) BSDS500 Recall 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Precision 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 [F=0.800] Human [F=0.771] AMH-Net [F=0.746] HED [F=0.706] SE+NG+ [F=0.695] SE [F=0.685] gPb+NG [F=0.680] SemiContour [F=0.658] Silberman [F=0.651] OEF [F=0.632] gPb-ucm (b) NYUDv2 Figure 4: Precision-Recall Curves on the BSDS500 and NYUDv2 test sets. ablation study considering the NYUDv2 dataset (RGB data). We tested the following models: (i) AMH-Net (baseline), which removes the first-level hierarchy and directly concatenates the feature maps for prediction, (ii) AMH-Net (w/o AG-CRFs), which employs the proposed multi-scale hierarchical structure but discards the AG-CRFs, (iii) AMH-Net (w/ CRFs), obtained by replacing our AG-CRFs with a multi-scale CRF model without attention gating, (iv) AMH-Net (w/o deep supervision) obtained removing intermediate loss functions in AMH-Net and (v) AMH-Net with the proposed two versions of the AG-CRFs model, i.e. PLAG-CRFs and FLAG-CRFs. The results of our comparison are shown in Table 3, where we also consider as reference traditional multi-scale deep learning models employing multi-scale representations, i.e. Hypercolumn [16] and HED [38]. Table 3: Performance analysis on NYUDv2 RGB data. Method ODS OIS AP Hypercolumn [16] .718 .729 .731 HED [38] .720 .734 .734 AMH-Net (baseline) .711 .720 .724 AMH-Net (w/o AG-CRFs) .722 .732 .739 AMH-Net (w/ CRFs) .732 .742 .750 AMH-Net (w/o deep supervision) .725 .738 .747 AMH-Net (w/ PLAG-CRFs) .737 .749 .746 AMH-Net (w/ FLAG-CRFs) .744 .758 .765 These results clearly show the advantages of our contributions. The ODS F-measure of AMH-Net (w/o AG-CRFs) is 1.1% higher than AMH-Net (baseline), clearly demonstrating the effectiveness of the proposed hierarchical network and confirming our intuition that exploiting more richer and diverse multi-scale representations is beneficial. Table 3 also shows that our AG-CRFs plays a fundamental role for accurate detection, as AMH-Net (w/ FLAG-CRFs) leads to an improvement of 1.9% over AMH-Net (w/o AG-CRFs) in terms of OSD. Finally, AMH-Net (w/ FLAG-CRFs) is 1.2% and 1.5% better than AMH-Net (w/ CRFs) in ODS and AP metrics respectively, confirming the effectiveness of embedding an attention mechanism in the multi-scale CRF model. AMH-Net (w/o deep supervision) decreases the overall performance of our method by 1.9% in ODS, showing the crucial importance of deep supervision for better optimization of the whole AMH-Net. Comparing the performance of the proposed two versions of the AG-CRF model, i.e. PLAG-CRFs and FLAG-CRFs, we can see that AMH-Net (FLAG-CRFs) slightly outperforms AMH-Net (PLAG-CRFs) in both ODS and OIS, while bringing a significant improvement (around 2%) in AP. Finally, considering HED [38] and Hypercolumn [16], it is clear that our AMH-Net (FLAG-CRFs) is significantly better than these methods. Importantly, our approach utilizes only three scales while for HED [38] and Hypercolumn [16] we consider five scales. We believe that our accuracy could be further boosted by involving more scales. 5 Conclusions We presented a novel multi-scale convolutional neural network for contour detection. The proposed model introduces two main components, i.e. a hierarchical architecture for generating more rich and complementary multi-scale feature representations, and an Attention-Gated CRF model for robust feature refinement and fusion. The effectiveness of our approach is demonstrated through extensive experiments on two public available datasets and state of the art detection performance is 8 achieved. The proposed approach addresses a general problem, i.e. how to generate rich multi-scale representations and optimally fuse them. Therefore, we believe it may be also useful for other pixel-level tasks. References [1] P. Arbeláez, M. Maire, C. Fowlkes, and J. Malik. Contour detection and hierarchical image segmentation. TPAMI, 33(5), 2011. [2] G. Bertasius, J. Shi, and L. Torresani. Deepedge: A multi-scale bifurcated deep network for top-down contour detection. In CVPR, 2015. [3] J. Canny. A computational approach to edge detection. TPAMI, (6):679–698, 1986. [4] J. K. Chorowski, D. Bahdanau, D. Serdyuk, K. Cho, and Y. Bengio. Attention-based models for speech recognition. In NIPS, 2015. [5] X. Chu, W. Ouyang, X. Wang, et al. Crf-cnn: Modeling structured information in human pose estimation. In NIPS, 2016. [6] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. [7] D. Comaniciu and P. Meer. Mean shift: A robust approach toward feature space analysis. TPAMI, 24(5), 2002. [8] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. [9] P. Dollár and C. L. Zitnick. Structured forests for fast edge detection. In ICCV, 2013. [10] P. Dollár and C. L. Zitnick. Fast edge detection using structured forests. TPAMI, 37(8):1558–1570, 2015. [11] P. F. Felzenszwalb and D. P. Huttenlocher. Efficient graph-based image segmentation. IJCV, 59(2), 2004. [12] F. A. Gers, N. N. Schraudolph, and J. Schmidhuber. Learning precise timing with lstm recurrent networks. Journal of machine learning research, 3(Aug):115–143, 2002. [13] S. Gupta, P. Arbelaez, and J. Malik. Perceptual organization and recognition of indoor scenes from rgb-d images. In CVPR, 2013. [14] S. Gupta, R. Girshick, P. Arbeláez, and J. Malik. Learning rich features from rgb-d images for object detection and segmentation. In ECCV, 2014. [15] S. Hallman and C. C. Fowlkes. Oriented edge forests for boundary detection. In CVPR, 2015. [16] B. Hariharan, P. Arbeláez, R. Girshick, and J. Malik. Hypercolumns for object segmentation and finegrained localization. In CVPR, 2015. [17] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [18] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In ACM MM, 2014. [19] I. Kokkinos. Pushing the boundaries of boundary detection using deep learning. arXiv preprint arXiv:1511.07386, 2015. [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [21] G. Li and Y. Yu. Visual saliency based on multiscale deep features. In CVPR, 2015. [22] J. J. Lim, C. L. Zitnick, and P. Dollár. Sketch tokens: A learned mid-level representation for contour and object detection. In CVPR, 2013. [23] Y. Liu, M.-M. Cheng, X. Hu, K. Wang, and X. Bai. Richer convolutional features for edge detection. arXiv preprint arXiv:1612.02103, 2016. [24] K.-K. Maninis, J. Pont-Tuset, P. Arbeláez, and L. Van Gool. Convolutional oriented boundaries. In ECCV, 2016. [25] D. R. Martin, C. C. Fowlkes, and J. Malik. Learning to detect natural image boundaries using local brightness, color, and texture cues. TPAMI, 26(5):530–549, 2004. [26] T. Minka and J. Winn. Gates. In NIPS, 2009. [27] V. Mnih, N. Heess, A. Graves, et al. Recurrent models of visual attention. In NIPS, pages 2204–2212, 2014. [28] J. Pont-Tuset, P. Arbelaez, J. Barron, F. Marques, and J. Malik. Multiscale combinatorial grouping for image segmentation and object proposal generation. TPAMI, 2016. [29] X. Ren. Multi-scale improves boundary detection in natural images. In ECCV, 2008. [30] Z. Ren and G. Shakhnarovich. Image segmentation by cascaded region agglomeration. In CVPR, 2013. [31] W. Shen, X. Wang, Y. Wang, X. Bai, and Z. Zhang. Deepcontour: A deep convolutional feature learned by positive-sharing loss for contour detection. In CVPR, 2015. [32] J. Shi and J. Malik. Normalized cuts and image segmentation. TPAMI, 22(8), 2000. 9 [33] N. Silberman, D. Hoiem, P. Kohli, and R. Fergus. Indoor segmentation and support inference from rgbd images. In ECCV, 2012. [34] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [35] Y. Tang. Gated boltzmann machine for recognition under occlusion. In NIPS Workshop on Transfer Learning by Learning Rich Generative Models, 2010. [36] J. Winn. Causality with gates. In AISTATS, 2012. [37] T. Xiao, Y. Xu, K. Yang, J. Zhang, Y. Peng, and Z. Zhang. The application of two-level attention models in deep convolutional neural network for fine-grained image classification. In CVPR, 2015. [38] S. Xie and Z. Tu. Holistically-nested edge detection. In ICCV, 2015. [39] D. Xu, E. Ricci, W. Ouyang, X. Wang, and N. Sebe. Multi-scale continuous crfs as sequential deep networks for monocular depth estimation. CVPR, 2017. [40] K. Xu, J. Ba, R. Kiros, K. Cho, A. C. Courville, R. Salakhutdinov, R. S. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015. [41] J. Yang, B. Price, S. Cohen, H. Lee, and M.-H. Yang. Object contour detection with a fully convolutional encoder-decoder network. 2016. [42] S. Yang and D. Ramanan. Multi-scale recognition with dag-cnns. In ICCV, 2015. [43] F. Yu and V. Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. [44] X. Zeng, W. Ouyang, J. Yan, H. Li, T. Xiao, K. Wang, Y. Liu, Y. Zhou, B. Yang, Z. Wang, et al. Crafting gbd-net for object detection. arXiv preprint arXiv:1610.02579, 2016. [45] Z. Zhang, F. Xing, X. Shi, and L. Yang. Semicontour: A semi-supervised learning approach for contour detection. In CVPR, 2016. [46] Q. Zhao. Segmenting natural images with the least effort as humans. In BMVC, 2015. 10 | 2017 | 443 |
6,945 | Geometric Descent Method for Convex Composite Minimization Shixiang Chen1, Shiqian Ma2, and Wei Liu3 1Department of SEEM, The Chinese University of Hong Kong, Hong Kong 2Department of Mathematics, UC Davis, USA 3Tencent AI Lab, China Abstract In this paper, we extend the geometric descent method recently proposed by Bubeck, Lee and Singh [1] to tackle nonsmooth and strongly convex composite problems. We prove that our proposed algorithm, dubbed geometric proximal gradient method (GeoPG), converges with a linear rate (1 −1/√κ) and thus achieves the optimal rate among first-order methods, where κ is the condition number of the problem. Numerical results on linear regression and logistic regression with elastic net regularization show that GeoPG compares favorably with Nesterov’s accelerated proximal gradient method, especially when the problem is ill-conditioned. 1 Introduction Recently, Bubeck, Lee and Singh proposed a geometric descent method (GeoD) for minimizing a smooth and strongly convex function [1]. They showed that GeoD achieves the same optimal rate as Nesterov’s accelerated gradient method (AGM) [2, 3]. In this paper, we provide an extension of GeoD that minimizes a nonsmooth function in the composite form: min x∈Rn F(x) := f(x) + h(x), (1.1) where f is α-strongly convex and β-smooth (i.e., ∇f is Lipschitz continuous with Lipschitz constant β), and h is a closed nonsmooth convex function with simple proximal mapping. Commonly seen examples of h include ℓ1 norm, ℓ2 norm, nuclear norm, and so on. If h vanishes, then the objective function of (1.1) becomes smooth and strongly convex. In this case, it is known that AGM converges with a linear rate (1 −1/√κ), which is optimal among all first-order methods, where κ = β/α is the condition number of the problem. However, AGM lacks a clear geometric intuition, making it difficult to interpret. Recently, there has been much work on attempting to explain AGM or designing new algorithms with the same optimal rate (see, [4, 5, 1, 6, 7]). In particular, the GeoD method proposed in [1] has a clear geometric intuition that is in the flavor of the ellipsoid method [8]. The follow-up work [9, 10] attempted to improve the performance of GeoD by exploiting the gradient information from the past with a “limited-memory” idea. Moreover, Drusvyatskiy, Fazel and Roy [10] showed how to extend the suboptimal version of GeoD (with the convergence rate (1 −1/κ)) to solve the composite problem (1.1). However, it was not clear how to extend the optimal version of GeoD to address (1.1), and the authors posed this as an open question. In this paper, we settle this question by proposing a geometric proximal gradient (GeoPG) algorithm which can solve the composite problem (1.1). We further show how to incorporate various techniques to improve the performance of the proposed algorithm. Notation. We use B(c, r2) = x|∥x −c∥2 ≤r2 to denote the ball with center c and radius r. We use Line(x, y) to denote the line that connects x and y, i.e., {x + s(y −x), s ∈R}. For fixed t ∈(0, 1/β], we denote x+ := Proxth(x −t∇f(x)), where the proximal mapping Proxh(·) is 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. defined as Proxh(x) := argminz h(z) + 1 2∥z −x∥2. The proximal gradient of F is defined as Gt(x) := (x−x+)/t. It should be noted that x+ = x−tGt(x). We also denote x++ := x−Gt(x)/α. Note that both x+ and x++ are related to t, and we omit t whenever there is no ambiguity. The rest of this paper is organized as follows. In Section 2, we briefly review the GeoD method for solving smooth and strongly convex problems. In Section 3, we provide our GeoPG algorithm for solving nonsmooth problem (1.1) and analyze its convergence rate. We address two practical issues of the proposed method in Section 4, and incorporate two techniques: backtracking and limited memory, to cope with these issues. In Section 5, we report some numerical results of comparing GeoPG with Nesterov’s accelerated proximal gradient method in solving linear regression and logistic regression problems with elastic net regularization. Finally, we conclude the paper in Section 6. 2 Geometric Descent Method for Smooth Problems The GeoD method [1] solves (1.1) when h ≡0, in which the problem reduces to a smooth and strongly convex problem min f(x). We denote its optimal solution and optimal value as x∗and f ∗, respectively. Throughout this section, we fix t = 1/β, which together with h ≡0 implies that x+ = x −∇f(x)/β and x++ = x −∇f(x)/α. We first briefly describe the basic idea of the suboptimal GeoD. Since f is α-strongly convex, the following inequality holds f(x) + ⟨∇f(x), y −x⟩+ α 2 ∥y −x∥2 ≤f(y), ∀x, y ∈Rn. (2.1) By letting y = x∗in (2.1), it is easy to obtain x∗∈B x++, ∥∇f(x)∥2/α2 −2(f(x) −f ∗)/α , ∀x ∈Rn. (2.2) Note that the β-smoothness of f implies f(x+) ≤f(x) −∥∇f(x)∥2/(2β), ∀x ∈Rn. (2.3) Combining (2.2) and (2.3) yields x∗∈B x++, (1 −1/κ)∥∇f(x)∥2/α2 −2(f(x+) −f ∗)/α . As a result, suppose that initially we have a ball B(x0, R2 0) that contains x∗, then it follows that x∗∈B x0, R2 0 ∩B x++ 0 , (1 −1/κ)∥∇f(x0)∥2/α2 −2(f(x+ 0 ) −f ∗)/α . (2.4) Some simple algebraic calculations show that the squared radius of the minimum enclosing ball of the right hand side of (2.4) is no larger than R2 0(1 −1/κ), i.e., there exists some x1 ∈Rn such that x∗∈B x1, R2 0(1 −1/κ) . Therefore, the squared radius of the initial ball shrinks by a factor (1 −1/κ). Repeating this process yields a linear convergent sequence {xk} with the convergence rate (1 −1/κ): ∥xk −x∗∥2 ≤(1 −1/κ)kR2 0. The optimal GeoD (with the linear convergence rate (1 −1/√κ)) maintains two balls containing x∗in each iteration, whose centers are ck and x++ k+1, respectively. More specifically, suppose that in the k-th iteration we have ck and xk, then ck+1 and xk+1 are obtained as follows. First, xk+1 is the minimizer of f on Line(ck, x+ k ). Second, ck+1 (resp. R2 k+1) is the center (resp. squared radius) of the ball (given by Lemma 2.1) that contains B ck, R2 k −∥∇f(xk+1)∥2/(α2κ) ∩B x++ k+1, (1 −1/κ)∥∇f(xk+1)∥2/α2 . Calculating ck+1 and Rk+1 is easy and we refer to Algorithm 1 of [1] for details. By applying Lemma 2.1 with xA = ck, rA = Rk, rB = ∥∇f(xk+1)∥/α, ϵ = 1/κ and δ = 2 α(f(x+ k ) −f(x∗)), we obtain R2 k+1 = (1 −1/√κ)R2 k, which further implies ∥x∗−ck∥2 ≤(1 −1/√κ)kR2 0, i.e., the optimal GeoD converges with the linear rate (1 −1/√κ). Lemma 2.1 (see [1, 10]). Fix centers xA, xB ∈Rn and squared radii r2 A, r2 B > 0. Also fix ϵ ∈(0, 1) and suppose ∥xA −xB∥2 ≥r2 B. There exists a new center c ∈Rn such that for any δ > 0, we have B(xA, r2 A −ϵr2 B −δ) ∩B xB, r2 B(1 −ϵ) −δ ⊂B c, (1 −√ϵ)r2 A −δ . 3 Geometric Descent Method for Nonsmooth Convex Composite Problems Drusvyatskiy, Fazel and Roy [10] extended the suboptimal GeoD to solve the composite problem (1.1). However, it was not clear how to extend the optimal GeoD to solve problem (1.1). We resolve this problem in this section. The following lemma is useful to our analysis. Its proof is in the supplementary material. 2 Lemma 3.1. Given point x ∈Rn and step size t ∈(0, 1/β], denote x+ = x−tGt(x). The following inequality holds for any y ∈Rn: F(y) ≥F(x+) + ⟨Gt(x), y −x⟩+ t 2∥Gt(x)∥2 + α 2 ∥y −x∥2. (3.1) 3.1 GeoPG Algorithm In this subsection, we describe our proposed geometric proximal gradient method (GeoPG) for solving (1.1). Throughout Sections 3.1 and 3.2, t ∈(0, 1/β] is a fixed scalar. The key observation for designing GeoPG is that in the k-th iteration one has to find xk that lies on Line(x+ k−1, ck−1) such that the following two inequalities hold: F(x+ k ) ≤F(x+ k−1) −t 2∥Gt(xk)∥2, and ∥x++ k −ck−1∥2 ≥1 α2 ∥Gt(xk)∥2. (3.2) Intuitively, the first inequality in (3.2) requires that there is a function value reduction on x+ k from x+ k−1, and the second inequality requires that the centers of the two balls are far away from each other so that Lemma 2.1 can be applied. The following lemma gives a sufficient condition for (3.2). Its proof is in the supplementary material. Lemma 3.2. (3.2) holds if xk satisfies ⟨x+ k −xk, x+ k−1 −xk⟩≤0, and ⟨x+ k −xk, xk −ck−1⟩≥0. (3.3) Therefore, we only need to find xk such that (3.3) holds. To do so, we define the following functions for given x, c (x ̸= c) and t ∈(0, β]: φt,x,c(z) = ⟨z+ −z, x −c⟩, ∀z ∈Rn, and ¯φt,x,c(s) = φt,x,c x + s(c −x) , ∀s ∈R. The functions φt,x,c(z) and ¯φt,x,c(s) have the following properties. Its proof can be found in the supplementary material. Lemma 3.3. (i) φt,x,c(z) is Lipschitz continuous. (ii) ¯φt,x,c(s) strictly monotonically increases. We are now ready to describe how to find xk such that (3.3) holds. This is summarized in Lemma 3.4. Lemma 3.4. The following two ways find xk satisfying (3.3). (i) If ¯φt,x+ k−1,ck−1(1) ≤0, then (3.3) holds by setting xk := ck−1; if ¯φt,x+ k−1,ck−1(0) ≥0, then (3.3) holds by setting xk := x+ k−1; if ¯φt,x+ k−1,ck−1(1) > 0 and ¯φt,x+ k−1,ck−1(0) < 0, then there exists s ∈[0, 1] such that ¯φt,x+ k−1,ck−1(s) = 0. As a result, (3.3) holds by setting xk := x+ k−1 + s(ck−1 −x+ k−1). (ii) If ¯φt,x+ k−1,ck−1(0) ≥0, then (3.3) holds by setting xk := x+ k−1; if ¯φt,x+ k−1,ck−1(0) < 0, then there exists s ≥0 such that ¯φt,x+ k−1,ck−1(s) = 0. As a result, (3.3) holds by setting xk := x+ k−1 + s(ck−1 −x+ k−1). Proof. Case (i) directly follows from the Mean-Value Theorem. Case (ii) follows from the monotonicity and continuity of ¯φt,x+ k−1,ck−1 from Lemma 3.3. It is indeed very easy to find xk satisfying the two cases in Lemma 3.4, since we are tackling a univariate Lipschitz continuous function ¯φt,x,c(s) . Specifically, for case (i) of Lemma 3.4, we can use the bisection method to find the zero of ¯φt,x+ k−1,ck−1 in the closed interval [0, 1]. In practice, we found that the Brent-Dekker method [11, 12] performs much better than the bisection method, so we use the Brent-Dekker method in our numerical experiments. For case (ii) of Lemma 3.4, we can use the semi-smooth Newton method to find the zero of ¯φt,x+ k−1,ck−1 in the interval [0, +∞). In our numerical experiments, we implemented the global semi-smooth Newton method [13, 14] and obtained very encouraging results. These two procedures are described in Algorithms 1 and 2, respectively. Based on the discussions above, we know that xk generated by these two algorithms satisfies (3.3) and hence (3.2). We are now ready to present our GeoPG algorithm for solving (1.1) as in Algorithm 3. 3 Algorithm 1 : The first procedure for finding xk from given x+ k−1 and ck−1. 1: if ⟨(x+ k−1)+ −x+ k−1, x+ k−1 −ck−1⟩≥0 then 2: set xk := x+ k−1; 3: else if ⟨c+ k−1 −ck−1, x+ k−1 −ck−1⟩≤0 then 4: set xk := ck−1; 5: else 6: use the Brent-Dekker method to find s ∈[0, 1] such that ¯φt,x+ k−1,ck−1(s) = 0, and set xk := x+ k−1 + s(ck−1 −x+ k−1); 7: end if Algorithm 2 : The second procedure for finding xk from given x+ k−1 and ck−1. 1: if ⟨(x+ k−1)+ −x+ k−1, x+ k−1 −ck−1⟩≥0 then 2: set xk := x+ k−1; 3: else 4: use the global semi-smooth Newton method [13, 14] to find the root s ∈[0, +∞) of ¯φt,x+ k−1,ck−1(s), and set xk := x+ k−1 + s(ck−1 −x+ k−1); 5: end if 3.2 Convergence Analysis of GeoPG We are now ready to present our main convergence result for GeoPG. Theorem 3.5. Given initial point x0 and step size t ∈(0, 1/β], we set R2 0 = ∥Gt(x0)∥2 α2 (1 −αt). Suppose that sequence {(xk, ck, Rk)} is generated by Algorithm 3, and that x∗is the optimal solution of (1.1) and F ∗is the optimal objective value. For any k ≥0, one has x∗∈B(ck, R2 k) and R2 k+1 ≤(1 − √ αt)R2 k, and thus ∥x∗−ck∥2 ≤(1 − √ αt)kR2 0, and F(x+ k+1) −F ∗≤α 2 (1 − √ αt)kR2 0. (3.4) Note that when t = 1/β, (3.4) implies the linear convergence rate (1 −1/√κ). Proof. We prove a stronger result by induction that for every k ≥0, one has x∗∈B ck, R2 k −2(F(x+ k ) −F ∗)/α . (3.5) Let y = x∗in (3.1). We have ∥x∗−x++∥2 ≤(1−αt)∥Gt(x)2∥/α2 −2(F(x+)−F ∗)/α, implying x∗∈B x++, ∥Gt(x)∥2(1 −αt)/α2 −2(F(x+) −F ∗)/α . (3.6) Setting x = x0 in (3.6) shows that (3.5) holds for k = 0. We now assume that (3.5) holds for some k ≥0, and in the following we will prove that (3.5) holds for k + 1. Combining (3.5) and the first inequality of (3.2) yields x∗∈B ck, R2 k −t∥Gt(xk+1)∥2/α −2(F(x+ k+1) −F ∗)/α . (3.7) By setting x = xk+1 in (3.6), we obtain x∗∈B x++ k+1, ∥Gt(xk+1)∥2(1 −αt)/α2 −2(F(x+ k+1) −F ∗)/α . (3.8) We now apply Lemma 2.1 to (3.7) and (3.8). Specifically, we set xB = x++ k+1, xA = ck, ϵ = αt, rA = Rk, rB = ∥Gt(xk+1)∥/α, δ = 2 α(F(x+ k ) −F ∗), and note that ∥xA −xB∥2 ≥r2 B because of the second inequality of (3.2). Then Lemma 2.1 indicates that there exists ck+1 such that x∗∈B ck+1, (1 −1/√κ)R2 k −2(F(x+ k+1) −F ∗)/α , (3.9) i.e., (3.5) holds for k + 1 with R2 k+1 ≤(1 − √ αt)R2 k. Note that ck+1 is the center of the minimum enclosing ball of the intersection of the two balls in (3.7) and (3.8), and can be computed in the same way as Algorithm 1 of [1]. From (3.9) we obtain that ∥x∗−ck+1∥2 ≤(1 − √ αt)R2 k ≤ (1 − √ αt)k+1R2 0. Moreover, (3.7) indicates that F(x+ k+1) −F ∗≤α 2 R2 k ≤α 2 (1 − √ αt)kR2 0. 4 Algorithm 3 : GeoPG: geometric proximal gradient descent for convex composite minimization. Require: Parameters α, β, initial point x0 and step size t ∈(0, 1/β]. 1: Set c0 = x++ 0 , R2 0 = ∥Gt(x0)∥2(1 −αt)/α2; 2: for k = 1, 2, . . . do 3: Use Algorithm 1 or 2 to find xk; 4: Set xA := x++ k = xk −Gt(xk)/α, and R2 A = ∥Gt(xk)∥2(1 −αt)/α2; 5: Set xB := ck−1, and R2 B = R2 k−1 −2(F(x+ k−1) −F(x+ k ))/α; 6: Compute B(ck, R2 k): the minimum enclosing ball of B(xA, R2 A) ∩B(xB, R2 B), which can be done using Algorithm 1 in [1]; 7: end for 4 Practical Issues 4.1 GeoPG with Backtracking In practice, the Lipschitz constant β may be unknown to us. In this subsection, we describe a backtracking strategy for GeoPG in which β is not needed. From the β-smoothness of f, we have f(x+) ≤f(x) −t⟨∇f(x), Gt(x)⟩+ t∥Gt(x)∥2/2. (4.1) Note that inequality (3.1) holds because of (4.1), which holds when t ∈(0, 1/β]. If β is unknown, we can perform backtracking on t such that (4.1) holds, which is a common practice for proximal gradient method, e.g., [15–17]. Note that the key step in our analysis of GeoPG is to guarantee that the two inequalities in (3.2) hold. According to Lemma 3.2, the second inequality in (3.2) holds as long as we use Algorithm 1 or Algorithm 2 to find xk, and it does not need the knowledge of β. However, the first inequality in (3.2) requires t ≤1/β, because its proof in Lemma 3.2 needs (3.1). Thus, we need to perform backtracking on t until (4.1) is satisfied, and use the same t to find xk by Algorithm 1 or Algorithm 2. Our GeoPG algorithm with backtracking (GeoPG-B) is described in Algorithm 4. Algorithm 4 : GeoPG with Backtracking (GeoPG-B) Require: Parameters α, γ ∈(0, 1), η ∈(0, 1), initial step size t0 > 0 and initial point x0. Repeat t0 := ηt0 until (4.1) holds for t = t0; Set c0 = x++ 0 , R2 0 = ∥Gt0(x0)∥2 α2 (1 −αt0); for k = 1, 2, . . . do if no backtracking was performed in the (k −1)-th iteration then Set tk := tk−1/γ; else Set tk := tk−1; end if Compute xk by Algorithm 1 or Algorithm 2 with t = tk; while f(x+ k ) > f(xk) −tk⟨∇f(xk), Gtk(xk)⟩+ tk 2 ∥Gtk(xk)∥2 do Set tk := ηtk (backtracking); Compute xk by Algorithm 1 or Algorithm 2 with t = tk; end while Set xA := x++ k = xk −Gtk(xk)/α, R2 A = ∥Gtk (xk)∥2 α2 (1 −αtk); Set xB := ck−1, R2 B = R2 k−1 −2 α(F(x+ k−1) −F(x+ k )); Compute B(ck, R2 k): the minimum enclosing ball of B(xA, R2 A) ∩B(xB, R2 B); end for Note that the sequence {tk} generated in Algorithm 4 is uniformly bounded away from 0. This is because (4.1) always holds when tk ≤1/β. As a result, we know tk ≥tmin := mini=0,...,k ti ≥η/β. It is easy to see that in the k-th iteration of Algorithm 4, x∗is contained in two balls: x∗∈ B ck−1, R2 k−1 −tk∥Gtk(xk)∥2/α −2(F(x+ k ) −F ∗)/α , x∗∈ B x++ k , ∥Gtk(xk)∥2(1 −αtk)/α2 −2(F(x+ k ) −F ∗)/α . 5 Therefore, we have the following convergence result for Algorithm 4, whose proof is similar to that for Algorithm 3. We thus omit the proof for succinctness. Theorem 4.1. Suppose that {(xk, ck, Rk, tk)} is generated by Algorithm 4. For any k ≥0, one has x∗∈B(ck, R2 k) and R2 k+1 ≤(1 −√αtk)R2 k, and thus ∥x∗−ck∥2 ≤Qk i=0(1 −√αti)iR2 0 ≤ (1 −√αtmin)kR2 0. 4.2 GeoPG with Limited Memory The basic idea of GeoD is that in each iteration we maintain two balls B(y1, r2 1) and B(y2, r2 2) that both contain x∗, and then compute the minimum enclosing ball of their intersection, which is expected to be smaller than both B(y1, r2 1) and B(y2, r2 2). One very intuitive idea that can possibly improve the performance of GeoD is to maintain more balls from the past, because their intersection should be smaller than the intersection of two balls. This idea has been proposed by [9] and [10]. Specifically, Bubeck and Lee [9] suggested to keep all the balls from past iterations and then compute the minimum enclosing ball of their intersection. For a given bounded set Q, the center of its minimum enclosing ball is known as the Chebyshev center, and is defined as the solution to the following problem: min y max x∈Q ∥y −x∥2 = min y max x∈Q ∥y∥2 −2y⊤x + Tr(xx⊤). (4.2) (4.2) is not easy to solve for a general set Q. However, when Q := ∩m i=1B(yi, r2 i ), Beck [18] proved that the relaxed Chebyshev center (RCC) [19], which is a convex quadratic program, is equivalent to (4.2) if m < n. Therefore, we can solve (4.2) by solving a convex quadratic program (RCC): min y max (x,△)∈Γ ∥y∥2−2y⊤x+Tr(△) = max (x,△)∈Γ min y ∥y∥2−2y⊤x+Tr(△) = max (x,△)∈Γ −∥x∥2+Tr(△), (4.3) where Γ = {(x, △) : x ∈Q, △⪰xx⊤}. If Q = ∩m i=1B(ci, r2 i ), then the dual of (4.3) is min ∥Cλ∥2 − m X i=1 λi∥ci∥2 + m X i=1 λir2 i , s.t. m X i=1 λi = 1, λi ≥0, i = 1, . . . , m, (4.4) where C = [c1, . . . , cm] and λi, i = 1, 2, . . . , m are the dual variables. Beck [18] proved that the optimal solutions of (4.2) and (4.4) are linked by x∗= Cλ∗if m < n. Now we can give our limited-memory GeoPG algorithm (L-GeoPG) as in Algorithm 5. Algorithm 5 : L-GeoPG: Limited-memory GeoPG Require: Parameters α, β, memory size m > 0 and initial point x0. 1: Set c0 = x++ 0 , r2 0 = R2 0 = ∥Gt(x0)∥2(1 −1/κ)/α2, and t = 1/β; 2: for k = 1, 2, . . . do 3: Use Algorithm 1 or 2 to find xk; 4: Compute r2 k = ∥Gt(xk)∥2(1 −1/κ)/α2; 5: Compute B(ck, R2 k): an enclosing ball of the intersection of B(ck−1, R2 k−1) and Qk := ∩k i=k−m+1B(x++ i , r2 i ) (if k ≤m, then set Qk := ∩k i=1B(x++ i , r2 i )). This is done by setting ck = Cλ∗, where λ∗is the optimal solution of (4.4); 6: end for Remark 4.2. Backtracking can also be incorporated into L-GeoPG. We denote the resulting algorithm as L-GeoPG-B. L-GeoPG has the same linear convergence rate as GeoPG, as we show in Theorem 4.3. Theorem 4.3. Consider the L-GeoPG algorithm. For any k ≥0, one has x∗∈B(ck, R2 k) and R2 k ≤(1 −1/√κ)R2 k−1, and thus ∥x∗−ck∥2 ≤(1 −1/√κ)kR2 0. Proof. Note that Qk := ∩k i=k−m+1B(x++ i , r2 i ) ⊂B(x++ k , r2 k). Thus, the minimum enclosing ball of B(ck−1, R2 k−1)∩B(x++ k , r2 k) is an enclosing ball of B(ck−1, R2 k−1)∩Qk. The proof then follows from the proof of Theorem 3.5, and we omit it for brevity. 6 5 Numerical Experiments In this section, we compare our GeoPG algorithm with Nesterov’s accelerated proximal gradient (APG) method for solving two nonsmooth problems: linear regression and logistic regression, both with elastic net regularization. Because of the elastic net term, the strong convexity parameter α is known. However, we assume that β is unknown, and implement backtracking for both GeoPG and APG, i.e., we test GeoPG-B and APG-B (APG with backtracking). We do not target at comparing with other efficient algorithms for solving these two problems. Our main purpose here is to illustrate the performance of this new first-order method GeoPG. Further improvement of this algorithm and comparison with other state-of-the-art methods will be a future research topic. The initial points were set to zero. To obtain the optimal objective function value F ∗, we ran APG-B and GeoPG-B for a sufficiently long time and the smaller function value returned by the two algorithms is selected as F ∗. APG-B was terminated if (F(xk) −F ∗)/F ∗≤tol, and GeoPG-B was terminated if (F(x+ k ) −F ∗)/F ∗≤tol, where tol = 10−8 is the accuracy tolerance. The parameters used in backtracking were set to η = 0.5 and γ = 0.9. In GeoPG-B, we used Algorithm 2 to find xk, because we found that the performance of Algorithm 2 is slightly better than Algorithm 1 in practice. In the experiments, we ran Algorithm 2 until the absolute value of ¯φ is smaller than 10−8. The code was written in Matlab and run on a standard PC with 3.20 GHz I5 Intel microprocessor and 16GB of memory. In all figures we reported, the x-axis denotes the CPU time (in seconds) and y-axis denotes (F(x+ k ) −F ∗)/F ∗. 5.1 Linear regression with elastic net regularization In this subsection, we compare GeoPG-B and APG-B in terms of solving linear regression with elastic net regularization, a popular problem in machine learning and statistics [20]: min x∈Rn 1 2p∥Ax −b∥2 + α 2 ∥x∥2 + µ∥x∥1, (5.1) where A ∈Rp×n, b ∈Rp, and α, µ > 0 are the weighting parameters. We conducted tests on two real datasets downloaded from the LIBSVM repository: a9a, RCV1. The results are reported in Figure 1. In particular, we tested α = 10−8 and µ = 10−3, 10−4, 10−5. Note that since α is very small, the problems are very likely to be ill-conditioned. We see from Figure 1 that GeoPG-B is faster than APG-B on these real datasets, which indicates that GeoPG-B is preferable than APG-B. In the supplementary material, we show more numerical results on varying α, which further confirm that GeoPG-B is faster than APG-B when the problems are more ill-conditioned. 0 10 20 30 40 50 10 −12 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 CPU(s) (Fk−F*)/F* GeoPG−B: µ =10−3 APG−B: µ =10−3 GeoPG−B: µ =10−4 APG−B: µ =10−4 GeoPG−B: µ =10−5 APG−B: µ =10−5 (a) Dataset a9a 0 5 10 15 20 25 30 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 CPU(s) (Fk−F*)/F* GeoPG−B: µ =10−3 APG−B: µ =10−3 GeoPG−B: µ =10−4 APG−B: µ =10−4 GeoPG−B: µ =10−5 APG−B: µ =10−5 (b) Dataset RCV1 Figure 1: GeoPG-B and APG-B for solving (5.1) with α = 10−8. 5.2 Logistic regression with elastic net regularization In this subsection, we compare the performance of GeoPG-B and APG-B in terms of solving the following logistic regression problem with elastic net regularization: min x∈Rn 1 p p X i=1 log 1 + exp(−bi · a⊤ i x) + α 2 ∥x∥2 + µ∥x∥1, (5.2) where ai ∈Rn and bi ∈{±1} are the feature vector and class label of the i-th sample, respectively, and α, µ > 0 are the weighting parameters. 7 We tested GeoPG-B and APG-B for solving (5.2) on the three real datasets a9a, RCV1 and Gisette from LIBSVM, and the results are reported in Figure 2. In particular, we tested α = 10−8 and µ = 10−3, 10−4, 10−5. Figure 2 shows that with the same µ, GeoPG-B is much faster than APG-B. More numerical results are provided in the supplementary material, which also indicate that GeoPG-B is much faster than APG-B, especially when the problems are more ill-conditioned. 0 10 20 30 40 50 60 70 80 90 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 CPU(s) (Fk−F*)/F* GeoPG−B: µ =10−3 APG−B: µ =10−3 GeoPG−B: µ =10−4 APG−B: µ =10−4 GeoPG−B: µ =10−5 APG−B: µ =10−5 0 1 2 3 4 5 6 7 8 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 CPU(s) (Fk−F*)/F* GeoPG−B: µ =10−3 APG−B: µ =10−3 GeoPG−B: µ =10−4 APG−B: µ =10−4 GeoPG−B: µ =10−5 APG−B: µ =10−5 0 500 1000 1500 2000 2500 3000 3500 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 10 4 CPU(s) (Fk−F*)/F* GeoPG−B: µ =10−3 APG−B: µ =10−3 GeoPG−B: µ =10−4 APG−B: µ =10−4 GeoPG−B: µ =10−5 APG−B: µ =10−5 Figure 2: GeoPG-B and APG-B for solving (5.2) with α = 10−8. Left: dataset a9a; Middle: dataset RCV1; Right: dataset Gisette. 5.3 Numerical results of L-GeoPG-B In this subsection, we test GeoPG with limited memory described in Algorithm 5 in solving (5.2) on the Gisette dataset. Since we still need to use the backtracking technique, we actually tested L-GeoPG-B. The results with different memory sizes m are reported in Figure 3. Note that m = 0 corresponds to the original GeoPG-B without memory. The subproblem (4.4) is solved using the function “quadprog” in Matlab. From Figure 3 we see that roughly speaking, L-GeoPG-B performs better for larger memory sizes, and in most cases, the performance of L-GeoPG-B with m = 100 is the best among the reported results. This indicates that the limited-memory idea indeed helps improve the performance of GeoPG. 0 50 100 150 200 250 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 CPU(s) (Fk−F*)/F* memorysize=0 memorysize=5 memorysize=20 memorysize=100 0 50 100 150 200 250 300 350 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 CPU(s) (Fk−F*)/F* memorysize=0 memorysize=5 memorysize=20 memorysize=100 0 50 100 150 200 250 300 350 400 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 10 2 10 4 CPU(s) (Fk−F*)/F* memorysize=0 memorysize=5 memorysize=20 memorysize=100 Figure 3: L-GeoPG-B for solving (5.2) on the dataset Gisette with α = 10−8. Left: µ = 10−3; Middle: µ = 10−4; Right: µ = 10−5. 6 Conclusions In this paper, we proposed a GeoPG algorithm for solving nonsmooth convex composite problems, which is an extension of the recent method GeoD that can only handle smooth problems. We proved that GeoPG enjoys the same optimal rate as Nesterov’s accelerated gradient method for solving strongly convex problems. The backtracking technique was adopted to deal with the case when the Lipschitz constant is unknown. Limited-memory GeoPG was also developed to improve the practical performance of GeoPG. Numerical results on linear regression and logistic regression with elastic net regularization demonstrated the efficiency of GeoPG. It would be interesting to see how to extend GeoD and GeoPG to tackle non-strongly convex problems, and how to further accelerate the running time of GeoPG. We leave these questions in future work. Acknowledgements. Shixiang Chen is supported by CUHK Research Postgraduate Student Grant for Overseas Academic Activities. Shiqian Ma is supported by a startup funding in UC Davis. 8 References [1] S. Bubeck, Y.-T. Lee, and M. Singh. A geometric alternative to Nesterov’s accelerated gradient descent. arXiv preprint arXiv:1506.08187, 2015. [2] Y. E. Nesterov. A method for unconstrained convex minimization problem with the rate of convergence O(1/k2). Dokl. Akad. Nauk SSSR, 269:543–547, 1983. [3] Y. E. Nesterov. Introductory lectures on convex optimization: A basic course. Applied Optimization. Kluwer Academic Publishers, Boston, MA, 2004. ISBN 1-4020-7553-7. [4] W. Su, S. Boyd, and E. J. Candès. A differential equation for modeling Nesterov’s accelerated gradient method: Theory and insights. In NIPS, 2014. [5] H. Attouch, Z. Chbani, J. Peypouquet, and P. Redont. Fast convergence of inertial dynamics and algorithms with asymptotic vanishing viscosity. Mathematical Programming, 2016. [6] L. Lessard, B. Recht, and A. Packard. Analysis and design of optimization algorithms via integral quadratic constraints. SIAM Journal on Optimization, 26(1):57–95, 2016. [7] A. Wibisono, A. Wilson, and M. I. Jordan. A variational perspective on accelerated methods in optimization. Proceedings of the National Academy of Sciences, 133:E7351–E7358, 2016. [8] R. G. Bland, D. Goldfarb, and M. J. Todd. The ellipsoid method: A survey. Operations Research, 29:1039–1091, 1981. [9] S. Bubeck and Y.-T. Lee. Black-box optimization with a politician. ICML, 2016. [10] D. Drusvyatskiy, M. Fazel, and S. Roy. An optimal first order method based on optimal quadratic averaging. SIAM Journal on Optimization, 2016. [11] R. P. Brent. An algorithm with guaranteed convergence for finding a zero of a function. In Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Prentice-Hall, 1973. [12] T. J. Dekker. Finding a zero by means of successive linear interpolation. In Constructive Aspects of the Fundamental Theorem of Algebra. London: Wiley-Interscience, 1969. [13] M. Gerdts, S. Horn, and S. Kimmerle. Line search globalization of a semismooth Newton method for operator equations in Hilbert spaces with applications in optimal control. Journal of Industrial And Management Optimization, 13(1):47–62, 2017. [14] E. Hans and T. Raasch. Global convergence of damped semismooth Newton methods for L1 Tikhonov regularization. Inverse Problems, 31(2):025005, 2015. [15] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imaging Sciences, 2(1):183–202, 2009. [16] K. Scheinberg, D. Goldfarb, and X. Bai. Fast first-order methods for composite convex optimization with backtracking. Foundations of Computational Mathematics, 14(3):389–417, 2014. [17] Y. E. Nesterov. Gradient methods for minimizing composite functions. Mathematical Programming, 140(1):125–161, 2013. [18] A. Beck. On the convexity of a class of quadratic mappings and its application to the problem of finding the smallest ball enclosing a given intersection of balls. Journal of Global Optimization, 39(1):113–126, 2007. [19] Y. C. Eldar, A. Beck, and M. Teboulle. A minimax Chebyshev estimator for bounded error estimation. IEEE Transactions on Signal Processing, 56(4):1388–1397, 2008. [20] H. Zou and T. Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society, Series B, 67(2):301–320, 2005. 9 | 2017 | 444 |
6,946 | Label Efficient Learning of Transferable Representations across Domains and Tasks Zelun Luo Stanford University zelunluo@stanford.edu Yuliang Zou Virginia Tech ylzou@vt.edu Judy Hoffman University of California, Berkeley jhoffman@eecs.berkeley.edu Li Fei-Fei Stanford University feifeili@cs.stanford.edu Abstract We propose a framework that learns a representation transferable across different domains and tasks in a label efficient manner. Our approach battles domain shift with a domain adversarial loss, and generalizes the embedding to novel task using a metric learning-based approach. Our model is simultaneously optimized on labeled source data and unlabeled or sparsely labeled data in the target domain. Our method shows compelling results on novel classes within a new domain even when only a few labeled examples per class are available, outperforming the prevalent fine-tuning approach. In addition, we demonstrate the effectiveness of our framework on the transfer learning task from image object recognition to video action recognition. 1 Introduction Humans are exceptional visual learners capable of generalizing their learned knowledge to novel domains and concepts and capable of learning from few examples. In recent years, computational models based on end-to-end learnable convolutional networks have made significant improvements for visual recognition [18, 28, 54] and have been shown to demonstrate some cross-task generalizations [8, 48] while enabling faster learning of subsequent tasks as most frequently evidenced through finetuning [14, 36, 50]. However, most efforts focus on the supervised learning scenario where a closed world assumption is made at training time about both the domain of interest and the tasks to be learned. Thus, any generalization ability of these models is only an observed byproduct. There has been a large push in the research community to address generalizing and adapting deep models across different domains [64, 13, 58, 38], to learn tasks in a data efficient way through few shot learning [27, 70, 47, 11], and to generically transfer information across tasks [1, 14, 50, 35]. While most approaches consider each scenarios in isolation we aim to directly tackle the joint problem of adapting to a novel domain which has new tasks and few annotations. Given a large labeled source dataset with annotations for a task set, A, we seek to transfer knowledge to a sparsely labeled target domain with a possibly wholly new task set, B. This setting is in line with our intuition that we should be able to learn reusable and general purpose representations which enable faster learning of future tasks requiring less human intervention. In addition, this setting matches closely to the most common practical approach for training deep models which is to use a large labeled source dataset (often ImageNet [6, 52]) to train an initial representation and then to continue supervised learning with a new set of data and often with new concepts. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In our approach, we jointly adapt a source representation for use in a distinct target domain using a new multilayer unsupervised domain adversarial formulation while introducing a novel cross-domain and within domain class similarity objective. This new objective can be applied even when the target domain has non-overlapping classes to the source domain. We evaluate our approach in the challenging setting of joint transfer across domains and tasks and demonstrate our ability to successfully transfer, reducing the need for annotated data for the target domain and tasks. We present results transferring from a subset of Google Street View House Numbers (SVHN) [41] containing only digits 0-4 to a subset of MNIST [29] containing only digits 5-9. Secondly, we present results on the challenging setting of adapting from ImageNet [6] object-centric images to UCF-101 [57] videos for action recognition. 2 Related work Domain adaptation. Domain adaptation seeks to learn from related source domains a well performing model on target data distribution [4]. Existing work often assumes that both domains are defined on the same task and labeled data in target domain is sparse or non-existent [64]. Several methods have tackled the problem with the Maximum Mean Discrepancy (MMD) loss [17, 36, 37, 38, 73] between the source and target domain. Weight sharing of CNN parameters [58, 22, 21, 3] and minimizing the distribution discrepancy of network activations [51, 65, 30] have also shown convincing results. Adversarial generative models [33, 32, 2, 59] aim at generating source-like data with target data by training a generator and a discriminator simultaneously, while adversarial discriminative models [62, 64, 13, 12, 23] focus on aligning embedding feature representations of target domain to source domain. Inspired by adversarial discriminative models, we propose a method that aligns domain features with multi-layer information. Transfer learning. Transfer learning aims to transfer knowledge by leveraging the existing labeled data of some related task or domain [45, 71]. In computer vision, examples of transfer learning include [1, 31, 61] which try to overcome the deficit of training samples for some categories by adapting classifiers trained for other categories [43]. With the power of deep supervised learning and the ImageNet dataset [6, 52], learned knowledge can even transfer to a totally different task (i.e. image classification →object detection [50, 49, 34]; image classification →semantic segmentation [35]) and then achieve state-of-the-art performance. In this paper, we focus on the setting where source and target domains have differing label spaces but the label spaces share the same structure. Namely adapting between classifying different category sets but not transferring from classification to a localization plus classification task. Few-shot learning. Few-shot learning seeks to learn new concepts with only a few annotated examples. Deep siamese networks [27] are trained to rank similarity between examples. Matching networks [70] learns a network that maps a small labeled support set and an unlabeled example to its label. Aside from these metric learning-based methods, meta-learning has also served as a essential part. Ravi et al. [47] propose to learn a LSTM meta-learner to learn the update rule of a learner. Finn et al. [11] tries to find a good initialization point that can be easily fine-tune with new examples from new tasks. When there exists a domain shift, the results of prior few-shot learning methods are often degraded. Unsupervised learning. Many unsupervised learning algorithms have focused on modeling raw data using reconstruction objectives [19, 69, 26]. Other probabilistic models include restricted Boltzmann machines [20], deep Boltzmann machines [53], GANs [15, 10, 9], and autoregressive models [42, 66] are also popular. An alternative approach, often terms “self-supervised learning” [5], defines a pretext task such as predicting patch ordering [7], frame ordering [40], motion dynamics [39], or colorization [72], as a form of indirect supervision. Compared to these approaches, our unsupervised learning method does not rely on exploiting the spatial or temporal structure of the data, and is therefore more generic. 3 Method We introduce a semi-supervised learning algorithm which transfers information from a large labeled source domain, S, to a sparsely labeled target domain, T . The goal being to learn a strong target 2 Source labeled data Supervised Loss Multi-layer Domain Transfer Pairwise Similarity {t, ᬖt} {t} {, ᬖ} Softmax ᷠ Semantic Transfer Source CNN Target CNN Target unlabeled data Adversarial Loss Target labeled data Entropy Loss Supervised Loss Figure 1: Our proposed learning framework for joint transfer across domains and semantic transfer across source and target and across target labeled to unlabeled data. We introduce a domain discriminator which aligns source and target representations across multiple layers of the network through domain adversarial learning. We enable semantic transfer through minimizing the entropy of the pairwise similarity between unlabeled and labeled target images and use the temperature of the softmax over the similarity vector to allow for non-overlapping label spaces. classifier without requiring the large annotation overhead required for standard supervised learning approaches. In fact, this setting is very commonly explored for convolutional network (convnet) based recognition methods. When learning with convnets the usual learning procedure is to use a very large labeled dataset (e.g. ImageNet [6, 52]) for initial training of the network parameters (termed pre-training). The learned weights are then used as initialization for continued learning on new data and for new tasks, called fine-tuning. Fine-tuning has been broadly applied to reduce the number of labeled examples needed for learning new tasks, such as recognizing new object categories after ImageNet pre-training [54, 18], or learning new label structures such as detection after classficiation pretraining [14, 50]. Here we focus on transfer in the case of a shared label structure (e.g. classification of different category sets). We assume the source domain contains ns images, xs ∈X S, with associated labels, ys ∈YS. Similarly, the target domain consists of nt unlabeled images, ˜xt ∈ ˜ X T , as well as mt images, xt ∈X T , with associated labels, yt ∈YT . We assume that the target domain is only sparsely labeled so that the number of image-label pairs is much smaller than the number of unlabeled images, mt ≪nt. Additionally, the number of source labeled images is assumed to be much larger than the number of target labeled images, mt ≪ns. Unlike standard domain adaptation approaches which transfer knowledge from source to target domains assuming a marginal or conditional distribution shift under a shared label space (YS = YT ), we tackle joint image or feature space adaptation as well as transfer across semantic spaces. Namely, we consider the case where the source and target label spaces are not equal, YS ̸= YT , and even the most challenging case where the sets are non-overlapping, YS ∩YT = ∅. 3.1 Joint domain and semantic transfer Our approach consists of unsupervised feature alignment between source and target as well as semantic transfer to the unlabeled target data from either the labeled target or the labeled source data. We introduce a new multi-layer domain discriminator which can be used for domain alignment following the recent domain adversarial learning approaches [13, 64]. We next introduce a new semantic transfer learning objective which uses cross category similarity and can be tuned to account for varying size of label set overlap. 3 We depict our overall model in Figure 1. We take the ns source labeled examples, {xs, ys}, the mt target labeled examples, {xt, yt}, and the nt unlabeled target images, {˜xt} as input. We learn an initial layered source representation and classification network (depicted in blue in Figure 1) using standard supervised techniques. We then initialize the target model (depicted in green in Figure 1) with the source parameters and begin our adaptive transfer learning. Our model jointly optimizes over a target supervised loss, Lsup, a domain transfer objective, LDT, and finally a semantic transfer objective, LST. Thus, our total objective can be written as follows: L(X S, YS, X T , YT , ˜ X T ) = Lsup(X T , YT ) + αLDT(X S, ˜ X T ) + βLST(X S, X T , ˜ X T ) (1) where the hyperparameters α and β determine the influence of the domain transfer loss and the semantic transfer loss, respectively. In the following sections we elaborate on our domain and semantic transfer objectives. 3.2 Multi-layer domain adversarial loss We define a novel domain alignment objective function called multi-layer domain adversarial loss. Recent efforts in deep domain adaptation have shown strong performance using feature space domain adversarial objectives [13, 64]. These methods learn a target representation such that the target distribution viewed under this model is aligned with the source distribution viewed under the source representation. This alignment is accomplished through an adversarial minimization across domain, analogous to the prevalent generative adversarial approaches [15]. In particular, a domain discriminator, D(·), is trained to classify whether a particular data point arises from the source or the target domain. Simultaneously, the target embedding function Et(xt) (defined as the application of layers of the network is trained to generate the target representation that cannot be distinguished from the source domain representation by the domain discriminator. Similar to [63, 64], we consider a representation to be domain invariant if the domain discriminator can not distinguish examples from the two domains. Prior work considers alignment for a single layer of the embedding at a time and as such learns a domain discriminator which takes the output from the corresponding source and target layers as input. Separately, domain alignment methods which focus on first and second order statistics have shown improved performance through applying domain alignment independently at multiple layers of the network [36]. Rather than learning independent discriminators for each layer of the network we propose a simultaneous alignment of multiple layers through a multi-layer discriminator. At each layer of our multi-layer domain discriminator, information is accumulated from both the output from the previous discriminator layer as well as the source and target activations from the corresponding layer in their respective embeddings. Thus, the output of each discriminator layer is defined as: dl = Dl(σ(γdl−1 ⊕El(x))) (2) where l is the current layer, σ(·) is the activation function, γ ≤1 is the decay factor, ⊕represents concatenation or element-wise summation, and x is taken either from source data xs ∈X S, or target data ˜xt ∈ ˜ X T . Notice that the intermediate discriminator layers share the same structure with their corresponding encoding layers to match the dimensions. Thus, the following loss functions are proposed to optimize the multi-layer domain discriminator and the embeddings, respectively, according to our domain transfer objective: LD DT = −Exs∼X S [log ds l ] −Ext∼X T log(1 −dt l) (3) LEt DT = −Exs∼X S [log(1 −ds l )] −Ext∼X T log dt l (4) where ds l , dt l are the outputs of the last layer of the source and target multi-layer domain discriminator. Note that these losses are placed after the final domain discriminator layer and the last embedding layer but then produce gradients which back-propagate throughout all relevant lower layer parameters. These two losses together comprise LDT , and there is no iterative optimization procedure involved. This multi-layer discriminator (shown in Figure 1 - yellow) allows for deeper alignment of the source and target representations which we find empirically results in improved target classification performance as well as more stable adversarial learning. 4 Figure 2: We illustrate the purpose of temperature (τ) for our pairwise similarity vector. Consider an example target unlabeled point and its similarity to four labeled source points (x-axis). We show here, original unnormalized scores (leftmost) as well as the same similarity scores after applying softmax with different temperatures, τ. Notice that entropy values, H(x), have higher variance for scores normalized with a small temperature softmax. 3.3 Cross category similarity for semantic transfer In the previous section, we introduced a method for transferring an embedding from the source to the target domain. However, this only enforces alignment of the global domain statistics with no class specific transfer. Here, we define a new semantic transfer objective, LST, which transfers information from a labeled set of data to an unlabeled set of data by minimizing the entropy of the softmax with temperature of the similarity vector between an unlabeled point and all labeled points. Thus, this loss may be applied either between the source and unlabeled target data or between the labeled and unlabeled target data. For each unlabeled target image, ˜xt, we compute the similarity, ψ(·), to each labeled example or to each prototypical example [56] per class in the labeled set. For simplicity of presentation let us consider semantic transfer from the source to the target domain first. For each target unlabeled image we compute a similarity vector where the ith element is the similarity between this target image and the ith labeled source image: [vs(˜xt)]i = ψ(˜xt, xs i). Our semantic transfer loss can be defined as follows: LST( ˜ X T , X S) = X ˜xt∈˜ X T H(σ(vs(˜xt)/τ)) (5) where, H(·) is the information entropy function, σ(·) is the softmax function and τ is the temperature of the softmax. Note that the temperature can be used to directly control the percentage of source examples we expect the target example to be similar to (see Figure 2). Entropy minimization has been widely used for unsupervised [44] and semi-supervised [16] learning by encouraging low density separation between clusters or classes. Recently this principle of entropy minimization has be applied for unsupervised adaptation [38]. Here, the source and target domains are assumed to share a label space and each unlabeled target example is passed through the initial source classifier and the entropy of the softmax output scores is minimized. In contrast, we do not assume a shared label space between the source and target domains and as such can not assume that each target image maps to a single source label. Instead, we compute pairwise similarities between target points and the source points (or per class averages of source points [56]) across the features spaces aligned by our multi-layer domain adversarial transfer. We then tune the softmax temperature based on the expected similarity between the source and target labeled set. For example, if the source and target label set overlap, then a small temperature will encourage each target point to be very similar to one source class, whereas a larger temperature will allow for target points to be similar to multiple source classes. For semantic transfer within the target domain, we utilize the metric-based cross entropy loss between labeled target examples to stabilize and improve the learning. For a labeled target example, in addition to the traditional cross entropy loss, we also calculate a metric-based cross entropy loss 1. Assume we have k labeled examples from each class in the target domain. We compute the embedding for 1We refer this as "metric-based" to cue the reader that this is not a cross entropy within the label space. 5 each example and then the centroid cT i of each class in the embedding space. Thus, we can compute the similarity vector for each labeled example, where the ith element is the similarity between this labeled example and the centroid of each class: [vt(xt)]i = ψ(xt, cT i ). We can then calculate the metric based cross entropy loss: LST,sup(X T ) = − X {xt,yt}∈X T log exp ([vt(xt)]yt) Pn i=1 exp ([vt(xt)]i) (6) Similar to the source-to-target scenario, for target-to-target we also have the unsupervised part, LST,unsup( ˜ X T , X T ) = X ˜xt∈˜ X T H(σ(vt(˜xt)/τ)) (7) With the metric-based cross entropy loss, we introduce the constraint that the target domain data should be similar in the embedding space. Also, we find that this loss can provide a guidance for the unsupervised semantic transfer to learn in a more stable way. LST is the combination of LST,unsupervised from source-target (Equation 5), LST,supervised from source-target (Equation 6), and LST,unsupervised from target-target (Equation 7), i.e., LST (X S, X T , ˜ X T ) = LST ( ˜ X T , X S) + LST,sup(X T ) + LST,unsup( ˜ X T , X T ) (8) 4 Experiment This section is structured as follows. In section 4.1, we show that our method outperform fine-tuning approach by a large margin, and all parts of our method are necessary. In section 4.2, we show that our method can be generalized to bigger datasets. In section 4.3, we show that our multi-layer domain adversarial method outperforms state-of-the-art domain adversarial approaches. Datasets We perform adaptation experiments across two different paired data settings. First for adaptation across different digit domains we use MNIST [29] and Google Street View House Numbers (SVHN) [41]. The MNIST handwritten digits database has a training set of 60,000 examples, and a test set of 10,000 examples. The digits have been size-normalized and centered in fixed-size images. SVHN is a real-world image dataset for machine learning and object recognition algorithms with minimal requirement on data preprocessing and formatting. It has 73257 digits for training, 26032 digits for testing. As our second experimental setup, we consider adaptation from object centric images in ImageNet [52] to action recognition in video using the UCF-101 [57] dataset. ImageNet is a large benchmark for the object classification task. We use the task 1 split from ILSVRC2012. UCF-101 is an action recognition dataset collected on YouTube. With 13,320 videos from 101 action categories, UCF-101 provides a large diversity in terms of actions and with the presence of large variations in camera motion, object appearance and pose, object scale, viewpoint, cluttered background, illumination conditions, etc. Implementation details We pre-train the source domain embedding function with cross-entropy loss. For domain adversarial loss, the discriminator takes the last three layer activations as input when the number of output classes are the same for source and target tasks, and takes the second last and third last layer activations when they are different. The similarity score is chosen as the dot product of the normalized support features and the unnormalized target feature. We use the temperature τ = 2 for source-target semantic transfer and τ = 1 for within target transfer as the label space is shared. We use α = 0.1 and β = 0.1 in our objective function. The network is trained with Adam optimizer [25] and with learning rate 10−3. We conduct all the experiments with the PyTorch framework. 4.1 SVHN 0-4 →MNIST 5-9 Experimental setting. In this experiment, we define three datasets: (i) labeled data in source domain D1; (ii) few labeled data in target domain D2; (iii) unlabeled data in target domain D3. We take the training split of SVHN dataset as dataset D1. To fairly compare with traditional learning paradigm and episodic training, we subsample k examples from each class to construct dataset D2 so that we can perform traditional training or episodic (k −1)-shot learning. We experiment with k = 2, 3, 4, 5, which corresponds to 10, 15, 20, 25 labeled examples, or 0.017%, 0.025%, 0.333%, 0.043% of the 6 total training data respectively. Since our approach involves using annotations from a small subset of the data, we randomly subsample 10 different subsets {Di 2}10 i=1 from the training split of MNIST dataset, and use the remaining data as {Di 3}10 i=1 for each k. Note that source domain and target domain have non-overlapping classes: we only utilize digits 0-4 in SVHN, and digits 5-9 in MNIST. Figure 3: An illustration of our task. Our model effectively transfer the learned representation on SVHN digits 0-4 (left) to MNIST digits 5-9 (right). Baselines and prior work. We compare against six different methods: (i) Target only: the model is trained on D2 from scratch; (ii) Fine-tune: the model is pretrained on D1 and fine-tuned on D2; (iii) Matching networks [70]: we first pretrain the model on D3, then use D2 as the support set in the matching networks; (iv) Fine-tuned matching networks: same as baseline iii, except that for each k the model is fine-tuned on D2 with 5-way (k −1)-shot learning: k −1 examples in each class are randomly selected as the support set, and the last example in each class is used as the query set; (v) Fine-tune + adversarial: in addition to baseline ii, the model is also trained on D1 and D3 with a domain adversarial loss; (vi.) Full model: fine-tune the model with the proposed multi-layer domain adversarial loss. Results and analysis. We calculate the mean and standard error of the accuracies across 10 sets of data, which is shown in Table 1. Due to domain shift, matching networks perform poorly without fine-tuning, and fine-tuning is only marginally better than training from scratch. Our method with multi-layer adversarial only improves the overall performance, but is more sensitive to the subsampled data. Our method achieves significant performance gain, especially when the number of labeled examples is small (k = 2). For reference, fine-tuning on full target dataset gives an accuracy of 99.65%. Table 1: The test accuracies of the baseline models and our method. Row 1 to row 6 correspond (in the same order) to the six methods proposed in section 4.2. Note that the accuracies of two matching net methods are calculated based on nearest neighbors in the support set. We report the mean and the standard error of each method across 10 different subsampled data. Method k=2 k=3 k=4 k=5 Target only 0.642 ± 0.026 0.771 ± 0.015 0.801 ± 0.010 0.840 ± 0.013 Fine-tune 0.612 ± 0.020 0.779 ± 0.018 0.802 ± 0.016 0.830 ± 0.011 Matching nets [70] 0.469 ± 0.019 0.455 ± 0.014 0.566 ± 0.013 0.513 ± 0.023 Fine-tuned matching nets 0.645 ± 0.019 0.755 ± 0.024 0.793 ± 0.013 0.827 ± 0.011 Ours: fine-tune + adv. 0.702 ± 0.020 0.800 ± 0.013 0.804 ± 0.014 0.831 ± 0.013 Ours: full model (γ = 0.1) 0.917 ± 0.007 0.936 ± 0.006 0.942 ± 0.006 0.950 ± 0.004 (a) (b) (c) (d) (e) (f) Figure 4: The t-SNE [68, 67] visualization of different feature embeddings. (a) Source domain embedding. (b) Target domain embedding using encoder trained with source domain domain. (c) Target domain embedding using encoder fine-tuned with target domain data. (d) Target domain embedding using encoder trained with our method. (e) An overlap of a and c. (f) An overlap of a and d. (best viewed in color and with zoom) 7 4.2 Image object recognition →video action recognition Problem analysis. Many recent works [60, 24] study the domain shift between images and video in the object detection settings. Compared to still images, videos provide several advantages: (i) motion provides information for foreground vs background segmentation [46]; (ii) videos often show multiple views and thus provide 3D information. On the other hand, video frames usually suffer from: (i) motion blur; (ii) compression artifacts; (iii) objects out-of-focus or out-of-frame. Experimental setting. In this experiment, we focus on three dataset splits: (i) ImageNet training set as the labeled data in source domain D1; (ii) k video clips per class randomly sampled from UCF-101 training as the few labeled data in target domain set D2; (iii) the remaining videos in UCF-101 training set as the unlabeled data in target domain D3. We experiment with k = 3, 5, 10, which corresponds 303, 505, 1010 video clips, or 2.27%, 3.79%, 7.59% of the total training data respectively. Each experiment is run 3 times on D1, {Di 2}3 i=1, and {Di 3}3 i=1. Baselines and prior work. We compare our method with two baseline methods: (i) Target only: the model is trained on D2 from scratch; (ii) Fine-tune: the model is first pre-trained on D1, then fine-tuned on D2. For reference, we report the performance of a fully supervised method [55]. Results and analysis. The accuracy of each model is shown in Table 2. We also fine-tune a model with all the labeled data for comparison. Per-frame performance (img) and average-across-frame performance (vid) are both reported. Note that we calculate the average-across-frame performance by averaging the softmax score of each frame in a video. Our method achieves significant improvement on average-across-frame performance over standard fine-tuning for each value of k. Note that compared to fine-tuning, our method has a bigger gap between per-frame and per-video accuracy. We believe that this is due to the semantic transfer: our entropy loss encourages a sharper softmax variance among per-frame softmax scores per video (if the variance is zero, then per-frame accuracy = per-video accuracy). By making more confident predictions among key frames, our method achieves a more significant gain with respective to per-video performance, even when there is little change in the per-frame prediction. Table 2: Accuracy of UCF-101 action classification. The results of the two-stream spatial model are taken from [55] and vary depending on hyperparameters. We report the mean and the standard error of each method across 3 different subsampled data. Method k=3 k=5 k=10 All Target only (img) 0.098±0.003 0.126±0.022 0.100±0.035 Target only (vid) 0.105±0.003 0.133±0.024 0.106±0.038 Fine-tune (img) 0.380±0.013 0.486±0.012 0.529±0.039 0.672 Fine-tune (vid) 0.406±0.015 0.523±0.010 0.568±0.042 0.714 Two-stream spatial [55] 0.708 - 0.720 Ours (img) 0.393±0.006 0.459±0.013 0.523±0.002 Ours (vid) 0.467±0.007 0.545±0.014 0.620±0.005 4.3 Ablation: unsupervised domain adaptation To validate our multi-layer domain adversarial loss objective, we conduct an ablation experiment for unsupervised domain adaptation. We compare against multiple recent domain adversarial unsupervised adaptation methods. In this experiment, we first pretrain a source embedding CNN on the training split SVHN [41] and then adapt the target embedding for MNIST by performing adversarial domain adaptation. We evaluate the classification performance on the test split of MNIST [29]. We follow the same training strategy and model architecture for the embedding network as [64]. 8 All the models here have a two-step training strategy and share the first stage. ADDA [64] optimizes encoder and classifier simultaneously. We also propose a similar method, but optimize encoder only. Only we try a model with no classifier in the last layer (i.e. perform domain adversarial training in feature space). We choose γ = 0.1 as the decay factor for this model. The accuracy of each model is shown in Table 3. We find that our method achieve 6.5% performance gain over the best competing domain adversarial approach indicating that our multilayer objective indeed contributes to our overall performance. In addition, in our experiments, we found that the multilayer approach improved overall optimization stability, as evidenced in our small standard error. Table 3: Experimental results on unsupervised domain adaptation from SVHN to MNIST. Results of Gradient reversal, Domain confusion, and ADDA are from [64], and the results of other methods are from experiments across 5 different subsampled data. Method Accuracy Source only 0.601 ± 0.011 Gradient reversal [13] 0.739 Domain confusion [62] 0.681 ± 0.003 ADDA [64] 0.760 ± 0.018 Ours 0.810 ± 0.003 5 Conclusion In this paper, we propose a method to learn a representation that is transferable across different domains and tasks in a data efficient manner. The framework is trained jointly to minimize the domain shift, to transfer knowledge to new task, and to learn from large amounts of unlabeled data. We show superior performance over the popular fine-tuning approach. We hope to keep improving the method in future work. Acknowledgement We would like to start by thanking our sponsors: Stanford Computer Science Department and Stanford Program in AI-assisted Care (PAC). Next, we specially thank De-An Huang, Kenji Hata, Serena Yeung, Ozan Sener and all the members of Stanford Vision and Learning Lab for their insightful discussion and feedback. Lastly, we thank all the anonymous reviewers for their valuable comments. 9 References [1] Yusuf Aytar and Andrew Zisserman. Tabula rasa: Model transfer for object category detection. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 2252–2259. IEEE, 2011. [2] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. arXiv preprint arXiv:1612.05424, 2016. [3] Lluis Castrejon, Yusuf Aytar, Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Learning aligned cross-modal representations from weakly aligned data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2940–2949, 2016. [4] Gabriela Csurka. Domain adaptation for visual applications: A comprehensive survey. arXiv preprint arXiv:1702.05374, 2017. [5] Virginia R de Sa. Learning classification with unlabeled data. Advances in neural information processing systems, pages 112–112, 1994. [6] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. [7] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE International Conference on Computer Vision, pages 1422–1430, 2015. [8] Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32, ICML’14, pages I–647–I–655. JMLR.org, 2014. [9] Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782, 2016. [10] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016. [11] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400, 2017. [12] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. [13] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016. [14] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Computer Vision and Pattern Recognition, 2014. [15] 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. [16] Yves Grandvalet, Yoshua Bengio, et al. Semi-supervised learning by entropy minimization. In NIPS, volume 17, pages 529–536, 2004. [17] A Gretton, A.J. Smola, J Huang, Marcel Schmittfull, K.M. Borgwardt, B Schölkopf, J Quiñonero Candela, M Sugiyama, A Schwaighofer, and N D. Lawrence. Covariate shift by kernel mean matching. In Dataset Shift in Machine Learning, 131-160 (2009), 01 2009. 10 [18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [19] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006. [20] Geoffrey E Hinton and Terrence J Sejnowski. Learning and releaming in boltzmann machines. Parallel Distrilmted Processing, 1, 1986. [21] Judy Hoffman, Saurabh Gupta, and Trevor Darrell. Learning with side information through modality hallucination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 826–834, 2016. [22] Judy Hoffman, Saurabh Gupta, Jian Leong, Sergio Guadarrama, and Trevor Darrell. Crossmodal adaptation for rgb-d detection. In Robotics and Automation (ICRA), 2016 IEEE International Conference on, pages 5032–5039. IEEE, 2016. [23] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcns in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. [24] Vicky Kalogeiton, Vittorio Ferrari, and Cordelia Schmid. Analysing domain shift factors between videos and images for object detection. IEEE transactions on pattern analysis and machine intelligence, 38(11):2327–2334, 2016. [25] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [26] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [27] Gregory Koch. Siamese neural networks for one-shot image recognition. PhD thesis, University of Toronto, 2015. [28] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Neural Information Processing Systems (NIPS), 2012. [29] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [30] Yanghao Li, Naiyan Wang, Jianping Shi, Jiaying Liu, and Xiaodi Hou. Revisiting batch normalization for practical domain adaptation. arXiv preprint arXiv:1603.04779, 2016. [31] Joseph J Lim, Ruslan Salakhutdinov, and Antonio Torralba. Transfer learning by borrowing examples for multiclass object detection. In Proceedings of the 24th International Conference on Neural Information Processing Systems, pages 118–126. Curran Associates Inc., 2011. [32] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. arXiv preprint arXiv:1703.00848, 2017. [33] Ming-Yu Liu and Oncel Tuzel. Coupled generative adversarial networks. In Advances in Neural Information Processing Systems, pages 469–477, 2016. [34] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In European Conference on Computer Vision, pages 21–37. Springer, 2016. [35] 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. [36] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. In ICML, pages 97–105, 2015. 11 [37] Mingsheng Long, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. arXiv preprint arXiv:1605.06636, 2016. [38] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Unsupervised domain adaptation with residual transfer networks. In Advances in Neural Information Processing Systems, pages 136–144, 2016. [39] Zelun Luo, Boya Peng, De-An Huang, Alexandre Alahi, and Li Fei-Fei. Unsupervised learning of long-term motion dynamics for videos. arXiv preprint arXiv:1701.01821, 2017. [40] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In European Conference on Computer Vision, pages 527–544. Springer, 2016. [41] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, page 5, 2011. [42] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. [43] Maxime Oquab, Leon Bottou, Ivan Laptev, and Josef Sivic. Learning and transferring midlevel image representations using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1717–1724, 2014. [44] Gintautas Palubinskas, Xavier Descombes, and Frithjof Kruggel. An unsupervised clustering method using the entropy minimization. In AAAI, 1999. [45] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2010. [46] Deepak Pathak, Ross Girshick, Piotr Dollár, Trevor Darrell, and Bharath Hariharan. Learning features by watching objects move. arXiv preprint arXiv:1612.06370, 2016. [47] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, volume 1, page 6, 2017. [48] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. CNN features off-the-shelf: An astounding baseline for recognition. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR Workshops 2014, Columbus, OH, USA, June 23-28, 2014, pages 512–519, 2014. [49] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 779–788, 2016. [50] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. [51] Artem Rozantsev, Mathieu Salzmann, and Pascal Fua. Beyond sharing weights for deep domain adaptation. arXiv preprint arXiv:1603.06432, 2016. [52] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. [53] Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In Artificial Intelligence and Statistics, pages 448–455, 2009. [54] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. 12 [55] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568–576, 2014. [56] Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. arXiv preprint arXiv:1703.05175, 2017. [57] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. [58] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Computer Vision–ECCV 2016 Workshops, pages 443–450. Springer, 2016. [59] Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. arXiv preprint arXiv:1611.02200, 2016. [60] Kevin Tang, Vignesh Ramanathan, Li Fei-Fei, and Daphne Koller. Shifting weights: Adapting object detectors from image to video. In Advances in Neural Information Processing Systems, pages 638–646, 2012. [61] Tatiana Tommasi, Francesco Orabona, and Barbara Caputo. Safety in numbers: Learning categories from few examples with multi model knowledge transfer. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 3081–3088. IEEE, 2010. [62] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In Proceedings of the IEEE International Conference on Computer Vision, pages 4068–4076, 2015. [63] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In International Conference in Computer Vision (ICCV), 2015. [64] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Computer Vision and Pattern Recognition (CVPR), 2017. [65] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. [66] Aaron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, pages 4790–4798, 2016. [67] Laurens Van Der Maaten. Accelerating t-sne using tree-based algorithms. Journal of machine learning research, 15(1):3221–3245, 2014. [68] Laurens Van der Maaten and Geoffrey Hinton. Visualizing non-metric similarities in multiple maps. Machine learning, 87(1):33–55, 2012. [69] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pages 1096–1103. ACM, 2008. [70] Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pages 3630–3638, 2016. [71] Karl Weiss, Taghi M Khoshgoftaar, and DingDing Wang. A survey of transfer learning. Journal of Big Data, 3(1):1–40, 2016. [72] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European Conference on Computer Vision, pages 649–666. Springer, 2016. [73] Xu Zhang, Felix Xinnan Yu, Shih-Fu Chang, and Shengjin Wang. Deep transfer network: Unsupervised domain adaptation. arXiv preprint arXiv:1503.00591, 2015. 13 | 2017 | 445 |
6,947 | Improving Regret Bounds for Combinatorial Semi-Bandits with Probabilistically Triggered Arms and Its Applications Qinshi Wang Princeton University Princeton, NJ 08544 qinshiw@princeton.edu Wei Chen Microsoft Research Beijing, China weic@microsoft.com Abstract We study combinatorial multi-armed bandit with probabilistically triggered arms and semi-bandit feedback (CMAB-T). We resolve a serious issue in the prior CMAB-T studies where the regret bounds contain a possibly exponentially large factor of 1/p∗, where p∗is the minimum positive probability that an arm is triggered by any action. We address this issue by introducing a triggering probability modulated (TPM) bounded smoothness condition into the general CMAB-T framework, and show that many applications such as influence maximization bandit and combinatorial cascading bandit satisfy this TPM condition. As a result, we completely remove the factor of 1/p∗from the regret bounds, achieving significantly better regret bounds for influence maximization and cascading bandits than before. Finally, we provide lower bound results showing that the factor 1/p∗is unavoidable for general CMAB-T problems, suggesting that the TPM condition is crucial in removing this factor. 1 Introduction Stochastic multi-armed bandit (MAB) is a classical online learning framework modeled as a game between a player and the environment with m arms. In each round, the player selects one arm and the environment generates a reward of the arm from a distribution unknown to the player. The player observes the reward, and use it as the feedback to the player’s algorithm (or policy) to select arms in future rounds. The goal of the player is to cumulate as much reward as possible over time. MAB models the classical dilemma between exploration and exploitation: whether the player should keep exploring arms in search for a better arm, or should stick to the best arm observed so far to collect rewards. The standard performance measure of the player’s algorithm is the (expected) regret, which is the difference in expected cumulative reward between always playing the best arm in expectation and playing according to the player’s algorithm. In recent years, stochastic combinatorial multi-armed bandit (CMAB) receives many attention (e.g. [9, 7, 6, 10, 13, 15, 14, 16, 8]), because it has wide applications in wireless networking, online advertising and recommendation, viral marketing in social networks, etc. In the typical setting of CMAB, the player selects a combinatorial action to play in each round, which would trigger the play of a set of arms, and the outcomes of these triggered arms are observed as the feedback (called semi-bandit feedback). Besides the exploration and exploitation tradeoff, CMAB also needs to deal with the exponential explosion of the possible actions that makes exploring all actions infeasible. One class of the above CMAB problems involves probabilistically triggered arms [7, 14, 16], in which actions may trigger arms probabilistically. We denote it as CMAB-T in this paper. Chen et al. [7] provide such a general model and apply it to the influence maximization bandit, which models 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. stochastic influence diffusion in social networks and sequentially selecting seed sets to maximize the cumulative influence spread over time. Kveton et al. [14, 16] study cascading bandits, in which arms are probabilistically triggered following a sequential order selected by the player as the action. However, in both studies, the regret bounds contain an undesirable factor of 1/p∗, where p∗is the minimum positive probability that any arm can be triggered by any action,1 and this factor could be exponentially large for both influence maximization and cascading bandits. In this paper, we adapt the general CMAB framework of [7] in a systematic way to completely remove the factor of 1/p∗for a large class of CMAB-T problems including both influence maximization and combinatorial cascading bandits. The key observation is that for these problems, a harder-to-trigger arm has less impact to the expected reward and thus we do not need to observe it as often. We turn this key observation into a triggering probability modulated (TPM) bounded smoothness condition, adapted from the original bounded smoothness condition in [7]. We eliminates the 1/p∗factor in the regret bounds for all CMAB-T problems with the TPM condition, and show that influence maximization bandit and the conjunctive/disjunctive cascading bandits all satisfy the TPM condition. Moreover, for general CMAB-T without the TPM condition, we show a lower bound result that 1/p∗ is unavoidable, because the hard-to-trigger arms are crucial in determining the best arm and have to be observed enough times. Besides removing the exponential factor, our analysis is also tighter in other regret factors or constants comparing to the existing influence maximization bandit results [7, 25], combinatorial cascading bandit [16], and linear bandits without probabilistically triggered arms [15]. Both the regret analysis based on the TPM condition and the proof that influence maximization bandit satisfies the TPM condition are technically involved and nontrivial, but due to the space constraint, we have to move the complete proofs to the supplementary material. Instead we introduce the key techniques used in the main text. Related Work. Multi-armed bandit problem is originally formated by Robbins [20], and has been extensively studied in the literature [cf. 3, 21, 4]. Our study belongs to the stochastic bandit research, while there is another line of research on adversarial bandits [2], for which we refer to a survey like [4] for further information. For stochastic MABs, an important approach is Upper Confidence Bound (UCB) approach [1], on which most CMAB studies are based upon. As already mentioned in the introduction, stochastic CMAB has received many attention in recent years. Among the studies, we improve (a) the general framework with probabilistically triggered arms of [7], (b) the influence maximization bandit results in [7] and [25], (c) the combinatorial cascading bandit results in [16], and (d) the linear bandit results in [15]. We defer the technical comparison with these studies to Section 4.3. Other CMAB studies do not deal with probabilistically triggered arms. Among them, [9] is the first study on linear stochastic bandit, but its regret bound has since been improved by Chen et al. [7], Kveton et al. [15]. Combes et al. [8] improve the regret bound of [15] for linear bandits in a special case where arms are mutually independent. Most studies above are based on the UCB-style CUCB algorithm or its minor variant, and differ on the assumptions and regret analysis. Gopalan et al. [10] study Thompson sampling for complex actions, which is based on the Thompson sample approach [22] and can be applied to CMAB, but their regret bound has a large exponential constant term. Influence maximization is first formulated as a discrete optimization problem by Kempe et al. [12], and has been extensively studied since (cf. [5]). Variants of influence maximization bandit have also been studied [18, 23, 24]. Lei et al. [18] use a different objective of maximizing the expected size of the union of the influenced nodes over time. Vaswani et al. [23] discuss how to transfer node level feedback to the edge level feedback, and then apply the result of [7]. Vaswani et al. [24] replace the original maximization objective of influence spread with a heuristic surrogate function, avoiding the issue of probabilistically triggered arms. But their regret is defined against a weaker benchmark relaxed by the approximation ratio of the surrogate function, and thus their theoretical result is weaker than ours. 1The factor of 1/f ∗used for the combinatorial disjunctive cascading bandits in [16] is essentially 1/p∗. 2 2 General Framework In this section we present the general framework of combinatorial multi-armed bandit with probabilistically triggered arms originally proposed in [7] with a slight adaptation, and denote it as CMAB-T. We illustrate that the influence maximization bandit [7] and combinatorial cascading bandits [14, 16] are example instances of CMAB-T. CMAB-T is described as a learning game between a learning agent (or player) and the environment. The environment consists of m random variables X1, . . . , Xm called base arms (or arms) following a joint distribution D over [0, 1]m. Distribution D is picked by the environment from a class of distributions D before the game starts. The player knows D but not the actual distribution D. The learning process proceeds in discrete rounds. In round t ≥1, the player selects an action St from an action space S based on the feedback history from the previous rounds, and the environment draws from the joint distribution D an independent sample X(t) = (X(t) 1 , . . . , X(t) m ). When action St is played on the environment outcome X(t), a random subset of arms τt ⊆[m] are triggered, and the outcomes of X(t) i for all i ∈τt are observed as the feedback to the player. The player also obtains a nonnegative reward R(St, X(t), τt) fully determined by St, X(t), and τt. A learning algorithm aims at properly selecting actions St’s over time based on the past feedback to cumulate as much reward as possible. Different from [7], we allow the action space S to be infinite. In the supplementary material, we discuss an example of continuous influence maximization [26] that uses continuous and infinite action space while the number of base arms is still finite. We now describe the triggered set τt in more detail, which is not explicit in [7]. In general, τt may have additional randomness beyond the randomness of X(t). Let Dtrig(S, X) denote a distribution of the triggered subset of [m] for a given action S and an environment outcome X. We assume that τt is drawn independently from Dtrig(St, X(t)). We refer Dtrig as the probabilistic triggering function. To summarize, a CMAB-T problem instance is a tuple ([m], S, D, Dtrig, R), with elements already described above. These elements are known to the player, and hence establishing the problem input to the player. In contrast, the environment instance is the actual distribution D ∈D picked by the environment, and is unknown to the player. The problem instance and the environment instance together form the (learning) game instance, in which the learning process would unfold. In this paper, we fix the environment instance D, unless we need to refer to more than one environment instances. For each arm i, let µi = EX∼D[Xi]. Let vector µ = (µ1, . . . , µm) denote the expectation vector of arms. Note that vector µ is determined by D. Same as in [7], we assume that the expected reward E[R(S, X, τ)], where the expectation is taken over X ∼D and τ ∼Dtrig(S, X), is a function of action S and the expectation vector µ of the arms. Henceforth, we denote rS(µ) ≜E[R(S, X, τ)]. We remark that Chen et al. [6] relax the above assumption and consider the case where the entire distribution D, not just the mean of D, is needed to determine the expected reward. However, they need to assume that arm outcomes are mutually independent, and they do not consider probabilistically triggered arms. It might be interesting to incorporate probabilistically triggered arms into their setting, but this is out of the scope of the current paper. To allow algorithm to estimate µi directly from samples, we assume the outcome of an arm does not depend on whether itself is triggered, i.e. EX∼D,τ∼Dtrig(S,X)[Xi | i ∈τ] = EX∼D[Xi]. The performance of a learning algorithm A is measured by its (expected) regret, which is the difference in expected cumulative reward between always playing the best action and playing actions selected by algorithm A. Formally, let optµ = supS∈S rS(µ), where µ = EX∼D[X], and we assume that optµ is finite. Same as in [7], we assume that the learning algorithm has access to an offline (α, β)-approximation oracle O, which takes µ = (µ1, . . . , µm) as input and outputs an action SO such that Pr{rµ(SO) ≥α · optµ} ≥β, where α is the approximation ratio and β is the success probability. Under the (α, β)-approximation oracle, the benchmark cumulative reward should be the αβ fraction of the optimal reward, and thus we use the following (α, β)-approximation regret: Definition 1 ((α, β)-approximation Regret). The T-round (α, β)-approximation regret of a learning algorithm A (using an (α, β)-approximation oracle) for a CMAB-T game instance 3 ([m], S, D, Dtrig, R, D) with µ = EX∼D[X] is RegA µ,α,β(T) = T ·α·β ·optµ −E " T X i=1 R(SA t , X(t), τt) # = T ·α·β ·optµ −E " T X i=1 rSA t (µ) # , where SA t is the action A selects in round t, and the expectation is taken over the randomness of the environment outcomes X(1), . . . , X(T ), the triggered sets τ1, . . . , τT , as well as the possible randomness of algorithm A itself. We remark that because probabilistically triggered arms may strongly impact the determination of the best action, but they may be hard to trigger and observe, the regret could be worse and the regret analysis is in general harder than CMAB without probabilistically triggered arms. The above framework essentially follows [7], but we decouple actions from subsets of arms, allow action space to be infinite, and explicitly model triggered set distribution, which makes the framework more powerful in modeling certain applications (see supplementary material for more discussions). 2.1 Examples of CMAB-T: Influence Maximization and Cascading Bandits In social influence maximization [12], we are given a weighted directed graph G = (V, E, p), where V and E are sets of vertices and edges respectively, and each edge (u, v) is associated with a probability p(u, v). Starting from a seed set S ⊆V , influence propagates in G as follows: nodes in S are activated at time 0, and at time t ≥1, a node u activated in step t −1 has one chance to activate its inactive out-neighbor v with an independent probability p(u, v). The influence spread of seed set S, σ(S), is the expected number of activated nodes after the propagation ends. The offline problem of influence maximization is to find at most k seed nodes in G such that the influence spread is maximized. Kempe et al. [12] provide a greedy algorithm with approximation ratio 1 −1/e −ε and success probability 1 −1/|V |, for any ε > 0. For the online influence maximization bandit [7], the edge probabilities p(u, v)’s are unknown and need to be learned over time through repeated influence maximization tasks: in each round t, k seed nodes St are selected, the influence propagation from St is observed, the reward is the number of nodes activated in this round, and one wants to repeat this process to cumulate as much reward as possible. Putting it into the CMAB-T framework, the set of edges E is the set of arms [m], and their outcome distribution D is the joint distribution of m independent Bernoulli distributions with means p(u, v) for all (u, v) ∈E. Any seed set S ⊆V with at most k nodes is an action. The triggered arm set τt is the set of edges (u, v) reached by the propagation, that is, u can be reached from St by passing through only edges e ∈E with X(t) e = 1. In this case, the distribution Dtrig(St, X(t)) degenerates to a deterministic triggered set. The reward R(St, X(t), τt) equals to the number of nodes in V that is reached from S through only edges e ∈E with X(t) e = 1, and the expected reward is exactly the influence spread σ(St). The offline oracle is a (1−1/e−ε, 1/|V |)-approximation greedy algorithm. We remark that the general triggered set distribution Dtrig(St, X(t)) (together with infinite action space) can be used to model extended versions of influence maximization, such as randomly selected seed sets in general marketing actions [12] and continuous influence maximization [26] (see supplementary material). Now let us consider combinatorial cascading bandits [14, 16]. In this case, we have m independent Bernoulli random variables X1, . . . , Xm as base arms. An action is to select an ordered sequence from a subset of these arms satisfying certain constraint. Playing this action means that the player reveals the outcomes of the arms one by one following the sequence order until certain stopping condition is satisfied. The feedback is the outcomes of revealed arms and the reward is a function form of these arms. In particular, in the disjunctive form the player stops when the first 1 is revealed and she gains reward of 1, or she reaches the end and gains reward 0. In the conjunctive form, the player stops when the first 0 is revealed (and receives reward 0) or she reaches the end with all 1 outcomes (and receives reward 1). Cascading bandits can be used to model online recommendation and advertising (in the disjunctive form with outcome 1 as a click) or network routing reliability (in the conjunctive form with outcome 0 as the routing edge being broken). It is straightforward to see that cascading bandits fit into the CMAB-T framework: m variables are base arms, ordered sequences are actions, and the triggered set is the prefix set of arms until the stopping condition holds. 4 Algorithm 1 CUCB with computation oracle. Input: m, Oracle 1: For each arm i, Ti ←0 {maintain the total number of times arm i is played so far} 2: For each arm i, ˆµi ←1 {maintain the empirical mean of Xi} 3: for t = 1, 2, 3, . . . do 4: For each arm i ∈[m], ρi ← q 3 ln t 2Ti {the confidence radius, ρi = +∞if Ti = 0} 5: For each arm i ∈[m], ¯µi = min {ˆµi + ρi, 1} {the upper confidence bound} 6: S ←Oracle(¯µ1, . . . , ¯µm) 7: Play action S, which triggers a set τ ⊆[m] of base arms with feedback X(t) i ’s, i ∈τ 8: For every i ∈τ, update Ti and ˆµi: Ti = Ti + 1, ˆµi = ˆµi + (X(t) i −ˆµi)/Ti 9: end for 3 Triggering Probability Modulated Condition Chen et al. [7] use two conditions to guarantee the theoretical regret bounds. The first one is monotonicity, which we also use in this paper, and is restated below. Condition 1 (Monotonicity). We say that a CMAB-T problem instance satisfies monotonicity, if for any action S ∈S, for any two distributions D, D′ ∈D with expectation vectors µ = (µ1, . . . , µm) and µ′ = (µ′ 1, . . . , µ′ m), we have rS(µ) ≤rS(µ′) if µi ≤µ′ i for all i ∈[m]. The second condition is bounded smoothness. One key contribution of our paper is to properly strengthen the original bounded smoothness condition in [7] so that we can both get rid of the undesired 1/p∗term in the regret bound and guarantee that many CMAB problems still satisfy the conditions. Our important change is to use triggering probabilities to modulate the condition, and thus we call such conditions triggering probability modulated (TPM) conditions. The key point of TPM conditions is including the triggering probability in the condition. We use pD,S i to denote the probability that action S triggers arm i when the environment instance is D. With this definition, we can also technically define p∗as p∗= infi∈[m],S∈S,pD,S i >0 pD,S i . In this section, we further use 1-norm based conditions instead of the infinity-norm based condition in [7], since they lead to better regret bounds for the influence maximization and cascading bandits. Condition 2 (1-Norm TPM Bounded Smoothness). We say that a CMAB-T problem instance satisfies 1-norm TPM bounded smoothness, if there exists B ∈R+ (referred as the bounded smoothness constant) such that, for any two distributions D, D′ ∈D with expectation vectors µ and µ′, and any action S, we have |rS(µ) −rS(µ′)| ≤B P i∈[m] pD,S i |µi −µ′ i|. Note that the corresponding non-TPM version of the above condition would remove pD,S i in the above condition, which is a generalization of the linear condition used in linear bandits [15]. Thus, the TPM version is clearly stronger than the non-TPM version (when the bounded smoothness constants are the same). The intuition of incorporating the triggering probability pD,S i to modulate the 1-norm condition is that, when an arm i is unlikely triggered by action S (small pD,S i ), the importance of arm i also diminishes in that a large change in µi only causes a small change in the expected reward rS(µ). This property sounds natural in many applications, and it is important for bandit learning — although an arm i may be difficult to observe when playing S, it is also not important to the expected reward of S and thus does not need to be learned as accurately as others more easily triggered by S. 4 CUCB Algorithm and Regret Bound with TPM Bounded Smoothness We use the same CUCB algorithm as in [7] (Algorithm 1). The algorithm maintains the empirical estimate ˆµi for the true mean µi, and feed the upper confidence bound ¯µi to the offline oracle to obtain the next action S to play. The upper confidence bound ¯µi is large if arm i is not triggered often (Ti is small), providing optimistic estimates for less observed arms. We next provide its regret bound. 5 Definition 2 (Gap). Fix a distribution D and its expectation vector µ. For each action S, we define the gap ∆S = max(0, α · optµ −rS(µ)). For each arm i, we define ∆i min = inf S∈S:pD,S i >0,∆S>0 ∆S, ∆i max = sup S∈S:pD,S i >0,∆S>0 ∆S. As a convention, if there is no action S such that pD,S i > 0 and ∆S > 0, we define ∆i min = +∞, ∆i max = 0. We define ∆min = mini∈[m] ∆i min, and ∆max = maxi∈[m] ∆i max. Let ˜S = {i ∈[m] | pµ,S i > 0} be the set of arms that could be triggered by S. Let K = maxS∈S | ˜S|. For convenience, we use ⌈x⌉0 to denote max{⌈x⌉, 0} for any real number x. Theorem 1. For the CUCB algorithm on a CMAB-T problem instance that satisfies monotonicity (Condition 1) and 1-norm TPM bounded smoothness (Condition 2) with bounded smoothness constant B, (1) if ∆min > 0, we have distribution-dependent bound Regµ,α,β(T) ≤ X i∈[m] 576B2K ln T ∆i min + X i∈[m] log2 2BK ∆i min 0 + 2 · π2 6 · ∆max + 4Bm; (1) (2) we have distribution-independent bound Regµ,α,β(T) ≤12B √ mKT ln T + log2 T 18 ln T 0 + 2 · m · π2 6 · ∆max + 2Bm. (2) For the above theorem, we remark that the regret bounds are tight (up to a O(√log T) factor in the case of distribution-independent bound) base on a lower bound result in [15]. More specifically, Kveton et al. [15] show that for linear bandits (a special class of CMAB-T without probabilistic triggering), the distribution-dependent regret is lower bounded by Ω( (m−K)K ∆ log T), and the distribution-independent regret is lower bounded by Ω( √ mKT) when T ≥m/K, for some instance where ∆i min = ∆for all i ∈[m] and ∆i min < ∞. Comparing with our regret upper bound in the above theorem, (a) for distribution-dependent bound, we have the regret upper bound O( (m−K)K ∆ log T) since for that instance B = 1 and there are K arms with ∆i min = ∞, so tight with the lower bound in [15]; and (b) for distribution-independent bound, we have the regret upper bound O(√mKT log T), tight to the lower bound up to a O(√log T) factor, same as the upper bound for the linear bandits in [15]. This indicates that parameters m and K appeared in the above regret bounds are all needed. As for parameter B, we can view it simply as a scaling parameter. If we scale the reward of an instance to B times larger than before, certainly, the regret is B times larger. Looking at the distribution-dependent regret bound (Eq. (1)), ∆i min would also be scaled by a factor of B, canceling one B factor from B2, and ∆max is also scaled by a factor of B, and thus the regret bound in Eq. (1) is also scaled by a factor of B. In the distribution-independent regret bound (Eq. (2)), the scaling of B is more direct. Therefore, we can see that all parameters m, K, and B appearing in the above regret bounds are needed. Finally, we remark that the TPM Condition 2 can be refined such that B is replaced by arm-dependent Bi that is moved inside the summation, and B in Theorem 1 is replaced with Bi accordingly. See the supplementary material for details. 4.1 Novel Ideas in the Regret Analysis Due to the space limit, the full proof of Theorem 1 is moved to the supplementary material. Here we briefly explain the novel aspects of our analysis that allow us to achieve new regret bounds and differentiate us from previous analyses such as the ones in [7] and [16, 15]. We first give an intuitive explanation on how to incorporate the TPM bounded smoothness condition to remove the factor 1/p∗in the regret bound. Consider a simple illustrative example of two actions S0 and S, where S0 has a fixed reward r0 as a reference action, and S has a stochastic reward depending on the outcomes of its triggered base arms. Let ˜S be the set of arms that can be triggered by S. For i ∈˜S, suppose i can be triggered by action S with probability pS i , and its true mean is µi and its empirical mean at the end of round t is ˆµi,t. The analysis in [7] would need a property that, if for all i ∈˜S |ˆµi,t −µi| ≤δi for some properly defined δi, then S no longer generates regrets. The analysis would conclude that arm i needs to be triggered Θ(log T/δ2 i ) times for the above condition 6 to happen. Since arm i is only triggered with probability pS i , it means action S may need to be played Θ(log T/(pS i δ2 i )) times. This is the essential reason why the factor 1/p∗appears in the regret bound. Now with the TPM bounded smoothness, we know that the impact of |ˆµi,t −µi| ≤δi to the difference in the expected reward is only pS i δi, or equivalently, we could relax the requirement to |ˆµi,t −µi| ≤δi/pS i to achieve the same effect as in the previous analysis. This translates to the result that action S would generate regret in at most O(log T/(pS i (δi/pS i )2)) = O(pS i log T/δ2 i ) rounds. We then need to handle the case when we have multiple actions that could trigger arm i. The simple addition of P S:pS i >0 pS i log T/δ2 i is not feasible since we may have exponentially or even infinitely many such actions. Instead, we introduce the key idea of triggering probability groups, such that the above actions are divided into groups by putting their triggering probabilities pS i into geometrically separated bins: (1/2, 1], (1/4, 1/2] . . . , (2−j, 2−j+1], . . . The actions in the same group would generate regret in at most O(2−j+1 log T/δ2 i ) rounds with a similar argument, and summing up together, they could generate regret in at most O(P j 2−j+1 log T/δ2 i ) = O(log T/δ2 i ) rounds. Therefore, the factor of 1/pS i or 1/p∗is completely removed from the regret bound. Next, we briefly explain our idea to achieve the improved bound over the linear bandit result in [15]. The key step is to bound regret ∆St generated in round t. By a derivation similar to [15, 7] together with the 1-norm TPM bounded smoothness condition, we would obtain that ∆St ≤ B P i∈˜ St pD,St i (¯µi,t −µi) with high probability. The analysis in [15] would analyze the errors |¯µi,t −µi| by a cascade of infinitely many sub-cases of whether there are xj arms with errors larger than yj with decreasing yj, but it may still be loose. Instead we directly work on the above summation. Naive bounding the about error summation would not give a O(log T) bound because there could be too many arms with small errors. Our trick is to use a reverse amortization: we cumulate small errors on many sufficiently sampled arms and treat them as errors of insufficiently sample arms, such that an arm sampled O(log T) times would not contribute toward the regret. This trick tightens our analysis and leads to significantly improved constant factors. 4.2 Applications to Influence Maximization and Combinatorial Cascading Bandits The following two lemmas show that both the cascading bandits and the influence maximization bandit satisfy the TPM condition. Lemma 1. For both disjunctive and conjunctive cascading bandit problem instances, 1-norm TPM bounded smoothness (Condition 2) holds with bounded smoothness constant B = 1. Lemma 2. For the influence maximization bandit problem instances, 1-norm TPM bounded smoothness (Condition 2) holds with bounded smoothness constant B = ˜C, where ˜C is the largest number of nodes any node can reach in the directed graph G = (V, E). The proof of Lemma 1 involves a technique called bottom-up modification. Each action in cascading bandits can be viewed as a chain from top to bottom. When changing the means of arms below, the triggering probability of arms above is not changed. Thus, if we change µ to µ′ backwards, the triggering probability of each arm is unaffected before its expectation is changed, and when changing the mean of an arm i, the expected reward of the action is at most changed by pD,S i |µ′ i −µi|. The proof of Lemma 2 is more complex, since the bottom-up modification does not work directly on graphs with cycles. To circumvent this problem, we develop an influence tree decomposition technique as follows. First, we order all influence paths from the seed set S to a target v. Second, each edge is independently sampled based on its edge probability to form a random live-edge graph. Third, we divide the reward portion of activating v among all paths from S to v: for each live-edge graph L in which v is reachable from S, assign the probability of L to the first path from S to v in L according to the path total order. Finally, we compose all the paths from S to v into a tree with S as the root and copies of v as the leaves, so that we can do bottom-up modification on this tree and properly trace the reward changes based on the reward division we made among the paths. 4.3 Discussions and Comparisons We now discuss the implications of Theorem 1 together with Lemmas 1 and 2 by comparing them with several existing results. 7 Comparison with [7] and CMAB with ∞-norm bounded smoothness conditions. Our work is a direct adaption of the study in [7]. Comparing with [7], we see that the regret bounds in Theorem 1 are not dependent on the inverse of triggering probabilities, which is the main issue in [7]. When applied to influence maximization bandit, our result is strictly stronger than that of [7] in two aspects: (a) we remove the factor of 1/p∗by using the TPM condition; (b) we reduce a factor of |E| and p |E| in the dominant terms of distribution-dependent and -independent bounds, respectively, due to our use of 1-norm instead of ∞-norm conditions used in Chen et al. [7]. In the supplementary material, we further provide the corresponding ∞-norm TPM bounded smoothness conditions and the regret bound results, since in general the two sets of results do not imply each other. Comparison with [25] on influence maximization bandits. Conceptually, our work deals with the general CMAB-T framework with influence maximization and combinatorial cascading bandits as applications, while Wen et al. [25] only work on influence maximization bandit. Wen et al. [25] further study a generalization of linear transformation of edge probabilities, which is orthogonal to our current study, and could be potentially incorporated into the general CMAB-T framework. Technically, both studies eliminate the exponential factor 1/p∗in the regret bound. Comparing the rest terms in the regret bounds, our regret bound depends on a topology dependent term ˜C (Lemma 2), while their bound depends on a complicated term C∗, which is related to both topology and edge probabilities. Although in general it is hard to compare the regret bounds, for the several graph families for which Wen et al. [25] provide concrete topology-dependent regret bounds, our bounds are always better by a factor from O( √ k) to O(|V |), where k is the number of seeds selected in each round and V is the node set in the graph. This indicates that, in terms of characterizing the topology effect on the regret bound, our simple complexity term ˜C is more effective than their complicated term C∗. See the supplementary material for the detailed table of comparison. Comparison with [16] on combinatorial cascading bandits By Lemma 1, we can apply Theorem 1 to combinatorial conjunctive and disjunctive cascading bandits with bounded smoothness constant B = 1, achieving O(P 1 ∆i min K log T) distribution-dependent, and O(√mKT log T) distribution-independent regret. In contrast, besides having exactly these terms, the results in [16] have an extra factor of 1/f ∗, where f ∗= Q i∈S∗p(i) for conjunctive cascades, and f ∗= Q i∈S∗(1−p(i)) for disjunctive cascades, with S∗being the optimal solution and p(i) being the probability of success for item (arm) i. For conjunctive cascades, f ∗could be reasonably close to 1 in practice as argued in [16], but for disjunctive cascades, f ∗could be exponentially small since items in optimal solutions typically have large p(i) values. Therefore, our result completely removes the dependency on 1/f ∗ and is better than their result. Moreover, we also have much smaller constant factors owing to the new reverse amortization method described in Section 4.1. Comparison with [15] on linear bandits. When there is no probabilistically triggered arms (i.e. p∗= 1), Theorem 1 would have tighter bounds since some analysis dealing with probabilistic triggering is not needed. In particular, in Eq. (1) the leading constant 624 would be reduced to 48, the ⌈log2 x⌉0 term is gone, and 6Bm becomes 2Bm; in Eq. (2) the leading constant 50 is reduced to 14, and the other changes are the same as above (see the supplementary material). The result itself is also a new contribution, since it generalizes the linear bandit of [15] to general 1-norm conditions with matching regret bounds, while significantly reducing the leading constants (their constants are 534 and 47 for distribution-dependent and independent bounds, respectively). This improvement comes from the new reversed amortization method described in Section 4.1. 5 Lower Bound of the General CMAB-T Model In this section, we show that there exists some CMAB-T problem instance such that the regret bound in [7] is tight, i.e. the factor 1/p∗in the distribution-dependent bound and p 1/p∗in the distribution-independent bound are unavoidable, where p∗is the minimum positive probability that any base arm i is triggered by any action S. It also implies that the TPM bounded smoothness may not be applied to all CMAB-T instances. For our purpose, we only need a simplified version of the bounded smoothness condition of [7] as below: There exists a bounded smoothness constant B such that, for every action S and every pair of mean outcome vectors µ and µ′, we have |rS(µ) −rS(µ′)| ≤B maxi∈˜S |µi −µ′ i|, where ˜S is the set of arms that could possibly be triggered by S. 8 We prove the lower bounds using the following CMAB-T problem instance ([m], S, D, Dtrig, R). For each base arm i ∈[m], we define an action Si, with the set of actions S = {S1, . . . , Sm}. The family of distributions D consists of distributions generated by every µ ∈[0, 1]m such that the arms are independent Bernoulli variables. When playing action Si in round t, with a fixed probability p, arm i is triggered and its outcome X(t) i is observed, and the reward of playing Si is p−1X(t) i ; otherwise with probability 1 −p no arm is triggered, no feedback is observed and the reward is 0. Following the CMAB-T framework, this means that Dtrig(Si, X), as a distribution on the subsets of [m], is either {i} with probability p or ∅with probability 1−p, and the reward R(Si, X, τ) = p−1Xi ·I{τ = {i}}. The expected reward rSi(µ) = µi. So this instance satisfies the above bounded smoothness with constant B = 1. We denote the above instance as FTP(p), standing for fixed triggering probability instance. This instance is similar with position-based model [17] with only one position, while the feedback is different. For the FTP(p) instance, we have p∗= p and rSi(µ) = p · p−1µi = µi. Then applying the result in [7], we have distributed-dependent upper bound O(P i 1 p∆i min log T) and distribution-independent upper bound O( p p−1mT log T). We first provide the distribution-independent lower bound result. Theorem 2. Let p be a real number with 0 < p < 1. Then for any CMAB-T algorithm A, if T ≥6p−1, there exists a CMAB-T environment instance D with mean µ such that on instance FTP(p), RegA µ(T) ≥ 1 170 s mT p . The proof of the above and the next theorem are all based on the results for the classical MAB problems. Comparing to the upper bound O( p p−1mT log T). obtained from [7], Theorem 2 implies that the regret upper bound of CUCB in [7] is tight up to a O(√log T) factor. This means that the 1/p∗factor in the regret bound of [7] cannot be avoided in the general class of CMAB-T problems. Next we give the distribution-dependent lower bound. For a learning algorithm, we say that it is consistent if, for every µ, every non-optimal arm is played o(T a) times in expectation, for any real number a > 0. Then we have the following distribution-dependent lower bound. Theorem 3. For any consistent algorithm A running on instance FTP(p) and µi < 1 for every arm i, we have lim inf T →+∞ RegA µ(T) ln T ≥ X i:µi<µ∗ p−1∆i kl(µi, µ∗), where µ∗= maxi µi, ∆i = µ∗−µi, and kl(·, ·) is the Kullback-Leibler divergence function. Again we see that the distribution-dependent upper bound obtained from [7] asymptotically match the lower bound above. Finally, we remark that even if we rescale the reward from [1, 1/p] back to [0, 1], the corresponding scaling factor B would become p, and thus we would still obtain the conclusion that the regret bounds in [7] is tight (up to a O(√log T) factor), and thus 1/p∗is in general needed in those bounds. 6 Conclusion and Future Work In this paper, we propose the TPM bounded smoothness condition, which conveys the intuition that an arm difficult to trigger is also less important in determining the optimal solution. We show that this condition is essential to guarantee low regret, and prove that important applications, such as influence maximization bandits and combinatorial cascading bandits all satisfy this condition. There are several directions one may further pursue. One is to improve the regret bound for some specific problems. For example, for the influence maximization bandit, can we give a better algorithm or analysis to achieve a better regret bound than the one provided by the general TPM condition? Another direction is to look into other applications with probabilistically triggered arms that may not satisfy the TPM condition or need other conditions to guarantee low regret. Combining the current CMAB-T framework with the linear generalization as in [25] to achieve scalable learning result is also an interesting direction. 9 Acknowledgment Wei Chen is partially supported by the National Natural Science Foundation of China (Grant No. 61433014). References [1] Peter Auer, Nicolò Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2-3):235–256, 2002. [2] Peter Auer, Nicolò Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM J. Comput., 32(1):48–77, 2002. [3] Donald A. Berry and Bert Fristedt. Bandit problems: Sequential Allocation of Experiments. Chapman and Hall, 1985. [4] Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends R⃝in Machine Learning, 5(1):1–122, 2012. [5] Wei Chen, Laks V. S. Lakshmanan, and Carlos Castillo. Information and Influence Propagation in Social Networks. Morgan & Claypool Publishers, 2013. [6] Wei Chen, Wei Hu, Fu Li, Jian Li, Yu Liu, and Pinyan Lu. Combinatorial multi-armed bandit with general reward functions. In NIPS, 2016. [7] 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. A preliminary version appeared as Chen, Wang, and Yuan, “combinatorial multi-armed bandit: General framework, results and applications”, ICML’2013. [8] Richard Combes, M. Sadegh Talebi, Alexandre Proutiere, and Marc Lelarge. Combinatorial bandits revisited. In NIPS, 2015. [9] Yi Gai, Bhaskar Krishnamachari, and Rahul Jain. Combinatorial network optimization with unknown variables: Multi-armed bandits with linear rewards and individual observations. IEEE/ACM Transactions on Networking, 20, 2012. [10] Aditya Gopalan, Shie Mannor, and Yishay Mansour. Thompson sampling for complex online problems. In Proceedings of the 31st International Conference on Machine Learning (ICML), 2014. [11] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301):13–30, 1963. [12] David Kempe, Jon M. Kleinberg, and Éva Tardos. Maximizing the spread of influence through a social network. In Proceedings of the 9th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 137–146, 2003. [13] Branislav Kveton, Zheng Wen, Azin Ashkan, Hoda Eydgahi, and Brian Eriksson. Matroid bandits: Fast combinatorial optimization with learning. In Proceedings of the 30th Conference on Uncertainty in Artificial Intelligence (UAI), 2014. [14] Branislav Kveton, Csaba Szepesvári, Zheng Wen, and Azin Ashkan. Cascading bandits: learning to rank in the cascade model. In Proceedings of the 32th International Conference on Machine Learning, 2015. [15] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvári. Tight regret bounds for stochastic combinatorial semi-bandits. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics, 2015. [16] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvari. Combinatorial cascading bandits. Advances in Neural Information Processing Systems, 2015. [17] Paul Lagrée, Claire Vernade, and Olivier Cappé. Multiple-play bandits in the position-based model. In Advances in Neural Information Processing Systems, pages 1597–1605, 2016. [18] Siyu Lei, Silviu Maniu, Luyi Mo, Reynold Cheng, and Pierre Senellart. Online influence maximization. In KDD, 2015. [19] Michael Mitzenmacher and Eli Upfal. Probability and Computing. Cambridge University Press, 2005. 10 [20] Herbert Robbins. Some aspects of the sequential design of experiments. Bulletin American Mathematical Society, 55:527–535, 1952. [21] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. [22] William R Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4):285–294, 1933. [23] Sharan Vaswani, Laks V. S. Lakshmanan, and Mark Schmidt. Influence maximization with bandits. In NIPS Workshop on Networks in the Social and Information Sciences, 2015. [24] Sharan Vaswani, Branislav Kveton, Zheng Wen, Mohammad Ghavamzadeh, Laks V.S. Lakshmanan, and Mark Schmidt. Diffusion independent semi-bandit influence maximization. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017. to appear. [25] Zheng Wen, Branislav Kveton, and Michal Valko. Influence maximization with semi-bandit feedback. CoRR, abs/1605.06593v1, 2016. [26] Yu Yang, Xiangbo Mao, Jian Pei, and Xiaofei He. Continuous influence maximization: What discounts should we offer to social network users? In Proceedings of the 2016 International Conference on Management of Data (SIGMOD), 2016. 11 | 2017 | 446 |
6,948 | Matching neural paths: transfer from recognition to correspondence search Nikolay Savinov1 Lubor Ladicky1 Marc Pollefeys1,2 1Department of Computer Science at ETH Zurich, 2Microsoft {nikolay.savinov,lubor.ladicky,marc.pollefeys}@inf.ethz.ch Abstract Many machine learning tasks require finding per-part correspondences between objects. In this work we focus on low-level correspondences — a highly ambiguous matching problem. We propose to use a hierarchical semantic representation of the objects, coming from a convolutional neural network, to solve this ambiguity. Training it for low-level correspondence prediction directly might not be an option in some domains where the ground-truth correspondences are hard to obtain. We show how transfer from recognition can be used to avoid such training. Our idea is to mark parts as “matching” if their features are close to each other at all the levels of convolutional feature hierarchy (neural paths). Although the overall number of such paths is exponential in the number of layers, we propose a polynomial algorithm for aggregating all of them in a single backward pass. The empirical validation is done on the task of stereo correspondence and demonstrates that we achieve competitive results among the methods which do not use labeled target domain data. 1 Introduction Finding per-part correspondences between objects is a long-standing problem in machine learning. The level at which correspondences are established can go as low as pixels for images or millisecond timestamps for sound signals. Typically, it is highly ambiguous to match at such a low level: a pixel or a timestamp just does not contain enough information to be discriminative and many false positives will follow. A hierarchical semantic representation could help to solve the ambiguity: we could choose the low-level match which also matches at the higher levels. For example, a car contains a wheel which contains a bolt. If we want to check if this bolt matches the bolt in another view of the car, we should check if the wheel and the car match as well. One possible hierarchical semantic representation could be computed by a convolutional neural network. The features in such a network are composed in a hierarchical manner: the lower-level features are used to compute higher-level features by applying convolutions, max-poolings and non-linear activation functions on them. Nevertheless, training such a convolutional neural network for correspondence prediction directly (e.g., [25], [2]) might not be an option in some domains where the ground-truth correspondences are hard and expensive to obtain. This raises the question of scalability of such approaches and motivates the search for methods which do not require training correspondence data. To address the training data problem, we could transfer the knowledge from the source domain where the labels are present to the target domain where no labels or few labeled data are present. The most common form of transfer is from classification tasks. Its promise is two-fold. First, classification labels are one of the easiest to obtain as it is a natural task for humans. This allows to create huge recognition datasets like Imagenet [18]. Second, the features from the low to mid-levels have been shown to transfer well to a variety of tasks [22], [3], [15]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Although there has been a huge progress in transfer from classification to detection [7], [17], [19], [16], segmentation [12], [1] and other semantic reasoning tasks like single-image depth prediction [4], the transfer to correspondence search has been limited [13], [10], [8]. We propose a general solution to unsupervised transfer from recognition to correspondence search at the lowest level (pixels, sound millisecond timestamps). Our approach is to match paths of activations coming from a convolutional neural network, applied on two objects to be matched. More precisely, to establish matching on the lowest level, we require the features to match at all different levels of convolutional feature hierarchy. Those different-level features form paths. One such path would consist of neural activations reachable from the lowest-level feature to the highest-level feature in the network topology (in other words, the lowest level feature lies in the receptive field of the highest level). Since every lowest-level feature belongs to many paths, we do voting based on all of them. Although the overall number of such paths is exponential in the number of layers and thus infeasible to compute naively, we prove that the voting is possible in polynomial time in a single backward pass through the network. The algorithm is based on dynamic programming and is similar to the backward pass for gradient computation in the neural network. Empirical validation is done on the task of stereo correspondence on two datasets: KITTI 2012 [6] and KITTI 2015 [14]. We quantitatively show that our method is competitive among the methods which do not require labeled target domain data. We also qualitatively show that even dramatic changes in low-level structure can be handled reasonably by our method due to the robustness of the recognition hierarchy: we apply different style transfers [5] to corresponding images in KITTI 2015 and still successfully find correspondences. 2 Notation Our method is generally applicable to the cases where the input data has a multi-dimensional grid topology layout. We will assume input objects o to be from the set of B-dimensional grids Φ ⊂RB and run convolutional neural networks on those grids. The per-layer activations from those networks will be contained in the set of (B + 1)-dimensional grids Ψ ⊂RB+1. Both the input data and the activations will be indexed by a (B + 1)-dimensional vector x = (x, y, . . . , c) ∈NB+1, where x is a column index, y is a row index, etc., and c ∈{1, . . . , C} is the channel index (we will assume C = 1 for the input data, which is a non-restrictive assumption as we will explain later). We will search for correspondences between those grids, thus our goal will be to estimate shifts d ∈D ⊂ZB+1 for all elements in the grid. The choice of the shift set D is task-dependent. For example, for sound B = 1 and only 1D shifts can be considered. For images, B = 2 and D could be a set of 1D shifts (usually called a stereo task) or a set of 2D shifts (usually called an optical flow task). In this work, we will be dealing with convolutional neural network architectures, consisting of convolutions, max-poolings and non-linear activation functions (one example of such an architecture is a VGG-net [20], if we omit softmax which we will not use for the transfer). We assume every convolutional layer to be followed by a non-linear activation function throughout the paper and will not specify those functions explicitly. The computational graph of these architectures is a directed acyclic graph G = {A, E}, where A = {a1, . . . , a|A|} is a set of nodes, corresponding to neuron activations (|A| denotes the size of this set), and E = {e1, . . . , e|E|} is a set of arcs, corresponding to computational dependencies (|E| denotes the size of this set). Each arc is represented as a tuple (ai, aj), where ai is the input (origin), aj is the output (endpoint). The node set consists of disjoint layers A = SL ℓ=0 Aℓ. The arcs are only allowed to go from the previous layer to the next one. We will use the notation Aℓ(x) for the node in ℓ-th layer at position x; in(xℓ) for the set of origins xℓ−1 of arcs, entering layer ℓat position xℓof the reference object; xℓ+1 ∈out(xℓ) for the set of endpoints of arcs, exiting layer ℓat position xℓof the reference object. Let fℓ∈F = {maxpool, conv} be the mathematic operator which corresponds to forward computation in layer ℓas a ←fℓ(in(a)), a ∈Aℓ(with a slight abuse of notation, we use a for both the nodes in the computational graph and the activation values which are computed in those nodes). 2 Input Convolution Max-pooling Convolution Max-pooling k1(d) = 3 k1(d) = 3 k1(d) = 2 k0(d) = 3 k0(d) = 3 k0(d) = 2 k2(d) = 1 k2(d) = 1 k2(d) = 1 k3(d) = 1 k3(d) = 1 k3(d) = 1 k4(d) = 0 k4(d) = 0 k4(d) = 0 Reference G Searched G′ Shifts Figure 1: Four siamese paths are shown. Two of them (red) have the same origin and support the hypothesis of the shift d = 3 for this origin. The other two (green and pink) have different origins and support hypotheses d = 3 and d = 2 for their respective origins. 3 Correspondence via path matching We will consider two objects, reference o ∈Φ and searched o′ ∈Φ, for which we want to find correspondences. After applying a CNN on them, we get graphs G and G′ of activations. The goal is to establish correspondences between the input-data layers A0 and A′ 0. That is, every cell A0(x) in the reference object o ∈Φ has a certain shift d ∈D in the searched object o′ ∈Φ, and we want to estimate d. Here comes the cornerstone idea of our method: we establish the matching of A0(x) with A′ 0(x −d) for a shift d if there is a pair of “parallel” paths (we call this pair a siamese path), originating at those nodes and ending at the last layers AL, A′ L, which match. This pair of paths must have the same spatial shift with respect to each other at all layers, up to subsampling, and go through the same feature channels with respect to each other. We take the subsampling into account by per-layer functions kℓ(d) = γℓ(kℓ−1(d)), ℓ= 1, . . . , L, γℓ(˜d) = $ ˜d qℓ % , k0(d) = d, (1) where kℓ(d) is how the zero-layer shift d transforms at layer ℓ, qℓis the ℓ-th layer spatial subsampling factor (note that rounding and division on vectors is done element-wise). Then a siamese path P can be represented as P = (p, p′), p = (A0(xP 0 ), . . . , AL(xP L)), p′ = (A′ 0(xP 0 −k0(d)), . . . , A′ L(xP L −kL(d))) (2) where xP 0 = x and xP ℓdenotes the position at which the path P intersects layer ℓof the reference activation graph. Such paths are illustrated in Fig. 1. The logic is simple: matching in a siamese path means that the recognition hierarchy detects the same features at different perception levels with the same shifts (up to subsampling) with respect to the currently estimated position x, which allows for a confident prediction of match. The fact that a siamese path is “matched” can be established by computing the matching function (high if it matches, low if not) M(P) = L K ℓ=0 mℓ(Aℓ(xP ℓ), A′ ℓ(xP ℓ−kℓ(d))) (3) where mℓ(·, ·) is a matching function for individual neurons (prefers them both to be similar and non-zero at the same time) and ⊙is a logical-and-like operator. Both will be discussed later. Since we want to estimate the shift for a node A0(x), we will consider all possible shifts and vote for each of them. Let us denote a set of siamese paths, starting at Aℓ(x) and A′ ℓ(x −d) and ending at the last layer, as Pℓ(x, d). For every shift d ∈D we introduce U(x, d) as the log-likelihood of the event that d is the correct shift, i.e. A0(x) matches A′ 0(x −d). To collect the evidence from all possible paths, we “sum up” 3 the matching functions for all individual paths, leading to U(x, d) = M P ∈P0(x,d) M(P) = M P ∈P0(x,d) L K ℓ=0 mℓ(Aℓ(xP ℓ), A′ ℓ(xP ℓ−kℓ(d))) (4) where the sum-like operator ⊕will be discussed later. The distribution U(x, d) can be used to either obtain the solution as d∗(x) = arg maxd∈D U(x, d) or to post-process the distribution with any kind of spatial smoothing optimization and then again take the best-cost solution. The obvious obstacle to using the distribution U(x, d) is that Observation 1. If K is the minimal number of activation channels in all the layers of the network and L is the number of layers, the number of paths, considered in the computation of U(x, d) for a single originating node, is Ω(KL) — at least exponential in the number of layers. In practice, it is infeasible to compute U(x, d) naively. In this work, we prove that it is possible to compute U(x, d) in O(|A| + |E|) — thus linear in the number of layers — using the algorithm which will be introduced in the next section. 4 Linear-time backward algorithm Theorem 1. For any mℓ(·, ·) and any pair of operators ⟨⊕, ⊙⟩such that ⊙is left-distributive over ⊕, i.e. a ⊙(b ⊕c) = a ⊙b ⊕a ⊙c, we can compute U(x, d) for all x and d in O(|A| + |E|). Proof Since there is distributivity, we can use a dynamic programming approach similar to the one developed for gradient backpropagation. First, let us introduce subsampling functions kℓ s(d) = γs(kℓ s−1(d)), kℓ ℓ(d) = d, s ≥ℓ. Note that k0 s = ks as introduced in Eq. 1. Then, let us introduce auxiliary variables Uℓ(xℓ, d) for each layer ℓ= 0, . . . , L, which have the same definition as U(x, d) except for the fact that the paths, considered in them, start from the later layer ℓ: Uℓ(xℓ, d) = M P ∈Pℓ(xℓ,d) M(P) = M P ∈Pℓ(xℓ,d) L K s=ℓ ms(As(xP s ), A′ s(xP s −kℓ s(d))). (5) Note that U(x, d) = U0(x, d). The idea is to iteratively recompute Uℓ(xℓ, d) based on known Uℓ+1(xℓ+1, γℓ(d)) for all xℓ+1. Eventually, we will get to the desired U0(x, d). The first step is to notice that all the paths share the same prefix and write it out explicitly: Uℓ(xℓ, d) = M P ∈Pℓ(xℓ,d) L K s=ℓ ms(As(xP s ), A′ s(xP s −kℓ s(d))) = M P ∈Pℓ(xℓ,d) mℓ(Aℓ(xℓ), A′ ℓ(xℓ−d)) ⊙ " L K s=ℓ+1 ms(As(xP s ), A′ s(xP s −kℓ s(d))) # . (6) Now, we want to pull the prefix mℓ(Aℓ(xℓ), A′ ℓ(xℓ−d)) out of the “sum”. For that purpose, we will need the set of endpoints out(xℓ), introduced in the notation in Section 2. The “sum” can be re-written in terms of those endpoints as Uℓ(xℓ, d) = M xℓ+1∈out(xℓ) P ∈Pℓ+1(xℓ+1,γℓ+1(d)) mℓ(Aℓ(xℓ), A′ ℓ(xℓ−d)) ⊙ " L K s=ℓ+1 ms(As(xP s ), A′ s(xP s −kℓ s(d))) # . (7) 4 Algorithm 1 Backward pass 1: procedure BACKWARD(G, G′) 2: for AL(xL) ∈AL do 3: for d ∈kL(D) do 4: UL(xL, d) ←mL(AL(xL), A′ L(xL −d)), ▷Initialize the last layer. 5: end for 6: end for 7: for ℓ= L-1, ..., 0 do 8: for Aℓ(xℓ) ∈Aℓdo 9: for d ∈kℓ(D) do 10: S ←0, 11: for xℓ+1 ∈out(xℓ) do 12: S ←S ⊕Uℓ+1(xℓ+1, γℓ+1(d)), 13: end for 14: Uℓ(xℓ, d) ←mℓ(Aℓ(xℓ), A′ ℓ(xℓ−d)) ⊙S, 15: end for 16: end for 17: end for 18: return U0 ▷Return the distribution for the first layer. 19: end procedure The last step is to use the left-distributivity of ⊙over ⊕to pull the prefix out of the “sum”: Uℓ(xℓ, d) = mℓ(Aℓ(xℓ), A′ ℓ(xℓ−d)) ⊙ M xℓ+1∈out(xℓ) P ∈Pℓ+1(xℓ+1,γℓ+1(d)) L K s=ℓ+1 ms(As(xP s ), A′ s(xP s −kℓ s(d))) = mℓ(Aℓ(xℓ), A′ ℓ(xℓ−d)) ⊙ M xℓ+1∈out(xℓ) Uℓ+1(xℓ+1, γℓ+1(d)). (8) The detailed procedure is listed in Algorithm 1. We use the notation kℓ(D) for the set of subsampled shifts which is the result of applying function kℓto every element of the set of initial shifts D. 5 Choice of neuron matching function m and operators ⊕, ⊙ For the convolutional layers, we use the matching function mconv(w, v) = ( 0 if w = 0, v = 0, min(w,v) max(w,v) otherwise. (9) For the max-pooling layers, the computational graph can be truncated to just one active connection (as only one element influences higher-level features). Moreover, max-pooling does not create any additional features, only passes/subsamples the existing ones. Thus it does not make sense to take into account the pre-activations for those layers as they are the same as activations (up to subsampling). For these reasons, we use mmaxpool(w, v) = δ(w = arg max Nw) ∧δ(v = arg max Nv), (10) where Nw is the neighborhood of max-pooling covering node w, δ(·) is the indicator function (1 if the condition holds, 0 otherwise). In this paper, we use sum as ⊕and product as ⊙. Another possible choice would be max for ⊕ and min or product for ⊙— theoretically, those combinations satisfy the conditions in Theorem 1. Nevertheless, we found sum/product combination working better than others. This could be explained by the fact that max as ⊕would be taken over a huge set of paths which is not robust in practice. 6 Experiments We validate our approach in the field of computer vision as our method requires a convolutional neural network trained on a large recognition dataset. Out of the vision correspondence tasks, we 5 Table 1: Summary of the convolutional neural network VGG-16. We only show the part up to the 8-th layer as we do not use higher activations (they are not pixel-related enough). In the layer type row, c stands for 3x3 convolution with stride 1 followed by the ReLU non-linear activation function [11] and p for 2x2 max-pooling with stride 2. The input to convolution is padded with the “same as boundary” rule. Layer index 1 2 3 4 5 6 7 8 Layer type c c p c c p c c Output channels 64 64 64 128 128 128 256 256 chose stereo matching to validate our method. For this task, the input data dimensionality is B = 2 and the shift set is represented by horizontal shifts D = {(0, 0, 0), . . . , (Dmax, 0, 0)}. We always convert images to grayscale before running CNNs, following the observation by [25] that color does not help. For pre-trained recognition CNN, we chose the VGG-16 network [20]. This network is summarized in Table 1. We will further refer to layer indexes from this table. It is important to mention that we have not used the whole range of layers in our experiments. In particular, we usually started from layer 2 and finished at layer 8. As such, it is still necessary to consider multi-channel input. To extend our algorithm to this case, we create a virtual input layer with C = 1 and virtual per-pixel arcs to all the real input channels. While starting from a later layer is an empirical observation which improves the results for our method, the advantage of finishing at an earlier layer was discovered by other researchers as well [5] (starting from some layer, the network activations stop being related to individual pixels). We will thus abbreviate our methods as “ours(s, t)” where “s” is the starting layer and “t” is the last layer. 6.1 Experimental setup For the stereo matching, we chose the largest available datasets KITTI 2012 and KITTI 2015. All image pairs in these datasets are rectified, so correspondences can be searched in the same row. For each training pair, the ground-truth shift is measured densely per-pixel. This ground truth was obtained by projecting the point cloud from LIDAR on the reference image. The quality measure is the percentage Errt of pixels whose predicted shift error is bigger than a threshold of t pixels. We considered a range of thresholds t = 1, . . . , 5, while the main benchmark measure is Err3. This measure is only computed for the pixels which are visible in both images from the stereo pair. For comparison with the baselines, we used the setup proposed in [25] — the seminal work which introduced deep learning for stereo matching and which currently stays one of the best methods on the KITTI datasets. [24] is an extensive study which has a representative comparison of learning-based and non-learning-based methods under the same setup and open-source code [24] for this setup. The whole pipeline works as follows. First, we obtain the raw scores U(x, d) from Algorithm 1 for the shifts up to Dmax = 228. Then we normalize the scores U(x, ·) per-pixel by dividing them over the maximal score, thus turning them into the range [0, 1], suitable for running the post-processing code [24]. Finally, we run the post-processing code with exactly the same parameters as the original method [25] and measure the quality on the same 40 validation images. 6.2 Baselines We have two kinds of baselines in our evaluation: those coming from [25] and our simpler versions of deep feature transfer similar to [13], which do not consider paths. The first group of baselines from [25] are the following: the sum of absolute differences “sad”, the census transform “cens” [23], the normalized cross-correlation “ncc”. We also included the learning-based methods “fst” and “acrt” [25] for completeness, although they use training data to learn features while our method does not. For the second group of baselines, we stack up the activation volumes for the given layer range and up-sample the layer volumes if they have reduced resolution. Then we compute normalized cross-correlation of the stacked features. Those baselines are denoted “corr(s, t)” where “s” is the 6 Table 2: This table shows the percentages of erroneous pixels Errt for thresholds t = 1, . . . , 5 on the KITTI 2012 validation set from [25]. Our method is denoted “ours(2, 8)”. The two rightmost columns “fst” and “acrt” correspond to learning-based methods from [25]. We give them for completeness, as all the other methods, including ours, do not use learning. Methods Threshold sad cens ncc corr(1, 2) corr(2, 2) corr(2, 8) ours(2, 8) fst acrt 1 20.6 20.4 20.7 17.4 2 10.5 10.4 8.14 6.40 3 8.16 4.90 8.93 7.58 7.52 5.23 3.94 3.02 2.61 4 6.19 6.13 4.02 2.99 5 5.40 5.36 3.42 2.49 Table 3: KITTI 2012 ablation study. Methods Threshold ours(2, 2) ours(2, 3) central(2, 8) ours(2, 8) 1 17.7 18.4 17.3 17.4 2 7.90 8.16 6.58 6.40 3 5.28 5.41 4.02 3.94 4 4.08 4.05 3.04 2.99 5 3.41 3.32 2.53 2.49 starting layer, “t” is the last layer. Note that we correlate the features before applying ReLU following what [25] does for the last layer. Thus we use the input to the ReLU inside the layers. All the methods, including ours, undergo the same post-processing pipeline. This pipeline consists of semi-global matching [9], left-right consistency check, sub-pixel enhancement by fitting a quadratic curve, median and bilateral filtering. We refer the reader to [25] for the full description. While the first group of baselines was tuned by [25] and we take the results from that paper, we had to tune the post-processing hyper-parameters of the second group of baselines to obtain the best results. 6.3 KITTI 2012 The dataset consists of 194 training image pairs and 195 test image pairs. The reflective surfaces like windshields were excluded from the ground truth. The results in Table 2 show that our method “ours(2, 8)” performs better compared to the baselines. At the same time, its performance is lower than learning-based methods from [25]. The main promise of our method is scalability: while we test it on a task where huge effort was invested into collecting the training data, there are other important tasks without such extensive datasets. 6.4 Ablation study on KITTI 2012 The goal of this section is to understand how important is the deep hierarchy of features versus one or few layers. We compared the following setups: “ours(2, 2)” uses only the second layer, “ours(2, 3)” uses only the range from layer 2 to layer 3, “central(2, 8)” considers the full range of layers but only with central arcs in the convolutions (connecting same pixel positions between activations) taken into account in the backward pass, “ours(2, 8)” is the full method. The result in Table 3 shows that it is profitable to use the full hierarchy both in terms of depth and coverage of the receptive field. 6.5 KITTI 2015 The stereo dataset consists of 200 training image pairs and 200 test image pairs. The main difference to KITTI 2012 is that the images are colored and the reflective surfaces are present in the evaluation. Similar conclusions to KITTI 2012 can be drawn from experimental results: our method provides a reasonable transfer, being inferior only to learning-based methods — see Table 4. We show our depth map results in Fig. 2. 7 Table 4: This table shows the percentages of erroneous pixels Errt for thresholds t = 1, . . . , 5 on the KITTI 2015 validation set from [25]. Our method is denoted “ours(2, 8)”. The two rightmost columns “fst” and “acrt” correspond to learning-based methods from [25]. We give them for completeness, as all the other methods, including ours, do not use learning. Methods Threshold sad cens ncc corr(1, 2) corr(2, 2) corr(2, 8) ours(2, 8) fst acrt 1 26.6 26.5 29.6 26.2 2 10.9 10.8 11.2 9.27 3 9.44 5.03 8.89 6.68 6.63 6.16 4.78 3.99 3.25 4 5.05 5.03 4.42 3.36 5 4.22 4.20 3.60 2.72 Figure 2: Results on KITTI 2015. Top to bottom: reference image, searched image, our depth result. The depth is visualized in the standard KITTI color coding (from close to far: yellow, green, purple, red, blue). 6.6 Style transfer experiment on KITTI 2015 The goal of this experiment is to show the robustness of recognition hierarchy for the transfer to correspondence search — something we advocated in the introduction as the advantage of our approach. We apply the style transfer method [5], implemented in the Prisma app. We ran different style transfers on the left and right images. While now very different at the pixel level, the higher level descriptions of the images remain the same which allows to successfully run our method. The qualitative results show the robustness of our path-based method in Fig. 3 (see also Fig. 2 for visual comparison to normal data). Figure 3: Results for the style transfer on KITTI 2015. Top to bottom: reference image, searched image, our depth result. The depth is visualized in the standard KITTI color coding (from close to far: yellow, green, purple, red, blue). 8 7 Conclusion In this work, we have presented a method for transfer from recognition to correspondence search at the lowest level. For that, we re-use activation paths from deep convolutional neural networks and propose an efficient polynomial algorithm to aggregate an exponential number of such paths. The empirical results on the stereo matching task show that our method is competitive among methods which do not use labeled data from the target domain. It would be interesting to apply this technique to sound, which should become possible once a high-quality deep convolutional model becomes accessible to the public (e.g., [21]). Acknowledgements We would like to thank Dmitry Laptev, Alina Kuznetsova and Andrea Cohen for their comments about the manuscript. We also thank Valery Vishnevskiy for running our code while our own cluster was down. This work is partially funded by the Swiss NSF project 163910 “Efficient Object-Centric Detection”. References [1] Vijay Badrinarayanan, Alex Kendall, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. arXiv preprint arXiv:1511.00561, 2015. [2] Christopher B Choy, JunYoung Gwak, Silvio Savarese, and Manmohan Chandraker. Universal correspondence network. In Advances in Neural Information Processing Systems, pages 2414–2422, 2016. [3] 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. corr abs/1310.1531 (2013), 2013. [4] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the IEEE International Conference on Computer Vision, pages 2650–2658, 2015. [5] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [6] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In Conference on Computer Vision and Pattern Recognition (CVPR), 2012. [7] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, pages 1440–1448, 2015. [8] Bumsub Ham, Minsu Cho, Cordelia Schmid, and Jean Ponce. Proposal flow. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3475–3484, 2016. [9] Heiko Hirschmuller. Accurate and efficient stereo processing by semi-global matching and mutual information. In Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on, volume 2, pages 807–814. IEEE, 2005. [10] Seungryong Kim, Dongbo Min, Bumsub Ham, Sangryul Jeon, Stephen Lin, and Kwanghoon Sohn. Fcss: Fully convolutional self-similarity for dense semantic correspondence. arXiv preprint arXiv:1702.00926, 2017. [11] 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. [12] 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. [13] Jonathan L Long, Ning Zhang, and Trevor Darrell. Do convnets learn correspondence? In Advances in Neural Information Processing Systems, pages 1601–1609, 2014. [14] Moritz Menze and Andreas Geiger. Object scene flow for autonomous vehicles. In Conference on Computer Vision and Pattern Recognition (CVPR), 2015. [15] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: an astounding baseline for recognition (2014). arXiv preprint arXiv:1403.6382. [16] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 779–788, 2016. 9 [17] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 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. IJCV, 115(3):211–252, 2015. [19] Pierre Sermanet, David Eigen, Xiang Zhang, Michaël Mathieu, Rob Fergus, and Yann LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. arXiv preprint arXiv:1312.6229, 2013. [20] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [21] Aäron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. CoRR abs/1609.03499, 2016. [22] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in neural information processing systems, pages 3320–3328, 2014. [23] Ramin Zabih and John Woodfill. Non-parametric local transforms for computing visual correspondence. In European conference on computer vision, pages 151–158. Springer, 1994. [24] Jure Zbontar and Yann LeCun. MC-CNN github repository. https://github.com/jzbontar/mc-cnn, 2016. [25] Jure Zbontar and Yann LeCun. Stereo matching by training a convolutional neural network to compare image patches. Journal of Machine Learning Research, 17(1-32):2, 2016. 10 | 2017 | 447 |
6,949 | Convergence Analysis of Two-layer Neural Networks with ReLU Activation Yuanzhi Li Computer Science Department Princeton University yuanzhil@cs.princeton.edu Yang Yuan Computer Science Department Cornell University yangyuan@cs.cornell.edu Abstract In recent years, stochastic gradient descent (SGD) based techniques has become the standard tools for training neural networks. However, formal theoretical understanding of why SGD can train neural networks in practice is largely missing. In this paper, we make progress on understanding this mystery by providing a convergence analysis for SGD on a rich subset of two-layer feedforward networks with ReLU activations. This subset is characterized by a special structure called “identity mapping”. We prove that, if input follows from Gaussian distribution, with standard O(1/ √ d) initialization of the weights, SGD converges to the global minimum in polynomial number of steps. Unlike normal vanilla networks, the “identity mapping” makes our network asymmetric and thus the global minimum is unique. To complement our theory, we are also able to show experimentally that multi-layer networks with this mapping have better performance compared with normal vanilla networks. Our convergence theorem differs from traditional non-convex optimization techniques. We show that SGD converges to optimal in “two phases”: In phase I, the gradient points to the wrong direction, however, a potential function g gradually decreases. Then in phase II, SGD enters a nice one point convex region and converges. We also show that the identity mapping is necessary for convergence, as it moves the initial point to a better place for optimization. Experiment verifies our claims. 1 Introduction Deep learning is the mainstream technique for many machine learning tasks, including image recognition, machine translation, speech recognition, etc. [17]. Despite its success, the theoretical understanding on how it works remains poor. It is well known that neural networks have great expressive power [22, 7, 3, 8, 31]. That is, for every function there exists a set of weights on the neural network such that it approximates the function everywhere. However, it is unclear how to obtain the desired weights. In practice, the most commonly used method is stochastic gradient descent based methods (e.g., SGD, Momentum [40], Adagrad [10], Adam [25]), but to the best of our knowledge, there were no theoretical guarantees that such methods will find good weights. In this paper, we give the first convergence analysis of SGD for two-layer feedforward network with ReLU activations. For this basic network, it is known that even in the simplified setting where the weights are initialized symmetrically and the ground truth forms orthonormal basis, gradient descent might get stuck at saddle points [41]. Inspired by the structure of residual network (ResNet) [21], we add an extra identity mapping for the hidden layer (see Figure 1). Surprisingly, we show that simply by adding this mapping, with the standard initialization scheme and small step size, SGD always converges to the ground truth. In other 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. input x W⊤x ReLU(W⊤x) Take sum output input x W⊤x L Identity Link +x ReLU((I + W)⊤x) Take sum output Figure 1: Vanilla network (left), with identity mapping (right) O I I + W∗ I + W Easy for SGD Unknown Seems hard Identity mapping Figure 2: Illustration for our result. words, the optimization becomes significantly easier, after adding the identity mapping. See Figure 2, based on our analysis, the region near the identity matrix I contains only one global minimum without any saddle points or local minima, thus is easy for SGD to optimize. The role of the identity mapping here, is to move the initial point to this easier region (better initialization). Other than being feedforward and shallow, our network is different from ResNet in the sense that our identity mapping skips one layer instead of two. However, as we will show in Section 5.1, the skip-one-layer identity mapping already brings significant improvement to vanilla networks. Formally, we consider the following function. f(x, W) = ∥ReLU((I + W)⊤x)∥1 (1) where ReLU(v) = max(v, 0) is the ReLU activation function. x ∈Rd is the input vector sampled from a Gaussian distribution, and W ∈Rd×d is the weight matrix, where d is the number of input units. Notice that I adds ei to column i of W, which makes f asymmetric in the sense that by switching any two columns in W, we get different functions. Following the standard setting [34, 41], we assume that there exists a two-layer teacher network with weight W∗. We train the student network using ℓ2 loss: L(W) = Ex[(f(x, W) −f(x, W∗))2] (2) We will define a potential function g, and show that if g is small, the gradient points to partially correct direction and we get closer to W∗after every SGD step. However, g could be large and thus gradient might point to the reverse direction. Fortunately, we also show that if g is large, by doing SGD, it will keep decreasing until it is small enough while maintaining the weight W in a nice region. We call the process of decreasing g as Phase I, and the process of approaching W∗as Phase II. See Figure 3 and simulations in Section 5.3. Our two phases framework is fundamentally different from any type of local convergence, as in Phase I, the gradient is pointing to the wrong direction to W∗, so the path from W to W∗is non-convex, and SGD takes a long detour to arrive W∗. This framework could be potentially useful for analyzing other non-convex problems. To support our theory, we have done a few other experiments and got interesting observations. For example, as predicted by our theorem, we found that for multilayer feedforward network with identity mappings, zero initialization performs as good as random initialization. At the first glance, it contradicts the common belief “random initialization is necessary to break symmetry”, but actually the identity mapping itself serves as the asymmetric component. See Section 5.4. Another common belief is that neural network has lots of local minima and saddle points [9], so even if there exists a global minimum, we may not be able to arrive there. As a result, even when the teacher network is shallow, the student network usually needs to be deeper, otherwise it will underfit. However, both our theorem and our experiment show that if the shallow teacher network is in a pretty large region near identity (Figure 2), SGD always converges to the global minimum by initializing the weights I + W in this region, with equally shallow student network. By contrast, wrong initialization gets stuck at local minimum and underfit. See Section 5.2. 2 Related Work Expressivity. Even two-layer network has great expressive power. For example, two-layer network with sigmoid activations could approximate any continuous function [22, 7, 3]. ReLU is the state-ofthe-art activation function [30, 13], and has great expressive power as well [29, 32, 31, 4, 26]. Learning. Most previous results on learning neural network are negative [39, 28, 38], or positive but with algorithms other than SGD [23, 43, 37, 14, 15, 16], or with strong assumptions on the model [1, 2]. [35] proved that with high probability, there exists a continuous decreasing path from random initial point to the global minimum, but SGD may not follow this path. Recently, Zhong et al. showed that with initialization point found using tensor decomposition, gradient descent could find the ground truth for one hidden layer network [44]. Linear network and independent activation. Some previous works simplified the model by ignoring the activation functions and considering deep linear networks [36, 24] or deep linear residual networks [19], which can only learn linear functions. Some previous results are based on independent activation assumption that the activations of ReLU and the input are independent [5, 24]. Saddle points. It is observed that saddle point is not a big problem for neural networks [9, 18]. In general, if the objective is strict-saddle [11], SGD could escape all saddle points. 2 Preliminaries Denote x as the input vector in Rd. For now, we first consider x sampled from normal distribution N(0, I). Denote W∗= (w∗ 1, · · · , w∗ n) ∈Rd×d as the weights for the teacher network, W = (w1, · · · , wn) ∈Rd×d as the weights for the student network, where w∗ i , wi ∈Rd are column vectors. f(x, W∗), f(x, W) are defined in (1), representing the teacher and student network. We want to know whether a randomly initialized W will converge to W∗, if we run SGD with l2 loss defined in (2). Alternatively, we can write the loss L(W) as Ex[(ΣiReLU(⟨ei + wi, x⟩) −ΣiReLU(⟨ei + w∗ i , x⟩))2] Taking derivative with respect to wj, we get ∇L(W)j = 2Ex " X i ReLU(⟨ei + wi, x⟩) − X i ReLU(⟨ei + w∗ i , x⟩) ! x1⟨ej+wj,x⟩≥0 # where 1e is the indicator function that equals 1 if the event e is true, and 0 otherwise. Here ∇L(W) ∈Rd×d, and ∇L(W)j is its j-th column. Denote θi,j as the angle between ei +wi and ej +wj, θi∗,j as the angle between ei +w∗ i and ej +wj. Denote ¯v = v ∥v∥2 . Denote I + W∗and I + W∗as the column-normalized version of I + W∗and I + W such that every column has unit norm. Since the input is from a normal distribution, one can compute the expectation inside the gradient as follows. Lemma 2.1 (Eqn (13) from [41]). If x ∼N(0, I), then −∇L(W)j = Pd i=1 π 2 (w∗ i −wi) + π 2 −θi∗,j (ei +w∗ i )− π 2 −θi,j (ei +wi)+ ∥ei +w∗ i ∥2 sin θi∗,j −∥ei +wi∥2 sin θi,j ej + wj Remark. Although the gradient of ReLU is not well defined at the point of zero, if we assume input x is from the Gaussian distribution, the loss function becomes smooth, and the gradient is well defined everywhere. Denote u ∈Rd as the all one vector. Denote Diag(W) as the diagonal matrix of matrix W, Diag(v) as a diagonal matrix whose main diagonal equals to the vector v. Denote Off-Diag(W) ≜ W −Diag(W). Denote [d] as the set {1, · · · , d}. Throughout the paper, we abuse the notation of inner product between matrices W, W∗, ∇L(W), such that ⟨∇L(W), W⟩means the summation of the entrywise products. ∥W∥2 is the spectral norm of W, and ∥W∥F is the Frobenius norm of W. We define the potential function g and variables gj, Aj, A below, which will be useful in the proof. Definition 2.2. We define the potential function g ≜Pd i=1(∥ei + w∗ i ∥2 −∥ei + wi∥2), and variable gj ≜P i̸=j(∥ei + w∗ i ∥2 −∥ei + wi∥2). 3 W1 W∗ W6 W10 Figure 3: Phase I: W1 →W6, W may go to the wrong direction but the potential is shrinking. Phase II: W6 →W10, W gets closer to W∗in every step by one point convexity. 0 50 100 150 200 0 50 100 150 200 −5 0 5 10 15 Figure 4: The function is one point strongly convex as every point’s negative gradient points to the center, but not convex as any line between the center and the red region is below surface. Definition 2.3. Denote Aj ≜P i̸=j((ei + w∗ i )ei + w∗ i ⊤−(ei + wi)ei + wi ⊤), A ≜Pd i=1((ei + w∗ i )ei + w∗ i ⊤−(ei + wi)ei + wi ⊤) = (I + W∗)I + W∗⊤−(I + W)I + W ⊤. In this paper, we consider the standard SGD with mini batch method for training the neural network. Assume W0 is the initial point, and in step t > 0, we have the following updating rule: Wt+1 = Wt −ηtGt where the stochastic gradient Gt = ∇L(Wt) + Et with E[Et] = 0 and ∥Et∥F ≤ε. Let G2 ≜ 6dγ + ε, GF ≜6d1.5γ + ε, where γ is the upper bound of ∥W∗∥2 and ∥W0∥2 (defined later). As we will see in Lemma C.2, they are the upper bound of ∥Gt∥2 and ∥Gt∥F respectively. It’s clear that L is not convex, In order to get convergence guarantees, we need a weaker condition called one point convexity. Definition 2.4 (One point strongly convexity). A function f(x) is called δ-one point strongly convex in domain D with respect to point x∗, if ∀x ∈D, ⟨−∇f(x), x∗−x⟩> δ∥x∗−x∥2 2. By definition, if a function f is strongly convex, it is also one point strongly convex in the entire space with respect to the global minimum. However, the reverse is not necessarily true, e.g., see Figure 4. If a function is one point strongly convex, then in every step a positive fraction of the negative gradient is pointing to the optimal point. As long as the step size is small enough, we will finally arrive the optimal point, possibly by a winding path. See Figure 3 for illustration, where starting from W6 (Phase II), we get closer to W∗in every step. Formally, we have the following lemma. Lemma 2.5. For function f(W), consider the SGD update Wt+1 = Wt −ηGt, where E[Gt] = ∇f(Wt), E[∥Gt∥2 F ] ≤G2. Suppose for all t, Wt is always inside the δ-one point strongly convex region with diameter D, i.e., ∥Wt −W∗∥F ≤D. Then for any α > 0 and any T such that T α log T ≥ D2δ2 (1+α)G2 , if η = (1+α) log T δT , we have E∥WT −W∗∥2 F ≤(1+α) log T G2 δ2T . The proof can be found in Appendix J. Lemma 2.5 uses fixed step size, so it easily fits the standard practical scheme that shrinks η by a factor of 10 after every a few epochs. For example, we may apply Lemma 2.5 every time η gets changed. Notice that our lemma does not imply that WT will converge to W∗. Instead, it only says WT will be sufficiently close to W∗with small step size η. 3 Main Theorem Theorem 3.1 (Main Theorem). There exists constants γ > γ0 > 0 such that If x ∼N(0, I), ∥W0∥2, ∥W∗∥2 ≤γ0, d ≥100, ε ≤γ2, then SGD for L(W) will find the ground truth W∗by two phases. In Phase I, by setting η ≤ γ2 G2 2 , the potential function will keep decreasing until it is smaller than 197γ2, which takes at most 1 16η steps. In Phase II, for any α > 0 and any T such that T α log T ≥ 36d 1004(1+α)G2 F , if we set η = (1+α) log T δT , we have E∥WT −W∗∥2 F ≤1002(1+α) log T G2 F 9T . Remarks. Randomly initializing the weights with O(1/ √ d) is standard in deep learning, see [27, 12, 20]. It is also well known that if the entries are initialized with O(1/ √ d), the spectral norm 4 of the random matrix is O(1) [33]. So our result matches with the common practice. Moreover, as we will show in Section 5.5, networks with small average spectral norm already have good performance. Thus, our assumption ∥W∗∥2 = O(1) is reasonable. Notice that here we assume the spectral norm of W∗to be constant, which means the Frobenius norm ∥W∗∥F could be as big as O( √ d). The assumption that the input follows a Gaussian distribution is not necessarily true in practice (Although this is a common assumption appeared in the previous papers [5, 41, 42], and also considered plausible in [6]). We could easily generalize the analysis to rotation invariant distributions, and potentially more general distributions (see Section 6). Moreover, previous analyses either ignore the nonlinear activations and thus consider linear model [36, 24, 19], or directly [5, 24] or indirectly [41]1 assume that the activations are independent. By contrast, in our model the ReLU activations are highly correlated2 as ∥W∥2, ∥W∗∥2 = Ω(1). As pointed out by [6], eliminating the unrealistic assumptions on activation independence is the central problem of analyzing the loss surface of neural network, which was not fully addressed by the previous analyses. To prove the main theorem, we split the process and present the following two theorems, which will be proved in Appendix C and D. Theorem 3.2 (Phase I). There exists a constant γ > γ0 > 0 such that If ∥W0∥2, ∥W∗∥2 ≤γ0, d ≥100, η ≤ γ2 G2 2 , ε ≤γ2, then gt will keep decreasing by a factor of 1 −0.5ηd for every step, until gt1 ≤197γ2 for step t1 ≤ 1 16η. After that, Phase II starts. That is, for every T > t1, we have ∥WT ∥2 ≤ 1 100 and gT ≤0.1. Theorem 3.3 (Phase II). There exists a constant γ such that if ∥W∥2, ∥W∗∥2 ≤γ, and g ≤0.1, then ⟨−∇L(W), W∗−W⟩= Pd j=1⟨−∇L(W)j, w∗ j −wj⟩> 0.03∥W∗−W∥2 F . With these two theorems, we get the main theorem immediately. Proof for Theorem 3.1. By Theorem 3.2, we know the statement for Phase I is true, and we will enter phase II in 1 16η steps. After entering Phase II, based on Theorem 3.3, we simply use Lemma 2.5 by setting δ = 0.03, D = √ d 50 , G = GF to get the convergence guarantee. 4 Overview of the Proofs General Picture. In many convergence analyses for non-convex functions, one would like to show that L is one point strongly convex, and directly apply Lemma 2.5 to get the convergence result. However, this is not true for 2-layer neural network, as the gradient may point to the wrong direction, see Section 5.3. So when is our L one point convex? Consider the following thought experiment: First, suppose ∥W∥2, ∥W∗∥2 →0, we know ∥wi∥2, ∥w∗ i ∥2 also go to 0. Thus, ei + wi and ei + w∗ i are close to ei. As a result, θi,j, θi∗,j ≈π 2 , and θi∗,i ≈0. Based on Lemma 2.1, this gives us a naïve approximation of the negative gradient, i.e., −∇L(W)j ≈π 2 (w∗ j −wj)+ π 2 Pd i=1(w∗ i −wi)+ej + wj P i̸=j(∥ei + w∗ i ∥2 −∥ei + wi∥2) . While the first two terms π 2 (w∗ j −wj) and π 2 Pd i=1(w∗ i −wi) have positive inner product with W∗−W, the last term gj = ej + wj P i̸=j(∥ei+w∗ i ∥2−∥ei+wi∥2) can point to arbitrary direction. If the last term is small, it can be covered by the first two terms, and L becomes one point strongly convex. So we define a potential function closely related to the last term: g = Pd i=1(∥ei + w∗ i ∥2 −∥ei + wi∥2). We show that if g is small enough, L is also one point strongly convex (Theorem 3.3). However, from random initialization, g can be as large as of Ω( √ d), which is too big to be covered. Fortunately, we show that if g is big, it will gradually decrease simply by doing SGD on L. More specifically, we introduce a two phases convergence analysis framework: 1They assume input is Gaussian and the W∗is orthonormal, which means the activations are independent in teacher network. 2 Let σi be the output of i-th ReLU unit, then in our setting, P i,j Cov[σi, σj] can be as large as Ω(d), which is far from being independent. 5 Constant Part First Order Higher Order ⟨ , W∗−W⟩ + + ≥[ π 2 −O(g)]∥W∗−W∥2 F Lemma D.2 + Lemma D.3 −1.3∥W∗−W∥2 F Lemma D.1 −0.085∥W∗−W∥2 F Lemma B.2 Figure 5: Lower bounds of inner product using Taylor expansion 1. In Phase I, the potential function g is decreasing to a small value. 2. In Phase II, g remains small, so L is one point convex and thus W starts to converge to W∗. We believe that this framework could be helpful for other non-convex problems. Technical difficulty: Phase I. Our key technical challenge is to show that in Phase I, the potential function actually decreases to O(1) after polynomial number of iterations. However, we cannot show this by merely looking at g itself. Instead, we introduce an auxiliary variable s = (W∗−W)u, where u is the all one vector. By doing a careful calculation, we get their joint update rules (Lemma C.3 and Lemma C.4): st+1 ≈st −πηd 2 st + ηO( √ dgt + √ dγ) gt+1 ≈gt −ηdgt + ηO(γ √ d∥st∥2 + dγ2) Solving this dynamics, we can show that gt will approach to (and stay around) O(γ), thus we enter Phase II. Technical difficulty: Phase II. Although the overall approximation in the thought experiment looks simple, the argument is based on an over simplified assumption that θi∗,j, θi,j ≈ π 2 for i ̸= j. However, when W∗has constant spectral norm, even when W is very close to W∗, θi,j∗could be constantly far away from π 2 , which prevents us from applying this approximation directly. To get a formal proof, we use the standard Taylor expansion and control the higher order terms. Specifically, we write θi∗,j as θi∗,j = arccos⟨ei + w∗ i , ej + wj⟩and expand arccos at point 0, thus, θi∗,j = π 2 −⟨ei + w∗ i , ej + wj⟩+ O(⟨ei + w∗ i , ej + wj⟩3) However, even when W ≈W∗, the higher order term O(⟨ei + w∗ i , ej + wj⟩3) still can be as large as a constant, which is too big for us. Our trick here is to consider the “joint Taylor expansion”: θi∗,j −θi,j = ⟨ei + wi −ei + w∗ i , ej + wj⟩+ O(|⟨ei + w∗ i , ej + wj⟩3 −⟨ei + wi, ej + wj⟩3|) As W approaches W∗, |⟨ei + w∗ i , ej + wj⟩3 −⟨ei + wi, ej + wj⟩3| also tends to zero, therefore our approximation has bounded error. In the thought experiment, we already know that the constant part in the Taylor expansion of ∇L(W) is π 2 −O(g)-one point convex. We show that after taking inner product with W∗−W, the first order terms are lower bounded by (roughly) −1.3∥W∗−W∥2 F and the higher order terms are lower bounded by −0.085∥W∗−W∥2 F . Adding them together, we can see that L(W) is one point convex as long as g is small. See Figure 5. Geometric Lemma. In order to get through the whole analysis, we need tight bounds on a few common terms that appear everywhere. Instead of using naïve algebraic techniques, we come up with a nice geometric proof to get nearly optimal bounds. Due to space limit, we defer it to Appendix E. 5 Experiments In this section, we present several simulation results to support our theory. Our code can be found in the supplementary materials. 5.1 Importance of identity mapping In this experiment, we compare the standard ResNet [21] and single skip model where identity mapping skips only one layer. See Figure 6 for the single skip model. We also ran the vanilla network, where the identity mappings are completely removed. 6 Table 1: Test error of three 56-layer networks on Cifar-10 ResNet Single skip Vanilla Test Err 6.97% 9.01% 12.04% Convolution BatchNorm ⊕ ReLU input output Identity Figure 6: Illustration of one block in single skip model in Sec 5.1 0 25 50 75 100 125 150 175 200 epochs 0 2 4 6 8 10 loss Test (ResLink) Test (Vanilla) Test (3-Block) Train (ResLink) Train (Vanilla) Train (3-Block) (a) Test Error, Train Error 0 25 50 75 100 125 150 175 200 epochs 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 l2 norm W (ResLink) W-W* (ResLink) W (Vanilla) W-W* (Vanilla) (b) ∥W∗−W∥F , ∥W∥F Figure 7: Verifying the global convergence In this experiment, we choose Cifar-10 as the dataset, and all the networks have 56-layers. Other than the identity mappings, all other settings are identical and default. We run the experiments for 5 times and report the average test error. As we can see in Table 1, compared with vanilla network, by simply using a single skip identity mapping, one can already improve the test error by 3.03%, and is 2.04% close to the ResNet. So single skip identity mapping brings significant improvement on test accuracy. 5.2 Global minimum convergence In this experiment, we verify our main theorem that for two-layer teacher network and student network with identity mappings, as long as ∥W0∥2, ∥W∗∥2 is small, SGD always converges to the global minimum W∗, thus gives almost 0 training error and test error. We consider three student networks. The first one (ResLink) is defined using (2), the second one (Vanilla) is the same model without the identity mapping. The last one (3-Block) is a three block network with each block containing a linear layer (500 hidden nodes), a batch normalization and a ReLU layer. The teacher network always shares the same structure as the student network. The input dimension is 100. We generated a fixed W∗for all the trials with ∥W∗∥2 ≈0.6, ∥W∗∥F ≈ 5.7. We generated a training set of size 100, 000, and test set of size 10, 000, sampled from a Gaussian distribution. We use batch size 200, step size 0.001. We run ResLink for 5 times with random initialization (∥W∥2 ≈0.6 and ∥W∥F ≈5), and plot the curves by taking the average. Figure 7(a) shows test error and training error of the three networks. Comparing Vanilla with 3-Block, we find that 3-Block is more expressive, so its training error is smaller compared with vanilla network; but it suffers from overfitting and has bigger test error. This is the standard overfitting vs underfitting tradeoff. Surprisingly, with only one hidden layer, ResLink has both zero test error and training error. If we look at Figure 7(b), we know the distance between W and W∗converges to 0, meaning ResLink indeed finds the global optimal in all 5 trials. By contrast, for vanilla network, which is essentially the same network with different initialization, ∥W −W∗∥2 does not converge to zero3. This is exactly what our theory predicted. 5.3 Verify the dynamics In this experiment, we verify our claims on the dynamics. Based on the analysis, we construct a 1500×1500 matrix W s.t. ∥W∥2 ≈0.15, ∥W∥F ≈5 , and set W∗= 0. By plugging them into (2), one can see that even in this simple case that W∗= 0, initially the gradient is pointing to the wrong direction, i.e., not one point convex. We then run SGD on W by using samples x from Gaussian distribution, with batch size 300, step size 0.0001. 3To make comparison meaningful, we set W −I to be the actual weight for Vanilla as its identity mapping is missing, which is why it has a much bigger initial norm. 7 0 20 40 60 80 100 −10 −5 0 5 10 15 20 25 P-I P-II (a) First 100 iterations 0 50000 100000 150000 200000 250000 300000 350000 −2 0 2 4 6 8 10 12 14 16 Distance to optimal Inner product Potential g Loss (b) The entire process Figure 8: Verifying the dynamics Figure 8(a) shows the first 100 iterations. We can see that initially the inner product defined in Definition 2.4 is negative, then after about 15 iterations, it turns positive, which means W is in the one point strongly convex region. At the same time, the potential g keeps decreasing to a small value, while the distance to optimal (which also equals to ∥W∥F in this experiment) is not affected. They precisely match with our description of Phase I in Theorem 3.2. After that, we enter Phase II and slowly approach to W∗, see Figure 8(b). Notice that the potential g is always very small, the inner product is always positive, and the distance to optimal is slowly decreasing. Again, they precisely match with our Theorem 3.3. 5.4 Zero initialization works In this experiment, we used a simple 5-block neural network on MNIST, where every block contains a 784 ∗784 feedforward layer, an identity mapping, and a ReLU layer. Cross entropy criterion is used. We compare zero initialization with standard O(1/ √ d) random initialization. We found that for zero initialization, we can get 1.28% test error, while for random initialization, we can get 1.27% test error. Both results were obtained by taking average among 5 runs and use step size 0.1, batch size 256. If the identity mapping is removed, zero initialization no longer works. 5.5 Spectral norm of W∗ We also applied the exact model f defined in (1) to distinguish two classes in MNIST. For any input image x, We say it’s in class A if f(x, W) < TA,B, and in class B otherwise. Here TA,B is the optimal threshold for the function f(x, 0) to distinguish A and B. If W = 0, we get 7% training error for distinguish class 0 and class 1. However, it can be improved to 1% with ∥W∥2 = 0.6. We tried this experiment for all possible 45 pairs of classes in MNIST, and improve the average training error from 34% (using W = 0) to 14% (using ∥W∥2 = 0.6). Therefore our model with ∥W∥2 = Ω(1) has reasonable expressive power, and is substantially different from just using the identity mapping alone. 6 Discussions The assumption that the input is Gaussian can be relaxed in several ways. For example, when the distribution is N(0, Σ) where ∥Σ −I∥2 is bounded by a small constant, the same result holds with slightly worse constants. Moreover, since the analysis relies Lemma 2.1, which is proved by converting the original input space into polar space, it is easy to generalize the calculation to rotation invariant distributions. Finally, for more general distributions, as long as we could explicitly compute the expectation, which is in the form of O(W∗−W) plus certain potential function, our analysis framework may also be applied. There are many exciting open problems. For example, Our paper is the first one that gives solid SGD analysis for neural network with nonlinear activations, without unrealistic assumptions like independent activation assumption. It would be great if one could further extend it to multiple layers, which would be a major breakthrough of understanding optimization for deep learning. Moreover, our two phase framework could be applied to other non-convex problems as well. 8 Acknowledgement The authors want to thank Robert Kleinberg, Kilian Weinberger, Gao Huang, Adam Klivans and Surbhi Goel for helpful discussions, and the anonymous reviewers for their comments. References [1] Alexandr Andoni, Rina Panigrahy, Gregory Valiant, and Li Zhang. Learning polynomials with neural networks. In ICML, pages 1908–1916, 2014. [2] Sanjeev Arora, Aditya Bhaskara, Rong Ge, and Tengyu Ma. Provable bounds for learning some deep representations. In Proceedings of the 31th International Conference on Machine Learning, ICML 2014, Beijing, China, 21-26 June 2014, pages 584–592, 2014. [3] Andrew R. Barron. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Trans. Information Theory, 39(3):930–945, 1993. [4] Leo Breiman. Hinging hyperplanes for regression, classification, and function approximation. IEEE Trans. Information Theory, 39(3):999–1013, 1993. [5] Anna Choromanska, Mikael Henaff, Michaël Mathieu, Gérard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015. [6] Anna Choromanska, Yann LeCun, and Gérard Ben Arous. Open problem: The landscape of the loss surfaces of multilayer networks. In Proceedings of The 28th Conference on Learning Theory, COLT 2015, Paris, France, July 3-6, 2015, pages 1756–1760, 2015. [7] George Cybenko. Approximation by superpositions of a sigmoidal function. MCSS, 5(4):455, 1992. [8] Amit Daniely, Roy Frostig, and Yoram Singer. Toward deeper understanding of neural networks: The power of initialization and a dual view on expressivity. In NIPS, pages 2253–2261, 2016. [9] Yann N Dauphin, Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, Surya Ganguli, and Yoshua Bengio. Identifying and attacking the saddle point problem in high-dimensional nonconvex optimization. In NIPS 2014, pages 2933–2941, 2014. [10] John C. Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011. [11] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points - online stochastic gradient for tensor decomposition. In COLT 2015, volume 40, pages 797–842, 2015. [12] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, pages 249–256, 2010. [13] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In AISTATS, pages 315–323, 2011. [14] Surbhi Goel, Varun Kanade, Adam R. Klivans, and Justin Thaler. Reliably learning the relu in polynomial time. CoRR, abs/1611.10258, 2016. [15] Surbhi Goel and Adam Klivans. Eigenvalue decay implies polynomial-time learnability for neural networks. In NIPS 2017, 2017. [16] Surbhi Goel and Adam Klivans. Learning Depth-Three Neural Networks in Polynomial Time. ArXiv e-prints, 2017. [17] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org. [18] Ian J. Goodfellow and Oriol Vinyals. Qualitatively characterizing neural network optimization problems. CoRR, abs/1412.6544, 2014. 9 [19] Moritz Hardt and Tengyu Ma. Identity matters in deep learning. CoRR, abs/1611.04231, 2016. [20] 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. [21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. [22] Kurt Hornik, Maxwell B. Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural Networks, 2(5):359–366, 1989. [23] Majid Janzamin, Hanie Sedghi, and Anima Anandkumar. Beating the perils of non-convexity: Guaranteed training of neural networks using tensor methods. arXiv preprint arXiv:1506.08473, 2015. [24] Kenji Kawaguchi. Deep learning without poor local minima. In NIPS, pages 586–594, 2016. [25] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [26] J. M. Klusowski and A. R. Barron. Risk Bounds for High-dimensional Ridge Function Combinations Including Neural Networks. ArXiv e-prints, July 2016. [27] Yann LeCun, Leon Bottou, Genevieve B. Orr, and Klaus Robert Müller. Efficient BackProp, pages 9–50. Springer Berlin Heidelberg, Berlin, Heidelberg, 1998. [28] Roi Livni, Shai Shalev-Shwartz, and Ohad Shamir. On the computational efficiency of training neural networks. In NIPS, pages 855–863, 2014. [29] Guido F. Montúfar, Razvan Pascanu, KyungHyun Cho, and Yoshua Bengio. On the number of linear regions of deep neural networks. In NIPS, pages 2924–2932, 2014. [30] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, pages 807–814, 2010. [31] Xingyuan Pan and Vivek Srikumar. Expressiveness of rectifier networks. In ICML, pages 2427–2435, 2016. [32] Razvan Pascanu, Guido Montúfar, and Yoshua Bengio. On the number of inference regions of deep feed forward networks with piece-wise linear activations. CoRR, abs/1312.6098, 2013. [33] M. Rudelson and R. Vershynin. Non-asymptotic theory of random matrices: extreme singular values. ArXiv e-prints, 2010. [34] David Saad and Sara A. Solla. Dynamics of on-line gradient descent learning for multilayer neural networks. Advances in Neural Information Processing Systems, 8:302–308, 1996. [35] Itay Safran and Ohad Shamir. On the quality of the initial basin in overspecified neural networks. In ICML, pages 774–782, 2016. [36] Andrew M. Saxe, James L. McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. CoRR, abs/1312.6120, 2013. [37] Hanie Sedghi and Anima Anandkumar. Provable methods for training neural networks with sparse connectivity. ICLR, 2015. [38] Ohad Shamir. Distribution-specific hardness of learning neural networks. CoRR, abs/1609.01037, 2016. [39] Jirí Síma. Training a single sigmoidal neuron is hard. Neural Computation, 14(11):2709–2728, 2002. [40] Ilya Sutskever, James Martens, George E. Dahl, and Geoffrey E. Hinton. On the importance of initialization and momentum in deep learning. In ICML, pages 1139–1147, 2013. 10 [41] Yuandong Tian. Symmetry-breaking convergence analysis of certain two-layered neural networks with relu nonlinearity. In Submitted to ICLR 2017, 2016. [42] Bo Xie, Yingyu Liang, and Le Song. Diversity leads to generalization in neural networks. In AISTATS, 2017. [43] Yuchen Zhang, Jason D. Lee, Martin J. Wainwright, and Michael I. Jordan. Learning halfspaces and neural networks with random initialization. CoRR, abs/1511.07948, 2015. [44] Kai Zhong, Zhao Song, Prateek Jain, Peter L. Bartlett, and Inderjit S. Dhillon. Recovery guarantees for one-hidden-layer neural networks. In ICML 2017, 2017. 11 | 2017 | 448 |
6,950 | Quantifying how much sensory information in a neural code is relevant for behavior Giuseppe Pica1,2 giuseppe.pica@iit.it Eugenio Piasini1 eugenio.piasini@iit.it Houman Safaai1,3 houman_safaai@hms.harvard.edu Caroline A. Runyan3,4 runyan@pitt.edu Mathew E. Diamond5 diamond@sissa.it Tommaso Fellin2,6 tommaso.fellin@iit.it Christoph Kayser7,8 christoph.kayser@uni-bielefeld.de Christopher D. Harvey3 Christopher_Harvey@hms.harvard.edu Stefano Panzeri1,2 stefano.panzeri@iit.it 1 Neural Computation Laboratory, Center for Neuroscience and Cognitive Systems@UniTn, Istituto Italiano di Tecnologia, Rovereto (TN) 38068, Italy 2 Neural Coding Laboratory, Center for Neuroscience and Cognitive Systems@UniTn, Istituto Italiano di Tecnologia, Rovereto (TN) 38068, Italy 3 Department of Neurobiology, Harvard Medical School, Boston, MA 02115, USA 4 Department of Neuroscience, University of Pittsburgh, Center for the Neural Basis of Cognition, Pittsburgh, USA 5 Tactile Perception and Learning Laboratory, International School for Advanced Studies (SISSA), Trieste, Italy 6 Optical Approaches to Brain Function Laboratory, Istituto Italiano di Tecnologia, Genova 16163, Italy 7 Institute of Neuroscience and Psychology, University of Glasgow, Glasgow, UK 8 Department of Cognitive Neuroscience, Faculty of Biology, Bielefeld University, Universitätsstr. 25, 33615 Bielefeld, Germany Abstract Determining how much of the sensory information carried by a neural code contributes to behavioral performance is key to understand sensory function and neural information flow. However, there are as yet no analytical tools to compute this information that lies at the intersection between sensory coding and behavioral readout. Here we develop a novel measure, termed the information-theoretic intersection information III(S; R; C), that quantifies how much of the sensory information carried by a neural response R is used for behavior during perceptual discrimination tasks. Building on the Partial Information Decomposition framework, we define III(S; R; C) as the part of the mutual information between the stimulus S and the response R that also informs the consequent behavioral choice C. We compute III(S; R; C) in the analysis of two experimental cortical datasets, to show how this measure can be used to compare quantitatively the contributions of spike timing and spike rates to task performance, and to identify brain areas or neural populations that specifically transform sensory information into choice. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1 Introduction Perceptual discrimination is a brain computation that is key to survival, and that requires both encoding accurately sensory stimuli and generating appropriate behavioral choices (Fig.1). Previous studies have mostly focused separately either on the former stage, called sensory coding, by analyzing how neural activity encodes information about the external stimuli [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], or on the latter stage, called behavioral readout, by analyzing the relationships between neural activity and choices in the absence of sensory signal or at fixed sensory stimulus (to eliminate spurious choice variations of neural response due to stimulus-related selectivity) [11, 12, 13]. The separation between studies of sensory coding and readout has led to a lack of consensus on what is the neural code, which here we take as the key set of neural activity features for perceptual discrimination. Most studies have in fact defined the neural code as the set of features carrying the most sensory information [1, 2, 8], but this focus has left unclear whether the brain uses the information in such features to perform perception [14, 15, 16]. Recently, Ref. [17] proposed to determine if neural sensory representations are behaviorally relevant by evaluating the association, in single trials, between the information about the sensory stimuli S carried by the neural activity R and the behavioral choices C performed by the animal, or, in other words, to evaluate the intersection between sensory coding and behavioral readout. More precisely, Ref. [17] suggested that the hallmark of a neural feature R being relevant for perceptual discrimination is that the subject will perform correctly more often when the neural feature R provides accurate sensory information. Ref.[17] proposed to quantify this intuition by first decoding sensory stimuli from single-trial neural responses and then computing the increase in behavioral performance when such decoding is correct. This intersection framework provides several advantages with respect to earlier approaches based on computing the correlations between trial-averaged psychometric performance and trial-averaged neurometric performance [13, 14, 18], because it quantifies associations between sensory information coding and choices within the same trial, instead of considering the similarity of trial-averaged neural stimulus coding and trial-averaged behavioral performance. However, the intersection information measure proposed in Ref.[17] relies strongly on the specific choice of a stimulus decoding algorithm, that might not match the unknown decoding algorithms of the brain. Further, decoding only the most likely stimulus from neural responses throws away part of the full structure in the measured statistical relationships between S, R and C [3]. To overcome these limitations, here we convert the conceptual notions described in [17] into a novel and rigorous definition of information-theoretic intersection information between sensory coding and behavioral readout III(S; R; C). We construct the information-theoretic intersection III(S; R; C) by building on recent extensions of classical information theory, called Partial Information Decompositions (PID), that are suited to the analysis of trivariate systems [19, 20, 21]. We show that III(S; R; C) is endowed with a set of formal properties that a measure of intersection information should satisfy. Finally, we use III(S; R; C) to analyze both simulated and real cortical activity. These applications show how III(S; R; C) can be used to quantitatively redefine the neural code as the set of neural features that carry sensory information which is also used for task performance, and to identify brain areas where sensory information is read out for behavior. 2 An information-theoretic definition of intersection information Throughout this paper, we assume that we are analyzing neural activity recorded during a perceptual discrimination task (Fig.1). Over the course of an experimental trial, a stimulus s ∈{s1, ..., sNs} is presented to the animal while simultaneously some neural features r (we assume that r either takes discrete values or is discretized into a certain number of bins) and the behavioral choice c ∈{c1, ..., cNc} are recorded. We assume that the joint probability distribution p(s, r, c) has been empirically estimated by sampling these variables simultaneously over repeated trials. After the animal learns to perform the task, there will be a statistical association between the presented stimulus S and the behavioral choice C, and the Shannon information I(S : C) between stimulus and choice will therefore be positive. How do we quantify the intersection information between the sensory coding s →r and the consequent behavioral readout r →c that involves the recorded neural activity features r in the same trial? Clearly, the concept of intersection information must require the analysis of the full trivariate probability distribution p(s, r, c) during perceptual discriminations. The well-established, 2 Figure 1: Schematics of the information flow in a perceptual discrimination task: sensory information I(S : R) (light blue block) is encoded in the neural activity R. This activity informs the behavioral choice C and so carries information about it (I(R : C), green block). III(S; R; C) is both a part of I(S : R) and of I(R : C), and corresponds to the sensory information used for behavior. classical tools of information theory [22] provide a framework for assessing statistical associations between two variables only. Indeed, Shannon’s mutual information allows us to quantify the sensory information I(S : R) that the recorded neural features carry about the presented stimuli [3] and, separately, the choice information I(R : C) that the recorded neural features carry about the behavior. To assess intersection information in single trials, we need to extend the classic information-theoretic tools to the trivariate analysis of S, R, C. More specifically, we argue that an information-theoretic measure of intersection information should quantify the part of the sensory information which also informs the choice. To quantify this concept, we start from the tools of the Partial Information Decomposition (PID) framework. This framework decomposes the mutual information that two stochastic variables (the sources) carry about a third variable (the target) into four nonnegative information components. These components characterize distinct information sharing modes among the sources and the target on a finer scale than Shannon information quantities [19, 20, 23, 24]. In our analysis of the statistical dependencies of S, R, C, we start from the mutual information I(C : (S, R)) that S and R carry about C. Direct application of the PID framework then leads to the following nonnegative decomposition: I(C : (S, R)) = SI(C : {S; R}) + CI(C : {S; R}) + UI(C : {S \ R}) + UI(C : {R \ S}), (1) where SI, CI and UI are respectively shared (or redundant), complementary (or synergistic) and unique information quantities as defined in [20]. More in detail, • SI(C : {S; R}) is the information about the choice that we can extract from any of S and R, i.e. the redundant information about C shared between S and R. • UI(C : {S \ R}) is the information about the choice that we can only extract from the stimulus but not from the recorded neural response. It thus includes stimulus information relevant to the behavioral choice that is not represented in R. • UI(C : {R \ S}) is the information about the choice that we can only extract from the neural response but not from the stimulus. It thus includes choice information in R that arises from stimulus-independent variables, such as level of attention or behavioral bias. • CI(C : {S; R}) is the information about choice that can be only gathered if both S and R are simultaneously observed with C, but that is not available when only one between S and R is simultaneously observed with C. More precisely, it is that part of I(C : (S, R)) which does not overlap with I(S : C) nor with I(R : C) [19]. Several mathematical definitions for the PID terms described above have been proposed in the literature [19, 20, 23, 24]. In this paper, we employ that of Bertschinger et al. [20], which is widely used for tripartite systems [25, 26]. Accordingly, we consider the space ∆p of all probability distributions q(s, r, c) with the same pairwise marginal distributions q(s, c) = p(s, c) and q(r, c) = 3 p(r, c) as the original distribution p(s, r, c). The redundant information SI(C : {S; R}) is then defined as the solution of the following convex optimization problem on the space ∆p [20]: SI(C : {S; R}) ≡max q∈∆p CoIq(S; R; C), (2) where CoIq(S; R; C) ≡Iq(S : R) −Iq(S : R|C) is the co-information corresponding to the probability distribution q(s, r, c). All other PID terms are then directly determined by the value of SI(C : {S; R})[19]. However, none of the existing PID information components described above fits yet the notion of intersection information, as none of them quantifies the part of sensory information I(S : R) carried by neural activity R that also informs the choice C. The PID quantity that seems to be closest to this notion is the redundant information that S and R share about C, SI(C : {S; R}). However, previous works pointed out the subtle possibility that even two statistically independent variables (here, S and R) can share information about a third variable (here, C) [23, 27]. This possibility rules out using SI(C : {S; R}) as a measure of intersection information, since we expect that a neural response R which does not encode stimulus information (i.e., such that S ⊥⊥R) cannot carry intersection information. We thus reason that the notion of intersection information should be quantified as the part of the redundant information that S and R share about C that is also a part of the sensory information I(S : R). This kind of information is even finer than the existing information components of the PID framework described above, and we recently found that comparing information components of the three different Partial Information Decompositions of the same probability distribution p(s, r, c) leads to the identification of finer information quantities [21]. We take advantage of this insight to quantify the intersection information by introducing the following new definition: III(S; R; C) = min{SI(C : {S; R}), SI(S : {R; C})}. (3) This definition allows us to further decompose the redundancy SI(C : {S; R}) into two nonnegative information components, as SI(C : {S; R}) = III(S; R; C) + X(R), (4) where X(R) ≡SI(C : {S; R}) −III(S; R; C) ≥0. This finer decomposition is useful because, unlike SI(C : {S; R}), III(S; R; C) has the property that S ⊥⊥R =⇒III(S; R; C) = 0 (see Supp. Info Sec.1). This is a first basic property that we expect from a meaningful definition of intersection information. Moreover, III(S; R; C) satisfies a number of additional important properties (see proofs in Supp. Info Sec. 1) that a measure of intersection information should satisfy: 1. III(S; R; C) ≤I(S : R): intersection information should be a part of the sensory information extractable from the recorded response R – namely, the part which is relevant for the choice; 2. III(S; R; C) ≤I(R : C): intersection information should be a part of the choice information extractable from the recorded response R – namely, the part which is related to the stimulus; 3. III(S; R; C) ≤I(S : C): intersection information should be a part of the information between stimulus and choice – namely, the part which can be extracted from R; 4. III(S; {R1, R2}; C) ≥III(S; R1; C), III(S; R2; C), as the task-relevant information that can be extracted from any recorded neural features should not be smaller than the taskrelevant information that can be extracted from any subset of those features. The measure III(S; R; C) thus translates all the conceptual features of intersection information into a well-defined analytical tool: Eq.3 defines how III(S; R; C) can be computed numerically from real data once the distribution p(s, r, c) is estimated empirically. In practice, the estimated p(s, r, c) defines the space ∆p where the problem defined in Eq.2 should be solved. We developed a gradient-descent optimization algorithm to solve these problems numerically with a Matlab package that is freely available for download and reuse through Zenodo and Github https://doi.org/10.5281/zenodo.850362 (see Supp. Info Sec. 2). Computing III(S; R; C) allows the experimenter to estimate that portion of the sensory information in a neural code R that is read out for behaviour during a perceptual discrimination task, and thus to quantitatively evaluate hypotheses about neural coding from empirical data. 4 R1 R2 S C (a) R1 R2 S C (b) S R1 C (c) R1 R2 S C (d) Figure 2: Some example cases where III(S; R1; C) = 0 for a neural code R1. Each panel contains a probabilistic graphical model representation of p(s, r, c), augmented by a color code illustrating the nature of the information carried by statistical relationships between variables. Red: information about the stimulus; blue: information about anything else (internal noise, distractors, and so on). III(Ri) > 0 only if the arrows linking Ri with S and C have the same color. a: I(S : R2) > I(S : R1) = 0. I(C : R2) = I(C : R1). III(R2) > III(S; R1; C) = 0. b: I(S : R2) = I(S : R1). I(C : R2) > I(C : R1) = 0. III(R2) > III(S; R1; C) = 0. c: I(S : R1) > 0, I(C : R1) > 0, I(S : C) = 0. d: I(S : R1) > 0, I(C : R1) > 0, I(S : C) > 0, III(S; R1; C) = 0. 2.1 Ruling out neural codes for task performance A first important use of III(S; R; C) is that it permits to rule out recorded neural features as candidate neural codes. In fact, the neural features R for which III(S; R; C) = 0 cannot contribute to task performance. It is interesting, both conceptually and to interpret empirical results, to characterize some scenarios where III(S; R1; C) = 0 for a recorded neural feature R1. III(S; R1; C) = 0 may correspond, among others, to one of the four scenarios illustrated in Fig.2: • R1 drives behavior but it is not informative about the stimulus, i.e. I(R1 : S) = 0 (Fig.2a); • R1 encodes information about S but it does not influence behavior, i.e. I(R1 : C) = 0 (Fig.2b); • R1 is informative about both S and C but I(S : C) = 0 (Fig.2c, see also Supp. Info Sec.2); • I(S : R1) > 0, I(R1 : C) > 0, I(S : C) > 0, but the sensory information I(S : R1) is not read out to drive the stimulus-relevant behavior and, at the same time, the way R1 affects the behaviour is not related to the stimulus (Fig.2d, see also Supp. Info Sec.2). 3 Testing our measure of intersection information with simulated data To better illustrate the properties of our measure of information-theoretic intersection information III(S; R; C), we simulated a very simple neural scheme that may underlie a perceptual discrimination task. As illustrated in Fig.3a, in every simulated trial we randomly drew a stimulus s ∈{s1, s2} which was then linearly converted to a continuous variable that represents the neural activity in the simulated sensory cortex. This stimulus-response conversion was affected by an additive Gaussian noise term (which we term “sensory noise”) whose amplitude was varied parametrically by changing the value of its standard deviation σS. The simulated sensory-cortex activity was then separately converted, with two distinct linear transformations, to two continuous variables that simulated two higher-level brain regions. These two variables are termed “parietal cortex” (R) and “bypass pathway” (R′), respectively. We then combined R and R′ with parametrically tunable weights (we indicate the ratio between the R-weight and the R′-weight with α, see Supp. Info Sec.4) and added Gaussian noise (termed “choice noise”), whose standard deviation σC was varied parametrically, to eventually produce another continuous variable that was fed to a linear discriminant. We took as the simulated behavioral choice the binary output of this final linear discriminant, which in our model was meant to represent the readout mechanism in high-level brain regions that inform the motor output. We ran simulations of this model by varying parametrically the sensory noise σS, the choice noise σC, and the parietal to bypass ratio α, to investigate how III(S; R; C) depended on these parameters. 5 Figure 3: a) Schematics of the simulated model used to test our framework. In each trial, a binary stimulus is linearly converted into a “sensory-cortex activity” after the addition of ’sensory noise’. This signal is then separately converted to two higher-level activities, namely a “parietal-cortex activity” R and a “bypass-pathway activity” R′. R and R′ are then combined with parametrically tunable weights and, after the addition of “choice noise”, this signal is fed to a linear discriminant. The output of the discriminant, that is the decoded stimulus ˆs, drives the binary choice c. We computed the intersection information of R to extract the part of the stimulus information encoded in the “parietal cortex” that contributes to the final choice. b-d) Intersection Information for the simulations represented in a). Mean ± sem of III(S; R; C) across 100 experimental sessions, each relying on 100 simulated trials, as a function of three independently varied simulation parameters. b) Intersection Information decreases when the stimulus representation in the parietal cortex R is more noisy (higher sensory noise σS ). c) Intersection Information decreases when the beneficial contribution of the stimulus information carried by parietal cortex R to the final choice is reduced by increasing choice noise σC. d) Intersection Information increases when the parietal cortex R contributes more strongly to the final choice by increasing the parietal to bypass ratio α. In each simulated session, we estimated the joint probability psession(s, r, c) of the stimulus S, the response in parietal cortex R, and the choice C, from 100 simulated trials. We computed, separately for each simulated session, an intersection information III(S; R; C) value from the estimated psession(s, r, c). Here, and in all the analyses presented throughout the paper, we used a quadratic extrapolation procedure to correct for the limited sampling bias of information [28]. In Fig.3b-d we show mean ± s.e.m. of III(S; R; C) values across 100 independent experimental sessions, as a function of each of the three simulation parameters. We found that III(S; R; C) decreases with increasing σS (Fig.3b). This result was explained by the fact that increasing σS reduces the amount of stimulus information that is passed to the simulated parietal activity R, and thus also reduces the portion of such information that can inform choice and can be used to perform the task appropriately. We found that III(S; R; C) decreases with increasing σC (Fig.3c), consistently with the intuition that for higher values of σC the choice depends more weakly on the activity of the simulated parietal activity R, which in turn also reduces how accurately the choice reflects the stimulus in each trial. We also found that III(S; R; C) increases with increasing α (Fig.3d), because when α is larger the portion of stimulus information carried by the simulated parietal activity R that benefits the behavioral performance is larger. 6 4 Using our measure to rank candidate neural codes for task performance: studying the role of spike timing for somatosensory texture discrimination The neural code was traditionally defined in previous studies as the set of features of neural activity that carry all or most sensory information. In this section, we show how III(S; R; C) can be used to quantitatively redefine the neural code as the set of features that contributes the most sensory information for task performance. The experimenter can thus use III(S; R; C) to rank a set of candidate neural features {R1, ..., RN} according to the numerical ordering III(S; Ri1; C) ≤... ≤ III(S; RiN ; C). An advantage of the information-theoretic nature of III(S; R; C) is that it quantifies intersection information on the meaningful scale of bits, and thus enables a quantitative comparison of different candidate neural codes. If for example III(S; R1; C) = 2III(S; R2; C) we can quantitatively interpret that the code R1 provides twice as much information for task performance as R2. This interpretation is not as meaningful, for example, when comparing different values of fraction-correct measures [17]. To illustrate the power of III(S; R; C) for evaluating and ranking candidate neural codes, we apply it to real data to investigate a fundamental question: is the sensory information encoded in millisecondscale spike times used by the brain to perform perceptual discrimination? Although many studies have shown that millisecond-scale spike times of cortical neurons encode sensory information not carried by rates, whether or not this information is used has remained controversial [16, 29, 30]. It could be, for example, that spike times cannot be read out because the biophysics of the readout neuronal systems is not sufficiently sensitive to transmit this information, or because the readout neural systems do not have access to a stimulus time reference that could be used to measure these spike times [31]. To investigate this question, we used intersection information to compute whether millisecondscale spike timing of neurons (n=299 cells) in rat primary (S1) somatosensory cortex provides information that is used for performing a whisker-based texture discrimination task (Figure 4a-b). Full experimental details are reported in [32]. In particular, we compared III(S; timing; C) with the intersection information carried by rate III(S; rate; C), i.e. information carried by spike counts over time scales of tens of milliseconds. We first computed a spike-timing feature by projecting the single-trial spike train onto a zero-mean timing template (constructed by linearly combining the first three spike trains PCs to maximize sensory information, following the procedure of [32]), whose shape indicated the weight assigned to each spike depending on its timing (Figure 4a). Then we computed a spike-rate feature by weighting the spikes with a flat template which assigns the same weight to spikes independently of their time. Note that this definition of timing, and in particular the fact that the timing template was zero mean, ensured that the timing variable did not contain any rate information. We verified that this calculation provided timing and rate features that had negligible (-0.0030 ± 0.0001 across the population) Pearson correlation. The difficulty of the texture discrimination task was set so that the rat learned the task well but still made a number of errors in each session (mean behavioral performance 76.9%, p<0.001 above chance, paired t-test). These error trials were used to decouple in part choice from stimulus coding and to assess the impact of the sensory neural codes on behavior by computing intersection information. We thus computed information across all trials, including both behaviorally correct and incorrect trials. We found that, across all trials and on average over the dataset, timing carried similar texture information to rate (Figure 4b) ((9 ± 2) × 10−3 bit in timing, (8.5 ± 1.1) × 10−3 bit in rate, p=0.78 two-sample t-test), while timing carried more choice information than rate ((16 ± 1) × 10−3 bit in timing, (3.0 ± 0.7) × 10−3 bit in rate, p<10−15 two-sample t-test). If we used only traditional measures of stimulus and choice information, it would be difficult to decide which code is most helpful for task performance. However, when we applied our new information-theoretic framework, we found that the intersection information III (Figure 4b) was higher for timing than for rate ((7 ± 1) × 10−3 bit in timing, (3.0 ± 0.6) × 10−3 bit in rate, p<0.002 two-sample t-test), thus suggesting that spike timing is a more crucial neural code for texture perception than spike rate. Interestingly, intersection information III was approximately 80% of the total sensory information for timing, while it was only 30% of the total sensory information for rate. This suggests that in somatosensory neurons timing information about the texture is read out, and influences choice, more efficiently than rate information, contrarily to what is widely assumed in the literature [34]. These results confirm early results that were obtained with a decoding-based intersection information measure [32]. However, the information theoretic results in Fig.4b have the advantage that they do 7 0 0.005 0.01 0.015 0.02 Rough Smooth Time Inst. rate Inst. rate Time Rate template Timing template X Left Right PPC AC (a) (b) (c) (d) *** AC PPC Rate Timing *** ** Information (bits) Information (bits) Stimulus Choice Intersection 0 0.004 0.008 0.012 Stimulus Choice Intersection * Figure 4: Intersection Information for two experimental datasets. a: Simplified schematics of the experimental setup in [32]. Rats are trained to distinguish between textures with different degrees of coarseness (left), and neural spiking data from somatosensory cortex (S1) is decomposed in independent rate and timing components (right). b: Stimulus, choice and intersection information for the data in panel a. Spike timing carries as much sensory information (p=0.78, 2-sample t-test), but more choice information (p<10−15), and more III (p<0.002) than firing rate. c: Simplified schematics of the experimental setup in [33]. Mice are trained to distinguish between auditory stimuli located to their left or to their right. Neural activity is recorded in auditory cortex (AC) and posterior parietal cortex (PPC) with 2-photon calcium imaging. d: Stimulus, choice and intersection information for the data in panel c. Stimulus information does not differ significantly between AC and PPC, but PPC has more choice information (p<0.05) and more III than AC (p<10−6, 2-sample t-test). not depend on the use of a specific decoder to calculate intersection information. Importantly, the new information theoretic approach also allowed us to quantify the proportion of sensory information in a neural code that is read out downstream for behavior, and thus to obtain the novel conclusion that only spike timing is read out with high efficiency. 5 Application of intersection information to discover brain areas transforming sensory information into choice Our intersection information measure III(S; R; C) can also be used as a metric to discover and index brain areas that perform the key computations needed for perceptual discrimination, and thus turn sensory information into choice. Suppose for example that we are investigating this issue by recording from populations of neurons in different areas. If we rank the neural activities in the recorded areas according to the sensory information they carry, we will find that primary sensory areas are ranked highly. Instead, if we rank the areas according to the choice information they carry, the areas encoding the motor output will be ranked highly. However, associative areas that transform sensory information into choice will not be found by any of these two traditional sensory-only and choice-only rankings, and there is no currently established metric to quantitatively identify such areas. Here we argue that III(S; R; C) can be used as such metric. To illustrate this possible use of III(S; R; C), we analyzed the activity of populations of single neurons recorded in mice with two-photon calcium imaging either in Auditory Cortex (AC, n=329 neurons) or in Posterior Parietal Cortex (PPC, n=384 neurons) while the mice were performing a sound location discrimination task and had to report the perceived sound location (left vs right) by the direction of their turn in a virtual-reality navigation setup (Fig.4c; full experimental details are available in Ref.[33]). AC is a primary sensory area, whereas PPC is an association area that has been described as a multisensory-motor interface [35, 36, 37], was shown to be essential for virtual-navigation tasks [36], and is implicated in the spatial processing of auditory stimuli [38, 39]. When applying our information theoretic formalism to these data, we found that similar stimulus (sound location) information was carried by the firing rate of neurons in AC and PPC (AC: (10 ± 3) × 10−3 bit, PPC: (5 ± 1) × 10−3 bit, p=0.17, two-sample t-test). Cells in PPC carried 8 more choice information than cells in AC (AC: (2.8 ± 1.4) × 10−3 bit, PPC: (6.4 ± 1.2) × 10−3 bit, p<0.05, two-sample t-test). However, neurons in PPC had values of III ((3.6 ± 0.8) × 10−3 bit) higher (p<10−6, two-sample t-test) than those of AC ((2.3 ± 0.8) × 10−3 bit): this suggests that the sensory information in PPC, though similar to that of AC, is turned into behavior into a much larger proportion (Figure 4d). Indeed, the ratio between III(S; R; C) and sensory information was higher in PPC than in AC (AC: (24 ± 11) %, PPC: (73 ± 24) %, p<0.03, one-tailed z-test). This finding reflects the associative nature of PPC as a sensory-motor interface. This result highlights the potential usefulness of III(S; R; C) as an important metric for the analysis of neuro-imaging experiments and the quantitative individuation of areas transforming sensory information into choice. 6 Discussion Here, we derived a novel information theoretic measure III(S; R; C) of the behavioral impact of the sensory information carried by the neural activity features R during perceptual discrimination tasks. The problem of understanding whether the sensory information in the recorded neural features really contributes to behavior is hotly debated in neuroscience [16, 17, 30]. As a consequence, a lot of efforts are being devoted to formulate advanced analytical tools to investigate this question [17, 40, 41]. A traditional and fruitful approach has been to compute the correlation between trialaveraged behavioral performance and trial-averaged stimulus decoding when presenting stimuli of increasing complexity [13, 14, 18]. However, this measure does not capture the relationship between fluctuations of neural sensory information and behavioral choice in the same experimental trial. To capture this single-trial relationship, Ref.[17] proposed to use a specific stimulus decoding algorithm to classify trials that give accurate sensory information, and then quantify the increase in behavioral performance in the trials where the sensory decoding is correct. However, this approach makes strong assumptions about the decoding mechanism, which may or may not be neurally plausible, and does not make use of the full structure of the trivariate S, R, C dependencies. In this work, we solved all the problems described above by extending the recent Partial Information Decomposition framework [19, 20] for the analysis of trivariate dependencies to identify III(S; R; C) as a part of the redundant information about C shared between S and R that is also a part of the sensory information I(S : R). This quantity satisfies several essential properties of a measure of intersection information between the sensory coding s →r and the consequent behavioral readout r →c, that we derived from the conceptual notions elaborated in Ref.[17]. Our measure III(S; R; C) provides a single-trial quantification of how much sensory information is used for behavior. This quantification refers to the absolute physical scale of bit units, and thus enables a direct comparison of different candidate neural codes for the analyzed task. Furthermore, our measure has the advantages of information-theoretical approaches, that capture all statistical dependencies between the recorded quantities irrespective of their relevance to neural function, as well as of model-based approaches, that link directly empirical data with specific theoretical hypotheses about sensory coding and behavioral readout but depend strongly on their underlying assumptions (see e.g. [12]). An important direction for future expansions of this work will be to combine III(S; R; C) with interventional tools on neural activity, such as optogenetics. Indeed, the novel statistical tools in this work cannot distinguish whether the measured value of intersection information III(S; R; C) derives from the causal involvement of R in transmitting sensory information for behavior, or whether R only correlates with causal information-transmitting areas [17]. More generally, this work can help us mapping information flow and not only information representation. We have shown above how computing III(S; R; C) separates the sensory information that is transmitted downstream to affect the behavioral output from the rest of the sensory information that is not transmitted. Further, another interesting application of III arises if we replace the final choice C with other nodes of the brain networks, and compute with III(S; R1; R2) the part of the sensory information in R1 that is transmitted to R2. Even more generally, besides the analysis of neural information processing, our measure III can be used in the framework of network information theory: suppose that an input X = (X1, X2) (with X1 ⊥⊥X2) is encoded by 2 different parallel channels R1, R2, which are then decoded to produce collectively an output Y . Suppose further that experimental measurements in single trials can only determine the value of X, Y , and R1, while the values of X1, X2, Y1, Y2, R2 are experimentally unaccessible. As we show in Supp. Fig. 3, III(X; R1; Y ) allows us to quantify the information between X and Y that passes through the channel R1, and thus does not pass through the channel R2. 9 7 Acknowledgements and author contributions GP was supported by a Seal of Excellence Fellowship CONISC. SP was supported by Fondation Bertarelli. CDH was supported by grants from the NIH (MH107620 and NS089521). CDH is a New York Stem Cell Foundation Robertson Neuroscience Investigator. TF was supported by the grants ERC (NEURO-PATTERNS) and NIH (1U01NS090576-01). CK was supported by the European Research Council (ERC-2014-CoG; grant No 646657). Author contributions: SP, GP and EP conceived the project; GP and EP performed the project; CAR, MED and CDH provided experimental data; GP, EP, HS, CK, SP and TF provided materials and analysis methods; GP, EP and SP wrote the paper; all authors commented on the manuscript; SP supervised the project. References [1] W. Bialek, F. Rieke, R.R. de Ruyter van Steveninck, and D. Warland. Reading a neural code. Science, 252(5014):1854–1857, 1991. [2] A. Borst and F.E. Theunissen. Information theory and neural coding. Nat. Neurosci., 2(11):947–957, 1999. [3] R. Quian Quiroga and S. Panzeri. Extracting information from neuronal populations: information theory and decoding approaches. Nat. Rev. Neurosci., 10(3):173–185, 2009. [4] D. V. Buonomano and W. Maass. State-dependent computations: spatiotemporal processing in cortical networks. Nat. Rev. Neurosci., 10:113–125, 2009. [5] M. A. Harvey, H. P. Saal, J. F. III Dammann, and S. J. Bensmaia. Multiplexing stimulus information through rate and temporal codes in primate somatosensory cortex. PLOS Biology, 11(5):e1001558, 2013. [6] C. Kayser, M. A. Montemurro, N. K. Logothetis, and S. Panzeri. Spike-phase coding boosts and stabilizes information carried by spatial and temporal spike patterns. Neuron, 61(4):597–608, 2009. [7] A. Luczak, B. L. McNaughton, and K. D. Harris. Packet-based communication in the cortex. Nat. Rev. Neurosci., 16(12):745–755, 2015. [8] S. Panzeri, N. Brunel, N. K. Logothetis, and C. Kayser. Sensory neural codes using multiplexed temporal scales. Trends Neurosci., 33(3):111–120, 2010. [9] M. Shamir. Emerging principles of population coding: in search for the neural code. Curr. Opin. Neurobiol., 25:140–148, 2014. [10] S. Panzeri, J.H. Macke, J. Gross, and C. Kayser. Neural population coding: combining insights from microscopic and mass signals. Trends Cogn. Sci., 19(3):162–172, 2015. [11] K. H. Britten, W. T. Newsome, M. N. Shadlen, S. Celebrini, and J. A. Movshon. A relationship between behavioral choice and the visual responses of neurons in macaque MT. Vis. Neurosci., 13:87–100, 1996. [12] R. M. Haefner, S. Gerwinn, J. H. Macke, and M. Bethge. Inferring decoding strategies from choice probabilities in the presence of correlated variability. Nat. Neurosci., 16:235–242, 2013. [13] W. T. Newsome, K. H. Britten, and J. A. Movshon. Neuronal correlates of a perceptual decision. Nature, 341(6237):52–54, 1989. [14] C. T. Engineer, C. A. Perez, Y. H. Chen, R. S. Carraway, A. C. Reed, J. A. Shetake, V. Jakkamsetti, K. Q. Chang, and M. P. Kilgard. Cortical activity patterns predict speech discrimination ability. Nat. Neurosci., 11:603–608, 2008. [15] A. L. Jacobs, G. Fridman, R. M. Douglas, N. M. Alam, P. E. Latham, G. T. Prusky, and S. Nirenberg. Ruling out and ruling in neural codes. Proc. Natl. Acad. Sci. U.S.A., 106(14):5936–5941, 2009. [16] R. Luna, A. Hernandez, C. D. Brody, and R. Romo. Neural codes for perceptual discrimination in primary somatosensory cortex. Nat. Neurosci., 8(9):1210–1219, 2005. [17] S. Panzeri, C. D. Harvey, E. Piasini, P. E. Latham, and T. Fellin. Cracking the Neural Code for Sensory Perception by Combining Statistics, Intervention, and Behavior. Neuron, 93(3):491–507, 2017. [18] R. Romo and E. Salinas. Flutter discrimination: neural codes, perception, memory and decision making. Nat. Rev. Neurosci., 4(3):203–218, 2003. 10 [19] P. Williams and R. Beer. Nonnegative decomposition of multivariate information. arXiv:1004.2515, 2010. [20] N. Bertschinger, J. Rauh, E. Olbrich, J. Jost, and N. Ay. Quantifying unique information. Entropy, 16(4):2161–2183, 2014. [21] G. Pica, E. Piasini, D. Chicharro, and S. Panzeri. Invariant components of synergy, redundancy, and unique information among three variables. Entropy, 19(9):451, 2017. [22] C. E. Shannon. A mathematical theory of communication. Bell System Technical Journal, 27(3):379–423, 1948. [23] M. Harder, C. Salge, and D. Polani. Bivariate measure of redundant information. Phys. Rev. E, 87(1):012130, 2013. [24] V. Griffith and C. Koch. Quantifying synergistic mutual information. In Guided Self-Organization: Inception, pages 159–190. Springer Berlin Heidelberg, 2014. [25] A. Barrett. Exploration of synergistic and redundant information sharing in static and dynamical gaussian systems. Phys. Rev. E, 91(5):052802, 2015. [26] D. Chicharro. Quantifying multivariate redundancy with maximum entropy decompositions of mutual information. arXiv:1708.03845, 2017. [27] N. Bertschinger, J. Rauh, E. Olbrich, and J. Jost. Shared information – new insights and problems in decomposing information in complex systems. In Proceedings of the ECCS 2012, Brussels, Belgium, 2012. [28] S. P. Strong, R. Koberle, R. R. de Ruyter van Steveninck, and W. Bialek. Entropy and information in neural spike trains. Phys. Rev. Lett., 80:197–200, 1998. [29] J. D. Victor and S. Nirenberg. Indices for testing neural codes. Neural Comput., 20(12):2895–2936, 2008. [30] D. H. O’ Connor, S. A. Hires, Z. V. Guo, N. Li, J. Yu, Q.-Q. Sun, D. Huber, and K. Svoboda. Neural coding during active somatosensation revealed using illusory touch. Nat. Neurosci., 16(7):958–965, 2013. [31] S. Panzeri, R. A. A. Ince, M. E. Diamond, and C. Kayser. Reading spike timing without a clock: intrinsic decoding of spike trains. Phil. Trans. R. Soc. Lond., B, Biol. Sci., 369(1637):20120467, 2014. [32] Y. Zuo, H. Safaai, G. Notaro, A. Mazzoni, S. Panzeri, and M. E. Diamond. Complementary contributions of spike timing and spike rate to perceptual decisions in rat S1 and S2 cortex. Curr. Biol., 25(3):357–363, 2015. [33] C. A. Runyan, E. Piasini, S. Panzeri, and C. D. Harvey. Distinct timescales of population coding across cortex. Nature, 548:92–96, 2017. [34] M. N. Shadlen and W. T. Newsome. The variable discharge of cortical neurons: Implications for connectivity, computation, and information coding. J. Neurosci., 18(10):3870–3896, 1998. [35] J. I. Gold and M. N. Shadlen. The neural basis of decision making. Annu. Rev. Neurosci., 30(1):535–574, 2007. [36] C. D. Harvey, P. Coen, and D. W. Tank. Choice-specific sequences in parietal cortex during a virtualnavigation decision task. Nature, 484(7392):62–68, 2012. [37] D. Raposo, M. T. Kaufman, and A. K. Churchland. A category-free neural population supports evolving demands during decision-making. Nat. Neurosci., 17(12):1784–1792, 2014. [38] K. Nakamura. Auditory spatial discriminatory and mnemonic neurons in rat posterior parietal cortex. J. Neurophysiol., 82(5):2503, 1999. [39] J. P. Rauschecker and B. Tian. Mechanisms and streams for processing of "what" and "where" in auditory cortex. Proc. Natl. Acad. Sci. U.S.A., 97(22):11800–11806, 2000. [40] R. Rossi-Pool, E. Salinas, A. Zainos, M. Alvarez, J. Vergara, N. Parga, and R. Romo. Emergence of an abstract categorical code enabling the discrimination of temporally structured tactile stimuli. Proc. Natl. Acad. Sci. U.S.A., 113(49):E7966–E7975, 2016. [41] X. Pitkow, S. Liu, D. E. Angelaki, G. C. DeAngelis, and A. Pouget. How can single sensory neurons predict behavior? Neuron, 87(2):411–423, 2015. 11 | 2017 | 449 |
6,951 | Identification of Gaussian Process State Space Models Stefanos Eleftheriadis†, Thomas F.W. Nicholson†, Marc P. Deisenroth†‡, James Hensman† †PROWLER.io, ‡Imperial College London {stefanos, tom, marc, james}@prowler.io Abstract The Gaussian process state space model (GPSSM) is a non-linear dynamical system, where unknown transition and/or measurement mappings are described by GPs. Most research in GPSSMs has focussed on the state estimation problem, i.e., computing a posterior of the latent state given the model. However, the key challenge in GPSSMs has not been satisfactorily addressed yet: system identification, i.e., learning the model. To address this challenge, we impose a structured Gaussian variational posterior distribution over the latent states, which is parameterised by a recognition model in the form of a bi-directional recurrent neural network. Inference with this structure allows us to recover a posterior smoothed over sequences of data. We provide a practical algorithm for efficiently computing a lower bound on the marginal likelihood using the reparameterisation trick. This further allows for the use of arbitrary kernels within the GPSSM. We demonstrate that the learnt GPSSM can efficiently generate plausible future trajectories of the identified system after only observing a small number of episodes from the true system. 1 Introduction State space models can effectively address the problem of learning patterns and predicting behaviour in sequential data. Due to their modelling power they have a vast applicability in various domains of science and engineering, such as robotics, finance, neuroscience, etc. (Brown et al., 1998). Most research and applications have focussed on linear state space models for which solutions for inference (state estimation) and learning (system identification) are well established (Kalman, 1960; Ljung, 1999). In this work, we are interested in non-linear state space models. In particular, we consider the case where a Gaussian process (GP) (Rasmussen and Williams, 2006) is responsible for modelling the underlying dynamics. This is widely known as the Gaussian process state space model (GPSSM). We choose to build upon GPs for a number of reasons. First, they are non-parametric, which makes them effective in learning from small datasets. This can be advantageous over wellknown parametric models (e.g., recurrent neural networks—RNNs), especially in situation where data are not abundant. Second, we want to take advantage of the probabilistic properties of GPs. By using a GP for the latent transitions, we can get away with an approximate model and learn a distribution over functions. This allows us to account for model errors whilst quantifying uncertainty, as discussed and empirically shown by Schneider (1997) and Deisenroth et al. (2015). Consequently, the system will not become overconfident in regions of the space where data are scarce. System identification with the GPSSM is a challenging task. This is due to un-identifiability issues: both states and transition functions are unknown. Most work so far has focused only on state estimation of the GPSSM. In this paper, we focus on addressing the challenge of system identification and based on recent work by Frigola et al. (2014) we propose a novel inference method for learning the GPSSM. We approximate the entire process of the state transition function by employing the framework of variational inference. We assume a Markov-structured Gaussian posterior distribution over the latent states. The variational posterior can be naturally combined with a recognition model 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. based on bi-directional recurrent neural networks, which facilitate smoothing of the state posterior over the data sequences. We present an efficient algorithm based on the reparameterisation trick for computing the lower bound on the marginal likelihood. This significantly accelerates learning of the model and allows for arbitrary kernel functions. 2 Gaussian process state space models We consider the dynamical system xt = f(xt−1, at−1) + ✏f, yt = g(xt) + ✏g, (1) where t indexes time, x 2 RD is a latent state, a 2 RP are control signals (actions) and y 2 RO are measurements/observations. We assume i.i.d. Gaussian system/measurement noise ✏(·) ⇠ N ! 0, σ2 (·)I " . The state-space model in eq. (1) can be fully described by the measurement and transition functions, g and f. The key idea of a GPSSM is to model the transition function f and/or the measurement function g in eq. (1) using GPs, which are distributions over functions. A GP is fully specified by a mean ⌘(·) and a covariance/kernel function k(·, ·), see e.g., (Rasmussen and Williams, 2006). The covariance function allows us to encode basic structural assumptions of the class of functions we want to model, e.g., smoothness, periodicity or stationarity. A common choice for a covariance function is the radial basis function (RBF). Let f(·) denote a GP random function, and X = [xi]N i=1 be a series of points in the domain of that function. Then, any finite subset of function evaluations, f = [f(xi)]N i=1, are jointly Gaussian distributed p(f|X) = N ! f | ⌘, Kxx " , (2) where the matrix Kxx contains evaluations of the kernel function at all pairs of datapoints in X, and ⌘= [⌘(xi)]N i=1 is the prior mean function. This property leads to the widely used GP regression model: if Gaussian noise is assumed, the marginal likelihood can be computed in closed form, enabling learning of the kernel parameters. By definition, the conditional distribution of a GP is another GP. If we are to observe the values f at the input locations X, then we predict the values elsewhere on the GP using the conditional f(·) | f ⇠GP ! ⌘(·) + k(·, X)K−1 xx (f −⌘)), k(·, ·) −k(·, X)K−1 xx k(X, ·) " . (3) Unlike the supervised setting, in the GPSSM, we are presented with neither values of the function on which to condition, nor on inputs to the function since the hidden states xt are latent. The challenge of inference in the GPSSM lies in dually inferring the latent variables x and in fitting the Gaussian process dynamics f(·). In the GPSSM, we place independent GP priors on the transition function f in eq. (1) for each output dimension of xt+1, and collect realisations of those functions in the random variables f, such that fd(·) ⇠GP ! ⌘d(·), kd(·, ·) " , f t = [fd(˜xt−1)]D d=1 and p(xt|f t) = N(xt|f t, σ2 fI), (4) where we used the short-hand notation ˜xt = [xt, at] to collect the state-action pair at time t. In this work, we use a mean function that keeps the state constant, so ⌘d(˜xt) = x(d) t . To reduce some of the un-identifiability problems of GPSSMs, we assume a linear measurement mapping g so that the data conditional is p(yt|xt) = N(yt|Wgxt + bg, σ2 gI) . (5) The linear observation model g(x) = Wgx + bg + ✏g is not limiting since a non-linear g could be replaced by additional dimensions in the state space (Frigola, 2015). 2.1 Related work State estimation in GPSSMs has been proposed by Ko and Fox (2009a) and Deisenroth et al. (2009) for filtering and by Deisenroth et al. (2012) and Deisenroth and Mohamed (2012) for smoothing using both deterministic (e.g., linearisation) and stochastic (e.g., particles) approximations. These 2 approaches focused only on inference in learnt GPSSMs and not on system identification, since learning of the state transition function f without observing the system’s true state x is challenging. Towards this approach, Wang et al. (2008), Ko and Fox (2009b) and Turner et al. (2010) proposed methods for learning GPSSMs based on maximum likelihood estimation. Frigola et al. (2013) followed a Bayesian treatment to the problem and proposed an inference mechanism based on particle Markov chain Monte Carlo. Specifically, they first obtain sample trajectories from the smoothing distribution that could be used to define a predictive density via Monte Carlo integration. Then, conditioned on this trajectory they sample the model’s hyper-parameters. This approach scales proportionally to the length of the time series and the number of the particles. To tackle this inefficiency, Frigola et al. (2014) suggested a hybrid inference approach combining variational inference and sequential Monte Carlo. Using the sparse variational framework from (Titsias, 2009) to approximate the GP led to a tractable distribution over the state transition function that is independent of the length of the time series. An alternative to learning a state-space model is to follow an autoregressive strategy (as in MurraySmith and Girard, 2001; Likar and Kocijan, 2007; Turner, 2011; Roberts et al., 2013; Kocijan, 2016), to directly model the mapping from previous to current observations. This can be problematic since noise is propagated through the system during inference. To alleviate this, Mattos et al. (2015) proposed the recurrent GP, a non-linear dynamical model that resembles a deep GP mapping from observed inputs to observed outputs, with an autoregressive structure on the intermediate latent states. They further followed the idea by Dai et al. (2015) and introduced an RNN-based recognition model to approximate the true posterior of the latent state. A downside is the requirement to feed future actions forward into the RNN during inference, in order to propagate uncertainty towards the outputs. Another issue stems from the model’s inefficiency in analytically computing expectations of the kernel functions under the approximate posterior when dealing with high-dimensional latent states. Recently, Al-Shedivat et al. (2016), introduced a recurrent structure to the manifold GP (Calandra et al., 2016). They proposed to use an LSTM in order to map the observed inputs onto a non-linear manifold, where the GP actually operates on. For inefficiency, they followed an approximate inference scheme based on Kronecker products over Toeplitz-structured kernels. 3 Inference Our inference scheme uses variational Bayes (see e.g., Beal, 2003; Blei et al., 2017). We first define the form of the approximation to the posterior, q(·). Then we derive the evidence lower bound (ELBO) with respect to which the posterior approximation is optimised in order to minimise the Kullback-Leibler divergence between the approximate and true posterior. We detail how the ELBO is estimated in a stochastic fashion and optimized using gradient-based methods, and describe how the form of the approximate posterior is given by a recurrent neural network. The graphical models of the GPSSM and our proposed approximation are shown in Figure 1. 3.1 Posterior approximation Following the work by Frigola et al. (2014), we adopt a variational approximation to the posterior, assuming factorisation between the latent functions f(·) and the state trajectories X. However, unlike Frigola et al.’s work, we do not run particle MCMC to approximate the state trajectories, but instead assume that the posterior over states is given by a Markov-structured Gaussian distribution parameterised by a recognition model (see section 3.3). In concordance with Frigola et al. (2014), we adopt a sparse variational framework to approximate the GP. The sparse approximation allows us to deal with both (a) the unobserved nature of the GP inputs and (b) any potential computational scaling issues with the GP by controlling the number of inducing points in the approximation. The variational approximation to the GP posterior is formed as follows: Let Z = [z1, . . . , zM] be some points in the same domain as ˜x. For each Gaussian process fd(·), we define the inducing variables ud = [fd(zm)]M m=1, so that the density of ud under the GP prior is N(⌘d, Kzz), with ⌘d = [⌘d(zm)]M m=1. We make a mean-field variational approximation to the posterior for U, taking the form q(U) = QD d=1 N(ud | µd, ⌃d). The variational posterior of the rest of the points on the GP is assumed to be given by the same conditional distribution as the prior: fd(·) | ud ⇠GP ! ⌘d(·) + k(·, Z)K−1 zz (ud −⌘d), k(·, ·) −k(·, Z)K−1 zz k(Z, ·) " . (6) 3 y1 y2 y3 x1 x2 x3 x0 fd(·) ∞ a1 a2 a3 y1 y2 y3 x1 x2 x3 x0 h1 h2 h3 h0 Wỹ Wỹ Wỹ WA,L W(f,b) h W(f,b) h W(f,b) h WA,L WA,L WA,L a1 a2 fd(·) ∞ μ a3 υ d d Figure 1: The GPSSM with the GP state transition functions (left), and the proposed approximation with the recognition model in the form of a bi-RNN (right). Black arrows show conditional dependencies of the model, red arrows show the data-flow in the recognition. Integrating this expression with respect to the prior distribution p(ud) = N(⌘d, Kzz) gives the GP prior in eq. (4). Integrating with respect to the variational distribution q(U) gives our approximation to the posterior process fd(·) ⇠GP ! µd(·), vd(·, ·) " , with µd(·) = ⌘d(·) + k(·, Z)K−1 zz (µd −⌘d), (7) vd(·, ·) = k(·, ·) −k(·, Z)K−1 zz [Kzz −⌃d]K−1 zz k(Z, ·) . (8) The approximation to the posterior of the state trajectory is assumed to have a Gauss-Markov structure: q(x0) = N ! x0 | m0, L0L> 0 " , q(xt | xt−1) = N ! xt | Atxt−1, LtL> t " . (9) This distribution is specified through a single mean vector m0, a series of square matrices At, and a series of lower-triangular matrices Lt. It serves as a locally linear approximation to an overall non-linear posterior over the states. This is a good approximation provided that the ∆t between the transitions is sufficiently small. With the approximating distributions for the variational posterior defined in eq. (7)–(9), we are ready to derive the evidence lower bound (ELBO) on the model’s true likelihood. Following (Frigola, 2015, eq. (5.10)), the ELBO is given by ELBO = Eq(x0)[log p(x0)] + H[q(X)] −KL[q(U) || p(U)] + Eq(X) h T X t=1 D X d=1 −1 2σ2 f vd(˜xt−1, ˜xt−1) + log N ! x(d) t | µd(˜xt−1), σ2 f "i + Eq(X) h T X t=1 log N ! yt | g(xt), σ2 gIO "i , (10) where KL[·||·] is the Kullback-Leibler divergence, and H[·] denotes the entropy. Note that with the above formulation we can naturally deal with multiple episodic data since the ELBO can be factorised across independent episodes. We can now learn the GPSSM by optimising the ELBO w.r.t. the parameters of the model and the variational parameters. A full derivation is provided in the supplementary material. The form of the ELBO justifies the Markov-structure that we have assumed for the variational distribution q(X): we see that the latent states only interact over pairwise time steps xt and xt−1; adding further structure to q(X) is unnecessary. 3.2 Efficient computation of the ELBO To compute the ELBO in eq. (10), we need to compute expectations w.r.t. q(X). Frigola et al. (2014) showed that for the RBF kernel the relevant expectations can be computed in closed form in a similar way to Titsias and Lawrence (2010). To allow for general kernels we propose to use the reparameterisation trick (Kingma and Welling, 2014; Rezende et al., 2014) instead: by sampling a single trajectory from q(X) and evaluating the integrands in eq. (10), we obtain an unbiased estimate of the ELBO. To draw a sample from the Gauss-Markov structure in eq. (9), we first sample ✏t ⇠N(0, I), t = 0, . . . , T, and then apply recursively the affine transformation x0 = m0 + L0✏0, xt = Atxt−1 + Lt✏t . (11) 4 This simple estimator of the ELBO can then be used in optimisation using stochastic gradient methods; we used the Adam optimizer (Kingma and Ba, 2015). It may seem initially counter-intuitive to use a stochastic estimate of the ELBO where one is available in closed form, but this approach offers two distinct advantages. First, computation is dramatically reduced: our scheme requires O(TD) storage in order to evaluate the integrand in eq. (10) at a single sample from q(X). A scheme that computes the integral in closed form requires O(TM 2) (where M is the number of inducing variables in the sparse GP) storage for the sufficient statistics of the kernel evaluations. The second advantage is that we are no longer restricted to the RBF kernel, but can use any valid kernel for inference and learning in GPSSMs. The reparameterisation trick also allows us to perform batched updates of the model parameters, amounting to doubly stochastic variational inference (Titsias and Lázaro-Gredilla, 2014), which we experimentally found to improve run-time and sample-efficiency. Some of the elements of the ELBO in eq. (10) are still available in closed-form. To reduce the variance of the estimate of the ELBO we exploit this where possible: the entropy of the GaussMarkov structure is H[q(X)] = −T D 2 log(2⇡e) −PT t=0 log(det(Lt)); the expected likelihood (last term in eq. (10)) can be computed easily given the marginals of q(X), which are given by q(xt) = N(mt, ⌃t), mt = Atmt−1, ⌃t = At⌃t−1A> t + LtL> t , (12) and the necessary Kullback-Leibler divergences can be computed analytically: we use the implementations from GPflow (Matthews et al., 2017). 3.3 A recurrent recognition model The variational distribution of the latent trajectories in eq. (9) has a large number of parameters (At, Lt) that grows with the length of the dataset. Further, if we wish to train a model on multiple episodes (independent data sequences sharing the same dynamics), then the number of parameters grows further. To alleviate this, we propose to use a recognition model in the form of a bi-directional recurrent neural network (bi-RNN), which is responsible for recovering the variational parameters At, Lt. A bi-RNN is a combination of two independent RNNs operating on opposite directions of the sequence. Each network is specified by two weight matrices W acting on a hidden state h: h(f) t = φ(W (f) h h(f) t−1 + W (f) ˜y ˜yt + b(f) h ) , forward passing (13) h(b) t = φ(W (b) h h(b) t+1 + W (b) ˜y ˜yt + b(b) h ) , backward passing (14) where ˜yt = [yt, at] denotes the concatenation of the observed data and control actions and the superscripts denote the direction (forward/backward) of the RNN. The activation function φ (we use the tanh function), acts on each element of its argument separately. In our experiments we found that using gated recurrent units (Cho et al., 2014) improved performance of our model. We now make the parameters of the Gauss-Markov structure dependent on the sequences h(f), h(b), so that At = reshape(WA[h(f) t ; h(b) t ] + bA), Lt = reshape(WL[h(f) t ; h(b) t ] + bL) . (15) The parameters of the Gauss-Markov structure q(X) are now almost completely encapsulated in the recurrent recognition model as W (f,b) h , W (f,b) ˜y , WA, WL, b(f,b) h , bA, bL. We only need to infer the parameters of the initial state, m0, L0 for each episode; this is where we utilise the functionality of the bi-RNN structure. Instead of directly learning the initial state q(x0), we can now obtain it indirectly via the output state of the backward RNN. Another nice property of the proposed recognition model is that now q(X) is recognised from both future and past observations, since the proposed bi-RNN recognition model can be regarded as a forward and backward sequential smoother of our variational posterior. Finally, it is worth noting the interplay between the variational distribution q(X) and the recognition model. Recall that the variational distribution is a Bayesian linear approximation to the non-linear posterior and is fully defined by the time varying parameters, At, Lt; the recognition model has the role to recover these parameters via the non-linear and time invariant RNN. 4 Experiments We benchmark the proposed GPSSM approach on data from one illustrative example and three challenging non-linear data sets of simulated and real data. Our aim is to demonstrate that we can: (i) 5 −2 −1 0 1 2 3 4 5 6 −2 0 2 4 xt xt+1 RBF GP posterior inducing points ground truth −2 −1 0 1 2 3 4 5 6 xt RBF GP posterior inducing points −2 −1 0 1 2 3 4 5 6 xt RBF + Matern −2 −1 0 1 2 3 4 5 6 xt RBF + Matern −2 −1 0 1 2 3 4 5 6 xt Arc-cosine −2 −1 0 1 2 3 4 5 6 xt Arc-cosine −2 −1 0 1 2 3 4 5 6 xt MGP −2 −1 0 1 2 3 4 5 6 xt MGP Figure 2: The learnt state transition function with different kernels. The true function is given by eq. (16). benefit from the use of non-smooth kernels with our approximate inference and accurately model non-smooth transition functions; (ii) successfully learn non-linear dynamical systems even from noisy and partially observed inputs; (iii) sample plausible future trajectories from the system even when trained with either a small number of episodes or long time sequences. 4.1 Non-linear system identification We first apply our approach to a synthetic dataset generated broadly according to (Frigola et al., 2014). The data is created using a non-linear, non-smooth transition function with additive state and observation noise according to: p(xt+1|xt) = N(f(xt), σ2 f), and p(yt|xt) = N(xt, σ2 g), where f(xt) = xt + 1, if xt < 4, 13 −2xt, otherwise . (16) In our experiments, we set the system and measurement noise variances to σ2 f = 0.01 and σ2 g = 0.1, respectively, and generate 200 episodes of length 10 that were used as the observed data for training the GPSSM. We used 20 inducing points (initialised uniformly across the range of the input data) for approximating the GP and 20 hidden units for the recurrent recognition model. We evaluate the following kernels: RBF, additive composition of the RBF (initial ` = 10) and Matern (⌫= 1 2, initial ` = 0.1), 0-order arc-cosine (Cho and Saul, 2009), and the MGP kernel (Calandra et al., 2016) (depth 5, hidden dimensions [3, 2, 3, 2, 3], tanh activation, Matern (⌫= 1 2) compound kernel). The learnt GP state transition functions are shown in Figure 2. With the non-smooth kernels we are able to learn accurate transitions and model the instantaneous dynamical change, as opposed to the smooth transition learnt with the RBF. Note that all non-smooth kernels place inducing points directly on the peak (at xt = 4) to model the kink, whereas the RBF kernel explains this behaviour as a longerscale wiggliness of the posterior process. When using a kernel without the RBF component the GP posterior quickly reverts to the mean function (⌘(x) = x) as we move away from the data: the short length-scales that enable them to model the instantaneous change prevent them from extrapolating downwards in the transition function. The composition of the RBF and Matern kernel benefits from long and short length scales and can better extrapolate. The posteriors can be viewed across a longer range of the function space in the supplementary material. 4.2 Modelling cart-pole dynamics We demonstrate the efficacy of the proposed GPSSM on learning the non-linear dynamics of the cart-pole system from (Deisenroth and Rasmussen, 2011). The system is composed of a cart running on a track, with a freely swinging pendulum attached to it. The state of the system consists of the cart’s position and velocity, and the pendulum’s angle and angular velocity, while a horizontal force (action) a 2 [−10, 10]N can be applied to the cart. We used the PILCO algorithm from (Deisenroth and Rasmussen, 2011) to learn a feedback controller that swings the pendulum and balances it in the inverted position in the middle of the track. We collected trajectory data from 16 trials during learning; each trajectory/episode was 4 s (40 time steps) long. When training the GPSSM for the cart-pole system we used data up to the first 15 episodes. We used 100 inducing points to approximate the GP function with a Matern ⌫= 1 2 and 50 hidden units for the recurrent recognition model. The learning rate for the Adam optimiser was set to 10−3. We qualitatively assess the performance of our model by feeding the control sequence of the last episode to the GPSSM in order to generate future responses. 6 −0.4 −0.2 0 0.2 0.4 cart position 2 episodes (80 time steps in total) −0.4 −0.2 0 0.2 0.4 cart position 0 5 10 15 20 25 30 35 40 −10 10 time step control signal 8 episodes (320 time steps in total) 0 5 10 15 20 25 30 35 40 time step 15 episodes (600 time steps in total) 0 5 10 angle 0 5 10 15 20 25 30 35 40 time step 0 5 10 angle Figure 3: Predicting the cart’s position and pendulum’s angle behaviour from the cart-pole dataset by applying the control signal of the testing episode to sampled future trajectories from the proposed GPSSM. Learning of the dynamics is demonstrated with observed (upper row) and hidden (lower row) velocities and with increasing number of training episodes. Ground truth is denoted with the marked lines. In Figure 3, we demonstrate the ability of the proposed GPSSM to learn the underlying dynamics of the system from a different number of episodes with fully and partially observed data. In the top row, the GPSSM observes the full 4D state, while in the bottom row, we train the GPSSM with only the cart’s position and the pendulum’s angle observed (i.e., the true state is not fully observed since the velocities are hidden). In both cases, sampling long-term trajectories based on only 2 episodes for training does not result in plausible future trajectories. However, we could model part of the dynamics after training with only 8 episodes (320 time steps interaction with the system), while training with 15 episodes (600 time steps in total) allowed the GPSSM to produce trajectories similar to the ground truth. It is worth emphasising the fact that the GPSSM could recover the unobserved velocities in the latent states, which resulted in smooth transitions of the cart and swinging of the pendulum. However, it seems that the recovered cart’s velocity is overestimated. This is evidenced by the increased variance in the prediction of the cart’s position around 0 (the centre of the track). Detailed fittings for each episode and learnt latent states with observed and hidden velocities are provided in the supplementary material. Table 1: Average Euclidean distance between the true and the predicted trajectories, measured at the pendulum’s tip. The error is in pendulum’s length units. 2 episodes 8 episodes 15 episodes Kalman 1.65 1.52 1.48 ARGP 1.22 1.03 0.80 GPSSM 1.21 0.67 0.59 −0.4 −0.2 0 0.2 0.4 cart position 0 5 10 15 20 25 30 35 40 −10 10 time step control signal 0 5 10 angle Figure 4: Predictions with lagged actions. In Table 1, we provide the average Euclidean distance between the predicted and the true trajectories measured at the pendulum’s tip, with fully observed states. We compare to two baselines: (i) the auto-regressive GP (ARGP) that maps the tuple [yt−1, at−1] to the next observation yt (as in PILCO (Deisenroth et al., 2015)), and (ii) a linear system for identification that uses the Kalman filtering technique (Kalman, 1960). We see that the GPSSM significantly outperforms the baselines on this highly non-linear benchmark. The linear system cannot learn the dynamics at all, while the ARGP only manages to produce sensible error (less than a pendulum’s length) after seeing 15 episodes. Note 7 that the GPSSM trained on 8 episodes produces trajectories with less error than the ARGP trained on 15 episodes. We also ran experiments using lagged actions where the partially observed state at time t is affected by the action at t −2. Figure 4 shows that we are able to sample future trajectories with an accuracy similar to time-aligned actions. This indicates that our model is able to learn a compressed representation of the full state and previous inputs, essentially ‘remembering’ the lagged actions. 4.3 Modelling double pendulum dynamics We demonstrate the learning and modelling of the dynamics of the double pendulum system from (Deisenroth et al., 2015). The double pendulum is a two-link robot arm with two actuators. The state of the system consists of the angles and the corresponding angular velocities of the inner and outer link, respectively, while different torques a1, a2 2 [−2, 2] Nm can be applied to the two actuators. The task of swinging the double pendulum and balancing it in the upwards position is extremely challenging. First, it requires the interplay of two correlated control signals (i.e., the torques). Second, the behaviour of the system, when operating at free will, is chaotic. We learn the underlying dynamics from episodic data (15 episodes, 30 time steps long each). Training of the GPSSM was performed with data up to 14 episodes, while always demonstrating the learnt underlying dynamics on the last episode, which serves as the test set. We used 200 inducing points to approximate the GP function with a Matern ⌫= 1 2 and 80 hidden units for the recurrent recognition model. The learning rate for the Adam optimiser was set to 10−3. The difficulty of the task is evident in Figure 5, where we can see that even after observing 14 episodes we cannot accurately predict the system’s future behaviour for more than 15 time steps (i.e., 1.5 s). It is worth noting that we can generate reliable simulation even though we observe only the pendulums’ angles. 3 4 5 6 inner angle 2 episodes 3 4 5 6 inner angle 0 5 10 15 20 25 30 -2 2 time step inner torque outer torque 8 episodes 0 5 10 15 20 25 30 time step 14 episodes 0 2 4 outer angle 0 5 10 15 20 25 30 time step 0 2 4 outer angle Figure 5: Predicting the inner and outer pendulum’s angle from the double pendulum dataset by applying the control signals of the testing episode to sampled future trajectories from the proposed GPSSM. Learning of the dynamics is demonstrated with observed (upper row) and hidden (lower row) angular velocities and with increasing number of training episodes. Ground truth is denoted with the marked lines. 4.4 Modelling actuator dynamics Here we evaluate the proposed GPSSM on real data from a hydraulic actuator that controls a robot arm (Sjöberg et al., 1995). The input is the size of the actuator’s valve opening and the output is its oil pressure. We train the GPSSM on half the sequence (512 steps) and evaluate the model on the remaining half. We use 15 inducing points to approximate the GP function with a combination of an RBF and a Matern ⌫= 1 2 and 15 hidden units for the recurrent recognition model. Figure 6 8 −4 −2 0 2 4 training testing −50 0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 850 900 950 1,000 1,050 −11 time step control signal Figure 6: Demonstration of the identified model that controls the non-linear dynamics of the actuator dataset. The model’s fitting on the train data and sampled future predictions, after applying the control signal to the system. Ground truth is denoted with the marked lines. shows the fitting on the train data along with sampled future predictions from the learnt system when operating on a free simulation mode. It is worth noting the correct capturing of the uncertainty from the model at the points where the predictions are not accurate. 5 Discussion and conclusion We have proposed a novel inference mechanism for the GPSSM, in order to address the challenging task of non-linear system identification. Since our inference is based on the variational framework, successful learning of the model relies on defining good approximations to the posterior of the latent functions and states. Approximating the posterior over the dynamics with a sparse GP seems to be a reasonable choice given our assumptions over the transition function. However, the difficulty remains in the selection of the approximate posterior of the latent states. This is the key component that enables successful learning of the GPSSM. In this work, we construct the variational posterior so that it follows the same Markov properties as the true states. Furthermore, it is enforced to have a simple-to-learn, linear, time-varying structure. To assure, though, that this approximation has rich representational capacity we proposed to recover the variational parameters of the posterior via a non-linear recurrent recognition model. Consequently, the joint approximate posterior resembles the behaviour of the true system, which facilitates the effective learning of the GPSSM. In the experimental section we have provided evidence that the proposed approach is able to identify latent dynamics in true and simulated data, even from partial and lagged observations, while requiring only small data sets for this challenging task. Acknowledgement Marc P. Deisenroth has been supported by a Google faculty research award. References Maruan Al-Shedivat, Andrew G. Wilson, Yunus Saatchi, Zhiting Hu, and Eric P. Xing. Learning scalable deep kernels with recurrent structure. arXiv preprint arXiv:1610.08936, 2016. Matthew J. Beal. Variational algorithms for approximate Bayesian inference. PhD thesis, University of London, London, UK, 2003. David M. Blei, Alp Kucukelbir, and Jon D. McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 112(518):859–877, 2017. Emery N. Brown, Loren M. Frank, Dengda Tang, Michael C. Quirk, and Matthew A. Wilson. A statistical paradigm for neural spike train decoding applied to position prediction from ensemble firing patterns of rat hippocampal place cells. Journal of Neuroscience, 18(18):7411–7425, 1998. Roberto Calandra, Jan Peters, Carl E. Rasmussen, and Marc P. Deisenroth. Manifold Gaussian processes for regression. In IEEE International Joint Conference on Neural Networks, 2016. 9 KyungHyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. Youngmin Cho and Lawrence K. Saul. Kernel methods for deep learning. In Advances in Neural Information Processing Systems, pages 342–350. 2009. Zhenwen Dai, Andreas Damianou, Javier González, and Neil Lawrence. Variational auto-encoded deep Gaussian processes. In International Conference on Learning Representations, 2015. Marc P. Deisenroth and Shakir Mohamed. Expectation propagation in Gaussian process dynamical systems. In Advances in Neural Information Processing Systems, pages 2618–2626, 2012. Marc P. Deisenroth and Carl E. Rasmussen. PILCO: A model-based and data-efficient approach to policy search. In International Conference on Machine Learning, pages 465–472, 2011. Marc P. Deisenroth, Marco F. Huber, and Uwe D. Hanebeck. Analytic moment-based Gaussian process filtering. In International Conference on Machine Learning, pages 225–232, 2009. Marc P. Deisenroth, Ryan D. Turner, Marco Huber, Uwe D. Hanebeck, and Carl E. Rasmussen. Robust filtering and smoothing with Gaussian processes. IEEE Transactions on Automatic Control, 57(7):1865–1871, 2012. Marc P. Deisenroth, Dieter Fox, and Carl E. Rasmussen. Gaussian processes for data-efficient learning in robotics and control. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(2): 408–423, 2015. Roger Frigola. Bayesian time series learning with Gaussian processes. PhD thesis, University of Cambridge, Cambridge, UK, 2015. Roger Frigola, Fredrik Lindsten, Thomas B. Schön, and Carl E. Rasmussen. Bayesian inference and learning in Gaussian process state-space models with particle MCMC. In Advances in Neural Information Processing Systems, pages 3156–3164, 2013. Roger Frigola, Yutian Chen, and Carl E. Rasmussen. Variational Gaussian process state-space models. In Advances in Neural Information Processing Systems, pages 3680–3688, 2014. Rudolf E. Kalman. A new approach to linear filtering and prediction problems. Transactions of the American Society of Mathematical Engineering, Journal of Basic Engineering, 82(D):35–45, 1960. Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. Diederik P. Kingma and Max Welling. Auto-encoding variational Bayes. In International Conference on Learning Representations, 2014. Jonathan Ko and Dieter Fox. GP-BayesFilters: Bayesian filtering using Gaussian process prediction and observation models. Autonomous Robots, 27(1):75–90, 2009a. Jonathan Ko and Dieter Fox. Learning GP-BayesFilters via Gaussian process latent variable models. In Robotics: Science and Systems, 2009b. Juš Kocijan. Modelling and control of dynamic systems using Gaussian process models. Springer, 2016. Bojan Likar and Juš Kocijan. Predictive control of a gas-liquid separation plant based on a Gaussian process model. Computers & Chemical Engineering, 31(3):142–152, 2007. Lennart Ljung. System identification: Theory for the user. Prentice Hall, 1999. Alexander G. de G. Matthews. Scalable Gaussian process inference using variational methods. PhD thesis, University of Cambridge, Cambridge, UK, 2017. 10 Alexander G. de G. Matthews, James Hensman, Richard E. Turner, and Zoubin Ghahramani. On sparse variational methods and the Kullback-Leibler divergence between stochastic processes. In International Conference on Artificial Intelligence and Statistics, volume 51 of JMLR W&CP, pages 231–239, 2016. Alexander G. de G. Matthews, Mark van der Wilk, Tom Nickson, Keisuke Fujii, Alexis Boukouvalas, Pablo León-Villagrá, Zoubin Ghahramani, and James Hensman. GPflow: A Gaussian process library using TensorFlow. Journal of Machine Learning Research, 18(40):1–6, 2017. César Lincoln C. Mattos, Zhenwen Dai, Andreas Damianou, Jeremy Forth, Guilherme A. Barreto, and Neil D. Lawrence. Recurrent Gaussian processes. In International Conference on Learning Representations, 2015. Roderick Murray-Smith and Agathe Girard. Gaussian process priors with ARMA noise models. In Irish Signals and Systems Conference, pages 147–152, 2001. Carl E. Rasmussen and Christopher K. I. Williams. Gaussian processes for machine learning. The MIT Press, Cambridge, MA, USA, 2006. Danilo J. Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, pages 1278–1286, 2014. Stephen Roberts, Michael Osborne, Mark Ebden, Steven Reece, Neale Gibson, and Suzanne Aigrain. Gaussian processes for time-series modelling. Philosophical Transactions of the Royal Society A, 371(1984):20110550, 2013. Jeff G. Schneider. Exploiting model uncertainty estimates for safe dynamic control learning. In Advances in Neural Information Processing Systems. 1997. Jonas Sjöberg, Qinghua Zhang, Lennart Ljung, Albert Benveniste, Bernard Delyon, Pierre-Yves Glorennec, Håkan Hjalmarsson, and Anatoli Juditsky. Nonlinear black-box modeling in system identification: A unified overview. Automatica, 31(12):1691–1724, 1995. Michalis K. Titsias. Variational learning of inducing variables in sparse Gaussian processes. In International Conference on Artificial Intelligence and Statistics, volume 5 of JMLR W&CP, pages 567–574, 2009. Michalis K. Titsias and Neil D. Lawrence. Bayesian Gaussian process latent variable model. In International Conference on Artificial Intelligence and Statistics, volume 9 of JMLR W&CP, pages 844–851, 2010. Michalis K. Titsias and Miguel Lázaro-Gredilla. Doubly stochastic variational Bayes for nonconjugate inference. In International Conference on Machine Learning, pages 1971–1979, 2014. Ryan D. Turner. Gaussian processes for state space models and change point detection. PhD thesis, University of Cambridge, Cambridge, UK, 2011. Ryan D. Turner, Marc P. Deisenroth, and Carl E. Rasmussen. State-space inference and learning with Gaussian processes. In International Conference on Artificial Intelligence and Statistics, volume 9 of JMLR W&CP, pages 868–875, 2010. Jack M. Wang, David J. Fleet, and Aaron Hertzmann. Gaussian process dynamical models for human motion. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(2):283–298, 2008. 11 | 2017 | 45 |
6,952 | Self-supervised Learning of Motion Capture Hsiao-Yu Fish Tung 1, Hsiao-Wei Tung 2, Ersin Yumer 3, Katerina Fragkiadaki 1 1 Carnegie Mellon University, Machine Learning Department 2 University of Pittsburgh, Department of Electrical and Computer Engineering 3 Adobe Research {htung, katef}@cs.cmu.edu, hst11@pitt.edu,yumer@adobe.com Abstract Current state-of-the-art solutions for motion capture from a single camera are optimization driven: they optimize the parameters of a 3D human model so that its re-projection matches measurements in the video (e.g. person segmentation, optical flow, keypoint detections etc.). Optimization models are susceptible to local minima. This has been the bottleneck that forced using clean green-screen like backgrounds at capture time, manual initialization, or switching to multiple cameras as input resource. In this work, we propose a learning based motion capture model for single camera input. Instead of optimizing mesh and skeleton parameters directly, our model optimizes neural network weights that predict 3D shape and skeleton configurations given a monocular RGB video. Our model is trained using a combination of strong supervision from synthetic data, and self-supervision from differentiable rendering of (a) skeletal keypoints, (b) dense 3D mesh motion, and (c) human-background segmentation, in an end-to-end framework. Empirically we show our model combines the best of both worlds of supervised learning and test-time optimization: supervised learning initializes the model parameters in the right regime, ensuring good pose and surface initialization at test time, without manual effort. Self-supervision by back-propagating through differentiable rendering allows (unsupervised) adaptation of the model to the test data, and offers much tighter fit than a pretrained fixed model. We show that the proposed model improves with experience and converges to low-error solutions where previous optimization methods fail. 1 Introduction Detailed understanding of the human body and its motion from “in the wild" monocular setups would open the path to applications of automated gym and dancing teachers, rehabilitation guidance, patient monitoring and safer human-robot interactions. It would also impact the movie industry where character motion capture (MOCAP) and retargeting still requires tedious labor effort of artists to achieve the desired accuracy, or the use of expensive multi-camera setups and green-screen backgrounds. Most current motion capture systems are optimization driven and cannot benefit from experience. Monocular motion capture systems optimize the parameters of a 3D human model to match measurements in the video (e.g., person segmentation, optical flow). Background clutter and optimization difficulties significantly impact tracking performance, leading prior work to use green screen-like backdrops [5] and careful initializations. Additionally, these methods cannot leverage the data generated by laborious manual processes involved in motion capture, to improve over time. This means 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 훽1 R1 SMPL camera re-projection Keypoint re-projection Segmentation re-projection Motion re-projection t1 t2 휃1 T1 훽2 R2 휃2 T2 Figure 1: Self-supervised learning of motion capture. Given a video sequence and a set of 2D body joint heatmaps, our network predicts the body parameters for the SMPL 3D human mesh model [25]. Neural networks weights are pretrained using synthetic data and finetuned using self-supervised losses driven by differentiable keypoint, segmentation, and motion reprojection errors, against detected 2D keypoints, 2D segmentation and 2D optical flow, respectively. By finetuning its parameters at test time through self-supervised losses, the proposed model achieves significantly higher level of 3D reconstruction accuracy than pure supervised or pure optimization based models, which either do not adapt at test time, or cannot benefit from training data, respectively. that each time a video needs to be processed, the optimization and manual efforts need to be repeated from scratch. We propose a neural network model for motion capture in monocular videos, that learns to map an image sequence to a sequence of corresponding 3D meshes. The success of deep learning models lies in their supervision from large scale annotated datasets [14]. However, detailed 3D mesh annotations are tedious and time consuming to obtain, thus, large scale annotation of 3D human shapes in realistic video input is currently unavailable. Our work bypasses lack of 3D mesh annotations in real videos by combining strong supervision from large scale synthetic data of human rendered models, and selfsupervision from 3D-to-2D differentiable rendering of 3D keypoints, motion and segmentation, and matching with corresponding detected quantities in 2D, in real monocular videos. Our self-supervision leverages recent advances in 2D body joint detection [37; 9], 2D figure-ground segmentation [22], and 2D optical flow [21], each learnt using strong supervision from real or synthetic datasets, such as, MPII [3], COCO [24], and flying chairs [15], respectively. Indeed, annotating 2D body joints is easier than annotating 3D joints or 3D meshes, while optical flow has proven to be easy to generalize from synthetic to real data. We show how state-of-the-art models of 2D joints, optical flow and 2D human segmentation can be used to infer dense 3D human structure in videos in the wild, that is hard to otherwise manually annotate. In contrast to previous optimization based motion capture works [8; 7], we use differentiable warping and differentiable camera projection for optical flow and segmentation losses, which allows our model to be trained end-to-end with standard back-propagation. We use SMPL [25] as our dense human 3D mesh model. It consists of a fixed number of vertices and triangles with fixed topology, where the global pose is controlled by relative angles between body parts θ, and the local shape is controlled by mesh surface parameters β. Given the pose and surface parameters, a dense mesh can be generated in an analytical (differentiable) form, which could then be globally rotated and translated to a desired location. The task of our model is to reverse-engineer the rendering process and predict the parameters of the SMPL model (θ and β), as well as the focal length, 3D rotations and 3D translations in each input frame, provided an image crop around a detected person. Given 3D mesh predictions in two consecutive frames, we differentiably project the 3D motion vectors of the mesh vertices, and match them against estimated 2D optical flow vectors (Figure 1). Differentiable motion rendering and matching requires vertex visibility estimation, which we perform using ray casting integrated with our neural model for code acceleration. Similarly, in each frame, 3D keypoints are projected and their distances to corresponding detected 2D keypoints are penalized. Last but not the least, differentiable segmentation matching using Chamfer distances penalizes under and over fitting of the projected vertices against 2D segmentation of the human foreground. Note that 2 these re-projection errors are only on the shape rather than the texture by design, since our predicted 3D meshes are textureless. We provide quantitative and qualitative results on 3D dense human shape tracking in SURREAL [35] and H3.6M [22] datasets. We compare against the corresponding optimization versions, where mesh parameters are directly optimized by minimizing our self-supervised losses, as well as against supervised models that do not use self-supervision at test time. Optimization baselines easily get stuck in local minima, and are very sensitive to initialization. In contrast, our learning-based MOCAP model relies on supervised pretraining (on synthetic data) to provide reasonable pose initialization at test time. Further, self-supervised adaptation achieves lower 3D reconstruction error than the pretrained, non-adapted model. Last, our ablation highlights the complementarity of the three proposed self-supervised losses. 2 Related Work 3D Motion capture 3D motion capture using multiple cameras (four or more) is a well studied problem where impressive results are achieved with existing methods [17]. However, motion capture from a single monocular camera is still an open problem even for skeleton-only capture/tracking. Since ambiguities and occlusions can be severe in monocular motion capture, most approaches rely on prior models of pose and motion. Earlier works considered linear motion models [16; 13]. Non-linear priors such as Gaussian process dynamical models [34], as well as twin Gaussian processes [6] have also been proposed, and shown to outperform their linear counterparts. Recently, Bogo et al. [7] presented a static image pose and 3D dense shape prediction model which works in two stages: first, a 3D human skeleton is predicted from the image, and then a parametric 3D shape is fit to the predicted skeleton using an optimization procedure, during which the skeleton remains unchanged. Instead, our work couples 3D skeleton and 3D mesh estimation in an end-to-end differentiable framework, via test-time adaptation. 3D human pose estimation Earlier work on 3D pose estimation considered optimization methods and hard-coded anthropomorphic constraints (e.g., limb symmetry) to fight ambiguity during 2Dto-3D lifting [28]. Many recent works learn to regress to 3D human pose directly given an RGB image [27] using deep neural networks and large supervised training sets [22]. Many have explored 2D body pose as an intermediate representation [11; 38], or as an auxiliary task in a multi-task setting [32; 38; 39], where the abundance of labelled 2D pose training examples helps feature learning and complements limited 3D human pose supervision, which requires a Vicon system and thus is restricted to lab instrumented environments. Rogez and Schmid [29] obtain large scale RGB to 3D pose synthetic annotations by rendering synthetic 3D human models against realistic backgrounds [29], a dataset also used in this work. Deep geometry learning Our differentiable renderer follows recent works that integrate deep learning and geometric inference [33]. Differentiable warping [23; 26] and backpropable camera projection [39; 38] have been used to learn 3D camera motion [40] and joint 3D camera and 3D object motion [30] in an end-to-end self-supervised fashion, minimizing a photometric loss. Garg et al. [18]learns a monocular depth predictor, supervised by photometric error, given a stereo image pair with known baseline as input. The work of [19] contributed a deep learning library with many geometric operations including a backpropable camera projection layer, similar to the one used in Yan et al. [39] and Wu et al. [38]’s cameras, as well as Garg et al.’s depth CNN [18]. 3 Learning Motion Capture The architecture of our network is shown in Figure 1. We use SMPL as the parametrized model of 3D human shape, introduced by Loper et al. [25]. SMPL is comprised of parameters that control the yaw, pitch and roll of body joints, and parameters that control deformation of the body skin surface. Let θ, β denote the joint angle and surface deformation parameters, respectively. Given these parameters, a fixed number (n = 6890) of 3D mesh vertex coordinates are obtained using the following analytical expression, where Xi ∈R3 stands for the 3D coordinates of the ith vertex in the mesh: Xi = ¯Xi + X m βmsm,i + X n (Tn(θ) −Tn(θ∗))pn,i (1) 3 camera t1 t2 Distance maps Threshold Segmentation (SM) Chamfer distance maps (CM) (SI) (CI) x2d ~ x2d u, v u, v ~ ~ match match by differentiable interpolation SM x CI + SI x CM → 0 xKPT xKPT ~ Figure 2: Differentiable rendering of body joints (left), segmentation (middle) and mesh vertex motion (right). where ¯Xi ∈R3 is the nominal rest position of vertex i, βm is the blend coefficient for the skin surface blendshapes, sm,i ∈R3 is the element corresponding to ith vertex of the mth skin surface blendshape, pn,i ∈R3 is the element corresponding to ith vertex of the nth skeletal pose blendshape, Tn(θ) is a function that maps the nth pose blendshape to a vector of concatenated part relative rotation matrices, and Tn(θ∗) is the same for the rest pose θ∗. Note the expression in Eq. 1 is differentiable. Our model, given an image crop centered around a person detection, predicts parameters β and θ of the SMPL 3D human mesh. Since annotations of 3D meshes are very tedious and time consuming to obtain, our model uses supervision from a large dataset of synthetic monocular videos, and selfsupervision with a number of losses that rely on differentiable rendering of 3d keypoints, segmentation and vertex motion, and matching with their 2D equivalents. We detail supervision of our model below. Paired supervision from synthetic data We use the synthetic Surreal dataset [35] that contains monocular videos of human characters performing activities against 2D image backgrounds. The synthetic human characters have been generated using the SMPL model, and animated using Human H3.6M dataset [22]. Texture is generated by directly coloring the mesh vertices, without actual 3D cloth simulation. Since values for β and θ are directly available in this dataset, we use them to pretrain the θ and β branches of our network using a standard supervised regression loss. 3.1 Self-supervision through differentiable rendering Self-supervision in our model is based on 3D-to-2D rendering and consistency checks against 2D estimates of keypoints, segmentation and optical flow. Self-supervision can be used at both train and test time, for adapting our model’s weights to the statistics of the test set. Keypoint re-projection error Given a static image, predictions of 3D body joints of the depicted person should match, when projected, corresponding 2D keypoint detections. Such keypoint reprojection error has been used already in numerous previous works [38; 39]. Our model predicts a dense 3D mesh instead of a skeleton. We leverage the linear relationship that relates our 3D mesh vertices to 3D body joints: Xkpt ⊺= A · X⊺ (2) Let X ∈R4×n denote the 3D coordinates of the mesh vertices in homogeneous coordinates (with a small abuse of notation since it is clear from the context), where n the number of vertices. For estimating 3D-to-2D projection, our model further predicts focal length, rotation of the camera and 4 translation of the 3D mesh off the center of the image, in case the root node of the 3D mesh is not exactly placed at the center of the image crop. We do not predict translation in the z direction (perpendicular to the image plane), as the predicted focal length accounts for scaling of the person figure. For rotation, we predict Euler rotation angles α, β, γ so that the 3D rotation of the camera reads R = Rx(α)Ry(β)Rz t (γ), where Rx(θ) denotes rotation around the x-axis by angle θ, here in homogeneous coordinates. The re-projection equation for the kth keypoint then reads: xk kpt = P · R · Xk kpt + T (3) where P = diag([f f 1 0] is the predicted camera projection matrix and T = [Tx Ty 0 0]T handles small perturbations in object centering. Keypoint reprojection error then reads: Lkpt = ∥xkpt −˜xkpt∥2 2, (4) and ˜xkpt are ground-truth or detected 2D keypoints. Since 3D mesh vertices are related to β, θ predictions using Eq. 1, re-projection error minimization updates the neural parameters for β, θ estimation. Motion re-projection error Given a pair of frames, 3D mesh vertex displacements from one frame to the next should match, when projected, corresponding 2D optical flow vectors, computed from the corresponding RGB frames. All Structure-from-Motion (SfM) methods exploit such motion re-projection error in one way or another: the estimated 3D pointcloud in time when projected should match 2D optical flow vectors in [2], or multiframe 2D point trajectories in [31]. Though previous SfM models use motion re-projection error to optimize 3D coordinates and camera parameters directly [2], here we use it to optimize neural network parameters, that predict such quantities, instead. Motion re-projection error estimation requires visibility of the mesh vertices in each frame. We implement visibility inference through ray casting for each example and training iteration in Tensor Flow and integrate it with our neural network model, which accelerates by ten times execution time, as opposed to interfacing with raycasting in OpenGL. Vertex visibility inference does not need to be differentiable: it is used only to mask motion re-projection loss for invisible vertices. Since we are only interested in visibility rather than complex rendering functionality, ray casting boils down to detecting the first mesh facet to intersect with the straight line from the image projected position of the center of a facet to its 3D point. If the intercepted facet is the same as the one which the ray is cast from, we denote that facet as visible since there is no occluder between that facet and the image plane. We provide more details for the ray casting reasoning in the experiment section. Vertices that constructs these visible facet are treated as visible. Let vi ∈{0, 1}, i = 1 · · · n denote visibilities of mesh vertices. Given two consecutive frames I1, I2, let β1, θ1, R1, T1, β2, θ2, R2, T2 denote corresponding predictions from our model. We obtain corresponding 3D pointclouds, Xi 1 = Xi 1 Y i 1 Zi 1 , i = 1 · · · n, and Xi 2 = Xi 2 Y i 2 Zi 2 , i = 1 · · · n using Eq. 1. The 3D mesh vertices are mapped to corresponding pixel coordinates (xi 1, yi 1), i = 1 · · · n, (xi 2, yi 2), i = 1 · · · n, using the camera projection equation (Eq. 3). Thus the predicted 2D body flow resulting from the 3D motion of the corresponding meshes is (ui, vi) = (xi 2 −xi 1, yi 2 −yi 1), i = 1 · · · n. Let OF = (˜u, ˜v) denote the 2D optical flow field estimated with an optical flow method, such as the state-of-the-art deep neural flow of [21]. Let OF(xi 1, yi 1) denote the optical flow at a potentially subpixel location xi 1, yi 1, obtained from the pixel centered optical flow field OF through differentiable bilinear interpolation (differentiable warping) [23]. Then, the motion re-projection error reads: Lmotion = 1 1T v n X i vi ∥ui(xi 1, yi 1) −˜u(xi 1, yi 1)∥1 + ∥vi(xi 1, yi 1) −˜v(xi 1, yi 1)∥1 5 Segmentation re-projection error Given a static image, the predicted 3D mesh for the depicted person should match, when projected, the corresponding 2D figure-ground segmentation mask. Numerous 3D shape reconstruction methods have used such segmentation consistency constraint [36; 2; 4], but again, in an optimization as opposed to learning framework. Let SI ∈{0, 1}w×h denote the 2D figure-ground binary image segmentation, supplied by groundtruth, background subtraction or predicted by a figure-ground neural network segmenter [20]. Our segmentation re-projection loss measures how well the projected mesh mask fits the image segmentation SI by penalizing non-overlapping pixels by the shortest distance to the projected model segmentation SM = {x2d}. For this purpose Chamfer distance maps CI for the image segmentation SI and Chamfer distance maps CM for the model projected segmentation SM are calculated. The loss then reads: Lseg = SM ⊗CI + SI ⊗CM, where ⊗denotes pointwise multiplication. Both terms are necessary to prevent under of over coverage of the model segmentation over the image segmentation. For the loss to be differentiable we cannot use distance transform for efficient computation of Chamfer maps. Rather, we brute force its computation by calculating the shortest distance of each pixel to the model segmentation and the inverse. Let xi 2d, i ∈1 · · · n denote the set of model projected vertex pixel coordinates and xp seg, p ∈1 · · · m denote the set of pixel centered coordinates that belong to the foreground of the 2D segmentation map SI: Lseg-proj = n X i=1 min p ∥xi 2d −xp seg∥2 2 | {z } prevent over-coverage + m X p min i ∥xp seg −xi 2d∥2 2. | {z } prevent under-coverage (5) The first term ensures the model projected segmentation is covered by the image segmentation, while the second term ensures that model projected segmentation covers well the image segmentation. To lower the memory requirements we use half of the image input resolution. 4 Experiments We test our method on two datasets: Surreal [35] and H3.6M [22]. Surreal is currently the largest synthetic dataset for people in motion. It contains short monocular video clips depicting human characters performing daily activities. Ground-truth 3D human meshes are readily available. We split the dataset into train and test video sequences. Human3.6M (H3.6M) is the largest real video dataset with annotated 3D human skeletons. It contains videos of actors performing activities and provides annotations of body joint locations in 2D and 3D at every frame, recorded through a Vicon system. It does not provide dense 3D ground-truth though. Our model is first trained using supervised skeleton and surface parameters in the training set of the Surreal dataset. Then, it is self-supervised using differentiable rendering and re-projection error minimization at two test sets, one in the Surreal dataset, and one in H3.6M. For self-supervision, we use ground-truth 2D keypoints and segmentations in both datasets, Surreal and H3.6M. The segmentation mask in Surreal is very accurate while in H3.6M is obtained using background subtraction and can be quite inaccurate, as you can see in Figure 4. Our model refines such initially inaccurate segmentation mask. The 2D optical flows for dense motion matching are obtained using FlowNet2.0 [21] in both datasets. We do not use any 3D ground-truth supervision in H3.6M as our goal is to demonstrate successful domain transfer of our model, from SURREAL to H3.6M. We measure the quality of the predicted 3D skeletons in both datasets, and we measure the quality of the predicted dense 3D meshes in Surreal, since only there it is available. Evaluation metrics Given predicted 3D body joint locations of K = 32 keypoints Xk kpt, k = 1 · · · K and corresponding ground-truth 3D joint locations ˜Xk kpt, k = 1 · · · K, we define the per-joint error of each example as 1 K PK k=1 ∥Xk kpt −˜Xk kpt∥2 similar to previous works [41]. We also define the reconstruction error of each example as the 3D per-joint error up to a 3D translation T (3D 6 rotation should still be predicted correctly): minT 1 K PK k=1 ∥(Xk kpt + T) −( ˜Xk kpt)∥2 We define the surface error of each example to be the per-joint error when considering all the vertices of the 3D mesh: 1 n Pn i=1 ∥Xi −˜Xi∥2. We compare our learning based model against two baselines: (1) Pretrained, a model that uses only supervised training from synthetic data, without self-supervised adaptation. This baseline is similar to the recent work of [12]. (2) Direct optimization, a model that uses our differentiable self-supervised losses, but instead of optimizing neural network weights, optimizes directly over body mesh parameters (θ, β), rotation (R), translation (T), and focal length f. We use standard gradient descent as our optimization method. We experiment with varying amount of supervision during initialization of our optimization baseline: random initialization, using ground-truth 3D translation, using ground-truth rotation and using ground-truth theta angles (to estimate the surface parameters). Tables 1 and 2 show the results of our model and baselines for the different evaluation metrics. The learning based self-supervised model outperforms both the pretrained model, that does not exploit adaptation through differentiable rendering and consistency checks, as well as direct optimization baselines, sensitive to initialization mistakes. Ablation In Figure 3 we show the 3D keypoint reconstruction error after self-supervised finetuning using different combinations of self-supervised losses. A model self-supervised by the keypoint re-projection error (Lkpt) alone does worse than model using both keypoint and segmentation reprojection error (Lkpt+Lseg). Models trained using all three proposed losses (keypoint, segmentation and dense motion re-projection error (Lkpt+Lseg+Lmotion) outperformes the above two. This shows the complementarity and importance of all the proposed losses. surface error (mm) per-joint error (mm) recon. error (mm) Optimization 346.5 532.8 1320.1 Optimization + ˜R 301.1 222.0 294.9 Optimization + ˜R + ˜T 272.8 206.6 205.5 Pretrained 119.4 101.6 351.3 Pretrained+Self-Sup 74.5 64.4 203.9 Table 1: 3D mesh prediction results in Surreal [35]. The proposed model (pretrained+selfsupervised) outperforms both optimization based alternatives, as well as pretrained models using supervised regression, that do not adapt to the test data. We use a superscript˜· to denote ground-truth information provided at initialization of our optimization based baseline. per-joint error recon. error (mm) (mm) Optimization 562.4 883.1 Pretrained 125.6 303.5 Pretrained+Self-Sup 98.4 145.8 Table 2: 3D skeleton prediction results on H3.6M [22]. The proposed model (pretrained+self-supervised) outperforms both an optimization based baseline, as well as a pretrained model. Self-supervised learning through differentiable rendering allows our model to adapt effectively across domains (Surreal to H3.6M), while the fixed pretrained baseline cannot. Dense 3D surface ground-truth is not available and thus cannot be measured in H3.6M recon. error Lk Lk + Ls Lk + Ls + LM 0.28 0.26 0.24 0.22 0.20 50.0k Figure 3: 3D reconstruction error during purely unsupervised finetuning under different self-supervised losses. (Lk ≡ Lkpt: Keypoint re-projection error; LS≡ Lseg: Segmentation reprojection error LM≡Lmotion: Dense motion re-projection error ). All losses contribute to 3D error reduction. Discussion We have shown that a combination of supervised pretraining and unsupervised adaptation is beneficial for accurate 3D mesh prediction. Learning based self-supervision combines the best of both worlds of supervised learning and test time optimization: supervised learning initializes the learning parameters in the right regime, ensuring good pose initialization at test time, without manual 7 effort. Self-supervision through differentiable rendering allows adaptation of the model to test data, thus allows much tighter fitting that a pretrained model with “frozen" weights at test time. Note that overfitting in that sense is desirable. We want our predicted 3D mesh to fit as tight as possible to our test set, and improve tracking accuracy with minimal human intervention. Implementation details Our model architecture consists of 5 convolution blocks. Each block contains two convolutional layers with filter size 5 × 5 (stride 2) and 3 × 3 (stride 1), followed by input 1 input 2 predicted mesh predicted 2d projection segmentation groundtruth predicted flow predicted mask Figure 4: Qualitative results of 3D mesh prediction. In the top four rows, we show predictions in Surreal and in the bottom four from H3.6M. Our model handles bad segmentation input masks in H3.6M thanks to supervision from multiple rendering based losses. A byproduct of our 3D mesh model is improved 2D person segmentation (column 6). 8 batch normalization and leaky relu activation. The first block contains 64 channels, and we double size after each block. On top of these blocks, we add 3 fully connected layers and shrink the size of the final layer to match our desired outputs. Input image to our model is 128 × 128. The model is trained with gradient descent optimizer with learning rate 0.0001 and is implemented in Tensorflow v1.1.0 [1]. Chamfer distance: We obtain Chamfer distance map CI for an input image frame I using distance transform with seed the image figure-ground segmentation mask SI. This assigns to every pixel in CI the minimum distance to a pixel on the mask foreground. Next, we describe the differentiable computation for CM used in our method. Let P = {x2d} denote a set of pixel coordinates for the mesh’s visible projected points. For each pixel location p, we compute the minimum distance between that pixel location and any pixel coordinate in P and obtain a distance map D ∈Rw×h. Next, we threshold the distance map D to get the Chamfer distance map CM and segmentation mask SM where, for each pixel position p: CM(p) = max(0.5, D(p)) (6) SM(p) = min(0.5, D(p)) + δ(D(p) < 0.5) · 0.5, (7) and δ(·) is an indicator function. Ray casting: We implemented a standard raycasting algorithm in TensorFlow to accelerate its computation. Let r = (x, d) denote a casted ray, where x is the point where the ray casts from and d is a normalized vector for the shooting direction. In our case, all the rays cast from the center of the camera. For ease of explanation, we set x at (0,0,0). A facet f = (v0, v1, v2), is determined as "hit" if it satisfies the following three conditions : (1) the facet is not parallel to the casted ray, (2) the facet is not behind the ray and (3) the ray passes through the triangle region formed by the three edges of the facet. Given a facet f = (v0, v1, v2), where vi denotes the ith vertex of the facet, the first condition is satisfied if the magnitude of the inner product between the ray cast direction d and the surface normal of the facet f is large than some threshold ϵ. Here we set ϵ to be 1e −8. The second condition is satisfied if the inner product between the ray cast direction d and the surface normal N, which is defined as the normalized cross product between v1 −v0 and v2 −v0, has the same sign as the inner product between v0 on N. Finally, the last condition can be split into three sub-problems: given one of the edges on the facet, whether the ray casts on the same side as the facet or not. First, we find the intersecting point p of the ray cast and the 2D plane expanded by the facet by the following equation: p = x + d · < N, v0 > < N, d > , (8) where < ·, · > denotes inner product. Given an edge formed by vertices vi and vj, the ray casted is determined to fall on the same side of the facet if the cross product between edge vi −vj and vector p −vj has the same sign as the surface normal vector N. We examine this condition on all of the three edges. If all the above conditions are satisfied, the facet is determined as hit by the ray cast. Among the hit facets, we choose the one with the minimum distance to the origin as the visible facet seen from the direction of the ray cast. 5 Conclusion We have presented a learning based model for dense human 3D body tracking supervised by synthetic data and self-supervised by differentiable rendering of mesh motion, keypoints, and segmentation, and matching to their 2D equivalent quantities. We show that our model improves by using unlabelled video data, which is very valuable for motion capture where dense 3D ground-truth is hard to annotate. A clear direction for future work is iterative additive feedback [10] on the mesh parameters, for achieving higher 3D reconstruction accuracy, and allowing learning a residual free form deformation on top of the parametric SMPL model, again in a self-supervised manner. Extensions of our model beyond human 3D shape would allow neural agents to learn 3D with experience as human do, supervised solely by video motion. 9 References [1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. Tensorflow: Large-scale machine learning on heterogeneous distributed systems, 2015. [2] T. Alldieck, M. Kassubeck, and M. A. Magnor. Optical flow-based 3d human motion estimation from monocular video. CoRR, abs/1703.00177, 2017. [3] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. [4] A. Balan, L. Sigal, M. J. Black, J. Davis, and H. Haussecker. Detailed human shape and pose from images. In IEEE Conf. on Computer Vision and Pattern Recognition, CVPR, pages 1–8, Minneapolis, June 2007. [5] L. Ballan and G. M. Cortelazzo. Marker-less motion capture of skinned models in a four camera set-up using optical flow and silhouettes. In 3DPVT, 2008. [6] L. Bo and C. Sminchisescu. Twin gaussian processes for structured prediction. International Journal of Computer Vision, 87(1):28–52, 2010. [7] F. Bogo, A. Kanazawa, C. Lassner, P. V. Gehler, J. Romero, and M. J. Black. Keep it SMPL: automatic estimation of 3d human pose and shape from a single image. ECCV, 2016, 2016. [8] T. Brox, B. Rosenhahn, D. Cremers, and H.-P. Seidel. High accuracy optical flow serves 3-d pose tracking: exploiting contour and flow based constraints. In ECCV, 2006. [9] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In CVPR, 2017. [10] J. Carreira, P. Agrawal, K. Fragkiadaki, and J. Malik. Human pose estimation with iterative error feedback. In arXiv preprint arXiv:1507.06550, 2015. [11] C. Chen and D. Ramanan. 3d human pose estimation = 2d pose estimation + matching. CoRR, abs/1612.06524, 2016. [12] W. Chen, H. Wang, Y. Li, H. Su, C. Tu, D. Lischinski, D. Cohen-Or, and B. Chen. Synthesizing training images for boosting human 3d pose estimation. CoRR, abs/1604.02703, 2016. [13] K. Choo and D. J. Fleet. People tracking using hybrid monte carlo filtering. In Computer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on, volume 2, pages 321–328, 2001. [14] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. [15] A. Dosovitskiy, P. Fischer, E. Ilg, P. Häusser, C. Hazirbas, V. Golkov, P. Smagt, D. Cremers, and T. Brox. Flownet: Learning optical flow with convolutional networks. In ICCV, 2015. [16] D. Fleet, A. Jepson, and T. El-Maraghi. Robust on-line appearance models for vision tracking. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2001. [17] J. Gall, C. Stoll, E. De Aguiar, C. Theobalt, B. Rosenhahn, and H.-P. Seidel. Motion capture using joint skeleton tracking and surface estimation. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 1746–1753. IEEE, 2009. [18] R. Garg, B. V. Kumar, G. Carneiro, and I. Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In European Conference on Computer Vision, pages 740–756. Springer, 2016. [19] A. Handa, M. Bloesch, V. P˘atr˘aucean, S. Stent, J. McCormac, and A. Davison. gvnn: Neural network library for geometric computer vision. In Computer Vision–ECCV 2016 Workshops, pages 67–82. Springer International Publishing, 2016. [20] K. He, G. Gkioxari, P. Dollár, and R. B. Girshick. Mask R-CNN. CoRR, abs/1703.06870, 2017. [21] E. Ilg, N. Mayer, T. Saikia, M. Keuper, A. Dosovitskiy, and T. Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. CoRR, abs/1612.01925, 2016. [22] C. Ionescu, D. Papava, V. Olaru, and C. Sminchisescu. Human3.6m: Large scale datasets and predictive methods for 3d human sensing in natural environments. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(7):1325–1339, jul 2014. [23] M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu. Spatial transformer networks. In NIPS, 2015. [24] T. Lin, M. Maire, S. J. Belongie, L. D. Bourdev, R. B. Girshick, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft COCO: common objects in context. CoRR, abs/1405.0312, 2014. [25] M. Loper, N. Mahmood, J. Romero, G. Pons-Moll, and M. J. Black. SMPL: A skinned multi-person linear model. ACM Trans. Graphics (Proc. SIGGRAPH Asia), 34(6):248:1–248:16, Oct. 2015. [26] V. Patraucean, A. Handa, and R. Cipolla. Spatio-temporal video autoencoder with differentiable memory. CoRR, abs/1511.06309, 2015. [27] G. Pavlakos, X. Zhou, K. G. Derpanis, and K. Daniilidis. Coarse-to-fine volumetric prediction for single-image 3d human pose. CoRR, abs/1611.07828, 2016. [28] V. Ramakrishna, T. Kanade, and Y. Sheikh. Reconstructing 3d Human Pose from 2d Image Landmarks. Computer Vision–ECCV 2012, pages 573–586, 2012. [29] G. Rogez and C. Schmid. Mocap-guided data augmentation for 3d pose estimation in the wild. In NIPS, 2016. [30] V. S., R. S., S. C., S. R., and F. K. Sfm-net: Learning of structure and motion from video. In arxiv, 2017. 10 [31] C. Tomasi and T. Kanade. Shape and motion from image streams under orthography: A factorization method. Int. J. Comput. Vision, 9(2):137–154, Nov. 1992. [32] D. Tomè, C. Russell, and L. Agapito. Lifting from the deep: Convolutional 3d pose estimation from a single image. CoRR, abs/1701.00295, 2017. [33] H. F. Tung, A. Harley, W. Seto, and K. Fragkiadaki. Adversarial inverse graphics networks: Learning 2d-to-3d lifting and image-to-image translation from unpaired supervision. ICCV, 2017. [34] R. Urtasun, D. Fleet, and P. Fua. Gaussian process dynamical models for 3d people tracking. In Proc. of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), 2006. [35] G. Varol, J. Romero, X. Martin, N. Mahmood, M. J. Black, I. Laptev, and C. Schmid. Learning from Synthetic Humans. In CVPR, 2017. [36] S. Vicente, J. Carreira, L. Agapito, and J. Batista. Reconstructing PASCAL VOC. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2014, Columbus, OH, USA, June 23-28, 2014, pages 41–48, 2014. [37] S.-E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Convolutional pose machines. In CVPR, 2016. [38] J. Wu, T. Xue, J. J. Lim, Y. Tian, J. B. Tenenbaum, A. Torralba, and W. T. Freeman. Single image 3D interpreter network. In ECCV, 2016. [39] X. Yan, J. Yang, E. Yumer, Y. Guo, and H. Lee. Perspective transformer nets: Learning single-view 3d object reconstruction without 3d supervision. In Advances in Neural Information Processing Systems, pages 1696–1704, 2016. [40] T. Zhou, M. Brown, N. Snavely, and D. G. Lowe. Unsupervised learning of depth and ego-motion from video. In arxiv, 2017. [41] X. Zhou, M. Zhu, G. Pavlakos, S. Leonardos, K. G. Derpanis, and K. Daniilidis. Monocap: Monocular human motion capture using a CNN coupled with a geometric prior. CoRR, abs/1701.02354, 2017. 11 | 2017 | 450 |
6,953 | Toward Goal-Driven Neural Network Models for the Rodent Whisker-Trigeminal System Chengxu Zhuang Department of Psychology Stanford University Stanford, CA 94305 chengxuz@stanford.edu Jonas Kubilius Department of Brain and Cognitive Sciences Massachusetts Institute of Technology Cambridge, MA 02139 Brain and Cognition, KU Leuven, Belgium qbilius@mit.edu Mitra Hartmann Departments of Biomedical Engineering and Mechanical Engineering Northwestern University Evanston, IL 60208 hartmann@northwestern.edu Daniel Yamins Departments of Psychology and Computer Science Stanford Neurosciences Institute Stanford University Stanford, CA 94305 yamins@stanford.edu Abstract In large part, rodents “see” the world through their whiskers, a powerful tactile sense enabled by a series of brain areas that form the whisker-trigeminal system. Raw sensory data arrives in the form of mechanical input to the exquisitely sensitive, actively-controllable whisker array, and is processed through a sequence of neural circuits, eventually arriving in cortical regions that communicate with decisionmaking and memory areas. Although a long history of experimental studies has characterized many aspects of these processing stages, the computational operations of the whisker-trigeminal system remain largely unknown. In the present work, we take a goal-driven deep neural network (DNN) approach to modeling these computations. First, we construct a biophysically-realistic model of the rat whisker array. We then generate a large dataset of whisker sweeps across a wide variety of 3D objects in highly-varying poses, angles, and speeds. Next, we train DNNs from several distinct architectural families to solve a shape recognition task in this dataset. Each architectural family represents a structurally-distinct hypothesis for processing in the whisker-trigeminal system, corresponding to different ways in which spatial and temporal information can be integrated. We find that most networks perform poorly on the challenging shape recognition task, but that specific architectures from several families can achieve reasonable performance levels. Finally, we show that Representational Dissimilarity Matrices (RDMs), a tool for comparing population codes between neural systems, can separate these higherperforming networks with data of a type that could plausibly be collected in a neurophysiological or imaging experiment. Our results are a proof-of-concept that DNN models of the whisker-trigeminal system are potentially within reach. 1 Introduction The sensory systems of brains do remarkable work in extracting behaviorally useful information from noisy and complex raw sense data. Vision systems process intensities from retinal photoreceptor arrays, auditory systems interpret the amplitudes and frequencies of hair-cell displacements, and somatosensory systems integrate data from direct physical interactions. [28] Although these systems 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Trigeminal Ganglion 2- 3 4 / s Thalamus Sb 6 S1 2-3 4 Sa Sb 6 S2 ... b) c) d) Sweeps “Cube” “Chair” “Duck” Input Shapes Artificial Vibrissal Array Shape Category Recognition Output Task-Optimized Neural Network Architecture(s) ?? ?? ?? Matched to real morphology a) Cortex Figure 1: Goal-Driven Approach to Modeling Barrel Cortex: a. Rodents have highly sensitive whisker (vibrissal) arrays that provide input data about the environment. Mechanical signals from the vibrissae are relayed by primary sensory neurons of the trigeminal ganglion to the trigeminal nuclei, the original of multiple parallel pathways to S1 and S2. (Figure modified from [8].) This system is a prime target for modeling because it is likely to be richly representational, but its computational underpinnings are largely unknown. Our long-term approach to modeling the whisker-trigeminal system is goal-driven: using an artificial whisker-array input device built using extensive biophysical measurements (b.), we seek to optimize neural networks of various architectures (c.) to solve ethologically-relevant shape recognition tasks (d.), and then measure the extent to which these networks predict fine-grained response patterns in real neural recordings. differ radically in their input modalities, total number of neurons, and specific neuronal microcircuits, they share two fundamental characteristics. First, they are hierarchical sensory cascades, albeit with extensive feedback, consisting of sequential processing stages that together produce a complex transformation of the input data. Second, they operate in inherently highly-structured spatiotemporal domains, and are generally organized in maps that reflect this structure [11]. Extensive experimental work in the rodent whisker-trigeminal system has provided insights into how these principles help rodents use their whiskers (also known as vibrissae) to tactually explore objects in their environment. Similar to hierarchical processing in the visual system (e.g., from V1 to V2, V4 and IT [11, 12]), processing in the somatosensory system is also known to be hierarchical[27, 17, 18]. For example, in the whisker trigeminal system, information from the whiskers is relayed from primary sensory neurons in the trigeminal ganglion to multiple trigeminal nuclei; these nuclei are the origin of several parallel pathways conveying information to the thalamus [36, 24] and then to primary and secondary somatosensory cortex (S1 and S2) [4]. However, although the rodent somatosensory system has been the subject of extensive experimental efforts[2, 26, 20, 32], there have been comparatively few attempts at computational modeling of this important sensory system. Recent work has shown that deep neural networks (DNNs), whose architectures inherently contain hierarchy and spatial structure, can be effective models of neural processing in vision[34, 21] and audition[19]. Motivated by these successes, in this work we illustrate initial steps toward using DNNs to model rodent somatosensory systems. Our driving hypothesis is that the vibrissal-trigeminal system is optimized to use whisker-based sensor data to solve somatosensory shape-recognition tasks in complex, variable real-world environments. The underlying idea of this approach is thus to use goal-driven modeling (Fig 1), in which the DNN parameters — both discrete and continuous — are optimized for performance on a challenging ethologically-relevant task[35]. Insofar as shape recognition is a strong constraint on network parameters, optimized neural networks resulting from such a task may be an effective model of real trigeminal-system neural response patterns. This idea is conceptually straightforward, but implementing it involves surmounting several challenges. Unlike vision or audition, where signals from the retina or cochlea can for many purposes be approximated by a simple structure (namely, a uniform data array representing light or sound intensities and frequencies), the equivalent mapping from stimulus (e.g. object in a scene) to sensor input in the whisker system is much less direct. Thus, a biophysically-realistic embodied model of the whisker array is a critical first component of any model of the vibrissal system. Once the sensor array is available, a second key problem is building a neural network that can accept whisker data input and use it to solve relevant tasks. Aside from the question of the neural network design itself, 2 . . . Pairwise Linear Springs Pairwise Torsional Springs Fixed-Position “Follicle” Measuring Forces & Torques a) b) c) d) top middle bottom 90 o 31 Whiskers in Rough 5 x 7 Formation . . . Classification Performance Variations Excluded in Train/Test vs. Scale + Speed Rotation + Scale Rotation Position Scale Speed None 180 o 270 o 0 o Figure 2: Dynamic Three-Dimensional Whisker Model: a. Each whisker element is composed of a set of cuboid links. The follicle cuboid has a fixed location, and is attached to movable cuboids making up the rest of the whisker. Motion is constrained by linear and torsional springs between each pair of cuboids. The number of cuboid links and spring equilibrium displacements are chosen to match known whisker length and curvature [31], while damping and spring stiffness parameters are chosen to ensure mechanically plausible whisker motion trajectories. b. We constructed a 31-whisker array, arranged in a rough 5x7 grid (with 4 missing elements) on an ellipsoid representing the rodent’s mystacial pad. Whisker number and placement was matched to the known anatomy of the rat [31]. c. During dataset construction, the array is brought into contact with each object at three vertical heights, and four 90◦-separated angles, for a total of 12 sweeps. The object’s size, initial orientation angle, as well as sweep speed, vary randomly between each group of 12 sweeps. Forces and torques are recorded at the three cuboids closest to the follicle, for a total of 18 measurements per whisker at each timepoint. d. Basic validation of performance of binary linear classifier trained on raw sensor output to distinguish between two shapes (in this case, a duck versus a teddy bear). The classifier was trained/tested on several equal-sized datasets in which variation on one or more latent variable axes has been suppressed. “None” indicates that all variations are present. Dotted line represents chance performance (50%). knowing what the “relevant tasks” are for training a rodent whisker system, in a way that is sufficiently concrete to be practically actionable, is a significant unknown, given the very limited amount of ethologically-relevant behavioral data on rodent sensory capacities[32, 22, 25, 1, 9]. Collecting neural data of sufficient coverage and resolution to quantitatively evaluate one or more task-optimized neural network models represents a third major challenge. In this work, we show initial steps toward the first two of these problems (sensor modeling and neural network design/training). 2 Modeling the Whisker Array Sensor In order to provide our neural networks inputs similar to those of the rodent vibrissal system, we constructed a physically-realistic three-dimensional (3D) model of the rodent vibrissal array (Fig. 2). To help ensure biological realism, we used an anatomical model of the rat head and whisker array that quantifies whisker number, length, and intrinsic curvature as well as relative position and orientation on the rat’s face [31]. We wanted the mechanics of each whisker to be reasonably accurate, but at the same time, also needed simulations to be fast enough to generate a large training dataset. We therefore used the Bullet [33], an open-source real-time physics engine used in many video games. Statics. Individual whiskers were each modeled as chains of “cuboid” links with a square crosssection and length of 2mm. The number of links in each whisker was chosen to ensure that the total whisker length matched that of the corresponding real whisker (Fig. 2 a). The first (most proximal) link of each simulated whisker corresponded to the follicle at the whisker base, where the whisker inserts into the rodent’s face. Each whisker follicle was fixed to a single location in 3D space. The links of the whisker are given first-order linear and rotational damping factors to ensure that unforced motions dissipate over time. To simplify the model, the damping factors were assumed to be the same across all links of a given whisker, but different from whisker to whisker. Each pair of links within a whisker was connected with linear and torsional first-order springs; these springs both have two parameters (equilibrium displacement and stiffness). The equilibrium displacements of each spring were chosen to ensure that the whisker’s overall static shape matched the measured curvature for the corresponding real whisker. Although we did not specifically seek to match the detailed biophysics of the whisker mechanics (e.g. the fact that the stiffness of the whisker increases with the 4th power of its radius), we assumed that the stiffness of the springs spanning a given length were linearly correlated to the distance between the starting position of the spring and the base, roughly capturing the fact that the whisker is thicker and stiffer at the bottom [13]. The full simulated whisker array consisted of 31 simulated whiskers, ranging in length from 8mm to 60mm (Fig. 2b). The fixed locations of the follicles of the simulated whiskers were placed on a curved ellipsoid surface modeling the rat’s mystacial pad (cheek), with the relative locations of 3 the follicles on this surface obtained from the morphological model [31], forming roughly a 5 × 7 grid-like pattern with four vacant positions. Dynamics. Whisker dynamics are generated by collisions with moving three-dimensional rigid bodies, also modeled as Bullet physics objects. The motion of a simulated whisker in reaction to external forces from a collision is constrained only by the fixed spatial location of the follicle, and by the damped dynamics of the springs at each node of the whisker. However, although the spring equilibrium displacements are determined by static measurements as described above, the damping factors and spring stiffnesses cannot be fully determined from these data. If we had detailed dynamic trajectories for all whiskers during realistic motions (e.g. [29]), we would have used this data to determine these parameters, but such data are not yet available. In the absence of empirical trajectories, we used a heuristic method to determine damping and stiffness parameters, maximizing the “mechanical plausibility” of whisker behavior. Specifically, we constructed a battery of scenarios in which forces were applied to each whisker for a fixed duration. These scenarios included pushing the whisker tip towards its base (axial loading), as well as pushing the whisker parallel or perpendicular to its intrinsic curvature (transverse loading in or out of the plane of intrinsic curvature). For each scenario and each potential setting of the unknown parameters, we simulated the whisker’s recovery after the force was removed, measuring the maximum displacement between the whisker base and tip caused by the force prior to recovery (d), the total time to recovery (T), the average arc length travelled by each cuboid during recovery (S), and the average translational speed of each cuboid during recovery (v). We used metaparameter optimization [3] to automatically identify stiffness and damping parameters that simultaneously minimized the time and complexity of the recovery trajectory, while also allowing the whisker to be flexible. Specifically, we minimized the loss function 0.025S + d + 20T −2v, where the coefficients were set to make terms of comparable magnitude. The optimization was performed for every whisker independently, as whisker length and curvature interacts nonlinearly with its recovery dynamics. 3 A Large-Scale Whisker Sweep Dataset Using the whisker array, we generated a dataset of whisker responses to a variety of objects. Sweep Configuration. The dataset consists of series of simulated sweeps, mimicking one action in which the rat runs its whiskers past an object while holding its whiskers fixed (no active whisking). During each sweep, a single 3D object moves through the whisker array from front to back (rostral to caudal) at a constant speed. Each sweep lasts a total of one second, and data is sampled at 110Hz. Sweep scenarios vary both in terms of the identity of the object presented, as well as the position, angle, scale (defined as the length of longest axis), and speed at which it is presented. To simulate observed rat whisking behavior in which animals often sample an object at several vertical locations (head pitches) [14], sweeps are performed at three different heights along the vertical axis and at each of four positions around the object (0◦, 90◦, 180◦, and 270◦around the vertical axis), for a total of 12 sweeps per object/latent variable setting (Fig. 2c). Latent variables settings are sampled randomly and independently on each group of sweeps, with object rotation sampled uniformly within the space of all 3D rotations, object scale sampled uniformly between 25-135mm, and sweep speed sampled randomly between 77-154mm/s. Once these variables are chosen, the object is placed at a position that is chosen uniformly in a 20 × 8 × 20mm3 volume centered in front of the whisker array at the chosen vertical height, and is moved along the ray toward the center of the whisker array at the chosen speed. The position of the object may be adjusted to avoid collisions with the fixed whisker base ellipsoid during the sweep. See supplementary information for details. The data collected during a sweep includes, for each whisker, the forces and torques from all springs connecting to the three cuboids most proximate to the base of the whisker. This choice reflects the idea that mechanoreceptors are distributed along the entire length of the follicle at the whisker base [10]. The collected data comprises a matrix of shape 110 × 31 × 3 × 2 × 3, with dimensions respectively corresponding to: the 110 time samples; the 31 spatially distinct whiskers; the 3 recorded cuboids; the forces and torques from each cuboid; and the three directional components of force/torque. Object Set. The objects used in each sweep are chosen from a subset of the ShapeNet [6] dataset, which contains over 50,000 3D objects, each with a distinct geometry, belonging to 55 categories. Because the 55 ShapeNet categories are at a variety of levels of within-category semantic similarity, we refined the original 55 categories into a taxonomy of 117 (sub)categories that we felt had a more 4 ( ) ... Whiskers (31) Forces and torques (18) Time (110) a) Spatiotemporal b) Temporal - Spatial Time (110) Forces and torques (18) x31 c) Spatial - Temporal Whiskers (31) ( ) x110 d) Recurrent Skip/Feedback Time (110) Forces and torques (18) Whiskers (31) Whiskers (31) Forces and torques (18) Figure 3: Families of DNN Architectures tested: a. “Spatiotemporal” models include spatiotemporal integration at all stages. Convolution is performed on both spatial and temporal data dimensions, followed by one or several fully connected layers. b. “Temporal-Spatial” networks in which temporal integration is performed separately before spatial integration. Temporal integration consists of one-dimensional convolution over the temporal dimension, separately for each whisker. In spatial integration stages, outputs from each whisker are registered to their natural two-dimensional (2D) spatial grid and spatial convolution performed. c. In “Spatial-Temporal” networks, spatial convolution is performed first, replicated with shared weights across time points; this is then followed by temporal convolution. d. Recurrent networks do not explicitly contain separate units to handle different discrete timepoints, relying instead on the states of the units to encode memory traces. These networks can have local recurrence (e.g. simple addition or more complicated motifs like LSTMs or GRUs), as well as long-range skip and feedback connections. uniform amount of within-category shape similarity. The distribution of number of ShapeNet objects is highly non-uniform across categories, so we randomly subsampled objects from large categories. This procedure ensured that all categories contained approximately the same number of objects. Our final object set included 9,981 objects in 117 categories, ranging between 41 and 91 object exemplars per category (mean=85.3, median=91, std=10.2, see supplementary material for more details). To create the final dataset, for every object, 26 independent samples of rotation, scaling, and speed were drawn and the corresponding group of 12 sweeps created. Out of these 26 sweep groups, 24 were added to a training subset, while the remainder were reserved for testing. Basic Sensor Validation. To confirm that the whisker array was minimally functional before proceeding to more complex models, we produced smaller versions of our dataset in which sweeps were sampled densely for two objects (a bear and a duck). We also produced multiple easier versions of this dataset in which variation along one or several latent variables was suppressed. We then trained binary support vector machine (SVM) classifiers to report object identity in these datasets, using only the raw sensor data as input, and testing classification accuracy on held-out sweeps (Fig. 2d). We found that with scale and object rotation variability suppressed (but with speed and position variability retained), the sensor was able to nearly perfectly identify the objects. However, with all sources of variability present, the SVM was just above chance in its performance, while combinations of variability are more challenging for the sensor than others (details can be found in supplementary information). Thus, we concluded that our virtual whisker array was basically functional, but that unprocessed sensor data cannot be used to directly read out object shape in anything but the most highly controlled circumstances. As in the case of vision, it is exactly this circumstance that calls for a deep cascade of sensory processing stages. 4 Computational Architectures We trained deep neural networks (DNNs) in a variety of different architectural families (Fig. 3). These architectural families represent qualitatively different classes of hypotheses about the computations performed by the stages of processing in the vibrissal-trigeminal system. The fundamental questions explored by these hypotheses are how and where temporal and spatial information are integrated. Within each architectural family, the differences between specific parameter settings represent nuanced refinements of the larger hypothesis of that family. Parameter specifics include how many layers of each type are in the network, how many units are allocated to each layer, what kernel sizes are used at each layer, and so on. Biologically, these parameters may correspond to the number of brain regions (areas) involved, how many neurons these regions have relative to each other, and neurons’ local spatiotemporal receptive field sizes [35]. Simultaneous Spatiotemporal Integration. In this family of networks (Fig. 3a), networks consisted of convolution layers followed by one or more fully connected layers. Convolution is performed 5 simultaneously on both temporal and spatial dimensions of the input (and their corresponding downstream dimensions). In other words, temporally-proximal responses from spatially-proximal whiskers are combined together simultaneously, so that neurons in each successive layers have larger receptive fields in both spatial and temporal dimensions at once. We evaluated both 2D convolution, in which the spatial dimension is indexed linearly across the list of whiskers (first by vertical columns and then by lateral row on the 5 × 7 grid), as well as 3D convolution in which the two dimensions of the 5×7 spatial grid are explicitly represented. Data from the three vertical sweeps of the same object were then combined to produce the final output, culminating in a standard softmax cross-entropy. Separate Spatial and Temporal Integration. In these families, networks begin by integrating temporal and spatial information separately (Fig. 3b-c). One subclass of these networks are “TemporalSpatial” (Fig. 3b), which first integrate temporal information for each individual whisker separately and then combine the information from different whiskers in higher layers. Temporal processing is implemented as 1-dimensional convolution over the temporal dimension. After several layers of temporal-only processing (the number of which is a parameter), the outputs at each whisker are then reshaped into vectors and combined into a 5 × 7 whisker grid. Spatial convolutions are then applied for several layers. Finally, as with the spatiotemporal network described above, features from three sweeps are concatenated into a single fully connected layer which outputs softmax logits. Conversely, “Spatial-Temporal” networks (Fig. 3c) first use 2D convolution to integrate across whiskers for some number of layers, with shared parameters between the copies of the network for each timepoint. The temporal sequence of outputs is then combined, and several layers of 1D convolution are then applied in the temporal domain. Both Temporal-Spatial and Spatial-Temporal networks can be viewed as subclasses of 3D simultaneous spatiotemporal integration in which initial and final portions of the network have kernel size 1 in the relevant dimensions. These two network families can thus be thought of as two different strategies for allocating parameters between dimensions, i.e. different possible biological circuit structures. Recurrent Neural Networks with Skip and Feedback Connections. This family of networks (Fig. 3d) does not allocate units or parameters explicitly for the temporal dimension, and instead requires temporal processing to occur via the temporal update evolution of the system. These networks are built around a core feedforward 2D spatial convolution structure, with the addition of (i) local recurrent connections, (ii) long-range feedforward skips between non-neighboring layers, and (iii) long-range feedback connections. The most basic update rule for the dynamic trajectory of such a network through (discrete) time is: Hi t+1 = Fi ⊕j̸=iRj t + τiHi t and Ri t = Ai[Hi t], where Ri t and Hi t are the output and hidden state of layer i at time t respectively, τi are decay constants, ⊕ represents concatenation across the channel dimension with appropriate resizing to align dimensions, Fi is the standard neural network update function (e.g. 2-D convolution), and Ai is activation function at layer i. The learned parameters of this type of network include the values of the parameters of Fi, which comprises both the feedforward and feedback weights from connections coming in to layer i, as well as the decay constants τi. More sophisticated dynamics can be incorporated by replacing the simple additive rule above with a local recurrent structure such as Long Short-Term Memory (LSTM) [15] or Gated Recurrent Networks (GRUs) [7]. 5 Results Model Performance: Our strategy in identifying potential models of the whisker-trigeminal system is to explore many specific architectures within each architecture family, evaluating each specific architecture both in terms of its ability to solve the shape recognition task in our training dataset, and its efficiency (number of parameters and number of overall units). Because we evaluate networks on held-out validation data, it is not inherently unfair to compare results from networks different numbers of parameters, but for simplicity we generally evaluated models with similar numbers of parameters: exceptions are noted where they occur. As we evaluated many individual structures within each family, a list of the specific models and parameters are given in the supplementary materials. Our results (Fig. 4) can be summarized with following conclusions: • Many specific network choices within all families do a poor job at the task, achieving just-abovechance performance. • However, within each family, certain specific choices of parameters lead to much better network performance. Overall, the best performance was obtained for the Temporal-Spatial model, with 6 chairs tables boats cars containers electronics airplanes home appliances 50 b) 30 10 0.4 1.2 Accuracy (percent correct) Number of Units (in millions) S_rand S_2c0f S_1c0f S_3c0f S_1c2f S_2c1f S_3c1f S_few S_2c2f S_3D S_3c2f S_4c2f Spatiotemporal (S) S_more S_deep TS_few Spatial-Temporal RNN_byp RNN_lstm RNN_gru RNN RNN_fdb Temporal-Spatial a) 0.4 25.0 21.5 25.0 22.6 23.4 22.1 1.5 23.9 53.1 22.2 22.1 22.3 83.4 24.0 11.8 27.9 24.7 23.0 25.5 25.5 23.7 27.2 Figure 4: Performance results. a. Each bar in this figure represents one model. The positive y-axis is performance measured in percent correct (top1=dark bar, chance=0.85%, top5=light bar, chance=4.2%). The negative y-axis indicates the number of units in networks, in millions of units. Small italic numbers indicate number of model parameters, in millions. Model architecture family is indicated by color. "ncmf" means n convolution and m fully connected layers. Detailed definition of individual model labels can be found in supplementary material. b. Confusion Matrix for the highest-performing model (in the Temporal-Spatial family). The objects are regrouped using methods described in supplementary material. 15.2% top-1 and 44.8% top-5 accuracy. Visualizing a confusion matrix for this network (Fig. 4)b and other high-performing networks indicate that the errors they make are generally reasonable. • Training the filters was extremely important for performance; no architecture with random filters performed above chance levels. • Architecture depth was an important factor in performance. Architectures with fewer than four layers achieved substantially lower performance than somewhat deeper ones. • Number of model parameters was a somewhat important factor in performance within an architectural family, but only to a point, and not between architectural families. The Temporal-Spatial architecture was able to outperform other classes while using significantly fewer parameters. • Recurrent networks with long-range feedback were able to perform nearly as well as the TemporalSpatial model with equivalent numbers of parameters, while using far fewer units. These long-range feedbacks appeared critical to performance, with purely local recurrent architectures (including LSTM and GRU) achieving significantly worse results. Model Discrimination: The above results indicated that we had identified several high-performing networks in quite distinct architecture families. In other words, the strong performance constraint allows us to identify several specific candidate model networks for the biological system, reducing a much larger set of mostly non-performing neural networks into a “shortlist”. The key biologically relevant follow-up question is then: how should we distinguish between the elements in the shortlist? That is, what reliable signatures of the differences between these architectures could be extracted from data obtainable from experiments that use today’s neurophysiological tools? To address this question, we used Representational Dissimilarity Matrix (RDM) analysis [23]. For a set of stimuli S, RDMs are |S| × |S|-shaped correlation distance matrices taken over the feature dimensions of a representation, e.g. matrices with ij-th entry RDM[i, j] = 1 −corr(F[i], F[j]) for stimuli i, j and corresponding feature output F[i], F[j]. The RDM characterizes the geometry of stimulus representation in a way that is independent of the individual feature dimensions. RDMs can thus be quantitatively compared between different feature representations of the same data. This procedure been useful in establishing connections between deep neural networks and the ventral visual stream, where it has been shown that the RDMs of features from different layers of neural networks trained to solve categorization tasks match RDMs computed from visual brain areas at different positions along the ventral visual hierarchy [5, 34, 21]. RDMs are readily computable from neural response pattern data samples, and are in general comparatively robust to variability due to experimental randomness (e.g. electrode/voxel sampling). RDMs for real neural populations from the rodent whisker-trigeminal system could be obtained through a conceptually simple electrophysiological recording experiment similar in spirit to those performed in macaque [34]. We obtained RDMs for several of our high-performing models, computing RDMs separately for each model layer (Fig. 5a), averaging feature vectors over different sweeps of the same object before 7 0.00 0.16 0.00 0.48 0.00 1.35 Early Layer . . . Middle Layer . . . Late Layer Principal Axis 2 Principal Axis 1 Temporal-Spatial Feedback RNN b) a) inter-model distance within-model variability Figure 5: Using RDMs to Discriminate Between High-Performing Models. a. Representational Dissimilarity Matrices (RDMs) for selected layers of a high-performing network from Fig. 4a, showing early, intermediate and late model layers. Model feature vectors are averaged over classes in the dataset prior to RDM computation, and RDMs are shown using the same ordering as in Fig. 4b. b. Two-dimensional MDS embedding of RDMs for the feedback RNN (green squares) and Temporal-Spatial (red circles) model. Points correspond to layers, lines are drawn between adjacent layers, with darker color indicating earlier layers. Multiple lines are models trained from different initial conditions, allowing within-model noise estimate. computing the correlations. This procedure lead to 9981 × 9981-sized matrices (there were 9,981 distinct object in our dataset). We then computed distances between each layer of each model in RDM space, as in (e.g.) [21]. To determine if differences in this space between models and/or layers were significant, we computed RDMs for multiple instances of each model trained with different initial conditions, and compared the between-model to within-model distances. We found that while the top layers of models partially converged (likely because they were all trained on the same task), intermediate layers diverged substantially between models, by amounts larger than either the initial-condition-induced variability within a model layer or the distance between nearby layers of the same model (Fig. 5b). This observation is important from an experimental design point of view because it shows that different model architectures differ substantially on a well-validated metric that may be experimentally feasible to measure. 6 Conclusion We have introduced a model of the rodent whisker array informed by biophysical data, and used it to generate a large high-variability synthetic sweep dataset. While the raw sensor data is sufficiently powerful to separate objects at low amounts of variability, at higher variation levels deeper nonlinear neural networks are required to extract object identity. We found further that while many particular network architectures, especially shallow ones, fail to solve the shape recognition task, reasonable performance levels can be obtained for specific architectures within each distinct network structural family tested. We then showed that a population-level measurement that is in principle experimentally obtainable can distinguish between these higher-performing networks. To summarize, we have shown that a goal-driven DNN approach to modeling the whisker-trigeminal system is feasible. Code for all results, including the whisker model and neural networks, is publicly available at https://github.com/neuroailab/whisker_model. We emphasize that the present work is proof-of-concept rather than a model of the real nervous system. A number of critical issues must be overcome before our true goal — a full integration of computational modeling with experimental data — becomes possible. First, although our sensor model was biophysically informed, it does not include active whisking, and the mechanical signals at the whisker bases are approximate [29, 16]. An equally important problem is that the goal that we set for our network, i.e. shape discrimination between 117 human-recognizable object classes, is not directly ethologically relevant to rodents. The primary reason for this task choice was practical: ShapeNet is a readily available and high-variability source of 3D objects. If we had instead used a small, manually constructed, set of highly simplified objects that we hoped were more “rat-relevant”, it is likely that our task would have been too simple to constrain neural networks at the scale of the real whisker-trigeminal system. Extrapolating from modeling of the visual system, training a deep net on 1000 image categories yields a feature basis that can readily distinguish between previously-unobserved categories [34, 5, 30]. Similarly, we suggest that the large and variable object set used here may provide a meaningful constraint on network 8 structure, as the specific object geometries may be less important then having a wide spectrum of such geometries. However, a key next priority is systematically building an appropriately large and variable set of objects, textures or other class boundaries that more realistically model the tasks that a rodent faces. The specific results obtained (e.g. which families are better than others, and the exact structure of learned representations) are likely to change significantly when these improvements are made. In concert with these improvements, we plan to collect neural data in several areas within the whisker-trigeminal system, enabling us to make direct comparisons between model outputs and neural responses with metrics such as the RDM. There are few existing experimentally validated signatures of the computations in the whisker-trigeminal system. Ideally, we will validate one or a small number of the specific model architectures described above by identifying a detailed mapping of model internal layers to brain-area specific response patterns. A core experimental issue is the magnitude of real experimental noise in trigeminal-system RDMs. We will need to show that this noise does not swamp inter-model distances (as shown in Fig. 5b), enabling us to reliably identify which model(s) are better predictors of the neural data. Though real neural RDM noise cannot yet be estimated, the intermodel RDM distances that we can compute computationally will be useful for informing experimental design decisions (e.g. trial count, stimulus set size, &c). In the longer term, we expect to use detailed encoding models of the whisker-trigeminal system as a platform for investigating issues of representation learning and sensory-based decision making in the rodent. A particularly attractive option is to go beyond fixed class discrimination problems and situate a synthetic whisker system on a mobile animal in a navigational environment where it will be faced with a variety of actively-controlled discrete and continuous estimation problems. In this context, we hope to replace our currently supervised loss function with a more naturalistic reinforcement-learning based goal. By doing this work with a rich sensory domain in rodents, we seek to leverage the sophisticated neuroscience tools available in these systems to go beyond what might be possible in other model systems. 7 Acknowledgement This project has sponsored in part by hardware donation from the NVIDIA Corporation, a James S. McDonnell Foundation Award (No. 220020469) and an NSF Robust Intelligence grant (No. 1703161) to DLKY, the European Union’s Horizon 2020 research and innovation programme (No. 705498) to JK, and NSF awards (IOS-0846088 and IOS-1558068) to MJZH. References [1] Ehsan Arabzadeh, Erik Zorzin, and Mathew E. Diamond. Neuronal encoding of texture in the whisker sensory pathway. PLoS Biology, 3(1), 2005. [2] Michael Armstrong-James, KEVIN Fox, and Ashis Das-Gupta. Flow of excitation within rat barrel cortex on striking a single vibrissa. Journal of neurophysiology, 68(4):1345–1358, 1992. [3] James Bergstra, Dan Yamins, and David D Cox. Hyperopt: A python library for optimizing the hyperparameters of machine learning algorithms. In Proceedings of the 12th Python in Science Conference, pages 13–20. Citeseer, 2013. [4] Laurens WJ Bosman, Arthur R Houweling, Cullen B Owens, Nouk Tanke, Olesya T Shevchouk, Negah Rahmati, Wouter HT Teunissen, Chiheng Ju, Wei Gong, Sebastiaan KE Koekkoek, et al. Anatomical pathways involved in generating and sensing rhythmic whisker movements. Frontiers in integrative neuroscience, 5:53, 2011. [5] Charles F Cadieu, Ha Hong, Daniel LK Yamins, Nicolas Pinto, Diego Ardila, Ethan A Solomon, Najib J Majaj, and James J DiCarlo. Deep neural networks rival the representation of primate it cortex for core visual object recognition. PLoS computational biology, 10(12):e1003963, 2014. [6] Angel X. Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. ShapeNet: An Information-Rich 3D Model Repository. ArXiv, 2015. [7] Kyunghyun Cho, Bart Van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. [8] Martin Deschenes and Nadia Urbain. Vibrissal afferents from trigeminus to cortices. Scholarpedia, 4(5):7454, 2009. 9 [9] Mathew E Diamond, Moritz von Heimendahl, Per Magne Knutsen, David Kleinfeld, and Ehud Ahissar. ’Where’ and ’what’ in the whisker sensorimotor system. Nat Rev Neurosci, 9(8):601–612, 2008. [10] Satomi Ebara, Kenzo Kumamoto, Tadao Matsuura, Joseph E Mazurkiewicz, and Frank L Rice. Similarities and differences in the innervation of mystacial vibrissal follicle–sinus complexes in the rat and cat: a confocal microscopic study. Journal of Comparative Neurology, 449(2):103–119, 2002. [11] Daniel J Felleman and David C Van Essen. Distributed hierarchical processing in the primate cerebral cortex. Cerebral cortex, 1(1):1–47, 1991. [12] Melvyn A. Goodale and A. David Milner. Separate visual pathways for perception and action. Trends in Neurosciences, 15(1):20–25, 1992. [13] M. Hartmann. Vibrissa mechanical properties. Scholarpedia, 10(5):6636, 2015. revision #151934. [14] Jennifer A Hobbs, R Blythe Towal, and Mitra JZ Hartmann. Spatiotemporal patterns of contact across the rat vibrissal array during exploratory behavior. Frontiers in behavioral neuroscience, 9, 2015. [15] Sepp Hochreiter and Jurgen Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1–32, 1997. [16] Lucie A. Huet and Mitra J Z Hartmann. Simulations of a Vibrissa Slipping along a Straight Edge and an Analysis of Frictional Effects during Whisking. IEEE Transactions on Haptics, 9(2):158–169, 2016. [17] Koji Inui, Xiaohong Wang, Yohei Tamura, Yoshiki Kaneoke, and Ryusuke Kakigi. Serial processing in the human somatosensory system. Cerebral Cortex, 14(8):851–857, 2004. [18] Yoshiaki Iwamura. Hierarchical somatosensory processing. Current Opinion in Neurobiology, 8(4):522– 528, 1998. [19] A *Kell, D *Yamins, S Norman-Haignere, and J McDermott. Functional organization of auditory cortex revealed by neural networks optimized for auditory tasks. In Society for Neuroscience, 2015. [20] Jason ND Kerr, Christiaan PJ De Kock, David S Greenberg, Randy M Bruno, Bert Sakmann, and Fritjof Helmchen. Spatial organization of neuronal population responses in layer 2/3 of rat barrel cortex. Journal of neuroscience, 27(48):13316–13328, 2007. [21] Seyed-Mahdi Khaligh-Razavi and Nikolaus Kriegeskorte. Deep supervised, but not unsupervised, models may explain it cortical representation. PLoS Comput Biol, 10(11):e1003915, 2014. [22] Per Magne Knutsen, Maciej Pietr, and Ehud Ahissar. Haptic object localization in the vibrissal system: behavior and performance. The Journal of neuroscience : the official journal of the Society for Neuroscience, 26(33):8451–64, 2006. [23] Nikolaus Kriegeskorte, Marieke Mur, and Peter a. Bandettini. Representational similarity analysis connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2(November):4, 2008. [24] Jeffrey D Moore, Nicole Mercer Lindsay, Martin Deschênes, and David Kleinfeld. Vibrissa self-motion and touch are reliably encoded along the same somatosensory pathway from brainstem through thalamus. PLoS Biol, 13(9):e1002253, 2015. [25] Daniel H. O’Connor, Simon P. Peron, Daniel Huber, and Karel Svoboda. Neural activity in barrel cortex underlying vibrissa-based object localization in mice. Neuron, 67(6):1048–1061, 2010. [26] Carl CH Petersen, Amiram Grinvald, and Bert Sakmann. Spatiotemporal dynamics of sensory responses in layer 2/3 of rat barrel cortex measured in vivo by voltage-sensitive dye imaging combined with whole-cell voltage recordings and neuron reconstructions. Journal of neuroscience, 23(4):1298–1309, 2003. [27] T P Pons, P E Garraghty, David P Friedman, and Mortimer Mishkin. Physiological evidence for serial processing in somatosensory cortex. Science (New York, N.Y.), 237(4813):417–420, 1987. [28] Dale Purves, George J Augustine, David Fitzpatrick, Lawrence C Katz, Anthony-Samuel LaMantia, James O McNamara, and S Mark Williams. Neuroscience. Sunderland, MA: Sinauer Associates, 3, 2001. [29] Brian W Quist, Vlad Seghete, Lucie A Huet, Todd D Murphey, and Mitra J Z Hartmann. Modeling Forces and Moments at the Base of a Rat Vibrissa during Noncontact Whisking and Whisking against an Object. J Neurosci, 34(30):9828–9844, 2014. 10 [30] Ali S Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: an astounding baseline for recognition. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2014 IEEE Conference on, pages 512–519. IEEE, 2014. [31] R. Blythe Towal, Brian W. Quist, Venkatesh Gopal, Joseph H. Solomon, and Mitra J Z Hartmann. The morphology of the rat vibrissal array: A model for quantifying spatiotemporal patterns of whisker-object contact. PLoS Computational Biology, 7(4), 2011. [32] Moritz Von Heimendahl, Pavel M Itskov, Ehsan Arabzadeh, and Mathew E Diamond. Neuronal activity in rat barrel cortex underlying texture discrimination. PLoS Biol, 5(11):e305, 2007. [33] Wikipedia. Bullet (software) — wikipedia, the free encyclopedia, 2016. [Online; accessed 19-October2016]. [34] Daniel L K Yamins, Ha Hong, Charles F Cadieu, Ethan a Solomon, Darren Seibert, and James J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences of the United States of America, 111(23):8619–24, jun 2014. [35] Daniel LK Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature neuroscience, 19(3):356–365, 2016. [36] Chunxiu Yu, Dori Derdikman, Sebastian Haidarliu, and Ehud Ahissar. Parallel thalamic pathways for whisking and touch signals in the rat. PLoS Biol, 4(5):e124, 2006. 11 | 2017 | 451 |
6,954 | Clustering Billions of Reads for DNA Data Storage Cyrus Rashtchiana,b Konstantin Makarycheva,c Miklós Rácza,d Siena Dumas Anga Djordje Jevdjica Sergey Yekhanina Luis Cezea,b Karin Straussa aMicrosoft Research, bCSE at University of Washington, cEECS at Northwestern University, dORFE at Princeton University Abstract Storing data in synthetic DNA offers the possibility of improving information density and durability by several orders of magnitude compared to current storage technologies. However, DNA data storage requires a computationally intensive process to retrieve the data. In particular, a crucial step in the data retrieval pipeline involves clustering billions of strings with respect to edit distance. Datasets in this domain have many notable properties, such as containing a very large number of small clusters that are well-separated in the edit distance metric space. In this regime, existing algorithms are unsuitable because of either their long running time or low accuracy. To address this issue, we present a novel distributed algorithm for approximately computing the underlying clusters. Our algorithm converges efficiently on any dataset that satisfies certain separability properties, such as those coming from DNA data storage systems. We also prove that, under these assumptions, our algorithm is robust to outliers and high levels of noise. We provide empirical justification of the accuracy, scalability, and convergence of our algorithm on real and synthetic data. Compared to the state-of-the-art algorithm for clustering DNA sequences, our algorithm simultaneously achieves higher accuracy and a 1000x speedup on three real datasets. 1 Introduction Existing storage technologies cannot keep up with the modern data explosion. Thus, researchers have turned to fundamentally different physical media for alternatives. Synthetic DNA has emerged as a promising option, with theoretical information density of multiple orders of magnitude more than magnetic tapes [12, 24, 26, 52]. However, significant biochemical and computational improvements are necessary to scale DNA storage systems to read/write exabytes of data within hours or even days. Figure 1: DNA storage datasets have many small clusters that are well-separated in edit distance. Encoding a file in DNA requires several preprocessing steps, such as randomizing it using a pseudo-random sequence, partitioning it into hundred-character substrings, adding address and error correction information to these substrings, and finally encoding everything to the {A, C, G, T} alphabet. The resulting collection of short strings is synthesized into DNA and stored until needed. To retrieve the data, the DNA is accessed using next-generation sequencing, which results in several noisy copies, called reads, of each originally synthesized short string, called a reference. With current technologies, these references and reads contain hundreds of characters, and in the near future, they will likely contain thousands [52]. After sequencing, the goal is to recover the unknown references from the observed reads. The first step, which is the focus of this paper, is to cluster the reads into groups, each of which is the set of noisy copies of a single reference. The output of clustering is fed into a consensus-finding algorithm, which predicts the most likely reference to have produced each cluster of reads. As Figure 1 shows, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. datasets typically contain only a handful of reads for each reference, and each of these reads differs from the reference by insertions, deletions, and/or substitutions. The challenge of clustering is to achieve high precision and recall of many small underlying clusters, in the presence of such errors. Datasets arising from DNA storage have two striking properties. First, the number of clusters grows linearly with the input size. Each cluster typically consists of five to fifteen noisy copies of the same reference. Second, the clusters are separated in edit distance, by design (via randomization). We investigate approximate clustering algorithms for large collections of reads with these properties. Suitable algorithms must satisfy several criteria. First, they must be distributed, to handle the billions of reads coming from modern sequencing machines. Second, their running time must scale favorably with the number of clusters. In DNA storage datasets, the size of the clusters is fixed and determined by the number of reads needed to recover the data. Thus, the number of clusters k grows linearly with the input size n (i.e., k = Ω(n)). Any methods requiring Ω(k · n) = Ω(n2) time or communication would be too slow for billion-scale datasets. Finally, algorithms must be robust to noise and outliers, and they must find clusters with relatively large diameters (e.g., linear in the dimensionality). These criteria rule out many clustering methods. Algorithms for k-medians and related objectives are unsuitable because they have running time or communication scaling with k · n [19, 29, 33, 42]. Graph clustering methods, such as correlation clustering [4, 9, 18, 47], require a similarity graph.1 Constructing this graph is costly, and it is essentially equivalent to our clustering problem, since in DNA storage datasets, the similarity graph has connected components that are precisely the clusters of noisy reads. Linkage-based methods are inherently sequential, and iteratively merging the closest pair of clusters takes quadratic time. Agglomerative methods that are robust to outliers do not extend to versions that are distributed and efficient in terms of time, space, and communication [2, 8]. Turning to approximation algorithms, tools such as metric embeddings [43] and locality sensitive hashing (LSH) [31] trade a small loss in accuracy for a large reduction in running time. However, such tools are not well understood for edit distance [16, 17, 30, 38, 46], even though many methods have been proposed [15, 27, 39, 48, 54]. In particular, no published system has demonstrated the potential to handle billions of reads, and no efficient algorithms have experimental or theoretical results supporting that they would achieve high enough accuracy on DNA storage datasets. This is in stark contrast to set similarity and Hamming distance, which have many positive results [13, 36, 40, 49, 55]. Given the challenges associated with existing solutions, we ask two questions: (1) Can we design a distributed algorithm that converges in sub-quadratic time for DNA storage datasets? (2) Is it possible to adapt techniques from metric embeddings and LSH to cluster billions of strings in under an hour? Our Contributions We present a distributed algorithm that clusters billions of reads arising from DNA storage systems. Our agglomerative algorithm utilizes a series of filters to avoid unnecessary distance computations. At a high level, our algorithm iteratively merges clusters based on random representatives. Using a hashing scheme for edit distance, we only compare a small subset of representatives. We also use a light-weight check based on a binary embedding to further filter pairs. If a pair of representatives passes these two tests, edit distance determines whether the clusters are merged. Theoretically and experimentally, our algorithm satisfies four desirable properties. Scalability: Our algorithm scales well in time and space, in shared-memory and shared-nothing environments. For n input reads, each of P processors needs to hold only O(n/P) reads in memory. Accuracy: We measure accuracy as the fraction of clusters with a majority of found members and no false positives. Theoretically, we show that the separation of the underlying clusters implies our algorithm converges quickly to a correct clustering. Experimentally, a small number of communication rounds achieve 98% accuracy on multiple real datasets, which suffices to retrieve the stored data. Robustness: For separated clusters, our algorithm is optimally robust to adversarial outliers. Performance: Our algorithm outperforms the state-of-the-art clustering method for sequencing data, Starcode [57], achieving higher accuracy with a 1000x speedup. Our algorithm quickly recovers clusters with large diameter (e.g., 25), whereas known string similarity search methods perform poorly with distance threshold larger than four [35, 53]. Our algorithm is simple to implement in any distributed framework, and it clusters 5B reads with 99% accuracy in 46 minutes on 24 processors. 1The similarity graph connects all pairs of elements with distance below a given threshold. 2 1.1 Outline The rest of the paper is organized as follows. We begin, in Section 2, by defining the problem statement, including clustering accuracy and our data model. Then, in Section 3, we describe our algorithm, hash function, and binary signatures. In Section 4, we provide an overview of the theoretical analysis, with most details in the appendix. In Section 5, we empirically evaluate our algorithm. We discuss related work in Section 6 and conclude in Section 7. 2 DNA Data Storage Model and Problem Statement For an alphabet Σ, the edit distance between two strings x, y ∈Σ∗is denoted dE(x, y) and equals the minimum number of insertions, deletions, or substitutions needed to transform x to y. It is well known that dE defines a metric. We fix Σ = {A, C, G, T}, representing the four DNA nucleotides. We define the distance between two nonempty sets C1, C2 ⊆Σ∗as dE(C1, C2) = minx∈C1,y∈C2 dE(x, y). A clustering C of a finite set S ⊆Σ∗is any partition of S into nonempty subsets. We work with the following definition of accuracy, motivated by DNA storage data retrieval. Definition 2.1 (Accuracy). Let C, eC be clusterings. For 1/2 < γ ⩽1 the accuracy of eC with respect to C is Aγ(C, eC) = max π 1 |C| |C| X i=1 1{ eCπ(i) ⊆Ci and | eCπ(i) ∩Ci| ⩾γ|Ci|}, where the max is over all injective maps π : {1, 2, . . . , |eC|} →{1, 2, . . . , max(|C|, |eC|)}. We think of C as the underlying clustering and eC as the output of an algorithm. The accuracy Aγ(C, eC) measures the number of clusters in eC that overlap with some cluster in C in at least a γ-fraction of elements while containing no false positives.2 This is a stricter notion than the standard classification error [8, 44]. Notice that our accuracy definition does not require that the clusterings be of the same set. We will use this to compare clusterings of S and S ∪O for a set of outliers O ⊆Σ∗. For DNA storage datasets, the underlying clusters have a natural interpretation. During data retrieval, several molecular copies of each original DNA strand (reference) are sent to a DNA sequencer. The output of sequencing is a small number of noisy reads of each reference. Thus, the reads that correspond to the same reference form a cluster. This interpretation justifies the need for high accuracy: each underlying cluster represents one stored unit of information. Data Model To aid in the design and analysis of clustering algorithms for DNA data storage, we introduce the following natural generative model. First, pick many random centers (representing original references), then perturb each center by insertions, deletions, and substitutions to acquire the elements of the cluster (representing the noisy reads). We model the original references as random strings because during the encoding process, the original file has been randomized using a fixed pseudo-random sequence [45]. We make this model precise, starting with the perturbation. Definition 2.2 (p-noisy copy). For p ∈[0, 1] and z ∈Σ∗, define a p-noisy copy of z by the following process. For each character in z, independently, do one of the following four operations: (i) keep the character unchanged with probability (1 −p), (ii) delete it with probability p/3, (iii) with probability p/3, replace it with a character chosen uniformly at random from Σ, or (iv) with probability p/3, keep the character and insert an additional one after it, chosen uniformly at random from Σ. We remark that our model and analysis can be generalized to incorporate separate deletion, insertion, and substitution probabilities p = pD + pI + pS, but we use balanced probabilities p/3 to simplify the exposition. Now, we define a noisy cluster. For simplicity, we assume uniform cluster sizes. Definition 2.3 (Noisy cluster of size s). We define the distribution Ds,p,m with cluster size s, noise rate p ∈[0, 1], and dimension m. Sample a cluster C ∼Ds,p,m as follows: pick a center z ∈Σm uniformly at random; then, each of the s elements of C will be an independent p-noisy copy of z. With our definition of accuracy and our data model in hand, we define the main clustering problem. 2The requirement γ ∈(1/2, 1] implies Aγ(C, eC) ∈[0, 1]. 3 Problem Statement Fix p, m, s, n. Let C = {C1, . . . , Ck} be a set of k = n/s independent clusters Ci ∼Ds,p,m. Given an accuracy parameter γ ∈(1/2, 1] and an error tolerance ε ∈[0, 1], on input set S = ∪k i=1Ci, the goal is to quickly find a clustering eC of S with Aγ(C, eC) ⩾1 −ε. 3 Approximately Clustering DNA Storage Datasets Our distributed clustering method iteratively merges clusters with similar representatives, alternating between local clustering and global reshuffling. At the core of our algorithm is a hash family that determines (i) which pairs of representatives to compare, and (ii) how to repartition the data among the processors. On top of this simple framework, we use a cheap pre-check, based on the Hamming distance between binary signatures, to avoid many edit distance comparisons. Our algorithm achieves high accuracy by leveraging the fact that DNA storage datasets contain clusters that are well-separated in edit distance. In this section, we will define separated clusterings, explain the hash function and the binary signature, and describe the overall algorithm. 3.1 Separated Clusters The most important consequence of our data model Ds,p,m is that the clusters will be well-separated in the edit distance metric space. Moreover, this reflects the actual separation of clusters in real datasets. To make this precise, we introduce the following definition. Definition 3.1. A clustering {C1, . . . , Ck} is (r1, r2)-separated if Ci has diameter3 at most r1 for every i ∈{1, 2, . . . , k}, while any two different clusters Ci and Cj satisfy dE(Ci, Cj) > r2. DNA storage datasets will be separated with r2 ≫r1. Thus, recovering the clusters corresponds to finding pairs of strings with distance at most r1. Whenever r2 ⩾2·r1, our algorithm will be robust to outliers. In Section 4, we provide more details about separability under our DNA storage data model. We remark that our clustering separability definition differs slightly from known notions [2, 3, 8] in that we explicitly bound both the diameter of clusters and distance between clusters. 3.2 Hashing for Edit Distance Algorithms for string similarity search revolve around the simple fact that when two strings x, y ∈Σm have edit distance at most r, then they share a substring of length at least m/(r + 1). However, insertions and deletions imply that the matching substrings may appear in different locations. Exact algorithms build inverted indices to find matching substrings, and many optimizations have been proposed to exactly find all close pairs [34, 51, 57]. Since we need only an approximate solution, we design a hash family based on finding matching substrings quickly, without being exhaustive. Informally, for parameters w, ℓ, our hash picks a random “anchor” a of length w, and the hash value for x is the substring of length w + ℓstarting at the first occurrence of a in x. We formally define the family of hash functions Hw,ℓ= {hπ,ℓ: Σ∗→Σw+ℓ} parametrized by w, ℓ, where π is a permutation of Σw. For x = x1x2 · · · xm, the value of hπ,ℓ(x) is defined as follows. Find the earliest, with respect to π, occurring w-gram a in x, and let i be the index of the first occurrence of a in x. Then, hπ,ℓ(x) = xi · · · xm′ where m′ = min(m, i + w + ℓ). To sample hπ,ℓ from Hw,ℓ, simply pick a uniformly random permutation π : Σw →Σw. Note that Hw,ℓresembles MinHash [13, 14] with the natural mapping from strings to sets of substrings of length w + ℓ. Our hash family has the benefit of finding long substrings (such as w + ℓ= 16), while only having the overhead of finding anchors of length w. This reduces computation time, while still leading to effective hashes. We now describe the signatures. 3.3 Binary Signature Distance The q-gram distance is an approximation for edit distance [50]. By now, it is a standard tool in bioinformatics and string similarity search [27, 28, 48, 54]. A q-gram is simply a substring of length q, and the q-gram distance measures the number of different q-grams between two strings. For a string 3A cluster C has diameter at most r if dE(x, y) ⩽r for all pairs x, y ∈C. 4 Algorithm 1 Clustering DNA Strands 1: function CLUSTER(S, r, q, w, ℓ, θlow, θhigh, comm_steps, local_steps) 2: eC = S. 3: For i = 1, 2, . . . , comm_steps: 4: Sample hπ,ℓ∼Hw,ℓand hash-partition clusters, applying hπ,ℓto representatives. 5: For j = 1, 2, . . . , local_steps: 6: Sample hπ,ℓ∼Hw,ℓ. 7: For C ∈eC, sample a representative xC ∼C, and then compute the hash hπ,ℓ(xC). 8: For each pair x, y with hπ,ℓ(x) = hπ,ℓ(y): 9: If (dH(σ(x), σ(y)) ⩽θlow) or (dH(σ(x), σ(y)) ⩽θhigh and dE(x, y) ⩽r): 10: Update eC = (eC \ {Cx, Cy}) ∪{Cx ∪Cy}. 11: return eC. 12: end function x ∈Σm, let the binary signature σq(x) ∈{0, 1}4q be the indicator vector for the set q-grams in x. Then, the q-gram distance between x and y equals the Hamming distance dH(σq(x), σq(y)). The utility of the q-gram distance is that the Hamming distance dH(σq(x), σq(y)) approximates the edit distance dE(x, y), yet it is much faster to check dH(σq(x), σq(y)) ⩽θ than to verify dE(x, y) ⩽r. The only drawback of the q-gram distance is that it may not faithfully preserve the separation of clusters, in the worst case. This implies that the q-gram distance by itself is not sufficient for clustering. Therefore, we use binary signatures as a coarse filtering step, but reserve edit distance for ambiguous merging decisions. We provide theoretical bounds on the q-gram distance in Section 4.1 and Appendix B. We now explain our algorithm. 3.4 Algorithm Description We describe our distributed, agglomerative clustering algorithm (displayed in Algorithm 1). The algorithm ingests the input set S ⊂Σ∗in parallel, so each core begins with roughly the same number of reads. Signatures σq(x) are pre-computed and stored for each x ∈S. The clustering eC is initialized as singletons. It will be convenient to use the notation xC for an element x ∈C, and the notation Cx for the cluster that x belongs to. We abuse notation and use eC to denote the current global clustering. The algorithm alternates between global communication and local computation. Communication One representative xC is sampled uniformly from each cluster Cx in the current clustering eC, in parallel. Then, using shared randomness among all cores, a hash function hπ,ℓis sampled from Hw,ℓ. Using this same hash function for each core, a hash value is computed for each representative xC for cluster C in the current clustering eC. The communication round ends by redistributing the clusters randomly using these hash values. In particular, the value hπ,ℓ(xc) determines which core receives C. The current clustering eC is thus repartitioned among cores. Local Computation The local computation proceeds independently on each core. One local round revolves around one hash function hπ,ℓ∼Hw,ℓ. Let eCj be the set of clusters that have been distributed to the jth core. During each local clustering step, one uniform representative xC is sampled for each cluster C ∈eCj. The representatives are bucketed based on hπ,ℓ(xc). Now, the local clustering requires three parameters, r, θlow, θhigh, set ahead of time, and known to all the cores. For each pair y, z in a bucket, first the algorithm checks whether dH(σq(y), σq(z)) ⩽θlow. If so, the clusters Cy and Cz are merged. Otherwise, the algorithm checks if both dH(σq(y), σq(z)) ⩽θhigh and dE(x, y) ⩽r, and merges the clusters Cy and Cz if these two conditions hold. Immediately after a merge, eCj is updated, and Cx corresponds to the present cluster containing x. Note that distributing the clusters among cores during communication implies that no coordination is needed after merges. The local clustering repeats for local_steps rounds before moving to the next communication round. Termination After the local computation finishes, after the last of comm_steps communication rounds, the algorithm outputs the current clustering eC = S j eCj and terminates. 5 4 Theoretical Algorithm Analysis 4.1 Cluster Separation and Binary Signatures When storing data in DNA, the encoding process leads to clusters with nearly-random centers. Recall that we need the clusters to be far apart for our algorithm to perform well. Fortunately, random cluster centers will have edit distance Ω(m) with high-probability. Indeed, two independent random strings have expected edit distance cind · m, for a constant cind > 0. Surprisingly, the exact value of cind remains unknown. Simulations suggest that cind ≈0.51, and it is known that cind > 0.338 [25]. When recovering the data, DNA storage systems receive clusters that consist of p-noisy copies of the centers. In particular, two reads inside of a cluster will have edit distance O(pm), since they are p-noisy copies of the same center. Therefore, any two reads in different clusters will be far apart in edit distance whenever p ≪cind is a small enough constant. We formalize these bounds and provide more details, such as high-probability results, in Appendix A. Another feature of our algorithm is the use of binary signatures. To avoid incorrectly merging distinct clusters, we need the clusters to be separated according to q-gram distance. We show that random cluster centers will have q-gram distance Ω(m) when q = 2 log4 m. Additionally, for any two reads x, y, we show that dH(σq(x), σq(y)) ⩽2q · dE(x, y), implying that if x and y are in the same cluster, then their q-gram distance will be at most O(qpm). Therefore, whenever p ≪1/q ≈1/ log m, signatures will already separate clusters. For larger p, we use the pair of thresholds θlow < θhigh to mitigate false merges. We provide more details in Appendix B. In Section 5, we mention an optimization for the binary signatures, based on blocking, which empirically improves the approximation quality, while reducing memory and computational overhead. 4.2 Convergence and Hash Analysis The running time of our algorithm depends primarily on the number of iterations and the total number of comparisons performed. The two types of comparisons are edit distance computations, which take time O(rm) to check distance at most r, and q-gram distance computations, which take time linear in the signature length. To avoid unnecessary comparisons, we partition cluster representatives using our hash function and only compare reads with the same hash value. Therefore, we bound the total number of comparisons by bounding the total number of hash collisions. In particular, we prove the following convergence theorem (details appear in Appendix C. Theorem 4.1 (Informal). For sufficiently large n and m and small p, there exist parameters for our algorithm such that it outputs a clustering with accuracy (1 −ε) and the expected number of comparisons is O max n1+O(p), n2 mΩ(1/p) · 1 + log(s/ε) s . Note that n1+O(p) ⩾n2/mΩ(1/p) in the expression above whenever the reads are long enough, that is, when m ⩾ncp (where c is some small constant). Thus, for a large range of n, m, p, and ε, our algorithm converges in time proportional to n1+O(p), which is sub-quadratic in n, the number of input reads. Since we expect the number of clusters k to be k = Ω(n), our algorithm outperforms any methods that require time Ω(kn) = Ω(n2) in this regime. The running time analysis of our algorithm revolves around estimating both the collision probability of our hash function and the overall convergence time to identify the underlying clusters. The main overhead comes from unnecessarily comparing reads that belong to different clusters. Indeed, for pairs of reads inside the same cluster, the total number of comparisons is O(n), since after a comparison, the reads will merge into the same cluster. For reads in different clusters, we show that they collide with probability that is exponentially small in the hash length (since they are nearly-random strings). For the convergence analysis, we prove that reads in the same cluster will collide with significant probability, implying that after roughly O max n nO(p), n mΩ(1/p) o · 1 + log(s/ε) s iterations, the found clustering will be (1 −ε) accurate. 6 In Section 5, we experimentally validate our algorithm’s running time, convergence, and correctness properties on real and synthetic data. 4.3 Outlier Robustness Our final theoretical result involves bounding the number of incorrect merges caused by potential outliers in the dataset. In real datasets, we expect some number of highly-noisy reads, due to experimental error. Fortunately, such outliers lead to only a minor loss in accuracy for our algorithm, when the clusters are separated. We prove the following theorem in Appendix D. Theorem 4.2. Let C = {C1, . . . , Ck} be an (r, 2r)-separated clustering of S. Let O be any set of size ε′k. Fixing the randomness and parameters in the algorithm with distance threshold r, let eC be the output on S and ˜ C′ be the output on S ∪O. Then, Aγ(C, ˜ C′) ⩾Aγ(C, ˜C) −ε′. Notice that this is optimal since ε′k outliers can clearly modify ε′k clusters. For DNA storage data recovery, if we desire 1 −ε accuracy overall, and we expect at most ε′k outliers, then we simply need to aim for a clustering with accuracy at least 1 −ε + ε′. 5 Experiments We experimentally evaluate our algorithm on real and synthetic data, measuring accuracy and wall clock time. Table 1 describes our datasets. We evaluate accuracy on the real data by comparing the found clusterings to a gold standard clustering. We construct the gold standard by using the original reference strands, and we group the reads by their most likely reference using an established alignment tool (see Appendix E for full details). The synthetically generated data resembles real data distributions and properties [45]. We implement our algorithm in C++ using MPI. We run tests on Microsoft Azure virtual machines (size H16mr: 16 cores, 224 GB RAM, RDMA network). Table 1: Datasets. Real data from Organick et. al. [45]. Synthetic data from Defn. 2.3. Appendix E has details. Dataset # Reads Avg. Length Description 3.1M real 3,103,511 150 Movie file stored in DNA 13.2M real 13,256,431 150 Music file stored in DNA 58M real 58,292,299 150 Collection of files (40MB stored in DNA; includes above) 12M real 11,973,538 110 Text file stored in DNA 5.3B synthetic 5,368,709,120 110 Noise p = 4%; cluster size s = 10. 5.1 Implementation and Parameter Details For the edit distance threshold, we desire r to be just larger than the cluster diameter. With p noise, we expect the diameter to be at most 4pm with high probability. We conservatively estimate p ≈4% for real data, and thus we set r = 25, since 4pm = 24 for p = 0.04 and m = 150. For the binary signatures, we observe that choosing larger q separates clusters better, but it also increases overhead, since σq(x) ∈{0, 1}4q is very high-dimensional. To remedy this, we used a blocking approach. We partitioned x into blocks of 22 characters and computed σ3 of each block, concatenating these 64-bit strings for the final signature. On synthetic data, we found that setting θlow = 40 and θhigh = 60 leads to very reduced running time while sacrificing negligible accuracy. For the hashing, we set w, ℓto encourage collisions of close pairs and discourage collisions of far pairs. Following Theorem C.1, we set w = ⌈log4(m)⌉= 4 and ℓ= 12, so that w + ℓ= 16 = log4 n with n = 232. Since our clusters are very small, we find that we can further filter far pairs by concatenating two independent hashes to define a bucket based on this 64-bit value. Moreover, since we expect very few reads to have the same hash, instead of comparing all pairs in a hash bucket, we sort the reads based on hash value and only compare adjacent elements. For communication, we use only the first 20 bits of the hash value, and we uniformly distribute clusters based on this. Finally, we conservatively set the number of iterations to 780 total (26 communication rounds, each with 30 local iterations) because this led to 99.9% accuracy on synthetic data (even with γ = 1.0). 7 (a) Time Comparison (log scale) (b) Accuracy Comparison Figure 2: Comparison to Starcode. Figure 2a plots running times on three real datasets of our algorithm versus four Starcode executions using four distance thresholds d ∈{2, 4, 6, 8}. For the first dataset, with 3.1M real reads, Figure 2b plots Aγ for varying γ ∈{0.6, 0.7, 0.8, 0.9, 1.0} of our algorithm versus Starcode. We stopped Starcode if it did not finish within 28 hours. We ran tests on one processor, 16 threads. (a) Distributed Convergence (b) Binary Signature Improvement (c) Strong Scaling Figure 3: Empirical results for our algorithm. Figure 3a plots accuracy A0.9 of intermediate clusterings (5.3B synthetic reads, 24 processors). Figure 3b shows single-threaded running times for four variants of our algorithm, depending on whether it uses signatures for merging and/or filtering (3.1M real reads; single thread). Figure 3c plots times as the number of processors varies from 1 to 8, with 16 cores per processor (58M real reads). Starcode Parameters Starcode [57] takes a distance threshold d ∈{1, 2, . . . , 8} as an input parameter and finds all clusters with radius not exceeding this threshold. We run Starcode for various settings of d, with the intention of understanding how Starcode’s accuracy and running time change with this parameter. We use Starcode’s sphere clustering “-s” option, since this has performed most accurately on sample data, and we use the “-t” parameter to run Starcode with 16 threads. 5.2 Discussion Figure 2 shows that our algorithm outperforms Starcode, the state-of-the-art clustering algorithm for DNA sequences [57], in both accuracy and time. As explained above, we have set our algorithm’s parameters based on theoretical estimates. On the other hand, we vary Starcode’s distance threshold parameter d ∈{2, 4, 6, 8}. We demonstrate in Figures 2a and 2b that increasing this distance parameter significantly improves accuracy on real data, but also it also greatly increases Starcode’s running time. Both algorithms achieve high accuracy for γ = 0.6, and the gap between the algorithms widens as γ increases. In Figure 2a, we show that our algorithm achieves more than a 1000x speedup over the most accurate setting of Starcode on three real datasets of varying sizes and read lengths. For d ∈{2, 4, 6}, our algorithm has a smaller speedup and a larger improvement in accuracy. Figure 3a shows how our algorithm’s clustering accuracy increases with the number of communication rounds, where we evaluate Aγ with γ = 0.9. Clearly, using 26 rounds is quite conservative. Nonetheless, our algorithm took only 46 minutes wall clock time to cluster 5.3B synthetic reads on 24 processors (384 cores). We remark that distributed MapReduce-based algorithms for string similarity joins have been reported to need tens of minutes for only tens of millions of reads [21, 51]. 8 Figure 3b demonstrates the effect of binary signatures on runtime. Recall that our algorithm uses signatures in two places: merging clusters when dH(σ(x), σ(y)) ⩽θlow, and filtering pairs when dH(σ(x), σ(y)) > θhigh. This leads to four natural variants: (i) omitting signatures, (ii) using them for merging, (iii) using them for filtering, or (iv) both. The biggest improvement (20x speedup) comes from using signatures for filtering (comparing (i) vs. (iii)). This occurs because the cheap Hamming distance filter avoids a large number of expensive edit distance computations. Using signatures for merging provides a modest 30% improvement (comparing (iii) vs. (iv)); this gain does not appear between (i) and (ii) because of time it takes to compute the signatures. Overall, the effectiveness of signatures justifies their incorporation into an algorithm that already filters based on hashing. Figure 3c evaluates the scalability of our algorithm on 58M real reads as the number of processors varies from 1 to 8. At first, more processors lead to almost optimal speedups. Then, the communication overhead outweighs the parallelization gain. Achieving perfect scalability requires greater understanding and control of the underlying hardware and is left as future work. 6 Related Work Recent work identifies the difficulty of clustering datasets containing large numbers of small clusters. Betancourt et. al. [11] calls this “microclustering” and proposes a Bayesian non-parametric model for entity resolution datasets. Kobren et. al. [37] calls this “extreme clustering” and studies hierarchical clustering methods. DNA data storage provides a new domain for micro/extreme clustering, with interesting datasets and important consequences [12, 24, 26, 45, 52]. Large-scale, extreme datasets – with billions of elements and hundreds of millions of clusters – are an obstacle for many clustering techniques [19, 29, 33, 42]. We demonstrate that DNA datasets are well-separated, which implies that our algorithm converges quickly to a highly-accurate solution. It would be interesting to determine the minimum requirements for robustness in extreme clustering. One challenge of clustering for DNA storage comes from the fact that reads are strings with edit errors and a four-character alphabet. Edit distance is regarded as a difficult metric, with known lower bounds in various models [1, 5, 7]. Similarity search algorithms based on MinHash [13, 14] originally aimed to find duplicate webpages or search results, which have much larger natural language alphabets. However, known MinHash optimizations [40, 41] may improve our clustering algorithm. Chakraborty, Goldenberg, and Koucký explore the question of preserving small edit distances with a binary embedding [16]. This embedding was adapted by Zhang and Zhang [56] for approximate string similarity joins. We leave a thorough comparison to these papers as future work, along with obtaining better theoretical bounds for hashing or embeddings [17, 46] under our data distribution. 7 Conclusion We highlighted a clustering task motivated by DNA data storage. We proposed a new distributed algorithm and hashing scheme for edit distance. Experimentally and theoretically, we demonstrated our algorithm’s effectiveness in terms of accuracy, performance, scalability, and robustness. We plan to release one of our real datasets. We hope our dataset and data model will lead to further research on clustering and similarity search for computational biology or other domains with strings. For future work, our techniques may also apply to other metrics and to other applications with large numbers of small, well-separated clusters, such as entity resolution or deduplication [20, 23, 32]. Finally, our work motivates a variety of new theoretical questions, such as studying the distortion of embeddings for random strings under our generative model (we elaborate on this in Appendix B ). 8 Acknowledgments We thank Yair Bartal, Phil Bernstein, Nova Fandina, Abe Friesen, Sariel Har-Peled, Christian Konig, Paris Koutris, Marina Meila, Mark Yatskar for useful discussions. We also thank Alyshia Olsen for help designing the graphs. Finally, we thank Jacob Nelson for sharing his MPI wisdom and Taylor Newill and Christian Smith from the Microsoft Azure HPC Team for help using MPI on Azure. 9 References [1] A. Abboud, T. D. Hansen, V. V. Williams, and R. Williams. Simulating Branching Programs with Edit Distance and Friends: Or: A polylog shaved is a lower bound made. In STOC, 2016. [2] M. Ackerman, S. Ben-David, D. Loker, and S. Sabato. Clustering Oligarchies. In AISTATS, 2013. [3] M. Ackerman and S. Dasgupta. Incremental Clustering: The Case for Extra Clusters. In Advances in Neural Information Processing Systems, pages 307–315, 2014. [4] N. Ailon, M. Charikar, and A. Newman. Aggregating inconsistent information: ranking and clustering. Journal of the ACM (JACM), 55(5):23, 2008. [5] A. Andoni and R. Krauthgamer. The Computational Hardness of Estimating Edit Distance. SIAM J. Comput., 39(6). [6] A. Andoni and R. Krauthgamer. The Smoothed Complexity of Edit Distance. ACM Transactions on Algorithms (TALG), 8(4):44, 2012. [7] A. Backurs and P. Indyk. Edit Distance Cannot be Computed in Strongly Subquadratic time (unless SETH is false). In STOC, 2015. [8] M.-F. Balcan, Y. Liang, and P. Gupta. Robust Hierarchical Clustering. Journal of Machine Learning Research, 15(1):3831–3871, 2014. [9] N. Bansal, A. Blum, and S. Chawla. Correlation clustering. Machine Learning, 56(1-3):89–113, 2004. [10] T. Batu, F. Ergün, J. Kilian, A. Magen, S. Raskhodnikova, R. Rubinfeld, and R. Sami. A Sublinear Algorithm for Weakly Approximating Edit Distance. In STOC, 2003. [11] B. Betancourt, G. Zanella, J. W. Miller, H. Wallach, A. Zaidi, and B. Steorts. Flexible Models for Microclustering with Application to Entity Resolution. In NIPS, 2016. [12] J. Bornholt, R. Lopez, D. M. Carmean, L. Ceze, G. Seelig, and K. Strauss. A DNA-based Archival Storage System. In ASPLOS, 2016. [13] A. Z. Broder. On the Resemblance and Containment of Documents. In Compression and Complexity of Sequences, pages 21–29. IEEE, 1997. [14] A. Z. Broder, S. C. Glassman, M. S. Manasse, and G. Zweig. Syntactic Clustering of the Web. Computer Networks and ISDN Systems, 29(8-13):1157–1166, 1997. [15] J. Buhler. Efficient large-scale sequence comparison by locality-sensitive hashing. Bioinformatics, 17(5):419–428, 2001. [16] D. Chakraborty, E. Goldenberg, and M. Koucký. Streaming Algorithms for Embedding and Computing Edit Distance in the Low Distance Regime. In STOC, 2016. [17] M. Charikar and R. Krauthgamer. Embedding the Ulam Metric into L1. Theory of Computing, 2(11):207– 224, 2006. [18] S. Chawla, K. Makarychev, T. Schramm, and G. Yaroslavtsev. Near Optimal LP Rounding Algorithm for Correlation Clustering on Complete and Complete k-partite Graphs. In STOC, 2015. [19] J. Chen, H. Sun, D. Woodruff, and Q. Zhang. Communication-Optimal Distributed Clustering. In Advances in Neural Information Processing Systems, pages 3720–3728, 2016. [20] P. Christen. Data matching: concepts and techniques for record linkage, entity resolution, and duplicate detection. Springer Science & Business Media, 2012. [21] D. Deng, G. Li, S. Hao, J. Wang, and J. Feng. Massjoin: A Mapreduce-based Method for Scalable String Similarity Joins. In ICDE, pages 340–351. IEEE, 2014. [22] D. P. Dubhashi and A. Panconesi. Concentration of Measure for the Analysis of Randomized Algorithms. Cambridge University Press, 2009. [23] A. K. Elmagarmid, P. G. Ipeirotis, and V. S. Verykios. Duplicate record detection: A survey. IEEE Transactions on knowledge and data engineering, 19(1):1–16, 2007. [24] Y. Erlich and D. Zielinski. DNA Fountain Enables a Robust and Efficient Storage Architecture. Science, 355(6328):950–954, 2017. 10 [25] S. Ganguly, E. Mossel, and M. Z. Rácz. Sequence Assembly from Corrupted Shotgun Reads. In ISIT, pages 265–269, 2016. http://arxiv.org/abs/1601.07086. [26] N. Goldman, P. Bertone, S. Chen, C. Dessimoz, E. M. LeProust, B. Sipos, and E. Birney. Towards Practical, High-capacity, Low-maintenance Information Storage in Synthesized DNA. Nature, 494(7435), 2013. [27] S. Gollapudi and R. Panigrahy. A Dictionary for Approximate String Search and Longest Prefix Search. In CIKM, 2006. [28] L. Gravano, P. G. Ipeirotis, H. V. Jagadish, N. Koudas, S. Muthukrishnan, D. Srivastava, et al. Approximate String Joins in a Database (almost) for Free. In VLDB, volume 1, pages 491–500, 2001. [29] S. Guha, Y. Li, and Q. Zhang. Distributed Partial Clustering. arXiv preprint arXiv:1703.01539, 2017. [30] H. Hanada, M. Kudo, and A. Nakamura. On Practical Accuracy of Edit Distance Approximation Algorithms. arXiv preprint arXiv:1701.06134, 2017. [31] S. Har-Peled, P. Indyk, and R. Motwani. Approximate nearest neighbor: Towards removing the curse of dimensionality. Theory of Computing, 8(1):321–350, 2012. [32] O. Hassanzadeh, F. Chiang, H. C. Lee, and R. J. Miller. Framework for Evaluating Clustering Algorithms in Duplicate Detection. PVLDB, 2(1):1282–1293, 2009. [33] C. Hennig, M. Meila, F. Murtagh, and R. Rocci. Handbook of Cluster Analysis. CRC Press, 2015. [34] Y. Jiang, D. Deng, J. Wang, G. Li, and J. Feng. Efficient Parallel Partition-based Algorithms for Similarity Search and Join with Edit Distance Constraints. In Joint EDBT/ICDT Workshops, 2013. [35] Y. Jiang, G. Li, J. Feng, and W.-S. Li. String Similarity Joins: An Experimental Evaluation. PVLDB, 7(8):625–636, 2014. [36] J. Johnson, M. Douze, and H. Jégou. Billion-scale Similarity Search with GPUs. arXiv preprint arXiv:1702.08734, 2017. [37] A. Kobren, N. Monath, A. Krishnamurthy, and A. McCallum. A Hierarchical Algorithm for Extreme Clustering. In KDD, 2017. [38] R. Krauthgamer and Y. Rabani. Improved Lower Bounds for Embeddings Into L1. SIAM J. on Computing, 38(6):2487–2498, 2009. [39] H. Li and R. Durbin. Fast and Accurate Short Read Alignment with Burrows–Wheeler Transform. Bioinformatics, 25(14):1754–1760, 2009. [40] P. Li and C. König. b-Bit Minwise Hashing. In WWW, pages 671–680. ACM, 2010. [41] P. Li, A. Owen, and C.-H. Zhang. One Permutation Hashing. In NIPS, 2012. [42] G. Malkomes, M. J. Kusner, W. Chen, K. Q. Weinberger, and B. Moseley. Fast Distributed k-center Clustering with Outliers on Massive Data. In NIPS, 2015. [43] J. Matoušek. Lectures on Discrete Geometry, volume 212. Springer New York, 2002. [44] M. Meil˘a and D. Heckerman. An Experimental Comparison of Model-based Clustering Methods. Machine learning, 42(1-2):9–29, 2001. [45] L. Organick, S. D. Ang, Y.-J. Chen, R. Lopez, S. Yekhanin, K. Makarychev, M. Z. Racz, G. Kamath, P. Gopalan, B. Nguyen, C. Takahashi, S. Newman, H.-Y. Parker, C. Rashtchian, K. Stewart, G. Gupta, R. Carlson, J. Mulligan, D. Carmean, G. Seelig, L. Ceze, and K. Strauss. Scaling up DNA data storage and random access retrieval. bioRxiv, 2017. [46] R. Ostrovsky and Y. Rabani. Low Distortion Embeddings for Edit Distance. J. ACM, 2007. [47] X. Pan, D. Papailiopoulos, S. Oymak, B. Recht, K. Ramchandran, and M. I. Jordan. Parallel Correlation Clustering on Big Graphs. In Advances in Neural Information Processing Systems, pages 82–90, 2015. [48] Z. Rasheed, H. Rangwala, and D. Barbara. Efficient Clustering of Metagenomic Sequences using Locality Sensitive Hashing. In Proceedings of the 2012 SIAM International Conference on Data Mining, pages 1023–1034. SIAM, 2012. 11 [49] N. Sundaram, A. Turmukhametova, N. Satish, T. Mostak, P. Indyk, S. Madden, and P. Dubey. Streaming Similarity Search Over One Billion Tweets Using Parallel Locality-Sensitive Hashing. PVLDB, 6(14):1930– 1941, 2013. [50] E. Ukkonen. Approximate String-matching with q-grams and Maximal Matches. Theoretical computer science, 92(1):191–211, 1992. [51] C. Yan, X. Zhao, Q. Zhang, and Y. Huang. Efficient string similarity join in multi-core and distributed systems. PloS one, 12(3):e0172526, 2017. [52] S. H. T. Yazdi, R. Gabrys, and O. Milenkovic. Portable and Error-Free DNA-Based Data Storage. bioRxiv, page 079442, 2016. [53] M. Yu, G. Li, D. Deng, and J. Feng. String Similarity Search and Join: A Survey. Frontiers of Computer Science, 10(3):399–417, 2016. [54] P. Yuan, C. Sha, and Y. Sun. Hashˆ{ed}-Join: Approximate String Similarity Join with Hashing. In International Conference on Database Systems for Advanced Applications, pages 217–229. Springer, 2014. [55] R. B. Zadeh and A. Goel. Dimension Independent Similarity Computation. The Journal of Machine Learning Research, 14(1):1605–1626, 2013. [56] H. Zhang and Q. Zhang. EmbedJoin: Efficient Edit Similarity Joins via Embeddings. In KDD, 2017. [57] E. V. Zorita, P. Cuscó, and G. Filion. Starcode: Sequence Clustering Based on All-pairs Search. Bioinformatics, 2015. 12 | 2017 | 452 |
6,955 | AIDE: An algorithm for measuring the accuracy of probabilistic inference algorithms Marco F. Cusumano-Towner Probabilistic Computing Project Massachusetts Institute of Technology marcoct@mit.edu Vikash K. Mansinghka Probabilistic Computing Project Massachusetts Institute of Technology vkm@mit.edu Abstract Approximate probabilistic inference algorithms are central to many fields. Examples include sequential Monte Carlo inference in robotics, variational inference in machine learning, and Markov chain Monte Carlo inference in statistics. A key problem faced by practitioners is measuring the accuracy of an approximate inference algorithm on a specific data set. This paper introduces the auxiliary inference divergence estimator (AIDE), an algorithm for measuring the accuracy of approximate inference algorithms. AIDE is based on the observation that inference algorithms can be treated as probabilistic models and the random variables used within the inference algorithm can be viewed as auxiliary variables. This view leads to a new estimator for the symmetric KL divergence between the approximating distributions of two inference algorithms. The paper illustrates application of AIDE to algorithms for inference in regression, hidden Markov, and Dirichlet process mixture models. The experiments show that AIDE captures the qualitative behavior of a broad class of inference algorithms and can detect failure modes of inference algorithms that are missed by standard heuristics. 1 Introduction Approximate probabilistic inference algorithms are central to diverse disciplines, including statistics, robotics, machine learning, and artificial intelligence. Popular approaches to approximate inference include sequential Monte Carlo, variational inference, and Markov chain Monte Carlo. A key problem faced by practitioners is measuring the accuracy of an approximate inference algorithm on a specific data set. The accuracy is influenced by complex interactions between the specific data set in question, the model family, the algorithm tuning parameters such as the number of iterations, and any associated proposal distributions and/or approximating variational family. Unfortunately, practitioners assessing the accuracy of inference have to rely on heuristics that are either brittle or specialized for one type of algorithm [1], or both. For example, log marginal likelihood estimates can be used to assess the accuracy of sequential Monte Carlo and variational inference, but these estimates can fail to significantly penalize an algorithm for missing a posterior mode. Expectations of probe functions do not assess the full approximating distribution, and they require design specific to each model. This paper introduces an algorithm for estimating the symmetrized KL divergence between the output distributions of a broad class of exact and approximate inference algorithms. The key idea is that inference algorithms can be treated as probabilistic models and the random variables used within the inference algorithm can be viewed as latent variables. We show how sequential Monte Carlo, Markov chain Monte Carlo, rejection sampling, and variational inference can be represented in a common mathematical formalism based on two new concepts: generative inference models and meta-inference algorithms. Using this framework, we introduce the Auxiliary Inference Divergence Estimator (AIDE), which estimates the symmetrized KL divergence between the output distributions 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. AIDE Auxiliary Inference Divergence Estimator Gold standard inference algorithm Target inference algorithm (the algorithm being measured) Symmetrized KL divergence estimate ˆD ˆD ≈DKL(gold-standard||target) + DKL(target||gold-standard) Ng Number of gold-standard inference runs Nt Number of target inference runs Mg Number of meta-inference runs for gold-standard Mt Number of meta-inference runs for target Figure 1: Using AIDE to estimate the accuracy of a target inference algorithm relative to a goldstandard inference algorithm. AIDE is a Monte Carlo estimator of the symmetrized Kullback-Leibler (KL) divergence between the output distributions of two inference algorithms. AIDE uses metainference: inference over the internal random choices made by an inference algorithm. 100 101 102 Number of particles 0 2 4 6 8 AIDE estimate (nats) Sequential Monte Carlo Mt = 100 Mt = 101 Mt = 103 100 101 102 1 + Number of transitions 0 2 4 6 8 AIDE estimate (nats) Metropolis-Hastings 100 101 102 103 104 Number of gradient steps 0 2 4 6 8 AIDE estimate (nats) Variational Inference Figure 2: AIDE applies to SMC, variational, and MCMC algorithms. Left: AIDE estimates for SMC converge to zero, as expected. Right: AIDE estimates for variational inference converge to a nonzero asymptote that depends on the variational family. Middle: The symmetrized divergence between MH and the posterior converges to zero, but AIDE over-estimates the divergence in expectation. Although increasing the number of meta-inference runs Mt reduces the bias of AIDE, AIDE is not yet practical for measuring MH accuracy due to inaccurate meta-inference for MH. of two inference algorithms that have both been endowed with a meta-inference algorithm. We also show that the conditional SMC update of Andrieu et al. [2] and the reverse AIS Markov chain of Grosse et al. [3] are both special cases of a ‘generalized conditional SMC update’, which we use as a canonical meta-inference algorithm for SMC. AIDE is a practical tool for measuring the accuracy of SMC and variational inference algorithms relative to gold-standard inference algorithms. Note that this paper does not provide a practical solution to the MCMC convergence diagnosis problem. Although in principle AIDE can be applied to MCMC, to do so in practice will require more accurate meta-inference algorithms for MCMC to be developed. 2 Background Consider a generative probabilistic model with latent variables X and observed variables Y . We denote assignments to these variables by x ∈X and y ∈Y. Let p(x, y) denote the joint distribution of the generative model. The posterior distribution is p(x|y) := p(x, y)/p(y) where p(y) = P x p(x, y) is the marginal likelihood, or ‘evidence’. Sampling-based approximate inference strategies including Markov chain Monte Carlo (MCMC, [4, 5]), sequential Monte Carlo (SMC, [6]), annealed importance sampling (AIS, [7]) and importance sampling with resampling (SIR, [8, 9]), generate samples of the latent variables that are approximately distributed according to p(x|y). Use of a sampling-based inference algorithm is often motivated by 2 theoretical guarantees of exact convergence to the posterior in the limit of infinite computation (e.g. number of transitions in a Markov chain, number of importance samples in SIR). However, how well the sampling distribution approximates the posterior distribution for finite computation is typically difficult to analyze theoretically or estimate empirically with confidence. Variational inference [10] explicitly minimizes the approximation error of the approximating distribution qθ(x) over parameters θ of a variational family. The error is usually quantified using the Kullback-Leibler (KL) divergence from the approximation qθ(x) to the posterior p(x|y), denoted DKL(qθ(x) ∥p(x|y)). Unlike sampling-based approaches, variational inference does not generally give exact results for infinite computation because the variational family does not include the posterior. Minimizing the KL divergence is performed by maximizing the ‘evidence lower bound’ (ELBO) L = log p(y) −DKL(qθ(x) ∥p(x|y)) over θ. Since log p(y) is usually unknown, the actual error (the KL divergence) of a variational approximation is also unknown. 3 Estimating the symmetrized KL divergence between inference algorithms This section defines our mathematical formalism for analyzing inference algorithms; shows how to represent SMC, MCMC, rejection sampling, and variational inference in this formalism; and introduces the Auxiliary Inference Divergence Estimator (AIDE), an algorithm for estimating the symmetrized KL divergence between two inference algorithms. 3.1 Generative inference models and meta-inference algorithms We define an inference algorithm as a procedure that returns a single approximate posterior sample. Repeated runs of the algorithm give independent samples. The algorithm has an ‘output distribution’ q(x) that gives the probability of returning x. Note that the dependence of q(x) on the observations y that define the inference problem is suppressed in the notation. The algorithm is accurate when q(x) ≈p(x|y) for all x. We denote a sample returned from the algorithm by x ∼q(x). A naive simple Monte Carlo estimator of the KL divergence between the output distributions of two inference algorithms requires evaluating output probabilities for both algorithms. However, it is typically intractable to compute output probabilities for sampling-based inference algorithms like MCMC and SMC, because that would require marginalizing over all possible values that the random variables drawn during the algorithm could possibly take. A similar difficulty arises when computing the marginal likelihood p(y) of a generative probabilistic model p(x, y). This suggests that we treat the inference algorithm as a generative model, estimate its output probabilities using ideas from marginal likelihood estimation, and use these estimates in a Monte Carlo estimator of the divergence. We begin by making the analogy between an inference algorithm and a generative model explicit: Definition 3.1 (Generative inference model). A generative inference model is a tuple (U, X, q) where q(u, x) is a joint distribution defined on U × X. A generative inference model models an inference algorithm if the output probability of the inference algorithm is the marginal likelihood q(x) = P u q(u, x) of the model for all x. An element u ∈U represents a complete assignment to the internal random variables within the inference algorithm, and is called a ‘trace’. The ability to simulate from q(u, x) is required, but the ability to compute the probability q(u, x) is not. A simulation, denoted u, x ∼q(u, x), may be obtained by running the inference algorithm and recording the resulting trace u and output x.1 A generative inference model can be understood as a generative probabilistic model where the u are the latent variables and the x are the observations. Note that two different generative inference models may use different representations for the internal random variables of the same inference algorithm. In practice, constructing a generative inference model from an inference algorithm amounts to defining the set of internal random variables. For marginal likelihood estimation in a generative inference model, we use a ‘meta-inference’ algorithm: Definition 3.2 (Meta-inference algorithm). For a given generative inference model (U, X, q), a meta-inference algorithm is a tuple (r, ξ) where r(u; x) is a distribution on traces u ∈U of the inference algorithm, indexed by outputs x ∈X of the inference algorithm, and where ξ(u, x) is the 1The trace data structure could in principle be obtained by writing the inference algorithm in a probabilistic programming language like Church [11], but the computational overhead would be high. 3 following function of u and x for some Z > 0: ξ(u, x) := Z q(u, x) r(u; x) (1) We require the ability to sample u ∼r(u; x) given a value for x, and the ability to evaluate ξ(u, x) given u and x. We call a procedure for sampling from r(u; x) a ‘meta-inference sampler’. We do not require the ability to evaluate the probability r(u; x). A meta-inference algorithm is considered accurate for a given x if r(u; x) ≈q(u|x) for all u. Conceptually, a meta-inference sampler tries to answer the question ‘how could my inference algorithm have produced this output x?’ Note that if it is tractable to evaluate the marginal likelihood q(x) of the generative inference model up to a normalizing constant, then it is not necessary to represent internal random variables for the inference algorithm, and a generative inference model can define the trace as an empty token u = () with U = {()}. In this case, the meta-inference algorithm has r(u; x) = 1 for all x and ξ(u, x) = Zq(x). 3.2 Examples We now show how to construct generative inference models and corresponding meta-inference algorithms for SMC, AIS, MCMC, SIR, rejection sampling, and variational inference. The metainference algorithms for AIS, MCMC, and SIR are derived as special cases of a generic SMC meta-inference algorithm. Sequential Monte Carlo. We consider a general class of SMC samplers introduced by Del Moral et al. [6], which can be used for approximate inference in both sequential state space and nonsequential models. We briefly summarize a slightly restricted variant of the algorithm here, and refer the reader to the supplement and Del Moral et al. [6] for full details. The SMC algorithm propagates P weighted particles through T steps, using proposal kernels kt and multinomial resampling based on weight functions w1(x1) and wt(xt−1, xt) for t > 1 that are defined in terms of ‘backwards kernels’ ℓt for t = 2 . . . T. Let xi t, wi t and W i t denote the value, unnormalized weight, and normalized weight of particle i at time t, respectively. We define the output sample x of SMC as a single draw from the particle approximation at the final time step, which is obtained by sampling a particle index IT ∼Categorical(W 1:P T ) where W 1:P T denotes the vector of weights (W 1 T , . . . , W P T ), and then setting x ←xIT T . The generative inference model uses traces of the form u = (x, a, IT ), where x contains the values of all particles at all time steps and where a (for ‘ancestor’) contains the index ai t ∈{1 . . . P} of the parent of particle xi t+1 for each particle i and each time step t = 1 . . . T −1. Algorithm 1 defines a canonical meta-inference sampler for this generative inference model that takes as input a latent sample x and generates an SMC trace u ∼r(u; x) as output. The meta-inference sampler first generates an ancestral trajectory of particles (xI1 1 , xI2 2 , . . . , xIT T ) that terminates in the output sample x, by sampling sequentially from the backward kernels ℓt, starting from xIT T = x. Next, it runs a conditional SMC update [2] conditioned on the ancestral trajectory. For this choice of r(u; x) and for Z = 1, the function ξ(u, x) is closely related to the marginal likelihood estimate d p(y) produced by the SMC scheme:2 ξ(u, x) = p(x, y)/ d p(y). See supplement for derivation. Annealed importance sampling. When a single particle is used (P = 1), and when each forward kernel kt satisfies detailed balance for some intermediate distribution, the SMC algorithm simplifies to annealed importance sampling (AIS, [7]), and the canonical SMC meta-inference inference (Algorithm 1) consists of running the forward kernels in reverse order, as in the reverse annealing algorithm of Grosse et al. [3, 12]. The canonical meta-inference algorithm is accurate (r(u; x) ≈ q(u; x)) if the AIS Markov chain is kept close to equilibrium at all times. This is achieved if the intermediate distributions form a sufficiently fine-grained sequence. See supplement for analysis. Markov chain Monte Carlo. We define each run of an MCMC algorithm as producing a single output sample x that is the iterate of the Markov chain produced after a predetermined number of burnin steps has passed. We also assume that each MCMC transition operator satisfies detailed balance 2AIDE also applies to approximate inference algorithms for undirected probabilistic models; the marginal likelihood estimate is replaced with the estimate of the partition function. 4 Algorithm 1 Generalized conditional SMC (a canonical meta-inference sampler for SMC) Require: Latent sample x, SMC parameters IT ∼Uniform(1 . . . P) xIT T ←x for t ←T −1 . . . 1 do It ∼Uniform(1 . . . P) ▷Sample from backward kernel xIt t ∼ℓt+1(·; x It+1 t+1 ) for i ←1 . . . P do if i ̸= I1 then xi 1 ∼k1(·) wi 1 ←w1(xi 1) for t ←2 . . . T do W 1:P t−1 ←w1:P t−1/(PP i=1 wi t−1) for i ←1 . . . P do if i = It then ai t−1 ←It−1 else ai t−1 ∼Categorical(W 1:P t−1) xi t ∼kt(·; x ai t−1 t−1 ) wi t ←wt(x ai t−1 t−1 , xi t) u ←(x, a, IT ) ▷Return an SMC trace return u x1 1 x2 1 x3 1 x4 1 x1 2 x2 2 x3 2 x4 2 x1 3 x2 3 x3 3 x4 3 x Latent sample (input to meta-inference sampler) ℓ2 ℓ3 δ I1 = 1 I2 = 3 I3 = 2 T = 3 xi t Member of ancestral trajectory with respect to the posterior p(x|y). Then, this is formally a special case of AIS. However, unless the Markov chain was initialized near the posterior p(x|y), the chain will be far from equilibrium during the burn-in period, and the AIS meta-inference algorithm will be inaccurate. Importance sampling with resampling. Importance sampling with resampling, or SIR [8] can be seen as a special case of SMC if we set the number of steps to one (T = 1). The trace of the SIR algorithm is then the set of particles xi 1 for i ∈{1, . . . , P} and output particle index I1. Given output sample x, the canonical SMC meta-inference sampler then simply samples I1 ∼Uniform(1 . . . P), sets xI1 1 ←x, and samples the other P −1 particles from the importance distribution k1(x). Rejection sampling. To model a rejection sampler for a posterior distribution p(x|y), we assume it is tractable to evaluate the unnormalized posterior probability p(x, y). We define U = {()} as described in Section 3.1. For meta-inference, we define Z = p(y) so that ξ(u, x) = p(y)p(x|y) = p(x, y). It is not necessary to represent the internal random variables of the rejection sampler. Variational inference. We suppose a variational approximation qθ(x) has been computed through optimization over the variational parameters θ. We assume that it is possible to sample from the variational approximation, and evaluate its normalized probability distribution. Then, we use U = {()} and Z = 1 and ξ(u, x) = qθ(x). This formulation also applies to amortized variational inference algorithms, which reuse the parameters θ for inference across observation contexts y. 3.3 The auxiliary inference divergence estimator Consider a probabilistic model p(x, y), a set of observations y, and two inference algorithms that approximate p(x|y). One of the two inference algorithms is considered the ‘gold-standard’, and has a generative inference model (U, X, qg) and a meta-inference algorithm (rg, ξg). The second algorithm is considered the ‘target’ algorithm, with a generative inference model (V, X, qt) (we denote a trace of the target algorithm by v ∈V), and a meta-inference algorithm (rt, ξt). This section shows how to estimate an upper bound on the symmetrized KL divergence between qg(x) and qt(x), which is: DKL(qg(x) ∥qt(x))+DKL(qt(x) ∥qg(x)) = Ex∼qg(x) log qg(x) qt(x) +Ex∼qt(x) log qt(x) qg(x) (2) We take a Monte Carlo approach. Simple Monte Carlo applied to the Equation (2) requires that qg(x) and qt(x) can be evaluated, which would prevent the estimator from being used when either inference algorithm is sampling-based. Algorithm 2 gives the Auxiliary Inference Divergence Estimator 5 (AIDE), an estimator of the symmetrized KL divergence that only requires evaluation of ξg(u, x) and ξt(v, x) and not qg(x) or qt(x), permitting its use with sampling-based inference algorithms. Algorithm 2 Auxiliary Inference Divergence Estimator (AIDE) Require: Gold-standard inference model and meta-inference algorithm (U, X, qg) and (rg, ξg) Target inference model and meta-inference algorithm (V, X, qt) and (rt, ξt) Number of runs of gold-standard algorithm Ng Number of runs of meta-inference sampler for gold-standard Mg Number of runs of target algorithm Nt Number of runs of meta-inference sampler for target Mt for n ←1 . . . Ng do un,1, xn ∼qg(u, x) ▷Run gold-standard algorithm, record trace un,1 and output xn for m ←2 . . . Mg do un,m ∼rg(u; xn) ▷Run meta-inference sampler for gold-standard algorithm, on input xn for m ←1 . . . Mt do vn,m ∼rt(v; xn) ▷Run meta-inference sampler for target algorithm, on input xn for n ←1 . . . Nt do v′ n,1, x′ n ∼qt(v, x) ▷Run target algorithm, record trace v′ n,1 and output x′ n for m ←2 . . . Mt do v′ n,m ∼rt(v; x′ n) ▷Run meta-inference sampler for target algorithm, on input x′ n for m ←1 . . . Mg do u′ n,m ∼rg(u; x′ n) ▷Run meta-inference sampler for gold-standard algorithm, on input x′ n ˆD ←1 Ng Ng X n=1 log 1 Mg PMg m=1 ξg(un,m, xn) 1 Mt PMt m=1 ξt(vn,m, xn) + 1 Nt Nt X n=1 log 1 Mt PMt m=1 ξt(v′ n,m, x′ n) 1 Mg PMg m=1 ξg(u′n,m, x′n) return ˆD ▷ˆD is an estimate of DKL(qg(x)||qt(x)) + DKL(qt(x)||qg(x)) The generic AIDE algorithm above is defined in terms of abstract generative inference models and meta-inference algorithms. For concreteness, the supplement contains the AIDE algorithm specialized to the case when the gold-standard is AIS and the target is a variational approximation. Theorem 1. The estimate ˆD produced by AIDE is an upper bound on the symmetrized KL divergence in expectation, and the expectation is nonincreasing in AIDE parameters Mg and Mt. See supplement for proof. Briefly, AIDE estimates an upper bound on the symmetrized divergence in expectation because it uses unbiased estimates of qt(xn) and qg(xn)−1 for xn ∼qg(x), and unbiased estimates of qg(x′ n) and qt(x′ n)−1 for x′ n ∼qt(x). For Mg = 1 and Mt = 1, AIDE over-estimates the true symmetrized divergence by: E[ ˆD] −(DKL(qg(x) ∥qt(x)) + DKL(qt(x) ∥qg(x))) = Ex∼qg(x) [DKL(qg(u|x) ∥rg(u; x)) + DKL(rt(v; x) ∥qt(v|x))] + Ex∼qt(x) [DKL(qt(v|x) ∥rt(v; x)) + DKL(rg(u; x) ∥qg(u|x))] Bias of AIDE for Mg=Mt=1 (3) Note that this expression involves KL divergences between the meta-inference sampling distributions (rg(u; x) and rt(v; x)) and the posteriors in their respective generative inference models (qg(u|x) and qt(v|x)). Therefore, the approximation error of meta-inference determines the bias of AIDE. When both meta-inference algorithms are exact (rg(u; x) = qg(u|x) for all u and x and rt(v; x) = qt(v|x) for all v and x), AIDE is unbiased. As Mg or Mt are increased, the bias decreases (see Figure 2 and Figure 4 for examples). If the generative inference model for one of the algorithms does not use a trace (i.e. U = {()} or V = {()}), then that algorithm does not contribute a KL divergence term to the bias of Equation (3). The analysis of AIDE is equivalent to that of Grosse et al. [12] when the target algorithm is AIS and Mt = Mg = 1 and the gold-standard inference algorithm is a rejection sampler. 4 Related Work Diagnosing the convergence of approximate inference is a long-standing problem. Most existing work is either tailored to specific inference algorithms [13], designed to detect lack of exact convergence [1], or both. Estimators of the non-asymptotic approximation error of general approximate inference 6 2 0 2 4 100 101 102 103 Number of particles posterior density L R 100 101 102 103 Number of particles 0 20 40 60 Large penalty for missing mode AIDE estimate (nats) Offset proposal Broad proposal 100 101 102 103 Number of particles 60 40 20 0 Small penalty Log marginal likelihood (nats) Offset proposal Broad proposal Gold-standard Figure 3: AIDE detects when an inference algorithm misses a posterior mode. Left: A bimodal posterior density, with kernel estimates of the output densities of importance sampling with resampling (SIR) using two proposals. The ‘broad’ proposal (blue) covers both modes, and the ‘offset’ proposal (pink) misses the ‘L’ mode. Middle: AIDE detects the missing mode in offset-proposal SIR. Right: Log marginal likelihood estimates suggest that the offset-proposal SIR is nearly converged. algorithms have received less attention. Gorham and Mackey [14] propose an approach that applies to arbitrary sampling algorithms but relies on special properties of the posterior distribution such as log-concavity. Our approach does not rely on special properties of the posterior distribution. Our work is most closely related to Bounding Divergences with REverse Annealing (BREAD, [12]) which also estimates upper bounds on the symmetric KL divergence between the output distribution of a sampling algorithm and the posterior distribution. AIDE differs from BREAD in two ways: First, whereas BREAD handles single-particle SMC samplers and annealed importance sampling (AIS), AIDE handles a substantially broader family of inference algorithms including SMC samplers with both resampling and rejuvenation steps, AIS, variational inference, and rejection samplers. Second, BREAD estimates divergences between the target algorithm’s sampling distribution and the posterior distribution, but the exact posterior samples necessary for BREAD’s theoretical properties are only readily available when the observations y that define the inference problem are simulated from the generative model. Instead, AIDE estimates divergences against an exact or approximate gold-standard sampler on real (non-simulated) inference problems. Unlike BREAD, AIDE can be used to evaluate inference in both generative and undirected models. AIDE estimates the error of sampling-based inference using a mathematical framework with roots in variational inference. Several recent works have treated sampling-based inference algorithms as variational approximations. The Monte Carlo Objective (MCO) formalism of Maddison et al. [15] is closely related to our formalism of generative inference models and meta-inference algorithms— indeed a generative inference model and a meta-inference algorithm with Z = 1 give an MCO defined by: L(y, p) = Eu,x∼q(u,x)[log(p(x, y)/ξ(u, x))], where y denotes observed data. In independent and concurrent work to our own, Naesseth et al. [16], Maddison et al. [15] and Le et al. [17] treat SMC as a variational approximation using constructions similar to ours. In earlier work, Salimans et al. [18] recognized that MCMC samplers can be treated as variational approximations. However, these works are concerned with optimization of variational objective functions instead of estimation of KL divergences, and do not involve generating a trace of a sampler from its output. 5 Experiments 5.1 Comparing the bias of AIDE for different types of inference algorithms We used a Bayesian linear regression inference problem where exact posterior sampling is tractable to characterize the bias of AIDE when applied to three different types of target inference algorithms: sequential Monte Carlo (SMC), Metropolis-Hastings (MH), and variational inference. For the goldstandard algorithm we used a posterior sampler with a tractable output distribution qg(x), which does not introduce bias into AIDE, so that AIDE’s bias could be completely attributed to the approximation error of meta-inference for each target algorithm. Figure 2 shows the results. The bias of AIDE is acceptable for SMC, and AIDE is unbiased for variational inference, but better meta-inference algorithms for MCMC are needed to make AIDE practical for estimating the accuracy of MH. 7 5.2 Evaluating approximate inference in a Hidden Markov model We applied AIDE to measure the approximation error of SMC algorithms for posterior inference in a Hidden Markov model (HMM). Because exact posterior inference in this HMM is tractable via dynamic programming, we used this opportunity to compare AIDE estimates obtained using the exact posterior as the gold-standard with AIDE estimates obtained using a ‘best-in-class’ SMC algorithm as the gold-standard. Figure 4 shows the results, which indicate AIDE estimates using an approximate gold-standard algorithm can be nearly identical to AIDE estimates obtained with an exact posterior gold-standard. 1 50 time 1 20 state Ground truth states 1 50 time 1 20 state Posterior marginals 1 50 time 1 20 state SMC optimal proposal 1000 particles (SMC gold standard) Target algorithms 1 50 time 1 20 state A SMC prior proposal 1 particle 1 50 time 1 20 state B SMC prior proposal 10 particles 1 50 time 1 20 state C SMC optimal proposal 100 particles Measuring accuracy of target algorithms using posterior as gold-standard 100 101 102 Number of particles 0 20 40 60 80 AIDE estimate (nats) A B C Measuring accuracy of target algorithms using SMC gold-standard 100 101 102 Number of particles 0 20 40 60 80 AIDE estimate (nats) A B C SMC, prior proposal, 1 meta-inference run (Mt = 1) SMC, prior proposal, 100 meta-inference runs (Mt = 100) SMC, optimal proposal, 1 meta-inference run (Mt = 1) SMC, optimal proposal, 100 meta-inference runs (Mt = 100) Figure 4: Comparing use of an exact posterior as the gold-standard and a ‘best-in-class’ approximate algorithm as the gold-standard, when measuring accuracy of target inference algorithms with AIDE. We consider inference in an HMM, so that exact posterior sampling is tractable using dynamic programming. Left: Ground truth latent states, posterior marginals, and marginals of the the output of a gold-standard and three target SMC algorithms (A,B,C) for a particular observation sequence. Right: AIDE estimates using the exact gold-standard and using the SMC gold-standard are nearly identical. The estimated divergence bounds decrease as the number of particles in the target sampler increases. The optimal proposal outperforms the prior proposal. Increasing Mt tightens the estimated divergence bounds. We used Mg = 1. 100 101 102 Number of particles 0 5 10 15 20 25 nats Likelihood weighting with 1 particle appears least accurate AIDE estimates 100 101 102 Number of particles 2.5 3.0 3.5 4.0 Average number of clusters Appears accurate Heuristic diagnostic SMC, prior proposal 0 rejuvenation sweeps SMC, optimal proposal 0 rejuvenation sweeps SMC, optimal proposal 4 rejuvenation sweeps Gold-standard Likelihood-weighting (1 particle) Figure 5: Contrasting AIDE against a heuristic convergence diagnostic for evaluating the accuracy of approximate inference in a Dirichlet process mixture model (DPMM). The heuristic compares the expected number of clusters under the target algorithm to the expectation under the gold-standard algorithm [19]. White circles identify single-particle likelihood-weighting, which samples from the prior. AIDE clearly indicates that single-particle likelihood-weighting is inaccurate, but the heuristic suggests it is accurate. Probe functions like the expected number of clusters can be error prone measures of convergence because they only track convergence along a specific projection of the distribution. In contrast, AIDE estimates a joint KL divergence. Shaded areas in both plots show the standard error. The amount of target inference computation used is the same for the two techniques, although AIDE performs a gold-standard meta-inference run for each target inference run. 8 5.3 Comparing AIDE to alternative inference evaluation techniques A key feature of AIDE is that it applies to different types of inference algorithms. We compared AIDE to two existing techniques for evaluating the accuracy of inference algorithms that share this feature: (1) comparing log marginal likelihood (LML) estimates made by a target algorithm against LML estimates made by a gold-standard algorithm, and (2) comparing the expectation of a probe function under the approximating distribution to the same expectation under the gold-standard distribution [19]. Figure 3 shows a comparison of AIDE to LML, on a inference problem where the posterior is bimodal. Figure 5 shows a comparison of AIDE to a ‘number of clusters’ probe function in a Dirichlet process mixture model inference problem for a synthetic data set. We also used AIDE to evaluate the accuracy of several SMC algorithms for DPMM inference on a real data set of galaxy velocities [20] relative to an SMC gold-standard. This experiment is described in the supplement due to space constraints. 6 Discussion AIDE makes it practical to estimate bounds on the error of a broad class of approximate inference algorithms including sequential Monte Carlo (SMC), annealed importance sampling (AIS), sampling importance resampling (SIR), and variational inference. AIDE’s reliance on a gold-standard inference algorithm raises two questions that merit discussion: If we already had an acceptable gold-standard, why would we want to evaluate other inference algorithms? Gold-standard algorithms such as very long MCMC runs, SMC runs with hundreds of thousands of particles, or AIS runs with a very fine annealing schedule, are often too slow to use in production. AIDE make it possible to use gold-standard algorithms during an offline design and evaluation phase to quantitatively answer questions like “how few particles or rejuvenation steps or samples can I get away with?” or “is my fast variational approximation good enough?”. AIDE can thus help practitioners confidently apply Monte Carlo techniques in challenging, performance constrained applications, such as probabilistic robotics or web-scale machine learning. In future work we think it will be valuable to build probabilistic models of AIDE estimates, conditioned on features of the data set, to learn offline what problem instances are easy or hard for different inference algorithms. This may help practitioners bridge the gap between offline evaluation and production more rigorously. How do we ensure that the gold-standard is accurate enough for the comparison with it to be meaningful? This is an intrinsically hard problem—we are not sure that near-exact posterior inference is really feasible, for most interesting classes of models. In practice, we think that gold-standard inference algorithms will be calibrated based on a mix of subjective assumptions and heuristic testing—much like models themselves are tested. For example, users could initially build confidence in a gold-standard algorithm by estimating the symmetric KL divergence from the posterior on simulated data sets (following the approach of Grosse et al. [12]), and then use AIDE with the trusted gold-standard for a focused evaluation of target algorithms on real data sets of interest. We do not think the subjectivity of the gold-standard assumption is a unique limitation of AIDE. A limitation of AIDE is that its bias depends on the accuracy of meta-inference, i.e. inference over the auxiliary random variables used by an inference algorithm. We currently lack an accurate meta-inference algorithm for MCMC samplers that do not employ annealing, and therefore AIDE is not yet suitable for use as a general MCMC convergence diagnostic. Research on new meta-inference algorithms for MCMC and comparisons to standard convergence diagnostics [21, 22] are needed. Other areas for future work include understanding how the accuracy of meta-inference depends on parameters of an inference algorithm, and more generally what makes an inference algorithm amenable to efficient meta-inference. Note that AIDE does not rely on asymptotic exactness of the inference algorithm being evaluated. An interesting area of future work is in using AIDE to study the non-asymptotic error of scalable but asymptotically biased sampling algorithms [23]. It also seems fruitful to connect AIDE to results from theoretical computer science, including the computability [24] and complexity [25–28] of probabilistic inference. It should be possible to study the computational tractability of approximate inference empirically using AIDE estimates, as well as theoretically using a careful treatment of the variance of these estimates. It also seems promising to use ideas from AIDE to develop Monte Carlo program analyses for samplers written in probabilistic programming languages. 9 Acknowledgments This research was supported by DARPA (PPAML program, contract number FA8750-14-2-0004), IARPA (under research contract 2015-15061000003), the Office of Naval Research (under research contract N000141310333), the Army Research Office (under agreement number W911NF-13-10212), and gifts from Analog Devices and Google. This research was conducted with Government support under and awarded by DoD, Air Force Office of Scientific Research, National Defense Science and Engineering Graduate (NDSEG) Fellowship, 32 CFR 168a. References [1] Mary Kathryn Cowles and Bradley P Carlin. Markov chain Monte Carlo convergence diagnostics: a comparative review. Journal of the American Statistical Association, 91(434):883–904, 1996. [2] Christophe Andrieu, Arnaud Doucet, and Roman Holenstein. Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72 (3):269–342, 2010. [3] Roger B Grosse, Zoubin Ghahramani, and Ryan P Adams. Sandwiching the marginal likelihood using bidirectional Monte Carlo. arXiv preprint, arXiv:1511.02543, 2015. [4] Nicholas Metropolis, Arianna W Rosenbluth, Marshall N Rosenbluth, Augusta H Teller, and Edward Teller. Equation of state calculations by fast computing machines. The Journal of Chemical Physics, 21(6):1087–1092, 1953. [5] W Keith Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57(1):97–109, 1970. [6] Pierre Del Moral, Arnaud Doucet, and Ajay Jasra. Sequential Monte Carlo samplers. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(3):411–436, 2006. [7] Radford M Neal. Annealed importance sampling. Statistics and Computing, 11(2):125–139, 2001. [8] Donald B Rubin. Using the SIR algorithm to simulate posterior distributions. Bayesian statistics, 3(1):395–402, 1988. [9] Adrian FM Smith and Alan E Gelfand. Bayesian statistics without tears: a sampling-resampling perspective. The American Statistician, 46(2):84–88, 1992. [10] Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, 1999. [11] Noah Goodman, Vikash K Mansinghka, Daniel M Roy, Keith Bonawitz, and Joshua B Tenenbaum. Church: a language for generative models with non-parametric memoization and approximate inference. In Uncertainty in Artificial Intelligence, 2008. [12] Roger B Grosse, Siddharth Ancha, and Daniel M Roy. Measuring the reliability of MCMC inference with bidirectional Monte Carlo. In Advances in Neural Information Processing Systems (NIPS), pages 2451–2459, 2016. [13] Augustine Kong. A note on importance sampling using standardized weights. Technical Report 348, University of Chicago, Department of Statistics, 1992. [14] Jackson Gorham and Lester Mackey. Measuring sample quality with Stein’s method. In Advances in Neural Information Processing Systems (NIPS), pages 226–234, 2015. [15] Chris J Maddison, Dieterich Lawson, George Tucker, Nicolas Heess, Mohammad Norouzi, Andriy Mnih, Arnaud Doucet, and Yee Whye Teh. Filtering variational objectives. arXiv preprint, arXiv:1705.09279, 2017. 10 [16] Christian A Naesseth, Scott W Linderman, Rajesh Ranganath, and David M Blei. Variational sequential Monte Carlo. arXiv preprint, arXiv:1705.11140, 2017. [17] Tuan Anh Le, Maximilian Igl, Tom Jin, Tom Rainforth, and Frank Wood. Auto-encoding sequential Monte Carlo. arXiv preprint, arXiv:1705.10306, 2017. [18] Tim Salimans, Diederik Kingma, and Max Welling. Markov chain Monte Carlo and variational inference: Bridging the gap. In International Conference on Machine Learning (ICML), pages 1218–1226, 2015. [19] Yener Ulker, Bilge Günsel, and Taylan Cemgil. Sequential Monte Carlo samplers for Dirichlet process mixtures. In Artificial Intelligence and Statistics (AISTATS), pages 876–883, 2010. [20] Michael J Drinkwater, Quentin A Parker, Dominique Proust, Eric Slezak, and Hernán Quintana. The large scale distribution of galaxies in the Shapley supercluster. Publications of the Astronomical Society of Australia, 21(1):89–96, 2004. [21] Andrew Gelman and Donald B Rubin. Inference from iterative simulation using multiple sequences. Statistical Science, 7(4):457–472, 1992. [22] John Geweke. Getting it right: Joint distribution tests of posterior simulators. Journal of the American Statistical Association, 99(467):799–804, 2004. [23] Elaine Angelino, Matthew James Johnson, and Ryan P Adams. Patterns of scalable Bayesian inference. Foundations and Trends in Machine Learning, 9(2-3):119–247, 2016. [24] Nathanael L Ackerman, Cameron E Freer, and Daniel M Roy. On the computability of conditional probability. arXiv preprint, arXiv:1005.3014, 2010. [25] Cameron E Freer, Vikash K Mansinghka, and Daniel M Roy. When are probabilistic programs probably computationally tractable? In NIPS Workshop on Advanced Monte Carlo Methods with Applications, 2010. [26] Jonathan H Huggins and Daniel M Roy. Convergence of sequential Monte Carlo-based sampling methods. arXiv preprint, arXiv:1503.00966, 2015. [27] Sourav Chatterjee and Persi Diaconis. The sample size required in importance sampling. arXiv preprint, arXiv:1511.01437, 2015. [28] S Agapiou, Omiros Papaspiliopoulos, D Sanz-Alonso, and AM Stuart. Importance sampling: Intrinsic dimension and computational cost. Statistical Science, 32(3):405–431, 2017. 11 | 2017 | 453 |
6,956 | Information-theoretic analysis of generalization capability of learning algorithms Aolin Xu Maxim Raginsky {aolinxu2,maxim}@illinois.edu ⇤ Abstract We derive upper bounds on the generalization error of a learning algorithm in terms of the mutual information between its input and output. The bounds provide an information-theoretic understanding of generalization in learning problems, and give theoretical guidelines for striking the right balance between data fit and generalization by controlling the input-output mutual information. We propose a number of methods for this purpose, among which are algorithms that regularize the ERM algorithm with relative entropy or with random noise. Our work extends and leads to nontrivial improvements on the recent results of Russo and Zou. 1 Introduction A learning algorithm can be viewed as a randomized mapping, or a channel in the informationtheoretic language, which takes a training dataset as input and generates a hypothesis as output. The generalization error is the difference between the population risk of the output hypothesis and its empirical risk on the training data. It measures how much the learned hypothesis suffers from overfitting. The traditional way of analyzing the generalization error relies either on certain complexity measures of the hypothesis space, e.g. the VC dimension and the Rademacher complexity [1], or on certain properties of the learning algorithm, e.g., uniform stability [2]. Recently, motivated by improving the accuracy of adaptive data analysis, Russo and Zou [3] showed that the mutual information between the collection of empirical risks of the available hypotheses and the final output of the algorithm can be used effectively to analyze and control the bias in data analysis, which is equivalent to the generalization error in learning problems. Compared to the methods of analysis based on differential privacy, e.g., by Dwork et al. [4,5] and Bassily et al. [6], the method proposed in [3] is simpler and can handle unbounded loss functions; moreover, it provides elegant informationtheoretic insights into improving the generalization capability of learning algorithms. In a similar information-theoretic spirit, Alabdulmohsin [7, 8] proposed to bound the generalization error in learning problems using the total-variation information between a random instance in the dataset and the output hypothesis, but the analysis apply only to bounded loss functions. In this paper, we follow the information-theoretic framework proposed by Russo and Zou [3] to derive upper bounds on the generalization error of learning algorithms. We extend the results in [3] to the situation where the hypothesis space is uncountably infinite, and provide improved upper bounds on the expected absolute generalization error. We also obtain concentration inequalities for the generalization error, which were not given in [3]. While the main quantity examined in [3] is the mutual information between the collection of empirical risks of the hypotheses and the output of the algorithm, we mainly focus on relating the generalization error to the mutual information between the input dataset and the output of the algorithm, which formalizes the intuition that the less information ⇤Department of Electrical and Computer Engineering and Coordinated Science Laboratory, University of Illinois, Urbana, IL 61801, USA. This work was supported in part by the NSF CAREER award CCF-1254041 and in part by the Center for Science of Information (CSoI), an NSF Science and Technology Center, under grant agreement CCF-0939370. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. a learning algorithm can extract from the input dataset, the less it will overfit. This viewpoint provides theoretical guidelines for striking the right balance between data fit and generalization by controlling the algorithm’s input-output mutual information. For example, we show that regularizing the empirical risk minimization (ERM) algorithm with the input-output mutual information leads to the well-known Gibbs algorithm. As another example, regularizing the ERM algorithm with random noise can also control the input-output mutual information. For both the Gibbs algorithm and the noisy ERM algorithm, we also discuss how to calibrate the regularization in order to incorporate any prior knowledge of the population risks of the hypotheses into algorithm design. Additionally, we discuss adaptive composition of learning algorithms, and show that the generalization capability of the overall algorithm can be analyzed by examining the input-output mutual information of the constituent algorithms. Another advantage of relating the generalization error to the input-output mutual information is that the latter quantity depends on all ingredients of the learning problem, including the distribution of the dataset, the hypothesis space, the learning algorithm itself, and potentially the loss function, in contrast to the VC dimension or the uniform stability, which only depend on the hypothesis space or on the learning algorithm. As the generalization error can strongly depend on the input dataset [9], the input-output mutual information can be more tightly coupled to the generalization error than the traditional generalization-guaranteeing quantities of interest. We hope that our work can provide some information-theoretic understanding of generalization in modern learning problems, which may not be sufficiently addressed by the traditional analysis tools [9]. For the rest of this section, we define the quantities that will be used in the paper. In the standard framework of statistical learning theory [10], there is an instance space Z, a hypothesis space W, and a nonnegative loss function ` : W ⇥Z ! R+. A learning algorithm characterized by a Markov kernel PW |S takes as input a dataset of size n, i.e., an n-tuple S = (Z1, . . . , Zn) (1) of i.i.d. random elements of Z with some unknown distribution µ, and picks a random element W of W as the output hypothesis according to PW |S. The population risk of a hypothesis w 2 W on µ is Lµ(w) , E[`(w, Z)] = Z Z `(w, z)µ(dz). (2) The goal of learning is to ensure that the population risk of the output hypothesis W is small, either in expectation or with high probability, under any data generating distribution µ. The excess risk of W is the difference Lµ(W) −infw2W Lµ(w), and its expected value is denoted as Rexcess(µ, PW |S). Since µ is unknown, the learning algorithm cannot directly compute Lµ(w) for any w 2 W, but can instead compute the empirical risk of w on the dataset S as a proxy, defined as LS(w) , 1 n n X i=1 `(w, Zi). (3) For a learning algorithm characterized by PW |S, the generalization error on µ is the difference Lµ(W) −LS(W), and its expected value is denoted as gen(µ, PW |S) , E[Lµ(W) −LS(W)], (4) where the expectation is taken with respect to the joint distribution PS,W = µ⌦n ⌦PW |S. The expected population risk can then be decomposed as E[Lµ(W)] = E[LS(W)] + gen(µ, PW |S), (5) where the first term reflects how well the output hypothesis fits the dataset, while the second term reflects how well the output hypothesis generalizes. To minimize E[Lµ(W)] we need both terms in (5) to be small. However, it is generally impossible to minimize the two terms simultaneously, and any learning algorithm faces a trade-off between the empirical risk and the generalization error. In what follows, we will show how the generalization error can be related to the mutual information between the input and output of the learning algorithm, and how we can use these relationships to guide the algorithm design to reduce the population risk by balancing fitting and generalization. 2 2 Algorithmic stability in input-output mutual information As discussed above, having a small generalization error is crucial for a learning algorithm to produce an output hypothesis with a small population risk. It turns out that the generalization error of a learning algorithm can be determined by its stability properties. Traditionally, a learning algorithm is said to be stable if a small change of the input to the algorithm does not change the output of the algorithm much. Examples include uniform stability defined by Bousquet and Elisseeff [2] and on-average stability defined by Shalev-Shwartz et al. [11]. In recent years, information-theoretic stability notions, such as those measured by differential privacy [5], KL divergence [6,12], total-variation information [7], and erasure mutual information [13], have been proposed. All existing notions of stability show that the generalization capability of a learning algorithm hinges on how sensitive the output of the algorithm is to local modifications of the input dataset. It implies that the less dependent the output hypothesis W is on the input dataset S, the better the learning algorithm generalizes. From an information-theoretic point of view, the dependence between S and W can be naturally measured by the mutual information between them, which prompts the following information-theoretic definition of stability. We say that a learning algorithm is (", µ)-stable in input-output mutual information if, under the data-generating distribution µ, I(S; W) ". (6) Further, we say that a learning algorithm is "-stable in input-output mutual information if sup µ I(S; W) ". (7) According to the definitions in (6) and (7), the less information the output of a learning algorithm can provide about its input dataset, the more stable it is. Interestingly, if we view the learning algorithm PW |S as a channel from Zn to W, the quantity supµ I(S; W) can be viewed as the information capacity of the channel, under the constraint that the input distribution is of a product form. The definition in (7) means that a learning algorithm is more stable if its information capacity is smaller. The advantage of the weaker definition in (6) is that I(S; W) depends on both the algorithm and the distribution of the dataset. Therefore, it can be more tightly coupled with the generalization error, which itself depends on the dataset. We mainly focus on studying the consequence of this notion of (", µ)-stability in input-output mutual information for the rest of this paper. 3 Upper-bounding generalization error via I(S; W) In this section, we derive various generalization guarantees for learning algorithms that are stable in input-output mutual information. 3.1 A decoupling estimate We start with a digression from the statistical learning problem to a more general problem, which may be of independent interest. Consider a pair of random variables X and Y with joint distribution PX,Y . Let ¯X be an independent copy of X, and ¯Y an independent copy of Y , such that P ¯ X, ¯Y = PX ⌦PY . For an arbitrary real-valued function f : X ⇥Y ! R, we have the following upper bound on the absolute difference between E[f(X, Y )] and E[f( ¯X, ¯Y )]. Lemma 1 (proved in Appendix A). If f( ¯X, ¯Y ) is σ-subgaussian under P ¯ X, ¯Y = PX ⌦PY 2 , then ##E[f(X, Y )] −E[f( ¯X, ¯Y )] ## p 2σ2I(X; Y ). (8) 3.2 Upper bound on expected generalization error Upper-bounding the generalization error of a learning algorithm PW |S can be cast as a special case of the preceding problem, by setting X = S, Y = W, and f(s, w) = 1 n Pn i=1 `(w, zi). For an arbitrary w 2 W, the empirical risk can be expressed as LS(w) = f(S, w) and the population risk can be expressed as Lµ(w) = E[f(S, w)]. Moreover, the expected generalization error can be written as gen(µ, PW |S) = E[f( ¯S, ¯W)] −E[f(S, W)], (9) 2Recall that a random variable U is σ-subgaussian if log E[eλ(U−EU)] λ2σ2/2 for all λ 2 R. 3 where the joint distribution of S and W is PS,W = µ⌦n ⌦PW |S. If `(w, Z) is σ-subgaussian for all w 2 W, then f(S, w) is σ/pn-subgaussian due to the i.i.d. assumption on Zi’s, hence f( ¯S, ¯W) is σ/pn-subgaussian. This, together with Lemma 1, leads to the following theorem. Theorem 1. Suppose `(w, Z) is σ-subgaussian under µ for all w 2 W, then ##gen(µ, PW |S) ## r 2σ2 n I(S; W). (10) Theorem 1 suggests that, by controlling the mutual information between the input and the output of a learning algorithm, we can control its generalization error. The theorem allows us to consider unbounded loss functions as long as the subgaussian condition is satisfied. For a bounded loss function `(·, ·) 2 [a, b], `(w, Z) is guaranteed to be (b −a)/2-subgaussian for all µ and all w 2 W. Russo and Zou [3] considered the same problem setup with the restriction that the hypothesis space W is finite, and showed that |gen(µ, PW |S)| can be upper-bounded in terms of I(⇤W(S); W), where ⇤W(S) , ' LS(w) ( w2W (11) is the collection of empirical risks of the hypotheses in W. Using Lemma 1 by setting X = ⇤W(S), Y = W, and f(⇤W(s), w) = Ls(w), we immediately recover the result by Russo and Zou even when W is uncountably infinite: Theorem 2 (Russo and Zou [3]). Suppose `(w, Z) is σ-subgaussian under µ for all w 2 W, then ##gen(µ, PW |S) ## r 2σ2 n I(⇤W(S); W). (12) It should be noted that Theorem 1 can be obtained as a consequence of Theorem 2 because I(⇤W(S); W) I(S; W), (13) which is due to the Markov chain ⇤W(S) −S −W, as for each w 2 W, LS(w) is a function of S. However, if the output W depends on S only through the empirical risks ⇤W(S), in other words, when the Markov chain S −⇤W(S) −W holds, then Theorem 1 and Theorem 2 are equivalent. The advantage of Theorem 1 is that I(S; W) can be much easier to evaluate than I(⇤W(S); W), and can provide better insights to guide the algorithm design. We will elaborate on this when we discuss the Gibbs algorithm and the adaptive composition of learning algorithms. Theorem 1 and Theorem 2 only provide upper bounds on the expected generalization error. We are often interested in analyzing the absolute generalization error |Lµ(W) −LS(W)|, e.g., its expected value or the probability for it to be small. We need to develop stronger tools to tackle these problems, which is the subject of the next two subsections. 3.3 A concentration inequality for |Lµ(W) −LS(W)| For any fixed w 2 W, if `(w, Z) is σ-subgaussian, the Chernoff-Hoeffding bound gives P[|Lµ(w) − LS(w)| > ↵] 2e−↵2n/2σ2. It implies that, if S and W are independent, then a sample size of n = 2σ2 ↵2 log 2 β (14) suffices to guarantee P[|Lµ(W) −LS(W)| > ↵] β. (15) The following results show that, when W is dependent on S, as long as I(S; W) is sufficiently small, a sample complexity polynomial in 1/↵and logarithmic in 1/β still suffices to guarantee (15), where the probability now is taken with respect to the joint distribution PS,W = µ⌦n ⌦PW |S. Theorem 3 (proved in Appendix B). Suppose `(w, Z) is σ-subgaussian under µ for all w 2 W. If a learning algorithm satisfies I(⇤W(S); W) ", then for any ↵> 0 and 0 < β 1, (15) can be guaranteed by a sample complexity of n = 8σ2 ↵2 ✓" β + log 2 β ◆ . (16) 4 In view of (13), any learning algorithm that is (", µ)-stable in input-output mutual information satisfies the condition I(⇤W(S); W) ". The proof of Theorem 3 is based on Lemma 1 and an adaptation of the “monitor technique” proposed by Bassily et al. [6]. While the high-probability bounds of [4–6] based on differential privacy are for bounded loss functions and for functions with bounded differences, the result in Theorem 3 only requires `(w, Z) to be subgaussian. We have the following corollary of Theorem 3. Corollary 1. Under the conditions in Theorem 3, if for some function g(n) ≥1, " (g(n) − 1)β log 2 β , then a sample complexity that satisfies n/g(n) ≥8σ2 ↵2 log 2 β guarantees (15). For example, taking g(n) = 2, Corollary 1 implies that if " β log(2/β), then (15) can be guaranteed by a sample complexity of n = (16σ2/↵2) log(2/β), which is on the same order of the sample complexity when S and W are independent as in (14). As another example, taking g(n) = pn, Corollary 1 implies that if " (pn −1)β log(2/β), then a sample complexity of n = (64σ4/↵4) (log(2/β))2 guarantees (15). 3.4 Upper bound on E|Lµ(W) −LS(W)| A byproduct of the proof of Theorem 3 (setting m = 1 in the proof) is an upper bound on the expected absolute generalization error. Theorem 4. Suppose `(w, Z) is σ-subgaussian under µ for all w 2 W. If a learning algorithm satisfies that I(⇤W(S); W) ", then E ##Lµ(W) −LS(W) ## r 2σ2 n (" + log 2). (17) This result improves [3, Prop. 3.2], which states that E ##LS(W) −Lµ(W) ## σ/pn + 36 p 2σ2"/n. Theorem 4 together with Markov’s inequality implies that (15) can be guaranteed by n = 2σ2 ↵2β2 ' " + log 2 ( , but it has a worse dependence on β as compared to the sample complexity given by Theorem 3. 4 Learning algorithms with input-output mutual information stability In this section, we discuss several learning problems and algorithms from the viewpoint of inputoutput mutual information stability. We first consider two cases where the input-output mutual information can be upper-bounded via the properties of the hypothesis space. Then we propose two learning algorithms with controlled input-output mutual information by regularizing the ERM algorithm. We also discuss other methods to induce input-output mutual information stability, and the stability of learning algorithms obtained from adaptive composition of constituent algorithms. 4.1 Countable hypothesis space When the hypothesis space is countable, the input-output mutual information can be directly upperbounded by H(W), the entropy of W. If |W| = k, we have H(W) log k. From Theorem 1, if `(w, Z) is σ-subgaussian for all w 2 W, then for any learning algorithm PW |S with countable W, ##gen(µ, PW |S) ## r 2σ2H(W) n . (18) For the ERM algorithm, the upper bounds for the expected generalization error also hold for the expected excess risk, since the empirical risk of the ERM algorithm satisfies E[LS(WERM)] = E h inf w2W LS(w) i inf w2W E[LS(w)] = inf w2W Lµ(w). (19) For an uncountable hypothesis space, we can always convert it to a finite one by quantizing the output hypothesis. For example, if W ⇢Rm, we can define the covering number N(r, W) as the cardinality of the smallest set W0 ⇢Rm such that for all w 2 W there is w0 2 W0 with kw −w0k r, and we can use W0 as the codebook for quantization. The final output hypothesis W 0 will be an element of 5 W0. If W lies in a d-dimensional subspace of Rm and maxw2W kwk = B, then setting r = 1/pn, we have N(r, W) (2B p dn)d, and under the subgaussian condition of `, ##gen(µ, PW 0|S) ## r 2σ2d n log ' 2B p dn ( . (20) 4.2 Binary Classification For the problem of binary classification, Z = X ⇥Y, Y = {0, 1}, W is a collection of classifiers w : X ! Y, which could be uncountably infinite, and `(w, z) = 1{w(x) 6= y}. Using Theorem 1, we can perform a simple analysis of the following two-stage algorithm [14,15] that can achieve the same performance as ERM. Given the dataset S, split it into S1 and S2 with lengths n1 and n2. First, pick a subset of hypotheses W1 ⇢W based on S1 such that (w(X1), . . . , w(Xn1)) for w 2 W1 are all distinct and {(w(X1), . . . , w(Xn1)), w 2 W1} = {(w(X1), . . . , w(Xn1)), w 2 W}. In other words, W1 forms an empirical cover of W with respect to S1. Then pick a hypothesis from W1 with the minimal empirical risk on S2, i.e., W = arg min w2W1 LS2(w). (21) Denoting the nth shatter coefficient and the VC dimension of W by Sn and V , we can upper-bound the expected generalization error of W with respect to S2 as E[Lµ(W)] −E[LS2(W)] = E ⇥ E[Lµ(W) −LS2(W)|S1] ⇤ s V log(n1 + 1) 2n2 , (22) where we have used the fact that I(S2; W|S1 = s1) H(W|S1 = s1) log Sn1 V log(n1 + 1), by Sauer’s Lemma, and Theorem 1. It can also be shown that [14,15] E[LS2(W)] E h inf w2W1 Lµ(w) i inf w2W Lµ(w) + c r V n1 , (23) where the second expectation is taken with respect to W1 which depends on S1, and c is a constant. Combining (22) and (23) and setting n1 = n2 = n/2, we have for some constant c, E[Lµ(W)] inf w2W Lµ(w) + c r V log n n . (24) From an information-theoretic point of view, the above two-stage algorithm effectively controls the conditional mutual information I(S2; W|S1) by extracting an empirical cover of W using S1, while maintaining a small empirical risk using S2. 4.3 Gibbs algorithm As Theorem 1 shows that the generalization error can be upper-bounded in terms of I(S; W), it is natural to consider an algorithm that minimizes the empirical risk regularized by I(S; W): P ? W |S = arg inf PW |S ✓ E[LS(W)] + 1 β I(S; W) ◆ , (25) where β > 0 is a parameter that balances fitting and generalization. To deal with the issue that µ is unknown to the learning algorithm, we can relax the above optimization problem by replacing I(S; W) with an upper bound D(PW |SkQ|PS) = I(S; W) + D(PW kQ), where Q is an arbitrary distribution on W and D(PW |SkQ|PS) = R Zn D(PW |S=skQ)µ⌦n(ds), so that the solution of the relaxed optimization problem does not depend on µ. It turns out that the well-known Gibbs algorithm solves the relaxed optimization problem. Theorem 5 (proved in Appendix C). The solution to the optimization problem P ⇤ W |S = arg inf PW |S ✓ E[LS(W)] + 1 β D(PW |SkQ|PS) ◆ (26) is the Gibbs algorithm, which satisfies P ⇤ W |S=s(dw) = e−βLs(w)Q(dw) EQ[e−βLs(W )] for each s 2 Zn. (27) 6 We would not have been able to arrive at the Gibbs algorithm had we used I(⇤W(S); W) as the regularization term instead of I(S; W) in (25), even if we upper-bound I(⇤W(S)) by D(PW |⇤W(S)kQ|P⇤W(S)). Using the fact that the Gibbs algorithm is (2β/n,0)-differentially private when ` 2 [0, 1] [16] and the group property of differential privacy [17], we can upper-bound the input-output mutual information of the Gibbs algorithm as I(S; W) 2β. Then from Theorem 1, we know that for ` 2 [0, 1], ##gen(µ, P ⇤ W |S) ## p β/n. Using Hoeffding’s lemma, a tighter upper bound on the expected generalization error for the Gibbs algorithm is obtained in [13], which states that if ` 2 [0, 1], ##gen(µ, P ⇤ W |S) ## β 2n. (28) With the guarantee on the generalization error, we can analyze the population risk of the Gibbs algorithm. We first present a result for countable hypothesis spaces. Corollary 2 (proved in Appendix D). Suppose W is countable. Let W denote the output of the Gibbs algorithm applied on dataset S, and let wo denote the hypothesis that achieves the minimum population risk among W. For ` 2 [0, 1], the population risk of W satisfies E[Lµ(W)] inf w2W Lµ(w) + 1 β log 1 Q(wo) + β 2n. (29) The distribution Q in the Gibbs algorithm can be used to express our preference, or our prior knowledge of the population risks, of the hypotheses in W, in a way that a higher probability under Q is assigned to a hypothesis that we prefer. For example, we can order the hypotheses according to our prior knowledge of their population risks, and set Q(wi) = 6/⇡2i2 for the ith hypothesis in the order, then, setting β = pn, (29) becomes E[Lµ(W)] inf w2W Lµ(w) + 2 log io + 1 pn , (30) where io is the index of wo. It means that a better prior knowledge on the population risks leads to a smaller sample complexity to achieve a certain expected excess risk. As another example, if |W| = k and we have no preference on any hypothesis, then taking Q as the uniform distribution on W and setting β = 2pn log k, (29) becomes E[Lµ(W)] infw2W Lµ(w) + p (1/n)log k. For uncountable hypothesis spaces, we can do a similar analysis for the population risk under a Lipschitz assumption on the loss function. Corollary 3 (proved in Appendix E). Suppose W = Rd. Let wo be the hypothesis that achieves the minimum population risk among W. Suppose ` 2 [0, 1] and `(·, z) is ⇢-Lipschitz for all z 2 Z. Let W denote the output of the Gibbs algorithm applied on dataset S. The population risk of W satisfies E[Lµ(W)] inf w2W Lµ(w) + β 2n + inf a>0 ✓ a⇢ p d + 1 β D ' N(wo, a2Id)kQ (◆ . (31) Again, we can use the distribution Q to express our preference of the hypotheses in W. For example, we can choose Q = N(wQ, b2Id) with b = n−1/4d−1/4⇢−1/2 and choose β = n3/4d1/4⇢1/2. Then, setting a = b in (31), we have E[Lµ(W)] inf w2W Lµ(w) + d1/4⇢1/2 2n1/4 ' kwQ −wok2 + 3 ( . (32) This result essentially has no restriction on W, which could be unbounded, and only requires the Lipschitz condition on `(·, z), which could be non-convex. The sample complexity decreases with a better prior knowledge of the optimal hypothesis. 4.4 Noisy empirical risk minimization Another algorithm with controlled input-output mutual information is the noisy empirical risk minimization algorithm, where independent noise Nw, w 2 W, is added to the empirical risk of each hypothesis, and the algorithm outputs a hypothesis that minimizes the noisy empirical risks: W = arg min w2W ' LS(w) + Nw ( . (33) 7 Similar to the Gibbs algorithm, we can express our preference of the hypotheses by controlling the amount of noise added to each hypothesis, such that our preferred hypotheses will be more likely to be selected when they have similar empirical risks as other hypotheses. The following result formalizes this idea. Corollary 4 (proved in Appendix F). Suppose W is countable and is indexed such that a hypothesis with a lower index is preferred over one with a higher index. Also suppose ` 2 [0, 1]. For the noisy ERM algorithm in (33), choosing Ni to be an exponential random variable with mean bi, we have E[Lµ(W)] min i Lµ(wi) + bio + v u u t 1 2n 1 X i=1 Lµ(wi) bi − 1 X i=1 1 bi !−1 , (34) where io = arg mini Lµ(wi). In particular, choosing bi = i1.1/n1/3, we have E[Lµ(W)] min i Lµ(wi) + i1.1 o + 3 n1/3 . (35) Without adding noise, the ERM algorithm applied to the above case when |W| = k can achieve E[Lµ(WERM)] mini2[k] Lµ(wi) + p (1/2n)log k. Compared with (35), we see that performing noisy ERM may be beneficial when we have high-quality prior knowledge of wo and when k is large. 4.5 Other methods to induce input-output mutual information stability In addition to the Gibbs algorithm and the noisy ERM algorithm, many other methods may be used to control the input-output mutual information of the learning algorithm. One method is to preprocess the dataset S to obtain ˜S, and then run a learning algorithm on ˜S. The preprocessing can be adding noise to the data or erasing some of the instances in the dataset, etc. In any case, we have the Markov chain S −˜S −W, which implies I(S; W) min 6 I(S; ˜S), I( ˜S; W) . Another method is the postprocessing of the output of a learning algorithm. For example, the weights ˜W generated by a neural network training algorithm can be quantized or perturbed by noise. This gives rise to the Markov chain S −˜W −W, which implies I(S; W) min 6 I( ˜W; W), I(S; ˜W) . Moreover, strong data processing inequalities [18] may be used to sharpen these upper bounds on I(S; W). Preprocessing of the dataset and postprocessing of the output hypothesis are among numerous regularization methods used in the field of deep learning [19, Ch. 7.5]. Other regularization methods may also be interpreted as ways to induce the input-output mutual information stability of a learning algorithm, and this would be an interesting direction of future research. 4.6 Adaptive composition of learning algorithms Beyond analyzing the generalization error of individual learning algorithms, examining the inputoutput mutual information is also useful for analyzing the generalization capability of complex learning algorithms obtained by adaptively composing simple constituent algorithms. Under a k-fold adaptive composition, the dataset S is shared by k learning algorithms that are sequentially executed. For j = 1, . . . , k, the output Wj of the jth algorithm may be drawn from a different hypothesis space Wj based on S and the outputs W j−1 of the previously executed algorithms, according to PWj|S,W j−1. An example with k = 2 is model selection followed by a learning algorithm using the same dataset. Various boosting techniques in machine learning can also be viewed as instances of adaptive composition. From the data processing inequality and the chain rule of mutual information, I(S; Wk) I(S; W k) = k X j=1 I(S; Wj|W j−1). (36) If the Markov chain S −⇤Wj(S) −Wj holds conditional on W j−1 for j = 1, . . . , k, then the upper bound in (36) can be sharpened to Pk j=1 I(⇤Wj(S); Wj|W j−1). We can thus control the generalization error of the final output by controlling the conditional mutual information at each step of the composition. This also gives us a way to analyze the generalization error of the composed learning algorithm using the knowledge of local generalization guarantees of the constituent algorithms. 8 Acknowledgement We would like to thank Vitaly Feldman and Vivek Bagaria for pointing out errors in the earlier version of this paper. We also would like to thank Peng Guan for helpful discussions. References [1] S. Boucheron, O. Bousquet, and G. Lugosi, “Theory of classification: a survey of some recent advances,” ESAIM: Probability and Statistics, vol. 9, pp. 323–375, 2005. [2] O. Bousquet and A. Elisseeff, “Stability and generalization,” J. Machine Learning Res., vol. 2, pp. 499–526, 2002. [3] D. Russo and J. Zou, “How much does your data exploration overfit? Controlling bias via information usage,” arXiv preprint, 2016. [Online]. Available: https://arxiv.org/abs/1511.05219 [4] C. Dwork, V. Feldman, M. Hardt, T. Pitassi, O. Reingold, and A. Roth, “Preserving statistical validity in adaptive data analysis,” in Proc. of 47th ACM Symposium on Theory of Computing (STOC), 2015. [5] ——, “Generalization in adaptive data analysis and holdout reuse,” in 28th Annual Conference on Neural Information Processing Systems (NIPS), 2015. [6] R. Bassily, K. Nissim, A. Smith, T. Steinke, U. Stemmer, and J. Ullman, “Algorithmic stability for adaptive data analysis,” in Proceedings of The 48th Annual ACM Symposium on Theory of Computing (STOC), 2016. [7] I. Alabdulmohsin, “Algorithmic stability and uniform generalization,” in 28th Annual Conference on Neural Information Processing Systems (NIPS), 2015. [8] ——, “An information-theoretic route from generalization in expectation to generalization in probability,” in 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. [9] C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals, “Understanding deep learning requires rethinking generalization,” in International Conference on Learning Representations (ICLR), 2017. [10] S. Shalev-Shwartz and S. Ben-David, Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. [11] S. Shalev-Shwartz, O. Shamir, N. Srebro, and K. Sridharan, “Learnability, stability and uniform convergence,” J. Mach. Learn. Res., vol. 11, pp. 2635–2670, 2010. [12] Y.-X. Wang, J. Lei, and S. E. Fienberg, “On-average kl-privacy and its equivalence to generalization for max-entropy mechanisms,” in Proceedings of the International Conference on Privacy in Statistical Databases, 2016. [13] M. Raginsky, A. Rakhlin, M. Tsao, Y. Wu, and A. Xu, “Information-theoretic analysis of stability and bias of learning algorithms,” in Proceedings of IEEE Information Theory Workshop, 2016. [14] K. L. Buescher and P. R. Kumar, “Learning by canonical smooth estimation. I. Simultaneous estimation,” IEEE Transactions on Automatic Control, vol. 41, no. 4, pp. 545–556, Apr 1996. [15] L. Devroye, L. Györfi, and G. Lugosi, A Probabilistic Theory of Pattern Recognition. Springer, 1996. [16] F. McSherry and K. Talwar, “Mechanism design via differential privacy,” in Proceedings of 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS), 2007. [17] C. Dwork and A. Roth, “The algorithmic foundations of differential privacy,” Foundations and Trends in Theoretical Computer Science, vol. 9, no. 3-4, 2014. [18] M. Raginsky, “Strong data processing inequalities and Φ-Sobolev inequalities for discrete channels,” IEEE Trans. Inform. Theory, vol. 62, no. 6, pp. 3355–3389, 2016. [19] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, 2016. [20] S. Boucheron, G. Lugosi, and P. Massart, Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford Univ. Press, 2013. 9 [21] T. Zhang, “Information-theoretic upper and lower bounds for statistical estimation,” IEEE Trans. Inform. Theory, vol. 52, no. 4, pp. 1307 – 1321, 2006. [22] Y. Polyanskiy and Y. Wu, “Lecture Notes on Information Theory,” Lecture Notes for ECE563 (UIUC) and 6.441 (MIT), 2012-2016. [Online]. Available: http://people.lids.mit.edu/yp/ homepage/data/itlectures_v4.pdf [23] S. Verdú, “The exponential distribution in information theory,” Problems of Information Transmission, vol. 32, no. 1, pp. 86–95, 1996. 10 | 2017 | 454 |
6,957 | MarrNet: 3D Shape Reconstruction via 2.5D Sketches Jiajun Wu* MIT CSAIL Yifan Wang* ShanghaiTech University Tianfan Xue MIT CSAIL Xingyuan Sun Shanghai Jiao Tong University William T. Freeman MIT CSAIL, Google Research Joshua B. Tenenbaum MIT CSAIL Abstract 3D object reconstruction from a single image is a highly under-determined problem, requiring strong prior knowledge of plausible 3D shapes. This introduces challenges for learning-based approaches, as 3D object annotations are scarce in real images. Previous work chose to train on synthetic data with ground truth 3D information, but suffered from domain adaptation when tested on real data. In this work, we propose MarrNet, an end-to-end trainable model that sequentially estimates 2.5D sketches and 3D object shape. Our disentangled, two-step formulation has three advantages. First, compared to full 3D shape, 2.5D sketches are much easier to be recovered from a 2D image; models that recover 2.5D sketches are also more likely to transfer from synthetic to real data. Second, for 3D reconstruction from 2.5D sketches, systems can learn purely from synthetic data. This is because we can easily render realistic 2.5D sketches without modeling object appearance variations in real images, including lighting, texture, etc. This further relieves the domain adaptation problem. Third, we derive differentiable projective functions from 3D shape to 2.5D sketches; the framework is therefore end-to-end trainable on real images, requiring no human annotations. Our model achieves state-of-the-art performance on 3D shape reconstruction. 1 Introduction Humans quickly recognize 3D shapes from a single image. Figure 1a shows a number of images of chairs; despite their drastic difference in object texture, material, environment lighting, and background, humans easily recognize they have very similar 3D shapes. What is the most essential information that makes this happen? Researchers in human perception argued that our 3D perception could rely on recovering 2.5D sketches [Marr, 1982], which include intrinsic images [Barrow and Tenenbaum, 1978, Tappen et al., 2003] like depth and surface normal maps (Figure 1b). Intrinsic images disentangle object appearance variations in texture, albedo, lighting, etc., with its shape, which retains all information from the observed image for 3D reconstruction. Humans further combine 2.5D sketches and a shape prior learned from past experience to reconstruct a full 3D shape (Figure 1c). In the field of computer vision, there have also been abundant works exploiting the idea for reconstruction 3D shapes of faces [Kemelmacher-Shlizerman and Basri, 2011], objects [Tappen et al., 2003], and scenes [Hoiem et al., 2005, Saxena et al., 2009]. Recently, researchers attempted to tackle the problem of single-image 3D reconstruction with deep learning. These approaches usually regress a 3D shape from a single RGB image directly [Tulsiani et al., 2017, Choy et al., 2016, Wu et al., 2016b]. In contrast, we propose a two-step while end-to-end trainable pipeline, sequentially recovering 2.5D sketches (depth and normal maps) and a 3D shape. ∗indicates equal contributions. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) Images (b) 2.5D Sketches (c) 3D Shape Figure 1: Objects in real images (a) are subject to appearance variations regarding color, texture, lighting, material, background, etc. Despite this, their 2.5D sketches like surface normal and depth maps remain constant (b). The 2.5D sketches can be seen as an abstraction of the image, retaining all information about the 3D shape of the object inside. We combine the sketches with learned shape priors to reconstruct the full 3D shape (c). We use an encoder-decoder structure for each component of the framework, and also enforce the reprojection consistency between the estimated sketch and the 3D shape. We name it MarrNet, for its close resemblance to David Marr’s theory of perception [Marr, 1982]. Our approach offers several unique advantages. First, the use of 2.5D sketches releases the burden on domain transfer. As single-image 3D reconstruction is a highly under-constrained problem, strong prior knowledge of object shapes is needed. This poses challenges to learning-based methods, as accurate 3D object annotations in real images are rare. Most previous methods turned to training purely on synthetic data [Tulsiani et al., 2017, Choy et al., 2016, Girdhar et al., 2016]. However, these approaches often suffer from the domain adaption issue due to imperfect rendering. Learning 2.5D sketches from images, in comparison, is much easier and more robust to transfer from synthetic to real images, as shown in Section 4. Further, as our second step recovers 3D shape from 2.5D sketches — an abstraction of the raw input image, it can be trained purely relying on synthetic data. Though rendering diverse realistic images is challenging, it is straightforward to obtain almost perfect object surface normals and depths from a graphics engine. This further relieves the domain adaptation issue. We also enforce differentiable constraints between 2.5D sketches and 3D shape, making our system end-to-end trainable, even on real images without any annotations. Given a set of unlabeled images, our algorithm, pre-trained on synthetic data, can infer the 2.5D sketches of objects in the image, and use it to refine its estimation of objects’ 3D shape. This self-supervised feature enhances its performance on images from different domains. We evaluate our framework on both synthetic images of objects from ShapeNet [Chang et al., 2015], and real images from the PASCAL 3D+ dataset [Xiang et al., 2014]. We demonstrate that our framework performs well on 3D shape reconstruction, both qualitatively and quantitatively. Our contributions are three-fold: inspired by visual cognition theory, we propose a two-step, disentangled formulation for single-image 3D reconstruction via 2.5D sketches; we develop a novel, end-to-end trainable model with a differentiable projection layer that ensures consistency between 3D shape and mid-level representations; we demonstrate its effectiveness on 2.5D sketch transfer and 3D shape reconstruction on both synthetic and real data. 2 Related Work 2.5D Sketch Recovery Estimating 2.5D sketches has been a long-standing problem in computer vision. In the past, researchers have explored recovering 2.5D shape from shading, texture, or color images [Horn and Brooks, 1989, Zhang et al., 1999, Tappen et al., 2003, Barron and Malik, 2015, Weiss, 2001, Bell et al., 2014]. With the development of depth sensors [Izadi et al., 2011] and larger scale RGB-D datasets [Silberman et al., 2012, Song et al., 2017, McCormac et al., 2017], there have also been papers on estimating depth [Chen et al., 2016, Eigen and Fergus, 2015], surface normals [Bansal and Russell, 2016, Wang et al., 2015], and other intrinsic images [Shi et al., 2017, 2 3D Shape (a) 2.5D Sketch Estimation (b) 3D Shape Estimation (c) ReprojectionConsistency …… 2.5D Sketches 2D Image normal depth silhouette Normal Ball Figure 2: Our model (MarrNet) has three major components: (a) 2.5D sketch estimation, (b) 3D shape estimation, and (c) a loss function for reprojection consistency. MarrNet first recovers object normal, depth, and silhouette images from an RGB image. It then regresses the 3D shape from the 2.5D sketches. In both steps, it uses an encoding-decoding network. It finally employs a reprojection consistency loss to ensure the estimated 3D shape aligns with the 2.5D sketches. The entire framework can be trained end-to-end. Janner et al., 2017] with deep networks. Our method employs 2.5D estimation as a component, but targets reconstructing full 3D shape of an object. Single-Image 3D Reconstruction The problem of recovering object shape from a single image is challenging, as it requires both powerful recognition systems and prior shape knowledge. With the development of large-scale shape repository like ShapeNet [Chang et al., 2015], researchers developed models encoding shape prior for this task [Girdhar et al., 2016, Choy et al., 2016, Tulsiani et al., 2017, Wu et al., 2016b, Kar et al., 2015, Kanazawa et al., 2016, Soltani et al., 2017], with extension to scenes [Song et al., 2017]. These methods typically regress a voxelized 3D shape directly from an input image, and rely on synthetic data or 2D masks for training. In comparison, our formulation tackles domain difference better, as it can be end-to-end fine-tuned on images without any annotations. 2D-3D Consistency It is intuitive and practically helpful to constrain the reconstructed 3D shape to be consistent with 2D observations. Researchers have explored this idea for decades [Lowe, 1987]. This idea is also widely used in 3D shape completion from depths or silhouettes [Firman et al., 2016, Rock et al., 2015, Dai et al., 2017]. Recently, a few papers discussed enforcing differentiable 2D-3D constraints between shape and silhouettes, enabling joint training of deep networks for 3D reconstruction [Wu et al., 2016a, Yan et al., 2016, Rezende et al., 2016, Tulsiani et al., 2017]. In our paper, we exploit this idea to develop differentiable constraints on the consistency between various 2.5D sketches and 3D shape. 3 Approach To recover the 3D structure from a single view RGB image, our MarrNet contains three parts: first, a 2.5D sketch estimator, which predicts the depth, surface normal, and silhouette images of the object (Figure 2a); second, a 3D shape estimator, which infers 3D object shape using a voxel representation (Figure 2b); third, a reprojection consistency function, enforcing the alignment between the estimated 3D structure and inferred 2.5D sketches (Figure 2c). 3.1 2.5D Sketch Estimation The first component of our network (Figure 2a) takes a 2D RGB image as input, and predicts its 2.5D sketch: surface normal, depth, and silhouette. The goal of the 2.5D sketch estimation step is to distill intrinsic object properties from input images, while discarding properties that are non-essential for the task of 3D reconstruction, such as object texture and lighting. We use an encoder-decoder network architecture for 2.5D sketch estimation. Our encoder is a ResNet-18 [He et al., 2015], encoding a 256×256 RGB image into 512 feature maps of size 8×8. 3 Voxels that should be 1 for reprojected depth consistency Voxels that should be 0 for reprojected depth consistency Voxels that should be 1 for reprojected surface normal consistency 𝑧= 4 𝑧= ∞ 𝑛= 𝑧 𝑧 𝑧 Figure 3: Reprojection consistency between 2.5D sketches and 3D shape. Left and middle: the criteria for depths and silhouettes; right: the criterion for surface normals. See Section 3.3 for details. The decoder contains four sets of 5×5 fully convolutional and ReLU layers, followed by four sets of 1×1 convolutional and ReLU layers. It outputs the corresponding depth, surface normal, and silhouette images, also at the resolution of 256×256. 3.2 3D Shape Estimation The second part of our framework (Figure 2b) infers 3D object shape from estimated 2.5D sketches. Here, the network focuses on learning the shape prior that explains input well. As it takes only surface normal and depth images as input, it can be trained on synthetic data, without suffering from the domain adaption problem: it is straightforward to render nearly perfect 2.5D sketches, but much harder to render realistic images. The network architecture is inspired by the TL network [Girdhar et al., 2016], and the 3D-VAEGAN [Wu et al., 2016b], again with an encoding-decoding style. It takes a normal image and a depth image as input (both masked by the estimated silhouette), maps them to a 200-dim vector via five sets of convolutional, ReLU, and pooling layers, followed by two fully connected layers. The detailed encoder structure can be found in Girdhar et al. [2016]. The vector then goes through a decoder, which consists of five fully convolutional and ReLU layers to output a 128×128×128 voxel-based reconstruction of the input. The detailed encoder structure can be found in Wu et al. [2016b]. 3.3 Reprojection Consistency There have been works attempting to enforce the consistency between estimated 3D shape and 2D representations in a neural network [Yan et al., 2016, Rezende et al., 2016, Wu et al., 2016a, Tulsiani et al., 2017]. Here, we explore novel ways to include a reprojection consistency loss between the predicted 3D shape and the estimated 2.5D sketch, consisting of a depth reprojection loss and a surface normal reprojection loss. We use vx,y,z to represent the value at position (x, y, z) in a 3D voxel grid, assuming that vx,y,z ∈ [0, 1], ∀x, y, z. We use dx,y to denote the estimated depth at position (x, y), and nx,y = (na, nb, nc) to denote the estimated surface normal. We assume orthographic projection in this work. Depths The projected depth loss tries to guarantee that the voxel with depth vx,y,dx,y should be 1, and all voxels in front of it should be 0. This ensures the estimated 3D shape matches the estimated depth values. As illustrated in Figure 3a, we define projected depth loss as follows: Ldepth(x, y, z) = v2 x,y,z, z < dx,y (1 −vx,y,z)2, z = dx,y 0, z > dx,y . (1) The gradients are ∂Ldepth(x, y, z) ∂vx,y,z = 2vx,y,z, z < dx,y 2(vx,y,z −1), z = dx,y 0, z > dx,y . (2) 4 When dx,y = ∞, our depth criterion reduces to a special case — the silhouette criterion. As shown in Figure 3b, for a line that has no intersection with the shape, all voxels in it should be 0. Surface Normals As vectors nx = (0, −nc, nb) and ny = (−nc, 0, na) are orthogonal to the normal vector nx,y = (na, nb, nc), we can normalize them to obtain two vectors, n′ x = (0, −1, nb/nc) and n′ y = (−1, 0, na/nc), both on the estimated surface plane at (x, y, z). The projected surface normal loss tries to guarantee that the voxels at (x, y, z) ± n′ x and (x, y, z) ± n+y should be 1 to match the estimated surface normals. These constraints only apply when the target voxels are inside the estimated silhouette. As shown in Figure 3c, let z = dx,y, the projected surface normal loss is defined as Lnormal(x, y, z) = 1 −vx,y−1,z+ nb nc 2 + 1 −vx,y+1,z− nb nc 2 + 1 −vx−1,y,z+ na nc 2 + 1 −vx+1,y,z−na nc 2 . (3) Then the gradients along the x direction are ∂Lnormal(x, y, z) ∂vx−1,y,z+ na nc = 2 vx−1,y,z+ na nc −1 and ∂Lnormal(x, y, z) ∂vx+1,y,z−na nc = 2 vx+1,y,z−na nc −1 . (4) The gradients along the y direction are similar. 3.4 Training Paradigm We employ a two-step training paradigm. We first train the 2.5D sketch estimation and the 3D shape estimation components separately on synthetic images; we then fine-tune the network on real images. For pre-training, we use synthetic images of ShapeNet objects. The 2.5D sketch estimator is trained using the ground truth surface normal, depth, and silhouette images with a L2 loss. The 3D interpreter is trained using ground truth voxels and a cross-entropy loss. Please see Section 4.1 for details on data preparation. The reprojection consistency loss is used to fine-tune the 3D estimation component of our model on real images, using the predicted normal, depth, and silhouette. We observe that a straightforward implementation leads to shapes that explain 2.5D sketches well, but with unrealistic appearance. This is because the 3D estimation module overfits the images without preserving the learned 3D shape prior. See Figure 5 for examples, and Section 4.2 for more details. We therefore choose to fix the decoder of the 3D estimator and only fine-tune the encoder. During testing, our method can be self-supervised, i.e., we can fine-tune even on a single image without any annotations. In practice, we fine-tune our model separately on each image for 40 iterations. For each test image, fine-tuning takes up to 10 seconds on a modern GPU; without fine-tuning, testing time is around 100 milliseconds. We use SGD for optimization with a batch size of 4, a learning rate of 0.001, and a momentum of 0.9. We implemented our framework in Torch7 [Collobert et al., 2011]. 4 Evaluation In this section, we present both qualitative and quantitative results on single-image 3D reconstruction using variants of our framework. We evaluate our entire framework on both synthetic and real-life images on three datasets. 4.1 3D Reconstruction on ShapeNet Data We start with experiments on synthesized images of ShapeNet chairs [Chang et al., 2015]. We put objects in front of random backgrounds from the SUN database [Xiao et al., 2010], and render the corresponding RGB, depth, surface normal, and silhouette images. We use a physics-based renderer, Mitsuba [Jakob, 2010], to obtain more realistic images. For each of the 6,778 ShapeNet chairs, we render 20 images of random viewpoints. 5 Estimated normals Estimated depths Ground truth Direct predictions Images MarrNet Figure 4: Results on rendered images of ShapeNet objects [Chang et al., 2015]. From left to right: input, estimated normal map, estimated depth map, our prediction, a baseline algorithm that predicts 3D shape directly from RGB input without modeling 2.5D sketch, and ground truth. Both normal and depth maps are masked by predicted silhouettes. Our method is able to recover shapes with smoother surfaces and finer details. Methods We follow the training paradigm described in Section 3.4, but without the final fine-tuning stage, as ground truth 3D shapes are available on this synthetic dataset. Specifically, the 2.5D sketch estimator is trained using ground truth depth, normal and silhouette images and a L2 reconstruction loss. The 3D shape estimation module takes in the masked ground truth depth and normal images as input, and predicts 3D voxels of size 128×128×128 with a binary cross entropy loss. We compare MarrNet with a baseline that predicts 3D shape directly from an RGB image, without modeling 2.5D sketches. The baseline employs the same architecture as our 3D shape estimator (Section 3.2). We show qualitative results in Figure 4. Our estimated surface normal and depth images abstract out non-essential information like textures and lighting in the RGB image, while preserving intrinsic information about object shape. Compared with the direct prediction baseline, our model outputs objects with more details and smoother surfaces. For quantitative evaluation, previous works usually compute the Intersection-over-Union (IoU) [Tulsiani et al., 2017, Choy et al., 2016]. Our full model achieves a higher IoU (0.57) than the direct prediction baseline (0.52). 4.2 3D Reconstruction on Pascal 3D+ Data PASCAL 3D+ dataset [Xiang et al., 2014] provides (rough) 3D models for objects in real-life images. Here, we use the same test set of PASCAL 3D+ with earlier works [Tulsiani et al., 2017]. Methods We follow the paradigm described in Section 3.4: we first train each module separately on the ShapeNet dataset, and then fine-tune them on the PASCAL 3D+ dataset. Unlike previous works [Tulsiani et al., 2017], our model requires no silhouettes as input during fine-tuning; it instead estimates silhouette jointly. As an ablation study, we compare three variants of our model: first, the model trained using ShapeNet data only, without fine-tuning; second, the fine-tuned model whose decoder is not fixed during 6 Estimated normals and silhouettes Estimated depths and silhouettes Estimated 3D not fine-tuned Two views of refined 3D shape fine-tuned, not fixing decoder Two views of refined 3D shape fine-tuned, fixing decoder Images Figure 5: We present an ablation study, where we compare variants of our models. From left to right: input, estimated normal, estimated depth, 3D prediction before fine-tuning, two views of the 3D prediction after fine-tuning without fixing decoder, and two views of the 3D prediction after fine-tuning with the decoder fixed. When the decoder is not fixed, the model explains the 2.5D sketch well, but fails to preserve the learned shape prior. Fine-tuning with a fixed decoder resolves the issue. fine-tuning; and third, the full model whose decoder is fixed during fine-tuning. We also compare with the state-of-the-art method (DRC) [Tulsiani et al., 2017], and the provided ground truth shapes. Results The results of our ablation study are shown in Figure 5. The model trained on synthetic data provides a reasonable shape estimate. If we fine-tune the model on Pascal 3D+ without fixing the decoder, the output voxels explain the 2.5D sketch data well, but fail to preserve the learned shape prior, leading to impossible shapes from certain views. Our final model, fine-tuned with the decoder fixed, keeps the shape prior and provides more details of the shape. We show more results in Figure 6, where we compare with the state-of-the-art (DRC) [Tulsiani et al., 2017], and the provided ground truth shapes. Quantitatively, our algorithm achieves a higher IoU over these methods (MarrNet 0.39 vs. DRC 0.34). However, we find the IoU metric sub-optimal for three reasons. First, measuring 3D shape similarity is a challenging yet unsolved problem, and IoU prefers models that predict mean shapes consistently, with no emphasize on details. Second, as object shape can only be reconstructed up to scale from a single image, it requires searching over all possible scales during the computation of IoU, making it less efficient. Third, as discussed in Tulsiani et al. [2017], PASCAL 3D+ has only rough 3D annotations (10 CAD chair models for all images). Computing IoU with these shapes would thus not be the most informative evaluation metric. We instead conduct human studies, where we show users the input image and two reconstructions, and ask them to choose the one that looks closer to the shape in the image. We show each test image to 10 human subjects. As shown in Table 1, our reconstruction is preferred 74% of the time to DRC, and 42% of the time to ground truth, showing a clear advantage. We present some failure cases in Figure 7. Our algorithm does not perform well on recovering complex, thin structure, and sometimes fails when the estimated mask is very inaccurate. Also, while DRC may benefit from multi-view supervision, we have only evaluated MarrNet given a single view of the shape, though adapting our formulation to multi-view data should be straightforward. 7 Images Ground truth MarrNet DRC Images Ground truth MarrNet DRC Figure 6: 3D reconstructions of chairs on the Pascal 3D+ [Xiang et al., 2014] dataset. From left to right: input, the ground truth shape from the dataset, 3D estimation by DRC [Tulsiani et al., 2017], and two views of MarrNet predictions. Our model recovers more accurate 3D shapes. DRC MarrNet GT DRC 50 26 17 MarrNet 74 50 42 Ground truth 83 58 50 Table 1: Human preferences on chairs in PASCAL 3D+ [Xiang et al., 2014]. We compare MarrNet with the state-of-the-art (DRC) [Tulsiani et al., 2017], and the ground truth provided by the dataset. Each number shows the percentage of humans prefer the left method to the top one. MarrNet is preferred 74% of the time to DRC, and 42% of the time to ground truth. Estimated normals Estimated depths MarrNet Images Figure 7: Failure cases on Pascal 3D+. Our algorithm does not perform well on recovering complex, thin structure, and sometimes fails when the estimated mask is very inaccurate. 4.3 3D Reconstruction on IKEA Data The IKEA dataset [Lim et al., 2013] contains images of IKEA furniture, along with accurate 3D shape and pose annotations. These images are challenging, as objects are often heavily occluded or cropped. We also evaluate our model on the IKEA dataset. Results We show qualitative results in Figure 8, where we compare with estimations by 3D-VAEGAN [Wu et al., 2016b] and the ground truth. As shown in the figure, our model can deal with mild occlusions in real life scenarios. We also conduct human studies on the IKEA dataset. Results show that 61% of the subjects prefer our reconstructions to those of 3D-VAE-GAN. 4.4 Extensions We also apply our framework on cars and airplanes. We use the same setup as that for chairs. As shown in Figure 9, shape details like the horizontal stabilizer and rear-view mirrors are recovered 8 Images Ground truth MarrNet 3DVAE-GAN Images Ground truth MarrNet 3DVAE-GAN Figure 8: 3D reconstruction of chairs on the IKEA [Lim et al., 2013] dataset. From left to right: input, ground truth, 3D estimation by 3D-VAE-GAN [Wu et al., 2016b], and two views of MarrNet predictions. Our model recovers more details compared to 3D-VAE-GAN. Images Ground truth MarrNet DRC Images Ground truth MarrNet DRC Figure 9: 3D reconstructions of airplanes and cars from PASCAL 3D+. From left to right: input, the ground truth shape from the dataset, 3D estimation by DRC [Tulsiani et al., 2017], and two views of MarrNet predictions. Ground truth MarrNet Images Ground truth MarrNet Images Figure 10: 3D reconstruction of objects from multiple categories on the PASCAL 3D+ [Xiang et al., 2014] dataset. MarrNet also recovers 3D shape well when it is trained on multiple categories. by our model. We further train MarrNet jointly on all three object categories, and show results in Figure 10. Our model successfully recovers shapes of different categories. 5 Conclusion We proposed MarrNet, a novel model that explicitly models 2.5D sketches for single-image 3D shape reconstruction. The use of 2.5D sketches enhanced the model’s performance, and made it easily adaptive to images across domains or even categories. We also developed differentiable loss functions for the consistency between 3D shape and 2.5D sketches, so that MarrNet can be end-to-end fine-tuned on real images without annotations. Experiments demonstrated that our model performs well, and is preferred by human annotators over competitors. 9 Acknowledgements We thank Shubham Tulsiani for sharing the DRC results, and Chengkai Zhang for the help on shape visualization. This work is supported by NSF #1212849 and #1447476, ONR MURI N00014-161-2007, the Center for Brain, Minds and Machines (NSF #1231216), Toyota Research Institute, Samsung, and Shell. References Aayush Bansal and Bryan Russell. Marr revisited: 2d-3d alignment via surface normal prediction. In CVPR, 2016. 2 Jonathan T Barron and Jitendra Malik. Shape, illumination, and reflectance from shading. IEEE TPAMI, 37(8): 1670–1687, 2015. 2 Harry G Barrow and Jay M Tenenbaum. Recovering intrinsic scene characteristics from images. Computer vision systems, 1978. 1 Sean Bell, Kavita Bala, and Noah Snavely. Intrinsic images in the wild. ACM TOG, 33(4):159, 2014. 2 Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv:1512.03012, 2015. 2, 3, 5, 6 Weifeng Chen, Zhao Fu, Dawei Yang, and Jia Deng. Single-image depth perception in the wild. In NIPS, 2016. 2 Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In ECCV, 2016. 1, 2, 3, 6 Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011. 5 Angela Dai, Charles Ruizhongtai Qi, and Matthias Nießner. Shape completion using 3d-encoder-predictor cnns and shape synthesis. In CVPR, 2017. 3 David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In ICCV, 2015. 2 Michael Firman, Oisin Mac Aodha, Simon Julier, and Gabriel J Brostow. Structured prediction of unobserved voxels from a single depth image. In CVPR, 2016. 3 Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In ECCV, 2016. 2, 3, 4 Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2015. 3 Derek Hoiem, Alexei A Efros, and Martial Hebert. Automatic photo pop-up. ACM TOG, 24(3):577–584, 2005. 1 Berthold KP Horn and Michael J Brooks. Shape from shading. MIT press, 1989. 2 Shahram Izadi, David Kim, Otmar Hilliges, David Molyneaux, Richard A. Newcombe, Pushmeet Kohli, Jamie Shotton, Steve Hodges, Dustin Freeman, Andrew J. Davison, and Andrew W. Fitzgibbon. Kinectfusion: real-time 3d reconstruction and interaction using a moving depth camera. In UIST, 2011. 2 Wenzel Jakob. Mitsuba renderer, 2010. http://www.mitsuba-renderer.org. 5 Michael Janner, Jiajun Wu, Tejas D Kulkarni, Ilker Yildirim, and Joshua B Tenenbaum. Self-supervised intrinsic image decomposition. In NIPS, 2017. 3 Angjoo Kanazawa, David W Jacobs, and Manmohan Chandraker. Warpnet: Weakly supervised matching for single-view reconstruction. In CVPR, 2016. 3 Abhishek Kar, Shubham Tulsiani, Joao Carreira, and Jitendra Malik. Category-specific object reconstruction from a single image. In CVPR, 2015. 3 10 Ira Kemelmacher-Shlizerman and Ronen Basri. 3d face reconstruction from a single image using a single reference face shape. IEEE TPAMI, 33(2):394–405, 2011. 1 Joseph J. Lim, Hamed Pirsiavash, and Antonio Torralba. Parsing ikea objects: Fine pose estimation. In ICCV, 2013. 8, 9 David G Lowe. Three-dimensional object recognition from single two-dimensional images. Artif. Intell., 31(3): 355–395, 1987. 3 David Marr. Vision: A computational investigation into the human representation and processing of visual information. W. H. Freeman and Company, 1982. 1, 2 John McCormac, Ankur Handa, Stefan Leutenegger, and Andrew J Davison. Scenenet rgb-d: Can 5m synthetic images beat generic imagenet pre-training on indoor segmentation? In ICCV, 2017. 2 Danilo Jimenez Rezende, SM Ali Eslami, Shakir Mohamed, Peter Battaglia, Max Jaderberg, and Nicolas Heess. Unsupervised learning of 3d structure from images. In NIPS, 2016. 3, 4 Jason Rock, Tanmay Gupta, Justin Thorsen, JunYoung Gwak, Daeyun Shin, and Derek Hoiem. Completing 3d object shape from one depth image. In CVPR, 2015. 3 Ashutosh Saxena, Min Sun, and Andrew Y Ng. Make3d: Learning 3d scene structure from a single still image. IEEE TPAMI, 31(5):824–840, 2009. 1 Jian Shi, Yue Dong, Hao Su, and Stella X Yu. Learning non-lambertian object intrinsics across shapenet categories. In CVPR, 2017. 2 Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and support inference from rgbd images. In ECCV, 2012. 2 Amir Arsalan Soltani, Haibin Huang, Jiajun Wu, Tejas D Kulkarni, and Joshua B Tenenbaum. Synthesizing 3d shapes via modeling multi-view depth maps and silhouettes with deep generative networks. In CVPR, 2017. 3 Shuran Song, Fisher Yu, Andy Zeng, Angel X Chang, Manolis Savva, and Thomas Funkhouser. Semantic scene completion from a single depth image. In CVPR, 2017. 2, 3 Marshall F Tappen, William T Freeman, and Edward H Adelson. Recovering intrinsic images from a single image. In NIPS, 2003. 1, 2 Shubham Tulsiani, Tinghui Zhou, Alexei A Efros, and Jitendra Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In CVPR, 2017. 1, 2, 3, 4, 6, 7, 8, 9 Xiaolong Wang, David Fouhey, and Abhinav Gupta. Designing deep networks for surface normal estimation. In CVPR, 2015. 2 Yair Weiss. Deriving intrinsic images from image sequences. In ICCV, 2001. 2 Jiajun Wu, Tianfan Xue, Joseph J Lim, Yuandong Tian, Joshua B Tenenbaum, Antonio Torralba, and William T Freeman. Single image 3d interpreter network. In ECCV, 2016a. 3, 4 Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a Probabilistic Latent Space of Object Shapes via 3D Generative-Adversarial Modeling. In NIPS, 2016b. 1, 3, 4, 8, 9 Yu Xiang, Roozbeh Mottaghi, and Silvio Savarese. Beyond pascal: A benchmark for 3d object detection in the wild. In WACV, 2014. 2, 6, 8, 9 Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In CVPR, 2010. 5 Xinchen Yan, Jimei Yang, Ersin Yumer, Yijie Guo, and Honglak Lee. Perspective transformer nets: Learning single-view 3d object reconstruction without 3d supervision. In NIPS, 2016. 3, 4 Ruo Zhang, Ping-Sing Tsai, James Edwin Cryer, and Mubarak Shah. Shape-from-shading: a survey. IEEE TPAMI, 21(8):690–706, 1999. 2 11 | 2017 | 455 |
6,958 | Flexible statistical inference for mechanistic models of neural dynamics Jan-Matthis Lueckmann∗1, Pedro J. Gonçalves∗1, Giacomo Bassetto1, Kaan Öcal1,2, Marcel Nonnenmacher1, Jakob H. Macke†1 1 research center caesar, an associate of the Max Planck Society, Bonn, Germany 2 Mathematical Institute, University of Bonn, Bonn, Germany {jan-matthis.lueckmann, pedro.goncalves, giacomo.bassetto, kaan.oecal, marcel.nonnenmacher, jakob.macke}@caesar.de Abstract Mechanistic models of single-neuron dynamics have been extensively studied in computational neuroscience. However, identifying which models can quantitatively reproduce empirically measured data has been challenging. We propose to overcome this limitation by using likelihood-free inference approaches (also known as Approximate Bayesian Computation, ABC) to perform full Bayesian inference on single-neuron models. Our approach builds on recent advances in ABC by learning a neural network which maps features of the observed data to the posterior distribution over parameters. We learn a Bayesian mixture-density network approximating the posterior over multiple rounds of adaptively chosen simulations. Furthermore, we propose an efficient approach for handling missing features and parameter settings for which the simulator fails, as well as a strategy for automatically learning relevant features using recurrent neural networks. On synthetic data, our approach efficiently estimates posterior distributions and recovers ground-truth parameters. On in-vitro recordings of membrane voltages, we recover multivariate posteriors over biophysical parameters, which yield model-predicted voltage traces that accurately match empirical data. Our approach will enable neuroscientists to perform Bayesian inference on complex neuron models without having to design model-specific algorithms, closing the gap between mechanistic and statistical approaches to single-neuron modelling. 1 Introduction Biophysical models of neuronal dynamics are of central importance for understanding the mechanisms by which neural circuits process information and control behaviour. However, identifying which models of neural dynamics can (or cannot) reproduce electrophysiological or imaging measurements of neural activity has been a major challenge [1]. In particular, many models of interest – such as multi-compartment biophysical models [2], networks of spiking neurons [3] or detailed simulations of brain activity [4] – have intractable or computationally expensive likelihoods, and statistical inference has only been possible in selected cases and using model-specific algorithms [5, 6, 7]. Many models are defined implicitly through simulators, i.e. a set of dynamical equations and possibly a description of sources of stochasticity [1]. In addition, it is often of interest to identify models which can reproduce particular features in the data, e.g. a firing rate or response latency, rather than the full temporal structure of a neural recording. ∗Equal contribution †Current primary affiliation: Centre for Cognitive Science, Technical University Darmstadt 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. θ proposal prior prior true posterior posterior xo x α1 αK … μ1 μK … λ1 λK … f1(s) f2(s) fI(s) … h2 h3 hH … h1 Mixture weights Means Precision factors forward pass feature 1 … A B C Figure 1: Flexible likelihood-free inference for models of neural dynamics. A. We want to flexibly and efficiently infer the posterior over model parameters given observed data, on a wide range of models of neural dynamics. B. Our method approximates the true posterior on θ around the observed data xo by performing density estimation on data simulated using a proposal prior. C. We train a Bayesian mixture-density network (MDN) for posterior density estimation. In the absence of likelihoods, the standard approach in neuroscience has been to use heuristic parameter-fitting methods [2, 8, 9]: distance measures are defined on multiple features of interest, and brute-force search [10, 11] or evolutionary algorithms [2, 9, 12, 13] (neither of which scales to high-dimensional parameter spaces) are used to minimise the distances between observed and modelderived features. As it is difficult to trade off distances between different features, the state-of-the-art methods optimise multiple objectives and leave the final choice of a model to the user [2, 9]. As this approach is not based on statistical inference, it does not provide estimates of the full posterior distribution – thus, while this approach has been of great importance for identifying ‘best fitting’ parameters, it does not allow one to identify the full space of parameters that are consistent with data and prior knowledge, or to incrementally refine and reject models. Bayesian inference for likelihood-free simulator models, also known as Approximate Bayesian Computation [14, 15, 16], provides an attractive framework for overcoming these limitations: like parameter-fitting approaches in neuroscience [2, 8, 9], it is based on comparing summary features between simulated and empirical data. However, unlike them, it provides a principled framework for full Bayesian inference and can be used to determine how to trade off goodness-of-fit across summary statistics. However, to the best of our knowledge, this potential has not been realised yet, and ABC approaches are not used for linking mechanistic models of neural dynamics with experimental data (for an exception, see [17]). Here, we propose to use ABC methods for statistical inference of mechanistic models of single neurons. We argue that ABC approaches based on conditional density estimation [18, 19] are particularly suited for neuroscience applications. We present a novel method (Sequential Neural Posterior Estimation, SNPE) in which we sequentially train a mixture-density network across multiple rounds of adaptively chosen simulations1. Our approach is directly inspired by prior work [18, 19], but overcomes critical limitations: first, a flexible mixture-density network trained with an importance-weighted loss function enables us to use complex proposal distributions and approximate complex posteriors. Second, we represent a full posterior over network parameters of the density estimator (i.e. a “posterior on posterior-parameters”) which allows us to take uncertainty into account when adjusting weights. This enables us to perform ‘continual learning’, i.e. to effectively utilise all simulations without explicitly having to store them. Third, we introduce an approach for efficiently dealing with simulations that return missing values, or which break altogether – a common situation in neuroscience and many other applications of simulator-based models – by learning a model that predicts which parameters are likely to lead to breaking simulations, and using this knowledge to modify the proposal distribution. We demonstrate the practical effectiveness and importance of these innovations on biophysical models of single neurons, on simulated and neurophysiological data. Finally, we show how recurrent neural networks can be used to directly learn relevant features from time-series data. 1Code available at https://github.com/mackelab/delfi 2 1.1 Related work using likelihood-free inference for simulator models Given experimental data xo (e.g. intracellular voltage measurements of a single neuron, or extracellular recordings from a neural population), a model p(x|θ) parameterised by θ (e.g. biophysical parameters, or connectivity strengths in a network simulation) and a prior distribution p(θ), our goal is to perform statistical inference, i.e. to find the posterior distribution ˆp(θ|x = xo). We assume that the model p(x|θ) is only defined through a simulator [14, 15]: we can generate samples xn ∼x|θ from it, but not evaluate p(x|θ) (or its gradients) explicitly. In neural modelling, many models are defined through specification of a dynamical system with external or intrinsic noise sources or even through a black-box simulator (e.g. using the NEURON software [20]). In addition, and in line with parameter-fitting approaches in neuroscience and most ABC techniques [14, 15, 21], we are often interested in capturing summary statistics of the experimental data (e.g. firing rate, spike-latency, resting potential of a neuron). Therefore, we can think of x as resulting from applying a feature function f to the raw simulator output s, x = f(s), with dim(x) ≪dim(s). Classical ABC algorithms simulate from multiple parameters, and reject parameter sets which yield data that are not within a specified distance from the empirically observed features. In their basic form, proposals are drawn from the prior (‘rejection-ABC’ [22]). More efficient variants make use of a Markov-Chain Monte-Carlo [23, 24] or Sequential Monte-Carlo (SMC) samplers [25, 26]. Sampling-based ABC approaches require the design of a distance metric on summary features, as well as a rejection criterion (ε), and are exact only in the limit of small ε (i.e. many rejections) [27], implying strong trade-offs between accuracy and scalability. In SMC-ABC, importance sampling is used to sequentially sample from more accurate posteriors while ε is gradually decreased. Synthetic-likelihood methods [28, 21, 29] approximate the likelihood p(x|θ) using multivariate Gaussians fitted to repeated simulations given θ (see [30, 31] for generalisations). While the Gaussianity assumption is often motivated by the central limit theorem, distributions over features can in practice be complex and highly non-Gaussian [32]. For example, neural simulations sometimes result in systematically missing features (e.g. spike latency is undefined if there are no spikes), or diverging firing rates. Finally, methods originating from regression correction [33, 18, 19] simulate multiple data xn from different θn sampled from a proposal distribution ˜p(θ), and construct a conditional density estimate q(θ|x) by performing a regression from simulated data xn to θn. Evaluating this density model at the observed data xo, q(θ|xo) yields an estimate of the posterior distribution. These approaches do not require parametric assumptions on likelihoods or the choice of a distance function and a tolerance (ε) on features. Two approaches are used for correcting the mismatch between prior and proposal distributions: Blum and François [18] proposed the importance weights p(θ)/˜p(θ), but restricted themselves to proposals which were truncated priors (i.e. all importance weights were 0 or 1), and did not sequentially optimise proposals over multiple rounds. Papamakarios and Murray [19] recently used stochastic variational inference to optimise the parameters of a mixture-density network, and a post-hoc division step to correct for the effect of the proposal distribution. While highly effective in some cases, this closed-form correction step can be numerically unstable and is restricted to Gaussian and uniform proposals, limiting both the robustness and flexibility of this approach. SNPE builds on these approaches, but overcomes their limitations by introducing four innovations: a highly flexible proposal distribution parameterised as a mixture-density network, a Bayesian approach for continual learning from multiple rounds of simulations, and a classifier for predicting which parameters will result in aborted simulations or missing features. Fourth, we show how this approach, when applied to time-series data of single-neuron activity, can automatically learn summary features from data. 2 Methods 2.1 Sequential Neural Posterior Estimation for likelihood-free inference In SNPE, our goal is to learn the parameters φ of a posterior model qφ(θ|x = f(s)) which, when evaluated at xo, approximates the true posterior p(θ|xo) ≈qφ(θ|x = xo). Given a prior p(θ), a proposal prior ˜p(θ), pairs of samples (θn, xn) generated from the proposal prior and the simulator, and a calibration kernel Kτ, the posterior model can be trained by minimising the importanceweighted log-loss L(φ) = −1 N X n p(θn) ˜p(θn)Kτ(xn, xo) log qφ(θn|xn), (1) 3 as is shown by extending the argument in [19] with importance-weights p(θn)/˜p(θn) and a kernel Kτ in Appendix A. Sampling from a proposal prior can be much more effective than sampling from the prior. By including the importance weights in the loss, the analytical correction step of [19] (i.e. division by the proposal prior) becomes unnecessary: SNPE directly estimates the posterior density rather than a conditional density that is reweighted post-hoc. The analytical step of [19] has the advantage of side-stepping the additional variance brought about by importance-weights, but has the disadvantages of (1) being restricted to Gaussian proposals, and (2) the division being unstable if the proposal prior has higher precision than the estimated conditional density. The calibration kernel Kτ(x, xo) can be used to calibrate the loss function by focusing it on simulated data points x which are close to xo [18]. Calibration kernels Kτ(x, xo) are to be chosen such that Kτ(xo, xo) = 1 and that Kτ decreases with increasing distance ∥x −xo∥, given a bandwidth τ 2. Here, we only used calibration kernels to exclude bad simulations by assigning them kernel value zero. An additional use of calibration kernels would be to limit the accuracy of the posterior density estimation to a region near xo. Choice of the bandwidth implies a bias-variance trade-off [18]. For the problems we consider here, we assumed our posterior model qφ(θ|x) based on a multi-layer neural network to be sufficiently flexible, such that limiting bandwidth was not necessary. We sequentially optimise the density estimator qφ(θ|x) = P k αkN(θ|µk, Σk) by training a mixturedensity network (MDN) [19] with parameters φ over multiple ‘rounds’ r with adaptively chosen proposal priors ˜p(r)(θ) (see Fig. 1). We initialise the proposal prior at the prior, ˜p(1)(θ) = p(θ), and subsequently take the posterior of the previous round as the next proposal prior (Appendix B). Our approach is not limited to Gaussian proposals, and in particular can utilise multi-modal and heavy-tailed proposal distributions. 2.2 Training the posterior model with stochastic variational inference To make efficient use of simulation time, we want the posterior network qφ(θ|x) to use all simulations, including ones from previous rounds. For computational and memory efficiency, it is desirable to avoid having to store all old samples, or having to train a new model at each round. To achieve this goal, we perform Bayesian inference on the weights w of the MDN across rounds. We approximate the distribution over weights as independent Gaussians [34, 35]. Note that the parameters φ of this Bayesian MDN are are means and standard deviations per each weight, i.e., φ = {φm, φs}. As an extension to the approach of [19], rather than assuming a zero-centred prior over weights, we use the posterior over weights of the previous round, πφ(r−1)(w), as a prior for the next round. Using stochastic variational inference, in each round, we optimise the modified loss L(φ(r)) = −1 N X n p(θn) ˜p(r)(θn)Kτ(xn, xo) log qw(θn|xn) πφ(r)(w) + 1 N DKL πφ(r)(w)||πφ(r−1)(w) . (2) Here, the distributions π(w) are approximated by multivariate normals with diagonal covariance. The continuity penalty ensures that MDN parameters that are already well constrained by previous rounds are less likely to be updated than parameters with large uncertainty (see Appendix C). In practice, gradients of the expectation over networks are approximated using the local reparameterisation trick [36]. 2.3 Dealing with bad simulations and bad features, and learning features from time series Bad simulations: Simulator-based models, and single-neuron models in particular, frequently generate nonsensical data (which we name ‘bad simulations’), especially in early rounds in which the relevant region of parameter space has not yet been found. For example, models of neural dynamics can easily run into self-excitation loops with diverging firing rates [37] (Fig. 4A). We introduce a feature b(s) = 1 to indicate that s and x correspond to a bad simulation. We set K(xn, xo) = 0 2While we did not investigate this here, an attractive idea would be to base the kernel of the distance between xn and xo on the divergence between the associated posteriors, e.g. Kτ(xn, xo) = exp(−1/τDKL(q(r−1)(θ|xn)||q(r−1)(θ|xo))) – in this case, two data would be regarded as similar if the current estimation of the density network assigns similar posterior distributions to them, which is a natural measure of similarity in this context. 4 whenever b(xn) = 1 since the density estimator should not spend resources on approximating the posterior for bad data. With this choice of calibration kernel, bad simulations are ignored when updating the posterior model – however, this results in inefficient use of simulations. We propose to learn a model ˆg : θ →[0, 1] to predict the probability that a simulation from θ will break. While any probabilistic classifier could be used, we train a binary-output neural network with log-loss on (θn, b(sn)). For each proposed θ, we reject θ with probability ˆg(θ), and do not carry out the expensive simulation3. The rejections could be incorporated into the importance weights (which would require estimating the corresponding partition function, or assuming it to be constant across rounds), but as these rejections do not depend on the data xo, we interpret them as modifying the prior: from an initially specified prior p(θ), we obtain a modified prior excluding those parameters which likely will lead to nonsensical simulations. Therefore, the predictive model ˆg(θ) does not only lead to more efficient inference (especially in strongly under-constrained scenarios), but is also useful in identifying an effective prior – the space of parameters deemed plausible a priori intersected with the space of parameters for which the simulator is well-behaved. Bad features: It is frequently observed that individual features of interest for fitting single-neuron models cannot be evaluated: for example, the spike latency cannot be evaluated if a simulation does not generate spikes, but the fact that this feature is missing might provide valuable information (Fig. 4C). SNPE can be extended to handle ‘bad features’ by using a carefully designed posterior network. For each feature fi(s), we introduce a binary feature mi(s) which indicates whether fi is missing. We parameterise the input layer of the posterior network with multiplicative terms of the form hi(s) = fi(s) · (1 −mi(s)) + ci · mi(s) where the term ci is to be learned. This approach effectively learns an imputation value ci for each missing feature. For a more expressive model, one could also include terms which learn interactions across different missing-feature indicators and/or features, but we did not explore this here. Learning features: Finally, we point out that using a neural network for posterior estimation yields a straightforward way of learning relevant features from data [38, 39, 40]. Rather than feeding summary features f(s) into the network, we directly feed time-series recordings of neural activity into the network. The first layer of the MDN becomes a recurrent layer instead of a fully-connected one. By minimising the variational objective (Eq.2), the network learns informative summary features about posterior densities. 3 Results While SNPE is in principle applicable to any simulator-based model, we designed it for performing inference on models of neural dynamics. In our applications, we concentrate on single-neuron models. We demonstrate the ability of SNPE to recover ground-truth posteriors in Gaussian Mixtures and Generalised Linear Models (GLMs) [41], and apply SNPE to a Hodgkin-Huxley neuron model and an autapse model, which can have parameter regimes of unstable behaviour and missing features. 3.1 Statistical inference on simple models Gaussian mixtures: We first demonstrate the effectiveness of SNPE for inferring the posterior of mixtures of two Gaussians, for which we can analytically compute true posteriors. We are interested in the numerical stability of the method (‘robustness’) and the ‘flexibility’ to approximate multi-modal posteriors. To illustrate the robustness of SNPE, we apply SNPE and the method proposed by [19] (which we refer to by Conditional Density Estimation for Likelihood-free Inference, CDE-LFI) to infer the common mean of a mixture of two Gaussians, given samples from the mixture distribution (Fig. 2A; details in Appendix D.1). Whereas SNPE works robustly across multiple algorithmic rounds, CDE-LFI can become unstable: its analytical correction requires a division by a Gaussian which becomes unstable if the precision of the Gaussian does not increase monotonically across rounds (see 2.1). Constraining the precision-matrix to be non-decreasing fixes the numerical issue, but leads to biased estimates of the posterior. Second, we apply both SNPE and CDE-LFI to infer the two means of a mixture of two Gaussians, given samples x from the mixture distribution (Fig. 2B; Appendix D.1). While SNPE can use bi-modal proposals, CDE-LFI cannot, implying reduced efficiency of proposals on strongly non-Gaussian or multi-modal problems. 3An alternative approach would be to first learn p(θ|b(s) = 0) by applying SNPE to a single feature, f1(s) = b(s), and to subsequently run SNPE on the full feature-set, but using p(θ|b(s) = 0) as prior – however, this would ‘waste’ simulations for learning p(θ|b(s) = 1). 5 −2 0 2 θ 0 1 2 p θ x x *( | = ) o 2 3 4 5 6 # of rounds 0 50 100 % completed runs SNPE CDE-LFI −2 0 2 θ density p θ ( )(2) ~ p θ ( )(6) ~ 0 xo 8 x -10 0 10 θ −10 0 10 θ density CDE-LFI −10 0 10 θ density SNPE 1 5 10 parameter −2 0 2 value true value SNPE PG-MCMC -0.0 0.1 PG-MCMC covariance -0.0 0.1 SNPE covariance -3.0 -0.5 b0 ... -0.7 1.5 h1 ... -0.3 2.4 h2 ... ... 1 5 10 parameter −2 0 2 value true value CDE-LFI PG-MCMC A B C D E F Figure 2: Inference on simple statistical models. A. Robustness of posterior inference on 1-D Gaussian Mixtures (GMs). Left: true posterior given observation at xo = 0. Middle: percentage of completed runs as a function of number of rounds; SNPE is robust. Right: Gaussian proposal priors tend to underestimate tails of posterior (red). B. Flexibility of posterior inference. Left: True posterior for 1-D bimodal GM and observation xo. Middle and right: First round proposal priors (dotted), second round proposal priors (dashed) and estimated posteriors (solid) for CDE-LFI and SNPE respectively (true posterior red). SNPE allows multi-modal proposals. C, F. Application to GLM. Posterior means and variances are recovered well by both CDE-LFI and SNPE. For reference, we approximate the posterior using likelihood-based PG-MCMC. D. Covariance matrices for SNPE and PG-MCMC. E. Partial view of the posterior for 3 out of 10 parameters (all 10 parameters in Appendix G). Ground-truth parameters in red. 2-D marginals for SNPE (lines) and PG-MCMC (histograms). White and yellow contour lines correspond to 68% and 95% of the mass, respectively. Generalised linear models: Generalised linear models (GLM) are commonly used to model neural responses to sensory stimuli. For these models, several techniques are available to estimate the posterior distribution over parameters, making them ideally suited to test SNPE in a single-neuron model. We evaluated the posterior distribution over the parameters of a GLM using a Pólya-Gamma sampler (PG-MCMC, [42, 43]) and compared it to the posterior distributions estimated by SNPE (Appendix D.2 for details). We found a good agreement of the posterior means and variances (Fig. 2C), covariances (Fig. 2D), as well as pairwise marginals (Fig. 2E). We note that, since GLMs have close-to-Gaussian posteriors, the CDE-LFI method works extremely well on this problem (Fig. 2F). In summary, SNPE leads to accurate and robust estimation of the posterior in simple models. It works effectively even on multi-modal posteriors on which CDE-LFI exhibits worse performance. On a GLM-example with an (almost) Gaussian posterior, the CDE-LFI method works extremely well, but SNPE yields very similar posterior estimates (see Appendix F for additional comparison with SMC-ABC). 3.2 Statistical inference on Hodgkin-Huxley neuron models Simulated data: The Hodgkin-Huxley equations [44] describe the dynamics of a neuron’s membrane potential and ion channels given biophysical parameters (e.g. concentration of sodium and potassium channels) and an injected input current (Fig. 3A, see Appendix D.3). We applied SNPE to a Hodgkin-Huxley model with channel kinetics as in [45] and inferred the posterior over 12 biophysical parameters, given 20 voltage features of the simulated data. The true parameter values are close to the mode of the inferred posterior (Fig. 3B, D), and in a region of high posterior probability. Samples from the posterior lead to voltage traces that are similar to the original data, supporting the correctness of the approach (Fig. 3C). 6 −80 −20 40 voltage (mV) 0 60 120 time (ms) 0.00 0.55 input (nA) 3.2 4.3 ln g ( ) Na ... 0.9 2.0 ln g ( ) K ... -3.0 -1.9 ln g ( ) l ... ... 0 60 120 time (ms) −80 −20 40 voltage (mV) gNa gK ENa kbn1 VT noise gM −El tmax gl kbn2 −EK 0.0 1.2 2.3 || - || / θ θ σ * θ SNPE mean best IBEA −80 −20 40 voltage (mV) 0 625 1250 time (ms) 0.00 0.19 input (nA) 3.2 4.3 ln g ( ) Na ... 0.9 2.0 ln g ( ) K ... -3.0 -1.9 ln g ( ) l ... ... 0 625 1250 time (ms) −80 −20 40 voltage (mV) A B C D E F G Figure 3: Application to Hodgkin-Huxley model: A. Simulation of Hodgkin-Huxley model with current injection. B. Posterior over 3 out of 12 parameters inferred with SNPE (12 parameters in Appendix G). True parameters have high posterior probabilities (red). C. Traces for the mode (cyan) of and samples (orange) from the inferred posterior match the original data (blue). D. Comparison between SNPE and a standard parameter-fitting procedure based on a genetic algorithm, IBEA: difference between the mode of SNPE or IBEA best parameter set, and the ground-truth parameters, normalised by the standard deviations obtained by SNPE. E-G. Application to real data from Allen Cell Type Database. Inference over 12 parameters for cell 464212183. Results presented as in A-C. Biophysical neuron models are typically fit to data with genetic algorithms applied to the distance between simulated and measured data-features [2, 8, 9, 46]. We compared the performance of SNPE with a commonly used genetic algorithm (Indicator Based Evolutionary Algorithm, IBEA, from the BluePyOpt package [9]), given the same number of model simulations (Fig. 3D). SNPE is comparable to IBEA in approximating the ground-truth parameters – note that defining an objective measure to compare the two approaches is difficult, as they both minimise different criteria. However, unlike IBEA, SNPE also returns a full posterior distribution, i.e. the space of all parameters consistent with the data, rather than just a ‘best fit’. In-vitro recordings: We also applied the approach to in vitro recordings from the mouse visual cortex (see Appendix D.4, Fig. 3E-G). The posterior mode over 12 parameters of a Hodgkin-Huxley model leads to a voltage trace which is similar to the data, and the posterior distribution shows the space of parameters for which the output of the model is preserved. These posteriors could be used to motivate further experiments for constraining parameters, or to study invariances in the model. 3.3 Dealing with bad simulations and features Bad simulations: We demonstrate our approach (see Section 2.3) for dealing with ‘bad simulations’ (e.g. for which firing rates diverge) using a simple, two-parameter ‘autapse’ model for which the region of stability is known. During SNPE, we concurrently train a classifier to predict ‘bad simulations’ and update the prior accordingly. This approach does not only lead to a more efficient use of simulations, but also identifies the parameter space for which the simulator is well-defined, information that could be used for further model analysis (Fig. 4A, B). Bad features: Many features of interest in neural models, e.g. the latency to first spike after the injection of a current input, are only well defined in the presence of other features, e.g. the presence of spikes (Fig. 4C). Given that large parts of the parameter space can lead to non-spiking behaviour, missing features occur frequently and cannot simply be ignored. We enriched our MDN with an extra layer which imputes values to the absent features, values which are optimised alongside the rest of the parameters of the network (Fig. 4D; Appendix E). Such imputation has marginal computational 7 0 50 100 time (ms) 10−1 100 101 102 103 104 rate (Hz) observed data bad simulation 0.0 1 2.0 J -1 0 2.5 τ g θ ( ) ^ 1.0 0.0 −80 −20 40 voltage (mV) 0 60 120 time (ms) 0.0 3.6 input (mA) … … … … h2 h3 hH … h1 m1(s) … c1 1-m1(s) … m2(s) f1(s) f2(s) + A B C D Figure 4: Inference on neural dynamics has to deal with diverging simulations and missing features. A. Firing rate of a model neuron connected to itself (autapse). If the strength of the selfconnection (parameter J) is bigger than 1, the dynamics are unstable (orange line - bad simulation). B. Portion of parameter space leading to diverging simulations learned by the classifier (yellow: low probability of bad simulation, blue: high probability), and comparison with analytically computed boundaries (white, see Appendix D.5). C. Illustration of a model neuron in two parameter regimes, spiking (grey trace) and non-spiking (blue). When the neuron does not spike, features that depend on the presence of spiking, such as the latency to first spike, are not defined. D. Our MDN is augmented with a multiplicative layer which imputes values for missing features. cost and grants us the convenience of not having to hand-tune imputation values, or to reject all simulations for which any individual feature might be missing. Learning features with recurrent neural networks (RNNs): In neural modelling, it is often of interest to work with hand-designed features that are thought to be particularly important or informative for particular analysis questions [2]. For instance, the shape of the action potential is intimately related to the dynamics of sodium and potassium channels in the Hodgkin-Huxley model. However, the space of possible features is immense, and given the highly non-linear nature of many of the neural models in question, it can sometimes be of interest to simply perform statistical inference without having to hand-design features. Our approach provides a straightforward means of doing that: we augment the MDN with a RNN which runs along the recorded voltage trace (and stimulus, here a coloured-noise input) to learn appropriate features to constrain the model parameters. As illustrated in figure 5B, the first layer of the network, which previously received pre-computed summary statistics as inputs, is replaced by a recurrent layer that receives full voltage and current traces as inputs. In order to capture long-term dependencies in the sequence input, we use gated-recurrent units (GRUs) for the RNN [47]. Since we are using 25 GRU units and only keep the final output of the unrolled RNN (many-to-one), we introduce a bottleneck. The RNN thus transforms the voltage trace and stimulus into a set of 25 features, which allow SNPE to recover the posterior over the 12 parameters (Fig. 5C). As expected, the presence of spikes in the observed data leads to a tighter posterior for parameters associated to the main ion channels involved in spike generation, ENa, EK, gNa and gK. 4 Discussion Quantitatively linking models of neural dynamics to data is a central problem in computational neuroscience. We showed that likelihood-free inference is at least as general and efficient as ‘blackbox’ parameter fitting approaches in neuroscience, but provides full statistical inference, suggesting it to be the method of choice for inference on single-neuron models. We argued that ABC approaches based on density estimation are particularly useful for neuroscience, and introduced a novel algorithm (SNPE) for estimating posterior distributions. We can flexibly and robustly estimate posterior distributions, even when large regions of the parameter space correspond to unstable model behaviour, or when features of choice are missing. Furthermore, we have extended our approach with RNNs to automatically define features, thus increasing the potential for better capturing salient aspects of the data with highly non-linear models. SNPE is therefore equipped to estimate posterior distributions under common constraints in neural models. Our approach directly builds on a recent approach for density estimation ABC (CDE-LFI, [19]). While we found CDE-LFI to work well on problems with unimodal, close-to-Gaussian posteriors and stable simulators, our approach extends the range of possible applications, and these extensions are critical for the application to neuron models. A key component of SNPE is the proposal prior, which guides the sampling on each round of the algorithm. Here, we used the posterior on the previous round as the proposal for the next one, as in CDE-LFI and in many Sequential-MC approaches. Our 8 −80 −20 40 voltage (mV) 60 240 0 120 240 time (ms) 0.00 2.55 input (nA) v1 GRUs i1 GRUs GRUs GRUs … v2 i2 v3 i3 vT iT … f1 f2 fN … … Features Mixture Density Network gNa gK gl ENa 60 240 −EK −El gM tmax kbn1 kbn2 VT noise A B C Figure 5: We can learn informative features using a recurrent mixture-density network (RMDN). A. We consider a neuron driven by a colored-noise input current. B. Rather than engineering summary features to reduce the dimensionality of observations, we provide the complete voltage trace and input current as input to an R-MDN. The unrolled forward pass is illustrated, where a many-to-one recurrent network reduces the dimensionality of the inputs (T time steps long) to a feature vector of dimensionality N. C. Our goal is to infer the posterior density for two different observations: (1) the full 240ms trace shown in panel A; and (2) the initial 60ms of its duration, which do not show any spike. We show the obtained marginal posterior densities for the two observations, using a 25-dimensional feature vector learned by the RNN. In the presence of spikes, the posterior uncertainty gets tighter around the true parameters related to spiking. method could be extended by alternative approaches to designing proposal priors [48, 49], e.g. by exploiting the fact that we also represent a posterior over MDN parameters: for example, one could design proposals that guide sampling towards regions of the parameter space where the uncertainty about the parameters of the posterior model is highest. We note that, while here we concentrated on models of single neurons, ABC methods and our approach will also be applicable to models of populations of neurons. Our approach will enable neuroscientists to perform Bayesian inference on complex neuron models without having to design model-specific algorithms, closing the gap between mechanistic and statistical models, and enabling theory-driven data-analysis [50]. Acknowledgements We thank Maneesh Sahani, David Greenberg and Balaji Lakshminarayanan for useful comments on the manuscript. This work was supported by SFB 1089 (University of Bonn) and SFB 1233 (University of Tübingen) of the German Research Foundation (DFG) to JHM and by the caesar foundation. References [1] W Gerstner, W M Kistler, R Naud, and L Paninski. Neuronal dynamics: From single neurons to networks and models of cognition. Cambridge University Press, 2014. [2] S Druckmann, Y Banitt, A Gidon, F Schürmann, H Markram, and I Segev. A novel multiple objective optimization framework for constraining conductance-based neuron models by experimental data. Front Neurosci, 1, 2007. [3] C van Vreeswijk and H Sompolinsky. Chaos in neuronal networks with balanced excitatory and inhibitory activity. Science, 274(5293), 1996. [4] H Markram et al. Reconstruction and Simulation of Neocortical Microcircuitry. Cell, 163(2), 2015. [5] Q J M Huys and L Paninski. Smoothing of, and parameter estimation from, noisy biophysical recordings. PLoS Comput Biol, 5(5), 2009. [6] L Meng, M A Kramer, and U T Eden. A sequential monte carlo approach to estimate biophysical neural models from spikes. J Neural Eng, 8(6), 2011. [7] C D Meliza, M Kostuk, H Huang, A Nogaret, D Margoliash, and H D I Abarbanel. Estimating parameters and predicting membrane voltages with conductance-based neuron models. Biol Cybern, 108(4), 2014. [8] C Rossant, D F M Goodman, B Fontaine, J Platkiewicz, A K Magnusson, and R Brette. Fitting neuron models to spike trains. Front Neurosci, 5:9, 2011. [9] W Van Geit, M Gevaert, G Chindemi, C Rössert, J Courcol, E B Muller, F Schürmann, I Segev, and H Markram. Bluepyopt: Leveraging open source software and cloud infrastructure to optimise model parameters in neuroscience. Front Neuroinform, 10:17, 2016. [10] A A Prinz, C P Billimoria, and E Marder. Alternative to hand-tuning conductance-based models: Construction and analysis of databases of model neurons. J Neurophysiol, 90(6), 2003. 9 [11] C Stringer, M Pachitariu, N A Steinmetz, M Okun, P Bartho, K D Harris, M Sahani, and N A Lesica. Inhibitory control of correlated intrinsic variability in cortical networks. Elife, 5, 2016. [12] Kristofor D Carlson, Jayram Moorkanikara Nageswaran, Nikil Dutt, and Jeffrey L Krichmar. An efficient automated parameter tuning framework for spiking neural networks. Front Neurosci, 8:10, 2014. doi:10.3389/fnins.2014.00010. [13] P Friedrich, M Vella, A I Gulyás, T F Freund, and S Káli. A flexible, interactive software tool for fitting the parameters of neuronal models. Frontiers in neuroinformatics, 8, 2014. [14] P J Diggle and R J Gratton. Monte carlo methods of inference for implicit statistical models. J R Stat Soc B Met, 1984. [15] F Hartig, J M Calabrese, B Reineking, T Wiegand, and A Huth. Statistical inference for stochastic simulation models–theory and application. Ecol Lett, 14(8), 2011. [16] J Lintusaari, M U Gutmann, R Dutta, S Kaski, and J Corander. Fundamentals and recent developments in approximate bayesian computation. Syst Biol, 2016. [17] Aidan C Daly, David J Gavaghan, Chris Holmes, and Jonathan Cooper. Hodgkin–huxley revisited: reparametrization and identifiability analysis of the classic action potential model with approximate bayesian methods. Royal Society open science, 2(12):150499, 2015. [18] M G B Blum and O François. Non-linear regression models for approximate bayesian computation. Stat Comput, 20(1), 2010. [19] G Papamakarios and I Murray. Fast epsilon-free inference of simulation models with bayesian conditional density estimation. In Adv in Neur In, 2017. [20] N T Carnevale and M L Hines. The NEURON Book. Cambridge University Press, 2009. [21] E Meeds, M Welling, et al. Gps-abc: Gaussian process surrogate approximate bayesian computation. UAI, 2014. [22] J K Pritchard, M T Seielstad, A Perez-Lezaun, and M W Feldman. Population growth of human y chromosomes: a study of y chromosome microsatellites. Mol Biol Evol, 16(12), 1999. [23] P Marjoram, J Molitor, V Plagnol, and S Tavare. Markov chain monte carlo without likelihoods. Proc Natl Acad Sci U S A, 100(26), 2003. [24] E Meeds, R Leenders, and M Welling. Hamiltonian abc. arXiv preprint arXiv:1503.01916, 2015. [25] M A Beaumont, J Cornuet, J Marin, and C P Robert. Adaptive approximate bayesian computation. Biometrika, 2009. [26] F V Bonassi, M West, et al. Sequential monte carlo with adaptive weights for approximate bayesian computation. Bayesian Anal, 10(1), 2015. [27] R Wilkinson. Accelerating abc methods using gaussian processes. In AISTATS, 2014. [28] S N Wood. Statistical inference for noisy nonlinear ecological dynamic systems. Nature, 466(7310), 2010. [29] V M H Ong, D J Nott, M Tran, S A Sisson, and C C Drovandi. Variational bayes with synthetic likelihood. arXiv:1608.03069, 2016. [30] Y Fan, D J Nott, and S A Sisson. Approximate bayesian computation via regression density estimation. Stat, 2(1), 2013. [31] B M Turner and P B Sederberg. A generalized, likelihood-free method for posterior estimation. Psychonomic Bulletin & Review, 21(2), 2014. [32] L F Price, C C Drovandi, A Lee, and David J N. Bayesian synthetic likelihood. J Comput Graph Stat, (just-accepted), 2017. [33] M Beaumont, W Zhang, and D J Balding. Approximate bayesian computation in population genetics. Genetics, 162(4), 2002. [34] G E Hinton and D Van Camp. Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the sixth annual conference on Computational learning theory, 1993. [35] A Graves. Practical variational inference for neural networks. In Adv Neur In, 2011. [36] D P Kingma, T Salimans, and M Welling. Neural adaptive sequential monte carlo. In Variational Dropout and the Local Reparameterization Trick, pages 2575–2583, 2015. [37] F Gerhard, M Deger, and W Truccolo. On the stability and dynamics of stochastic spiking neuron models: Nonlinear hawkes process and point process glms. PLoS Comput Biol, 13(2), 2017. [38] 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. [39] M G B Blum, M A Nunes, Ds Prangle, S A Sisson, et al. A comparative review of dimension reduction methods in approximate bayesian computation. Statistical Science, 28(2), 2013. [40] B Jiang, T Wu, Cs Zheng, and W H Wong. Learning summary statistic for approximate bayesian computation via deep neural network. arXiv preprint arXiv:1510.02175, 2015. [41] J W Pillow, J Shlens, L Paninski, A Sher, A M Litke, E J Chichilnisky, and E P Simoncelli. Spatio-temporal correlations and visual signalling in a complete neuronal population. Nature, 454(7207), 2008. [42] N G Polson, J G Scott, and J Windle. Bayesian inference for logistic models using pólya–gamma latent variables. J Am Stat Assoc, 108(504), 2013. 10 [43] S Linderman, R P Adams, and J W Pillow. Bayesian latent structure discovery from multi-neuron recordings. In Advances in Neural Information Processing Systems, 2016. [44] A L Hodgkin and A F Huxley. A quantitative description of membrane current and its application to conduction and excitation in nerve. J Physiol, 117(4), 1952. [45] M Pospischil, M Toledo-Rodriguez, C Monier, Z Piwkowska, T Bal, Y Frégnac, H Markram, and A Destexhe. Minimal hodgkin-huxley type models for different classes of cortical and thalamic neurons. Biol Cybern, 99(4-5), 2008. [46] E Hay, S Hill, F Schürmann, H Markram, and I Segev. Models of neocortical layer 5b pyramidal cells capturing a wide range of dendritic and perisomatic active properties. PLoS Comput Biol, 7(7), 2011. [47] J Chung, C Gulcehre, K H Cho, and Y Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. [48] Marko Järvenpää, Michael U Gutmann, Aki Vehtari, and Pekka Marttinen. Efficient acquisition rules for model-based approximate bayesian computation. arXiv preprint arXiv:1704.00520, 2017. [49] S Gu, Z Ghahramani, and R E Turner. Neural adaptive sequential monte carlo. In Advances in Neural Information Processing Systems, pages 2629–2637, 2015. [50] S W Linderman and S J Gershman. Using computational theory to constrain statistical models of neural data. bioRxiv, 2017. [51] G De Nicolao, G Sparacino, and C Cobelli. Nonparametric input estimation in physiological systems: problems, methods, and case studies. Automatica, 33(5), 1997. 11 | 2017 | 456 |
6,959 | ALICE: Towards Understanding Adversarial Learning for Joint Distribution Matching Chunyuan Li1, Hao Liu2, Changyou Chen3, Yunchen Pu1, Liqun Chen1, Ricardo Henao1 and Lawrence Carin1 1Duke University 2Nanjing University 3University at Buffalo cl319@duke.edu Abstract We investigate the non-identifiability issues associated with bidirectional adversarial training for joint distribution matching. Within a framework of conditional entropy, we propose both adversarial and non-adversarial approaches to learn desirable matched joint distributions for unsupervised and supervised tasks. We unify a broad family of adversarial models as joint distribution matching problems. Our approach stabilizes learning of unsupervised bidirectional adversarial learning methods. Further, we introduce an extension for semi-supervised learning tasks. Theoretical results are validated in synthetic data and real-world applications. 1 Introduction Deep directed generative models are a powerful framework for modeling complex data distributions. Generative Adversarial Networks (GANs) [1] can implicitly learn the data generating distribution; more specifically, GAN can learn to sample from it. In order to do this, GAN trains a generator to mimic real samples, by learning a mapping from a latent space (where the samples are easily drawn) to the data space. Concurrently, a discriminator is trained to distinguish between generated and real samples. The key idea behind GAN is that if the discriminator finds it difficult to distinguish real from artificial samples, then the generator is likely to be a good approximation to the true data distribution. In its standard form, GAN only yields a one-way mapping, i.e., it lacks an inverse mapping mechanism (from data to latent space), preventing GAN from being able to do inference. The ability to compute a posterior distribution of the latent variable conditioned on a given observation may be important for data interpretation and for downstream applications (e.g., classification from the latent variable) [2, 3, 4, 5, 6, 7]. Efforts have been made to simultaneously learn an efficient bidirectional model that can produce high-quality samples for both the latent and data spaces [3, 4, 8, 9, 10, 11]. Among them, the recently proposed Adversarially Learned Inference (ALI) [4, 10] casts the learning of such a bidirectional model in a GAN-like adversarial framework. Specifically, a discriminator is trained to distinguish between two joint distributions: that of the real data sample and its inferred latent code, and that of the real latent code and its generated data sample. While ALI is an inspiring and elegant approach, it tends to produce reconstructions that are not necessarily faithful reproductions of the inputs [4]. This is because ALI only seeks to match two joint distributions, but the dependency structure (correlation) between the two random variables (conditionals) within each joint is not specified or constrained. In practice, this results in solutions that satisfy ALI’s objective and that are able to produce real-looking samples, but have difficulties reconstructing observed data [4]. ALI also has difficulty discovering the correct pairing relationship in domain transformation tasks [12, 13, 14]. In this paper, (i) we first describe the non-identifiability issue of ALI. To solve this problem, we propose to regularize ALI using the framework of Conditional Entropy (CE), hence we call the proposed approach ALICE. (ii) Adversarial learning schemes are proposed to estimate the conditional 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. entropy, for both unsupervised and supervised learning paradigms. (iii) We provide a unified view for a family of recently proposed GAN models from the perspective of joint distribution matching, including ALI [4, 10], CycleGAN [12, 13, 14] and Conditional GAN [15]. (iv) Extensive experiments on synthetic and real data demonstrate that ALICE is significantly more stable to train than ALI, in that it consistently yields more viable solutions (good generation and good reconstruction), without being too sensitive to perturbations of the model architecture, i.e., hyperparameters. We also show that ALICE results in more faithful image reconstructions. (v) Further, our framework can leverage paired data (when available) for semi-supervised tasks. This is empirically demonstrated on the discovery of relationships for cross domain tasks based on image data. 2 Background Consider two general marginal distributions q(x) and p(z) over x ∈X and z ∈Z. One domain can be inferred based on the other using conditional distributions, q(z|x) and p(x|z). Further, the combined structure of both domains is characterized by joint distributions q(x, z) = q(x)q(z|x) and p(x, z) = p(z)p(x|z). To generate samples from these random variables, adversarial methods [1] provide a sampling mechanism that only requires gradient backpropagation, without the need to specify the conditional densities. Specifically, instead of sampling directly from the desired conditional distribution, the random variable is generated as a deterministic transformation of two inputs, the variable in the source domain, and an independent noise, e.g., a Gaussian distribution. Without loss of generality, we use an universal distribution approximator specification [9], i.e., the sampling procedure for conditionals ˜x ∼pθ(x|z) and ˜z ∼qφ(z|x) is carried out through the following two generating processes: ˜x = gθ(z, ϵ), z ∼p(z), ϵ ∼N(0, I), and ˜z = gφ(x, ζ), x ∼q(x), ζ ∼N(0, I), (1) where gθ(·) and gφ(·) are two generators, specified as neural networks with parameters θ and φ, respectively. In practice, the inputs of gθ(·) and gφ(·) are simple concatenations, [z ϵ] and [x ζ], respectively. Note that (1) implies that pθ(x|z) and qφ(z|x) are parameterized by θ and φ respectively, hence the subscripts. The goal of GAN [1] is to match the marginal pθ(x) = R pθ(x|z)p(z)dz to q(x). Note that q(x) denotes the true distribution of the data (from which we have samples) and p(z) is specified as a simple parametric distribution, e.g., isotropic Gaussian. In order to do the matching, GAN trains a ω-parameterized adversarial discriminator network, fω(x), to distinguish between samples from pθ(x) and q(x). Formally, the minimax objective of GAN is given by the following expression: min θ max ω LGAN(θ, ω) = Ex∼q(x)[log σ(fω(x))] + E˜x∼pθ(x|z),z∼p(z)[log(1 −σ(fω(˜x)))], (2) where σ(·) is the sigmoid function. The following lemma characterizes the solutions of (2) in terms of marginals pθ(x) and q(x). Lemma 1 ([1]) The optimal decoder and discriminator, parameterized by {θ∗, ω∗}, correspond to a saddle point of the objective in (2), if and only if pθ∗(x) = q(x). Alternatively, ALI [4] matches the joint distributions pθ(x, z) = pθ(x|z)p(z) and qφ(x, z) = q(x)qφ(z|x), using an adversarial discriminator network similar to (2), fω(x, z), parameterized by ω. The minimax objective of ALI can be then written as min θ,φ max ω LALI(θ, φ, ω) = Ex∼q(x),˜z∼qφ(z|x)[log σ(fω(x, ˜z))] + E˜x∼pθ(x|z),z∼p(z)[log(1−σ(fω(˜x, z)))]. (3) Lemma 2 ([4]) The optimum of the two generators and the discriminator with parameters {θ∗, φ∗, ω∗} form a saddle point of the objective in (3), if and only if pθ∗(x, z) = qφ∗(x, z). From Lemma 2, if a solution of (3) is achieved, it is guaranteed that all marginals and conditional distributions of the pair {x, z} match. Note that this implies that qφ(z|x) and pθ(z|x) match; however, (3) imposes no restrictions on these two conditionals. This is key for the identifiability issues of ALI described below. 3 Adversarial Learning with Information Measures The relationship (mapping) between random variables x and z is not specified or constrained by ALI. As a result, it is possible that the matched distribution π(x, z) ≜pθ∗(x, z) = qφ∗(x, z) is undesirable for a given application. 2 x2 z1 z2 x1 0 0 z1 z2 x2 x1 x2 z1 z2 x1 0 0 z1 z2 x2 x1 x2 z1 z2 x1 z1 z2 x2 x1 (a) (b) (c) δ/2 δ/2 1/2 1/2 1/2 1/2 (1−δ)/2 (1−δ)/2 Figure 1: Illustration of possible solutions to the ALI objective. The first row shows the mappings between two domains, The second row shows matched joint distribution, π(x, z), as contingency tables parameterized by δ = [0, 1]. To illustrate this issue, Figure 1 shows all solutions (saddle points) to the ALI objective on a simple toy problem. The data and latent random variables can take two possible values, X = {x1, x2} and Z = {z1, z2}, respectively. In this case, their marginals q(x) and p(z) are known, i.e., q(x = x1) = 0.5 and p(z = z1) = 0.5. The matched joint distribution, π(x, z), can be represented as a 2 × 2 contingency table. Figure 1(a) represents all possible solutions of the ALI objective in (3), for any δ ∈[0, 1]. Figures 1(b) and 1(c) represent opposite extreme solutions when δ = 1 and δ = 0, respectively. Note that although we can generate “realistic” values of x from any sample of p(z), for 0 < δ < 1, we will have poor reconstruction ability since the sequence x ∼q(x), ˜z ∼qφ(z|x), ˜x ∼pθ(x|˜z), can easily result in ˜x ̸= x. The two (trivial) exceptions where the model can achieve perfect reconstruction correspond to δ = {1, 0}, and are illustrated in Figures 1(b) and 1(c), respectively. From this simple example, we see that due to the flexibility of the joint distribution, π(x, z), it is quite likely to obtain an undesirable solution to the ALI objective. For instance, i) one with poor reconstruction ability or ii) one where a single instance of z can potentially map to any possible value in X, e.g., in Figure 1(a) with δ = 0.5, z1 can generate either x1 or x2 with equal probability. Many applications require meaningful mappings. Consider two scenarios: • A1: In unsupervised learning, one desirable property is cycle-consistency [12], meaning that the inferred z of a corresponding x, can reconstruct x itself with high probability. In Figure 1 this corresponds to either δ →1 or δ →0, as in Figures 1(b) and 1(c). • A2: In supervised learning, the pre-specified correspondence between samples imposes restrictions on the mapping between x and z, e.g., in image tagging, x are images and z are tags. In this case, paired samples from the desired joint distribution are usually available, thus we can leverage this supervised information to resolve the ambiguity between Figure 1(b) and (c). From our simple example in Figure 1, we see that in order to alleviate the identifiability issues associated with the solutions to the ALI objective, we have to impose constraints on the conditionals qφ(z|x) and pθ(z|x). Furthermore, to fully mitigate the identifiability issues we require supervision, i.e., paired samples from domains X and Z. To deal with the problem of undesirable but matched joint distributions, below we propose to use an information-theoretic measure to regularize ALI. This is done by controlling the “uncertainty” between pairs of random variables, i.e., x and z, using conditional entropies. 3.1 Conditional Entropy Conditional Entropy (CE) is an information-theoretic measure that quantifies the uncertainty of random variable x when conditioned on z (or the other way around), under joint distribution π(x, z): Hπ(x|z) ≜−Eπ(x,z)[log π(x|z)], and Hπ(z|x) ≜−Eπ(x,z)[log π(z|x)]. (4) The uncertainty of x given z is linked with Hπ(x|z); in fact, Hπ(x|z) = 0 if only if x is a deterministic mapping of z. Intuitively, by controlling the uncertainty of qφ(z|x) and pθ(z|x), we can restrict the solutions of the ALI objective to joint distributions whose mappings result in better reconstruction ability. Therefore, we propose to use the CE in (4), denoted as Lπ CE(θ, φ) = Hπ(x|z) or Hπ(z|x) (depending on the task; see below), as a regularization term in our framework, termed ALI with Conditional Entropy (ALICE), and defined as the following minimax objective: min θ,φ max ω LALICE(θ, φ, ω) = LALI(θ, φ, ω) + Lπ CE(θ, φ). (5) Lπ CE(θ, φ) is dependent on the underlying distributions for the random variables, parametrized by (θ, φ), as made clearer below. Ideally, we could select the desirable solutions of (5) by evaluating their CE, once all the saddle points of the ALI objective have been identified. However, in practice, Lπ CE(θ, φ) is intractable because we do not have access to the saddle points beforehand. Below, we propose to approximate the CE in (5) during training for both unsupervised and supervised tasks. Since x and z are symmetric in terms of CE according to (4), we use x to derive our theoretical results. Similar arguments hold for z, as discussed in the Supplementary Material (SM). 3 3.2 Unsupervised Learning In the absence of explicit probability distributions needed for computing the CE, we can bound the CE using the criterion of cycle-consistency [12]. We denote the reconstruction of x as ˆx, via generating procedure (cycle) ˆx ∼pθ(ˆx|z), z ∼qφ(z|x), x ∼q(x). We desire that pθ(ˆx|z) have high likelihood for ˆx = x, for the x ∼q(x) that begins the cycle x →z →ˆx, and hence that ˆx be similar to the original x. Lemma 3 below shows that cycle-consistency is an upper bound of the conditional entropy in (4). Lemma 3 For joint distributions pθ(x, z) or qφ(x, z), we have Hqφ(x|z) ≜−Eqφ(x,z)[log qφ(x|z)] = −Eqφ(x,z)[log pθ(x|z)] −Eqφ(z)[KL(qφ(x|z)∥pθ(x|z))] ≤−Eqφ(x,z)[log pθ(x|z)] ≜LCycle(θ, φ). (6) where qφ(z) = R dxqφ(x, z). The proof is in the SM. Note that latent z is implicitly involved in LCycle(θ, φ) via Eqφ(x,z)[·]. For the unsupervised case we want to leverage (6) to optimize the following upper bound of (5): min θ,φ max ω LALI(θ, φ, ω) + LCycle(θ, φ) . (7) Note that as ALI reaches its optimum, pθ(x, z) and qφ(x, z) reach saddle point π(x, z), then LCycle(θ, φ) →Hqφ(x|z) →Hπ(x|z) in (4) accordingly, thus (7) effectively approaches (5) (ALICE). Unlike Lπ CE(θ, φ) in (4), its upper bound, LCycle(θ, φ), can be easily approximated via Monte Carlo simulation. Importantly, (7) can be readily added to ALI’s objective without additional changes to the original training procedure. The cycle-consistency property has been previously leveraged in CycleGAN [12], DiscoGAN [13] and DualGAN [14]. However, in [12, 13, 14], cycle-consistency, LCycle(θ, φ), is implemented via ℓk losses, for k = 1, 2, and real-valued data such as images. As a consequence of an ℓ2-based pixel-wise loss, the generated samples tend to be blurry [8]. Recognizing this limitation, we further suggest to enforce cycle-consistency (for better reconstruction) using fully adversarial training (for better generation), as an alternative to LCycle(θ, φ) in (7). Specifically, to reconstruct x, we specify an η-parameterized discriminator fη(x, ˆx) to distinguish between x and its reconstruction ˆx: min θ,φ max η LA Cycle(θ, φ, η) = Ex∼q(x)[log σ(fη(x, x))] + Eˆx∼pθ(ˆx|z),z∼qφ(z|x) log(1 −σ(fη(x, ˆx)))]. (8) Finally, the fully adversarial training algorithm for unsupervised learning using the ALICE framework is the result of replacing LCycle(θ, φ) with LA Cycle(θ, φ, η) in (7); thus, for fixed (θ, φ), we maximize wrt {ω, η}. The use of paired samples {x, ˆx} in (8) is critical. It encourages the generators to mimic the reconstruction relationship implied in the first joint; on the contrary, the model may reduce to the basic GAN discussed in Section 3, and generate any realistic sample in X. The objective in (8) enjoys many theoretical properties of GAN. Particularly, Proposition 1 guarantees the existence of the optimal generator and discriminator. Proposition 1 The optimal generators and discriminator {θ∗, φ∗, η∗} of the objective in (8) is achieved, if and only if Eqφ∗(z|x)pθ∗(ˆx|z) = δ(x −ˆx). The proof is provided in the SM. Together with Lemma 2 and 3, we can also show that: Corollary 1 When cycle-consistency is satisfied (the optimum in (8) is achieved), (i) a deterministic mapping enforces Eqφ(z)[KL(qφ(x|z)∥pθ(x|z))] = 0, which indicates the conditionals are matched. (ii) On the contrary, the matched conditionals enforce Hqφ(x|z) = 0, which indicates the corresponding mapping becomes deterministic. 3.3 Semi-supervised Learning When the objective in (7) is optimized in an unsupervised way, the identifiability issues associated with ALI are largely reduced due to the cycle-consistency-enforcing bound in Lemma 3. This means that samples in the training data have been probabilistically “paired” with high certainty, by conditionals pθ(x|z) and pφ(z|x), though perhaps not in the desired configuration. In realworld applications, obtaining correctly paired data samples for the entire dataset is expensive or 4 even impossible. However, in some situations obtaining paired data for a very small subset of the observations may be feasible. In such a case, we can leverage the small set of empirically paired samples, to further provide guidance on selecting the correct configuration. This suggests that ALICE is suitable for semi-supervised classification. For a paired sample drawn from empirical distribution ˜π(x, z), its desirable joint distribution is well specified. Thus, one can directly approximate the CE as H ˜π(x|z) ≈E˜π(x,z)[log pθ(x|z)] ≜LMap(θ) , (9) where the approximation (≈) arises from the fact that pθ(x|z) is an approximation to ˜π(x|z). For the supervised case we leverage (9) to approximate (5) using the following minimax objective: min θ,φ max ω LALI(θ, φ, ω) + LMap(θ). (10) Note that as ALI reaches its optimum, pθ(x, z) and qφ(x, z) reach saddle point π(x, z), then LMap(θ) →H ˜π(x|z) →Hπ(x|z) in (4) accordingly, thus (10) approaches (5) (ALICE). We can employ standard losses for supervised learning objectives to approximate LMap(θ) in (10), such as cross-entropy or ℓk loss in (9). Alternatively, to also improve generation ability, we propose an adversarial learning scheme to directly match pθ(x|z) to the paired empirical conditional ˜π(x|z), using conditional GAN [15] as an alternative to LMap(θ) in (10). The χ-parameterized discriminator fχ is used to distinguish the true pair {x, z} from the artificially generated one {ˆx, z} (conditioned on z), using min θ max χ LA Map(θ, χ) = Ex,z∼˜π(x,z)[log σ(fχ(x, z)) + Eˆx∼pθ(ˆx|z) log(1 −σ(fχ(ˆx, z)))]. (11) The fully adversarial training algorithm for supervised learning using the ALICE in (11) is the result of replacing LMap(θ) with LA Map(θ, χ) in (10), thus for fixed (θ, φ) we maximize wrt {ω, χ}. Proposition 2 The optimum of generators and discriminator {θ∗, χ∗} form saddle points of objective in (11), if and only if ˜π(x|z) = pθ∗(x|z) and ˜π(x, z) = pθ∗(x, z). The proof is provided in the SM. Proposition 2 enforces that the generator will map to the correctly paired sample in the other space. Together with the theoretical result for ALI in Lemma 2, we have Corollary 2 When the optimum in (10) is achieved, ˜π(x, z) = pθ∗(x, z) = qφ∗(x, z). Corollary 2 indicates that ALI’s drawbacks associated with identifiability issues can be alleviated for the fully supervised learning scenario. Two conditional GANs can be used to boost the perfomance, each for one direction mapping. When tying the weights of discriminators of two conditional GANs, ALICE recovers Triangle GAN [16]. In practice, samples from the paired set ˜π(x, z) often contain enough information to readily approximate the sufficient statistics of the entire dataset. In such case, we may use the following objective for semi-supervised learning: min θ,φ max ω LALI(θ, φ, ω) + LCycle(θ, φ) + LMap(θ) . (12) The first two terms operate on the entire set, while the last term only applies to the paired subset. Note that we can train (12) fully adversarially by replacing LCycle(θ, φ) and LMap(θ) with LA Cycle(θ, φ, η) and LA Map(θ, χ) in (8) and (11), respectively. In (12) each of the three terms are treated with equal weighting in the experiments if not specificially mentioned, but of course one may introduce additional hyperparameters to adjust the relative emphasis of each term. 4 Related Work: A Unified Perspective for Joint Distribution Matching Connecting ALI and CycleGAN. We provide an information theoretical interpretation for cycleconsistency, and show that it is equivalent to controlling conditional entropies and matching conditional distributions. When cycle-consistency is satisfied, Corollary 1 shows that the conditionals are matched in CycleGAN. They also train additional discriminators to guarantee the matching of marginals for x and z using the original GAN objective in (2). This reveals the equivalence between ALI and CycleGAN, as the latter can also guarantee the matching of joint distributions pθ(x, z) and qφ(x, z). In practice, CycleGAN is easier to train, as it decomposes the joint distribution matching objective (as in ALI) into four subproblems. Our approach leverages a similar idea, and further improves it with adversarially learned cycle-consistency, when high quality samples are of interest. 5 (a) True x (b) True z (c) Inception Score (d) MSE Figure 2: Quantitative evaluation of generation (c) and reconstruction (d) results on toy data (a,b). Stochastic Mapping vs. Deterministic Mapping. We propose to enforce the cycle-consistency in ALI for the case when two stochastic mappings are specified as in (1). When cycle-consistency is achieved, Corollary 1 shows that the bounded conditional entropy vanishes, and thus the corresponding mapping reduces to be deterministic. In the literture, one deterministic mapping has been empirically tested in ALI’s framework [4], without explicitly specifying cycle-consistency. BiGAN [10] uses two deterministic mappings. In theory, deterministic mappings guarantee cycle-consistency in ALI’s framework. However, to achieve this, the model has to fit a delta distribution (deterministic mapping) to another distribution in the sense of KL divergence (see Lemma 3). Due to the asymmetry of KL, the cost function will pay extremely low cost for generating fake-looking samples [17]. This explains the underfitting reasoning in [4] behind the subpar reconstruction ability of ALI. Therefore, in ALICE, we explicitly add a cycle-consistency regularization to accelerate and stabilize training. Conditional GANs as Joint Distribution Matching. Conditional GAN and its variants [15, 18, 19, 20] have been widely used in supervised tasks. Our scheme to learn conditional entropy borrows the formulation of conditional GAN [15]. To the authors’ knowledge, this is the first attempt to study the conditional GAN formulation as joint distribution matching problem. Moreover, we add the potential to leverage the well-defined distribution implied by paired data, to resolve the ambiguity issues of unsupervised ALI variants [4, 10, 12, 13, 14]. 5 Experimental Results The code to reproduce these experiments is at https://github.com/ChunyuanLI/ALICE 5.1 Effectiveness and Stability of Cycle-Consistency To highlight the role of the CE regularization for unsupervised learning, we perform an experiment on a toy dataset. q(x) is a 2D Gaussian Mixture Model (GMM) with 5 mixture components, and p(z) is chosen as a standard Gaussian, N(0, I). Following [4], the covariance matrices and centroids are chosen such that the distribution exhibits severely separated modes, which makes it a relatively hard task despite its 2D nature. Following [21], to study stability, we run an exhaustive grid search over a set of architectural choices and hyper-parameters, 576 experiments for each method. We report Mean Squared Error (MSE) and inception score (denoted as ICP) [22] to quantitatively evaluate the performance of generative models. MSE is a proxy for reconstruction quality, while ICP reflects the plausibility and variety of sample generation. Lower MSE and higher ICP indicate better results. See SM for the details of the grid search and the calculation of ICP. We train on 2048 samples, and test on 1024 samples. The ground-truth test samples for x and z are shown in Figure 2(a) and (b), respectively. We compare ALICE, ALI and Denoising Auto-Encoders (DAEs) [23], and report the distribution of ICP and MSE values, for all (576) experiments in Figure 2 (c) and (d), respectively. For reference, samples drawn from the “oracle” (ground-truth) GMM yield ICP=4.977±0.016. ALICE yields an ICP larger than 4.5 in 77% of experiments, while ALI’s ICP wildly varies across different runs. These results demonstrate that ALICE is more consistent and quantitatively reliable than ALI. The DAE yields the lowest MSE, as expected, but it also results in the weakest generation ability. The comparatively low MSE of ALICE demonstrates its acceptable reconstruction ability compared to DAE, though a very significantly improvement over ALI. Figure 3 shows the qualitative results on the test set. Since ALI’s results vary largely from trial to trial, we present the one with highest ICP. In the figure, we color samples from different mixture components to highlight their correspondance between the ground truth, in Figure 2(a), and their reconstructions, in Figure 3 (first row, columns 2, 4 and 6, for ALICE, ALI and DAE, respectively). Importantly, though the reconstruction of ALI can recover the shape of manifold in x (Gaussian mixture), each individual reconstructed sample can be substantially far away from its “original” mixture component (note the highly mixed coloring), hence the poor MSE. This occurs because the adversarial training in ALI only requires that the generated samples look realistic, i.e., to be located 6 (a) ALICE (b) ALI (c) DAEs Figure 3: Qualitative results on toy data. Two-column blocks represent the results of each method, with left for z and right for x. For the first row, left is sampling of z, and right is reconstruction of x. Colors indicate mixture component membership. The second row shows reconstructions, x, from linearly interpolated samples in z. near true samples in X, but the mapping between observed and latent spaces (x →z and z →x) is not specified. In the SM we also consider ALI with various combinations of stochastic/deterministic mappings, and conclude that models with deterministic mappings tend to have lower reconstruction ability but higher generation ability. In terms of the estimated latent space, z, in Figure 3 (first row, columns 1, 3 and 5, for ALICE, ALI and DAE, respectively), we see that ALICE results in a better latent representation, in the sense of mapping consistency (samples from different mixture components remain clustered) and distribution consistency (samples approximate a Gaussian distribution). The results for reconstruction of z and sampling of x are shown in the SM. In Figure 3 (second row), we also investigate latent space interpolation between a pair of test set examples. We use x1 = [−2.2, −2.2] and x9 = [2.2, 2.2], map them into z1 and z9, linearly interpolate between z1 and z9 to get intermediate points z2, . . . , z8, and then map them back to the original space as x2, . . . , x8. We only show the index of the samples for better visualization. Figure 3 shows that ALICE’s interpolation is smooth and consistent with the ground-truth distributions. Interpolation using ALI results in realistic samples (within mixture components), but the transition is not order-wise consistent. DAEs provides smooth transitions, but the samples in the original space look unrealistic as some of them are located in low probability density regions of the true model. We investigate the impact of different amount of regularization on three datasets, including the toy dataset, MNIST and CIFAR-10 in SM Section D. The results show that our regularizer can improve image generation and reconstruction of ALI for a large range of weighting hyperparameter values. 5.2 Reconstruction and Cross-Domain Transformation on Real Datasets Two image-to-image translation tasks are considered. (i) Car-to-Car [24]: each domain (x and z) includes car images in 11 different angles, on which we seek to demonstrate the power of adversarially learned reconstruction and weak supervision. (ii) Edge-to-Shoe [25]: x domain consists of shoe photos and z domain consists of edge images, on which we report extensive quantitative comparisons. Cycle-consistency is applied on both domains. The goal is to discover the cross-domain relationship (i.e., cross-domain prediction), while maintaining reconstruction ability on each domain. Adversarially learned reconstruction To demonstrate the effectiveness of our fully adversarial scheme in (8) (Joint A.) on real datasets, we use it in place of the ℓ2 losses in DiscoGAN [13]. In practice, feature matching [22] is used to help the adversarial objective in (8) to reach its optimum. We also compared with a baseline scheme (Marginal A.) in [12], which adversarially discriminates between x and its reconstruction ˆx. Inputs `2 BiGAN Joint A. Marginal A. loss 2 4 6 8 10 Number of Paired Angles 20 40 60 80 Classification Accuracy (%) ALICE (10% sup.) ALICE (1% sup.) DiscoGAN BiGAN (a) Reconstruction (b) Prediction Figure 4: Results on Car-to-Car task. The results are shown in Figure 4 (a). From top to bottom, each row shows ground-truth images, DiscoGAN (with Joint A., ℓ2 loss and Marginal A. schemes, respectively) and BiGAN [10]. Note that BiGAN is the best ALI variant in our grid search compasion. The proposed Joint A. scheme can retain the same crispness characteristic to adversariallytrained models, while ℓ2 tends to be blurry. Marginal A. provides realistic car images, but not faithful reproductions of the inputs. This explains 7 BiGAN BiGAN
Lcycle+`2 Lcycle+`A (a) Cross-domain transformation (b) Reconstruction (c) Generated edges Figure 5: SSIM and generated images on Edge-to-Shoe dataset. the observations in [12] in terms of no performance gain. The BiGAN learns the shapes of cars, but misses the textures. This is a sign of underfitting, thus indicating BiGAN is not easy to train. Weak supervision The DiscoGAN and BiGAN are unsupervised methods, and exhibit very different cross-domain pairing configurations during different training epochs, which is indicative of nonidentifiability issues. We leverage very weak supervision to help with convergence and guide the pairing. The results on shown in Figure 4 (b). We run each methods 5 times, the width of the colored lines reflect the standard deviation. We start with 1% true pairs for supervision, which yields significantly higher accuracy than DiscoGAN/BiGAN. We then provided 10% supervison in only 2 or 6 angles (of 11 total angles), which yields comparable angle prediction accuracy with full angle supervison in testing. This shows ALICE’s ability in terms of zero-shot learning, i.e., predicting unseen pairs. In the SM, we show that enforcing different weak supervision strategies affects the final pairing configurations, i.e., we can leverage supervision to obtain the desirable joint distribution. Quantitative comparison To quantitatively assess the generated images, we use structural similarity (SSIM) [26], which is an established image quality metric that correlates well with human visual perception. SSIM values are between [0, 1]; higher is better. The SSIM of ALICE on prediction and reconstruction is shown in Figure 5 (a)(b) for the edge-to-shoe task. As a baseline, we set DiscoGAN with ℓ2-based supervision (ℓ2-sup). BiGAN/ALI, highlighted with a circle is outperformed by ALICE in two aspects: (i) In the unpaired setting (0% supervision), cycle-consistency regularization (LCycle) shows significant performance gains, particularly on reconstruction. (ii) When supervision is leveraged (10%), SSIM is significantly increased on prediction. The adversarial-based supervision (ℓA-sup) shows higher prediction than ℓ2-sup. ALICE achieves very similar performance with the 50% and full supervision setup, indicating its advantage of in semi-supervised learning. Several generated edge images (with 50% supervision) are shown in Figure 5(c), ℓA-sup tends to provide more details than ℓ2-sup. Both methods generate correct paired edges, and quality is higher than BiGAN and DiscoGAN. In the SM, we also report MSE metrics, and results on edge domain only, which are consistent with the results presented here. One-side cycle-consistency When uncertainty in one domain is desirable, we consider one-side cycle-consistency. This is demonstrated on the CelebA face dataset [27]. Each face is associated with a 40-dimensional attribute vector. The results are in the Figure 8 of SM. In the first task, we consider the images x are generated from a 128-dimensional Gaussian latent space z, and apply LCycle on x. We compare ALICE and ALI on reconstruction in Figure 8 (a)(b). ALICE shows more faithful reproduction of the input subjects. In the second task, we consider z as the attribute space, from which the images x are generated. The mapping from x to z is then attribute classification. We only apply LCycle on the attribute domain, and LA Map on both domains. When 10% paired samples are considered, the predicted attributes still reach 86% accuracy, which is comparable with the fully supervised case. To test the diversity on x, we first predict the attributes of a true face image, and then generated multiple images conditioned on the predicted attributes. Four examples are shown in Figure 8 (c). 6 Conclusion We have studied the problem of non-identifiability in bidirectional adversarial networks. A unified perspective of understanding various GAN models as joint matching is provided to tackle this problem. This insight enables us to propose ALICE (with both adversarial and non-adversarial solutions) to reduce the ambiguity and control the conditionals in unsupervised and semi-supervised learning. For future work, the proposed view can provide opportunities to leverage the advantages of each model, to advance joint-distribution modeling. 8 Acknowledgements We acknowledge Shuyang Dai, Chenyang Tao and Zihang Dai for helpful feedback/editing. This research was supported in part by ARO, DARPA, DOE, NGA, ONR and NSF. References [1] 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. [2] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [3] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel. InfoGAN: Interpretable representation learning by information maximizing generative adversarial nets. In NIPS, 2016. [4] V. Dumoulin, I. Belghazi, B. Poole, A. Lamb, M. A., O. Mastropietro, and A. Courville. Adversarially learned inference. ICLR, 2017. [5] L. Mescheder, S. Nowozin, and A. Geiger. Adversarial variational bayes: Unifying variational autoencoders and generative adversarial networks. ICML, 2017. [6] Y. Pu, Z. Gan, R. Henao, X. Yuan, C. Li, A. Stevens, and L. Carin. Variational autoencoder for deep learning of images, labels and captions. In NIPS, 2016. [7] Y. Pu, Z. Gan, R. Henao, C. Li, S. Han, and L. Carin. Vae learning via Stein variational gradient descent. NIPS, 2017. [8] A. B. L. Larsen, S. K. Sønderby, H. Larochelle, and O. Winther. Autoencoding beyond pixels using a learned similarity metric. ICML, 2016. [9] A. Makhzani, J. Shlens, N. Jaitly, I. Goodfellow, and B. Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015. [10] J. Donahue, K. Philipp, and T. Darrell. Adversarial feature learning. ICLR, 2017. [11] Y. Pu, W. Wang, R. Henao, L. Chen, Z. Gan, C. Li, and L. Carin. Adversarial symmetric variational autoencoder. NIPS, 2017. [12] J. Zhu, T. Park, P. Isola, and A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. ICCV, 2017. [13] T. Kim, M. Cha, H. Kim, J. Lee, and J. Kim. Learning to discover cross-domain relations with generative adversarial networks. ICML, 2017. [14] Z. Yi, H. Zhang, and P. Tan. DualGAN: Unsupervised dual learning for image-to-image translation. ICCV, 2017. [15] M. Mirza and S. Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. [16] Z. Gan, L. Chen, W. Wang, Y. Pu, Y. Zhang, H. Liu, C. Li, and L. Carin. Triangle generative adversarial networks. NIPS, 2017. [17] M. Arjovsky and L. Bottou. Towards principled methods for training generative adversarial networks. In ICLR, 2017. [18] S. Reed, Z. Akata, X. Yan, L. Logeswaran, B. Schiele, and H. Lee. Generative adversarial text to image synthesis. In ICML, 2016. [19] P. Isola, J. Zhu, T. Zhou, and A. Efros. Image-to-image translation with conditional adversarial networks. CVPR, 2017. [20] C. Li, K. Xu, J. Zhu, and B. Zhang. Triple generative adversarial nets. NIPS, 2017. [21] J. Zhao, M. Mathieu, and Y. LeCun. Energy-based generative adversarial network. ICLR, 2017. [22] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training GANs. In NIPS, 2016. [23] P. Vincent, H. Larochelle, Y. Bengio, and P. Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008. [24] S. Fidler, S. Dickinson, and R. Urtasun. 3D object detection and viewpoint estimation with a deformable 3D cuboid model. In NIPS, 2012. [25] A. Yu and K. Grauman. Fine-grained visual comparisons with local learning. In CVPR, 2014. [26] Z. Wang, A. C Bovik, H. R Sheikh, and E. P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE trans. on Image Processing, 2004. [27] Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In ICCV, 2015. 9 | 2017 | 457 |
6,960 | Speeding Up Latent Variable Gaussian Graphical Model Estimation via Nonconvex Optimization Pan Xu Department of Computer Science University of Virginia Charlottesville, VA 22904 px3ds@virginia.edu Jian Ma School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 jianma@cs.cmu.edu Quanquan Gu Department of Computer Science University of Virginia Charlottesville, VA 22904 qg5w@virginia.edu Abstract We study the estimation of the latent variable Gaussian graphical model (LVGGM), where the precision matrix is the superposition of a sparse matrix and a low-rank matrix. In order to speed up the estimation of the sparse plus low-rank components, we propose a sparsity constrained maximum likelihood estimator based on matrix factorization, and an efficient alternating gradient descent algorithm with hard thresholding to solve it. Our algorithm is orders of magnitude faster than the convex relaxation based methods for LVGGM. In addition, we prove that our algorithm is guaranteed to linearly converge to the unknown sparse and low-rank components up to the optimal statistical precision. Experiments on both synthetic and genomic data demonstrate the superiority of our algorithm over the state-ofthe-art algorithms and corroborate our theory. 1 Introduction For a d-dimensional Gaussian graphical model (i.e., multivariate Gaussian distribution) N(0, ⌃⇤), the inverse of covariance matrix ⌦⇤= (⌃⇤)−1 (also known as the precision matrix or concentration matrix) measures the conditional dependence relationship between marginal random variables [19]. When the number of observations is comparable to the ambient dimension of the Gaussian graphical model, additional structural assumptions are needed for consistent estimation. Sparsity is one of the most common structures imposed on the precision matrix in Gaussian graphical models (GGM), because it gives rise to a sparse graph, which characterizes the conditional dependence of the marginal variables. The problem of estimating the sparse precision matrix in Gaussian graphical models has been studied by a large body of literature [23, 29, 12, 28, 6, 34, 37, 38, 33]. However, the real world data may not follow a sparse GGM, especially when some of the variables are unobservable. To alleviate this problem, the latent variable Gaussian graphical model (LVGGM) [9, 24] has been studied, where the precision matrix of the observed variables is conditionally sparse given the latent variables (i.e., unobserved) , but marginally not sparse. It is well-known that in LVGGM, the precision matrix ⌦⇤can be represented as the superposition of a sparse matrix S⇤and a low-rank matrix L⇤, where the latent variables contribute to the low rank component in the precision matrix. In other words, we have ⌦⇤= S⇤+ L⇤. In the learning problem of LVGGM, the goal is to estimate both the unknown sparse component S⇤and the low-rank component L⇤of the precision matrix simultaneously. In the seminal work, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Chandrasekaran et al. [9] proposed a maximum-likelihood estimator based on `1 norm penalty on the sparse matrix and nuclear norm penalty on the low-rank matrix, and proved the model selection consistency for LVGGM estimation. Meng et al. [24] studied a similar penalized estimator, and derived Frobenius norm error bounds based on the restricted strong convexity [26] and the structural Fisher incoherence condition between the sparse and low-rank components. Both of these two methods for LVGGM estimation are based on a penalized convex optimization problem, which can be solved by log-determinant proximal point algorithm [32] and alternating direction method of multipliers [22]. Due to the nuclear norm penalty, these convex optimization algorithms need to do full singular value decomposition (SVD) to solve the proximal mapping of nuclear norm at each iteration, which results in an extremely high time complexity of O(d3). When d is large as often in the high dimensional setting, the convex relaxation based methods are computationally intractable. It is worth noting that full SVD cannot be accelerated by power method [13] or other randomized SVD algorithms [15], hence the O(d3) is unavoidable whenever nuclear norm regularization is employed. In this paper, in order to speed up learning LVGGM, we propose a novel sparsity constrained maximum likelihood estimator for LVGGM based on matrix factorization. Specifically, inspired by the recent work on matrix factorization [18, 16, 44, 45, 11, 30], we propose to reparameterize the low-rank component L in the precision matrix as the product of smaller matrices, i.e., L = ZZ>, where Z 2 Rd⇥r and r d is the number of latent variables. This factorization captures the intrinsic low-rank structure of L, and automatically ensures its low-rankness. We propose an alternating gradient descent with hard thresholding to solve the new estimator. We prove that the output of our algorithm is guaranteed to linearly converge to the unknown parameters up to the statistical precision. In detail, our algorithm enjoys O(d2r) per-iteration time complexity, which outperforms the O(d3) per-iteration complexity of state-of-the-art LVGGM estimators based on nuclear norm penalty [9, 22, 24]. In addition, the estimators from our algorithm for LVGGM attain max{Op( p s⇤log d/n), Op( p rd/n)} statistical rate of convergence in terms of Frobenius norm, where s⇤is the conditional sparsity of the precision matrix (i.e., sparsity of S⇤), and r is the number of latent variables (i.e., rank of L⇤). This matches the minimax optimal convergence rate for LVGGM estimation [9, 1, 24]. Thorough experiments on both synthetic and breast cancer genomic datasets show that our algorithm is orders of magnitude faster than existing methods. It is also worth noting that, although our estimator and algorithm is designed for LVGGM, it is directly applicable to the Gaussian graphical model where the precision matrix is the sum of a sparse matrix and a low-rank matrix. And the theoretical guarantees of our algorithm still hold. The remainder of this paper is organized as follows: In Section 2, we briefly review existing work that is relevant to our study. We present our estimator and algorithm in detail in Section 3, and the main theory in Section 4. In Section 5, we compare the proposed algorithm with the state-of-the-art algorithms on both synthetic data and real-world breast cancer data. Finally, we conclude this paper in Section 6. Notation For matrices A, B with commensurate dimensions, we use hA, Bi = tr(A>B) to denote their inner product and A ⌦B denote their Kronecker product. For a matrix A 2 Rd⇥d, we denote its (ordered) singular values by σ1(A) ≥σ2(A) ≥. . . ≥σd(A) ≥0. We denote by A−1 the inverse of A, and denote by |A| its determinant. We use the notation k · k for various types of matrix norms, including the spectral norm kAk2 and the Frobenius norm kAkF . We also use the following norms kAk0,0 = P i,j 1(Aij 6= 0), kAk1,1 = max1i,jd |Aij|, and kAk1,1 = Pd i,j=1 |Aij|. A constant is called absolute constant if it does not depend on the parameters of the problem, e.g., dimension and sample size. We denote a . b if a is less than b up to a constant. 2 Additional Related Work Precision matrix estimation in sparse Gaussian graphical models (GGM) is commonly formulated as a penalized maximum likelihood estimation problem with `1,1 norm regularization [12, 29, 28] (graphical Lasso) or regularization on diagonal elements of Cholesky decomposition for precision matrix [17]. Due to the complex dependency among marginal variables in many applications, sparsity assumption on the precision matrix often does not hold. To relax this assumption, the conditional Gaussian graphical model (cGGM) was proposed in [41, 5] and the partial Gaussian graphical model (pGGM) was proposed in [42], both of which impose blockwise sparsity on the precision matrix and estimate multiple blocks therein. Despite a good interpretation of these models, they need to access both the observed variables as well as the latent variables for estimation. Another alternative 2 is the latent variable Gaussian graphical model (LVGGM), which was proposed in [9], and later investigated in [22, 24]. Compared with cGGM and pGGM, the estimation of LVGGM does not need to access the latent variables and therefore is more flexible. Another line of research related to ours is low-rank matrix estimation based on alternating minimization and gradient descent [18, 16, 44, 45, 11, 30, 3, 35, 43]. However, extending them to low-rank and sparse matrix estimation as in LVGGM turns out to be highly nontrivial. The most related work to ours includes [14] and [40], which studied nonconvex optimization for low-rank plus sparse matrix estimation. However, they are limited to robust PCA [8] and multi-task regression [1] in the noiseless setting. Due to the square loss in RPCA, the sparse matrix S can be calculated by subtracting the low-rank matrix L from the observed data matrix. Nevertheless, in LVGGM, there is no closed-form solution for the sparse matrix due to the log-determinant term, and we need to use gradient descent to update S. On the other hand, both the algorithm in [40] and our algorithm have an initialization stage. Yet our initialization algorithm is new and different from the initialization algorithm in [40] for RPCA. Furthermore, our analysis of the initialization algorithm is built on the spikiness condition, which is also different from that for RPCA. The last but not least related work is expectation maximization (EM) algorithm [2, 36], which shares a similar bivariate structure as our estimator. However, the proof technique used in [2, 36] is not directly applicable to our algorithm, due to the matrix factorization structure in our estimator. Moreover, to overcome the dependency issue between consecutive iterations in the proof, sample splitting strategy [18, 16] was employed in [2, 36, 39], i.e., dividing the whole dataset into T pieces and using a fresh piece of data in each iteration. Unfortunately, the sample splitting technique results in a suboptimal statistical rate, incurring an extra factor of p T in the rate. In sharp contrast, our proof technique does not rely on sample splitting, because we are able to prove a uniform convergence result over a small neighborhood of the unknown parameters, which directly resolves the dependency issue. 3 The Proposed Estimator and Algorithm In this section, we present a new estimator for LVGGM estimation, together with a new algorithm. 3.1 Latent Variable GGMs Let XO be the d-dimensional random vector with observed variables and XL be the r-dimensional random vector with latent variables. We assume that the concatenated random vector X = (X> O, X> L )> follows a multivariate Gaussian distribution with covariance matrix e⌃and sparse precision matrix e⌦= e⌃−1. It is proved in [10] that the observed data XO follows a normal distribution with marginal covariance matrix ⌃⇤= e⌃OO, which is the top-left block matrix in e⌃ corresponding to XO. The precision matrix of XO is then given by Schur complement [13]: ⌦⇤= (e⌃OO)−1 = e⌦OO −e⌦OL e⌦−1 LL e⌦LO. (3.1) Since we can only observe XO, the marginal precision matrix ⌦⇤is generally not sparse. We define S⇤:= e⌦OO and L⇤:= −e⌦OL e⌦−1 LL e⌦LO. Then S⇤is sparse due to the sparsity of e⌦. We do not impose any dependency restriction on XO and XL, and thus the matrices e⌦OL and e⌦LO can be potentially dense. We assume that the number of latent variables is smaller than that of the observed. Therefore, L⇤is low-rank and may be dense. Thus, the precision matrix of LVGGM can be written as ⌦⇤= S⇤+ L⇤, (3.2) where kS⇤k0,0 = s⇤and rank(L⇤) = r. We refer to [9] for a detailed discussion of LVGGM. 3.2 The Proposed Estimator Suppose that we observe i.i.d. samples X1, . . . , Xn from N(0, ⌃⇤). Our goal is to estimate the sparse component S⇤and the low-rank component L⇤of the unknown precision matrix ⌦⇤in (3.2). The negative log-likelihood of the Gaussian graphical model is proportional to the following sample loss function up to a constant pn(S, L) = tr ⇥b⌃ & S + L '⇤ −log |S + L|, (3.3) where b⌃= 1/n Pn i=1 XiX> i is the sample covariance matrix, and |S + L| is the determinant of ⌦= S+L. We employ the maximum likelihood principle to estimate S⇤and L⇤, which is equivalent to minimizing the negative log-likelihood in (3.3). 3 The low-rank structure of the precision matrix, i.e., L poses a great challenge for computation. A typical way is to use nuclear-norm regularized estimator, or rank constrained estimator to estimate L. However, such kind of estimators involve singular value decomposition at each iteration, which is computationally very expensive. To overcome this computational obstacle, we reparameterize L as the product of smaller matrices. More specifically, due to the symmetry of L, it can be reparameterized by L = ZZ>, where Z 2 Rd⇥r and r > 0 is the number of latent variables and is a tuning parameter. This kind of reparametrization has recently been used in low-rank matrix estimation [18, 16, 44, 45, 11, 30] based on matrix factorization. Then we can rewrite the sample loss function in (3.3) as the following objective function qn(S, Z) = tr ⇥b⌃ & S + ZZ>'⇤ −log |S + ZZ>|. (3.4) Based on (3.4), we propose a nonconvex estimator using sparsity constrained maximum likelihood: min S,Z qn(S, Z) subject to kSk0,0 s, (3.5) where s > 0 is a tuning parameter that controls the sparsity of S. 3.3 The Proposed Algorithm Due to the matrix factorization based reparameterization L = ZZ>, the objective function in (3.5) is nonconvex. In addition, the sparsity based constraint in (3.5) is nonconvex as well. Therefore, the estimation in (3.5) is essentially a nonconvex optimization problem. We propose to solve it by alternately performing gradient descent with respect to one parameter matrix with the other one fixed. The detailed algorithm is displayed in Algorithm 1, which consists of two stages. In the initialization stage (Stage I), it outputs initial points bS(0), bZ(0), which, we will show later, are guaranteed to fall in the small neighborhood of S⇤and Z⇤respectively. Note that we need to do inversion in Line 3, whose complexity is O(d3). Nevertheless, we only need to do inversion once. In sharp contrast, convex relaxation approaches need to do full SVD with O(d3) complexity at each iteration, which is much more time consuming than ours. In the alternating gradient descent stage (Stage II), we iteratively estimate S while fixing Z, and then estimate Z while fixing S. Instead of solving each subproblem exactly, we propose to perform one-step gradient descent for S and Z alternately, using step sizes ⌘and ⌘0. In Lines 6 and 8 of Algorithm 1, rSqn(S, Z) and rZqn(S, Z) denote the partial gradient of qn(S, Z) with respect to S and Z respectively. The choice of the step sizes will be clear according to our theory. In practice, one can also use line search to choose the step sizes. Due to the sparsity constraint kSk0,0 s, we apply hard thresholding [4] right after the gradient descent step for S, in Line 7 of Algorithm 1. For a matrix S 2 Rd⇥d and an integer s, the hard thresholding operator HTs(S) preserves the s largest magnitudes in S and sets the rest entries to zero. Algorithm 1 does not involve singular value decomposition in each iteration, neither solve an exact optimization problem, which makes it much faster than the convex relaxation based algorithms [9, 24]. The computational overhead of Algorithm 1 mainly comes from the calculation of the partial gradient with respect to Z, whose time complexity is O(rd2). Therefore, our algorithm has a per-iteration complexity of O(rd2). 4 Main Theory We present our main theory in this section, which characterizes the convergence rate of Algorithm 1, and the statistical rate of its output. We begin with some definitions and assumptions, which are necessary for our theoretical analysis. Assumption 4.1. There is a constant ⌫> 0 such that 0 < 1/⌫λmin(⌃⇤) λmax(⌃⇤) ⌫< 1, where λmin(⌃⇤) and λmax(⌃⇤) are the minimal and maximal eigenvalues of ⌃⇤respectively. Assumption 4.1 requires the eigenvalues of true covariance matrix ⌃⇤to be finite and bounded below from a positive number, which is a standard assumption for Gaussian graphical models [29, 21, 28]. The relation between the covariance matrix and the precision matrix ⌦⇤= (⌃⇤)−1 immediately yields 1/⌫λmin(⌦⇤) λmax(⌦⇤) ⌫. It is well understood that the estimation problem of the decomposition ⌦⇤= S⇤+L⇤can be ill-posed, where identifiability issue arises when the low-rank matrix L⇤is also sparse [10, 7]. The concept of incoherence condition, which was originally proposed for matrix completion [7], has been adopted in [9, 10], which ensures the low-rank matrix not to be too sparse by restricting the degree of coherence 4 Algorithm 1 Alternating Thresholded Gradient Descent (AltGD) for LVGGM 1: Input: i.i.d. samples X1, . . . , Xn from LVGGM, max number of iterations T, and parameters ⌘, ⌘0, r, s. Stage I: Initialization 2: b⌃= 1 n Pn i=1 XiX> i . 3: bS(0) = HTs(b⌃−1), which preserves the s largest magnitudes of b⌃−1. 4: Compute SVD: b⌃−1 −bS(0) = UDU>, where D is a diagonal matrix. Let bZ(0) = UD1/2 r , where Dr is the first r columns of D. Stage II: Alternating Gradient Descent 5: for t = 0, . . . , T −1 do 6: bS(t+0.5) = bS(t) −⌘rSqn &bS(t), bZ(t)' ; 7: bS(t+1) = HTs ⇣ bS(t+0.5)⌘ , which preserves the s largest magnitudes of bS(t+0.5); 8: bZ(t+1) = bZ(t) −⌘0rZqn &bS(t), bZ(t)' ; 9: end for 10: output: bS(T ), bZ(T ). between singular vectors and the standard basis. Later work such as [1, 25] relaxed this condition to a constraint on the spikiness ratio, and showed that spikiness condition is milder than incoherence condition. In our theory, we use the notion of spikiness as follows. Assumption 4.2 (Spikiness Condition [25]). For a matrix L 2 Rd⇥d, the spikiness ratio is defined as ↵sp(L) := dkLk1,1/kLkF . For the low-rank matrix L⇤in (3.2), we assume that there exists a constant ↵⇤> 0 such that kL⇤k1,1 = ↵sp(L⇤) · kL⇤kF d ↵⇤ d . (4.1) Since rank(L⇤) = r, we define σmax = σ1(L⇤) > 0 and σmin = σr(L⇤) > 0 to be the maximal and minimal nonzero singular value of L⇤respectively. We observe that the decomposition of low-rank matrix L⇤in Section 3.2 is not unique, since we have L⇤= (Z⇤U)(Z⇤U)> for any r ⇥r orthogonal matrix U. Thus, we define the following solution set for Z: U = +eZ 2 Rd⇥r|eZ = Z⇤U for some U 2 Rr⇥r with UU> = U>U = Ir . (4.2) Note that σ1(eZ) = pσmax and σr(eZ) = pσmin for any eZ 2 U. To measure the closeness between our estimator for Z and the unknown parameter Z⇤, we use the following distance d(·, ·), which is invariant to rotation. Similar definition has been used in [45, 30, 40]. Definition 4.3. Define the distance between Z and Z⇤as d(Z, Z⇤) = mineZ2U kZ −eZkF , where U is the solution set defined in (4.2). At the core of our proof technique is the first-order stability condition on the population loss function. In detail, the population loss function is defined as the expectation of sample loss function in (3.3): p(S, L) = tr(⌃⇤(S + L)) −log --S + L --. (4.3) For the ease of presentation, we define two balls around S⇤and Z⇤respectively: BF (S⇤, R) = {S 2 Rd⇥d : kS −S⇤kF R}, Bd(Z⇤, R) = {Z 2 Rd⇥r : d(Z, Z⇤) R}. Then the first-order stability condition is stated as follows. Condition 4.4 (First-order Stability). Suppose S 2 BF (S⇤, R), Z 2 Bd(Z⇤, R) for some R > 0; by definition we have L = ZZ> and L⇤= Z⇤Z⇤>. The gradient of population loss function with respect to S satisfies ..rSp(S, L) −rSp(S, L⇤) .. F γ2 · kL −L⇤kF . The gradient of the population loss function with respect to L satisfies ..rLp(S, L) −rLp(S⇤, L) .. F γ1 · kS −S⇤kF , where γ1, γ2 > 0 are constants. 5 Condition 4.4 requires the population loss function has a variant of Lipschitz continuity for the gradient. Note that the gradient is taken with respect to one variable (S or L), while the Lipschitz continuity is with respect to the other variable. Also, the Lipschitz property is defined only between the true parameters S⇤, L⇤and arbitrary elements S 2 BF (S⇤, R) and L = ZZ> such that Z 2 Bd(Z⇤, R). It should be noted that Condition 4.4, as is verified in the appendix, is inspired by a similar condition originally introduced in [2]. We extend it to the loss function of LVGMM with both sparse and low-rank structures, which plays an important role in the analysis. The following theorem characterize the theoretical properties of Algorithm 1. Theorem 4.5. Suppose Assumptions 4.1 and 4.2 hold. Assume that the sample size satisfies n ≥484k⌦⇤k1,1⌫2rs⇤log d/(25R2σmin) and the sparsity of the unknown sparse matrix satisfies s⇤25d2R2σmin/(121r↵⇤2), where R = min{1/4pσmax, 1/(2⌫), pσmin/(6.5⌫2)}. Then with probability at least 1 −C/d, the initial points bS(0), bZ(0) obtained by the initialization stage of Algorithm 1 satisfies ..bS(0) −S⇤.. F R, and d &bZ(0), Z⇤' R, (4.4) where C > 0 is an absolute constant. Furthermore, suppose Condition 4.4 holds. Let the step sizes satisfy ⌘C0/(σmax⌫2) and ⌘0 C0σmin/(σmax⌫4), and the sparsity parameter satisfies s ≥ & 4(1/(2p⇢) −1)2 + 1 ' s⇤, where C0 > 0 is a constant that can be chosen arbitrarily small. Let ⇢and ⌧be ⇢= max ⇢ 1 −⌘ ⌫2 , 1 −⌘0σmin ⌫2 0 , ⌧= max ⇢48C2 0 σ2max⌫4 s⇤log d n , 32C2 0σ2 min σmax⌫6 rd n 0 . Then for any t ≥1, with probability at least 1 −C1/d, the output of Algorithm 1 satisfies max n..bS(t+1) −S⇤..2 F , d2(bZ(t+1), Z⇤) o ⌧ 1 −p⇢ | {z } statistical error + p ⇢t+1 · R | {z } optimization error , (4.5) where C1 > 0 is an absolute constant. In Theorem 4.5, ⇢is the contraction parameter of linear convergence rate, and it depends on the step size ⌘. Therefore, we can always choose a sufficiently small step size by choosing a small enough C0, such that ⇢is strictly between 0 and 1. Remark 4.6. (4.4) suggests that, in order to ensure that the initial points returned by the initialization stage of Algorithm 1 fall in small neighborhoods of S⇤and Z⇤, we require n = O(s⇤log d), which essentially attains the optimal sample complexity for LVGGM estimation. In addition, we require s⇤. d2/(r↵⇤2), which means the unknown sparse matrix cannot be too dense. Remark 4.7. (4.5) suggests that the estimation error of the output of Algorithm 1 consists of two terms: the first term is the statistical error, and the second term is the optimization error. The statistical error comes from ⌧and scales as max + Op( p s⇤log d/n), Op( p rd/n) , where Op( p s⇤log d/n) corresponds to the statistical error of S⇤, and Op( p rd/n) corresponds to the statistical error of L⇤1. This matches the minimax optimal rate of estimation errors in Frobenius norm for LVGGM estimation [9, 1, 24]. For the optimization error, note that σmax and σmin are fixed constants. For a sufficiently small constant C0, we can always ensure ⇢< 1, and this establishes the linear convergence rate for Algorithm 1. Actually, after T ≥max{O(log(⌫4n/(s⇤log d))), O(log(⌫6n/(rd)))} iterations, the total estimation error of our algorithm achieves the same order as the statistical error. Remark 4.8. Our statistical rate is sharp, because our theoretical analysis is conducted uniformly over the neighborhood of true parameters S⇤and Z⇤, rather than doing sample splitting. This is another big advantage of our approach over existing algorithms which are also built upon first-order stability [2, 36] but rely on sample splitting technique. 5 Experiments In this section, we present numerical results on both synthetic and real datasets to verify the theoretical properties of our algorithm, and compare it with the state-of-the-art methods. Specifically, we 1While the derived error bound in (4.5) is for bZ(t), it is in the same order as the error bound of bL(t) by definition. 6 compare our method, denoted by AltGD, with two convex relaxation based methods for estimating LVGGM: (1) LogdetPPA [9, 32] for solving log-determinant semidefinite programs, denoted by PPA, and (2) the alternating direction method of multipliers in [22, 24], denoted by ADMM. We also considered alternatives of the convex methods which use the randomized SVD method [15] in each iteration. However, the randomized SVD method still needs to compute a full SVD for nuclear norm regularization and in our experiments, we found that it is slower than the full SVD method implemented in [22]. Thus, we only report the results of the orignial convex relaxations in [9, 32, 22, 24]. The implementation of these two methods were downloaded from the authors’ website. All numerical experiments were run in MATLAB R2015b on a laptop with Intel Core i5 2.7 GHz CPU and 8GB of RAM. 5.1 Synthetic Data In the synthetic experiment, we first validate the performance of our method on the latent variable GGM. Then we show that our method also performs well on a more general GGM where the precision matrix is the sum of an arbitrary sparse matrix S⇤and arbitrary low rank matrix L⇤. Specifically, we generated data according to the following two schemes: • Scheme I: we generated data from the latent variable GGM defined in Section 3.1. In detail, the dimension of observed data is d and the number of latent variables is r. We randomly generated a sparse positive definite matrix e⌦2 R(d+r)⇥(d+r), with sparsity s⇤= 0.02d2. According to (3.1), the sparse component of the precision matrix is S⇤:= e⌦1:d;1:d and the low-rank component is L⇤:= −e⌦1:d;(d+1):(d+r)[e⌦(d+1):(d+r);(d+1):(d+r)]−1 e⌦(d+1):(d+r);1:d. Then we sampled data X1, . . . , Xn from distribution N(0, (⌦⇤)−1), where ⌦⇤= S⇤+ L⇤is the true precision matrix. • Scheme II: the dimension of observed data is d and the number of latent variables is r. S⇤is a symmetric positive definite matrix with entries randomly generated from [−1, 1] with sparsity s⇤= 0.05d2. L⇤= Z⇤Z⇤>, where Z⇤2 Rd⇥r with entries randomly generated from [−1, 1]. Then we sampled data X1, . . . , Xn from multivariate normal distribution N(0, (⌦⇤)−1) with ⌦⇤= S⇤+ L⇤being the true precision matrix. Table 1: Scheme I: estimation errors of sparse and low-rank components S⇤and L⇤as well as the true precision matrix ⌦⇤in terms of Frobenius norm on different synthetic datasets. Data were generated from LVGGM and results were reported on 10 replicates in each setting. Setting Method kbS(T ) −S⇤kF kbL(T ) −L⇤kF kb⌦(T ) −⌦⇤kF Time (s) d = 100, r = 2, n = 2000 PPA 0.7335±0.0352 0.0170±0.0125 0.7350±0.0359 1.1610 ADMM 0.7521±0.0288 0.0224±0.0115 0.7563±0.0298 1.1120 AltGD 0.6241±0.0668 0.0113±0.0014 0.6236±0.0669 0.0250 d = 500, r = 5, n = 10000 PPA 0.9803±0.0192 0.0195±0.0046 0.9813±0.0192 35.7220 ADMM 1.0571±0.0135 0.0294±0.0041 1.0610±0.0134 25.8010 AltGD 0.8212±0.0143 0.0125±0.0000 0.8210±0.0143 0.4800 d = 1000, r = 8, n = 2.5 ⇥104 PPA 1.1620±0.0177 0.0224±0.0034 1.1639±0.0179 356.7360 ADMM 1.1867±0.0253 0.0356±0.0033 1.1869±0.0254 156.5550 AltGD 0.9016±0.0245 0.0167±0.0030 0.9021±0.0244 7.4740 d = 5000, r = 10, n = 2 ⇥105 PPA 1.4822±0.0302 0.0371±0.0052 1.4824±0.0120 33522.0200 ADMM 1.5010±0.0240 0.0442±0.0068 1.5012±0.0240 21090.7900 AltGD 1.3449±0.0073 0.0208±0.0014 1.3449±0.0084 445.6730 In both schemes, we conducted experiments in different settings of d, n, s⇤and r. The step sizes of our method were set as ⌘= c1/(σmax⌫2) and ⌘0 = c1σmin/(σmax⌫4) according to Theorem 4.5, where c1 = 0.25. The thresholding parameter s is set as c2s⇤, where c2 > 1 was selected by 4-fold cross-validation. The regularization parameters for `1,1-norm and nuclear norm in PPA and ADMM and the tuning parameter r in our algorithm were selected by 4-fold cross-validation. Under both schemes, we repeatedly generated 10 datasets for each setting of d, n, s⇤and r⇤, and calculated the mean and standard error of the estimation error. We summarize the results of Scheme I over 10 replications in Table 1. Note that our algorithm AltGD outputs a slightly better estimator in terms of estimation errors compared with PPA and ADMM. It should also be noted that they do not differ too much because their statistical rates should be in the same order. To demonstrate the efficiency of our algorithm, we also reported the mean CPU time in the last column of Table 1. We observe 7 significant speed-ups brought by our algorithm, which is almost 50 times faster than the convex ones. In particular, when the dimension d scales up to several thousands, the computation of SVD in PPA and ADMM takes enormous time and therefore the computational time of them increases dramatically. We report the averaged results of Scheme II over 10 repetitions in Table 2. Again, it can be seen that our method AltGD achieves comparable or slightly better estimators in terms of estimation errors in Frobenius norm compared against PPA and ADMM. Our method AltGD is nearly 50 times faster than the other two methods based on convex algorithms. Table 2: Scheme II: estimation errors of sparse and low-rank components S⇤and L⇤as well as the true precision matrix ⌦⇤in terms of Frobenius norm on different synthetic datasets. Data were generated from multivariate distribution where the precision matrix is the sum of an arbitrary sparse matrix and an arbitrary low-rank matrix. Results were reported on 10 replicates in each setting. Setting Method kbS(T ) −S⇤kF kbL(T ) −L⇤kF kb⌦(T ) −⌦⇤kF Time (s) d = 100, r = 2, n = 2000 PPA 0.5710±0.0319 0.6231±0.0261 0.8912±0.0356 1.6710 ADMM 0.6198±0.0361 0.5286±0.0308 0.8588±0.0375 1.2790 AltGD 0.5639±0.0905 0.4824±0.0323 0.7483±0.0742 0.0460 d = 500, r = 5, n = 10000 PPA 0.8140±0.0157 0.7802±0.0104 1.1363±0.0131 43.8000 ADMM 0.8140±0.0157 0.7803±0.0104 1.1363±0.0131 25.8980 AltGD 0.6139±0.0198 0.7594±0.0111 0.9718±0.0146 0.8690 d = 1000, r = 8, n = 2.5 ⇥104 PPA 0.9235±0.0193 1.1985±0.0084 1.4913±0.0162 487.4900 ADMM 0.9209±0.0212 1.2131±0.0084 1.4975±0.0171 163.9350 AltGD 0.7249±0.0158 0.9651±0.0093 1.2029±0.0141 7.1360 d = 5000, r = 10, n = 2 ⇥105 PPA 1.1883±0.0091 1.0970±0.0022 1.3841±0.0083 44098.6710 ADMM 1.2846±0.0089 1.1568±0.0023 1.5324±0.0085 20393.3650 AltGD 1.0681±0.0034 1.0685±0.0023 1.2068±0.0032 287.8630 In addition, we illustrate the convergence rate of our algorithm in Figure 1(a) and 1(b), where the x-axis is iteration number and y-axis is the estimation errors in Frobenius norm. We can see that our algorithm converges in dozens of iterations, which confirms our theoretical guarantee on linear convergence rate. We plot the overall estimation errors against the scaled statistical errors of S(T ) and L(T ) under different configurations of d, n, s⇤and r in Figure 1(c) and 1(d). According to Theorem 4.5, kbS(t) −S⇤kF and kbL(t) −L⇤kF will converge to the statistical errors as the number of iterations t goes up, which are in the order of O( p s⇤log d/n) and O( p rd/n) respectively. We can see that the estimation errors grow linearly with the theoretical rate, which validates our theoretical guarantee on the minimax optimal statistical rate. Number of iteration (t) 0 2 4 6 8 10 12 14 16 18 kS(t) ! S$kF 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 d = 100; n = 1000; r = 2 d = 500; n = 10000; r = 5 d = 1000; n = 25000; r = 8 (a) Estimation error for S⇤ Number of iteration (t) 0 5 10 15 20 25 30 35 40 kL(t) ! L$kF 0.98 1 1.02 1.04 1.06 1.08 1.1 1.12 1.14 1.16 1.18 d = 100; n = 1000; r = 2 d = 500; n = 10000; r = 5 d = 1000; n = 25000; r = 8 (b) Estimation error for L⇤ p s$ log d=n 0.5 1 1.5 2 kS(t) ! S$kF 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 r = 2 r = 5 r = 7 r = 10 (c) r fixed and varying n, d and s⇤ p rd=n 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 kL(t) ! L$kF 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 s$ = 300 s$ = 400 s$ = 500 s$ = 600 (d) s⇤fixed and varying n, d and r Figure 1: (a)-(b): Evolution of estimation errors with number of iterations t going up with the sparsity parameter s⇤set as 0.02 ⇥d2 and varying d, n and r. (c)-(d): Estimation errors kbS(T ) −S⇤kF and kbL(T ) −L⇤kF versus scaled statistical errors p s⇤log d/n and p rd/n. 5.2 Genomic Data In this subsection, we apply our method to TCGA breast cancer gene expression data to infer regulatory network. We downloaded the gene expression data from cBioPortal2. Here we focused on 299 breast cancer related transcription factors (TFs) and estimated the regulatory relationships for each pair of TFs over two breast cancer subtypes: luminal and basal. We compared our method AltGD 2http://www.cbioportal.org/ 8 with ADMM and PPA which are all based on LVGGM. We also compared it with the graphical Lasso (GLasso) which only considers the sparse structure of precision matrix and ignores the latent variables; we chose QUIC3 to solve the GLasso estimator. Regarding the benchmark standard, we used the “regulatory potential scores” between a pair of genes (a TF and a target gene) for these two breast cancer subtypes compiled based on both co-expression and TF ChIP-seq binding data from the Cistrome Cancer Database4. Table 3: Summary of CPU time of different methods on luminal subtype breast cancer dataset. Method GLasso PPA ADMM AltGD Time (s) 38.6310 85.0100 7.6700 0.1500 For luminal subtype, there are n = 601 samples and d = 299 TFs. The regularization parameters for `1,1 norm in GLasso, for `1,1 norm and nuclear norm in PPA and ADMM were tuned by grid search. The step sizes of AltGD were set as ⌘= 0.1/b⌫2 and ⌘0 = 0.1/b⌫4, where b⌫is the maximal eigenvalue of sample covariance matrix. The thresholding parameter s and number of latent variables r were tuned by grid search. In Table 3, we present the CPU time of each method. Importantly, we can see that AltGD is the fastest among all the methods and is even more than 50 times faster than the second fastest method ADMM. ● ● ● ● ● ● ● ● ● ● ATF4 SREBF2 H2AFX HDAC2 ELF5 SUMO2 MXI1 IRF4 SF1 POLR2B (a) GLasso ● ● ● ● ● ● ● ● ● ● ATF4 SREBF2 H2AFX HDAC2 ELF5 SUMO2 MXI1 IRF4 SF1 POLR2B (b) PPA ● ● ● ● ● ● ● ● ● ● ATF4 SREBF2 H2AFX HDAC2 ELF5 SUMO2 MXI1 IRF4 SF1 POLR2B (c) ADMM ● ● ● ● ● ● ● ● ● ● ATF4 SREBF2 H2AFX HDAC2 ELF5 SUMO2 MXI1 IRF4 SF1 POLR2B (d) AltGD Figure 2: An example of subnetwork in the transcriptional regulatory network of luminal breast cancer. Here gray edges are the interactions from the Cistrome Cancer Database; red edges are the ones inferred by the respective methods; green edges are incorrectly inferred interactions. To demonstrate the performances of different methods on recovering the overall transcriptional regulatory network, we randomly selected 10 TFs in the benchmark network and plotted the subnetwork in Figure 2 which has 70 edges with nonzero regulatory potential scores. Specifically, the gray edges form the benchmark network, the red edges are those identified correctly and the green edges are those incorrectly inferred by each method. We can observe from Figure 2 that the methods based on LVGGMs are able to recover more edges accurately than graphical Lasso because of the intervention of latent variables. We remark that all the methods were not able to completely recover the entire regulatory network partly because we only used the gene expression data for TFs (instead of all genes) and the regulatory potential scores from the Cistome Cancer Database also used TF binding information. Due to space limit, we postpone additional experimental results to the appendix. 6 Conclusions In this paper, to speed up the learning of LVGGM, we proposed a sparsity constrained maximum likelihood estimator based on matrix factorization. We developed an efficient alternating gradient descent algorithm, and proved that the proposed algorithm is guaranteed to converge to the unknown sparse and low-rank matrices with a linear convergence rate up to the optimal statical error. Experiments on both synthetic and real world genomic data supported our theory. Acknowledgements We would like to thank the anonymous reviewers for their helpful comments. This research was sponsored in part by the National Science Foundation IIS-1652539, IIS-1717205 and IIS-1717206. The views and conclusions contained in this paper are those of the authors and should not be interpreted as representing any funding agencies. 3http://www.cs.utexas.edu/~sustik/QUIC/ 4http://cistrome.org/CistromeCancer/ 9 References [1] Alekh Agarwal, Sahand Negahban, and Martin J Wainwright. Noisy matrix decomposition via convex relaxation: Optimal rates in high dimensions. The Annals of Statistics, pages 1171–1197, 2012. [2] Sivaraman Balakrishnan, Martin J Wainwright, and Bin Yu. Statistical guarantees for the em algorithm: From population to sample-based analysis. arXiv preprint arXiv:1408.2156, 2014. [3] Srinadh Bhojanapalli, Anastasios Kyrillidis, and Sujay Sanghavi. Dropping convexity for faster semi-definite optimization. arXiv preprint, 2015. [4] Thomas Blumensath and Mike E Davies. Iterative hard thresholding for compressed sensing. Applied and computational harmonic analysis, 27(3):265–274, 2009. [5] T Tony Cai, Hongzhe Li, Weidong Liu, and Jichun Xie. Covariate-adjusted precision matrix estimation with an application in genetical genomics. Biometrika, page ass058, 2012. [6] Tony Cai, Weidong Liu, and Xi Luo. A constrained 1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association, 106(494):594–607, 2011. [7] Emmanuel Candes and Benjamin Recht. Exact matrix completion via convex optimization. Communications of the ACM, 55(6):111–119, 2012. [8] Emmanuel J Candès, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM (JACM), 58(3):11, 2011. [9] Venkat Chandrasekaran, Pablo A Parrilo, and Alan S Willsky. Latent variable graphical model selection via convex optimization. In Communication, Control, and Computing (Allerton), 2010 48th Annual Allerton Conference on, pages 1610–1613. IEEE, 2010. [10] 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. [11] 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. [12] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2008. [13] Gene H Golub and Charles F Van Loan. Matrix computations, volume 3. JHU Press, 2012. [14] 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. [15] Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217–288, 2011. [16] Moritz Hardt. Understanding alternating minimization for matrix completion. In FOCS, pages 651–660. IEEE, 2014. [17] Jianhua Z Huang, Naiping Liu, Mohsen Pourahmadi, and Linxu Liu. Covariance matrix selection and estimation via penalised normal likelihood. Biometrika, 93(1):85–98, 2006. [18] Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. Low-rank matrix completion using alternating minimization. In STOC, pages 665–674, 2013. [19] Steffen L Lauritzen. Graphical models, volume 17. Clarendon Press, 1996. [20] Xingguo Li, Tuo Zhao, Raman Arora, Han Liu, and Jarvis Haupt. Stochastic variance reduced optimization for nonconvex sparse learning, 2016. 10 [21] Han Liu, John Lafferty, and Larry Wasserman. The nonparanormal: Semiparametric estimation of high dimensional undirected graphs. Journal of Machine Learning Research, 10(Oct):2295– 2328, 2009. [22] Shiqian Ma, Lingzhou Xue, and Hui Zou. Alternating direction methods for latent variable gaussian graphical model selection. Neural computation, 25(8):2172–2198, 2013. [23] Nicolai Meinshausen and Peter Bühlmann. High-dimensional graphs and variable selection with the lasso. The annals of statistics, pages 1436–1462, 2006. [24] Zhaoshi Meng, Brian Eriksson, and Alfred O Hero III. Learning latent variable gaussian graphical models. arXiv preprint arXiv:1406.2721, 2014. [25] Sahand Negahban and Martin J Wainwright. Restricted strong convexity and weighted matrix completion: Optimal bounds with noise. Journal of Machine Learning Research, 13(May):1665– 1697, 2012. [26] Sahand Negahban, Bin Yu, Martin J Wainwright, and Pradeep K Ravikumar. A unified framework for high-dimensional analysis of m-estimators with decomposable regularizers. In Advances in Neural Information Processing Systems, pages 1348–1356, 2009. [27] Yurii Nesterov. Introductory lectures on convex optimization: A basic course, volume 87. Springer Science & Business Media, 2013. [28] Pradeep Ravikumar, Martin J Wainwright, Garvesh Raskutti, Bin Yu, et al. High-dimensional covariance estimation by minimizing 1-penalized log-determinant divergence. Electronic Journal of Statistics, 5:935–980, 2011. [29] Adam J Rothman, Peter J Bickel, Elizaveta Levina, Ji Zhu, et al. Sparse permutation invariant covariance estimation. Electronic Journal of Statistics, 2:494–515, 2008. [30] 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. [31] Roman Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [32] Chengjing Wang, Defeng Sun, and Kim-Chuan Toh. Solving log-determinant optimization problems by a newton-cg primal proximal point algorithm. SIAM Journal on Optimization, 20(6):2994–3013, 2010. [33] Lingxiao Wang and Quanquan Gu. Robust gaussian graphical model estimation with arbitrary corruption. In International Conference on Machine Learning, pages 3617–3626, 2017. [34] Lingxiao Wang, Xiang Ren, and Quanquan Gu. Precision matrix estimation in high dimensional gaussian graphical models with faster rates. In Artificial Intelligence and Statistics, pages 177–185, 2016. [35] Lingxiao Wang, Xiao Zhang, and Quanquan Gu. A unified computational and statistical framework for nonconvex low-rank matrix estimation. arXiv preprint arXiv:1610.05275, 2016. [36] Zhaoran Wang, Quanquan Gu, Yang Ning, and Han Liu. High dimensional expectationmaximization algorithm: Statistical optimization and asymptotic normality. arXiv preprint arXiv:1412.8729, 2014. [37] Pan Xu and Quanquan Gu. Semiparametric differential graph models. In Advances in Neural Information Processing Systems, pages 1064–1072, 2016. [38] Pan Xu, Lu Tian, and Quanquan Gu. Communication-efficient distributed estimation and inference for transelliptical graphical models. arXiv preprint arXiv:1612.09297, 2016. [39] Pan Xu, Tingting Zhang, and Quanquan Gu. Efficient algorithm for sparse tensor-variate gaussian graphical models via gradient descent. In Artificial Intelligence and Statistics, pages 923–932, 2017. 11 [40] Xinyang Yi, Dohyung Park, Yudong Chen, and Constantine Caramanis. Fast algorithms for robust pca via gradient descent. arXiv preprint arXiv:1605.07784, 2016. [41] Jianxin Yin and Hongzhe Li. A sparse conditional gaussian graphical model for analysis of genetical genomics data. The annals of applied statistics, 5(4):2630, 2011. [42] Xiao-Tong Yuan and Tong Zhang. Partial gaussian graphical model estimation. IEEE Transactions on Information Theory, 60(3):1673–1687, 2014. [43] Xiao Zhang, Lingxiao Wang, and Quanquan Gu. A nonconvex free lunch for low-rank plus sparse matrix recovery. arXiv preprint arXiv:1702.06525, 2017. [44] 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. [45] 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. 12 | 2017 | 458 |
6,961 | Sparse convolutional coding for neuronal assembly detection Sven Peter1,∗ Elke Kirschbaum1,∗ {sven.peter,elke.kirschbaum}@iwr.uni-heidelberg.de Martin Both2 mboth@physiologie.uni-heidelberg.de Lee A. Campbell3 lee.campbell@nih.gov Brandon K. Harvey3 bharvey@mail.nih.gov Conor Heins3,4,† conor.heins@ds.mpg.de Daniel Durstewitz5 daniel.durstewitz@zi-mannheim.de Ferran Diego Andilla6,‡ ferran.diegoandilla@de.bosch.com Fred A. Hamprecht1 fred.hamprecht@iwr.uni-heidelberg.de 1Interdisciplinary Center for Scientific Computing (IWR), Heidelberg, Germany 2Institute of Physiology and Pathophysiology, Heidelberg, Germany 3National Institute on Drug Abuse, Baltimore, USA 4Max Planck Institute for Dynamics and Self-Organization, Göttingen, Germany 5Dept. Theoretical Neuroscience, Central Institute of Mental Health, Mannheim, Germany 6Robert Bosch GmbH, Hildesheim, Germany Abstract Cell assemblies, originally proposed by Donald Hebb (1949), are subsets of neurons firing in a temporally coordinated way that gives rise to repeated motifs supposed to underly neural representations and information processing. Although Hebb’s original proposal dates back many decades, the detection of assemblies and their role in coding is still an open and current research topic, partly because simultaneous recordings from large populations of neurons became feasible only relatively recently. Most current and easy-to-apply computational techniques focus on the identification of strictly synchronously spiking neurons. In this paper we propose a new algorithm, based on sparse convolutional coding, for detecting recurrent motifs of arbitrary structure up to a given length. Testing of our algorithm on synthetically generated datasets shows that it outperforms established methods and accurately identifies the temporal structure of embedded assemblies, even when these contain overlapping neurons or when strong background noise is present. Moreover, exploratory analysis of experimental datasets from hippocampal slices and cortical neuron cultures have provided promising results. ∗Both authors contributed equally. †Majority of this work was done while co-author was at 3. ‡Majority of this work was done while co-author was at 1. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) Synchronously firing neurons (b) Synfire chain (c) Temporal motif Figure 1: Temporal motifs in neuronal spike trains. All three illustrations show the activity of four different neurons over time. The spikes highlighted in red are part of a repeating motif. In (a) the motif is defined by the synchronous activity of all neurons, while the synfire chain in (b) exhibits sequential spiking patterns. (c) shows a more complex motif with non-sequential temporal structure. (Figure adapted from [23].) 1 Introduction The concept of a cell assembly (or cortical motif or neuronal ensemble) was originally introduced by Donald Hebb [1] and denotes subsets of neurons that by firing coherently represent mental objects and form the building blocks of cortical information processing. Numerous experimental studies within the past 30 years have attempted to address the neural assembly hypothesis from various angles in different brain areas and species, but the concept remains debated, and recent massively parallel single-unit recording techniques have opened up new opportunities for studying the role of spatio-temporal coordination in the nervous system [2–12]. A number of methods have been proposed to identify motifs in neuronal spike train data, but most of them are only designed for strictly synchronously firing neurons (see figure 1a), i.e. with zero phase-lag [13–17], or strictly sequential patterns as in synfire chains [18–21] (see figure 1b). However, some experimental studies have suggested that cortical spiking activity may harbor motifs with more complex structure [5, 22] (see figure 1c). Only quite recently statistical algorithms were introduced that can efficiently deal with arbitrary lag constellations among the units participating in an assembly [23], but the identification and validation of motifs with complex temporal structure remains an area of current research interest. In this paper we present a novel approach to identify motifs with any of the temporal structures shown in figure 1 in a completely unsupervised manner. Based on the idea of convolutive Non-Negative Matrix Factorization (NMF) [24, 25] our algorithm reconstructs the neuronal spike matrix as a convolution of motifs and their activation time points. In contrast to convolutive NMF, we introduce an ℓ0 and ℓ1 prior on the motif activation and appearance, respectively, instead of a single ℓ1 penalty. This ℓ0 regularization enforces more sparsity in the temporal domain; thus performing better in extracting motifs from neuronal spike data by reducing false positive activations. Adding the ℓ0 and ℓ1 penalty terms requires a novel optimization scheme. This replaces the multiplicative update rules by a combination of discrete and continuous optimizations, which are matching pursuit and LASSO regression. Additionally we added a sorting and non-parametric threshold estimation method to distinguish between real and spurious results of the optimization problem. We benchmark our approach on synthetic data against Principal Component Analysis (PCA) and Independent Component Analysis (ICA) as the most widely used methods for motif detection, and against convolutive NMF as the method most closely related to the proposed approach. Our algorithm outperforms the other methods especially when identifying long motifs with complex temporal structure. We close with results of our approach on two real-world datasets from hippocampal slices and cortical neuron cultures. 2 Related work PCA is one of the simplest methods that has been used for a long time to track cell motifs [26]. Its biggest limitations are that different assembly patterns can easily be merged into a single ’large’ component, and that neurons shared between motifs are assigned lower weights than they should have. Moreover, recovering individual neurons which belong to a single assembly is not reliably possible [27, 17], and the detected assemblies are not very robust to noise and rate fluctuations [23]. ICA with its assumption of non-Gaussian and statistically independent subcomponents [28] is able to recover individual neuron-assembly membership, and neurons belonging to multiple motifs are 2 Y = + noise = a1 ⊛ s1 + a2 ⊛ s2 Figure 2: Sketch of convolutional coding. In this example the raw data matrix Y is described by a matrix which is an additive mixture of two motifs a1 (cyan) and a2 (salmon) convolved with their activities s1 and s2, respectively, plus background noise. also correctly identified [17]. ICA provides a better estimate for synchronous motifs than PCA [17], but motifs with more complicated temporal structure are not (directly) accommodated within this framework. An overview of PCA and ICA for identifying motifs is provided in [17]. More sophisticated statistical approaches have been developed, like unitary event analysis [13, 14], for detecting coincident, joint spike events across multiple cells. More advanced methods and statistical tests were also designed for detecting higher-order correlations among neurons [15, 16], as well as synfire chains [20]. However, none of these techniques is designed to detect more complex, non-synchronous, non-sequential temporal structure. Only quite recently more elaborate statistical schemes for capturing assemblies with arbitrary temporal structure, and also for dealing with issues like non-stationarity and different time scales, were advanced [23]. The latter method works by recursively merging sets of units into larger groups based on their joint spike count probabilities evaluated across multiple different time lags. The method proposed in this paper, in contrast, approaches the detection of complex assemblies in a very different manner, attempting to detect complex patterns as a whole. NMF techniques have been widely applied to recover spike trains from calcium fluorescence recordings [29–35]. Building on these schemes, NMF has been used to decompose a binned spike matrix into multiple levels of synchronous patterns which describe a hierarchical structuring of the motifs [36]. But these previous applications of NMF considered only neurons firing strictly synchronously. In audio processing, convolutive NMF has been successfully used to detect motifs with temporal structure [24, 25, 37]. However, as we will show later, the constraints used in audio processing are too weak to extract motifs from neuronal spike data. For this reason we propose a novel optimization approach using sparsity constraints adapted to neuronal spike data. 3 Sparse convolutional coding We formulate the identification of motifs with any of the temporal structures displayed in figure 1 as a convolutional matrix decomposition into motifs and their activity in time, based on the idea behind convolutive NMF [24, 25], and combined with the sparsity constraints used in [34]. We use a novel optimization approach and minimize the reconstruction error while taking into account the sparsity constraints for both motifs and their activation time points. Let Y ∈Rn×m + be a matrix whose n rows represent individual neurons with their spiking activity binned to m columns. We assume that this raw signal is an additive mixture of l motifs ai ∈Rn×τ + with temporal length τ, convolved with a sparse activity signal si ∈R1×m + plus noise (see figure 2). We address the unsupervised problem of simultaneously estimating both the coefficients making up the motifs ai and their activities si. To this end, we propose to solve the optimization problem min a,s
Y − l X i=1 si ⊛ai
2 F + α l X i=1 ∥si∥0 + β l X i=1 ∥ai∥1 (1) 3 with α and β controlling the regularization strength of the ℓ0 norm of the activations and the ℓ1 norm of the motifs, respectively. The convolution operator ⊛is defined by si ⊛ai = τ X j=1 ai,j · S(j −1)si (2) with ai,j being the jth column of ai. The column shift operator S(j) moves a matrix j places to the right while keeping the same size and filling missing values appropriately with zeros [24]. The product on the right-hand side is an outer product. In [25] the activity of the learned motifs is regularized only with a ℓ1 prior which is too weak to recover motifs in neuronal spike trains. Instead we choose the ℓ0 prior for si since it has been successfully used to learn spike trains of neurons [34]. For the motifs themselves a ℓ1 prior is used to enforce only few non-zero coefficients while still allowing exact optimization [38]. 3.1 Optimization This problem is non-convex in general but can be approached by initializing the activities si randomly and using a block coordinate descent strategy [39, Section 2.7] to alternatingly optimize for the two variables. When keeping the activations si fixed, the motif coefficients ai are learned using LASSO regression with non-negativity constraints [40] by transforming the convolution with si to a linear set of equations by using modified Toeplitz matrices ˜si ∈Rmn×nτ which are then stacked column-wise [41, 38]: min a
vec(Y) | {z } b∈Rmn −[˜s1 ... ˜sl] | {z } A∈Rmn×lnτ "vec(a1) ... vec(al) # | {z } x∈Rlnτ
2 2 + β l X i=1 ∥ai∥1 (3) The matrices ˜si are constructed from the si with ˜si,j,k = ˜si,j+1,k+1 = si,j−k for j ≥k and ˜si,j,k = 0 for j < k and ˜si,j,k = 0 for j > p · m and k < p · τ for p = 1, . . . , n (where i denotes the ith matrix with element indices j and k). When keeping the currently found motifs ai fixed, their activation in time is learned using a convolutional matching pursuit algorithm [42–44] to approximate the ℓ0 norm. The greedy algorithm iteratively includes an assembly appearance that most reduces the reconstruction error.All details of the algorithm are outlined in the supplementary material for this paper. 3.2 Motif sorting and non-parametric threshold estimation The list of identified motifs is expected to also contain false positives which do not appear repeatedly in the data. The main non-biological reason for this is that our algorithm only finds local minima of the optimization problem given by equation (1). Experiments on various synthetic datasets showed that motifs present at the global optimum should always have the same appearance, independent of the random initialization of the activities. The false positives which are only present in particular local minima, however, look differently every time the initialization is changed. We therefore propose to run our algorithm multiple times on the same data with the same parameter settings but with different random initializations, and use the following sorting and non-parametric threshold estimation algorithm in order to distinguish between true (reproducible) and spurious motifs. The following is only a brief description. More details are given in the supplementary material. In the first step, the motifs found in each run are sorted using pairwise matching. The sorting is necessary because the order of the motifs after learning is arbitrary and it has to be assured that the motifs with the smallest difference between different runs are compared. Sorting the sets of motifs from all runs at the same time is an NP hard multidimensional assignment problem [45]. Therefore, a greedy algorithm is used instead. It starts by sorting the two sets of motifs with the lowest assignment cost. Thereafter, the remaining sets of motifs are sorted one by one according to the order of motifs given by the already sorted sets. Inspired by permutation tests, we estimate a threshold T by creating a shuffled spike matrix to determine which motifs are only spurious. In the shuffled matrix all temporal correlations between 4 and within neurons have been destroyed. Hence, there are no real motifs in the shuffled matrix and the motifs learned from this matrix will likely be different with each new initialization. We take the minimal difference of any two motifs from different runs of the algorithm on the shuffled matrix as the threshold. We assume that motifs that show a difference between different runs larger than this threshold are spurious and discard them. 3.3 Parameter selection The sparse convolutional coding algorithm has only three parameters that have to be specified by the user: the maximal number of assemblies, the maximal temporal length of a motif, and the penalty β on the ℓ1 norm of the motifs. The number of assemblies to be learned can be set to a generous upper limit since the sorting method assures that only the true motifs remain while all false positives are deleted. The temporal length of a motif can also be set to a generous upper bound. To find an adequate ℓ1 penalty for the assemblies, different values need to be tested, and it should be set to a value where neither the motifs are completely empty nor all neurons are active over the whole possible length of the motifs. In the tested cases the appearance of the found motifs did not change drastically while varying the ℓ1 penalty within one order of magnitude, so fine-tuning it is not necessary. Instead of specifying the penalty α on the ℓ0 norm of the activations directly, we chose to stop the matching pursuit algorithm when adding an additional assembly appearance increases the reconstruction error or when the difference of reconstruction errors from two consecutive steps falls below a small threshold. All code for the proposed method is available at: https://github.com/sccfnad/ Sparse-convolutional-coding-for-neuronal-assembly-detection 4 Results 4.1 Synthetic data Since ground truth datasets are not available, we have simulated different synthetic datasets to establish the accuracy of the proposed method, and compare it to existing work. For PCA and ICA based methods the number of motifs is estimated using the Marchenko-Pastur eigenvalue distribution [17]. The sparsity parameter in the sparse convolutive NMF (scNMF) that resulted in the best performance was chosen empirically [25]. An illustrative example dataset with twenty neurons, one hundred spurious spikes per neuron and three temporal motifs can be seen in figure 3. Consecutive activation times between motifs were modeled as Poisson renewal processes with a mean inter-event-distance of twenty frames. When running our method from two different random initial states to identify a total of five motifs, all three original motifs were among those extracted from the data (figure 3c and 3d; the motifs have been sorted manually to match up with the ground truth; all parameters for the analysis can be found in table 1). While the two spurious motifs change depending on the random initialization, the three true motifs consistently show up in the search results. Neither PCA, ICA nor scNMF were able to extract the true motifs (see figures 3e, 3f and 3g). For further analysis, various datasets consisting of fifty neurons observed over one thousand time frames were created. Details on the generation of these datasets can be found in the supplementary material. For each of the different motif lenghts τ = 1, 7 and 21 frames, twenty different datasets were created, with different noise levels and numbers of neurons shared between assemblies. To compare the performance of different methods, we use the functional association between neurons as an indicator [27, 46, 12]. For this a neuron association matrix (NAM) is calculated from the learned motifs. The NAM contains for each pair of neurons a 1 if the two neurons belong to the same assembly and a 0 otherwise. The tested methods, however, do not make binary statements about whether a neuron belongs to an assembly, but provide only the information to what degree the neuron was associated with an assembly. We apply multiple thresholds to binarize the output of the tested methods and compute true positive rate and false positive rate between the ground truth NAM and the binarized NAM, leading to the ROC curves shown in figure 4. We chose this method since it works without limitations for synchronous motifs and also allows for comparisons for the more complex cases. 5 0 100 200 300 400 500 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron (a) Spike matrix 1 3 5 7 9 1113 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron motif 1 1 3 5 7 9 1113 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 2 1 3 5 7 91113 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20motif 3 0.0 0.2 0.4 0.6 0.8 1.0 (b) Ground truth motifs 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron motif 1 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 2 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 3 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 4 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20motif 5 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 (c) Learned motifs (proposed method, first trial) 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron motif 1 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 2 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 3 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 4 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20motif 5 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 (d) Learned motifs (proposed method, second trial) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron motif 1 −0.4 −0.2 0.0 0.2 0.4 (e) Learned component (PCA) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron motif 1 −0.6 −0.4 −0.2 0.0 0.2 0.4 0.6 (f) Learned component (ICA) 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 neuron motif 1 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 2 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 3 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 motif 4 1 3 5 7 9111315 frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20motif 5 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 (g) Learned motifs (scNMF) Figure 3: Results on a synthetic dataset. (a) shows a synthetic spike matrix. (b) shows the three motifs present in the data. By running our algorithm with two different random initial states the motifs seen in (c) and (d) are learned. (e), (f) and (g) show the results from PCA, ICA and scNMF, respectively. 0.0 0.2 0.4 0.6 0.8 1.0 False positive rate 0.0 0.2 0.4 0.6 0.8 1.0 True positive rate PCA ICA our method scNMF (a) τ = 1 0.0 0.2 0.4 0.6 0.8 1.0 False positive rate 0.0 0.2 0.4 0.6 0.8 1.0 True positive rate PCA ICA our method scNMF (b) τ = 7 0.0 0.2 0.4 0.6 0.8 1.0 False positive rate 0.0 0.2 0.4 0.6 0.8 1.0 True positive rate PCA ICA our method scNMF (c) τ = 21 Figure 4: ROC curves of different methods on synthetic data for different temporal motif lengths. We show the mean ROC curve and its standard deviation averaged over all trials on different synthetic datasets. All methods were run ten times on each dataset with different random initializations. In the synchronous case (i.e. τ = 1, figure 4a) our proposed method performs as good as the best competitor. As expected PCA performance shows a huge variance since some of the datasets contain neurons shared between multiple motifs and since extracting actual neuron-assembly assignments is not always possible [27, 17]. When temporal structure is introduced we are still able to identify associations between neurons with very high accuracy. For short temporal motifs (τ = 7, figure 4b) scNMF is able to identify associations, but only our method was able to accurately recover most associations in long motifs (τ = 21, figure 4c). 6 Table 1: Experimental parameters. We show the used maximal number of assemblies, maximal motif length in frames, ℓ1 penalty value β, and number of runs of the algorithm with different initializations for the performed experiments on synthetic and real datasets. We also display the estimated threshold T used for distinguishing between real and spurious motifs. Experiment #motifs motif length in frames β #runs T synthetic example data 5 15 5 · 10−4 2 – hippocampal CA1 region 5 10 10−6 5 5.7 · 10−6 cortical neuron culture 5 10 10−6 5 6.5 · 10−4 4.2 Real data In vitro hippocampal CA1 region data. We analyzed spike trains of 91 cells from the hippocampal CA1 region recorded at high temporal and multiple single cell resolution using CA2+ imaging. The acute mouse hippocampal slices were recorded in a so-called interface chamber [47]. On this dataset, our algorithm identified three motifs as real motifs. They are shown in figure 5a. The activity of each assembly has been calculated at every frame and is shown in figure 5b. In order to qualitatively show that the proposed method appropriately eliminates false positives from the list of found motifs also on real data, we plotted in figure 6 for each motif the difference to the best matching motif from every other run. We did this for the motifs identified in the original spike matrix (figure 6a), as well as for the motifs identified in the shuffled spike matrix (figure 6b). The motifs found in the shuffled matrix show much higher variability between runs than those found in the original matrix. For motifs 1 and 3 from the original matrix the difference between runs is in average about two to three times higher than for the other motifs, but still smaller than the average difference between runs for all of the motifs from the shuffled data. Nevertheless, these motifs are deleted as false positives, since the threshold for discarding a motif is set to the minimum difference of motifs from different runs on the shuffled matrix. This shows that the final set of motifs is unlikely to contain spurious motifs anymore. The spontaneous hippocampal network activity is expected to appear under the applied recording conditions as sharp wave-ripple (SPW-R) complexes that support memory consolidation [48–50, 47]. Motif 5 in figure 5a shows the typical behavior of principal neurons firing single or two consecutive spikes at a low firing rate (≪1 Hz) during SPW-R in vitro [47]. This might be interpreted as the re-activation of a formerly established neuronal assembly. In vitro cortical neuron culture data. Primary cortical neurons were prepared from E15 embryos of Sprague Dawley rats as described in [51] and approved by the NIH Animal Care and Usage Committee. Cells were transduced with an adeno-associated virus expressing the genetically-encoded calcium indicator GCaMP6f on DIV 7 (Addgene #51085). Wide-field epifluorescent videos of spontaneous calcium activity from individual wells (6 × 104 cells/well) were recorded on DIV 14 or 18 at an acquisition rate of 31.2 frames per second. The data for the shown example contains 400 identified neurons imaged for 10 minutes on DIV 14. Our algorithm identified two motifs in the used dataset, shown in figure 5c. Their activity is plotted in figure 5d. For each column of the two motifs, figure 7 shows the percentage of active neurons at every time frame. The motifs were thresholded such that only neurons with a motif coefficient above 50% of the maximum coefficient of the motif were counted. We show those columns of the motifs which contained more than one neuron after thresholding. The fact that figure 7 shows only few motif activations that include all of the cells that are a part of the motif has less to do with the actual algorithm, but more with how the nervous system works: Only rarely all cells of an assembly will spike [23], due to both the intrinsic stochasticity, like probabilistic synaptic release [52] and the fact that synaptic connectivity and thus assembly membership will be graded and strongly fluctuates across time due to short-term synaptic plasticity [53]. Nevertheless, the plot shows that often several columns are active in parallel and there are some time points where a high percentage of the neurons in all columns is active together. This shows that the found motifs really contain temporal structure and are repeated multiple times in the data. All parameters for the analysis of the shown experiments can be found in table 1. 7 1 2 3 4 5 6 7 8 9 10 frame 0 10 20 30 40 50 60 70 80 90 neuron motif 2 1 2 3 4 5 6 7 8 9 10 frame 0 10 20 30 40 50 60 70 80 90 motif 4 1 2 3 4 5 6 7 8 910 frame 0 10 20 30 40 50 60 70 80 90 motif 5 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 (a) Motifs from hippocampal CA1 region data 0 1000 2000 3000 4000 5000 0.00 0.25 0.50 0.75 activity motif 2 0 1000 2000 3000 4000 5000 0.00 1.00 2.00 3.00 activity motif 4 0 1000 2000 3000 4000 5000 frame 0.00 0.50 1.00 1.50 activity motif 5 (b) Activity of motifs from hippocampal CA1 region data 1 2 3 4 5 6 7 8 9 10 frame 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 neuron motif 1 1 2 3 4 5 6 7 8 910 frame 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 motif 3 0.00 0.02 0.04 0.06 0.08 0.10 (c) Motifs from cortical neuron culture data 0 2500 5000 7500 10000 12500 15000 17500 0.00 1.00 2.00 3.00 activity motif 1 0 2500 5000 7500 10000 12500 15000 17500 frame 0.00 1.00 2.00 3.00 activity motif 3 (d) Activity of motifs from cortical neuron culture data Figure 5: Results from real data. We show the results of our algorithm for two different real datasets. The datasets vary in temporal length as well as number of observed cells. For each dataset we show the motifs that our algorithm identified as real motifs and their activity over time. 1 2 3 4 5 run 1 2 3 4 5 run motif 1 1 2 3 4 5 run 1 2 3 4 5 run motif 2 1 2 3 4 5 run 1 2 3 4 5 run motif 3 1 2 3 4 5 run 1 2 3 4 5 run motif 4 1 2 3 4 5 run 1 2 3 4 5 run motif 5 0e+00 3e-05 6e-05 9e-05 (a) Difference between runs for motifs learned on original matrix 1 2 3 4 5 run 1 2 3 4 5 run motif 1 1 2 3 4 5 run 1 2 3 4 5 run motif 2 1 2 3 4 5 run 1 2 3 4 5 run motif 3 1 2 3 4 5 run 1 2 3 4 5 run motif 4 1 2 3 4 5 run 1 2 3 4 5 run motif 5 0e+00 3e-05 6e-05 9e-05 (b) Difference between runs for motifs learned on shuffled matrix Figure 6: Differences between the five runs for all five learned motifs from hippocampal CA1 region data. The plots show for each motif the difference to the best matching motif from every other run. We did this for the motifs identified in the original hippocampal CA1 region data (a), as well as for the motifs identified in the shuffled spike matrix (b). The motifs found in the shuffled matrix show much higher variability between runs than those found in the original matrix. 5 Discussion We have presented a new approach for the identification of motifs that is not limited to synchronous activity. Our method leverages sparsity constraints on the activity and the motifs themselves to allow a simple and elegant formulation that is able to learn motifs with temporal structure. Our algorithm extends convolutional coding methods with a novel optimization approach to allow modeling of interactions between neurons. The proposed algorithm is designed to identify motifs in data with temporal stationarity. Non-stationarities in the data, which are expected to appear especially in 8 0 2500 5000 7500 10000 12500 15000 17500 0 1000 1000 1000 100 motif 1 4 5 6 7 column 0 2500 5000 7500 10000 12500 15000 17500 frame 0 1000 1000 100 motif 3 3 4 5 column percentage of active neurons Figure 7: Percentage of active neurons per column over time, for all motifs identified in the cortical neuron culture dataset. For each column of the two motifs displayed in figure 5c, we show the percentage of active neurons at every time frame. Vertical grey bars indicate points in time at which all significantly populated columns of a motif fire with at least 30% of their neurons. Their reoccurence shows that the motifs really contain temporal structure and are repeated multiple times in the dataset. recordings from in vivo, are not yet taken into account. In cases where non-stationarities are expected to be strong, the method for stationarity-segmentation introduced in [54] could be used before applying our algorithm to the data. Although our algorithm has some limitations in terms of non-stationarities, results on simulated datasets show that the proposed method outperforms others especially when identifying long motifs. Additionally, the algorithm shows stable performance on real datasets. Moreover, the results found on the cortical neuron culture dataset show that our method is able to detect assemblies within large sets of recorded neurons. Acknowledgments SP and EK thank Eleonora Russo for sharing her knowledge on generating synthetic data and Fynn Bachmann for his support. LAC, BKH and CH thank Lowella Fortuno for technical assistance with cortical cultures and acknowledge the support by the Intramural Research Program of the NIH, NIDA. DD acknowledges partial financial support by DFG Du 354/8-1. SP, EK, MB, DD, FD and FAH gratefully acknowledge partial financial support by DFG SFB 1134. References [1] D. Hebb, The Organization of Behaviour: A Neuropsychological Theory. Wiley, 1949. [2] D. Marr, D. Willshaw, and B. McNaughton, Simple memory: a theory for archicortex. Springer, 1991. [3] W. Singer, “Synchronization of cortical activity and its putative role in information processing and learning,” Annual review of physiology, vol. 55, no. 1, pp. 349–374, 1993. [4] M. A. Nicolelis, E. E. Fanselow, and A. A. Ghazanfar, “Hebb’s dream: the resurgence of cell assemblies,” Neuron, vol. 19, no. 2, pp. 219–221, 1997. [5] Y. Ikegaya, G. Aaron, R. Cossart, D. Aronov, I. Lampl, D. Ferster, and R. Yuste, “Synfire chains and cortical songs: temporal modules of cortical activity,” Science, vol. 304, no. 5670, pp. 559–564, 2004. [6] P. Cossart and P. J. Sansonetti, “Bacterial invasion: The paradigms of enteroinvasive pathogens,” Science, vol. 304, no. 5668, pp. 242–248, 2004. [7] G. Buzsáki, “Large-scale recording of neuronal ensembles,” Nature neuroscience, vol. 7, no. 5, pp. 446–451, 2004. [8] A. Mokeichev, M. Okun, O. Barak, Y. Katz, O. Ben-Shahar, and I. Lampl, “Stochastic emergence of repeating cortical motifs in spontaneous membrane potential fluctuations in vivo,” Neuron, vol. 53, no. 3, pp. 413–425, 2007. [9] E. Pastalkova, V. Itskov, A. Amarasingham, and G. Buzsáki, “Internally generated cell assembly sequences in the rat hippocampus,” Science, vol. 321, no. 5894, pp. 1322–1327, 2008. [10] I. H. Stevenson and K. P. Kording, “How advances in neural recording affect data analysis,” Nature neuroscience, vol. 14, no. 2, pp. 139–142, 2011. [11] M. B. Ahrens, M. B. Orger, D. N. Robson, J. M. Li, and P. J. Keller, “Whole-brain functional imaging at cellular resolution using light-sheet microscopy,” Nature methods, vol. 10, no. 5, pp. 413–420, 2013. [12] L. Carrillo-Reid, J.-e. K. Miller, J. P. Hamm, J. Jackson, and R. Yuste, “Endogenous sequential cortical activity evoked by visual stimuli,” Journal of Neuroscience, vol. 35, no. 23, pp. 8813–8828, 2015. [13] S. Grün, M. Diesmann, and A. Aertsen, “Unitary events in multiple single-neuron spiking activity: I. detection and significance,” Neural Computation, vol. 14, no. 1, pp. 43–80, 2002. [14] S. Grün, M. Diesmann, and A. Aertsen, “Unitary events in multiple single-neuron spiking activity: II. nonstationary data,” Neural Computation, vol. 14, no. 1, pp. 81–119, 2002. 9 [15] B. Staude, S. Rotter, and S. Grün, “Cubic: cumulant based inference of higher-order correlations in massively parallel spike trains,” Journal of Computational Neuroscience, vol. 29, no. 1, pp. 327–350, 2010. [16] B. Staude, S. Grün, and S. Rotter, “Higher-order correlations in non-stationary parallel spike trains: statistical modeling and inference,” Frontiers in Computational Neuroscience, vol. 4, p. 16, 2010. [17] V. Lopes-dos Santos, S. Ribeiro, and A. B. Tort, “Detecting cell assemblies in large neuronal populations,” Journal of neuroscience methods, vol. 220, no. 2, pp. 149–166, 2013. [18] A. C. Smith and P. C. Smith, “A set probability technique for detecting relative time order across multiple neurons,” Neural Comput., vol. 18, no. 5, pp. 1197–1214, 2006. [19] A. C. Smith, V. K. Nguyen, M. P. Karlsson, L. M. Frank, and P. Smith, “Probability of repeating patterns in simultaneous neural data,” Neural Comput., vol. 22, no. 10, pp. 2522–2536, 2010. [20] G. L. Gerstein, E. R. Williams, M. Diesmann, S. Grün, and C. Trengove, “Detecting synfire chains in parallel spike data,” Journal of Neuroscience Methods, vol. 206, no. 1, pp. 54 – 64, 2012. [21] E. Torre, P. Quaglio, M. Denker, T. Brochier, A. Riehle, and S. Grün, “Synchronous spike patterns in macaque motor cortex during an instructed-delay reach-to-grasp task,” Journal of Neuroscience, vol. 36, no. 32, pp. 8329–8340, 2016. [22] R. Yuste, J. N. MacLean, J. Smith, and A. Lansner, “The cortex as a central pattern generator,” Nature Reviews Neuroscience, vol. 6, no. 6, pp. 477–483, 2005. [23] E. Russo and D. Durstewitz, “Cell assemblies at multiple time scales with arbitrary lag constellations,” eLife, vol. 6, p. e19428, 2017. [24] P. Smaragdis, “Non-negative matrix factor deconvolution; extraction of multiple sound sources from monophonic inputs,” Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 3195, pp. 494–499, 2004. [25] P. D. O’Grady and B. A. Pearlmutter, “Convolutive non-negative matrix factorisation with a sparseness constraint,” in 2006 16th IEEE Signal Processing Society Workshop on Machine Learning for Signal Processing, pp. 427–432, 2006. [26] M. A. Nicolelis, L. A. Baccala, R. Lin, and J. K. Chapin, “Sensorimotor encoding by synchronous neural ensemble activity at multiple levels of the somatosensory system,” Science, vol. 268, no. 5215, pp. 1353–1358, 1995. [27] V. Lopes-dos Santos, S. Conde-Ocazionez, M. A. L. Nicolelis, S. T. Ribeiro, and A. B. L. Tort, “Neuronal assembly detection and cell membership specification by principal component analysis,” PLOS ONE, vol. 6, no. 6, pp. 1–16, 2011. [28] P. Comon, “Independent component analysis, a new concept?,” Signal processing, vol. 36, no. 3, pp. 287– 314, 1994. [29] A. Cichocki and R. Zdunek, “Multilayer nonnegative matrix factorisation,” Electronics Letters, vol. 42, no. 16, pp. 947–948, 2006. [30] J. T. Vogelstein, A. M. Packer, T. A. Machado, T. Sippy, B. Babadi, R. Yuste, and L. Paninski, “Fast nonnegative deconvolution for spike train inference from population calcium imaging,” Journal of Neurophysiology, vol. 104, no. 6, pp. 3691–3704, 2010. [31] R. Rubinstein, M. Zibulevsky, and M. Elad, “Double sparsity: Learning sparse dictionaries for sparse signal approximation,” IEEE Transactions on Signal Processing, vol. 58, no. 3, pp. 1553–1564, 2010. [32] E. A. Pnevmatikakis, T. A. Machado, L. Grosenick, B. Poole, J. T. Vogelstein, and L. Paninski, “Rankpenalized nonnegative spatiotemporal deconvolution and demixing of calcium imaging data,” in Computational and Systems Neuroscience (Cosyne) 2013, 2013. [33] E. A. Pnevmatikakis and L. Paninski, “Sparse nonnegative deconvolution for compressive calcium imaging: algorithms and phase transitions,” in NIPS, 2013. [34] F. Diego Andilla and F. A. Hamprecht, “Sparse space-time deconvolution for calcium image analysis,” in Advances in Neural Information Processing Systems 27 (Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, eds.), pp. 64–72, Curran Associates, Inc., 2014. [35] E. A. Pnevmatikakis, Y. Gao, D. Soudry, D. Pfau, C. Lacefield, K. Poskanzer, R. Bruno, R. Yuste, and L. Paninski, “A structured matrix factorization framework for large scale calcium imaging data analysis,” arXiv:1409.2903 [q-bio, stat]. [36] F. Diego and F. A. Hamprecht, “Learning multi-level sparse representations,” in NIPS, 2013. [37] R. J. Weiss and J. P. Bello, “Identifying repeated patterns in music using sparse convolutive non-negative matrix factorization,” in ISMIR, 2010. [38] H. Zou and T. Hastie, “Regularization and variable selection via the elastic net,” Journal of the Royal Statistical Society, Series B (Statistical Methodology), vol. 67, no. 2, pp. 301–320, 2005. [39] D. P. Bertsekas, Nonlinear Programming. Athena Scientific, 1999. [40] R. Tibshirani, “Regression shrinkage and selection via the lasso,” Journal of the Royal Statistical Society. Series B (Methodological), vol. 58, no. 1, pp. 267–288, 1996. [41] P. C. Hansen, “Deconvolution and regularization with Toeplitz matrices,” Numerical Algorithms, vol. 29, no. 4, pp. 323–378, 2002. [42] S. G. Mallat and Z. Zhang, “Matching pursuits with time-frequency dictionaries,” IEEE Transactions on Signal Processing, vol. 41, no. 12, pp. 3397–3415, 1993. [43] M. Protter and M. Elad, “Image sequence denoising via sparse and redundant representations,” IEEE Transactions on Image Processing, vol. 18, no. 1, pp. 27–35, 2009. 10 [44] A. Szlam, K. Kavukcuoglu, and Y. LeCun, “Convolutional matching pursuit and dictionary training,” Computer Research Repository (arXiv), 2010. [45] W. P. Pierskalla, “Letter to the editor – the multidimensional assignment problem,” Operations Research, vol. 16, no. 2, pp. 422–431, 1968. [46] Y. N. Billeh, M. T. Schaub, C. A. Anastassiou, M. Barahona, and C. Koch, “Revealing cell assemblies at multiple levels of granularity,” Journal of Neuroscience Methods, vol. 236, pp. 92 – 106, 2014. [47] T. Pfeiffer, A. Draguhn, S. Reichinnek, and M. Both, “Optimized temporally deconvolved Ca2+ imaging allows identification of spatiotemporal activity patterns of CA1 hippocampal ensembles,” NeuroImage, vol. 94, pp. 239–249, 2014. [48] G. Buzsáki, “Memory consolidation during sleep: A neurophysiological perspective,” Journal of Sleep Research, vol. 7 Suppl 1, pp. 17–23, 1998. [49] G. Girardeau, K. Benchenane, S. I. Wiener, G. Buzsáki, and M. B. Zugaro, “Selective suppression of hippocampal ripples impairs spatial memory,” Nature Neuroscience, vol. 12, no. 10, pp. 1222–1223, 2009. [50] G. Girardeau and M. Zugaro, “Hippocampal ripples and memory consolidation,” Current Opinion in Neurobiology, vol. 21, no. 3, pp. 452–459, 2011. [51] D. B. Howard, K. Powers, Y. Wang, and B. K. Harvey, “Tropism and toxicity of adeno-associated viral vector serotypes 1, 2, 5, 6, 7, 8, and 9 in rat neurons and glia in vitro,” Virology, vol. 372, no. 1, pp. 24 – 34, 2008. [52] C. F. Stevens, “Neurotransmitter release at central synapses,” Neuron, vol. 40, no. 2, pp. 381 – 388, 2003. [53] H. Markram, Y. Wang, and M. Tsodyks, “Differential signaling via the same axon of neocortical pyramidal neurons,” Proceedings of the National Academy of Sciences, vol. 95, no. 9, pp. 5323–5328, 1998. [54] C. S. Quiroga-Lombard, J. Hass, and D. Durstewitz, “Method for stationarity-segmentation of spike train data with application to the pearson cross-correlation,” Journal of Neurophysiology, vol. 110, no. 2, pp. 562–572, 2013. 11 | 2017 | 459 |
6,962 | Estimation of the covariance structure of heavy-tailed distributions Stanislav Minsker Department of Mathematics University of Southern California Los Angeles, CA 90007 minsker@usc.edu Xiaohan Wei Department of Electrical Engineering University of Southern California Los Angeles, CA 90007 xiaohanw@usc.edu Abstract We propose and analyze a new estimator of the covariance matrix that admits strong theoretical guarantees under weak assumptions on the underlying distribution, such as existence of moments of only low order. While estimation of covariance matrices corresponding to sub-Gaussian distributions is well-understood, much less in known in the case of heavy-tailed data. As K. Balasubramanian and M. Yuan write 1, “data from real-world experiments oftentimes tend to be corrupted with outliers and/or exhibit heavy tails. In such cases, it is not clear that those covariance matrix estimators .. remain optimal” and “..what are the other possible strategies to deal with heavy tailed distributions warrant further studies.” We make a step towards answering this question and prove tight deviation inequalities for the proposed estimator that depend only on the parameters controlling the “intrinsic dimension” associated to the covariance matrix (as opposed to the dimension of the ambient space); in particular, our results are applicable in the case of highdimensional observations. 1 Introduction Estimation of the covariance matrix is one of the fundamental problems in data analysis: many important statistical tools, such as Principal Component Analysis (PCA, Hotelling, 1933) and regression analysis, involve covariance estimation as a crucial step. For instance, PCA has immediate applications to nonlinear dimension reduction and manifold learning techniques (Allard et al., 2012), genetics (Novembre et al., 2008), computational biology (Alter et al., 2000), among many others. However, assumptions underlying the theoretical analysis of most existing estimators, such as various modifications of the sample covariance matrix, are often restrictive and do not hold for real-world scenarios. Usually, such estimators rely on heuristic (and often bias-producing) data preprocessing, such as outlier removal. To eliminate such preprocessing step from the equation, one has to develop a class of new statistical estimators that admit strong performance guarantees, such as exponentially tight concentration around the unknown parameter of interest, under weak assumptions on the underlying distribution, such as existence of moments of only low order. In particular, such heavytailed distributions serve as a viable model for data corrupted with outliers – an almost inevitable scenario for applications. We make a step towards solving this problem: using tools from the random matrix theory, we will develop a class of robust estimators that are numerically tractable and are supported by strong theoretical evidence under much weaker conditions than currently available analogues. The term “robustness” refers to the fact that our estimators admit provably good performance even when the underlying distribution is heavy-tailed. 1Balasubramanian and Yuan (2016) 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1.1 Notation and organization of the paper Given A ∈Rd1×d2, let AT ∈Rd2×d1 be transpose of A. If A is symmetric, we will write λmax (A) and λmin (A) for the largest and smallest eigenvalues of A. Next, we will introduce the matrix norms used in the paper. Everywhere below, ∥· ∥stands for the operator norm ∥A∥:= p λmax (AT A). If d1 = d2 = d, we denote by trA the trace of A. For A ∈Rd1×d2, the nuclear norm ∥· ∥1 is defined as ∥A∥1 = tr( √ AT A), where √ AT A is a nonnegative definite matrix such that ( √ AT A)2 = AT A. The Frobenius (or Hilbert-Schmidt) norm is ∥A∥F = p tr(AT A), and the associated inner product is ⟨A1, A2⟩= tr(A∗ 1A2). For z ∈Rd, ∥z∥2 stands for the usual Euclidean norm of z. Let A, B be two self-adjoint matrices. We will write A ⪰B (or A ≻B) iff A −B is nonnegative (or positive) definite. For a, b ∈R, we set a ∨b := max(a, b) and a ∧b := min(a, b). We will also use the standard Big-O and little-o notation when necessary. Finally, we give a definition of a matrix function. Let f be a real-valued function defined on an interval T ⊆R, and let A ∈Rd×d be a symmetric matrix with the eigenvalue decomposition A = UΛU ∗ such that λj(A) ∈T, j = 1, . . . , d. We define f(A) as f(A) = Uf(Λ)U ∗, where f(Λ) = f λ1 ... λd := f(λ1) ... f(λd) . Few comments about organization of the material in the rest of the paper: section 1.2 provides an overview of the related work. Section 2 contains the mains results of the paper. The proofs are outlined in section 4; longer technical arguments can be found in the supplementary material. 1.2 Problem formulation and overview of the existing work Let X ∈ Rd be a random vector with mean EX = µ0, covariance matrix Σ0 = E (X −µ0)(X −µ0)T , and assume E∥X −µ0∥4 2 < ∞. Let X1, . . . , Xm be i.i.d. copies of X. Our goal is to estimate the covariance matrix Σ from Xj, j ≤m. This problem and its variations have previously received significant attention by the research community: excellent expository papers by Cai et al. (2016) and Fan et al. (2016) discuss the topic in detail. However, strong guarantees for the best known estimators hold (with few exceptions mentioned below) under the restrictive assumption that X is either bounded with probability 1 or has sub-Gaussian distribution, meaning that there exists σ > 0 such that for any v ∈Rd of unit Euclidean norm, Pr (|⟨v, X −µ0⟩| ≥t) ≤2e−t2σ2 2 . In the discussion accompanying the paper by Cai et al. (2016), Balasubramanian and Yuan (2016) write that “data from real-world experiments oftentimes tend to be corrupted with outliers and/or exhibit heavy tails. In such cases, it is not clear that those covariance matrix estimators described in this article remain optimal” and “..what are the other possible strategies to deal with heavy tailed distributions warrant further studies.” This motivates our main goal: develop new estimators of the covariance matrix that (i) are computationally tractable and perform well when applied to heavy-tailed data and (ii) admit strong theoretical guarantees (such as exponentially tight concentration around the unknown covariance matrix) under weak assumptions on the underlying distribution. Note that, unlike the majority of existing literature, we do not impose any further conditions on the moments of X, or on the “shape” of its distribution, such as elliptical symmetry. Robust estimators of covariance and scatter have been studied extensively during the past few decades. However, majority of rigorous theoretical results were obtained for the class of elliptically symmetric distributions which is a natural generalization of the Gaussian distribution; we mention just a small subsample among the thousands of published works. Notable examples include the Minimum Covariance Determinant estimator and the Minimum Volume Ellipsoid estimator which are discussed in (Hubert et al., 2008), as well Tyler’s (Tyler, 1987) M-estimator of scatter. Works by Fan et al. (2016); Wegkamp et al. (2016); Han and Liu (2017) exploit the connection between Kendall’s tau and Pearson’s correlation coefficient (Fang et al., 1990) in the context of elliptical distributions to obtain robust estimators of correlation matrices. Interesting results for shrinkage-type estimators have been obtained by Ledoit and Wolf (2004); Ledoit et al. (2012). In a recent work, Chen et al. (2015) study Huber’s ε-contamination model which assumes that the data is generated from the 2 distribution of the form (1 −ε)F + εQ, where Q is an arbitrary distribution of “outliers” and F is an elliptical distribution of “inliers”, and propose novel estimator based on the notion of “matrix depth” which is related to Tukey’s depth function (Tukey, 1975); a related class of problems has been studies by Diakonikolas et al. (2016). The main difference of the approach investigated in this paper is the ability to handle a much wider class of distributions that are not elliptically symmetric and only satisfy weak moment assumptions. Recent papers by Catoni (2016), Giulini (2015), Fan et al. (2016, 2017); Fan and Kim (2017) and Minsker (2016) are closest in spirit to this direction. For instance, Catoni (2016) constructs a robust estimator of the Gram matrix of a random vector Z ∈Rd (as well as its covariance matrix) via estimating the quadratic form E ⟨Z, u⟩2 uniformly over all ∥u∥2 = 1. However, the bounds are obtained under conditions more stringent than those required by our framework, and resulting estimators are difficult to evaluate in applications even for data of moderate dimension. Fan et al. (2016) obtain bounds in norms other than the operator norm which the focus of the present paper (however, we plan to address optimality guarantees with respect to other norms in the future). Minsker (2016) and Fan et al. (2016) use adaptive truncation arguments to construct robust estimators of the covariance matrix. However, their results are only applicable to the situation when the data is centered (that is, µ0 = 0). In the robust estimation framework, rigorous extension of the arguments to the case of non-centered high-dimensional observations is non-trivial and requires new tools, especially if one wants to avoid statistically inefficient procedures such as sample splitting. We formulate and prove such extensions in this paper. 2 Main results Definition of our estimator has its roots in the technique proposed by Catoni (2012). Let ψ(x) = (|x| ∧1) sign(x) (1) be the usual truncation function. As before, let X1, . . . , Xm be i.i.d. copies of X, and assume that bµ is a suitable estimator of the mean µ0 from these samples, to be specified later. We define bΣ as bΣ := 1 mθ m X i=1 ψ θ(Xi −bµ)(Xi −bµ)T , (2) where θ ≃m−1/2 is small (the exact value will be given later). It easily follows from the definition of the matrix function that bΣ = 1 mθ m X i=1 (Xi −bµ)(Xi −bµ)T ∥Xi −bµ∥2 2 ψ θ ∥Xi −bµ∥2 2 , hence it is easily computable. Note that ψ(x) = x in the neighborhood of 0; it implies that whenever all random variables θ ∥Xi −bµ∥2 2 , 1 ≤i ≤m are “small” (say, bounded above by 1) and ˆµ is the sample mean, bΣ is close to the usual sample covariance estimator. On the other hand, ψ “truncates” ∥Xi −bµ∥2 2 on level ≃√m, thus limiting the effect of outliers. Our results (formally stated below, see Theorem 2.1) imply that for an appropriate choice of θ = θ(t, m, σ),
bΣ −Σ0
≤C0σ0 r β m with probability ≥1 −de−β for some positive constant C0, where σ2 0 :=
E ∥X −µ0∥2 2 (X −µ0)(X −µ0)T
is the "matrix variance". 2.1 Robust mean estimation There are several ways to construct a suitable estimator of the mean µ0. We present the one obtained via the “median-of-means” approach. Let x1, . . . , xk ∈Rd. Recall that the geometric median of x1, . . . , xk is defined as med (x1, . . . , xk) := argmin z∈Rd k X j=1 ∥z −xj∥2 . 3 Let 1 < β < ∞be the confidence parameter, and set k = j 3.5β k + 1; we will assume that k ≤m 2 . Divide the sample X1, . . . , Xm into k disjoint groups G1, . . . , Gk of size j m k k each, and define ˆµj := 1 |Gj| X i∈Gj Xi, j = 1 . . . k, ˆµ := med (ˆµ1, . . . , ˆµk) . (3) It then follows from Corollary 4.1 in (Minsker, 2015) that Pr ∥ˆµ −µ∥2 ≥11 r tr(Σ0)(β + 1) m ≤e−β. (4) 2.2 Robust covariance estimation Let bΣ be the estimator defined in (2) with bµ being the “median-of-means” estimator (3). Then bΣ admits the following performance guarantees: Lemma 2.1. Assume that σ ≥σ0, and set θ = 1 σ q β m. Moreover, let d := σ2 0/∥Σ0∥2, and suppose that m ≥Cdβ, where C > 0 is an absolute constant. Then
bΣ −Σ0
≤3σ r β m (5) with probability at least 1 −5de−β. Remark 2.1. The quantity ¯d is a measure of “intrinsic dimension” akin to the “effective rank” r = tr(Σ0) ∥Σ0∥; see Lemma 2.3 below for more details. Moreover, note that the claim of Lemma 2.1 holds for any σ ≥σ0, rather than just for σ = σ0; this “degree of freedom” allows construction of adaptive estimators, as it is shown below. The statement above suggests that one has to know the value of (or a tight upper bound on) the “matrix variance” σ2 0 in order to obtain a good estimator bΣ. More often than not, such information is unavailable. To make the estimator completely data-dependent, we will use Lepski’s method (Lepski, 1992). To this end, assume that σmin , σmax are “crude” preliminary bounds such that σmin ≤σ0 ≤σmax . Usually, σmin and σmax do not need to be precise, and can potentially differ from σ0 by several orders of magnitude. Set σj := σmin 2j and J = {j ∈Z : σmin ≤σj < 2σmax } . Note that the cardinality of J satisfies card(J ) ≤1 + log2(σmax /σmin ). For each j ∈J , define θj := θ(j, β) = 1 σj q β m. Define bΣm,j = 1 mθj m X i=1 ψ θj(Xi −bµ)(Xi −bµ)T . Finally, set j∗:= min ( j ∈J : ∀k > j s.t. k ∈J ,
bΣm,k −bΣm,j
≤6σk r β m ) (6) and bΣ∗:= bΣm,j∗. Note that the estimator bΣ∗depends only on X1, . . . , Xm, as well as σmin , σmax . Our main result is the following statement regarding the performance of the data-dependent estimator bΣ∗: Theorem 2.1. Suppose m ≥Cdβ, then, the following inequality holds with probability at least 1 −5d log2 2σmax σmin e−β:
bΣ∗−Σ0
≤18σ0 r β m. 4 An immediate corollary of Theorem 2.1 is the quantitative result for the performance of PCA based on the estimator bΣ∗. Let Projk be the orthogonal projector on a subspace corresponding to the k largest positive eigenvalues λ1, . . . , λk of Σ0 (here, we assume for simplicity that all the eigenvalues are distinct), and [ Projk – the orthogonal projector of the same rank as Projk corresponding to the k largest eigenvalues of bΣ∗. The following bound follows from the Davis-Kahan perturbation theorem (Davis and Kahan, 1970), more specifically, its version due to Zwald and Blanchard (2006, Theorem 3 ). Corollary 2.1. Let ∆k = λk −λk+1, and assume that ∆k ≥72σ0 q β m. Then
[ Projk −Projk
≤36 ∆k σ0 r β m with probability ≥1 −5d log2 2σmax σmin e−β. It is worth comparing the bound of Lemma 2.1 and Theorem 2.1 above to results of the paper by Fan et al. (2016), which constructs a covariance estimator bΣ′ m under the assumption that the random vector X is centered, and supv∈Rd:∥v∥2≤1 E |⟨v, X⟩|4 = B < ∞. More specifically, bΣ′ m satisfies the inequality P
bΣ′ m −Σ0
≥ r C1βBd m ! ≤de−β, (7) where C1 > 0 is an absolute constant. The main difference between (7) and the bounds of Lemma 2.1 and Theorem 2.1 is that the latter are expressed in terms of σ2 0, while the former is in terms of B. The following lemma demonstrates that our bounds are at least as good: Lemma 2.2. Suppose that EX = 0 and supv∈Rd:∥v∥2≤1 E |⟨v, X⟩|4 = B < ∞. Then Bd ≥σ2 0. It follows from the above lemma that d = σ2 0/∥Σ0∥2 ≲d. Hence, By Theorem 2.1, the error rate of estimator bΣ∗is bounded above by O( p d/m) if m ≳d. It has been shown (for example, Lounici, 2014) that the minimax lower bound of covariance estimation is of order Ω( p d/m). Hence, the bounds of Fan et al. (2016) as well as our results imply correct order of the error. That being said, the “intrinsic dimension” ¯d reflects the structure of the covariance matrix and can potentially be much smaller than d, as it is shown in the next section. 2.3 Bounds in terms of intrinsic dimension In this section, we show that under a slightly stronger assumption on the fourth moment of the random vector X, the bound O( p d/m) is suboptimal, while our estimator can achieve a much better rate in terms of the “intrinsic dimension” associated to the covariance matrix. This makes our estimator useful in applications involving high-dimensional covariance estimation, such as PCA. Assume the following uniform bound on the kurtosis: max k=1,2,...,d r E X(k) −µ(k) 0 4 E X(k) −µ(k) 0 2 = R < ∞, (8) where X(k), µ(k) 0 denotes the k-th entry of X and µ0 respectively. The intrinsic dimension of the covariance matrix Σ0 can be measured by the effective rank defined as r(Σ0) = tr(Σ0) ∥Σ0∥. Note that we always have r(Σ0) ≤rank(Σ0) ≤d, and it some situations r(Σ0) ≪rank(Σ0), for instance if the covariance matrix is “approximately low-rank”, meaning that it has many small eigenvalues. The constant σ2 0 is closely related to the effective rank as is shown in the following lemma (the proof of which is included in the supplementary material): 5 Lemma 2.3. Suppose that (8) holds. Then, r(Σ0)∥Σ0∥2 ≤σ2 0 ≤R2r(Σ0)∥Σ0∥2. As a result, we have r(Σ0) ≤d ≤R2r(Σ0). The following corollary immediately follows from Theorem 2.1 and Lemma 2.3: Corollary 2.2. Suppose that m ≥Cβr(Σ0) for an absolute constant C > 0 and that (8) holds. Then
bΣ∗−Σ0
≤18R∥Σ0∥ r r(Σ0)β m with probability at least 1 −5d log2 2σmax σmin e−β. 3 Applications: low-rank covariance estimation In many data sets encountered in modern applications (for instance, gene expression profiles (Saal et al., 2007)), dimension of the observations, hence the corresponding covariance matrix, is larger than the available sample size. However, it is often possible, and natural, to assume that the unknown matrix possesses special structure, such as low rank, thus reducing the “effective dimension” of the problem. The goal of this section is to present an estimator of the covariance matrix that is “adaptive” to the possible low-rank structure; such estimators are well-known and have been previously studied for the bounded and sub-Gaussian observations (Lounici, 2014). We extend these results to the case of heavy-tailed observations; in particular, we show that the estimator obtained via soft-thresholding applied to the eigenvalues of bΣ∗admits optimal guarantees in the Frobenius (as well as operator) norm. Let bΣ∗be the estimator defined in the previous section, see equation (6), and set bΣτ ∗= argmin A∈Rd×d
A −bΣ∗
2 F + τ ∥A∥1 , (9) where τ > 0 controls the amount of penalty. It is well-known (e.g., see the proof of Theorem 1 in Lounici (2014)) that bΣτ 2n can be written explicitly as bΣτ ∗= d X i=1 max λi bΣ∗ −τ/2, 0 vi(bΣ∗)vi(bΣ∗)T , where λi(bΣ∗) and vi(bΣ∗) are the eigenvalues and corresponding eigenvectors of bΣ∗. We are ready to state the main result of this section. Theorem 3.1. For any τ ≥36σ0 q β m,
bΣτ ∗−Σ0
2 F ≤ inf A∈Rd×d " ∥A −Σ0∥2 F + (1 + √ 2)2 8 τ 2rank(A) # . (10) with probability ≥1 −5d log2 2σmax σmin e−β. In particular, if rank(Σ0) = r and τ = 36σ0 q β m, we obtain that
bΣτ ∗−Σ0
2 F ≤162 σ2 0 1 + √ 2 2 βr m with probability ≥1 −5d log2 2σmax σmin e−β. 4 Proofs 4.1 Proof of Lemma 2.1 The result is a simple corollary of the following statement. 6 Lemma 4.1. Set θ = 1 σ q β m, where σ ≥σ0 and m ≥β. Let d := σ2 0/∥Σ0∥2. Then, with probability at least 1 −5de−β,
bΣ −Σ0
≤2σ r β m +C′∥Σ0∥ s dσ ∥Σ0∥ β m 3 4 + √ dσ ∥Σ0∥ β m + s dσ ∥Σ0∥ β m 5 4 + d β m 3 2 + dβ2 m2 + d 5 4 β m 9 4 , where C′ > 1 is an absolute constant. Now, by Corollary ?? in the supplement, it follows that d = σ2 0/∥Σ0∥2 ≥tr(Σ0)/∥Σ0∥≥1. Thus, assuming that the sample size satisfies m ≥(6C′)4dβ, then, dβ/m ≤1/(6C′)4 < 1, and by some algebraic manipulations we have that
bΣ −Σ0
≤2σ r β m + σ r β m = 3σ r β m. (11) For completeness, a detailed computation is given in the supplement. This finishes the proof. 4.2 Proof of Lemma 4.1 Let Bβ = 11 p 2tr(Σ0)β/m be the error bound of the robust mean estimator bµ defined in (3). Let Zi = Xi −µ0, Σµ = E (Zi −µ)(Zi −µ)T , ∀i = 1, 2, · · · , d, and ˆΣµ = 1 mθ m X i=1 (Xi −µ)(Xi −µ)T ∥Xi −µ∥2 2 ψ θ ∥Xi −µ∥2 2 , for any ∥µ∥2 ≤Bβ. We begin by noting that the error can be bounded by the supremum of an empirical process indexed by µ, i.e.
ˆΣ −Σ0
≤ sup ∥µ∥2≤Bβ
ˆΣµ −Σ0
≤ sup ∥µ∥2≤Bβ
ˆΣµ −Σµ
+ ∥Σµ −Σ0∥ (12) with probability at least 1 −e−β. We first estimate the second term ∥Σµ −Σ0∥. For any ∥µ∥2 ≤Bβ, ∥Σµ −Σ0∥=
E (Zi −µ)(Zi −µ)T −ZiZT i
= sup v∈Rd:∥v∥2≤1 E h ⟨Zi −µ, v⟩2 −⟨Zi, v⟩2i = (µT v)2 ≤∥µ∥2 2 ≤B2 β = 242tr(Σ0)β m , with probability at least 1 −e−β. It follows from Corollary ?? in the supplement that with the same probability ∥Σµ −Σ0∥≤242 σ2 0β ∥Σ0∥m ≤242 σ2β ∥Σ0∥m = 242∥Σ0∥dβ m . (13) Our main task is then to bound the first term in (12). To this end, we rewrite it as a double supremum of an empirical process: sup ∥µ∥2≤Bβ
ˆΣµ −Σµ
= sup ∥µ∥2≤Bβ,∥v∥2≤1 vT ˆΣµ −Σµ v It remains to estimate the supremum above. Lemma 4.2. Set θ = 1 σ q β m, where σ ≥σ0 and m ≥β. Let d := σ2 0/∥Σ0∥2. Then, with probability at least 1 −4de−β, sup ∥µ∥2≤Bβ,∥v∥2≤1 vT ˆΣµ −Σµ v ≤2σ r β m +C′′∥Σ0∥ s dσ ∥Σ0∥ β m 3 4 + √ dσ ∥Σ0∥ β m + s dσ ∥Σ0∥ β m 5 4 + d β m 3 2 + dβ2 m2 + d 5 4 β m 9 4 , where C′′ > 1 is an absolute constant. 7 Note that σ ≥σ0 by defnition, thus, d ≤σ2/∥Σ0∥2. Combining the above lemma with (12) and (13) finishes the proof. 4.3 Proof of Theorem 2.1 Define ¯j := min {j ∈J : σj ≥σ0}, and note that σ¯j ≤2σ0. We will demonstrate that j∗≤¯j with high probability. Observe that Pr (j∗> ¯j) ≤Pr [ k∈J :k>¯j (
bΣm,k −Σm,¯j
> 6σk r β n ) ≤Pr
bΣm,¯j −Σ0
> 3σ¯j r β m ! + X k∈J : k>¯j Pr
bΣm,k −Σ0
> 3σk r β m ! ≤5de−β + 5d log2 σmax σmin e−β, where we applied (5) to estimate each of the probabilities in the sum under the assumption that the number of samples m ≥Cdβ and σk ≥σ¯j ≥σ0. It is now easy to see that the event B = \ k∈J :k≥¯j (
bΣm,k −Σ0
≤3σk r β m ) of probability ≥1 −5d log2 2σmax σmin e−β is contained in E = {j∗≤¯j}. Hence, on B
bΣ∗−Σ0
≤∥bΣ∗−bΣm,¯j∥+ ∥bΣm,¯j −Σ0∥≤6σ¯j r β m + 3σ¯j r β m ≤12σ0 r β m + 6σ0 r β m = 18σ0 r β m, and the claim follows. 4.4 Proof of Theorem 3.1 The proof is based on the following lemma: Lemma 4.3. Inequality (10) holds on the event E = n τ ≥2
bΣ∗−Σ0
o . To verify this statement, it is enough to repeat the steps of the proof of Theorem 1 in Lounici (2014), replacing each occurrence of the sample covariance matrix by its “robust analogue” bΣ∗. It then follows from Theorem 2.1 that Pr(E) ≥1 −5d log2 2σmax σmin e−β whenever τ ≥36σ0 q β m. Acknowledgments Research of S. Minsker and X. Wei was partially supported by the National Science Foundation grant NSF DMS-1712956. References Allard, W. K., G. Chen, and M. Maggioni (2012). Multi-scale geometric methods for data sets II: Geometric multi-resolution analysis. Applied and Computational Harmonic Analysis 32(3), 435–462. Alter, O., P. O. Brown, and D. Botstein (2000). Singular value decomposition for genome-wide expression data processing and modeling. Proceedings of the National Academy of Sciences 97(18), 10101–10106. Balasubramanian, K. and M. Yuan (2016). Discussion of “Estimating structured high-dimensional covariance and precision matrices: optimal rates and adaptive estimation”. Electronic Journal of Statistics 10(1), 71–73. Bhatia, R. (2013). Matrix analysis, Volume 169. Springer Science & Business Media. 8 Boucheron, S., G. Lugosi, and P. Massart (2013). Concentration inequalities: A nonasymptotic theory of independence. Oxford university press. Cai, T. T., Z. Ren, and H. H. Zhou (2016). Estimating structured high-dimensional covariance and precision matrices: optimal rates and adaptive estimation. Electron. J. Statist. 10(1), 1–59. Catoni, O. (2012). Challenging the empirical mean and empirical variance: a deviation study. In Annales de l’Institut Henri Poincaré, Probabilités et Statistiques, Volume 48, pp. 1148–1185. Catoni, O. (2016). PAC-Bayesian bounds for the Gram matrix and least squares regression with a random design. arXiv preprint arXiv:1603.05229. Chen, M., C. Gao, and Z. Ren (2015). Robust covariance matrix estimation via matrix depth. arXiv preprint arXiv:1506.00691. Davis, C. and W. M. Kahan (1970). The rotation of eigenvectors by a perturbation. iii. SIAM Journal on Numerical Analysis 7(1), 1–46. Diakonikolas, I., G. Kamath, D. M. Kane, J. Li, A. Moitra, and A. Stewart (2016). Robust estimators in high dimensions without the computational intractability. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pp. 655–664. IEEE. Fan, J. and D. Kim (2017). Robust high-dimensional volatility matrix estimation for high-frequency factor model. Journal of the American Statistical Association. Fan, J., Q. Li, and Y. Wang (2017). Estimation of high dimensional mean regression in the absence of symmetry and light tail assumptions. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 79(1), 247–265. Fan, J., Y. Liao, and H. Liu (2016). An overview of the estimation of large covariance and precision matrices. The Econometrics Journal 19(1), C1–C32. Fan, J., W. Wang, and Y. Zhong (2016). An ℓ∞eigenvector perturbation bound and its application to robust covariance estimation. arXiv preprint arXiv:1603.03516. Fan, J., W. Wang, and Z. Zhu (2016). Robust low-rank matrix recovery. arXiv preprint arXiv:1603.08315. Fang, K.-T., S. Kotz, and K. W. Ng (1990). Symmetric multivariate and related distributions. Chapman and Hall. Giulini, I. (2015). PAC-Bayesian bounds for Principal Component Analysis in Hilbert spaces. arXiv preprint arXiv:1511.06263. Han, F. and H. Liu (2017). ECA: high dimensional elliptical component analysis in non-Gaussian distributions. Journal of the American Statistical Association. Hotelling, H. (1933). Analysis of a complex of statistical variables into principal components. Journal of educational psychology 24(6), 417. Hubert, M., P. J. Rousseeuw, and S. Van Aelst (2008). High-breakdown robust multivariate methods. Statistical Science, 92–119. Ledoit, O. and M. Wolf (2004). A well-conditioned estimator for large-dimensional covariance matrices. Journal of multivariate analysis 88(2), 365–411. Ledoit, O., M. Wolf, et al. (2012). Nonlinear shrinkage estimation of large-dimensional covariance matrices. The Annals of Statistics 40(2), 1024–1060. Lepski, O. (1992). Asymptotically minimax adaptive estimation. I: Upper bounds. optimally adaptive estimates. Theory of Probability & Its Applications 36(4), 682–697. Lounici, K. (2014). High-dimensional covariance matrix estimation with missing observations. Bernoulli 20(3), 1029–1058. Minsker, S. (2015). Geometric median and robust estimation in Banach spaces. Bernoulli 21(4), 2308–2335. Minsker, S. (2016). Sub-Gaussian estimators of the mean of a random matrix with heavy-tailed entries. arXiv preprint arXiv:1605.07129. Novembre, J., T. Johnson, K. Bryc, Z. Kutalik, A. R. Boyko, A. Auton, A. Indap, K. S. King, S. Bergmann, M. R. Nelson, et al. (2008). Genes mirror geography within Europe. Nature 456(7218), 98–101. 9 Saal, L. H., P. Johansson, K. Holm, S. K. Gruvberger-Saal, Q.-B. She, M. Maurer, S. Koujak, A. A. Ferrando, P. Malmström, L. Memeo, et al. (2007). Poor prognosis in carcinoma is associated with a gene expression signature of aberrant PTEN tumor suppressor pathway activity. Proceedings of the National Academy of Sciences 104(18), 7564–7569. Tropp, J. A. (2012). User-friendly tail bounds for sums of random matrices. Found. Comput. Math. 12(4), 389–434. Tropp, J. A. (2015). An introduction to matrix concentration inequalities. arXiv preprint arXiv:1501.01571. Tukey, J. W. (1975). Mathematics and the picturing of data. In Proceedings of the international congress of mathematicians, Volume 2, pp. 523–531. Tyler, D. E. (1987). A distribution-free M-estimator of multivariate scatter. The Annals of Statistics, 234–251. Wegkamp, M., Y. Zhao, et al. (2016). Adaptive estimation of the copula correlation matrix for semiparametric elliptical copulas. Bernoulli 22(2), 1184–1226. Zwald, L. and G. Blanchard (2006). On the convergence of eigenspaces in kernel principal component analysis. In Advances in Neural Information Processing Systems 18, pp. 1649–1656. Cambridge, MA: MIT Press. 10 | 2017 | 46 |
6,963 | Neural Networks for Efficient Bayesian Decoding of Natural Images from Retinal Neurons Nikhil Parthasarathy∗ Stanford University nikparth@gmail.com Eleanor Batty∗ Columbia University erb2180@columbia.edu William Falcon Columbia University waf2107@columbia.edu Thomas Rutten Columbia University tkr2112@columbia.edu Mohit Rajpal Columbia University mr3522@columbia.edu E.J. Chichilnisky† Stanford University ej@stanford.edu Liam Paninski† Columbia University liam@stat.columbia.edu Abstract Decoding sensory stimuli from neural signals can be used to reveal how we sense our physical environment, and is valuable for the design of brain-machine interfaces. However, existing linear techniques for neural decoding may not fully reveal or exploit the fidelity of the neural signal. Here we develop a new approximate Bayesian method for decoding natural images from the spiking activity of populations of retinal ganglion cells (RGCs). We sidestep known computational challenges with Bayesian inference by exploiting artificial neural networks developed for computer vision, enabling fast nonlinear decoding that incorporates natural scene statistics implicitly. We use a decoder architecture that first linearly reconstructs an image from RGC spikes, then applies a convolutional autoencoder to enhance the image. The resulting decoder, trained on natural images and simulated neural responses, significantly outperforms linear decoding, as well as simple point-wise nonlinear decoding. These results provide a tool for the assessment and optimization of retinal prosthesis technologies, and reveal that the retina may provide a more accurate representation of the visual scene than previously appreciated. 1 Introduction Neural coding in sensory systems is often studied by developing and testing encoding models that capture how sensory inputs are represented in neural signals. For example, models of retinal function are designed to capture how retinal ganglion cells (RGCs) respond to diverse patterns of visual stimulation. An alternative approach – decoding visual stimuli from RGC responses – provides a complementary method to assess the information contained in RGC spikes about the visual world [31, 37]. Understanding decoding can also be useful for the design of retinal prostheses, by providing a measure of the visual restoration that is possible with a prosthesis [26]. The most common and well-understood decoding approach, linear regression, has been used in various sensory systems [29, 40]. This method was shown to be successful at reconstructing white noise temporal signals from RGC activity [37] and revealed that coarse structure of natural image patches could be recovered from ensemble responses in the early visual system [33]. Other linear methods ∗,†Equal contributions 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. A) B) Linear Decoded Image Output feature maps Convolu!onal filters Conv(7, 64) Downsample(2,2) Conv(5, 128) Downsample(2,2) Enhanced Image Notaon: Conv(filter_size, filter_num) Upsample(2,2) Conv(7,1) Upsample(2,2) Conv(5,64) Upsample(2,2) Conv(3,128) Upsample(2,2) Conv(3,256) Conv(3, 256) Downsample(2,2) Conv(3, 256) Downsample(2,2) Deep Neural Network Linear Decoder RGC Responses d e d o c e D r a e niL e g a m I Image NN-enhanced Image Figure 1: Outline of approach. A) The original image is fed through the simulated neural encoding models to produce RGC responses on which we fit a linear decoder. A deep neural network is then used to further enhance the image. B) We use a convolutional autoencoder with a 4 layer encoder and a 4 layer decoder to enhance the linear decoded image. such as PCA and linear perceptrons have been used to decode low-level features such as color and edge orientation from cortical visual areas [14, 4]. For more complex natural stimuli, computationally expensive approximations to Bayesian inference have been used to construct decoders that incorporate important prior information about signal structure [25, 27, 30]. However, despite decades of effort, deriving an accurate prior on natural images poses both computational and theoretical challenges, as does computing the posterior distribution on images given an observed neural response, limiting the applicability of traditional Bayesian inference. Here we develop and assess a new method for decoding natural images from the spiking activity of large populations of RGCs, to sidestep some of these difficulties1 . Our approach exploits inference tools that approximate optimal Bayesian inference, and emerge from the recent literature on deep neural network (DNN) architectures for computer vision tasks such as super-resolution, denoising, and inpainting [17, 39]. We propose a novel staged decoding methodology – linear decoding followed by a (nonlinear) DNN trained specifically to enhance the images output by the linear decoder – and use it to reconstruct natural images from realistic simulated retinal ganglion cell responses. This approach leverages recent progress in deep learning to more fully incorporate natural image priors in the decoder. We show that the approach substantially outperforms linear decoding. These findings provide a potential tool to assess the fidelity of retinal prostheses for treating blindness, and provide a substantially higher bound on how accurately real visual signals may be represented in the brain. 2 Approach To decode images from spikes, we use a linear decoder to produce a baseline reconstructed image, then enhance this image using a more complex nonlinear model, namely a static nonlinearity or a DNN (Figure 1). There are a few reasons for this staged approach. First, it allows us to cast the decoding problem as a classic image enhancement problem that can directly utilize the computer vision literature on super-resolution, in-painting, and denoising. This is especially important for the construction of DNNs, which remain nontrivial to tune for problems in non-standard domains (e.g., image reconstruction from neural spikes). Second, by solving the problem partially with a simple linear model, we greatly reduce the space of transformations that a neural network needs to learn, constraining the problem significantly. 1Source Code is available at: https://github.com/nikparth/visual-neural-decode 2 In order to leverage image enhancement tools from deep learning, we need large training data sets. We use an encoder-decoder approach: first, develop a realistic encoding model that can simulate neural responses to arbitrary input images, constrained by real data. We build this encoder to predict the average outputs of many RGCs, but this approach could also be applied to encoders fit on a cell-by-cell basis [3]. Once this encoder is in hand, we train arbitrarily complex decoders by sampling many natural scenes, passing them through the encoder model, and training the decoder so that the output of the full encoder-decoder pipeline matches the observed image as accurately as possible. 2.1 Encoder model: simulation of retinal ganglion cell responses For our encoding model, we create a static simulation of the four most numerous retinal ganglion cell types (ON and OFF parasol cells and ON and OFF midget cells) based on experimental data. We fit linear-nonlinear-Poisson models to RGC responses to natural scene movies, recorded in an isolated macaque retina preparation [7, 10, 12]. These fits produce imperfect but reasonable predictions of RGC responses (Figure 2 A). We averaged the parameters (spatial filter, temporal filter, and sigmoid parameters) of these fits across neurons, to create a single model for each of four cell types. We chose this model as it is simple and a relatively good baseline encoder with which to test our decoding method. (Recently, encoding models that leverage deep neural networks [3, 24] have been shown to fit RGC responses better than the simple model we are using; substituting a more complex encoding model should improve the quality of our final decoder, and we intend to pursue this approach in future work.) To deal with static images, we then reduced these models to static models, consisting of one spatial filter followed by a nonlinearity and Poisson spike generation. The outputs of the static model are equal to summing the spikes produced by the full model over the image frames of a pulse movie: gray frames followed by one image displayed for multiple frames. Spatial filters and the nonlinearity of the final encoding model are shown in Figure 2 B and C. We then tiled the image space (128 x 128 pixels) with these simulated neurons. For each cell type, we fit a 2D Gaussian to the spatial filter of that cell type and then chose receptive field centers with a width equal to 2 times the standard deviation of the Gaussian fit rounded up to the nearest integer. The centers are shifted on alternate rows to form a lattice (Figure 2 D). The resulting response of each neuron to an example image is displayed in Figure 2 E as a function of its location on the image. The entire simulation consisted of 5398 RGCs. 2.2 Model architecture Our decoding model starts with a classic linear regression decoder (LD) to generate linearly decoded images ILD [37]. The LD learns a reconstruction mapping ˆθ between neural responses X and stimuli images IST by modeling each pixel as a weighted sum of the neural responses: ˆθ = (XT X)−1XT IST . X is augmented with a bias term in the first column. The model inputs are m images, p pixels and n neurons such that: IST ∈Rm×p, X ∈Rm×(n+1), ˆθ ∈R(n+1)×p. To decode the set of neural responses X we compute the dot product between ˆθ and X: ILD = X ˆθ. The next step of our decoding pipeline enhances ILD through the use of a deep convolutional autoencoder (CAE). Our model consists of a 4-layer encoder and a 4-layer decoder. This model architecture was inspired by similar models used in image denoising [11] and inpainting [35, 22]. In the encoder network E, each layer applies a convolution and downsampling operating to the output tensor of the previous layer. The output of the encoder is a tensor of activation maps representing a low-dimensional embedding of ILD. The decoder network D inverts the encoding process by applying a sequence of upsampling and convolutional layers to the output tensor of the previous layer. This model outputs the reconstructed image ICAE. We optimize the CAE end-to-end through backpropagation by minimizing the pixelwise MSE between the output image of the CAE: ICAE = D(E(ILD)) and the original stimuli image IST . The filter sizes, number of layers, and number of filters were all tuned through an exhaustive gridsearch. We searched over the following parameter space in our grid search: number of encoding / decoding layers: [3, 4, 5], number of filters in each layer: [32, 64,128,256], filter sizes: [7x7, 5x5, 3x3], learning rates: [0.00005, 0.0001, 0.0002, 0.0004, 0.0008, 0.001, 0.002, 0.004]. Specific architecture details are provided in Figure 1. 3 21 0-3 3 0 -3 3 0 -3 3 0 ON Parasol ON Midget OFF Midget -3 3 0 OFF Parasol 0 30 0 24 0 18 0 20 ON Parasol ON Midget OFF Midget OFF Parasol ON Parasol ON Midget OFF Midget OFF Parasol ON Parasol ON Midget OFF Midget OFF Parasol A) B) C) D) E) 2 4 6 8 10 2 4 6 8 10 80 40 0 200 100 0 Time (s) Time (s) Firing Rate (Hz) 10 pixels 10 pixels 10 pixels ON Parasol OFF Parasol ON Midget OFF Midget Figure 2: Encoding model. A) Full spatiotemporal encoding model performance on experimental data. Recorded responses (black) vs LNP predictions (red; using the averaged parameters over all cells of each type) for one example cell of each type. The spiking responses to 57 trials of a natural scenes test movie were averaged over trials and then smoothed with a 10 ms SD Gaussian. B) Spatial filters of the simulated neural encoding model are shown for each cell type. C) The nonlinearity following the spatial filter-stimulus multiplication is shown for each cell type. We draw from a Poisson distribution on the output of the nonlinearity to obtain the neural responses. D) Demonstration of the mosaic structure for each cell type on a patch of the image space. The receptive fields of each neuron are represented by the 1 SD contour of the Gaussian fit to the spatial filter of each cell type. E) The response of each cell is plotted in the square around its receptive field center. The visual stimulus is shown on the left. The color maps of ON and OFF cells are reversed to associate high responses with their preferred stimulus polarity. 4 2.3 Training and Evaluation To train the linear decoder, we iterate through the training data once to collect the sufficient statistics XT X and XT IST . We train the convolutional autoencoder to minimize the pixelwise MSE PMSE with the Adam optimizer [15]. To avoid overfitting, we monitor PMSE changes on a validation set three times per epoch and keep track of the current best loss PMSE,best. We stop training if we have gone through 2 epochs worth of training data and the validation loss has not decreased by greater than 0.1%PMSE,best. In our experiments we use two image datasets, ImageNet [8] and the CelebA face dataset [21]. We apply preprocessing steps described previously in [17] to each image: 1) Convert to gray scale, 2) rescale to 256x256, 3) crop the middle 128x128 region. From Imagenet we use 930k random images for training, 50K for validation, and a 10k held-out set for testing. We use ImageNet in all but one of our experiments - context-decoding. For the latter, we use the CelebA face dataset [21] with 160k images for training, 30k for validation, and a 10k held-out set for testing. We evaluate all the models in our results using two separate metrics, pixelwise MSE and multiscale structural-similarity (SSIM) [36]. Although each metric alone has known shortcomings, in combination, they provide an objective evaluation of image reconstruction that is interpretable and well-understood. 3 Results 3.1 ImageNet decoding As expected [33], the linear decoder reconstructed blurry, noisy versions of the original natural images from the neural responses, a result that is attributable to the noisy responses from the RGCs down-sampling the input images. The two-staged model of the CAE trained on the output of the linear decoder (L-CAE) resulted in substantially improved reconstructions, perceptually and quantitatively (Figure 3). L-CAE decoding outperformed linear decoding both on average and for the vast majority of images, by both the MSE and 1 −SSIM measures. Qualitatively, the improvements made by the CAE generally show increased sharpening of edges, adjustment of contrast, and smoothing within object boundaries that reduced overall noise. Similar improvement in decoding could not be replicated by utilizing static nonlinearities to transform the linear decoded output to the original images. We used a 6th degree polynomial fitted to approximate the relation between linearly decoded and original image pixel intensities, and then evaluated this nonlinear decoding on held out data. This approach produced a small improvement in reconstruction: 3.25% reduction in MSE compared to 34.50% for the L-CAE. This reveals that the improvement in performance from the CAE involves nonlinear image enhancement beyond simple remapping of pixel intensities. Decoding noisier neural responses especially highlights the benefits of using the autoencoder: there are features identifiable in the L-CAE enhanced images that are not in the linear decoder images (Supplementary Figure 6). The results shown here utilize a large training dataset size for the decoder so it is natural to ask for a given fixed encoder model, how many training responses do we need to simulate to obtain a good decoder. We tested this by fixing our encoder and then training the CAE stage of the decoder with varying amounts of training data. (Supplementary Figure 8). We observed that even with a small training data set of 20k examples, we can improve significantly on the linear decoder and after around 500k examples, our performances begins to saturate. An analogous question can be asked about the amount of training data required to fit a good encoder and we intend to explore this aspect in future work. 3.2 Phase Scrambled Training A possible explanation for the improved performance of the L-CAE compared to the baseline linear decoder is that it more fully exploits phase structure that is characteristic of natural images [2], perhaps by incorporating priors on phase structure that are not captured by linear decoding. To test this possibility, we trained both linear and L-CAE decoders on phase-scrambled natural images. The CAE input was produced by the linear decoder trained on the same image type as the CAE. Observed responses of RGCs to these stimuli followed approximately the same marginal distribution as responses to the original natural images. We then compared the performance of these linear and 5 10-3 10-2 10-2 10-3 L-CAE Linear Decoder 0.0 0.2 0.4 0.6 0.0 0.2 0.4 0.6 Linear Decoder A) MSE 1-SSIM B) C) Original Linear Decoded L-CAE Decoded Figure 3: Comparison of linear and CAE decoding. A) MSE on a log-log plot for the ImageNet 10k example test set comparing the L-CAE model trained on ImageNet (only 1k subsampled examples are plotted here for visualization purposes). B) 1-SSIM version of the same figure. C) Example images from the test set show the original, linear decoded, L-CAE enhanced versions. The average (MSE, 1-SSIM) for the linear decoder over the full test set was (0.0077, 0.35) and the corresponding averages for the L-CAE were (0.0051, 0.25). L-CAE decoders to the performance of the original decoders, on the original natural images (Figure 4). The linear decoder exhibited similar decoding performance when trained on the original and phase-scrambled images, while the L-CAE exhibited substantially higher performance when trained on real images. These findings are consistent with the idea that the CAE is able to capture prior information on image phase structure not captured by linear decoding. However, direct comparisons of the L-CAE and LD trained and tested on phase scrambled images show that the L-CAE does still lead to some improvements which are most likely just due to the increased parameter complexity of the decoding model (Supplementary Figure 7). 3.3 Context Dependent Training The above results suggest that the CAE is capturing important natural image priors. However, it remains unclear whether these priors are sufficient to decode specific classes of natural images as accurately as decoding models that are tuned to incorporate class-specific priors. We explored this in 6 LinearPhaseScrambled LinearImageNet L-CAEPhaseScrambled L-CAEImageNet A) B) E) LinearPhaseScrambled LinearImageNet L-CAEImageNet L-CAEPhaseScrambled C) D) Original LinearPhaseScrambled LinearImageNet L-CAEPhaseScrambled Phase Scrambled L-CAEImageNet MSE on Test ImageNet MSE on Test ImageNet 1-SSIM on Test ImageNet 1-SSIM on Test ImageNet 10-3 10-3 10-2 10-2 10-3 10-2 10-3 10-2 0.6 0.4 0.2 0.0 0.0 0.2 0.4 0.6 0.0 0.2 0.4 0.6 0.6 0.4 0.2 0.0 Figure 4: Comparison of phase scrambled and ImageNet trained models. A) MSE on log-log plot comparing the performance of the linear decoder fit on natural images to the linear decoder fit on phase scrambled images. The subscript of each model indicates the dataset on which it was trained. The reported MSE values are based on performance on the natural image test set (1k subsampled examples shown). B) Similar plot to A but comparing the L-CAE fit on natural images to the L-CAE fit on phase scrambled images. C) 1-SSIM version of A. D) 1-SSIM version of B. E) One example test natural image (represented by blue dot in A-D) showing the reconstructions from all 4 models and the phase scrambled version. the context of human faces by fully re-training a class-specific L-CAE using the CelebA face dataset. Both linear and CAE stages were trained from scratch (random initialization) using only this dataset. As with the phase scrambled comparisons, the CAE input is produced by the linear decoder trained on the same image type. We then compare these different linear decoder and L-CAE models on a test set of CelebA faces. For the linear decoders, we see a 17% improvement in average test MSE and a 14% improvement in 1-SSIM when training on CelebA as compared to training on ImageNet (Figure 5 A and C). We find that the differences in MSE and 1-SSIM between the differently trained L-CAE models are smaller (5% improvement in MSE and a 4% improvement in 1-SSIM) (Figure 5 B and D). The much smaller difference in MSE and 1-SSIM suggests that the L-CAE decoder does a better job at generalizing to unseen context-specific classes than the linear decoder. However, the images show that there are still important face-specific features (such as nose and eye definition) that are much better decoded by the L-CAE trained only on faces (Figure 5E). This suggests that while the natural image statistics captured by the CAE do help improve its generalization to more structured classes, there are still significant benefits in training class-specific models. 4 Discussion The work presented here develops a novel approximate Bayesian decoding technique that uses non-linear DNNs to decode images from simulated responses of retinal neurons. The approach substantially outperforms linear reconstruction techniques that have usually been used to decode neural responses to high-dimensional stimuli. Perhaps the most successful previous applications of Bayesian neural decoding are in cases where the variable to be decoded is low-dimensional. The work of [5] stimulated much progress in hippocampus and motor cortex using Bayesian state-space approaches applied to low-dimensional (typically 7 LinearCelebA LinearImageNet L-CAECelebA L-CAEImageNet A) B) E) LinearCelebA LinearImageNet L-CAEImageNet L-CAECelebA 1-SSIM on Test CelebA C) D) Original LinearCelebA LinearImageNet L-CAECelebA L-CAEImageNet MSE on Test CelebA MSE on Test CelebA 10-2 10-3 10-3 10-2 10-2 10-3 10-3 10-2 1-SSIM on Test CelebA 0.4 0.2 0.0 0.4 0.2 0.0 0.0 0.2 0.4 0.0 0.2 0.4 Figure 5: Comparison of CelebA and ImageNet trained models. A) MSE on log-log plot comparing the performance of the linear decoder fit on CelebA to the linear decoder fit on ImageNet. The subscript of each model indicates the dataset on which it was trained. The reported MSE values are based on performance on the natural image test set (1k subsampled examples shown). B) Similar plot to A but comparing the L-CAE fit on CelebA to the L-CAE fit on ImageNet. C) 1-SSIM version of A. D) 1-SSIM version of B. E) One example test natural image (represented by blue dot in A-D) showing the reconstructions from all 4 models. two- or three-dimensional) position variables; see also [16] and [28] for further details. The low dimensionality of the state variable and simple Markovian priors leads to fast Bayesian computation in these models. At the same time, non-Bayesian approaches based on support vector regression [32] or recurrent neural networks [34] have also proven powerful in these applications. Decoding information from the retina or early visual pathway requires efficient computations over objects of much larger dimensionality: images and movies. Several threads are worth noting here. First, some previous work has focused on decoding of flicker stimuli [37] or motion statistics [18, 23], both of which reduce to low-dimensional decoding problems. Other work has applied straightforward linear decoding methods [33, 9]. Finally, some work has tackled the challenging problem of decoding still images undergoing random perturbations due to eye movements [6, 1]. These studies developed approximate Bayesian decoders under simplified natural image priors, and it would be interesting in future work to examine potential extensions of our approach to those applications. While our focus here has been on the decoding of spike counts from populations of neurons recorded with single-cell precision, the ideas developed here could also be applied in the context of decoding fMRI data. Our approach shares some conceptual similarity to previous work [25, 27] which used elegant encoding models combined with brute-force computation over a large discrete sample space to compute posteriors, and to other work [38] which used neural network methods similar to those developed in [41] to decode image features. Our approach, for example, could be extended to replace a brute-force discrete-sample decoder [25, 27] with a decoder that operates over the full high-dimensional continuous space of all images. Many state-of-the-art models for in-painting and super-resolution image enhancement rely on generative adversarial networks (GANs). However, these models currently require specific architecture tuning based on the exact problem structure. Because our problem involves some complex and unknown combination of denoising, super-resolution, and inpainting, we required a more robust model that could be tested with little hand-tuning. Furthermore, we have no parametric form for the noise 8 in the linear decoded images, so standard pre-trained networks could not be applied directly. Based on previous work in [39], it seems that autoencoder architectures can robustly achieve reasonable results for these types of tasks; therefore, we chose the CAE architecture as a useful starting point. We have begun to explore GAN architectures, but these early results do not show any significant improvements over our CAE model. We plan to explore these networks further in future work. In Section 3.3 we saw that even though there were small differences in MSE and 1-SSIM between the outputs of the L-CAE decoders trained on ImageNet vs. CelebA datasets, visually there were still significant differences. The most likely explanation for this discrepancy is that these loss functions are imperfect and do not adequately capture perceptually relevant differences between two images. In recent years, more complex perceptual similarity metrics have gained traction in the deep learning community [42, 20, 13]. While we did not extensively explore this aspect, we have done some preliminary experiments that suggest that using just a standard VGG-based perceptual metric [13] decreases some blurring seen using MSE, but does not significantly improve decoding in a robust way. We plan to further explore these ideas by implementing perceptual loss functions that utilize more of our understanding of operations in the early human visual system [19]. Progress in this space is vital as any retinal prosthetics application of this work would require decoding of visual scenes that is accurate by perceptual metrics rather than MSE. We have shown improved reconstruction based on simulated data; clearly, an important next step is to apply this approach to decode real experimental data. In addition, we have shown better L-CAE reconstruction only based on one perfect mosaic of the simulated neurons. In reality, these mosaics differ from retina to retina and there are gaps in the mosaic when we record from retinal neurons. Therefore, it will be important to investigate whether the CAE can learn to generalize over different mosaic patterns. We also plan to explore reconstruction of movies and color images. The present results have two implications for visual neuroscience. First, the results provide a framework for understanding how an altered neural code, such as the patterns of activity elicited in a retinal prosthesis, could influence perception of the visual image. With our approach, this can be assessed in the image domain directly (instead of the domain of spikes) by examining the quality of "optimal" reconstruction from electrical activity induced by the prosthesis. Second, the results provide a way to understand which aspects of natural scenes are effectively encoded in the natural output of the retina, again, as assessed in the image domain. Previous efforts toward these two goals have relied on linear reconstruction. The substantially higher performance of the L-CAE provides a more stringent assessment of prosthesis function, and suggests that the retina may convey visual images to the brain with higher fidelity than was previously appreciated. 5 Acknowledgments NSF GRFP DGE-16-44869 (EB), NSF/NIH Collaborative Research in Computational Neuroscience Grant IIS-1430348/1430239 (EJC & LP), DARPA Contract FA8650-16-1-7657 (EJC), Simons Foundation SF-SCGB-365002 (LP); IARPA MICRONS D16PC00003 (LP); DARPA N66001-17-C4002 (LP). References [1] Alexander G Anderson, Bruno A Olshausen, Kavitha Ratnam, and Austin Roorda. A neural model of high-acuity vision in the presence of fixational eye movements. In Signals, Systems and Computers, 2016 50th Asilomar Conference on, pages 588–592. IEEE, 2016. [2] Elizabeth Arsenault, Ahmad Yoonessi, and Curtis Baker. Higher order texture statistics impair contrast boundary segmentation. Journal of vision, 11(10):14–14, 2011. [3] Eleanor Batty, Josh Merel, Nora Brackbill, Alexander Heitman, Alexander Sher, Alan Litke, E.J. Chichilnisky, and Liam Paninski. Multilayer recurrent network models of primate retinal ganglion cell responses. International Conference on Learning Representations, 2017. [4] Gijs Joost Brouwer and David J. Heeger. Decoding and reconstructing color from responses in human visual cortex. The Journal of Neuroscience: the official journal of the Society for Neuroscience, 29(44):13992–14003, 2009. 9 [5] Emery N Brown, Loren M Frank, Dengda Tang, Michael C Quirk, and Matthew A Wilson. A statistical paradigm for neural spike train decoding applied to position prediction from ensemble firing patterns of rat hippocampal place cells. Journal of Neuroscience, 18(18):7411–7425, 1998. [6] Yoram Burak, Uri Rokni, Markus Meister, and Haim Sompolinsky. Bayesian model of dynamic image stabilization in the visual system. Proceedings of the National Academy of Sciences, 107(45):19525–19530, 2010. [7] E.J. Chichilnisky. A simple white noise analysis of neuronal light responses. Network: Computation in Neural Systems, 12(2):199–213, 2001. [8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. [9] Ariadna R. Diaz-Tahoces, Antonio Martinez-Alvarez, Alejandro Garcia-Moll, and Eduardo Fernandez. Towards the reconstruction of moving images by populations of retinal ganglion cells. In 6th International Work-Conference on the Interplay Between Natural and Artificial Computation, IWINAC, volume 9107, 2015. [10] ES Frechette, A Sher, MI Grivich, D Petrusca, AM Litke, and EJ Chichilnisky. Fidelity of the ensemble code for visual motion in primate retina. Journal of neurophysiology, 94(1):119–135, 2005. [11] Lovedeep Gondara. Medical image denoising using convolutional denoising autoencoders. arXiv pre-print 1608.04667, 2016. [12] Alexander Heitman, Nora Brackbill, Martin Greschner, Alexander Sher, Alan M Litke, and EJ Chichilnisky. Testing pseudo-linear models of responses to natural scenes in primate retina. bioRxiv, page 045336, 2016. [13] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, pages 694–711. Springer, 2016. [14] Yukiyasu Kamitani and Frank Tong. Decoding the visual and subjective ontents of the human brain. Nature Neuroscience, 8(5):679–685, 2005. [15] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [16] Shinsuke Koyama, Lucia Castellanos Pérez-Bolde, Cosma Rohilla Shalizi, and Robert E Kass. Approximate methods for state-space models. Journal of the American Statistical Association, 105(489):170–180, 2010. [17] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. [18] Edmund C Lalor, Yashar Ahmadian, and Liam Paninski. The relationship between optimal and biologically plausible decoding of stimulus velocity in the retina. JOSA A, 26(11):B25–B42, 2009. [19] Valero Laparra, Alex Berardino, Johannes Ballé, and Eero P Simoncelli. Perceptually optimized image rendering. arXiv preprint arXiv:1701.06641, 2017. [20] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. arXiv preprint arXiv:1609.04802, 2016. [21] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015. 10 [22] Xiao-Jiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using convolutional autoencoders with symmetric skip connections. In Advances in Neural Information Processing, 2016. [23] Olivier Marre, Vicente Botella-Soler, Kristina D Simmons, Thierry Mora, Gašper Tkaˇcik, and Michael J Berry II. High accuracy decoding of dynamical motion from a large retinal population. PLoS Comput Biol, 11(7):e1004304, 2015. [24] Lane McIntosh, Niru Maheswaranathan, Aran Nayebi, Surya Ganguli, and Stephen A. Baccus. Deep learning models of the retinal response to natural scenes. In Advances in Neural Information Processing Systems, 2016. [25] Thomas Naselaris, Ryan J. Prenger, Kendrick N. Kay, Michael Oliver, and Jack L. Gallant. Bayesian reconstruction of natural images from human brain activity. Neuron, 63(9):902–915, 2009. [26] Sheila Nirenberg and Chetan Pandarinath. Retinal prosthetic strategy with the capacity to restore normal vision. PNAS, 109(37), 2012. [27] Shinji Nishimoto, An T. Vu, Thomas Naselaris, Yuval Benjamini, Bin Yu, and Jack L. Gallant. Reconstructing visual experiences from brain activity evoked by natural movies. Current Biology, 21(19):1641–1646, 2011. [28] Liam Paninski, Yashar Ahmadian, Daniel Gil Ferreira, Shinsuke Koyama, Kamiar Rahnama Rad, Michael Vidne, Joshua Vogelstein, and Wei Wu. A new look at state-space models for neural data. Journal of computational neuroscience, 29(1-2):107–126, 2010. [29] Brian N. Pasley, Stephen V. David, Nima Mesgarani, Adeen Flinker, Shibab A. Shamma, Nathan E. Crone, Robert T. Knight, and Edward F. Chang. Reconstructing speech from human auditory cortex. PLOS Biology, 10(1), 2012. [30] Alexandro D Ramirez, Yashar Ahmadian, Joseph Schumacher, David Schneider, Sarah M. N. Woolley, and Liam Paninski. Incorporating naturalistic correlation structure improves spectrogram reconstruction from neuronal activity in the songbird auditory midbrain. Journal of Neuroscience, 31(10):3828–3842, 2011. [31] Fred Rieke, Davd Warland, Rob de Ruyter van Steveninck, and William Bialek. Spikes: Exploring the Neural Code. MIT Press, Cambridge, MA, USA, 1999. [32] Lavi Shpigelman, Hagai Lalazar, and Eilon Vaadia. Kernel-arma for hand tracking and brainmachine interfacing during 3d motor control. In Advances in neural information processing systems, pages 1489–1496, 2009. [33] Garrett B. Stanley, Fei F. Li, and Yang Dan. Reconstruction of natural scenes from ensemble responses in the lateral geniculate nucleus. Journal of Neuroscience, 19(18):8036–8042, 1999. [34] David Sussillo, Sergey D Stavisky, Jonathan C Kao, Stephen I Ryu, and Krishna V Shenoy. Making brain–machine interfaces robust to future neural variability. Nature Communications, 7, 2016. [35] Zhangyang Wang, Yingzhen Yang, Zhaowen Wang, Shiyu Chang, Wen Han, Jianchao Yang, and Thomas S. Huang. Self-tuned deep super resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2015. [36] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600– 612, 2004. [37] David K. Warland, Pamela Reinagel, and Markus Meister. Decoding visual information from a population of retinal ganglion cells. Journal of neurophysiology, 78(5):2336–2350, 1997. [38] Haiguang Wen, Junxing Shi, Yizhen Zhang, Kun-Han Lu, and Zhongming Liu. Neural encoding and decoding with deep learning for dynamic natural vision. arXiv pre-print 1608.03425, 2016. 11 [39] Junyuan Xie, Linli Xu, and Enhong Chen. Image denoising and inpainting with deep neural networks. In Advances in Neural Information Processing Systems, pages 341–349, 2012. [40] Kai Xu, Yueming Wnag, Shaomin Zhang, Ting Zhao, Yiwen Wang, Weidong Chen, and Xiaoxiang Zhang. Comparisons between linear and nonlinear methods for decoding motor cortical activities of monkey. In Engineering in Medicine and Biology Society, EMBC, Annual International Conference of the IEEE, 2011. [41] Daniel LK Yamins, Ha Hong, Charles F Cadieu, Ethan A Solomon, Darren Seibert, and James J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, 2014. [42] Hang Zhao, Orazio Gallo, Iuri Frosio, and Jan Kautz. Loss functions for neural networks for image processing. arXiv preprint arXiv:1511.08861, 2015. 12 | 2017 | 460 |
6,964 | Plan, Attend, Generate: Planning for Sequence-to-Sequence Models Francis Dutil∗ University of Montreal (MILA) frdutil@gmail.com Caglar Gulcehre∗ University of Montreal (MILA) ca9lar@gmail.com Adam Trischler Microsoft Research Maluuba adam.trischler@microsoft.com Yoshua Bengio University of Montreal (MILA) yoshua.umontreal@gmail.com Abstract We investigate the integration of a planning mechanism into sequence-to-sequence models using attention. We develop a model which can plan ahead in the future when it computes its alignments between input and output sequences, constructing a matrix of proposed future alignments and a commitment vector that governs whether to follow or recompute the plan. This mechanism is inspired by the recently proposed strategic attentive reader and writer (STRAW) model for Reinforcement Learning. Our proposed model is end-to-end trainable using primarily differentiable operations. We show that it outperforms a strong baseline on character-level translation tasks from WMT’15, the algorithmic task of finding Eulerian circuits of graphs, and question generation from the text. Our analysis demonstrates that the model computes qualitatively intuitive alignments, converges faster than the baselines, and achieves superior performance with fewer parameters. 1 Introduction Several important tasks in the machine learning literature can be cast as sequence-to-sequence problems (Cho et al., 2014b; Sutskever et al., 2014). Machine translation is a prime example of this: a system takes as input a sequence of words or characters in some source language, then generates an output sequence of words or characters in the target language – the translation. Neural encoder-decoder models (Cho et al., 2014b; Sutskever et al., 2014) have become a standard approach for sequence-to-sequence tasks such as machine translation and speech recognition. Such models generally encode the input sequence as a set of vector representations using a recurrent neural network (RNN). A second RNN then decodes the output sequence step-by-step, conditioned on the encodings. An important augmentation to this architecture, first described by Bahdanau et al. (2015), is for models to compute a soft alignment between the encoder representations and the decoder state at each time-step, through an attention mechanism. The computed alignment conditions the decoder more directly on a relevant subset of the input sequence. Computationally, the attention mechanism is typically a simple learned function of the decoder’s internal state, e.g., an MLP. In this work, we propose to augment the encoder-decoder model with attention by integrating a planning mechanism. Specifically, we develop a model that uses planning to improve the alignment between input and output sequences. It creates an explicit plan of input-output alignments to use at future time-steps, based ∗denotes that both authors (CG and FD) contributed equally and the order is determined randomly. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. on its current observation and a summary of its past actions, which it may follow or modify. This enables the model to plan ahead rather than attending to what is relevant primarily at the current generation step. Concretely, we augment the decoder’s internal state with (i) an alignment plan matrix and (ii) a commitment plan vector. The alignment plan matrix is a template of alignments that the model intends to follow at future timesteps, i.e., a sequence of probability distributions over input tokens. The commitment plan vector governs whether to follow the alignment plan at the current step or to recompute it, and thus models discrete decisions. This is reminiscent of macro-actions and options from the hierarchical reinforcement learning literature (Dietterich, 2000). Our planning mechanism is inspired by the strategic attentive reader and writer (STRAW) of Vezhnevets et al. (2016), which was originally proposed as a hierarchical reinforcement learning algorithm. In reinforcement-learning parlance, existing sequence-to-sequence models with attention can be said to learn reactive policies; however, a model with a planning mechanism could learn more proactive policies. Our work is motivated by the intuition that, although many natural sequences are output step-by-step because of constraints on the output process, they are not necessarily conceived and ordered according to only local, step-by-step interactions. Natural language in the form of speech and writing is again a prime example – sentences are not conceived one word at a time. Planning, that is, choosing some goal along with candidate macro-actions to arrive at it, is one way to induce coherence in sequential outputs like language. Learning to generate long coherent sequences, or how to form alignments over long input contexts, is difficult for existing models. In the case of neural machine translation (NMT), the performance of encoder-decoder models with attention deteriorates as sequence length increases (Cho et al., 2014a; Sutskever et al., 2014). A planning mechanism could make the decoder’s search for alignments more tractable and more scalable. In this work, we perform planning over the input sequence by searching for alignments; our model does not form an explicit plan of the output tokens to generate. Nevertheless, we find this alignment-based planning to improve performance significantly in several tasks, including character-level NMT. Planning can also be applied explicitly to generation in sequence-to-sequence tasks. For example, recent work by Bahdanau et al. (2016) on actor-critic methods for sequence prediction can be seen as this kind of generative planning. We evaluate our model and report results on character-level translation tasks from WMT’15 for English to German, English to Finnish, and English to Czech language pairs. On almost all pairs we observe improvements over a baseline that represents the state-of-the-art in neural character-level translation. In our NMT experiments, our model outperforms the baseline despite using significantly fewer parameters and converges faster in training. We also show that our model performs better than strong baselines on the algorithmic task of finding Eulerian circuits in random graphs and the task of natural-language question generation from a document and target answer. 2 Related Works Existing sequence-to-sequence models with attention have focused on generating the target sequence by aligning each generated output token to another token in the input sequence. This approach has proven successful in neural machine translation (Bahdanau et al., 2016) and has recently been adapted to several other applications, including speech recognition (Chan et al., 2015) and image caption generation (Xu et al., 2015). In general these models construct alignments using a simple MLP that conditions on the decoder’s internal state. In our work we integrate a planning mechanism into the alignment function. There have been several earlier proposals for different alignment mechanisms: for instance, Yang et al. (2016) developed a hierarchical attention mechanism to perform document-level classification, while Luo et al. (2016) proposed an algorithm for learning discrete alignments between two sequences using policy gradients (Williams, 1992). Silver et al. (2016) used a planning mechanism based on Monte Carlo tree search with neural networks to train reinforcement learning (RL) agents on the game of Go. Most similar to our work, Vezhnevets et al. (2016) developed a neural planning mechanism, called the strategic attentive reader and writer (STRAW), that can learn high-level temporally abstracted macro-actions. STRAW uses an action plan matrix, which represents the sequences of actions the model plans to take, and a commitment plan vector, which determines whether to commit an action or recompute the plan. STRAW’s action plan and commitment plan are stochastic and the model is trained with RL. Our model computes an alignment plan rather than an action plan, and both its alignment matrix and commitment vector are deterministic and end-to-end trainable with backpropagation. 2 Our experiments focus on character-level neural machine translation because learning alignments for long sequences is difficult for existing models. This effect can be more pronounced in character-level NMT, since sequences of characters are longer than corresponding sequences of words. Furthermore, to learn a proper alignment between sequences a model often must learn to segment them correctly, a process suited to planning. Previously, Chung et al. (2016) and Lee et al. (2016) addressed the character-level machine translation problem with architectural modifications to the encoder and the decoder. Our model is the first we are aware of to tackle the problem through planning. 3 Planning for Sequence-to-Sequence Learning We now describe how to integrate a planning mechanism into a sequence-to-sequence architecture with attention (Bahdanau et al., 2015). Our model first creates a plan, then computes a soft alignment based on the plan, and generates at each time-step in the decoder. We refer to our model as PAG (Plan-Attend-Generate). 3.1 Notation and Encoder As input our model receives a sequence of tokens, X =(x0,···,x|X|), where |X| denotes the length of X. It processes these with the encoder, a bidirectional RNN. At each input position i we obtain annotation vector hi by concatenating the forward and backward encoder states, hi=[h→ i ;h← i ], where h→ i denotes the hidden state of the encoder’s forward RNN and h← i denotes the hidden state of the encoder’s backward RNN. Through the decoder the model predicts a sequence of output tokens, Y = (y1,···,y|Y |). We denote by st the hidden state of the decoder RNN generating the target output token at time-step t. 3.2 Alignment and Decoder Our goal is a mechanism that plans which parts of the input sequence to focus on for the next k time-steps of decoding. For this purpose, our model computes an alignment plan matrix At ∈Rk×|X| and commitment plan vector ct ∈Rk at each time-step. Matrix At stores the alignments for the current and the next k−1 timesteps; it is conditioned on the current input, i.e. the token predicted at the previous time-step, yt, and the current context ψt, which is computed from the input annotations hi. Each row of At gives the logits for a probability vector over the input annotation vectors. The first row gives the logits for the current time-step, t, the second row for the next time-step, t+1, and so on. The recurrent decoder function, fdec-rnn(·), receives st−1, yt, ψt as inputs and computes the hidden state vector st=fdec-rnn(st−1,yt,ψt). (1) Context ψt is obtained by a weighted sum of the encoder annotations, ψt= |X| X i αtihi, (2) where the soft-alignment vector αt=softmax(At[0])∈R|X| is a function of the first row of the alignment matrix. At each time-step, we compute a candidate alignment-plan matrix ¯At whose entry at the ith row is ¯At[i]=falign(st−1, hj, βi t, yt), (3) where falign(·) is an MLP and βi t denotes a summary of the alignment matrix’s ith row at time t−1. The summary is computed using an MLP, fr(·), operating row-wise on At−1: βi t =fr(At−1[i]). The commitment plan vector ct governs whether to follow the existing alignment plan, by shifting it forward from t−1, or to recompute it. Thus, ct represents a discrete decision. For the model to operate discretely, we use the recently proposed Gumbel-Softmax trick (Jang et al., 2016; Maddison et al., 2016) in conjunction with the straight-through estimator (Bengio et al., 2013) to backpropagate through ct.1 The model further learns the temperature for the Gumbel-Softmax as proposed in (Gulcehre et al., 2017). Both the commitment vector and the action plan matrix are initialized with ones; this initialization is not modified through training. 1We also experimented with training ct using REINFORCE (Williams, 1992) but found that Gumbel-Softmax led to better performance. 3 Alignment Plan Matrix # tokens in the source # steps to plan ahead (k) At Commitment plan ct ht Tx Softmax( ) + t At[0] yt st−1 s0 t Figure 1: Our planning mechanism in a sequence-to-sequence model that learns to plan and execute alignments. Distinct from a standard sequence-to-sequence model with attention, rather than using a simple MLP to predict alignments our model makes a plan of future alignments using its alignment-plan matrix and decides when to follow the plan by learning a separate commitment vector. We illustrate the model for a decoder with two layers s′ t for the first layer and the st for the second layer of the decoder. The planning mechanism is conditioned on the first layer of the decoder (s′ t). Alignment-plan update Our decoder updates its alignment plan as governed by the commitment plan. We denote by gt the first element of the discretized commitment plan ¯ct. In more detail, gt=¯ct[0], where the discretized commitment plan is obtained by setting ct’s largest element to 1 and all other elements to 0. Thus, gt is a binary indicator variable; we refer to it as the commitment switch. When gt =0, the decoder simply advances the time index by shifting the action plan matrix At−1 forward via the shift function ρ(·). When gt = 1, the controller reads the action-plan matrix to produce the summary of the plan, βi t. We then compute the updated alignment plan by interpolating the previous alignment plan matrix At−1 with the candidate alignment plan matrix ¯At. The mixing ratio is determined by a learned update gate ut ∈Rk×|X|, whose elements uti correspond to tokens in the input sequence and are computed by an MLP with sigmoid activation, fup(·): uti=fup(hi, st−1), At[:,i]=(1−uti)⊙At−1[:,i]+uti⊙¯At[:,i]. To reiterate, the model only updates its alignment plan when the current commitment switch gt is active. Otherwise it uses the alignments planned and committed at previous time-steps. Commitment-plan update The commitment plan also updates when gt becomes 1. If gt is 0, the shift function ρ(·) shifts the commitment vector forward and appends a 0-element. If gt is 1, the model recomputes ct using a single layer MLP, fc(·), followed by a Gumbel-Softmax, and ¯ct is recomputed by discretizing ct as a one-hot vector: ct=gumbel_softmax(fc(st−1)), (4) ¯ct=one_hot(ct). (5) We provide pseudocode for the algorithm to compute the commitment plan vector and the action plan matrix in Algorithm 1. An overview of the model is depicted in Figure 1. 3.2.1 Alignment Repeat In order to reduce the model’s computational cost, we also propose an alternative to computing the candidate alignment-plan matrix at every step. Specifically, we propose a model variant that reuses the 4 Algorithm 1: Pseudocode for updating the alignment plan and commitment vector. for j∈{1,···|X|} do for t∈{1,···|Y |} do if gt=1 then ct=softmax(fc(st−1)) βj t =fr(At−1[j]) {Read alignment plan} ¯At[i]=falign(st−1, hj, βj t, yt) {Compute candidate alignment plan} utj =fup(hj, st−1, ψt−1) {Compute update gate} At = (1 −utj)⊙At−1+utj⊙¯At {Update alignment plan} else At=ρ(At−1) {Shift alignment plan} ct=ρ(ct−1) {Shift commitment plan} end if Compute the alignment as αt=softmax(At[0]) end for end for alignment vector from the previous time-step until the commitment switch activates, at which time the model computes a new alignment vector. We call this variant repeat, plan, attend, and generate (rPAG). rPAG can be viewed as learning an explicit segmentation with an implicit planning mechanism in an unsupervised fashion. Repetition can reduce the computational complexity of the alignment mechanism drastically; it also eliminates the need for an explicit alignment-plan matrix, which reduces the model’s memory consumption also. We provide pseudocode for rPAG in Algorithm 2. Algorithm 2: Pseudocode for updating the repeat alignment and commitment vector. for j∈{1,···|X|} do for t∈{1,···|Y |} do if gt=1 then ct=softmax(fc(st−1,ψt−1)) αt=softmax(falign(st−1, hj, yt)) else ct=ρ(ct−1) {Shift the commitment vector ct−1} αt=αt−1 {Reuse the old the alignment} end if end for end for 3.3 Training We use a deep output layer (Pascanu et al., 2013a) to compute the conditional distribution over output tokens, p(yt|y<t,x)∝y⊤ t exp(Wofo(st,yt−1,ψt)), (6) where Wo is a matrix of learned parameters and we have omitted the bias for brevity. Function fo is an MLP with tanh activation. The full model, including both the encoder and decoder, is jointly trained to minimize the (conditional) negative log-likelihood L=−1 N N X n=1 logpθ(y(n)|x(n)), where the training corpus is a set of (x(n),y(n)) pairs and θ denotes the set of all tunable parameters. As noted by Vezhnevets et al. (2016), the proposed model can learn to recompute very often, which decreases the utility of planning. To prevent this behavior, we introduce a loss that penalizes the model for committing too often, Lcom=λcom |X| X t=1 k X i=0 ||1 k −cti||2 2, (7) where λcom is the commitment hyperparameter and k is the timescale over which plans operate. 5 (a) (b) T a t s ä c h l i c h i d e n t i f i z i e r t e n r e p u b l i k a n i s c h e R e c h t s a n w ä l t e i n e i n e m J a h r z e h n t n u r 3 0 0 F ä l l e v o n W a h l b e t r u g i n d e n U S A . Indeed , Republican lawyers identified only 300 cases of electoral fraud in the United States in a decade . (c) Figure 2: We visualize the alignments learned by PAG in (a), rPAG in (b), and our baseline model with a 2-layer GRU decoder using h2 for the attention in (c). As depicted, the alignments learned by PAG and rPAG are smoother than those of the baseline. The baseline tends to put too much attention on the last token of the sequence, defaulting to this empty location in alternation with more relevant locations. Our model, however, places higher weight on the last token usually when no other good alignments exist. We observe that rPAG tends to generate less monotonic alignments in general. 4 Experiments Our baseline is the encoder-decoder architecture with attention described in Chung et al. (2016), wherein the MLP that constructs alignments conditions on the second-layer hidden states, h2, in the two-layer decoder. The integration of our planning mechanism is analogous across the family of attentive encoder-decoder models, thus our approach can be applied more generally. In all experiments below, we use the same architecture for our baseline and the (r)PAG models. The only factor of variation is the planning mechanism. For training all models we use the Adam optimizer with initial learning rate set to 0.0002. We clip gradients with a threshold of 5 (Pascanu et al., 2013b) and set the number of planning steps (k) to 10 throughout. In order to backpropagate through the alignment-plan matrices and the commitment vectors, the model must maintain these in memory, increasing the computational overhead of the PAG model. However, rPAG does not suffer from these computational issues. 4.1 Algorithmic Task We first compared our models on the algorithmic task from Li et al. (2015) of finding the “Eulerian Circuits” in a random graph. The original work used random graphs with 4 nodes only, but we found that both our baseline and the PAG model solve this task very easily. We therefore increased the number of nodes to 7. We tested the baseline described above with hidden-state dimension of 360, and the same model augmented with our planning mechanism. The PAG model solves the Eulerian Circuits problem with 100% absolute accuracy on the test set, indicating that for all test-set graphs, all nodes of the circuit were predicted correctly. The baseline encoder-decoder architecture with attention performs well but significantly worse, achieving 90.4% accuracy on the test set. 4.2 Question Generation SQUAD (Rajpurkar et al., 2016) is a question answering (QA) corpus wherein each sample is a (document, question, answer) triple. The document and the question are given in words and the answer is a span of word positions in the document. We evaluate our planning models on the recently proposed question-generation task (Yuan et al., 2017), where the goal is to generate a question conditioned on a document and an answer. We add the planning mechanism to the encoder-decoder architecture proposed by Yuan et al. (2017). Both the document and the answer are encoded via recurrent neural networks, and 6 the model learns to align the question output with the document during decoding. The pointer-softmax mechanism (Gulcehre et al., 2016) is used to generate question words from either a shortlist vocabulary or by copying from the document. Pointer-softmax uses the alignments to predict the location of the word to copy; thus, the planning mechanism has a direct influence on the decoder’s predictions. We used 2000 examples from SQUAD’s training set for validation and used the official development set as a test set to evaluate our models. We trained a model with 800 units for all GRU hidden states 600 units for word embedding. On the test set the baseline achieved 66.25 NLL while PAG got 65.45 NLL. We show the validation-set learning curves of both models in Figure 3. 0 5 10 15 1200x Updates 54 56 58 60 62 NLL Baseline PAG Figure 3: Learning curves for question-generation models on our development set. Both models have the same capacity and are trained with the same hyperparameters. PAG converges faster than the baseline with better stability. 4.3 Character-level Neural Machine Translation Character-level neural machine translation (NMT) is an attractive research problem (Lee et al., 2016; Chung et al., 2016; Luong and Manning, 2016) because it addresses important issues encountered in word-level NMT. Word-level NMT systems can suffer from problems with rare words (Gulcehre et al., 2016) or data sparsity, and the existence of compound words without explicit segmentation in some language pairs can make learning alignments between different languages and translations more difficult. Character-level neural machine translation mitigates these issues. In our NMT experiments we use byte pair encoding (BPE) (Sennrich et al., 2015) for the source sequence and characters at the target, the same setup described in Chung et al. (2016). We also use the same preprocessing as in that work.2 We present our experimental results in Table 1. Models were tested on the WMT’15 tasks for English to German (En→De), English to Czech (En→Cs), and English to Finnish (En→Fi) language pairs. The table shows that our planning mechanism improves translation performance over our baseline (which reproduces the results reported in (Chung et al., 2016) to within a small margin). It does this with fewer updates and fewer parameters. We trained (r)PAG for 350K updates on the training set, while the baseline was trained for 680K updates. We used 600 units in (r)PAG’s encoder and decoder, while the baseline used 512 in the encoder and 1024 units in the decoder. In total our model has about 4M fewer parameters than the baseline. We tested all models with a beam size of 15. As can be seen from Table 1, layer normalization (Ba et al., 2016) improves the performance of PAG significantly. However, according to our results on En→De, layer norm affects the performance of rPAG only marginally. Thus, we decided not to train rPAG with layer norm on other language pairs. In Figure 2, we show qualitatively that our model constructs smoother alignments. At each word that the baseline decoder generates, it aligns the first few characters to a word in the source sequence, but for the remaining characters places the largest alignment weight on the last, empty token of the source sequence. This is because the baseline becomes confident of which word to generate after the first few characters, and it generates the remainder of the word mainly by relying on language-model predictions. We observe that (r)PAG converges faster with the help of the improved alignments, as illustrated by the learning curves in Figure 4. 2Our implementation is based on the code available at https://github.com/nyu-dl/dl4mt-cdec 7 Model Layer Norm Dev Test 2014 Test 2015 En→De Baseline 21.57 21.33 23.45 Baseline† 21.4 21.16 22.1 Baseline† 21.65 21.69 22.55 PAG 21.92 21.93 22.42 22.44 22.59 23.18 rPAG 21.98 22.17 22.85 22.33 22.35 22.83 En→Cs Baseline 17.68 19.27 16.98 Baseline† 19.1 21.35 18.79 PAG 18.9 20.6 18.88 19.44 21.64 19.48 rPAG 18.66 21.18 19.14 En→Fi Baseline 11.19 10.93 Baseline† 11.26 10.71 PAG 12.09 11.08 12.85 12.15 rPAG 11.76 11.02 Table 1: The results of different models on the WMT’15 tasks for English to German, English to Czech, and English to Finnish language pairs. We report BLEU scores of each model computed via the multi-blue.perl script. The best-score of each model for each language pair appears in bold-face. We use newstest2013 as our development set, newstest2014 as our "Test 2014" and newstest2015 as our "Test 2015" set. † denotes the results of the baseline that we trained using the hyperparameters reported in Chung et al. (2016) and the code provided with that paper. For our baseline, we only report the median result, and do not have multiple runs of our models. On WMT’14 and WMT’15 for EnrightarrowDe character-level NMT, Kalchbrenner et al. (2016) have reported better results with deeper auto-regressive convolutional models (Bytenets), 23.75 and 26.26 respectively. 50 100 150 200 250 300 350 400 100x Updates 102 6 × 101 2 × 102 3 × 102 NLL PAG PAG + LayerNorm rPAG rPAG + LayerNorm Baseline Figure 4: Learning curves for different models on WMT’15 for En→De. Models with the planning mechanism converge faster than our baseline (which has larger capacity). 5 Conclusion In this work we addressed a fundamental issue in neural generation of long sequences by integrating planning into the alignment mechanism of sequence-to-sequence architectures. We proposed two different planning mechanisms: PAG, which constructs explicit plans in the form of stored matrices, and rPAG, which plans implicitly and is computationally cheaper. The (r)PAG approach empirically improves alignments over long input sequences. We demonstrated our models’ capabilities through results on 8 character-level machine translation, an algorithmic task, and question generation. In machine translation, models with planning outperform a state-of-the-art baseline on almost all language pairs using fewer parameters. We also showed that our model outperforms baselines with the same architecture (minus planning) on question-generation and algorithmic tasks. The introduction of planning improves training convergence and potentially the speed by using the alignment repeats. References Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. 2016. Layer normalization. arXiv preprint arXiv:1607.06450 . Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron Courville, and Yoshua Bengio. 2016. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086 . Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. International Conference on Learning Representations (ICLR) . Yoshua Bengio, Nicholas Léonard, and Aaron Courville. 2013. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432 . William Chan, Navdeep Jaitly, Quoc V Le, and Oriol Vinyals. 2015. Listen, attend and spell. arXiv preprint arXiv:1508.01211 . Kyunghyun Cho, Bart Van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. 2014a. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259 . Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014b. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078 . Junyoung Chung, Kyunghyun Cho, and Yoshua Bengio. 2016. A character-level decoder without explicit segmentation for neural machine translation. arXiv preprint arXiv:1603.06147 . Thomas G Dietterich. 2000. Hierarchical reinforcement learning. Caglar Gulcehre, Sungjin Ahn, Ramesh Nallapati, Bowen Zhou, and Yoshua Bengio. 2016. Pointing the unknown words. arXiv preprint arXiv:1603.08148 . Caglar Gulcehre, Sarath Chandar, and Yoshua Bengio. 2017. Memory augmented neural networks with wormhole connections. arXiv preprint arXiv:1701.08718 . Eric Jang, Shixiang Gu, and Ben Poole. 2016. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144 . Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Koray Kavukcuoglu. 2016. Neural machine translation in linear time. arXiv preprint arXiv:1610.10099 . Jason Lee, Kyunghyun Cho, and Thomas Hofmann. 2016. Fully character-level neural machine translation without explicit segmentation. arXiv preprint arXiv:1610.03017 . Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. 2015. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493 . Yuping Luo, Chung-Cheng Chiu, Navdeep Jaitly, and Ilya Sutskever. 2016. Learning online alignments with continuous rewards policy gradient. arXiv preprint arXiv:1608.01281 . Minh-Thang Luong and Christopher D Manning. 2016. Achieving open vocabulary neural machine translation with hybrid word-character models. arXiv preprint arXiv:1604.00788 . Chris J Maddison, Andriy Mnih, and Yee Whye Teh. 2016. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712 . Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, and Yoshua Bengio. 2013a. How to construct deep recurrent neural networks. arXiv preprint arXiv:1312.6026 . Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013b. On the difficulty of training recurrent neural networks. ICML (3) 28:1310–1318. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250 . Rico Sennrich, Barry Haddow, and Alexandra Birch. 2015. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909 . David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. 2016. Mastering the game of go with deep neural networks and tree search. Nature 529(7587):484–489. Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems. pages 3104–3112. Alexander Vezhnevets, Volodymyr Mnih, John Agapiou, Simon Osindero, Alex Graves, Oriol Vinyals, and Koray Kavukcuoglu. 2016. Strategic attentive writer for learning macro-actions. In Advances in Neural Information Processing Systems. pages 3486–3494. Ronald J Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning 8(3-4):229–256. Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. 2015. Show, attend and tell: Neural image caption generation with visual attention. In International 9 Conference on Machine Learning. pages 2048–2057. Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alex Smola, and Eduard Hovy. 2016. Hierarchical attention networks for document classification. In Proceedings of NAACL-HLT. pages 1480–1489. Xingdi Yuan, Tong Wang, Caglar Gulcehre, Alessandro Sordoni, Philip Bachman, Sandeep Subramanian, Saizheng Zhang, and Adam Trischler. 2017. Machine comprehension by text-to-text neural question generation. arXiv preprint arXiv:1705.02012 . 10 | 2017 | 461 |
6,965 | Analyzing Hidden Representations in End-to-End Automatic Speech Recognition Systems Yonatan Belinkov and James Glass Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology Cambridge, MA 02139 {belinkov, glass}@mit.edu Abstract Neural networks have become ubiquitous in automatic speech recognition systems. While neural networks are typically used as acoustic models in more complex systems, recent studies have explored end-to-end speech recognition systems based on neural networks, which can be trained to directly predict text from input acoustic features. Although such systems are conceptually elegant and simpler than traditional systems, it is less obvious how to interpret the trained models. In this work, we analyze the speech representations learned by a deep end-to-end model that is based on convolutional and recurrent layers, and trained with a connectionist temporal classification (CTC) loss. We use a pre-trained model to generate frame-level features which are given to a classifier that is trained on frame classification into phones. We evaluate representations from different layers of the deep model and compare their quality for predicting phone labels. Our experiments shed light on important aspects of the end-to-end model such as layer depth, model complexity, and other design choices. 1 Introduction Traditional automatic speech recognition (ASR) systems are composed of multiple components, including an acoustic model, a language model, a lexicon, and possibly other components. Each of these is trained independently and combined during decoding. As such, the system is not directly trained on the speech recognition task from start to end. In contrast, end-to-end ASR systems aim to map acoustic features directly to text (words or characters). Such models have recently become popular in the ASR community thanks to their simple and elegant architecture [1, 2, 3, 4]. Given sufficient training data, they also perform fairly well. Importantly, such models do not receive explicit phonetic supervision, in contrast to traditional systems that typically rely on an acoustic model trained to predict phonetic units (e.g. HMM phone states). Intuitively, though, end-to-end models have to generate some internal representation that allows them to abstract over phonological units. For instance, a model that needs to generate the word “bought” should learn that in this case “g” is not pronounced as the phoneme /g/. In this work, we investigate if and to what extent end-to-end models implicitly learn phonetic representations. The hypothesis is that such models need to create and exploit internal representations that correspond to phonetic units in order to perform well on the speech recognition task. Given a pre-trained end-to-end ASR system, we use it to extract frame-level features from an acoustic signal. For example, these may be the hidden representations of a recurrent neural network (RNN) in the end-to-end system. We then feed these features to a classifier that is trained to predict a phonetic property of interest such as phone recognition. Finally, we evaluate the performance of the classifier as a measure of the quality of the input features, and by proxy the quality of the original ASR system. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. We aim to provide quantitative answers to the following questions: 1. To what extent do end-to-end ASR systems learn phonetic information? 2. Which components of the system capture more phonetic information? 3. Do more complicated models learn better representations for phonology? And is ASR performance correlated with the quality of the learned representations? Two main types of end-to-end models for speech recognition have been proposed in the literature: connectionist temporal classification (CTC) [1, 2] and sequence-to-sequence learning (seq2seq) [3, 4]. We focus here on CTC and leave exploration of the seq2seq model for future work. We use a phoneme-segmented dataset for the phoneme recognition task, as it comes with time segmentation, which allows for accurate mapping between speech frames and phone labels. We define a frame classification task, where given representations from the CTC model, we need to classify each frame into a corresponding phone label. More complicated tasks can be conceived of—for example predicting a single phone given all of its aligned frames—but classifying frames is a basic and important task to start with. Our experiments reveal that the lowest layers in a deep end-to-end model are best suited for representing phonetic information. Applying one convolution on input features improves the representation, but a second convolution greatly degrades phone classification accuracy. Subsequent recurrent layers initially improve the quality of the representations. However, after a certain recurrent layer performance again drops, indicating that the top layers do not preserve all the phonetic information coming from the bottom layers. Finally, we cluster frame representations from different layers in the deep model and visualize them in 2D, observing different quality of grouping in different layers. We hope that our results would promote the development of better ASR systems. For example, understanding representation learning at different layers of the end-to-end model can guide joint learning of phoneme recognition and ASR, as recently proposed in a multi-task learning framework [5]. 2 Related Work 2.1 End-to-end ASR End-to-end models for ASR have become increasingly popular in recent years. Important studies include models based on connectionist temporal classification (CTC) [1, 2, 6, 7] and attention-based sequence-to-sequence models [3, 4, 8]. The CTC model is based on a recurrent neural network that takes acoustic features as input and is trained to predict a symbol per each frame. Symbols are typically characters, in addition to a special blank symbol. The CTC loss then marginalizes over all possible sequences of symbols given a transcription. The sequence-to-sequence approach, on the other hand, first encodes the sequence of acoustic features into a single vector and then decodes that vector into the sequence of symbols (characters). The attention mechanism improves upon this method by conditioning on a different summary of the input sequence at each decoding step. Both these of these approaches to end-to-end ASR usually predict a sequence of characters, although there have also been initial attempts at directly predicting words [9, 10]. 2.2 Analysis of neural representations While end-to-end neural network models offer an elegant and relatively simple architecture, they are often thought to be opaque and uninterpretable. Thus researchers have started investigating what such models learn during the training process. For instance, previous work evaluated neural network acoustic models on phoneme recognition using different acoustic features [11] or investigated how such models learn invariant representations [12] and encode linguistic features [13, 14]. Others have correlated activations of gated recurrent networks with phoneme boundaries in autoencoders [15] and in a text-to-speech system [16]. Recent work analyzed different speaker representations [17]. A joint audio-visual model of speech and lip movements was developed in [18], where phoneme embeddings were shown to be closer to certain linguistic features than embeddings based on audio alone. Other joint audio-visual models have also analyzed the learned representations in different ways [19, 20, 21]. Finally, we note that analyzing neural representations has also attracted attention in other domains 2 Table 1: The ASR models used in this work. (a) DeepSpeech2. Layer Type Input Size Output Size 1 cnn1 161 1952 2 cnn2 1952 1312 3 rnn1 1312 1760 4 rnn2 1760 1760 5 rnn3 1760 1760 6 rnn4 1760 1760 7 rnn5 1760 1760 8 rnn6 1760 1760 9 rnn7 1760 1760 10 fc 1760 29 (b) DeepSpeech2-light. Layer Type Input Size Output Size 1 cnn1 161 1952 2 cnn2 1952 1312 3 lstm1 1312 600 4 lstm2 600 600 5 lstm3 600 600 6 lstm4 600 600 7 lstm5 600 600 8 fc 600 29 like vision and natural language processing, including word and sentence representations [22, 23, 24], machine translation [25, 26], and joint vision-language models [27]. To our knowledge, hidden representations in end-to-end ASR systems have not been thoroughly analyzed before. 3 Methodology We follow the following procedure for evaluating representations in end-to-end ASR models. First, we train an ASR system on a corpus of transcribed speech and freeze its parameters. Then, we use the pre-trained ASR model to extract frame-level feature representations on a phonemically transcribed corpus. Finally, we train a supervised classifier using the features coming from the ASR system, and evaluate classification performance on a held-out set. In this manner, we obtain a quantitative measure of the quality of the representations that were learned by the end-to-end ASR model. A similar procedure has been previously applied to analyze a DNN-HMM phoneme recognition system [14] as well as text representations in neural machine translation models [25, 26]. More formally, let x denote a sequence of acoustic features such as a spectrogram of frequency magnitudes. Let ASRt(x) denote the output of the ASR model at the t-th input. Given a corresponding label sequence, l, we feed ASRt(x) to a supervised classifier that is trained to predict a corresponding label, lt. In the simplest case, we have a label at each frame and perform frame classification. As we are interested in analyzing different components of the ASR model, we also extract features from different layers k, such that ASRk t (x) denotes the output of the k-th layer at the t-th input frame. We next describe the ASR model and the supervised classifier in more detail. 3.1 ASR model The end-to-end model we use in this work is DeepSpeech2 [7], an acoustics-to-characters system based on a deep neural network. The input to the model is a sequence of audio spectrograms (frequency magnitudes), obtained with a 20ms Hamming window and a stride of 10ms. With a sampling rate of 16kHz, we have 161 dimensional input features. Table 1a details the different layers in this model. The first two layers are convolutions where the number of output feature maps is 32 at each layer. The kernel sizes of the first and second convolutional layers are 41x11 and 21x11 respectively, where a convolution of TxF has a size T in the time domain and F in the frequency domain. Both convolutional layers have a stride of 2 in the time domain while the first layer also has a stride of 2 in the frequency domain. This setting results in 1952/1312 features per time frame after the first/second convolutional layers. The convolutional layers are followed by 7 bidirectional recurrent layers, each with a hidden state size of 1760 dimensions. Notably, these are simple RNNs and not gated units such as long short-term memory networks (LSTM) [28], as this was found to produce better performance. We also consider a simpler version of the model, called DeepSpeech2-light, which has 5 layers of bidirectional LSTMs, each with 600 dimensions (Table 1b). This model runs faster but leads to worse recognition results. 3 Each convolutional or recurrent layer is followed by batch normalization [29, 30] and a ReLU nonlinearity. The final layer is a fully-connected layer that maps onto the number of symbols (29 symbols: 26 English letters plus space, apostrophe, and a blank symbol). The network is trained with a CTC loss [31]: L = −log p(l|x) where the probability of a label sequence l given an input sequence x is defined as: p(l|x) = X ⇡2B−1(l) p(⇡|x) = X ⇡2B−1(l) T Y t=1 ASRK t (x)[⇡t] where B removes blanks and repeated symbols, B−1 is its inverse image, T is the length of the label sequence l, and ASRK t (x)[j] is unit j of the model output after the top softmax layer at time t, interpreted as the probability of observing label j at time t. This formulation allows mapping long frame sequences to short character sequences by marginalizing over all possible sequences containing blanks and duplicates. 3.2 Supervised Classifier The frame classifier takes features from different layers of the DeepSpeech2 model as input and predicts a phone label. The size of the input to the classifier thus depends on which layer in DeepSpeech2 is used to generate features. We model the classifier as a feed-forward neural network with one hidden layer, where the size of the hidden layer is set to 500.1 This is followed by dropout (rate of 0.5) and a ReLU non-linearity, then a softmax layer mapping onto the label set size (the number of unique phones). We chose this simple formulation as we are interested in evaluating the quality of the representations learned by the ASR model, rather than improving the state-of-the-art on the supervised task. We train the classifier with Adam [32] with the recommended parameters (↵= 0.001, β1 = 0.9, β2 = 0.999, ✏= e−8) to minimize the cross-entropy loss. We use a batch size of 16, train the model for 30 epochs, and choose the model with the best development loss for evaluation. 4 Tools and Data We use the deepspeech.torch [33] implementation of Baidu’s DeepSpeech2 model [7], which comes with pre-trained models of both DeepSpeech2 and the simpler variant DeepSpeech2-light. The end-to-end models are trained on LibriSpeech [34], a publicly available corpus of English read speech, containing 1,000 hours sampled at 16kHz. The word error rates (WER) of the DeepSpeech2 and DeepSpeech2-light models on the Librispeech-test-clean dataset are 12 and 15, respectively [33]. For the phoneme recognition task, we use TIMIT, which comes with time segmentation of phones. We use the official train/development/test split and extract frames for the frame classification task. Table 2 summarizes statistics of the frame classification dataset. Note that due to sub-sampling at the DeepSpeech2 convolutional layers, the number of frames decreases by a factor of two after each convolutional layer. The possible labels are the 60 phone symbols included in TIMIT (excluding the begin/end silence symbol h#). We also experimented with the reduced set of 48 phones used by [35]. The code for all of our experiments is publicly available.2 Table 2: Frame classification data extracted from TIMIT. Train Development Test Utterances 3,696 400 192 Frames (input) 988,012 107,620 50,380 Frames (after cnn1) 493,983 53,821 25,205 Frames (after cnn2) 233,916 25,469 11,894 1We also experimented with a linear classifier and found that it produces lower results overall but leads to similar trends when comparing features from different layers. 2http://github.com/boknilev/asr-repr-analysis 4 (a) DS2, w/ strides. (b) DS2, w/o strides. (c) DS2-light, w/ strides. (d) DS2-light, w/o strides. Figure 1: Frame classification accuracy using representations from different layers of DeepSpeech2 (DS2) and DeepSpeech2-light (DS2-light), with or without strides in the convolutional layers. 5 Results Figure 1a shows frame classification accuracy using features from different layers of the DeepSpeech2 model. The results are all above a majority baseline of 7.25% (the phone “s”). Input features (spectrograms) lead to fairly good performance, considering the 60-wise classification task. The first convolution further improves the results, in line with previous findings about convolutions as feature extractors before recurrent layers [36]. However, applying a second convolution significantly degrades accuracy. This can be attributed to the filter width and stride, which may extend across phone boundaries. Nevertheless, we find the large drop quite surprising. The first few recurrent layers improve the results, but after the 5th recurrent layer accuracy goes down again. One possible explanation to this may be that higher layers in the model are more sensitive to long distance information that is needed for the speech recognition task, whereas the local information that is needed for classifying phones is better captured in lower layers. For instance, to predict a word like “bought”, the model would need to model relations between different characters, which would be better captured at the top layers. In contrast, feed-forward neural networks trained on phoneme recognition were shown to learn increasingly better representations at higher layers [13, 14]; such networks do not need to model the full speech recognition task, different from end-to-end models. In the following sections, we first investigate three aspects of the model: model complexity, effect of strides in the convolutional layers, and effect of blanks. Then we visualize frame representations in 2D and consider classification into abstract sound classes. Finally, Appendix A provides additional experiments with windows of input features and a reduced phone set, all exhibiting similar trends. 5.1 Model complexity Figure 1c shows the results of using features from the DeepSpeech2-light model. This model has less recurrent layers (5 vs. 7) and smaller hidden states (600 vs. 1760), but it uses LSTMs instead of simple RNNs. A first observation is that the overall trend is the same as in DeepSpeech2: significant drop after the first convolutional layer, then initial increase followed by a drop in the final layers. Comparing the two models (figures 1a and 1c), a number of additional observations can be made. First, the convolutional layers of DeepSpeech2 contain more phonetic information than those of 5 DeepSpeech2-light (+1% and +4% for cnn1 and cnn2, respectively). In contrast, the recurrent layers in DeepSpeech2-light are better, with the best result of 37.77% in DeepSpeech2-light (by lstm3) compared to 33.67% in DeepSpeech2 (by rnn5). This suggests again that higher layers do not model phonology very well; when there are more recurrent layers, the convolutional layers compensate and generate better representations for phonology than when there are fewer recurrent layers. Interestingly, the deeper model performs better on the speech recognition task while its deep representations are not as good at capturing phonology, suggesting that its top layers focus more on modeling character sequences, while its lower layers focus on representing phonetic information. 5.2 Effect of strides The original DeepSpeech2 models have convolutions with strides (steps) in the time dimension [7]. This leads to subsampling by a factor of 2 at each convolutional layer, resulting in reduced dataset size (Table 2). Consequently, the comparison between layers before and after convolutions is not entirely fair. To investigate this effect, we ran the trained convolutions without strides during feature generation for the classifier. Figure 1b shows the results at different layers without using strides in the convolutions. The general trend is similar to the strided case: large drop at the 2nd convolutional layer, then steady increase in the recurrent layers with a drop at the final layers. However, the overall shape of the accuracy in the recurrent layers is less spiky; the initial drop is milder and performance does not degrade as much at the top layers. A similar pattern is observed in the non-strided case of DeepSpeech2-light (Figure 1d). These results can be attributed to two factors. First, running convolutions without strides maintains the number of examples available to the classifier, which means a larger training set. More importantly, however, the time resolution remains high which can be important for frame classification. 5.3 Effect of blank symbols Recall that the CTC model predicts either a letter in the alphabet, a space, or a blank symbol. This allows the model to concentrate probability mass on a few frames that are aligned to the output symbols in a series of spikes, separated by blank predictions [31]. To investigate the effect of blank symbols on phonetic representation, we generate predictions of all symbols using the CTC model, including blanks and repetitions. Then we break down the classifier’s performance into cases where the model predicted a blank, a space, or another letter. Figure 2 shows the results using representations from the best recurrent layers in DeepSpeech2 and DeepSpeech2-light, run with and without strides in the convolutional layers. In the strided case, the hidden representations are of highest quality for phone classification when the model predicts a blank. This appears counterintuitive, considering the spiky behavior of CTC models, which should be more confident when predicting non-blank. However, we found that only 5% of the frames are predicted as blanks, due to downsampling in the strided convolutions. When the model is run without strides, we observe a somewhat different behavior. Note that in this case the model predicts many more blanks (more than 50% compared to 5% in the non-strided case), and representations of frames predicted as blanks are not as good, which is more in line with the common spiky behavior of CTC models [31]. Figure 2: Frame classification accuracy at frames predicted as blank, space, or another letter by DeepSpeech2 and DeepSpeech2-light, with and without strides in the convolutional layers. 6 5.4 Clustering and visualizing representations In this section, we visualize frame representations from different layers of DeepSpeech2. We first ran the DeepSpeech2 model on the entire development set of TIMIT and extracted feature representations for every frame from all layers. This results in more than 100K vectors of different sizes (we use the model without strides in convolutional layers to allow for comparable analysis across layers). We followed a similar procedure to that of [20]: We clustered the vectors in each layer with k-means (k = 500) and plotted the cluster centroids using t-SNE [37]. We assigned to each cluster the phone label that had the largest number of examples in the cluster. As some clusters are quite noisy, we also consider pruning clusters where the majority label does not cover enough of the cluster members. Figure 3 shows t-SNE plots of cluster centroids from selected layers, with color and shape coding for the phone labels (see Figure 9 in Appendix B for other layers). The input layer produces clusters which show a fairly clean separation into groups of centroids with the same assigned phone. After the input layer it is less easy to detect groups, and lower layers do not show a clear structure. In layers rnn4 and rnn5 we again see some meaningful groupings (e.g. “z” on the right side of the rnn5 plot), after which rnn6 and rnn7 again show less structure. Figure 3: Centroids of frame representation clusters using features from different layers. Figure 10 (in Appendix B) shows clusters that have a majority label of at least 10-20% of the examples (depending on the number of examples left in each cluster after pruning). In this case groupings are more observable in all layers, and especially in layer rnn5. We note that these observations are mostly in line with our previous findings regarding the quality of representations from different layers. When frame representations are better separated in vector space, the classifier does a better job at classifying frames into their phone labels; see also [14] for a similar observation. 5.5 Sound classes Speech sounds are often organized in coarse categories like consonants and vowels. In this section, we investigate whether the ASR model learns such categories. The primary question we ask is: which parts of the model capture most information about coarse categories? Are higher layer representations more informative for this kind of abstraction above phones? To answer this, we map phones to their corresponding classes: affricates, fricatives, nasals, semivowels/glides, stops, and vowels. Then we train classifiers to predict sound classes given representations from different layers of the ASR model. Figure 4 shows the results. All layers produce representations that contain a non-trivial amount of information about sound classes (above the vowel majority baseline). As expected, predicting sound classes is easier than predicting phones, as evidenced by a much higher accuracy compared to our previous results. As in previous experiments, the lower layers of the network (input and cnn1) produce the best representations for predicting sound classes. Performance then first drops at cnn2 and increases steadily with each recurrent layer, finally decreasing at the last recurrent layer. It appears that higher layers do not generate better representations for abstract sound classes. Next we analyze the difference between the input layer and the best recurrent layer (rnn5), broken down to specific sound classes. We calculate the change in F1 score (harmonic mean of precision and recall) when moving from input representations to rnn5 representations, where F1 is calculated in two 7 Figure 4: Accuracy of classification into sound classes using representations from different layers of DeepSpeech2. Figure 5: Difference in F1 score using representations from layer rnn5 compared to the input layer. (a) input (b) cnn2 (c) rnn5 Figure 6: Confusion matrices of sound class classification using representations from different layers. ways. The inter-class F1 is calculated by directly predicting coarse sound classes, thus measuring how often the model confuses two separate sound classes. The intra-class F1 is obtained by predicting fine-grained phones and micro-averaging F1 inside each coarse sound class (not counting confusion outside the class). It indicates how often the model confuses different phones in the same sound class. As Figure 5 shows, in most cases representations from rnn5 degrade the performance, both within and across classes. There are two notable exceptions. Affricates are better predicted at the higher layer, both compared to other sound classes and when predicting individual affricates. It may be that more contextual information is needed in order to detect a complex sound like an affricate. Second, the intra-class F1 for nasals improves with representations from rnn5, whereas the inter-class F1 goes down, suggesting that rnn5 is better at distinguishing between different nasals. Finally, Figure 6 shows confusion matrices of predicting sound classes using representations from the input, cnn2, and rnn5 layers. Much of the confusion arises from confusing relatively similar classes: semivowels/vowels, affricates/stops, affricates/fricatives. Interestingly, affricates are less confused at layer rnn5 than in lower layers, which is consistent with our previous observation. 6 Conclusion In this work, we analyzed representations in a deep end-to-end ASR model that is trained with a CTC loss. We empirically evaluated the quality of the representations on a frame classification task, where each frame is classified into its corresponding phone label. We compared feature representations from different layers of the ASR model and observed striking differences in their quality. We also found that these differences are partly correlated with the separability of the representations in vector space. In future work, we would like to extend this analysis to other speech features, such as speaker and dialect ID, and to larger speech recognition datasets. We are also interested in experimenting with other end-to-end systems, such as sequence-to-sequence models and acoustics-to-words systems. Another venue for future work is to improve the end-to-end model based on our insights, for example by improving the representation capacity of certain layers in the deep neural network. 8 Acknowledgements We would like to thank members of the MIT spoken language systems group for helpful discussions. This work was supported by the Qatar Computing Research Institute (QCRI). References [1] A. Graves and N. Jaitly, “Towards End-To-End Speech Recognition with Recurrent Neural Networks,” in Proceedings of the 31st International Conference on Machine Learning (ICML14), T. Jebara and E. P. Xing, Eds. JMLR Workshop and Conference Proceedings, 2014, pp. 1764–1772. [2] Y. Miao, M. Gowayyed, and F. Metze, “EESEN: End-to-end speech recognition using deep RNN models and WFST-based decoding,” in 2015 IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU). IEEE, 2015, pp. 167–174. [3] J. Chorowski, D. Bahdanau, K. Cho, and Y. Bengio, “End-to-end Continuous Speech Recognition using Attention-based Recurrent NN: First Results,” arXiv preprint arXiv:1412.1602, 2014. [4] W. Chan, N. Jaitly, Q. V. Le, and O. Vinyals, “Listen, Attend and Spell: A Neural Network for Large Vocabulary Conversational Speech Recognition,” in 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2016, pp. 4960–4964. [5] S. Toshniwal, H. Tang, L. Lu, and K. Livescu, “Multitask Learning with Low-Level Auxiliary Tasks for Encoder-Decoder Based Speech Recognition,” arXiv preprint arXiv:1704.01631, 2017. [6] F. Eyben, M. Wöllmer, B. Schuller, and A. Graves, “From Speech to Letters - Using a Novel Neural Network Architecture for Grapheme Based ASR,” in 2009 IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU), Nov 2009, pp. 376–380. [7] D. Amodei, R. Anubhai, E. Battenberg, C. Case, J. Casper, B. Catanzaro, J. Chen, M. Chrzanowski, A. Coates, G. Diamos et al., “Deep Speech 2: End-to-End Speech Recognition in English and Mandarin,” in Proceedings of The 33rd International Conference on Machine Learning, 2016, pp. 173–182. [8] D. Bahdanau, J. Chorowski, D. Serdyuk, P. Brakel, and Y. Bengio, “End-to-End Attention-based Large Vocabulary Speech Recognition,” in 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2016, pp. 4945–4949. [9] H. Soltau, H. Liao, and H. Sak, “Neural Speech Recognizer: Acoustic-to-Word LSTM Model for Large Vocabulary Speech Recognition,” in Interspeech 2017, 2017. [10] K. Audhkhasi, B. Ramabhadran, G. Saon, M. Picheny, and D. Nahamoo, “Direct Acoustics-toWord Models for English Conversational Speech Recognition,” in Interspeech 2017, 2017. [11] A.-r. Mohamed, G. Hinton, and G. Penn, “Understanding how deep belief networks perform acoustic modelling,” in 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2012, pp. 4273–4276. [12] D. Yu, M. L. Seltzer, J. Li, J.-T. Huang, and F. Seide, “Feature Learning in Deep Neural Networks - Studies on Speech Recognition Tasks,” in International Conference on Learning Representations (ICLR), 2013. [13] T. Nagamine, M. L. Seltzer, and N. Mesgarani, “Exploring How Deep Neural Networks Form Phonemic Categories,” in Interspeech 2015, 2015. [14] ——, “On the Role of Nonlinear Transformations in Deep Neural Network Acoustic Models,” in Interspeech 2016, 2016, pp. 803–807. [15] Y.-H. Wang, C.-T. Chung, and H.-y. Lee, “Gate Activation Signal Analysis for Gated Recurrent Neural Networks and Its Correlation with Phoneme Boundaries,” in Interspeech 2017, 2017. [16] Z. Wu and S. King, “Investigating gated recurrent networks for speech synthesis,” in 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2016, pp. 5140–5144. 9 [17] S. Wang, Y. Qian, and K. Yu, “What Does the Speaker Embedding Encode?” in Interspeech 2017, 2017, pp. 1497–1501. [Online]. Available: http://dx.doi.org/10.21437/Interspeech. 2017-1125 [18] R. Chaabouni, E. Dunbar, N. Zeghidour, and E. Dupoux, “Learning weakly supervised multimodal phoneme embeddings,” in Interspeech 2017, 2017. [19] G. Chrupała, L. Gelderloos, and A. Alishahi, “Representations of language in a model of visually grounded speech signal,” in Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 2017, pp. 613–622. [20] D. Harwath and J. Glass, “Learning Word-Like Units from Joint Audio-Visual Analysis,” in Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 2017, pp. 506–517. [21] A. Alishahi, M. Barking, and G. Chrupała, “Encoding of phonology in a recurrent neural model of grounded speech,” in Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017). Association for Computational Linguistics, 2017, pp. 368–378. [22] A. Köhn, “What’s in an Embedding? Analyzing Word Embeddings through Multilingual Evaluation,” in Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. Lisbon, Portugal: Association for Computational Linguistics, September 2015, pp. 2067–2073. [Online]. Available: http://aclweb.org/anthology/D15-1246 [23] P. Qian, X. Qiu, and X. Huang, “Investigating Language Universal and Specific Properties in Word Embeddings,” in Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Berlin, Germany: Association for Computational Linguistics, August 2016, pp. 1478–1488. [Online]. Available: http://www.aclweb.org/anthology/P16-1140 [24] Y. Adi, E. Kermany, Y. Belinkov, O. Lavi, and Y. Goldberg, “Fine-grained Analysis of Sentence Embeddings Using Auxiliary Prediction Tasks,” in International Conference on Learning Representations (ICLR), April 2017. [25] X. Shi, I. Padhi, and K. Knight, “Does String-Based Neural MT Learn Source Syntax?” in Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing. Austin, Texas: Association for Computational Linguistics, November 2016, pp. 1526–1534. [26] Y. Belinkov, N. Durrani, F. Dalvi, H. Sajjad, and J. Glass, “What do Neural Machine Translation Models Learn about Morphology?” in Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 2017, pp. 861–872. [27] L. Gelderloos and G. Chrupała, “From phonemes to images: levels of representation in a recurrent neural model of visually-grounded language learning,” in Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers. Osaka, Japan: The COLING 2016 Organizing Committee, December 2016, pp. 1309–1319. [28] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. [29] S. Ioffe and C. Szegedy, “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift,” in Proceedings of the 32Nd International Conference on International Conference on Machine Learning (ICML), vol. 37, 2015, pp. 448–456. [30] C. Laurent, G. Pereyra, P. Brakel, Y. Zhang, and Y. Bengio, “Batch Normalized Recurrent Neural Networks,” in 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2016, pp. 2657–2661. [31] A. Graves, S. Fernández, F. Gomez, and J. Schmidhuber, “Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks,” in Proceedings of the 23rd International Conference on Machine Learning (ICML), 2006, pp. 369–376. [32] D. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” arXiv preprint arXiv:1412.6980, 2014. [33] S. Naren, “deepspeech.torch,” https://github.com/SeanNaren/deepspeech.torch, 2016. 10 [34] V. Panayotov, G. Chen, D. Povey, and S. Khudanpur, “Librispeech: an ASR corpus based on public domain audio books,” in 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2015, pp. 5206–5210. [35] K.-F. Lee and H.-W. Hon, “Speaker-independent phone recognition using hidden markov models,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 37, no. 11, pp. 1641–1648, 1989. [36] T. N. Sainath, O. Vinyals, A. Senior, and H. Sak, “Convolutional, Long Short-Term Memory, fully connected Deep Neural Networks,” in 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2015, pp. 4580–4584. [37] L. v. d. Maaten and G. Hinton, “Visualizing data using t-SNE,” Journal of Machine Learning Research, vol. 9, pp. 2579–2605, 2008. [38] H. Sak, F. de Chaumont Quitry, T. Sainath, K. Rao et al., “Acoustic Modelling with CDCTC-SMBR LSTM RNNs,” in 2015 IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU). IEEE, 2015, pp. 604–609. 11 | 2017 | 462 |
6,966 | Multi-Task Learning for Contextual Bandits Aniket Anand Deshmukh Department of EECS University of Michigan Ann Arbor Ann Arbor, MI 48105 aniketde@umich.edu Urun Dogan Microsoft Research Cambridge CB1 2FB, UK urun.dogan@skype.net Clayton Scott Department of EECS University of Michigan Ann Arbor Ann Arbor, MI 48105 clayscot@umich.edu Abstract Contextual bandits are a form of multi-armed bandit in which the agent has access to predictive side information (known as the context) for each arm at each time step, and have been used to model personalized news recommendation, ad placement, and other applications. In this work, we propose a multi-task learning framework for contextual bandit problems. Like multi-task learning in the batch setting, the goal is to leverage similarities in contexts for different arms so as to improve the agent’s ability to predict rewards from contexts. We propose an upper confidence bound-based multi-task learning algorithm for contextual bandits, establish a corresponding regret bound, and interpret this bound to quantify the advantages of learning in the presence of high task (arm) similarity. We also describe an effective scheme for estimating task similarity from data, and demonstrate our algorithm’s performance on several data sets. 1 Introduction A multi-armed bandit (MAB) problem is a sequential decision making problem where, at each time step, an agent chooses one of several “arms," and observes some reward for the choice it made. The reward for each arm is random according to a fixed distribution, and the agent’s goal is to maximize its cumulative reward [4] through a combination of exploring different arms and exploiting those arms that have yielded high rewards in the past [15, 11]. The contextual bandit problem is an extension of the MAB problem where there is some side information, called the context, associated to each arm [12]. Each context determines the distribution of rewards for the associated arm. The goal in contextual bandits is still to maximize the cumulative reward, but now leveraging the contexts to predict the expected reward of each arm. Contextual bandits have been employed to model various applications like news article recommendation [7], computational advertisement [9], website optimization [20] and clinical trials [19]. For example, in the case of news article recommendation, the agent must select a news article to recommend to a particular user. The arms are articles and contextual features are features derived from the article and the user. The reward is based on whether a user reads the recommended article. One common approach to contextual bandits is to fix the class of policy functions (i.e., functions from contexts to arms) and try to learn the best function with time [13, 18, 16]. Most algorithms estimate rewards either separately for each arm, or have one single estimator that is applied to all arms. In 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. contrast, our approach is to adopt the perspective of multi-task learning (MTL). The intuition is that some arms may be similar to each other, in which case it should be possible to pool the historical data for these arms to estimate the mapping from context to rewards more rapidly. For example, in the case of news article recommendation, there may be thousands of articles, and some of those are bound to be similar to each other. Problem 1 Contextual Bandits for t = 1, ..., T do Observe context xa,t ∈Rd for all arms a ∈[N], where [N] = {1, ...N} Choose an arm at ∈[N] Receive a reward rat,t ∈R Improve arm selection strategy based on new observation (xat,t, at, rat,t) end for The contextual bandit problem is formally stated in Problem 1. The total T trial reward is defined as PT t=1 rat,t and the optimal T trial reward as PT t=1 ra∗ t ,t, where rat,t is reward of the selected arm at at time t and a∗ t is the arm with maximum reward at trial t. The goal is to find an algorithm that minimizes the T trial regret R(T) = T X t=1 ra∗ t ,t − T X t=1 rat,t. We focus on upper confidence bound (UCB) type algorithms for the remainder of the paper. A UCB strategy is a simple way to represent the exploration and exploitation tradeoff. For each arm, there is an upper bound on reward, comprised of two terms. The first term is a point estimate of the reward, and the second term reflects the confidence in the reward estimate. The strategy is to select the arm with maximum UCB. The second term dominates when the agent is not confident about its reward estimates, which promotes exploration. On the other hand, when all the confidence terms are small, the algorithm exploits the best arm(s) [2]. In the popular UCB type contextual bandits algorithm called Lin-UCB, the expected reward of an arm is modeled as a linear function of the context, E[ra,t|xa,t] = xT a,tθ∗ a, where ra,t is the reward of arm a at time t and xa,t is the context of arm a at time t. To select the best arm, one estimates θa for each arm independently using the data for that particular arm [13]. In the language of multi-task learning, each arm is a task, and Lin-UCB learns each task independently. In the theoretical analysis of the Lin-UCB [7] and its kernelized version Kernel-UCB [18] θa is replaced by θ, and the goal is to learn one single estimator using data from all the arms. In other words, the data from the different arms are pooled together and viewed as coming from a single task. These two approaches, independent and pooled learning, are two extremes, and reality often lies somewhere in between. In the MTL approach, we seek to pool some tasks together, while learning others independently. We present an algorithm motivated by this idea and call it kernelized multi-task learning UCB (KMTL-UCB). Our main contributions are proposing a UCB type multi-task learning algorithm for contextual bandits, established a regret bound and interpreting the bound to reveal the impact of increased task similarity, introducing a technique for estimating task similarities on the fly, and demonstrating the effectiveness of our algorithm on several datasets. This paper is organized as follows. Section 2 describes related work and in Section 3 we propose a UCB algorithm using multi-task learning. Regret analysis is presented in Section 4, and our experimental findings are reported in Section 5. We conclude in Section 6. 2 Related Work A UCB strategy is a common approach to quantify the exploration/exploitation tradeoff. At each time step t, and for each arm a, a UCB strategy estimates a reward ˆra,t and a one-sided confidence interval above ˆra,t with width ˆwa,t. The term ucba,t = ˆra,t + ˆwa,t is called the UCB index or just UCB. Then at each time step t, the algorithm chooses the arm a with the highest UCB. 2 In contextual bandits, the idea is to view learning the mapping x 7→r as a regression problem. Lin-UCB uses a linear regression model while Kernel-UCB uses a nonlinear regression model drawn from the reproducing kernel Hilbert space (RKHS) of a symmetric and positive definite (SPD) kernel. Either of these two regression models could be applied in either the independent setting or the pooled setting. In the independent setting, the regression function for each arm is estimated separately. This was the approach adopted by Li et al. [13] with a linear model. Regret analysis for both Lin-UCB and Kernel-UCB adopted the pooled setting [7, 18]. Kernel-UCB in the independent setting has not previously been considered to our knowledge, although the algorithm would just be a kernelized version of Li et al. [13]. We will propose a methodology that extends the above four combinations of setting (independent and pooled) and regression model (linear and nonlinear). Gaussian Process UCB (GP-UCB) uses a Gaussian prior on the regression function and is a Bayesian equivalent of Kernel-UCB [16]. There are some contextual bandit setups that incorporate multi-task learning. In Lin-UCB with Hybrid Linear Models the estimated reward consists of two linear terms, one that is arm-specific and another that is common to all arms [13]. Gang of bandits [5] uses a graph structure (e.g., a social network) to transfer the learning from one user to other for personalized recommendation. Collaborative filtering bandits [14] is a similar technique which clusters the users based on context. Contextual Gaussian Process UCB (CGP-UCB) builds on GP-UCB and has many elements in common with our framework [10]. We defer a more detailed comparison to CGP-UCB until later. 3 KMTL-UCB We propose an alternate regression model that includes the independent and pooled settings as special cases. Our approach is inspired by work on transfer and multi-task learning in the batch setting [3, 8]. Intuitively, if two arms (tasks) are similar, we can pool the data for those arms to train better predictors for both. Formally, we consider regression functions of the form f : ˜X 7→Y where ˜X = Z × X, and Z is what we call the task similarity space, X is the context space and Y ⊆R is the reward space. Every context xa ∈X is associated with an arm descriptor za ∈Z, and we define ˜xa = (za, xa) to be the augmented context. Intuitively, za is a variable that can be used to determine the similarity between different arms. Examples of Z and za will be given below. Let ˜k be a SPD kernel on ˜X. In this work we focus on kernels of the form ˜k (z, x), (z′, x′) = kZ(z, z′)kX (x, x′), (1) where kX is a SPD kernel on X, such as linear or Gaussian kernel if X = Rd, and kZ is a kernel on Z (examples given below). Let H˜k be the RKHS of functions f : ˜X 7→R associated to ˜k. Note that a product kernel is just one option for ˜k, and other forms may be worth exploring. 3.1 Upper Confidence Bound Instead of learning regression estimates for each arm separately, we effectively learn regression estimates for all arms at once by using all the available training data. Let N be the total number of distinct arms that algorithm has to choose from. Define [N] = {1, ..., N} and let the observed contexts at time t be xa,t, ∀a ∈[N]. Let na,t be the number of times the algorithm has selected arm a up to and including time t so that PN a=1 na,t = t. Define sets ta = {τ < t : aτ = a}, where aτ is the arm selected at time τ. Notice that |ta| = na,t−1 for all a. We solve the following problem at time t: ˆft = arg min f∈H˜k 1 N N X a=1 1 na,t−1 X τ∈ta (f(˜xa,τ) −ra,τ)2 + λ∥f∥2 H˜k, (2) where ˜xa,τ is the augmented context of arm a at time τ, and ra,τ is the reward of an arm a selected at time τ. This problem (2) is a variant of kernel ridge regression. Applying the representer theorem [17] 3 the optimal f can be expressed as f = PN a′=1 P τ ′∈ta′ αa′,τ ′˜k(·, ˜xa′,τ ′), which yields the solution (detailed derivation is in the supplementary material) ˆft(˜x) = ˜kt−1(˜x)T (ηt−1 ˜Kt−1 + λI)−1ηt−1yt−1, (3) where ˜Kt−1 is the (t −1) × (t −1) kernel matrix on the augmented data [˜xaτ ,τ]t−1 τ=1, ˜kt−1(˜x) = [˜k(˜x, ˜xaτ ,τ)]t−1 τ=1 is a vector of kernel evaluations between ˜x and the past data, yt−1 = [raτ ,τ]t−1 τ=1 are all observed rewards, and ηt−1 is the (t −1) × (t −1) diagonal matrix ηt−1 = diag[ 1 naτ,t−1 ]t−1 τ=1. When ˜x = ˜xa,t, we write ˜ka,t = ˜kt−1(˜xa,t). With only minor modifications to the argument in Valko et al [18], we have the following: Lemma 1. Suppose the rewards [raτ ,τ]T τ=1 are independent random variables with means E[raτ ,τ|˜xaτ ,τ] = f ∗(˜xaτ ,τ), where f ∗∈H˜k and ∥f ∗∥H˜k ≤c. Let α = q log(2T N/δ) 2 and δ > 0. With probability at least 1 −δ T , we have that ∀a ∈[N] | ˆft(˜xa,t) −f ∗(˜xa,t)| ≤wa,t := (α + c √ λ)sa,t (4) where sa,t = λ−1/2 q ˜k(˜xa,t, ˜xa,t) −˜kT a,t(ηt−1 ˜Kt−1 + λI)−1ηt−1˜ka,t. The result in Lemma 1 motivates the UCB ucba,t = ˆft(˜xa,t) + wa,t and inspires Algorithm 1. Algorithm 1 KMTL-UCB Input: β ∈R+, for t = 1, ..., T do Update the (product) kernel matrix ˜Kt−1 and ηt−1 Observe context features at time t: xa,t for each a ∈[N]. Determine arm descriptor za for each a ∈[N] to get augmented context ˜xa,t. for all a at time t do pa,t ←ˆft(˜xa,t) + βsa,t end for Choose arm at = arg max pa,t, observe a real valued payoff rat,t and update yt . Output: at end for Before an arm has been selected at least once, ˆft(˜xa,t) and the second term in sa,t, i.e., ˜kT a,t(ηt−1 ˜Kt−1 + λI)−1ηt−1˜ka,t, are taken to be 0. In that case, the algorithm only uses the first term of sa,t, i.e., q ˜k(˜xa,t, ˜xa,t), to form the UCB. 3.2 Choice of Task Similarity Space and Kernel To illustrate the flexibility of our framework, we present the following three options for Z and kZ: 1. Independent: Z = {1, ..., N}, kZ(a, a′) = 1a=a′. The augmented context for a context xa from arm a is just (a, xa). 2. Pooled: Z = {1}, kZ ≡1. The augmented context for a context xa for arm a is just (1, xa). 3. Multi-Task: Z = {1, ..., N} and kZ is a PSD matrix reflecting arm/task similarities. If this matrix is unknown, it can be estimated as discussed below. Algorithm 1 with the first two choices specializes to the independent and pooled settings mentioned previously. In either setting, choosing a linear kernel for kX leads to Lin-UCB, while a more general kernel essentially gives rise to Kernel-UCB. We will argue that the multi-task setting facilitates learning when there is high task similarity. 4 We also introduce a fourth option for Z and kZ that allows task similarity to be estimated when it is unknown. In particular, we are inspired by the kernel transfer learning framework of Blanchard et al. [3]. Thus, we define the arm similarity space to be Z = PX , the set of all probability distributions on X. We further assume that contexts for arm a are drawn from probability measure Pa. Given a context xa for arm a, we define its augmented context to be (Pa, xa). To define a kernel on Z = PX , we use the same construction described in [3], originally introduced by Steinwart and Christmann [6]. In particular, in our experiments we use a Gaussian-like kernel kZ(Pa, Pa′) = exp(−∥Ψ(Pa) −Ψ(Pa′)∥2/2σ2 Z), (5) where Ψ(P) = R k′ X (·, x)dPx is the kernel mean embedding of a distribution P. This embedding is defined by yet another SPD kernel k′ X on X, which could be different from the kX used to define ˜k. We may estimate Ψ(Pa) via Ψ( bPa) = 1 na,t−1 P τ∈ta k′ X (·, xaτ ,τ), which leads to an estimate of kZ. 4 Theoretical Analysis To simplify the analysis we consider a modified version of the original problem 2: ˆft = arg min f∈H˜k 1 N N X a=1 X τ∈ta (f(˜xa,τ) −ra,τ)2 + λ∥f∥2 H˜k. (6) In particular, this modified problem omits the terms 1 na,t−1 as they obscure the analysis. In practice, these terms should be incorporated. In this case sa,t = λ−1/2 q ˜k(˜xa,t, ˜xa,t) −˜kT a,t( ˜Kt−1 + λI)−1˜ka,t. Under this assumption KernelUCB is exactly KMTL-UCB with kZ ≡1. On the other hand, KMTL-UCB can be viewed as a special case of Kernel-UCB on the augmented context space ˜ X. Thus, the regret analysis of Kernel-UCB applies to KMTL-UCB, but it does not reveal the potential gains of multi-task learning. We present an interpretable regret bound that reveals the benefits of MTL. We also establish a lower bound on the UCB width that decreases as task similarity increases (presented in the supplementary file). 4.1 Analysis of SupKMTL-UCB It is not trivial to analyze algorithm 1 because the reward at time t is dependent on the past rewards. We follow the same strategy originally proposed in [1] and used in [7, 18] which uses SupKMTL-UCB as a master algorithm, and BaseKMTL-UCB (which is called by SupKMTL-UCB) to get estimates of reward and width. SupKMTL-UCB builds mutually exclusive subsets of [T] such that rewards in any subset are independent. This guarantees that the independence assumption of Lemma 1 is satisfied. We describe these algorithms in a supplementary section because of space constraints. Theorem 1. Assume that ra,t ∈[0, 1], ∀a ∈[N], T ≥1, ∥f ∗∥H˜k ≤c, ˜k(˜x, ˜x) ≤c˜k, ∀˜x ∈˜X and the task similarity matrix KZ is known. With probability at least 1 −δ, SupKMTL-UCB satisfies R(T) ≤ 2 √ T + 10 v u u tlog 2TN(log(T) + 1)/δ 2 + c √ λ ! p 2m log g([T]) p T⌈log(T)⌉ = O p T log(g([T])) where g([T]) = det( ˜ KT +1+λI) λT +1 and m = max(1, c˜k λ ). Note that this theorem assumes that task similarity is known. In the experiments for real datasets using the approach discussed in subsection 3.2 we estimate the task similarity from the available data. 4.2 Interpretation of Regret Bound The following theorems help us interpret the regret bound by looking at g([T]) = det( ˜KT +1 + λI) λT +1 = T +1 Y t=1 (λt + λ) λ , 5 where, λ1 ≥λ2 ≥· · · ≥λT +1 are the eigenvalues of the kernel matrix ˜KT +1. As mentioned above, the regret bound of Kernel-UCB applies to our method, and we are able to recover this bound as a corollary of Theorem 1. In the case of Kernel-UCB ˜Kt = KXt, ∀t ∈[T] as all arm estimators are assumed to be the same. We define the effective rank of ˜KT +1 in the same way as [18] defines the effective dimension of the kernel feature space. Definition 1. The effective rank of ˜KT +1 is defined to be r := min{j : jλ log T ≥PT +1 i=j+1 λi}. In the following result, the notation ˜O hides logarithmic terms. Corollary 1. log(g([T])) ≤r log 2T 2(T +1)c˜k+rλ−rλ log T rλ , and therefore R(T) = ˜O( √ rT) However, beyond recovering a known bound, Theorem 1 can also be interpreted to reveal the potential gains of multi-task learning. To interpret the regret bound in Theorem 1, we make a further assumption that after time t, na,t = t N for all a ∈[N]. For simplicity define nt = na,t. Let (⊙) denote the Hadamard product, (⊗) denote the Kronecker product and 1n ∈Rn be the vector of ones. Let KXt = [kX (xaτ ,τ, xaτ′,τ ′)]t τ,τ ′=1 be the t × t kernel matrix on contexts, KZt = [kZ(zaτ , zaτ′ )]t τ,τ ′=1 be the associated t × t kernel matrix based on arm similarity, and KZ = [kZ(za, za)]N a=1 be the N × N arm/task similarity matrix between N arms, where xaτ ,τ is the observed context and zaτ is the associated arm descriptor. Using eqn. (1), we can write ˜Kt = KZt ⊙KXt. We rearrange the sequence of xaτ ,τ to get [xa,τ]N a=1,τ=(t+1)a such that elements (a−1)nt to ant belong to arm a. Define ˜Kr t , Kr Xt and Kr Zt to be the rearranged kernel matrices based on the re-ordered set [xa,τ]N a=1,τ=(t+1)a. Notice that we can write ˜Kr t = (KZ ⊗1nt1T nt) ⊙Kr Xt and the eigenvalues λ( ˜Kt) and λ( ˜Kr t ) are equal. To summarize, we have ˜Kt = KZt ⊙KXt λ( ˜Kt) = λ (KZ ⊗1nt1T nt) ⊙Kr Xt . (7) Theorem 2. Let the rank of matrix KXT +1 be rx and the rank of matrix KZ be rz. Then log(g([T])) ≤rzrx log (T +1)c˜k+λ λ This means that when the rank of the task similarity matrix is low, which reflects a high degree of inter-task similarity, the regret bound is tighter. For comparison, note that when all tasks are independent, rz = N and when all tasks are the same (pooled), then rz = 1. In the case of LinUCB [7] where all arm estimators are assumed to be the same and kX is a linear kernel, the regret bound in Theorem 1 evaluates to ˜O( √ dT), where d is the dimension of the context space. In the original Lin-UCB algorithm [13] where all arm estimators are different, the regret bound would be ˜O( √ NdT). We can further comment on g([T]) when all distinct tasks (arms) are similar to each other with task similarity equal to µ. Thus define KZ(µ) := (1 −µ)IN + µ1N1T N and ˜Kr t (µ) = (KZ(µ) ⊗ 1nt1T nt) ⊙Kr Xt. Theorem 3. Let gµ([T]) = det( ˜ Kr T +1(µ)+λI) λT +1 . If µ1 ≤µ2 then gµ1([T]) ≥gµ2([T]). This shows that when there is more task similarity, the regret bound is tighter. 4.3 Comparison with CGP-UCB CGP-UCB transfers the learning from one task to another by leveraging additional known taskspecific context variables [10], similar in spirit to KTML-UCB. Indeed, with slight modifications, KMTL-UCB can be viewed as a frequentist analogue of CGP-UCB, and similarly CGP-UCB could be modified to address our setting. Furthermore, the term g([T]) appearing in our regret bound is equivalent to an information gain term used to analyze CGP-UCB. In the agnostic case of CGPUCB where there is no assumption of a Gaussian prior on decision functions, their regret bound is O(log(g([T])) √ T), while their regret bound matches ours when they adopt a GP prior on f ∗. Thus, our primary contributions with respect to CGP-UCB are to provide a tighter regret bound in agnostic case, and a technique for estimating task similarity which is critical for real-world applications. 6 5 Experiments We test our algorithm on synthetic data and some multi-class classification datasets. In the case of multi-class datasets, the number of arms N is the number of classes and the reward is 1 if we predict the correct class, otherwise it is 0. We separate the data into two parts - validation set and test set. We use all Gaussian kernels and pre-select the bandwidth of kernels using five fold cross-validation on a holdout validation set and we use β = 0.1 for all experiments. Then we run the algorithm on the test set 10 times (with different sequences of streaming data) and report the mean regret. For the synthetic data, we compare Kernel-UCB in the independent setting (Kernel-UCB-Ind) and pooled setting (Kernel-UCB-Pool), KMTL-UCB with known task similarity, and KMTL-UCB-Est which estimates task similarity on the fly. For the real datasets in the multi-class classification setting, we compare Kernel-UCB-Ind and KMTL-UCB-Est. In this case, the pooled setting is not valid because xa,t is the same for all arms (only za differs) and KMTL-UCB is not valid because the task similarity matrix is unknown. We also report the confidence intervals for these results in the supplementary material. 5.1 Synthetic News Article Data Suppose an agent has access to a pool of articles and their context features. The agent then sees a user along with his/her features for which it needs to recommend an article. Based on user features and article features the algorithm gets a combined context xa,t. The user context xu,t ∈R2, ∀t is randomly drawn from an ellipse centered at (0, 0) with major axis length 1 and minor axis length 0.5. Let xu,t[:, 1] be the minor axis and xu,t[:, 2] be the major axis. Article context xart,t is any angle θ ∈ [0, π 2 ]. To get the overall summary xa,t of user and article the user context xu,t is rotated with xart,t. Rewards for each article are defined based on the minor axis ra,t = 1.0 −(xu,t[:, 1] −a N + 0.5)2 . Figure 1: Synthetic Data Figure 1 shows one such example for 4 different arms. The color code describes the reward, the two axes show the information about user context, and theta is the article context. We take N = 5. For KMTL-UCB, we use a Gaussian kernel on xart,t to get the task similarity. The results of this experiment are shown in Figure 1. As one can see, Kernel-UCB-Pool performs the worst. That means for this setting combining all the data and learning a single estimator is not efficient. KMTL-UCB beats the other methods in all 10 runs, and Kernel-UCB-Ind and KMTL-UCB-Est perform equally well. 5.2 Multi-class Datasets In the case of multi-class classification, each class is an arm and the features of an example for which the algorithm needs to recommend a class are the contexts. We consider the following datasets: Digits (N = 10, d = 64), Letter (N = 26, d = 16), MNIST (N = 10, d = 780 ), Pendigits (N = 10, d = 16), Segment (N = 7, d = 19) and USPS (N = 10, d = 256). Empirical mean regrets are shown in Figure 2. KMTL-UCB-Est performs the best in three of the datasets and performs equally well in the other three datasets. Figure 3 shows the estimated task similarity (re-ordered 7 to reveal block structure) and one can see the effect of the estimated task similarity matrix on the empirical regret in Figure 2. For the Digits, Segment and MNIST datasets, there is significant inter-task similarity. For Digits and Segment datasets, KMTL-UCB-Est is the best in all 10 runs of the experiment while for MNIST, KMTL-UCB-Est is better for all but 1 run. Figure 2: Results on Multiclass Datasets - Empirical Mean Regret Figure 3: Estimated Task Similarity for Real Datasets 6 Conclusions and future work We present a multi-task learning framework in the contextual bandit setting and describe a way to estimate task similarity when it is not given. We give theoretical analysis, interpret the regret bound, and support the theoretical analysis with extensive experiments. In the supplementary material we establish a lower bound on the UCB width, and argue that it decreases as task similarity increases. Our proposal to estimate the task similarity matrix using the arm similarity space Z = PX can be extended in different ways. For example, we could also incorporate previously observed rewards into Z. This would alleviate a potential problem with our approach, namely, that some contexts may have been selected when they did not yield a high reward. Additionally, by estimating the task similarity matrix, we are estimating arm-specific information. In the case of multiclass classification, kZ reflects information that represents the various classes. A natural extension is to incorporate methods for representation learning into the MTL bandit setting. 8 References [1] P. Auer. Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research, 3(Nov):397–422, 2002. [2] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002. [3] G. Blanchard, G. Lee, and C. Scott. Generalizing from several related classification tasks to a new unlabeled sample. In Advances in neural information processing systems, pages 2178–2186, 2011. [4] S. Bubeck and N. Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Machine Learning, 5(1):1–122, 2012. [5] N. Cesa-Bianchi, C. Gentile, and G. Zappella. A gang of bandits. In Advances in Neural Information Processing Systems, pages 737–745, 2013. [6] A. Christmann and I. Steinwart. Universal kernels on non-standard input spaces. In Advances in neural information processing systems, pages 406–414, 2010. [7] W. Chu, L. Li, L. Reyzin, and R. E. Schapire. Contextual bandits with linear payoff functions. [8] T. Evgeniou and M. Pontil. Regularized multi–task learning. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 109–117. ACM, 2004. [9] S. Kale, L. Reyzin, and R. E. Schapire. Non-stochastic bandit slate problems. In Advances in Neural Information Processing Systems, pages 1054–1062, 2010. [10] A. Krause and C. S. Ong. Contextual gaussian process bandit optimization. In Advances in Neural Information Processing Systems, pages 2447–2455, 2011. [11] V. Kuleshov and D. Precup. Algorithms for multi-armed bandit problems. arXiv preprint arXiv:1402.6028, 2014. [12] J. Langford and T. Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. In Advances in neural information processing systems, pages 817–824, 2008. [13] L. Li, W. Chu, J. Langford, and R. E. Schapire. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the 19th international conference on World wide web, pages 661–670. ACM, 2010. [14] S. Li, A. Karatzoglou, and C. Gentile. Collaborative filtering bandits. In Proceedings of the 39th International ACM SIGIR conference on Research and Development in Information Retrieval, pages 539–548. ACM, 2016. [15] H. Robbins. Some aspects of the sequential design of experiments. In Herbert Robbins Selected Papers, pages 169–177. Springer, 1985. [16] N. Srinivas, A. Krause, M. Seeger, and S. M. Kakade. Gaussian process optimization in the bandit setting: No regret and experimental design. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 1015–1022, 2010. [17] I. Steinwart and A. Christmann. Support vector machines. Springer Science & Business Media, 2008. [18] M. Valko, N. Korda, R. Munos, I. Flaounas, and N. Cristianini. Finite-time analysis of kernelised contextual bandits. In Uncertainty in Artificial Intelligence, page 654. Citeseer, 2013. [19] S. S. Villar, J. Bowden, and J. Wason. Multi-armed bandit models for the optimal design of clinical trials: benefits and challenges. Statistical science: a review journal of the Institute of Mathematical Statistics, 30(2):199, 2015. [20] J. White. Bandit algorithms for website optimization. " O’Reilly Media, Inc.", 2012. 9 | 2017 | 463 |
6,967 | Temporal Coherency based Criteria for Predicting Video Frames using Deep Multi-stage Generative Adversarial Networks Prateep Bhattacharjee1, Sukhendu Das2 Visualization and Perception Laboratory Department of Computer Science and Engineering Indian Institute of Technology Madras, Chennai, India 1prateepb@cse.iitm.ac.in, 2sdas@iitm.ac.in Abstract Predicting the future from a sequence of video frames has been recently a sought after yet challenging task in the field of computer vision and machine learning. Although there have been efforts for tracking using motion trajectories and flow features, the complex problem of generating unseen frames has not been studied extensively. In this paper, we deal with this problem using convolutional models within a multi-stage Generative Adversarial Networks (GAN) framework. The proposed method uses two stages of GANs to generate crisp and clear set of future frames. Although GANs have been used in the past for predicting the future, none of the works consider the relation between subsequent frames in the temporal dimension. Our main contribution lies in formulating two objective functions based on the Normalized Cross Correlation (NCC) and the Pairwise Contrastive Divergence (PCD) for solving this problem. This method, coupled with the traditional L1 loss, has been experimented with three real-world video datasets viz. Sports-1M, UCF-101 and the KITTI. Performance analysis reveals superior results over the recent state-of-the-art methods. 1 Introduction Video frame prediction has recently been a popular problem in computer vision as it caters to a wide range of applications including self-driving cars, surveillance, robotics and in-painting. However, the challenge lies in the fact that, real-world scenes tend to be complex, and predicting the future events requires modeling of complicated internal representations of the ongoing events. Past approaches on video frame prediction include the use of recurrent neural architectures [19], Long Short Term Memory [8] networks [22] and action conditional deep networks [17]. Recently, the work of [14] modeled the frame prediction problem in the framework of Generative Adversarial Networks (GAN). Generative models, as introduced by Goodfellow et. al., [5] try to generate images from random noise by simultaneously training a generator (G) and a discriminator network (D) in a process similar to a zero-sum game. Mathieu et. al. [14] shows the effectiveness of this adversarial training in the domain of frame prediction using a combination of two objective functions (along with the basic adversarial loss) employed on a multi-scale generator network. This idea stems from the fact that the original L2-loss tends to produce blurry frames. This was overcome by the use of Gradient Difference Loss (GDL) [14], which showed significant improvement over the past approaches when compared using similarity and sharpness measures. However, this approach, although producing satisfying results for the first few predicted frames, tends to generate blurry results for predictions far away (∼6) in the future. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: The proposed multi-stage GAN framework. The stage-1 generator network produces a low-resolution version of predicted frames which are then fed to the stage-2 generator. Discriminators at both the stages predict 0 or 1 for each predicted frame to denote its origin: synthetic or original. In this paper, we aim to get over this hurdle of blurry predictions by considering an additional constraint between consecutive frames in the temporal dimension. We propose two objective functions: (a) Normalized Cross-Correlation Loss (NCCL) and (b) Pairwise Contrastive Divergence Loss (PCDL) for effectively capturing the inter-frame relationships in the GAN framework. NCCL maximizes the cross-correlation between neighborhood patches from consecutive frames, whereas, PCDL applies a penalty when subsequent generated frames are predicted wrongly by the discriminator network (D), thereby separating them far apart in the feature space. Performance analysis over three real world video datasets shows the effectiveness of the proposed loss functions in predicting future frames of a video. The rest of the paper is organized as follows: section 2 describes the multi-stage generative adversarial architecture; sections 3 - 6 introduce the different loss functions employed: the adversarial loss (AL) and most importantly NCCL and PCDL. We show the results of our experiments on Sports-1M [10], UCF-101 [21] and KITTI [4] and compare them with state-of-the-art techniques in section 7. Finally, we conclude our paper highlighting the key points and future direction of research in section 8. 2 Multi-stage Generative Adversarial Model Generative Adversarial Networks (GAN) [5] are composed of two networks: (a) the Generator (G) and (b) the Discriminator (D). The generator G tries to generate realistic images by learning to model the true data distribution pdata and thereby trying to make the task of differentiating between original and generated images by the discriminator difficult. The discriminator D, in the other hand, is optimized to distinguish between the synthetic and the real images. In essence, this procedure of alternate learning is similar to the process of two player min-max games [5]. Overall, the GANs minimize the following objective function: min G max D v(D, G) = Ex∼pdata[log(D(x))] + Ez∼pz[log(1 −D(G(z)))] (1) where, x is a real image from the true distribution pdata and z is a vector sampled from the distribution pz, usually to be uniform or Gaussian. The adversarial loss employed in this paper is a variant of that in equation 1, as the input to our network is a sequence of frames of a video, instead of a vector z. As convolutions account only for short-range relationships, pooling layers are used to garner information from wider range. But, this process generates low resolution images. To overcome this, Mathieu et. al. [14] uses a multi-scale generator network, equivalent to the reconstruction process of a Laplacian pyramid [18], coupled with discriminator networks to produce high-quality output frames of size 32 × 32. There are two shortcomings of this approach: 2 a. Generating image output at higher dimensions viz. (128 × 128) or (256 × 256), requires multiple use of upsampling operations applied on the output of the generators. In our proposed model, this upsampling is handled by the generator networks itself implicitly through the use of consecutive unpooling operations, thereby generating predicted frames at much higher resolution in lesser number of scales. b. As the generator network parameters are not learned with respect to any objective function which captures the temporal relationship effectively, the output becomes blurry after ∼4 frames. To overcome the first issue, we propose a multi-stage (2-stage) generative adversarial network (MS-GAN). 2.1 Stage-1 Generating the output frame(s) directly often produces blurry outcomes. Instead, we simplify the process by first generating crude, low-resolution version of the frame(s) to be predicted. The stage-1 generator (G1) consists of a series of convolutional layers coupled with unpooling layers [25] which upsample the frames. We used ReLU non-linearity in all but the last layer, in which case, hyperbolic tangent (tanh) was used following the scheme of [18]. The inputs to G1 are m number of consecutive frames of dimension W0 × H0, whereas the outputs are n predicted frames of size W1 × H1, where, W1 = W0 × 2 and H1 = H0 × 2. These outputs, stacked with the upsampled version of the original input frames, produce the input of dimension (m + n) × W1 × H1 for the stage-1 discriminator (D1). D1 applies a chain of convolutional layers followed by multiple fully-connected layers to finally produce an output vector of dimension (m + n), consisting of 0’s and 1’s. One of the key differences of our proposed GAN framework with the conventional one [5]is that, the discriminator network produces decision output for multiple frames, instead of a single 0/1 outcome. This is exploited by one of the proposed objective functions, the PCDL, which is described later in section 4. 2.2 Stage-2 The second stage network closely resembles the stage-1 architecture, differing only in the input and output dimensions. The input to the stage-2 generator (G2) is formed by stacking the predicted frames and the upsampled inputs of G1, thereby having dimension of (m + n) × W1 × H1. The output of G2 are n predicted high-resolution frames of size W2 × H2, where, W2 = W1 × 4 and H2 = H1 × 4. The stage-2 discriminator (D2), works in a similar fashion as D1, producing an output vector of length (m + n). Effectively, the multi-stage model can be represented by the following recursive equations: ˆYk = ( Gk( ˆYk−1, Xk−1), for k ≥2 Gk(Xk−1) for k = 1 (2) where, ˆYk is the set of predicted frames and Xk are the input frames at the kth stage of the generator network Gk. 2.3 Training the multi-stage GAN The training procedure of the multi-stage GAN model follows that of the original generative adversarial networks with minor variations. The training of the discriminator and the generator are described as follows: Training of the discriminator Considering the input to the discriminator (D) as X (series of m frames) and the target output to be Y (series of n frames), D is trained to distinguish between synthetic and original inputs by classifying (X, Y ) into class 1 and (X, G(X)) into class 0. Hence, for each of the k stages, we train D with target ⃗1 (Vector of 1’s with dimension m) for (X, Y ) and 3 target ⃗0 (Vector of 0’s with dimension n) for (X, G(X)). The loss function for training D is: LD adv = Nstages X k=1 Lbce(Dk(Xk, Yk),⃗1) + Lbce(Dk(Xk, Gk(Xk)),⃗0) (3) where, Lbce, the binary cross-entropy loss is defined as: Lbce(A, A′) = − |A| X i=1 A ′ilog(Ai) + (1 −A ′i)log(1 −Ai), Ai ∈{0, 1}, A ′i ∈[0, 1] (4) where, A and A′ are the target and discriminator outputs respectively. Training of the generator We perform an optimization step on the generator network (G), keeping the weights of D fixed, by feeding a set of consecutive frames X sampled from the training data with target Y (set of ground-truth output frames) and minimize the following adversarial loss: LG adv(X) = Nstages X k=1 Lbce(Dk(Xk, Gk(Xk)),⃗1) (5) By minimizing the above two loss criteria (eqns. 3, 5), G makes the discriminator believe that, the source of the generated frames is the input data space itself. Although this process of alternate optimization of D and G is reasonably well designed formulation, in practical purposes, this produces an unstable system where G generates samples that consecutively move far away from the original input space and in consequence D distinguishes them easily. To overcome this instability inherent in the GAN principle and the issue of producing blurry frames defined in section 2, we formulate a pair of objective criteria: (a) Normalized Cross Correlation Loss (NCCL) and (b)Pairwise Contrastive Divergence Loss (PCDL), to be used along with the established adversarial loss (refer eqns. 3 and 5). 3 Normalized Cross-Correlation Loss (NCCL) The main advantage of video over image data is the fact that, it offers a far richer space of data distribution by adding the temporal dimension along with the spatial one. Convolutional Neural Networks (CNN) can only capture short-range relationships, a small part of the vast available information, from the input video data, that too in the spatial domain. Although this can be somewhat alleviated by the use of 3D convolutions [9], that increases the number of learn-able parameters immensely. Normalized cross-correlation has been used since long time in the field of video analytics [1, 2, 16, 13, 23] to model the spatial and temporal relationships present in the data. Normalized cross correlation (NCC) measures the similarity of two image patches as a function of the displacement of one relative to the other. This can be mathematically defined as: NCC(f, g) = X x,y (f(x, y) −µf)(g(x, y) −µg) σfσg (6) where, f(x, y) is a sub-image, g(x, y) is the template to be matched, µf, µg denotes the mean of the sub-image and the template respectively and σf, σg denotes the standard deviation of f and g respectively. In the domain of video frame(s) prediction, we incorporate the NCC by first extracting small nonoverlapping square patches of size h × h (1 < h ≤4), denoted by a 3-tuple Pt{x, y, h}, where, x and y are the co-ordinates of the top-left pixel of a particular patch, from the predicted frame at time t and then calculating the cross-correlation score with the patch extracted from the ground truth frame at time (t −1), represented by ˆPt−1{x −2, y −2, h + 4}. In simpler terms, we estimate the cross-correlation score between a small portion of the current predicted frame and the local neighborhood of that in the previous ground-truth frame. We assume that, the motion features present in the entire scene (frame) be effectively approximated by adjacent spatial blocks of lower resolution,using small local neighborhoods in the temporal dimension. This stems from the fact that, unless the video contains significant jitter or unexpected random events like 4 Algorithm 1: Normalized cross-correlation score for estimating similarity between a set of predicted frame(s) and a set of ground-truth frame(s). Input: Ground-truth frames (GT), Predicted frames (PRED) Output: Cross-correlation score (ScoreNCC) // h = height and width of an image patch // H = height and width of the predicted frames // t = current time // T = Number of frames predicted Initialize: ScoreNCC = 0; for t = 1 to T do for i = 0 to H, i ←i + h do for j = 0 to H, j ←j + h do Pt ←extract_patch(PREDt, i, j, h); /* Extracts a patch from the predicted frame at time t of dimension h × h starting from the top-left pixel index (i, j) */ ˆPt−1 ←extract_patch(GTt−1, i −2, j −2, h + 4); /* Extracts a patch from the ground-truth frame at time (t −1) of dimension (h + 4) × (h + 4) starting from the top-left pixel index (i −2, j −2) */ µPt ←avg(Pt); µ ˆ Pt−1 ←avg( ˆPt−1); σPt ←standard_deviation(Pt); σ ˆ Pt−1 ←standard_deviation( ˆPt−1); ScoreNCC ←ScoreNCC + max 0, P x,y (Pt(x,y)−µPt)( ˆ Pt−1(x,y)−µ ˆ Pt−1) σPtσ ˆ Pt−1 ; end end ScoreNCC ←ScoreNCC/⌊H/h⌋2 ; // Average over all the patches end ScoreNCC ←ScoreNCC/(T −1); // Average over all the frames scene change, the motion features remain smooth over time. The step-by-step process for finding the cross-correlation score by matching local patches of predicted and ground truth frames is described in algorithm 1. The idea of calculating the NCC score is modeled into an objective function for the generator network G, where it tries to maximize the score over a batch of inputs. In essence, this objective function models the temporal data distribution by smoothing the local motion features generated by the convolutional model. This loss function, LNCCL, is defined as: LNCCL(Y, ˆY ) = −ScoreNCC(Y, ˆY ) (7) where, Y and ˆY are the ground truth and predicted frames and ScoreNCC is the average normalized cross-correlation score over all the frames, obtained using the method as described in algorithm 1. The generator tries to minimize LNCCL along with the adversarial loss defined in section 2. We also propose a variant of this objective function, termed as Smoothed Normalized CrossCorrelation Loss (SNCCL), where the patch similarity finding logic of NCCL is extended by convolving with Gaussian filters to suppress transient (sudden) motion patterns. A detailed discussion of this algorithm is given in sec. A of the supplementary document. 4 Pairwise Contrastive Divergence Loss (PCDL) As discussed in sec. 3, the proposed method captures motion features that vary slowly over time. The NCCL criteria aims to achieve this using local similarity measures. To complement this in a global scale, we use the idea of pairwise contrastive divergence over the input frames. The idea of exploiting this temporal coherence for learning motion features has been studied in the recent past [6, 7, 15]. 5 By assuming that, motion features vary slowly over time, we describe ˆYt and ˆYt+1 as a temporal pair, where, ˆYi and ˆYt+1 are the predicted frames at time t and (t + 1) respectively, if the outputs of the discriminator network D for both these frames are 1. With this notation, we model the slowness principle of the motion features using an objective function as: LP CDL( ˆY , ⃗p) = T −1 X i=0 Dδ( ˆYi, ˆYi+1, pi × pi+1) = T −1 X i=0 pi × pi+1 × d( ˆYi, ˆYi+1) + (1 −pi × pi+1) × max(0, δ −d( ˆYi, ˆYi+1)) (8) where, T is the time-duration of the frames predicted, pi is the output decision (pi ∈{0, 1}) of the discriminator, d(x, y) is a distance measure (L2 in this paper) and δ is a positive margin. Equation 8 in simpler terms, minimizes the distance between frames that have been predicted correctly and encourages the distance in the negative case, up-to a margin δ. 5 Higher Order Pairwise Contrastive Divergence Loss The Pairwise Contrastive Divergence Loss (PCDL) discussed in the previous section takes into account (dis)similarities between two consecutive frames to bring them further (or closer) in the spatio-temporal feature space. This idea can be extended for higher order situations involving three or more consecutive frames. For n = 3, where n is the number of consecutive frames considered, PCDL can be defined as: L3−P CDL = T −2 X i=0 Dδ(| ˆYi −ˆYi+1|, | ˆYi+1 −ˆYi+2|, pi,i+1,i+2) = T −2 X i=0 pi,i+1,i+2 × d(| ˆYi −ˆYi+1|, | ˆYi+1 −ˆYi+2|) + (1 −pi,i+1,i+2) × max(0, δ −d(|( ˆYi −ˆYi+1)|, |( ˆYi+1 −ˆYi+2)|)) (9) where, pi,i+1,i+2 = 1 only if pi, pi+1 and pi+2- all are simultaneously 1, i.e., the discriminator is very sure about the predicted frames, that they are from the original data distribution. All the other symbols bear standard representations defined in the paper. This version of the objective function, in essence shrinks the distance between the predicted frames occurring sequentially in a temporal neighborhood, thereby increasing their similarity and maintaining the temporal coherency. 6 Combined Loss Finally, we combine the objective functions given in eqns. 5 - 8 along with the general L1-loss with different weights as: LCombined =λadvLG adv(X) + λL1LL1(X, Y ) + λNCCLLNCCL(Y, ˆY ) + λP CDLLP CDL( ˆY , ⃗p) + λP CDLL3−P CDL( ˆY , ⃗p) (10) All the weights viz. λL1, λNCCL, λP CDL and λ3−P CDL have been set as 0.25, while λadv equals 0.01. This overall loss is minimized during the training stage of the multi-stage GAN using Adam optimizer [11]. We also evaluate our models by incorporating another loss function described in section A of the supplementary document, the Smoothed Normalized Cross-Correlation Loss (SNCCL). The weight for SNCCL, λSNCCL equals 0.33 while λ3−P CDL and λP CDL is kept at 0.16. 7 Experiments Performance analysis with experiments of our proposed prediction model for video frame(s) have been done on video clips from Sports-1M [10], UCF-101 [21] and KITTI [4] datasets. The inputoutput configuration used for training the system is as follows: input: 4 frames and output: 4 frames. 6 We compare our results with recent state-of-the-art methods using two popular metrics: (a) Peak Signal to Noise Ratio (PSNR) and (b) Structural Similarity Index Measure (SSIM) [24]. 7.1 Datasets Sports-1M A large collection of sports videos collected from YouTube spread over 487 classes. The main reason for choosing this dataset is the amount of movement in the frames. Being a collection of sports videos, this has sufficient amount of motion present in most of the frames, making it an efficient dataset for training the prediction model. Only this dataset has been used for training all throughout our experimental studies. UCF-101 This dataset contains 13320 annotated videos belonging to 101 classes having 180 frames/video on average. The frames in this video do not contain as much movement as the Sports1m and hence this is used only for testing purpose. KITTI This consists of high-resolution video data from different road conditions. We have taken raw data from two categories: (a) city and (b) road. 7.2 Architecture of the network Table 1: Network architecture details; G and D represents the generator and discriminator networks respectively. U denotes an unpooling operation which upsamples an input by a factor of 2. Network Stage-1 (G) Stage-2 (G) Stage-1 (D) Stage-2 (D) Number of feature maps 64, 128, 256U, 128, 64 64, 128U, 256, 512U, 256, 128, 64 64, 128, 256 128, 256, 512, 256, 128 Kernel sizes 5, 3, 3, 3, 5 5, 5, 5, 5, 5, 5, 5 3, 5, 5 7, 5, 5, 5, 5 Fully connected N/A N/A 1024, 512 1024, 512 The architecture details for the generator (G) and discriminator (D) networks used for experimental studies are shown in table 1. All the convolutional layers except the terminal one in both stages of G are followed by ReLU non-linearity. The last layer is tied with tanh activation function. In both the stages of G, we use unpooling layers to upsample the image into higher resolution in magnitude of 2 in both dimensions (height and width). The learning rate is set to 0.003 for G, which is gradually decreased to 0.0004 over time. The discriminator (D) uses ReLU non-linearities and is trained with a learning rate of 0.03. We use mini-batches of 8 clips for training the overall network. 7.3 Evaluation metric for prediction Assessment of the quality of the predicted frames is done by two methods: (a) Peak Signal to Noise Ratio (PSNR) and (b) Structural Similarity Index Measure (SSIM). PSNR measures the quality of the reconstruction process through the calculation of Mean-squared error between the original and the reconstructed signal in logarithmic decibel scale [1]. SSIM is also an image similarity measure where, one of the images being compared is assumed to be of perfect quality [24]. As the frames in videos are composed of foreground and background, and in most cases the background is static (not the case in the KITTI dataset, as it has videos taken from camera mounted on a moving car), we extract random sequences of 32 × 32 patches from the frames with significant motion. Calculation of motion is done using the optical flow method of Brox et. al. [3]. 7.4 Comparison We compare the results on videos from UCF-101, using the model trained on the Sports-1M dataset. Table 2 demonstrates the superiority of our method over the most recent work [14]. We followed similar choice of test set videos as in [14] to make a fair comparison. One of the impressive facts in our model is that, it can produce acceptably good predictions even in the 4th frame, which is a significant result considering that [14] uses separate smaller multi-scale models for achieving this 7 Figure 2: Qualitative results of using the proposed framework for predicting frames in UCF-101 with the three rows representing (a) Ground-truth, (b) Adv + L1 and (c) Combined (section 6) respectively. ’T’ denotes the time-step. Figures in insets show zoomed-in patches for better visibility of areas involving motion (Best viewed in color). feat. Also note that, even though the metrics for the first predicted frame do not differ by a large margin compared to the results from [14] for higher frames, the values decrease much slowly for the models trained with the proposed objective functions (rows 8-10 of table 2). The main reason for this phenomenon in our proposed method is the incorporation of the temporal relations in the objective functions, rather than learning only in the spatial domain. Similar trend was also found in case of the KITTI dataset. We could not find any prior work in the literature reporting findings on the KITTI dataset and hence compared only with several of our proposed models. In all the cases, the performance gain with the inclusion of NCCL and PCDL is evident. Finally, we show the prediction results obtained on both the UCF-101 and KITTI in figures 2 and 3. It is evident from the sub-figures that, our proposed objective functions produce impressive quality frames while the models trained with L1 loss tends to output blurry reconstruction. The supplementary document contains visual results (shown in figures C.1-C.2) obtained in case of predicting frames far-away from the current time-step (8 frames). 8 Conclusion In this paper, we modified the Generative Adversarial Networks (GAN) framework with the use of unpooling operations and introduced two objective functions based on the normalized crosscorrelation (NCCL) and the contrastive divergence estimate (PCDL), to design an efficient algorithm for video frame(s) prediction. Studies show significant improvement of the proposed methods over the recent published works. Our proposed objective functions can be used with more complex networks involving 3D convolutions and recurrent neural networks. In the future, we aim to learn weights for the cross-correlation such that it focuses adaptively on areas involving varying amount of motion. 8 Table 2: Comparison of performance for different methods using PSNR/SSIM scores for the UCF-101 and KITTI datasets. The first five rows report the results from [14]. (*) indicates models fine tuned on patches of size 64 × 64 [14]. (-) denotes unavailability of data. GDL stands for Gradient Difference Loss [14]. SNCCL is discussed in section A of the supplementary document. Best results in bold. 1st frame prediction score 2nd frame prediction score 4th frame prediction score Methods UCF KITTI UCF KITTI UCF KITTI L1 28.7/0.88 23.8/0.83 GDL L1 29.4/0.90 24.9/0.84 GDL L1* 29.9/0.90 26.4/0.87 Adv + GDL fine-tuned* 32.0/0.92 28.9/0.89 Optical flow 31.6/0.93 28.2/0.90 Next-flow [20] 31.9/Deep Voxel Flow [12] 35.8/0.96 Adv + NCCL + L1 35.4/0.94 37.1/0.91 33.9/0.92 35.4/0.90 28.7/0.75 27.8/0.75 Combined 37.3/0.95 39.7/0.93 35.7/0.92 37.1/0.91 30.2/0.76 29.6/0.76 Combined + SNCCL 38.2/0.95 40.2/0.94 36.8/0.93 37.7/0.91 30.9/0.77 30.4/0.77 Combined + SNCCL (full frame) 37.3/0.94 39.4/0.94 35.1/0.91 36.4/0.91 29.5/0.75 29.1/0.76 Figure 3: Qualitative results of using the proposed framework for predicting frames in the KITTI Dataset, for (a) L1, (b) NCCL (section 3), (c) Combined (section 6) and (d) ground-truth (Best viewed in color). 9 References [1] A. C. Bovik. The Essential Guide to Video Processing. Academic Press, 2nd edition, 2009. [2] K. Briechle and U. D. Hanebeck. Template matching using fast normalized cross correlation. In Aerospace/Defense Sensing, Simulation, and Controls, pages 95–102. International Society for Optics and Photonics, 2001. [3] T. Brox and J. Malik. Large displacement optical flow: descriptor matching in variational motion estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 33(3):500–513, 2011. [4] A. Geiger, P. Lenz, C. Stiller, and R. Urtasun. Vision meets robotics: The kitti dataset. International Journal of Robotics Research (IJRR), 2013. [5] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems (NIPS), pages 2672– 2680, 2014. [6] R. Goroshin, J. Bruna, J. Tompson, D. Eigen, and Y. LeCun. Unsupervised learning of spatiotemporally coherent metrics. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 4086–4093, 2015. [7] R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, pages 1735–1742, 2006. [8] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. [9] S. Ji, W. Xu, M. Yang, and K. Yu. 3d convolutional neural networks for human action recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 35(1):221–231, 2013. [10] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. [11] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [12] Z. Liu, R. Yeh, X. Tang, Y. Liu, and A. Agarwala. Video frame synthesis using deep voxel flow. arXiv preprint arXiv:1702.02463, 2017. [13] J. Luo and E. E. Konofagou. A fast normalized cross-correlation calculation method for motion estimation. IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control, 57(6):1347–1357, 2010. [14] M. Mathieu, C. Couprie, and Y. LeCun. Deep multi-scale video prediction beyond mean square error. International Conference on Learning Representations (ICLR), 2016. [15] H. Mobahi, R. Collobert, and J. Weston. Deep learning from temporal coherence in video. In Proceedings of the 26th Annual International Conference on Machine Learning (ICML), pages 737–744. ACM, 2009. [16] A. Nakhmani and A. Tannenbaum. A new distance measure based on generalized image normalized cross-correlation for robust video tracking and image recognition. Pattern Recognition Letters (PRL), 34(3):315–321, 2013. [17] J. Oh, X. Guo, H. Lee, R. L. Lewis, and S. Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems (NIPS), pages 2863–2871, 2015. [18] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [19] M. Ranzato, A. Szlam, J. Bruna, M. Mathieu, R. Collobert, and S. Chopra. Video (language) modeling: a baseline for generative models of natural videos. arXiv preprint arXiv:1412.6604, 2014. [20] N. Sedaghat. Next-flow: Hybrid multi-tasking with next-frame prediction to boost optical-flow estimation in the wild. arXiv preprint arXiv:1612.03777, 2016. [21] K. Soomro, A. R. Zamir, and M. Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. [22] N. Srivastava, E. Mansimov, and R. Salakhudinov. Unsupervised learning of video representations using lstms. In International Conference on Machine Learning (ICML), pages 843–852, 2015. [23] A. Subramaniam, M. Chatterjee, and A. Mittal. Deep neural networks with inexact matching for person re-identification. In Advances in Neural Information Processing Systems (NIPS), pages 2667–2675, 2016. [24] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing (TIP), 13(4):600–612, 2004. [25] M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In European Conference on Computer Vision (ECCV), pages 818–833. Springer, 2014. 10 | 2017 | 464 |
6,968 | Improving the Expected Improvement Algorithm Chao Qin Columbia Business School New York, NY 10027 cqin22@gsb.columbia.edu Diego Klabjan Northwestern University Evanston, IL 60208 d-klabjan@northwestern.edu Daniel Russo Columbia Business School New York, NY 10027 djr2174@gsb.columbia.edu Abstract The expected improvement (EI) algorithm is a popular strategy for information collection in optimization under uncertainty. The algorithm is widely known to be too greedy, but nevertheless enjoys wide use due to its simplicity and ability to handle uncertainty and noise in a coherent decision theoretic framework. To provide rigorous insight into EI, we study its properties in a simple setting of Bayesian optimization where the domain consists of a finite grid of points. This is the so-called best-arm identification problem, where the goal is to allocate measurement effort wisely to confidently identify the best arm using a small number of measurements. In this framework, one can show formally that EI is far from optimal. To overcome this shortcoming, we introduce a simple modification of the expected improvement algorithm. Surprisingly, this simple change results in an algorithm that is asymptotically optimal for Gaussian best-arm identification problems, and provably outperforms standard EI by an order of magnitude. 1 Introduction Recently Bayesian optimization has received much attention in the machine learning community [21]. This literature studies the problem of maximizing an unknown black-box objective function by collecting noisy measurements of the function at carefully chosen sample points. At first a prior belief over the objective function is prescribed, and then the statistical model is refined sequentially as data are observed. Expected improvement (EI) [13] is one of the most widely-used Bayesian optimization algorithms. It is a greedy improvement-based heuristic that samples the point offering greatest expected improvement over the current best sampled point. EI is simple and readily implementable, and it offers reasonable performance in practice. Although EI is reasonably effective, it is too greedy, focusing nearly all sampling effort near the estimated optimum and gathering too little information about other regions in the domain. This phenomenon is most transparent in the simplest setting of Bayesian optimization where the function’s domain is a finite grid of points. This is the problem of best-arm identification (BAI) [1] in a multiarmed bandit. The player sequentially selects arms to measure and observes noisy reward samples with the hope that a small number of measurements enable a confident identification of the best arm. Recently Ryzhov [20] studied the performance of EI in this setting. His work focuses on a link between EI and another algorithm known as the optimal computing budget allocation [3], but his analysis reveals EI allocates a vanishing proportion of samples to suboptimal arms as the total number of samples grows. Any method with this property will be far from optimal in BAI problems [1]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we improve the EI algorithm dramatically through a simple modification. The resulting algorithm, which we call top-two expected improvement (TTEI), combines the top-two sampling idea of Russo [19] with a careful change to the improvement-measure used by EI. We show that this simple variant of EI achieves strong asymptotic optimality properties in the BAI problem, and benchmark the algorithm in simulation experiments. Our main theoretical contribution is a complete characterization of the asymptotic proportion of samples TTEI allocates to each arm as a function of the true (unknown) arm means. These particular sampling proportions have been shown to be optimal from several perspectives [4, 12, 9, 19, 8], and this enables us to establish two different optimality results for TTEI. The first concerns the rate at which the algorithm gains confidence about the identity of the optimal arm as the total number of samples collected grows. Next we study the so-called fixed confidence setting, where the algorithm is able to stop at any point and return an estimate of the optimal arm. We show that when applied with the stopping rule of Garivier and Kaufmann [8], TTEI essentially minimizes the expected number of samples required among all rules obeying a constraint on the probability of incorrect selection. One undesirable feature of our algorithm is its dependence on a tuning parameter. Our theoretical results precisely show the impact of this parameter, and reveal a surprising degree of robustness to its value. It is also easy to design methods that adapt this parameter over time to the optimal value, and we explore one such method in simulation. Still, removing this tuning parameter is an interesting direction for future research. Further related literature. Despite the popularity of EI, its theoretical properties are not well studied. A notable exception is the work of Bull [2], who studies a global optimization problem and provides a convergence rate for EI’s expected loss. However, it is assumed that the observations are noiseless. Our work also relates to a large number of recent machine learning papers that try to characterize the sample complexity of the best-arm identification problem [5, 18, 1, 7, 14, 10, 11, 15– 17]. Despite substantial progress, matching asymptotic upper and lower bounds remained elusive in this line of work. Building on older work in statistics [4, 12] and simulation optimization [9], recent work of Garivier and Kaufmann [8] and Russo [19] characterized the optimal sampling proportions. Two notions of asymptotic optimality are established: sample complexity in the fixed confidence setting and rate of posterior convergence. Garivier and Kaufmann [8] developed two sampling rules designed to closely track the asymptotic optimal proportions and showed that, when combined with a stopping rule motivated by Chernoff [4], this sampling rule minimizes the expected number of samples required to guarantee a vanishing threshold on the probability of incorrect selection is satisfied. Russo [19] independently proposed three simple Bayesian algorithms, and proved that each algorithm attains the optimal rate of posterior convergence. TTEI proposed in this paper is conceptually most similar to the top-two value sampling of Russo [19], but it is more computationally efficient. 1.1 Main Contributions As discussed below, our work makes both theoretical and algorithmic contributions. Theoretical: Our main theoretical contribution is Theorem 1, which establishes that TTEI–a simple modification to a popular Bayesian heuristic–converges to the known optimal asymptotic sampling proportions. It is worth emphasizing that, unlike recent results for other top-two sampling algorithms [19], this theorem establishes that the expected time to converge to the optimal proportions is finite, which we need to establish optimality in the fixed confidence setting. Proving this result required substantial technical innovations. Theorems 2 and 3 are additional theoretical contributions. These mirror results in [19] and [8], but we extract minimal conditions on sampling rules that are sufficient to guarantee the two notions of optimality studied in these papers. Algorithmic: On the algorithmic side, we substantially improve a widely used algorithm. TTEI can be easily implemented by modifying existing EI code, but, as shown in our experiments, can offer an order of magnitude improvement. A more subtle point involves the advantages of TTEI over algorithms that are designed to directly target convergence on the asymptotically optimal proportions. In the experiments, we show that TTEI substantially outperforms an oracle sampling rule whose sampling proportions directly track the asymptotically optimal proportions. This phenomenon should be explored further in future work, but suggests that 2 by carefully reasoning about the value of information TTEI accounts for important factors that are washed out in asymptotic analysis. Finally–as discussed in the conclusion–although we focus on uncorrelated priors we believe our method can be easily extended to more complicated problems like that of best-arm identification in linear bandits [22]. 2 Problem Formulation Let A = {1, . . . , k} be the set of arms. At each time n ∈N = {0, 1, 2, . . .}, an arm In ∈A is measured, and an independent noisy reward Yn,In is observed. The reward Yn,i ∈R of arm i at time n follows a normal distribution N(µi, σ2) with common known variance σ2, but unknown mean µi. The objective is to allocate measurement effort wisely in order to confidently identify the arm with highest mean using a small number of measurements. We assume that µ1 > µ2 > . . . > µk. Our analysis takes place in a frequentist setting, in which the true means (µ1, . . . , µk) are fixed but unknown. The algorithms we study, however, are Bayesian in the sense that they begin with prior over the arm means and update the belief to form a posterior distribution as evidence is gathered. Prior and Posterior Distributions. The sampling rules studied in this paper begin with a normally distributed prior over the true mean of each arm i ∈A denoted by N(µ0,i, σ2 0,i), and update this to form a posterior distribution as observations are gathered. By conjugacy, the posterior distribution after observing the sequence (I0, Y0,I0, . . . , In−1, Yn−1,In−1) is also a normal distribution denoted by N(µn,i, σ2 n,i). The posterior mean and variance can be calculated using the following recursive equations: µn+1,i = (σ−2 n,iµn,i + σ−2Yn,i)/(σ−2 n,i + σ−2) if In = i, µn,i, if In ̸= i, and σ2 n+1,i = 1/(σ−2 n,i + σ−2) if In = i, σ2 n,i, if In ̸= i. . We denote the posterior distribution over the vector of arm means by Πn = N(µn,1, σ2 n,1) ⊗N(µn,2, σ2 n,2) ⊗· · · ⊗N(µn,k, σ2 n,k) and let θ = (θ1, . . . , θk). For example, with this notation Eθ∼Πn "X i∈A θi # = X i∈A µn,i. The posterior probability assigned to the event that arm i is optimal is αn,i ≜Pθ∼Πn θi > max j̸=i θj . (1) To avoid confusion, we always use θ = (θ1, . . . , θk) to denote a random vector of arm means drawn from the algorithm’s posterior Πn, and µ = (µ1, . . . , µk) to denote the vector of true arm means. Two notions of asymptotic optimality. Our first notion of optimality relates to the rate of posterior convergence. As the number of observations grows, one hopes that the posterior distribution definitively identifies the true best arm, in the sense that the posterior probability 1 −αn,1 assigned by the event that a different arm is optimal tends to zero. By sampling the arms intelligently, we hope this probability can be driven to zero as rapidly as possible. Following Russo [19], we aim to maximize the exponent governing the rate of decay, lim inf n→∞ −1 n log (1 −αn,1) , among all sampling rules. The second setting we consider is often called the “fixed confidence” setting. Here, the agent is allowed at any point to stop gathering samples and return an estimate of the identity of the optimal. In addition to a sampling rule, we require a stopping rule that selects a time τ at which to stop, and 3 a decision rule that returns an estimate ˆIτ of the optimal arm based on the first τ observations. We consider minimizing the average number of observations E[τδ] required by an algorithm (that consists of a sampling rule, a stopping rule and a decision rule) guaranteeing a vanishing probability δ of incorrect identification, i.e., P(ˆIτδ ̸= 1) ≤δ. Following Garivier and Kaufmann [8], the number of samples required scales with log(1/δ), and so we aim to minimize lim sup δ→0 E[τδ] log(1/δ) among all algorithms with probability of error no more than δ. In this setting, we study the performance of sampling rules when combined with the stopping rule studied by Chernoff [4] and Garivier and Kaufmann [8]. 3 Sampling Rules In this section, we first introduce the expected improvement algorithm, and point out its weakness. Then a simple variant of the expected improvement algorithm is proposed. Both algorithms make calculations using function f(x) = xΦ(x) + φ(x) where Φ(·) and φ(·) are the CDF and PDF of the standard normal distribution. One can show that as x →∞, log f(−x) ∼−x2/2, and so f(−x) ≈e−x2/2 for very large x. One can also show that f is an increasing function. Expected Improvement. Expected improvement [13] is a simple improvement-based sampling rule. The EI algorithm favors the arm that offers the largest amount of improvement upon a target. The EI algorithm measures the arm In = arg maxi∈A vn,i where vn,i is the EI value of arm i at time n. Let I∗ n = arg maxi∈A µn,i denote the arm with largest posterior mean at time n. The EI value of arm i at time n is defined as vn,i ≜Eθ∼Πn h θi −µn,I∗ n +i . where x+ = max{x, 0}. The above expectation can be computed analytically as follows, vn,i = µn,i −µn,I∗ n Φ µn,i −µn,I∗ n σn,i + σn,iφ µn,i −µn,I∗ n σn,i = σn,if µn,i −µn,I∗ n σn,i . The EI value vn,i measures the potential of arm i to improve upon the largest posterior mean µn,I∗ n at time n. Because f is an increasing function, vn,i is increasing in both the posterior mean µn,i and posterior standard deviation σn,i. Top-Two Expected Improvement. The EI algorithm can have very poor performance for selecting the best arm. Once the posterior indicates a particular arm is the best with reasonably high probability, EI allocates nearly all future samples to this arm at the expense of measuring other arms. Recently Ryzhov [20] showed that EI only allocates O(log n) samples to suboptimal arms asymptotically. This is a severe shortcoming, as it means n must be extremely large before the algorithm has enough samples from suboptimal arms to reach a confident conclusion. To improve the EI algorithm, we build on the top-two sampling idea in Russo [19]. The idea is to identify in each period the two “most promising” arms based on current observations, and randomize to choose which to sample. A tuning parameter β ∈(0, 1) controls the probability assigned to the “top” arm. A naive top-two variant of EI would identify the two arms with largest EI value, and flip a β–weighted coin to decide which to measure. However, one can prove that this algorithm is not optimal for any choice of β. Instead, what we call the top-two expected improvement algorithm uses a novel modified EI criterion which more carefully accounts for the decision-maker’s uncertainty when deciding which arm to sample. For i, j ∈A, define vn,i,j ≜Eθ∼Πn [(θi −θj)+]. This measures the expected magnitude of improvement arm i offers over arm j, but unlike the typical EI criterion, this expectation integrates over the uncertain quality of both arms. This measure can be computed analytically as vn,i,j = q σ2 n,i + σ2 n,jf µn,i −µn,j q σ2 n,i + σ2 n,j . 4 TTEI depends on a tuning parameter β > 0, set to 1/2 by default. With probability β, TTEI measures the arm I(1) n by optimizing the EI criterion, and otherwise it measures an alternative I(2) n that offers the largest expected improvement on the arm I(1) n . Formally, TTEI measures the arm In = ( I(1) n = arg maxi∈A vn,i, with probability β, I(2) n = arg maxi∈A vn,i,I(1) n , with probability 1 −β. Note that vn,i,i = 0, which implies I(2) n ̸= I(1) n . We notice that TTEI with β = 1 is the standard EI algorithm. Comparing to the EI algorithm, TTEI with β ∈(0, 1) allocates much more measurement effort to suboptimal arms. We will see that TTEI allocates β proportion of samples to the best arm asymptotically, and it uses the remaining 1 −β fraction of samples for gathering evidence against each suboptimal arm. 4 Convergence to Asymptotically Optimal Proportions For all i ∈A and n ∈N, we define Tn,i ≜Pn−1 ℓ=0 1{Iℓ= i} to be the number of samples of arm i before time n. We will show that under TTEI with parameter β, limn→∞Tn,1/n = β. That is, the algorithm asymptotically allocates β proportion of the samples to true best arm. Dropping for the moment questions regarding the impact of this tuning parameter, let us consider the optimal asymptotic proportion of effort to allocate to each of the k −1 remaining arms. It is known that the optimal proportions are given by the unique vector (wβ 2 , · · · , wβ k) satisfying Pk i=2 wβ i = 1 −β and (µ1 −µ2)2 1/β + 1/wβ 2 = . . . = (µ1 −µk)2 1/β + 1/wβ k . (2) We set wβ 1 = β, so wβ = wβ 1 , . . . , wβ k encodes the sampling proportions of each arm. To understand the source of equation (2), imagine that over the first n periods each arm i is sampled exactly wβ i n times, and let ˆµn,i ∼N µi, σ2 wβ i n denote the empirical mean of arm i. Then ˆµn,1 −ˆµn,i ∼N µ1 −µi, ˜σ2 i where ˜σ2 i = σ2 n 1 β + 1 wβ i ! . The probability ˆµn,1 −ˆµn,i ≤0–leading to an incorrect estimate of which arm has highest mean–is Φ ((µi −µ1)/˜σi) where Φ is the CDF of the standard normal distribution. Equation (2) is equivalent to requiring (µ1 −µi)/˜σi is equal for all arms i, so the probability of falsely declaring µi ≥µ1 is equal for all i ̸= 1. In a sense, these sampling frequencies equalize the evidence against each suboptimal arm. These proportions appeared first in the machine learning literature in [19, 8], but appeared much earlier in the statistics literature in [12], and separately in the simulation optimization literature in [9]. As we will see in the next section, convergence to this allocation is a necessary condition for both notions of optimality considered in this paper. Our main theoretical contribution is the following theorem, which establishes that under TTEI sampling proportions converge to the proportions wβ derived above. Therefore, while the sampling proportion of the optimal arm is controlled by the tuning parameter β, the remaining 1 −β fraction of measurement is optimally distributed among the remaining k −1 arms. Such a result was established for other top-two sampling algorithms in [19]. The second notion of optimality requires not just convergence to wβ with probability 1, but also a sense in which the expected time until convergence is finite. The following theorem presents such a stronger result for TTEI. To make this precise, we introduce a time after which for each arm, the empirical proportion allocated to it is accurate. Specifically, given β ∈(0, 1) and ϵ > 0, we define M ϵ β ≜inf N ∈N : max i∈A |Tn,i/n −wβ i | ≤ϵ ∀n ≥N . (3) It is clear that P(M ϵ β < ∞) = 1 for all ϵ > 0 if and only if Tn,i/n →wβ i with probability 1 for each arm i ∈A. To establish optimality in the “fixed confidence setting”, we need to prove in addition that E[M ϵ β] < ∞for all ϵ > 0, which requires substantial new technical innovations. 5 Theorem 1. Under TTEI with parameter β ∈(0, 1), E[M ϵ β] < ∞for any ϵ > 0. This result implies that under TTEI, P(M ϵ β < ∞) = 1 for all ϵ > 0, or equivalently lim n→∞ Tn,i n = wβ i ∀i ∈A. 4.1 Problem Complexity Measure Given β ∈(0, 1), define the problem complexity measure Γ∗ β ≜ (µ1 −µ2)2 2σ2 1/β + 1/wβ 2 = . . . = (µ1 −µk)2 2σ2 1/β + 1/wβ k , which is a function of the true arm means and variances. This will be the exponent governing the rate of posterior convergence, and also characterizing the average number of samples in the fixed confidence stetting. The optimal exponent comes from maximizing over β. Let us define Γ∗= maxβ∈(0,1) Γ∗ β and β∗= arg maxβ∈(0,1) Γ∗ β and set w∗= wβ∗= β∗, wβ∗ 2 , . . . , wβ∗ k . Russo [19] has proved that for β ∈(0, 1), Γ∗ β ≥Γ∗/ max n β∗ β , 1−β∗ 1−β o , and therefore Γ∗ 1/2 ≥Γ∗/2. This demonstrates a surprising degree of robustness to β. In particular, Γβ is close to Γ∗if β is adjusted to be close to β∗, and the choice of β = 1/2 always yields a 2-approximation to Γ∗. 5 Implied Optimality Results This section establishes formal optimality guarantees for TTEI. Both results, in fact, hold for any algorithm satisfying the conclusions of Theorem 1, and are therefore of broader interest. 5.1 Optimal Rate of Posterior Convergence We first provide upper and lower bounds on the exponent governing the rate of posterior convergence. The same result has been has been proved in Russo [19] for bounded correlated priors. We use different proof techniques to prove the following result for uncorrelated Gaussian priors. This theorem shows that no algorithm can attain a rate of posterior convergence faster than e−Γ∗n and that this is attained by any algorithm that, like TTEI with optimal tuning parameter β∗, has asymptotic sampling ratios (w∗ 1, . . . , w∗ k). The second part implies TTEI with parameter β attains convergence rate e−nΓ∗ β and that it is optimal among sampling rules that allocation β–fraction of samples to the optimal arm. Recall that, without loss of generality, we have assumed arm 1 is the arm with true highest mean µ1 = maxi∈A µi. We will study the posterior mass 1 −αn,1 assigned to the event that some other has the highest mean. Theorem 2 (Posterior Convergence - Sufficient Condition for Optimality). The following properties hold with probability 1: 1. Under any sampling rule that satisfies Tn,i/n →w∗ i for each i ∈A, lim n→∞−1 n log (1 −αn,1) = Γ∗. Under any sampling rule, lim sup n→∞ −1 n log(1 −αn,1) ≤Γ∗. 2. Let β ∈(0, 1). Under any sampling rule that satisfies Tn,i/n →wβ i for each i ∈A, lim n→∞−1 n log(1 −αn,1) = Γ∗ β. 6 Under any sampling rule that satisfies Tn,1/n →β, lim sup n→∞ −1 n log(1 −αn,1) ≤Γ∗ β. This result reveals that when the tuning parameter β is set optimally to β∗, TTEI attains the optimal rate of posterior convergence. Since Γ∗ 1/2 ≥Γ∗/2, when β is set to the default value 1/2, the exponent governing the convergence rate of TTEI is at least half of the optimal one. 5.2 Optimal Average Sample Size Chernoff’s Stopping Rule. In the fixed confidence setting, besides an efficient sampling rule, a player also needs to design an intelligent stopping rule. This section introduces a stopping rule proposed by Chernoff [4] and studied recently by Garivier and Kaufmann [8]. This stopping rule makes use of the Generalized Likelihood Ratio statistic, which depends on the current maximum likelihood estimates of all unknown means. For each arm i ∈A, the maximum likelihood estimate of its unknown mean µi at time n is its empirical mean ˆµn,i = T −1 n,i Pn−1 ℓ=0 1{Iℓ= i}Yℓ,Iℓwhere Tn,i = Pn−1 ℓ=0 1{Iℓ= i}. Next we define a weighted average of empirical means of arms i, j ∈A: ˆµn,i,j ≜ Tn,i Tn,i + Tn,j ˆµn,i + Tn,j Tn,i + Tn,j ˆµn,j. Then if ˆµn,i ≥ˆµn,j, the Generalized Likelihood Ratio statistic Zn,i,j has the following explicit expression: Zn,i,j ≜Tn,id(ˆµn,i, ˆµn,i,j) + Tn,jd(ˆµn,j, ˆµn,i,j) where d(x, y) = (x −y)2/(2σ2) is the Kullback-Leibler (KL) divergence between Gaussian distributions N(x, σ2) and N(y, σ2). Similarly, if ˆµn,i < ˆµn,j, Zn,i,j = −Zn,j,i ≤0 where Zn,j,i is well defined as above. If either arm has never been sampled before, these quantities are not well defined and we take the convention that Zn,i,j = Zn,j,i = 0. Given a target confidence δ ∈(0, 1), to ensure that one arm is better than the others with probability at least 1 −δ, we use the stopping time τδ ≜inf n ∈N : Zn ≜max i∈A min j∈A\{i} Zn,i,j > γn,δ where γn,δ > 0 is an appropriate threshold. By definition, minj∈A\{i} Zn,i,j is nonnegative if and only if ˆµn,i ≥ˆµn,j for all j ∈A \ {i}. Hence, whenever ˆI∗ n ≜arg maxi∈A ˆµn,i is unique, Zn = minj∈A\{ˆI∗ n} Zn,ˆI∗ n,j. Next we introduce the exploration rate for normal bandit models that can ensure to identify the best arm with probability at least 1 −δ. We use the following result given in Garivier and Kaufmann [8]. Proposition 1 (Garivier and Kaufmann [8] Proposition 12). Let δ ∈(0, 1) and α > 1. There exists a constant C = C(α, k) such that under any sampling rule, using the Chernoff’s stopping rule with the threshold γα n,δ = log(Cnα/δ) guarantees P τδ < ∞, arg max i∈A ˆµτδ,i ̸= 1 ≤δ. Sample Complexity. Garivier and Kaufmann [8] recently provided a general lower bound on the number of samples required in the fixed confidence setting. In particular, they show that for any normal bandit model, under any sampling rule and stopping time τδ that guarantees a probability of error no more than δ, lim inf δ→0 E[τδ] log(1/δ) ≥1 Γ∗. Recall that M ϵ β, defined in (3), is the first time after which the empirical proportions are within ϵ of their asymptotic limits. The next result provides a condition in terms of M ϵ β that is sufficient to guarantee optimality in the fixed confidence setting. 7 Theorem 3 (Fixed Confidence - Sufficient Condition for Optimality). Let δ, β ∈(0, 1) and α > 1. Under any sampling rule which, if applied with no stopping rule, satisfies E[M ϵ β] < ∞for all ϵ > 0, using the Chernoff’s stopping rule with the threshold γα n,δ = log(Cnα/δ) (where C = C(α, k)) guarantees lim sup δ→0 E[τδ] log(1/δ) ≤1 Γ∗ β . When β = β∗the general lower bound on sample complexity of 1/Γ∗is essentially matched. In addition, when β is set to the default value 1/2, the sample complexity of TTEI combined with the Chernoff’s stopping rule is at most twice the optimal sample complexity since 1/Γ∗ 1/2 ≤2/Γ∗. 6 Numerical Experiments To test the empirical performance of TTEI, we conduct several numerical experiments. The first experiment compares the performance of TTEI with β = 1/2 and EI. The second experiment compares the performance of different versions of TTEI, top-two Thompson sampling (TTTS) [19], knowledge gradient (KG) [6] and oracle algorithms that know the optimal proportions a priori. Each algorithm plays arm i = 1, . . . , k exactly once at the beginning, and then prescribe a prior N(Yi,i, σ2) for unknown arm-mean µi where Yi,i is the observation from N(µi, σ2). In both experiments, we fix the common known variance σ2 = 1 and the number of arms k = 5. We consider three instances [µ1, . . . , µ5] = [5, 4, 1, 1, 1], [5, 4, 3, 2, 1] and [2, 0.8, 0.6, 0.4, 0.2]. The optimal parameter β∗equals 0.48, 0.45 and 0.35, respectively. Recall that αn,i, defined in (1), denotes the posterior probability that arm i is optimal. Tables 1 and 2 show the average number of measurements required for the largest posterior probability assigned to some arm being the best to reach a given confidence level c, i.e., maxi αn,i ≥c. In a Bayesian setting, the probability of correct selection under this rule is exactly c. The results in Table 1 are averaged over 100 trials. We see that TTEI with β = 1/2 outperforms standard EI by an order of magnitude. Table 1: Average number of measurements required to reach the confidence level c = 0.95 TTEI-1/2 EI [5, 4, 1, 1, 1] 14.60 238.50 [5, 4, 3, 2, 1] 16.72 384.73 [2, .8, .6, .4, .2] 24.39 1525.42 The second experiment compares the performance of different versions of TTEI, TTTS, KG, a random sampling oracle (RSO) and a tracking oracle (TO). The random sampling oracle draws a random arm in each round from the distribution w∗encoding the asymptotically optimal proportions. The tracking oracle tracks the optimal proportions at each round. Specifically, the tracking oracle samples the arm with the largest ratio its optimal and empirical proportions. Two tracking algorithms proposed by Garivier and Kaufmann [8] are similar to this tracking oracle. TTEI with adaptive β (aTTEI) works as follows: it starts with β = 1/2 and updates β = ˆβ∗every 10 rounds where ˆβ∗is the maximizer of equation (2) based on plug-in estimators for the unknown arm-means. Table 2 shows the average number of measurements required for the largest posterior probability being the best to reach the confidence level c = 0.9999. The results in Table 2 are averaged over 200 trials. We see that the performances of TTEI with adaptive β and TTEI with β∗are better than the performances of all other algorithms. We note that TTEI with adaptive β substantially outperforms the tracking oracle. Table 2: Average number of measurements required to reach the confidence level c = 0.9999 TTEI-1/2 aTTEI TTEI-β∗ TTTS-β∗ RSO TO KG [5, 4, 1, 1, 1] 61.97 61.98 61.59 62.86 97.04 77.76 75.55 [5, 4, 3, 2, 1] 66.56 65.54 65.55 66.53 103.43 88.02 81.49 [2, .8, .6, .4, .2] 76.21 72.94 71.62 73.02 101.97 96.90 86.98 In addition to the Bayesian stopping rule tested above, we have run some experiments with the Chernoff stopping rule discussed in Section 5.2. Asymptotic analysis shows these two rules are 8 similar when the confidence level c is very high. However, the Chernoff stopping rule appears to be too conservative in practice; it typically yields a probability of correct selection much larger than the specified confidence level c at the expense of using more samples. Since our current focus is on allocation rules, we focus on this Bayesian stopping rule, which appears to offer a more fundamental comparison than one based on ad hoc choice of tuning parameters. Developing improved stopping rules is an important area for future research. 7 Conclusion and Extensions to Correlated Arms We conclude by noting that while this paper thoroughly studies TTEI in the case of uncorrelated priors, we believe the algorithm is also ideally suited to problems with complex correlated priors and large sets of arms. In fact, the modified information measure vn,i,j was designed with an eye toward dealing with correlation in a sophisticated way. In the case of a correlated normal distribution N(µ, Σ), one has vn,i,j = Eθ∼N(µ,Σ)[(θi −θj)+] = p Σii + Σjj −2Σijf µn,i −µn,j p Σii + Σjj −2Σij ! . This closed form accommodates efficient computation. Here the term Σi,j accounts for the correlation or similarity between arms i and j. Therefore vn,i,I(1) n is large for arms i that offer large potential improvement over I(1) n , i.e. those that (1) have large posterior mean, (2) have large posterior variance, and (3) are not highly correlated with arm I(1) n . As I(1) n concentrates near the estimated optimum, we expect the third factor will force the algorithm to experiment in promising regions of the domain that are “far” away from the current-estimated optimum, and are under-explored under standard EI. 9 References [1] Jean-Yves Audibert, Sébastien Bubeck, and Rémi Munos. Best arm identification in multiarmed bandits. In COLT 2010 - The 23rd Conference on Learning Theory, Haifa, Israel, June 27-29, 2010, pages 41–53, 2010. [2] Adam D. Bull. Convergence rates of efficient global optimization algorithms. Journal of Machine Learning Research, 12:2879–2904, 2011. URL http://dblp.uni-trier.de/db/ journals/jmlr/jmlr12.html#Bull11. [3] Chun-Hung Chen, Jianwu Lin, Enver Yücesan, and Stephen E Chick. Simulation budget allocation for further enhancing the efficiency of ordinal optimization. Discrete Event Dynamic Systems, 10(3):251–270, 2000. [4] Herman Chernoff. Sequential design of experiments. Ann. Math. Statist., 30(3):755–770, 09 1959. doi: 10.1214/aoms/1177706205. URL http://dx.doi.org/10.1214/aoms/ 1177706205. [5] Eyal Even-dar, Shie Mannor, and Yishay Mansour. Pac bounds for multi-armed bandit and markov decision processes. In In Fifteenth Annual Conference on Computational Learning Theory (COLT), pages 255–270, 2002. [6] Peter I Frazier, Warren B Powell, and Savas Dayanik. A knowledge-gradient policy for sequential information collection. SIAM Journal on Control and Optimization, 47(5):2410– 2439, 2008. [7] Victor Gabillon, Mohammad Ghavamzadeh, and Alessandro Lazaric. Best arm identification: A unified approach to fixed budget and fixed confidence. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 3212–3220. Curran Associates, Inc., 2012. [8] Aurélien Garivier and Emilie Kaufmann. Optimal best arm identification with fixed confidence. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 998–1027, 2016. [9] P. Glynn and S. Juneja. A large deviations perspective on ordinal optimization. In Simulation Conference, 2004. Proceedings of the 2004 Winter, volume 1. IEEE, 2004. [10] Kevin Jamieson, Matthew Malloy, Robert Nowak, and Sébastien Bubeck. lil’ ucb : An optimal exploration algorithm for multi-armed bandits. In Maria Florina Balcan, Vitaly Feldman, and Csaba Szepesvári, editors, Proceedings of The 27th Conference on Learning Theory, volume 35 of Proceedings of Machine Learning Research, pages 423–439, Barcelona, Spain, 13–15 Jun 2014. PMLR. URL http://proceedings.mlr.press/v35/jamieson14.html. [11] Kevin G. Jamieson and Robert D. Nowak. Best-arm identification algorithms for multi-armed bandits in the fixed confidence setting. In 48th Annual Conference on Information Sciences and Systems, CISS 2014, Princeton, NJ, USA, March 19-21, 2014, pages 1–6, 2014. [12] C. Jennison, I. M. Johnstone, and B. W. Turnbull. Asymptotically optimal procedures for sequential adaptive selection of the best of several normal means. Statistical decision theory and related topics III, 2:55–86, 1982. [13] Donald R. Jones, Matthias Schonlau, and William J. Welch. Efficient global optimization of expensive black-box functions. Journal of Global Optimization, 13(4):455–492, 1998. ISSN 1573-2916. doi: 10.1023/A:1008306431147. URL http://dx.doi.org/10.1023/A: 1008306431147. [14] Zohar Karnin, Tomer Koren, and Oren Somekh. Almost optimal exploration in multi-armed bandits. In Sanjoy Dasgupta and David McAllester, editors, Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research, pages 1238–1246, Atlanta, Georgia, USA, 17–19 Jun 2013. PMLR. URL http://proceedings.mlr.press/v28/karnin13.html. 10 [15] Emilie Kaufmann and Shivaram Kalyanakrishnan. Information complexity in bandit subset selection. In Shai Shalev-Shwartz and Ingo Steinwart, editors, Proceedings of the 26th Annual Conference on Learning Theory, volume 30 of Proceedings of Machine Learning Research, pages 228–251, Princeton, NJ, USA, 12–14 Jun 2013. PMLR. URL http://proceedings. mlr.press/v30/Kaufmann13.html. [16] Emilie Kaufmann, Olivier Cappé, and Aurélien Garivier. On the complexity of a/b testing. In Maria Florina Balcan, Vitaly Feldman, and Csaba Szepesvári, editors, Proceedings of The 27th Conference on Learning Theory, volume 35 of Proceedings of Machine Learning Research, pages 461–481, Barcelona, Spain, 13–15 Jun 2014. PMLR. URL http://proceedings.mlr. press/v35/kaufmann14.html. [17] Emilie Kaufmann, Olivier Cappé, and Aurélien Garivier. On the complexity of best-arm identification in multi-armed bandit models. Journal of Machine Learning Research, 17(1): 1–42, 2016. URL http://jmlr.org/papers/v17/kaufman16a.html. [18] Shie Mannor, John N. Tsitsiklis, Kristin Bennett, and Nicolò Cesa-bianchi. The sample complexity of exploration in the multi-armed bandit problem. Journal of Machine Learning Research, 5:2004, 2004. [19] Daniel Russo. Simple bayesian algorithms for best arm identification. In 29th Annual Conference on Learning Theory, pages 1417–1418, 2016. [20] Ilya O. Ryzhov. On the convergence rates of expected improvement methods. Operations Research, 64(6):1515–1528, 2016. doi: 10.1287/opre.2016.1494. URL http://dx.doi.org/ 10.1287/opre.2016.1494. [21] Bobak Shahriari, Kevin Swersky, Ziyu Wang, Ryan P. Adams, and Nando de Freitas. Taking the human out of the loop: A review of Bayesian optimization. Proceedings of the IEEE, 104(1): 148–175, 2016. doi: 10.1109/JPROC.2015.2494218. URL http://dx.doi.org/10.1109/ JPROC.2015.2494218. [22] Marta Soare, Alessandro Lazaric, and Rémi Munos. Best-arm identification in linear bandits. In Advances in Neural Information Processing Systems, pages 828–836, 2014. 11 | 2017 | 465 |
6,969 | Towards Accurate Binary Convolutional Neural Network Xiaofan Lin Cong Zhao Wei Pan* DJI Innovations Inc, Shenzhen, China {xiaofan.lin, cong.zhao, wei.pan}@dji.com Abstract We introduce a novel scheme to train binary convolutional neural networks (CNNs) – CNNs with weights and activations constrained to {-1,+1} at run-time. It has been known that using binary weights and activations drastically reduce memory size and accesses, and can replace arithmetic operations with more efficient bitwise operations, leading to much faster test-time inference and lower power consumption. However, previous works on binarizing CNNs usually result in severe prediction accuracy degradation. In this paper, we address this issue with two major innovations: (1) approximating full-precision weights with the linear combination of multiple binary weight bases; (2) employing multiple binary activations to alleviate information loss. The implementation of the resulting binary CNN, denoted as ABC-Net, is shown to achieve much closer performance to its full-precision counterpart, and even reach the comparable prediction accuracy on ImageNet and forest trail datasets, given adequate binary weight bases and activations. 1 Introduction Convolutional neural networks (CNNs) have achieved state-of-the-art results on real-world applications such as image classification [He et al., 2016] and object detection [Ren et al., 2015], with the best results obtained with large models and sufficient computation resources. Concurrent to these progresses, the deployment of CNNs on mobile devices for consumer applications is gaining more and more attention, due to the widespread commercial value and the exciting prospect. On mobile applications, it is typically assumed that training is performed on the server and test or inference is executed on the mobile devices [Courbariaux et al., 2016, Esser et al., 2016]. In the training phase, GPUs enabled substantial breakthroughs because of their greater computational speed. In the test phase, however, GPUs are usually too expensive to deploy. Thus improving the test-time performance and reducing hardware costs are likely to be crucial for further progress, as mobile applications usually require real-time, low power consumption and fully embeddable. As a result, there is much interest in research and development of dedicated hardware for deep neural networks (DNNs). Binary neural networks (BNNs) [Courbariaux et al., 2016, Rastegari et al., 2016], i.e., neural networks with weights and perhaps activations constrained to only two possible values (e.g., -1 or +1), would bring great benefits to specialized DNN hardware for three major reasons: (1) the binary weights/activations reduce memory usage and model size 32 times compared to single-precision version; (2) if weights are binary, then most multiply-accumulate operations can be replaced by simple accumulations, which is beneficial because multipliers are the most space and power-hungry components of the digital implementation of neural networks; (3) furthermore, if both activations and weights are binary, the multiply-accumulations can be replaced by the bitwise operations: xnor and bitcount Courbariaux et al. [2016]. This could have a big impact on dedicated deep learning hardware. For instance, a 32-bit floating point multiplier costs about 200 Xilinx FPGA slices [Govindu et al., 2004], whereas a 1-bit xnor gate only costs a single slice. Semiconductor ⇤indicates corresponding author. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. manufacturers like IBM [Esser et al., 2016] and Intel [Venkatesh et al., 2016] have been involved in the research and development of related chips. However, binarization usually cause severe prediction accuracy degradation, especially on complex tasks such as classification on ImageNet dataset. To take a closer look, Rastegari et al. [2016] shows that binarizing weights causes the accuracy of Resnet-18 drops from 69.3% to 60.8% on ImageNet dataset. If further binarize activations, the accuracy drops to 51.2%. Similar phenomenon can also be found in literatures such as [Hubara et al., 2016]. Clearly there is a considerable gap between the accuracy of a full-precision model and a binary model. This paper proposes a novel scheme for binarizing CNNs, which aims to alleviate, or even eliminate the accuracy degradation, while still significantly reducing inference time, resource requirement and power consumption. The paper makes the following major contributions. • We approximate full-precision weights with the linear combination of multiple binary weight bases. The weights values of CNNs are constrained to {−1, +1}, which means convolutions can be implemented by only addition and subtraction (without multiplication), or bitwise operation when activations are binary as well. We demonstrate that 3⇠5 binary weight bases are adequate to well approximate the full-precision weights. • We introduce multiple binary activations. Previous works have shown that the quantization of activations, especially binarization, is more difficult than that of weights [Cai et al., 2017, Courbariaux et al., 2016]. By employing five binary activations, we have been able to reduce the Top-1 and Top-5 accuracy degradation caused by binarization to around 5% on ImageNet compared to the full precision counterpart. It is worth noting that the multiple binary weight bases/activations scheme is preferable to the fixedpoint quantization in previous works. In those fixed-point quantized networks one still needs to employ arithmetic operations, such as multiplication and addition, on fixed-point values. Even though faster than floating point, they still require relatively complex logic and can consume a lot of power. Detailed discussions can be found in Section 5.2. Ideally, combining more binary weight bases and activations always leads to better accuracy and will eventually get very close to that of full-precision networks. We verify this on ImageNet using Resnet network topology. This is the first time a binary neural network achieves prediction accuracy comparable to its full-precision counterpart on ImageNet. 2 Related work Quantized Neural Networks: High precision parameters are not very necessary to reach high performance in deep neural networks. Recent research efforts (e.g., [Hubara et al., 2016]) have considerably reduced a large amounts of memory requirement and computation complexity by using low bitwidth weights and activations. Zhou et al. [2016] further generalized these schemes and proposed to train CNNs with low bitwidth gradients. By performing the quantization after network training or using the “straight-through estimator (STE)" [Bengio et al., 2013], these works avoided the issues of non-differentiable optimization. While some of these methods have produced good results on datasets such as CIFAR-10 and SVHN, none has produced low precision networks competitive with full-precision models on large-scale classification tasks, such as ImageNet. In fact, [Zhou et al., 2016] and [Hubara et al., 2016] experiment with different combinations of bitwidth for weights and activations, and show that the performance of their highly quantized networks deteriorates rapidly when the weights and activations are quantized to less than 4-bit numbers. Cai et al. [2017] enhance the performance of a low bitwidth model by addressing the gradient mismatch problem, nevertheless there is still much room for improvement. Binarized Neural Networks: The binary representation for deep models is not a new topic. At the emergence of artificial neural networks, inspired biologically, the unit step function has been used as the activation function [Toms, 1990]. It is known that binary activation can use spiking response for event-based computation and communication (consuming energy only when necessary) and therefore is energy-efficient [Esser et al., 2016]. Recently, Courbariaux et al. [2016] introduce BinarizedNeural-Networks (BNNs), neural networks with binary weights and activations at run-time. Different from their work, Rastegari et al. [2016] introduce simple, efficient, and accurate approximations to CNNs by binarizing the weights and even the intermediate representations in CNNs. All these works drastically reduce memory consumption, and replace most arithmetic operations with bitwise operations, which potentially lead to a substantial increase in power efficiency. 2 In all above mentioned works, binarization significantly reduces accuracy. Our experimental results on ImageNet show that we are close to filling the gap between the accuracy of a binary model and its full-precision counterpart. We relied on the idea of finding the best approximation of full-precision convolution using multiple binary operations, and employing multiple binary activations to allow more information passing through. 3 Binarization methods In this section, we detail our binarization method, which is termed ABC-Net (Accurate-BinaryConvolutional) for convenience. Bear in mind that during training, the real-valued weights are reserved and updated at every epoch, while in test-time only binary weights are used in convolution. 3.1 Weight approximation Consider a L-layer CNN architecture. Without loss of generality, we assume the weights of each convolutional layer are tensors of dimension (w, h, cin, cout), which represents filter width, filter height, input-channel and output-channel respectively. We propose two variations of binarization method for weights at each layer: 1) approximate weights as a whole and 2) approximate weights channel-wise. 3.1.1 Approximate weights as a whole At each layer, in order to constrain a CNN to have binary weights, we estimate the real-value weight filter W 2 Rw⇥h⇥cin⇥cout using the linear combination of M binary filters B1, B2, · · · , BM 2 {−1, +1}w⇥h⇥cin⇥cout such that W ⇡↵1B1+↵2B2+· · ·+↵MBM. To find an optimal estimation, a straightforward way is to solve the following optimization problem: min ↵,BJ(↵, B) = ||w −B↵||2, s.t. Bij 2 {−1, +1}, (1) where B = [vec(B1), vec(B2), · · · , vec(BM)], w = vec(W ) and ↵= [↵1, ↵2, · · · , ↵M]T. Here the notation vec(·) refers to vectorization. Although a local minimum solution to (1) can be obtained by numerical methods, one could not backpropagate through it to update the real-value weight filter W . To address this issue, assuming the mean and standard deviation of W are mean(W ) and std(W ) respectively, we fix Bi’s as follows: Bi = Fui(W ) := sign( ¯ W + uistd(W )), i = 1, 2, · · · , M, (2) where ¯ W = W −mean(W ), and ui is a shift parameter. For example, one can choose ui’s to be ui = −1 + (i −1) 2 M−1, i = 1, 2, · · · , M, to shift evenly over the range [−std(W ), std(W )], or leave it to be trained by the network. This is based on the observation that the full-precision weights tend to have a symmetric, non-sparse distribution, which is close to Gaussian. To gain more intuition and illustrate the approximation effectiveness, an example is visualized in Section S2 of the supplementary material. With Bi’s chosen, (1) becomes a linear regression problem min ↵J(↵) = ||w −B↵||2, (3) in which Bi’s serve as the bases in the design/dictionary matrix. We can then back-propagate through Bi’s using the “straight-through estimator” (STE) [Bengio et al., 2013]. Assume c as the cost function, A and O as the input and output tensor of a convolution respectively, the forward and backward approach of an approximated convolution during training can be computed as follows: Forward: B1, B2, · · · , BM = Fu1(W ), Fu2(W ), · · · , FuM (W ), (4) Solve (3) for ↵, (5) O = M X m=1 ↵mConv(Bm, A). (6) Backward: @c @W = @c @O M X m=1 ↵m @O @Bm @Bm @W ! STE = @c @O M X m=1 ↵m @O @Bm ! = M X m=1 ↵m @c @Bm . (7) 3 In test-time, only (6) is required. The block structure of this approximated convolution layer is shown on the left side in Figure 1. With suitable hardwares and appropriate implementations, the convolution can be efficiently computed. For example, since the weight values are binary, we can implement the convolution with additions and subtractions (thus without multiplications). Furthermore, if the input A is binary as well, we can implement the convolution with bitwise operations: xnor and bitcount [Rastegari et al., 2016]. Note that the convolution with each binary filter can be computed in parallel. Figure 1: An example of the block structure of the convolution in ABC-Net. M = N = 3. On the left is the structure of the approximated convolution (ApproxConv). ApproxConv is expected to approximate the conventional full-precision convolution with linear combination of binary convolutions (BinConv), i.e., convolution with binary and weights. On the right is the overall block structure of the convolution in ABC-Net. The input is binarized using different functions Hv1, Hv2, Hv3, passed into the corresponding ApproxConv’s and then summed up after multiplying their corresponding βn’s. With the input binarized, the BinConv’s can be implemented with highly efficient bitwise operations. There are 9 BinConv’s in this example and they can work in parallel. 3.1.2 Approximate weights channel-wise Alternatively, we can estimate the real-value weight filter Wi 2 Rw⇥h⇥cin of each output channel i 2 {1, 2, · · · , cout} using the linear combination of M binary filters Bi1, Bi2, · · · , BiM 2 {−1, +1}w⇥h⇥cin such that Wi ⇡↵i1Bi1 + ↵i2Bi2 + · · · + ↵iMBiM. Again, to find an optimal estimation, we solve a linear regression problem analogy to (3) for each output channel. After convolution, the results are concatenated together along the output-channel dimension. If M = 1, this approach reduces to the Binary-Weights-Networks (BWN) proposed in [Rastegari et al., 2016]. Compared to weights approximation as a whole, the channel-wise approach approximates weights more elaborately, however no extra cost is needed during inference. Since this approach requires more computational resources during training, we leave it as a future work and focus on the former approximation approach in this paper. 3.2 Multiple binary activations and bitwise convolution As mentioned above, a convolution can be implemented without multiplications when weights are binarized. However, to utilize the bitwise operation, the activations must be binarized as well, as they are the inputs of convolutions. Similar to the activation binarization procedure in [Zhou et al., 2016], we binarize activations after passing it through a bounded activation function h, which ensures h(x) 2 [0, 1]. We choose the bounded rectifier as h. Formally, it can be defined as: hv(x) = clip(x + v, 0, 1), (8) where v is a shift parameter. If v = 0, then hv is the clip activation function in [Zhou et al., 2016]. We constrain the binary activations to either 1 or -1. In order to transform the real-valued activation R into binary activation, we use the following binarization function: Hv(R) := 2Ihv(R)≥0.5 −1, (9) 4 where I is the indicator function. The conventional forward and backward approach of the activation can be given as follows: Forward: A = Hv(R). Backward: @c @R = @c @A ◦I0R−v1. (using STE) (10) Here ◦denotes the Hadamard product. As can be expected, binaizing activations as above is kind of crude and leads to non-trivial losses in accuracy, as shown in Rastegari et al. [2016], Hubara et al. [2016]. While it is also possible to approximate activations with linear regression, as that of weights, another critical challenge arises – unlike weights, the activations always vary in test-time inference. Luckily, this difficulty can be avoided by exploiting the statistical structure of the activations of deep networks. Our scheme can be described as follows. First of all, to keep the distribution of activations relatively stable, we resort to batch normalization [Ioffe and Szegedy, 2015]. This is a widely used normalization technique, which forces the responses of each network layer to have zero mean and unit variance. We apply this normalization before activation. Secondly, we estimate the real-value activation R using the linear combination of N binary activations A1, A2, · · · , AN such that R ⇡β1A1 + β2A2 + · · · + βNAN, where A1, A2, · · · , AN = Hv1(R), Hv2(R), · · · , HvN (R). (11) Different from that of weights, the parameters βn’s and vn’s (n = 1, · · · , N) here are both trainable, just like the scale and shift parameters in batch normalization. Without the explicit linear regression approach, βn’s and vn’s are tuned by the network itself during training and fixed in test-time. They are expected to learn and utilize the statistical features of full-precision activations. The resulting network architecture outputs multiple binary activations A1, A2, · · · , AN and their corresponding coefficients β1, β2, · · · , βN, which allows more information passing through compared to the former one. Combining with the weight approximation, the whole convolution scheme is given by: Conv(W , R) ⇡Conv M X m=1 ↵mBm, N X n=1 βnAn ! = M X m=1 N X n=1 ↵mβnConv (Bm, An) , (12) which suggests that it can be implemented by computing M ⇥N bitwise convolutions in parallel. An example of the whole convolution scheme is shown in Figure 1. 3.3 Training algorithm A typical block in CNN contains several different layers, which are usually in the following order: (1) Convolution, (2) Batch Normalization, (3) Activation and (4) Pooling. The batch normalization layer [Ioffe and Szegedy, 2015] normalizes the input batch by its mean and variance. The activation is an element-wise non-linear function (e.g., Sigmoid, ReLU). The pooling layer applies any type of pooling (e.g., max,min or average) on the input batch. In our experiment, we observe that applying max-pooling on binary input returns a tensor that most of its elements are equal to +1, resulting in a noticeable drop in accuracy. Similar phenomenon has been reported in Rastegari et al. [2016] as well. Therefore, we put the max-pooling layer before the batch normalization and activation. Since our binarization scheme approximates full-precision weights, using the full-precision pre-train model serves as a perfect initialization. However, fine-tuning is always required for the weights to adapt to the new network structure. The training procedure, i.e., ABC-Net, is summarized in Section S1 of the supplementary material. It is worth noting that as M increases, the shift parameters get closer and the bases of the linear combination are more correlated, which sometimes lead to rank deficiency when solving (3). This can be tackled with the `2 regularization. 4 Experiment results In this section, the proposed ABC-Net was evaluated on the ILSVRC12 ImageNet classification dataset [Deng et al., 2009], and visual perception of forest trails datasets for mobile robots [Giusti et al., 2016] in Section S6 of supplementary material. 5 4.1 Experiment results on ImageNet dataset The ImageNet dataset contains about 1.2 million high-resolution natural images for training that spans 1000 categories of objects. The validation set contains 50k images. We use Resnet ([He et al., 2016]) as network topology. The images are resized to 224x224 before fed into the network. We report our classification performance using Top-1 and Top-5 accuracies. 4.1.1 Effect of weight approximation We first evaluate the weight approximation technique by examining the accuracy improvement for a binary model. To eliminate variables, we leave the activations being full-precision in this experiment. Table 1 shows the prediction accuracy of ABC-Net on ImageNet with different choices of M. For comparison, we add the results of Binary-Weights-Network (denoted ‘BWN’) reported in Rastegari et al. [2016] and the full-precision network (denoted ‘FP’). The BWN binarizes weights and leaves the activations being full-precision as we do. All results in this experiment use Resnet-18 as network topology. It can be observed that as M increases, the accuracy of ABC-Net converges to its fullprecision counterpart. The Top-1 gap between them reduces to only 0.9 percentage point when M = 5, which suggests that this approach nearly eliminates the accuracy degradation caused by binarizing weights. Table 1: Top-1 (left) and Top-5 (right) accuracy of ABC-Net on ImageNet, using full-precision activation and different choices of the number of binary weight bases M. BWN M = 1 M = 2 M = 3 M = 5 FP Top-1 60.8% 62.8% 63.7% 66.2% 68.3% 69.3% Top-5 83.0% 84.4% 85.2% 86.7% 87.9% 89.2% For interested readers, Figure S4 in section S5 of the supplementary material shows that the relationship between accuracy and M appears to be linear. Also, in Section S2 of the supplementary material, a visualization of the approximated weights is provided. 4.1.2 Configuration space exploration We explore the configuration space of combinations of number of weight bases and activations. Table 2 presents the results of ABC-Net with different configurations. The parameter settings for these experiments are provided in Section S4 of the supplementary material. Table 2: Prediction accuracy (Top-1/Top-5) for ImageNet with different choices of M and N in a ABC-Net (approximate weights as a whole). “res18”, “res34” and “res50” are short for Resnet-18, Resnet-34 and Resnet-50 network topology respectively. M and N refer to the number of weight bases and activations respectively. Network M-weight base N-activation base Top-1 Top-5 Top-1 gap Top-5 gap res18 1 1 42.7% 67.6% 26.6% 21.6% res18 3 1 49.1% 73.8% 20.2% 15.4% res18 3 3 61.0% 83.2% 8.3% 6.0% res18 3 5 63.1% 84.8% 6.2% 4.4% res18 5 1 54.1% 78.1% 15.2% 11.1% res18 5 3 62.5% 84.2% 6.8% 5.0% res18 5 5 65.0% 85.9% 4.3% 3.3% res18 Full Precision 69.3% 89.2% res34 1 1 52.4% 76.5% 20.9% 14.8% res34 3 3 66.7% 87.4% 6.6% 3.9% res34 5 5 68.4% 88.2% 4.9% 3.1% res34 Full Precision 73.3% 91.3% res50 5 5 70.1% 89.7% 6.0% 3.1% res50 Full Precision 76.1% 92.8% As balancing between multiple factors like training time and inference time, model size and accuracy is more a problem of practical trade-off, there will be no definite conclusion as which combination of 6 (M, N) one should choose. In general, Table 2 shows that (1) the prediction accuracy of ABC-Net improves greatly as the number of binary activations increases, which is analogous to the weight approximation approach; (2) larger M or N gives better accuracy; (3) when M = N = 5, the Top-1 gap between the accuracy of a full-precision model and a binary one reduces to around 5%. To gain a visual understanding and show the possibility of extensions to other tasks such object detection, we print the a sample of feature maps in Section S3 of supplementary material. 4.1.3 Comparison with the state-of-the-art Table 3: Classification test accuracy of CNNs trained on ImageNet with Resnet-18 network topology. ‘W’ and ‘A’ refer to the weight and activation bitwidth respectively. Model W A Top-1 Top-5 Full-Precision Resnet-18 [full-precision weights and activation] 32 32 69.3% 89.2% BWN [full-precision activation] Rastegari et al. [2016] 1 32 60.8% 83.0% DoReFa-Net [1-bit weight and 4-bit activation] Zhou et al. [2016] 1 4 59.2% 81.5% XNOR-Net [binary weight and activation] Rastegari et al. [2016] 1 1 51.2% 73.2% BNN [binary weight and activation] Courbariaux et al. [2016] 1 1 42.2% 67.1% ABC-Net [5 binary weight bases, 5 binary activations] 1 1 65.0% 85.9% ABC-Net [5 binary weight bases, full-precision activations] 1 32 68.3% 87.9% Table 3 presents a comparison between ABC-Net and several other state-of-the-art models, i.e., full-precision Resnet-18, BWN and XNOR-Net in [Rastegari et al., 2016], DoReFa-Net in [Zhou et al., 2016] and BNN in [Courbariaux et al., 2016] respectively. All comparative models use Resnet18 as network topology. The full-precision Resnet-18 achieves 69.3% Top-1 accuracy. Although Rastegari et al. [2016]’s BWN model and DeReFa-Net perform well, it should be noted that they use full-precision and 4-bit activation respectively. Models (XNOR-Net and BNN) that used both binary weights and activations achieve much less satisfactory accuracy, and is significantly outperformed by ABC-Net with multiple binary weight bases and activations. It can be seen that ABC-Net has achieved state-of-the-art performance as a binary model. One might argue that 5-bit width quantization scheme could reach similar accuracy as that of ABCNet with 5 weight bases and 5 binary activations. However, the former one is less efficient and requires distinctly more hardware resource. More detailed discussions can be found in Section 5.2. 5 Discussion 5.1 Why adding a shift parameter works? Intuitively, the multiple binarized weight bases/activations scheme works because it allows more information passing through. Consider the case that a real value, say 1.5, is passed to a binarized function f(x) = sign(x), where sign maps a positive x to 1 and otherwise -1. In that case, the outputs of f(1.5) is 1, which suggests that the input value is positive. Now imagine that we have two binarization function f1(x) = sign(x) and f2(x) = sign(x −2). In that case f1 outputs 1 and f2 outputs -1, which suggests that the input value is not only positive, but also must be smaller than 2. Clearly we see that each function contributes differently to represent the input and more information is gained from f2 compared to the former case. From another point of view, both coefficients (β’s) and shift parameters are expected to learn and utilize the statistical features of full-precision tensors, just like the scale and shift parameters in batch normalization. If we have more binarized weight bases/activations, the network has the capacity to approximate the full-precision one more precisely. Therefore, it can be deduced that when M or N is large enough, the network learns to tune itself so that the combination of M weight bases or N binarized activations can act like the full-precision one. 5.2 Advantage over the fixed-point quantization scheme It should be noted that there are key differences between the multiple binarization scheme (M binarized weight bases or N binarized activations) proposed in this paper and the fixed-point quantization scheme in the previous works such as [Zhou et al., 2016, Hubara et al., 2016], though at first Courbariaux et al. [2016] did not report their result on ImageNet. We implemented and presented the result. 7 thought K-bit width quantization seems to share the same memory requirement with K binarizations. Specifically, our K binarized weight bases/activations is preferable to the fixed K-bit width scheme for the following reasons: (1) The K binarization scheme preserves binarization for bitwise operations. One or several bitwise operations is known to be more efficient than a fixed-point multiplication, which is a major reason that BNN/XNOR-Net was proposed. (2) A K-bit width multiplier consumes more resources than K 1-bit multipliers in a digital chip: it requires more than K bits to store and compute, otherwise it could easily overflow/underflow. For example, if a real number is quantized to a 2-bit number, a possible choice is in range {0,1,2,4}. In this 2-bit multiplication, when both numbers are 4, it outputs 4 ⇥4 = 16, which is not within the range. In [Zhou et al., 2016], the range of activations is constrained within [0,1], which seems to avoid this situation. However, fractional numbers do not solve this problem, severe precision deterioration will appear during the multiplication if there are no extra resources. The fact that the complexity of a multiplier is proportional to THE SQUARE of bit-widths can be found in literatures (e.g., sec 3.1.1. in [Grabbe et al., 2003]). In contrast, our K binarization scheme does not have this issue – it always outputs within the range {-1,1}. The saved hardware resources can be further used for parallel computing. (3) A binary activation can use spiking response for event-based computation and communication (consuming energy only when necessary) and therefore is energy-efficient [Esser et al., 2016]. This can be employed in our scheme, but not in the fixed K-bit width scheme. Also, we have mentioned the fact that K-bit width multiplier consumes more resources than K 1-bit multipliers. It is noteworthy that these resources include power. To sum up, K-bit multipliers are the most space and power-hungry components of the digital implementation of DNNs. Our scheme could bring great benefits to specialized DNN hardware. 5.3 Further computation reduction in run-time On specialized hardware, the following operations in our scheme can be integrated with other operations in run-time and further reduce the computation requirement. (1) Shift operations. The existence of shift parameters seem to require extra additions/subtractions (see (2) and (8)). However, the binarization operation with a shift parameter can be implemented as a comparator where the shift parameter is the number for comparison, e.g., Hv(R) = ⇢ 1, R ≥0.5 −v; −1, R < 0.5 −v. (0.5 −v is a constant), so no extra additions/subtractions are involved. (2) Batch normalization. In run-time, a batch normalization is simply an affine function, say, BN(R) = aR + b, whose scale and shift parameters a, b are fixed and can be integrated with vn’s. More specifically, a batch normalization can be integrated into a binarization operation as follow: Hv(BN(R)) = ⇢ 1, aR + b ≥0.5 −v; −1, aR + b < 0.5 −v. = ⇢ 1, R ≥(0.5 −v −b)/a; −1, R < (0.5 −v −b)/a. Therefore, there will be no extra cost for the batch normalization. 6 Conclusion and future work We have introduced a novel binarization scheme for weights and activations during forward and backward propagations called ABC-Net. We have shown that it is possible to train a binary CNN with ABC-Net on ImageNet and achieve accuracy close to its full-precision counterpart. The binarization scheme proposed in this work is parallelizable and hardware friendly, and the impact of such a method on specialized hardware implementations of CNNs could be major, by replacing most multiplications in convolution with bitwise operations. The potential to speed-up the test-time inference might be very useful for real-time embedding systems. Future work includes the extension of those results to other tasks such as object detection and other models such as RNN. Also, it would be interesting to investigate using FPGA/ASIC or other customized deep learning processor [Liu et al., 2016] to implement ABC-Net at run-time. 7 Acknowledgement We acknowledge Mr Jingyang Xu for helpful discussions. 8 References Y. Bengio, N. Léonard, and A. Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. Z. Cai, X. He, J. Sun, and N. Vasconcelos. Deep learning with low precision by half-wave gaussian quantization. arXiv preprint arXiv:1702.00953, 2017. M. Courbariaux, I. Hubara, D. Soudry, R. El-Yaniv, and Y. Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained to+ 1 or-1. arXiv preprint arXiv:1602.02830, 2016. J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. S. K. Esser, P. A. Merolla, J. V. Arthur, A. S. Cassidy, R. Appuswamy, A. Andreopoulos, D. J. Berg, J. L. McKinstry, T. Melano, D. R. Barch, et al. Convolutional networks for fast, energy-efficient neuromorphic computing. Proceedings of the National Academy of Sciences, page 201604850, 2016. A. Giusti, J. Guzzi, D. Ciresan, F.-L. He, J. P. Rodriguez, F. Fontana, M. Faessler, C. Forster, J. Schmidhuber, G. Di Caro, D. Scaramuzza, and L. Gambardella. A machine learning approach to visual perception of forest trails for mobile robots. IEEE Robotics and Automation Letters, 2016. G. Govindu, L. Zhuo, S. Choi, and V. Prasanna. Analysis of high-performance floating-point arithmetic on fpgas. In Parallel and Distributed Processing Symposium, 2004. Proceedings. 18th International, page 149. IEEE, 2004. C. Grabbe, M. Bednara, J. Teich, J. von zur Gathen, and J. Shokrollahi. Fpga designs of parallel high performance gf (2233) multipliers. In ISCAS (2), pages 268–271. Citeseer, 2003. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. I. Hubara, M. Courbariaux, D. Soudry, R. El-Yaniv, and Y. Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061, 2016. S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. S. Liu, Z. Du, J. Tao, D. Han, T. Luo, Y. Xie, Y. Chen, and T. Chen. Cambricon: An instruction set architecture for neural networks. In Proceedings of the 43rd International Symposium on Computer Architecture, pages 393–405. IEEE Press, 2016. N. Qian. On the momentum term in gradient descent learning algorithms. Neural networks, 12(1):145–151, 1999. M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525–542. Springer, 2016. S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. D. Toms. Training binary node feedforward neural networks by back propagation of error. Electronics letters, 26(21):1745–1746, 1990. G. Venkatesh, E. Nurvitadhi, and D. Marr. Accelerating deep convolutional networks using low-precision and sparsity. arXiv preprint arXiv:1610.00324, 2016. S. Zhou, Y. Wu, Z. Ni, X. Zhou, H. Wen, and Y. Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016. 9 | 2017 | 466 |
6,970 | Spectrally-normalized margin bounds for neural networks Peter L. Bartlett∗ Dylan J. Foster† Matus Telgarsky‡ Abstract This paper presents a margin-based multiclass generalization bound for neural networks that scales with their margin-normalized spectral complexity: their Lipschitz constant, meaning the product of the spectral norms of the weight matrices, times a certain correction factor. This bound is empirically investigated for a standard AlexNet network trained with SGD on the mnist and cifar10 datasets, with both original and random labels; the bound, the Lipschitz constants, and the excess risks are all in direct correlation, suggesting both that SGD selects predictors whose complexity scales with the difficulty of the learning task, and secondly that the presented bound is sensitive to this complexity. 1 Overview Neural networks owe their astonishing success not only to their ability to fit any data set: they also generalize well, meaning they provide a close fit on unseen data. A classical statistical adage is that models capable of fitting too much will generalize poorly; what’s going on here? Let’s navigate the many possible explanations provided by statistical theory. A first observation is that any analysis based solely on the number of possible labellings on a finite training set — as is the case with VC dimension — is doomed: if the function class can fit all possible labels (as is the case with neural networks in standard configurations [Zhang et al., 2017]), then this analysis can not distinguish it from the collection of all possible functions! epoch 10 epoch 100 excess risk 0.3 excess risk 0.9 cifar excess risk cifar Lipschitz cifar Lipschitz/margin cifar [random] excess risk cifar [random] Lipschitz Figure 1: An analysis of AlexNet [Krizhevsky et al., 2012] trained with SGD on cifar10, both with original and with random labels. Triangle-marked curves track excess risk across training epochs (on a log scale), with an ‘x’ marking the earliest epoch with zero training error. Circle-marked curves track Lipschitz constants, normalized so that the two curves for random labels meet. The Lipschitz constants tightly correlate with excess risk, and moreover normalizing them by margins (resulting in the square-marked curve) neutralizes growth across epochs. ∗<peter@berkeley.edu>; University of California, Berkeley and Queensland University of Technology. †<djf244@cornell.edu>; Cornell University. ‡<mjt@illinois.edu>; University of Illinois, Urbana-Champaign. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Next let’s consider scale-sensitive measures of complexity, such as Rademacher complexity and metric entropy, which work directly with real-valued function classes, and moreover are sensitive to their magnitudes. Figure 1 plots the excess risk (the test error minus the training error) across training epochs against one candidate scale-sensitive complexity measure, the Lipschitz constant of the network (the product of the spectral norms of their weight matrices), and demonstrates that they are tightly correlated (which is not the case for, say, the l2 norm of the weights). The data considered in Figure 1 is the standard cifar10 dataset, both with original and with random labels, which has been used as a sanity check when investigating neural network generalization [Zhang et al., 2017]. There is still an issue with basing a complexity measure purely on the Lipschitz constant (although it has already been successfully employed to regularize neural networks [Cisse et al., 2017]): as depicted in Figure 1, the measure grows over time, despite the excess risk plateauing. Fortunately, there is a standard resolution to this issue: investigating the margins (a precise measure of confidence) of the outputs of the network. This tool has been used to study the behavior of 2-layer networks, boosting methods, SVMs, and many others [Bartlett, 1996, Schapire et al., 1997, Boucheron et al., 2005]; in boosting, for instance, there is a similar growth in complexity over time (each training iteration adds a weak learner), whereas margin bounds correctly stay flat or even decrease. This behavior is recovered here: as depicted in Figure 1, even though standard networks exhibit growing Lipschitz constants, normalizing these Lipschitz constants by the margin instead gives a decaying curve. 1.1 Contributions This work investigates a complexity measure for neural networks that is based on the Lipschitz constant, but normalized by the margin of the predictor. The two central contributions are as follows. • Theorem 1.1 below will give the rigorous statement of the generalization bound that is the basis of this work. In contrast to prior work, this bound: (a) scales with the Lipschitz constant (product of spectral norms of weight matrices) divided by the margin; (b) has no dependence on combinatorial parameters (e.g., number of layers or nodes) outside of log factors; (c) is multiclass (with no explicit dependence on the number of classes); (d) measures complexity against a reference network (e.g., for the ResNet [He et al., 2016], the reference network has identity mappings at each layer). The bound is stated below, with a general form and analysis summary appearing in Section 3 and the full details relegated to the appendix. • An empirical investigation, in Section 2, of neural network generalization on the standard datasets cifar10, cifar100, and mnist using the preceding bound. Rather than using the bound to provide a single number, it can be used to form a margin distribution as in Figure 2. These margin distributions will illuminate the following intuitive observations: (a) cifar10 is harder than mnist; (b) random labels make cifar10 and mnist much more difficult; (c) the margin distributions (and bounds) converge during training, even though the weight matrices continue to grow; (d) l2 regularization (“weight decay”) does not significantly impact margins or generalization. A more detailed description of the margin distributions is as follows. Suppose a neural network computes a function f : Rd →Rk, where k is the number of classes; the most natural way to convert this to a classifier is to select the output coordinate with the largest magnitude, meaning x 7→arg maxj f(x)j. The margin, then, measures the gap between the output for the correct label and other labels, meaning f(x)y −maxj̸=y f(x)j. Unfortunately, margins alone do not seem to say much; see for instance Figure 2a, where the collections of all margins for all data points — the unnormalized margin distribution — are similar for cifar10 with and without random labels. What is missing is an appropriate normalization, as in Figure 2b. This normalization is provided by Theorem 1.1, which can now be explained in detail. To state the bound, a little bit of notation is necessary. The networks will use L fixed nonlinearities (σ1, . . . , σL), where σi : Rdi−1 →Rdi is ρi-Lipschitz (e.g., as with coordinate-wise ReLU, and max-pooling, as discussed in Appendix A.1); occasionally, it will also hold that σi(0) = 0. Given L weight matrices A = (A1, . . . , AL) let FA denote the function computed by the corresponding network: FA(x) := σL(ALσL−1(AL−1 · · · σ1(A1x) · · · )). (1.1) 2 0 cifar random (a) Margins. 0 cifar cifar random (b) Normalized margins. Figure 2: Margin distributions at the end of training AlexNet on cifar10, with and without random labels. With proper normalization, random labels demonstrably correspond to a harder problem. The network output FA(x) ∈RdL (with d0 = d and dL = k) is converted to a class label in {1, . . . , k} by taking the arg max over components, with an arbitrary rule for breaking ties. Whenever input data x1, . . . , xn ∈Rd are given, collect them as rows of a matrix X ∈Rn×d. Occasionally, notation will be overloaded to discuss FA(XT ), a matrix whose ith column is FA(xi). Let W denote the maximum of {d, d1, . . . , dL}. The l2 norm ∥· ∥2 is always computed entry-wise; thus, for a matrix, it corresponds to the Frobenius norm. Next, define a collection of reference matrices (M1, . . . , ML) with the same dimensions as A1, . . . , AL; for instance, to obtain a good bound for ResNet [He et al., 2016], it is sensible to set Mi := I, the identity map, and the bound below will worsen as the network moves farther from the identity map; for AlexNet [Krizhevsky et al., 2012], the simple choice Mi = 0 suffices. Finally, let ∥· ∥σ denote the spectral norm and ∥· ∥p,q denote the (p, q) matrix norm, defined by ∥A∥p,q :=
(∥A:,1∥p, . . . , ∥A:,m∥p)
q for A ∈Rd×m. The spectral complexity RFA = RA of a network FA with weights A is the defined as RA := L Y i=1 ρi∥Ai∥σ L X i=1 ∥A⊤ i −M ⊤ i ∥2/3 2,1 ∥Ai∥2/3 σ 3/2 . (1.2) The following theorem provides a generalization bound for neural networks whose nonlinearities are fixed but whose weight matrices A have bounded spectral complexity RA. Theorem 1.1. Let nonlinearities (σ1, . . . , σL) and reference matrices (M1, . . . , ML) be given as above (i.e., σi is ρi-Lipschitz and σi(0) = 0). Then for (x, y), (x1, y1), . . . , (xn, yn) drawn iid from any probability distribution over Rd × {1, . . . , k}, with probability at least 1 −δ over ((xi, yi))n i=1, every margin γ > 0 and network FA : Rd →Rk with weight matrices A = (A1, . . . , AL) satisfy Pr h arg max j FA(x)j ̸= y i ≤bRγ(FA) + e O ∥X∥2RA γn ln(W) + r ln(1/δ) n ! , where bRγ(f) ≤n−1 P i 1 f(xi)yi ≤γ + maxj̸=yi f(xi)j and ∥X∥2 = pP i ∥xi∥2 2. The full proof and a generalization beyond spectral norms is relegated to the appendix, but a sketch is provided in Section 3, along with a lower bound. Section 3 also gives a discussion of related work: briefly, it’s essential to note that margin and Lipschitz-sensitive bounds have a long history in the neural networks literature [Bartlett, 1996, Anthony and Bartlett, 1999, Neyshabur et al., 2015]; the distinction here is the sensitivity to the spectral norm, and that there is no explicit appearance of combinatorial quantities such as numbers of parameters or layers (outside of log terms, and indices to summations and products). To close, miscellaneous observations and open problems are collected in Section 4. 2 Generalization case studies via margin distributions In this section, we empirically study the generalization behavior of neural networks, via margin distributions and the generalization bound stated in Theorem 1.1. 3 0 cifar cifar random mnist (a) Mnist is easier than cifar10. 0 cifar cifar random mnist random (b) Random mnist is as hard as random cifar10! 0 cifar cifar random cifar100 (c) cifar100 is (almost) as hard as cifar10 with random labels! 0 cifar random label random input (d) Random inputs are harder than random labels. Figure 3: A variety of margin distributions. Axes are re-scaled in Figure 3a, but identical in the other subplots; the cifar10 (blue) and random cifar10 (green) distributions are the same each time. Before proceeding with the plots, it’s a good time to give a more refined description of the margin distribution, one that is suitable for comparisons across datasets. Given n pattern/label pairs ((xi, yi))n i=1, with patterns as rows of matrix X ∈Rn×d, and given a predictor FA : Rd →Rk, the (normalized) margin distribution is the univariate empirical distribution of the labeled data points each transformed into a single scalar according to (x, y) 7→FA(x)y −maxi̸=y FA(x)i RA∥X∥2/n , where the spectral complexity RA is from eq. (1.2). The normalization is thus derived from the bound in Theorem 1.1, but ignoring log terms. Taken this way, the two margin distributions for two datasets can be interpreted as follows. Considering any fixed point on the horizontal axis, if the cumulative distribution of one density is lower than the other, then it corresponds to a lower right hand side in Theorem 1.1. For no reason other than visual interpretability, the plots here will instead depict a density estimate of the margin distribution. The vertical and horizontal axes are rescaled in different plots, but the random and true cifar10 margin distributions are always the same. A little more detail about the experimental setup is as follows. All experiments were implemented in Keras [Chollet et al., 2015]. In order to minimize conflating effects of optimization and regularization, the optimization method was vanilla SGD with step size 0.01, and all regularization (weight decay, batch normalization, etc.) were disabled. “cifar” in general refers to cifar10, however cifar100 will also be explicitly mentioned. The network architecture is essentially AlexNet [Krizhevsky et al., 2012] with all normalization/regularization removed, and with no adjustments of any kind (even to the learning rate) across the different experiments. Comparing datasets. A first comparison is of cifar10 and the standard mnist digit data. mnist is considered “easy”, since any of a variety of methods can achieve roughly 1% test error. The “easiness” is corroborated by Figure 3a, where the margin distribution for mnist places all its mass far to the right of the mass for cifar10. Interestingly, randomizing the labels of mnist, as in Figure 3b, results in a margin distribution to the left of not only cifar10, but also slightly to the left of (but close to) cifar10 with randomized labels. 4 10 epochs 20 epochs 40 epochs 80 epochs 160 epochs (a) Margins across epochs for cifar10. 0 10 6 10 5 10 4 (b) Various levels of l2 regularization for cifar10. Figure 4 Next, Figure 3c compares cifar10 and cifar100, where cifar100 uses the same input images as cifar10; indeed, cifar10 is obtained from cifar100 by collapsing the original 100 categories into 10 groups. Interestingly, cifar100, from the perspective of margin bounds, is just as difficult as cifar10 with random labels. This is consistent with the large observed test error on cifar100 (which has not been “optimized” in any way via regularization). Lastly, Figure 3d replaces the cifar10 input images with random images sampled from Gaussians matching the first- and second-order image statistics (see [Zhang et al., 2017] for similar experiments). Convergence of margins. As was pointed out in Section 1, the weights of the neural networks do not seem to converge in the usual sense during training (the norms grow continually). However, as depicted in Figure 4a, the sequence of (normalized) margin distributions is itself converging. Regularization. As remarked in [Zhang et al., 2017], regularization only seems to bring minor benefits to test error (though adequate to be employed in all cutting edge results). This observation is certainly consistent with the margin distributions in Figure 4b, which do not improve (e.g., by shifting to the right) in any visible way under regularization. An open question, discussed further in Section 4, is to design regularization that improves margins. 3 Analysis of margin bound This section will sketch the proof of Theorem 1.1, give a lower bound, and discuss related work. 3.1 Multiclass margin bound The starting point of this analysis is a margin-based bound for multiclass prediction. To state the bound, first recall that the margin operator M : Rk×{1, . . . , k} →R is defined as M(v, y) := vy −max i̸=y vi, and define the ramp loss ℓγ : R →R+ as ℓγ(r) := 0 r < −γ, 1 + r/γ r ∈[−γ, 0], 1 r > 0, and ramp risk as Rγ(f) := E(ℓγ(−M(f(x), y))). Given a sample S := ((x1, y1), . . . , (xn, yn)), define an empirical counterpart bRγ of Rγ as bRγ(f) := n−1 P i ℓγ(−M(f(xi), yi)); note that Rγ and bRγ respectively upper bound the probability and fraction of errors on the source distribution and training set. Lastly, given a set of real-valued functions H, define the Rademacher complexity as R(H|S) := n−1E suph∈H Pn i=1 ϵih(xi, yi), where the expectation is over the Rademacher random variables (ϵ1, . . . , ϵn), which are independent, uniform ±1-valued. With this notation in place, the basic bound is as follows. Lemma 3.1. Given functions F with F ∋f : Rd →Rk and any γ > 0, define Fγ := (x, y) 7→ℓγ(−M(f(x), y)) : f ∈F . Then, with probability at least 1 −δ over a sample S of size n, every f ∈F satisfies Pr[arg maxi f(x)i ̸= y] ≤bRγ(f) + 2R((Fγ)|S) + 3 q ln(1/δ) 2n . This bound is a direct consequence of standard tools in Rademacher complexity. In order to instantiate this bound, covering numbers will be used to directly upper bound the Rademacher complexity term 5 R((Fγ)|S). Interestingly, the choice of directly working in terms of covering numbers seems essential to providing a bound with no explicit dependence on k; by contrast, prior work primarily handles multiclass via a Rademacher complexity analysis on each coordinate of a k-tuple of functions, and pays a factor of √ k [Zhang, 2004]. 3.2 Covering number complexity upper bounds This subsection proves Theorem 1.1 via Lemma 3.1 by controlling, via covering numbers, the Rademacher complexity R((Fγ)|S) for networks with bounded spectral complexity. The notation here for (proper) covering numbers is as follows. Let N(U, ϵ, ∥· ∥) denote the least cardinality of any subset V ⊆U that covers U at scale ϵ with norm ∥· ∥, meaning sup A∈U min B∈V ∥A −B∥≤ϵ. Choices of U that will be used in the present work include both the image F|S of data S under some function class F, as well as the conceptually simpler choice of a family of matrix products. The full proof has the following steps: (I) A matrix covering bound for the affine transformation of each layer is provided in Lemma 3.2; handling whole layers at once allows for more flexible norms. (II) An induction on layers then gives a covering number bound for entire networks; this analysis is only sketched here for the special case of norms used in Theorem 1.1, but the full proof in the appendix culminates in a bound for more general norms (cf. Lemma A.7). (III) The preceding whole-network covering number leads to Theorem 1.1 via Lemma 3.1 and standard techniques. Step (I), matrix covering, is handled by the following lemma. The covering number considers the matrix product XA, where A will be instantiated as the weight matrix for a layer, and X is the data passed through all layers prior to the present layer. Lemma 3.2. Let conjugate exponents (p, q) and (r, s) be given with p ≤2, as well as positive reals (a, b, ϵ) and positive integer m. Let matrix X ∈Rn×d be given with ∥X∥p ≤b. Then ln N n XA : A ∈Rd×m, ∥A∥q,s ≤a o , ϵ, ∥· ∥2 ≤ & a2b2m2/r ϵ2 ' ln(2dm). The proof relies upon the Maurey sparsification lemma [Pisier, 1980], which is stated in terms of sparsifying convex hulls, and in its use here is inspired by covering number bounds for linear predictors [Zhang, 2002]. To prove Theorem 1.1, this matrix covering bound will be instantiated for the case of ∥A∥2,1. It is possible to instead scale with ∥A∥2 and ∥X∥2, but even for the case of the identity matrix X = I, this incurs an extra dimension factor. The use of ∥A∥2,1 here thus helps Theorem 1.1 avoid any appearance of W and L outside of log terms; indeed, the goal of covering a whole matrix at a time (rather than the more standard vector covering) was to allow this greater sensitivity and avoid combinatorial parameters. Step (II) above, the induction on layers, proceeds as follows. Let Xi denote the output of layer i (thus X0 = X), and inductively suppose there exists a cover element b Xi depending on covering matrices ( bA1, . . . , bAi−1) chosen to cover weight matrices in earlier layers. Thanks to Lemma 3.2, there also exists bAi so that ∥Ai b Xi −bAi b Xi∥2 ≤ϵi. The desired cover element is thus b Xi+1 = σi( bAi b Xi) where σi is the nonlinearity in layer i; indeed, supposing σi is ρi-Lipschitz, ∥Xi+1 −b Xi+1∥2 ≤ρi∥AiXi −bAi b Xi∥2 ≤ρi ∥AiXi −Ai b Xi∥2 + ∥Ai b Xi −bAi b Xi∥2 ≤ρi∥Ai∥σ∥Xi −Ai b Xi∥2ρi + ϵi, where the first term is controlled with the inductive hypothesis. Since b Xi+1 depends on each choice ( bAi, . . . , bAi), the cardinality of the full network cover is the product of the individual matrix covers. The preceding proof had no sensitivity to the particular choice of norms; it merely required an operator norm on Ai, as well as some other norm that allows matrix covering. Such an analysis is presented in full generality in Appendix A.5. Specializing to the particular case of spectral norms and (2, 1) group norms leads to the following full-network covering bound. 6 Theorem 3.3. Let fixed nonlinearities (σ1, . . . , σL) and reference matrices (M1, . . . , ML) be given, where σi is ρi-Lipschitz and σi(0) = 0. Let spectral norm bounds (s1, . . . , sL), and matrix (2, 1) norm bounds (b1, . . . , bL) be given. Let data matrix X ∈Rn×d be given, where the n rows correspond to data points. Let HX denote the family of matrices obtained by evaluating X with all choices of network FA: HX := FA(XT ) : A = (A1, . . . , AL), ∥Ai∥σ ≤si, ∥A⊤ i −M ⊤ i ∥2,1 ≤bi , where each matrix has dimension at most W along each axis. Then for any ϵ > 0, ln N(HX, ϵ, ∥· ∥2) ≤∥X∥2 2 ln(2W 2) ϵ2 L Y j=1 s2 jρ2 j L X i=1 bi si 2/3 3 . What remains is (III): Theorem 3.3 can be combined with the standard Dudley entropy integral upper bound on Rademacher complexity (see e.g. Mohri et al. [2012]), which combined with Lemma 3.1 gives Theorem 1.1. 3.3 Rademacher complexity lower bounds By reduction to the linear case (i.e., removing all nonlinearities), it is easy to provide a lower bound on the Rademacher complexity of the networks studied here. Unfortunately, this bound only scales with the product of spectral norms, and not the other terms in RA (cf. eq. (1.2)). Theorem 3.4. Consider the setting of Theorem 3.3, but all nonlinearities are the ReLU z 7→ max{0, z}, the output dimension is dL = 1, and all non-output dimensions are at least 2 (and hence W ≥2). Let data S := (x1, . . . , xn) be collected into data matrix X ∈Rn×d. Then there is a c such that for any scalar r > 0, R FA : A = (A1, . . . , AL), Q i ∥Ai∥σ ≤r |S ≥c∥X∥2r. Note that, due to the nonlinearity, the lower bound should indeed depend on Q i ∥Ai∥σ and not ∥Q i Ai∥σ; as a simple sanity check, there exist networks for which the latter quantity is 0, but the network does not compute the zero function. 3.4 Related work To close this section on proofs, it is a good time to summarize connections to existing literature. The algorithmic idea of large margin classifiers was introduced in the linear case by Vapnik [1982] (see also [Boser et al., 1992, Cortes and Vapnik, 1995]). Vapnik [1995] gave an intuitive explanation of the performance of these methods based on a sample-dependent VC-dimension calculation, but without generalization bounds. The first rigorous generalization bounds for large margin linear classifiers [Shawe-Taylor et al., 1998] required a scale-sensitive complexity analysis of real-valued function classes. At the same time, a large margins analysis was developed for two-layer networks [Bartlett, 1996], indeed with a proof technique that inspired the layer-wise induction used to prove Theorem 1.1 in the present work. Margin theory was quickly extended to many other settings (see for instance the survey by Boucheron et al. [2005]), one major success being an explanation of the generalization ability of boosting methods, which exhibit an explicit growth in the size of the function class over time, but a stable excess risk [Schapire et al., 1997]. The contribution of the present work is to provide a margin bound (and corresponding Rademacher analysis) that can be adapted to various operator norms at each layer. Additionally, the present work operates in the multiclass setting, and avoids an explicit dependence on the number of classes k, which seems to appear in prior work [Zhang, 2004, Tewari and Bartlett, 2007]. There are numerous generalization bounds for neural networks, including VC-dimension and fatshattering bounds (many of these can be found in [Anthony and Bartlett, 1999]). Scale-sensitive analysis of neural networks started with [Bartlett, 1996], which can be interpreted in the present setting as utilizing data norm ∥·∥∞and operator norm ∥·∥∞→∞(equivalently, the norm ∥A⊤ i ∥1,∞on weight matrix Ai). This analysis can be adapted to give a Rademacher complexity analysis [Bartlett and Mendelson, 2002], and has been adapted to other norms [Neyshabur et al., 2015], although the ∥· ∥∞setting appears to be necessary to avoid extra combinatorial factors. More work is still needed to develop complexity analyses that have matching upper and lower bounds, and also to determine which norms are well-adapted to neural networks as used in practice. The present analysis utilizes covering numbers, and is most closely connected to earlier covering number bounds [Anthony and Bartlett, 1999, Chapter 12], themselves based on the earlier fatshattering analysis [Bartlett, 1996], however the technique here of pushing an empirical cover through 7 layers is akin to VC dimension proofs for neural networks [Anthony and Bartlett, 1999]. The use of Maurey’s sparsification lemma was inspired by linear predictor covering number bounds [Zhang, 2002]. Comparison to preprint. The original preprint of this paper [Bartlett et al., 2017] featured a slightly different version of the spectral complexity RA, given by QL i=1 ρi∥Ai∥σ PL i=1 ∥Ai−Mi∥2/3 1 ∥Ai∥2/3 σ 3/2 . In the present version (1.2), each ∥Ai −Mi∥1 term is replaced by ∥A⊤ i −M ⊤ i ∥2,1. This is a strict improvement since for any matrix A ∈Rd×m one has ∥A∥2,1 ≤∥A∥1, and in general the gap between these two norms can be as large as √ d. On a related note, all of the figures in this paper use the ℓ1 norm in the spectral complexity RA instead of the (2, 1) norm. Variants of the experiments described in Section 2 were carried out using each of the l1, (2, 1), and l2 norms in the (PL i=1(·)2/3)3/2 term with negligible difference in the results. Since spectrally-normalized margin bounds were first proposed in the preprint [Bartlett et al., 2017], subsequent works [Neyshabur et al., 2017, Neyshabur, 2017] re-derived a similar spectrallynormalized bound using the PAC-Bayes framework. Specifically, these works showed that RA may be replaced by (up to log(W) factors): QL i=1 ρi∥Ai∥σ · L PL i=1 ( √ W ∥Ai−Mi∥2)2 ∥Ai∥2σ 1/2 . Unfortunately, this bound never improves on Theorem 1.1, and indeed can be derived from it as follows. First, the dependence on the individual matrices Ai in the second term of this bound can be obtained from Theorem 1.1 because for any A ∈Rd×m it holds that
A⊤
2,1 ≤ √ d∥A∥2. Second, the functional form (PL i=1(·)2/3)3/2 appearing in Theorem 1.1 may be replaced by the form L(PL i=1(·)2)1/2 appearing above by using that ∥α∥2/3 ≤L∥α∥2 for any α ∈RL (this inequality following, for instance, from Jensen’s inequality). 4 Further observations and open problems Adversarial examples. Adversarial examples are a phenomenon where the neural network predictions can be altered by adding seemingly imperceptible noise to an input [Goodfellow et al., 2014]. This phenomenon can be connected to margins as follows. The margin is nothing more than the distance an input must traverse before its label is flipped; consequently, low margin points are more susceptible to adversarial noise than high margin points. Concretely, taking the 100 lowest margin inputs from cifar10 and adding uniform noise at scale 0.15 yielded flipped labels on 5.86% of the images, whereas the same level of noise on high margin points yielded 0.04% flipped labels. Can the bounds here suggest a way to defend against adversarial examples? Regularization. It was observed in [Zhang et al., 2017] that explicit regularization contributes little to the generalization performance of neural networks. In the margin framework, standard weight decay (l2) regularization seemed to have little impact on margin distributions in Section 2. On the other hand, in the boosting literature, special types of regularization were developed to maximize margins [Shalev-Shwartz and Singer, 2008]; perhaps a similar development can be performed here? SGD. The present analysis applies to predictors that have large margins; what is missing is an analysis verifying that SGD applied to standard neural networks returns large margin predictors! Indeed, perhaps SGD returns not simply large margin predictors, but predictors that are well-behaved in a variety of other ways that can be directly translated into refined generalization bounds. Improvements to Theorem 1.1. There are several directions in which Theorem 1.1 might be improved. Can a better choice of layer geometries (norms) yield better bounds on practical networks? Can the nonlinearities’ worst-case Lipschitz constant be replaced with an (empirically) averaged quantity? Alternatively, can better lower bounds rule out these directions? Rademacher vs. covering. Is it possible to prove Theorem 1.1 solely via Rademacher complexity, with no invocation of covering numbers? Acknowledgements The authors thank Srinadh Bhojanapalli, Ryan Jian, Behnam Neyshabur, Maxim Raginsky, Andrew J. Risteski, and Belinda Tzen for useful conversations and feedback. The authors thank Ben Recht for giving a provocative lecture at the Simons Institute, stressing the need for understanding of 8 both generalization and optimization of neural networks. M.T. and D.F. acknowledge the use of a GPU machine provided by Karthik Sridharan and made possible by an NVIDIA GPU grant. D.F. acknowledges the support of the NDSEG fellowship. P.B. gratefully acknowledges the support of the NSF through grant IIS-1619362 and of the Australian Research Council through an Australian Laureate Fellowship (FL110100281) and through the ARC Centre of Excellence for Mathematical and Statistical Frontiers. The authors thank the Simons Institute for the Theory of Computing Spring 2017 program on the Foundations of Machine Learning. Lastly, the authors are grateful to La Burrita (both the north and the south Berkeley campus locations) for upholding the glorious tradition of the California Burrito. References Martin Anthony and Peter L. Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. Peter Bartlett, Dylan J Foster, and Matus Telgarsky. Spectrally-normalized margin bounds for neural networks. arXiv preprint arXiv:1706.08498, 2017. Peter L. Bartlett. For valid generalization the size of the weights is more important than the size of the network. In NIPS, 1996. Peter L. Bartlett and Shahar Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. JMLR, 3:463–482, Nov 2002. Bernhard E. Boser, Isabelle M. Guyon, and Vladimir N. Vapnik. A training algorithm for optimal margin classifiers. In Proceedings of the Fifth Annual Workshop on Computational Learning Theory, COLT ’92, pages 144–152, New York, NY, USA, 1992. ACM. ISBN 0-89791-497-X. Stéphane Boucheron, Olivier Bousquet, and Gabor Lugosi. Theory of classification: A survey of some recent advances. ESAIM: Probability and Statistics, 9:323–375, 2005. François Chollet et al. Keras. https://github.com/fchollet/keras, 2015. Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. In ICML, 2017. Corinna Cortes and Vladimir N. Vapnik. Support-vector networks. Machine Learning, 20(3):273–297, 1995. Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. 2014. arXiv:1412.6572 [stat.ML]. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In ECCV, 2016. Alex Krizhevsky, Ilya Sutskever, and Geoffery Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of Machine Learning. MIT Press, 2012. Behnam Neyshabur. Implicit regularization in deep learning. CoRR, abs/1709.01953, 2017. URL http://arxiv.org/abs/1709.01953. Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. In COLT, 2015. Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nathan Srebro. A pac-bayesian approach to spectrally-normalized margin bounds for neural networks. CoRR, abs/1707.09564, 2017. Gilles Pisier. Remarques sur un résultat non publié de b. maurey. Séminaire Analyse fonctionnelle (dit), pages 1–12, 1980. 9 Robert E. Schapire, Yoav Freund, Peter Bartlett, and Wee Sun Lee. Boosting the margin: A new explanation for the effectiveness of voting methods. In ICML, pages 322–330, 1997. Shai Shalev-Shwartz and Yoram Singer. On the equivalence of weak learnability and linear separability: New relaxations and efficient boosting algorithms. In COLT, 2008. J. Shawe-Taylor, P. L. Bartlett, R. C. Williamson, and M. Anthony. Structural risk minimization over data-dependent hierarchies. IEEE Trans. Inf. Theor., 44(5):1926–1940, September 1998. Ambuj Tewari and Peter L. Bartlett. On the consistency of multiclass classification methods. Journal of Machine Learning Research, 8:1007–1025, 2007. Vladimir N. Vapnik. Estimation of Dependences Based on Empirical Data. Springer-Verlag, New York, 1982. Vladimir N. Vapnik. The Nature of Statistical Learning Theory. Springer-Verlag, New York, 1995. Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. ICLR, 2017. Tong Zhang. Covering number bounds of certain regularized linear function classes. Journal of Machine Learning Research, 2:527–550, 2002. Tong Zhang. Statistical analysis of some multi-category large margin classification methods. Journal of Machine Learning Research, 5:1225–1251, 2004. 10 | 2017 | 467 |
6,971 | Consistent Multitask Learning with Nonlinear Output Relations Carlo Ciliberto •,1 Alessandro Rudi •,∗,2 Lorenzo Rosasco 3,4,5 Massimiliano Pontil 1,5 {c.ciliberto,m.pontil}@ucl.ac.uk alessandro.rudi@inria.fr lrosasco@mit.edu 1Department of Computer Science, University College London, London, UK. 2INRIA - Sierra Project-team and École Normale Supérieure, Paris, France. 3Massachusetts Institute of Technology, Cambridge, USA. 4Università degli studi di Genova, Genova, Italy. 5Istituto Italiano di Tecnologia, Genova, Italy. • Equal Contribution Abstract Key to multitask learning is exploiting the relationships between different tasks in order to improve prediction performance. Most previous methods have focused on the case where tasks relations can be modeled as linear operators and regularization approaches can be used successfully. However, in practice assuming the tasks to be linearly related is often restrictive, and allowing for nonlinear structures is a challenge. In this paper, we tackle this issue by casting the problem within the framework of structured prediction. Our main contribution is a novel algorithm for learning multiple tasks which are related by a system of nonlinear equations that their joint outputs need to satisfy. We show that our algorithm can be efficiently implemented and study its generalization properties, proving universal consistency and learning rates. Our theoretical analysis highlights the benefits of non-linear multitask learning over learning the tasks independently. Encouraging experimental results show the benefits of the proposed method in practice. 1 Introduction Improving the efficiency of learning from human supervision is one of the great challenges in machine learning. Multitask learning is one of the key approaches in this sense and it is based on the assumption that different learning problems (i.e. tasks) are often related, a property that can be exploited to reduce the amount of data needed to learn each individual tasks and in particular to learn efficiently novel tasks (a.k.a. transfer learning, learning to learn [1]). Special cases of multitask learning include vector-valued regression and multi-category classification; applications are numerous, including classic ones in geophysics, recommender systems, co-kriging or collaborative filtering (see [2, 3, 4] and references therein). Diverse methods have been proposed to tackle this problem, for examples based on kernel methods [5], sparsity approaches [3] or neural networks [6]. Furthermore, recent theoretical results allowed to quantify the benefits of multitask learning from a generalization point view when considering specific methods [7, 8]. A common challenge for multitask learning approaches is the problem of incorporating prior assumptions on the task relatedness in the learning process. This can be done implicitly, as in neural networks [6], or explicitly, as done in regularization methods by designing suitable regularizers [5]. This latter approach is flexible enough to incorporate different notions of tasks’ relatedness expressed, for example, in terms of clusters or a graph, see e.g. [9, 10]. Further, it can be extended to learn the tasks’ structures when they are unknown [3, 11, 12, 13, 14, 15, 16]. However, most ∗Work performed while A.R. was at the Istituto Italiano di Tecnologia. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. regularization approaches are currently limited to imposing, or learning, tasks structures expressed by linear relations (see Sec. 5). For example an adjacency matrix in the case of graphs or a block matrix in the case of clusters. Clearly while such a restriction might make the problem more amenable to statistical and computational analysis, in practice it might be a severe limitation. Encoding and exploiting nonlinear task relatedness is the problem we consider in this paper. Previous literature on the topic is scarce. Neural networks naturally allow to learn with nonlinear relations, however it is unclear whether such relations can be imposed a-priori. As explained below, our problem has some connections to that of manifold valued regression [17]. To our knowledge this is the first work addressing the problem of explicitly imposing nonlinear output relations among multiple tasks. Close to our perspective is [18], where however a different approach is proposed, implicitly enforcing a nonlinear structure on the problem by requiring the parameters of each task predictors to lie on a shared manifold in the hypotheses space. Our main contribution is a novel method for learning multiple tasks which are nonlinearly related. We address this problem from the perspective of structured prediction (see [19, 20] and references therein) building upon ideas recently proposed in [21]. Specifically we look at multitask learning as the problem of learning a vector-valued function taking values in a prescribed set, which models tasks’ interactions. We also discuss how to deal with possible violations of such a constraint set. We study the generalization properties of the proposed approach, proving universal consistency and learning rates. Our theoretical analysis allows also to identify specific training regimes in which multitask learning is clearly beneficial in contrast to learning all tasks independently. 2 Problem Formulation Multitask learning (MTL) studies the problem of estimating multiple (real-valued) functions f1, . . . , fT : X →R (1) from corresponding training sets (xit, yit)nt i=1 with xit ∈X and yit ∈R, for t = 1, . . . , T. The key idea in MTL is to estimate f1, . . . , fT jointly, rather than independently. The intuition is that if the different tasks are related this strategy can lead to a substantial decrease of sample complexity, that is the amount of data needed to achieve a given accuracy. The crucial question is then how to encode and exploit such relations among the tasks. Previous work on MTL has mostly focused on studying the case where the tasks are linearly related (see Sec. 5). Indeed, this allows to capture a wide range of relevant situations and the resulting problem can be often cast as a convex optimization, which can be solved efficiently. However, it is not hard to imagine situations where different tasks might be nonlinearly related. As a simple example consider the problem of learning two functions f1, f2 : [0, 2π] →R, with f1(x) = cos(x) and f2(x) = sin(x). Clearly the two tasks are strongly related one to the other (they need to satisfy f1(x)2 + f2(x)2 −1 = 0 for all x ∈[0, 2π]) but such structure in nonlinear (here an equation of degree 2). More realistic examples can be found for instance in the context of modeling physical systems, such as the case of a robot manipulator. A prototypical learning problem (see e.g. [22]) is to associate the current state of the system (position, velocity, acceleration) to a variety of measurements (e.g. torques) that are nonlinearly related one to the other by physical constraints (see e.g. [23]). Following the intuition above, in this work we model tasks relations as a set of P equations. Specifically we consider a constraint function γ : RT →RP and require that γ (f1(x), . . . , fT (x)) = 0 for all x ∈X. When γ is linear, the problem reverts to linear MTL and can be addressed via standard approaches (see Sec. 5). On the contrary, the nonlinear case becomes significantly more challenging and it is not clear how to address it in general. The starting point of our study is to consider the tasks predictors as a vector-valued function f = (f1, . . . , fT ) : X →RT but then observe that γ imposes constraints on its range. Specifically, in this work we restrict f : X →C to take values in the constraint set C = y ∈RT | γ(y) = 0 ⊆RT (2) and formulate the nonlinear multitask learning problem as that of finding a good approximation bf : X →C to the solution of the multi-task expected risk minimization problem minimize f:X→C E(f), E(f) = 1 T T X t=1 Z X×R ℓ(ft(x), y)dρt(x, y) (3) 2 where ℓ: R × R →R is a prescribed loss function measuring prediction errors for each individual task and, for every t = 1, . . . , T, ρt is the distribution on X × R from which the training points (xit, yit)nt i=1 have been independently sampled. Nonlinear MTL poses several challenges to standard machine learning approaches. Indeed, when C is a linear space (e.g. γ is a linear map) the typical strategy to tackle problem (3) is to minimize the empirical risk 1 T PT t=1 1 nt Pnt i=1 ℓ(ft(xit), yit) over some suitable space of hypotheses f : X →C within which optimization can be performed efficiently. However, if C is a nonlinear subset of RT , it is not clear how to parametrize a “good” space of functions since most basic properties typically needed by optimization algorithms are lost (e.g. f1, f2 : X →C does not necessarily imply f1 + f2 : X →C). To address this issue, in this paper we adopt the structured prediction perspective proposed in [21], which we review in the following. 2.1 Background: Structured Prediction and the SELF Framework The term structured prediction typically refers to supervised learning problems with discrete outputs, such as strings or graphs [19, 20, 24]. The framework in [21] generalizes this perspective to account for a more flexible formulation of structured prediction where the goal is to learn an estimator approximating the minimizer of minimize f:X→C Z X×Y L(f(x), y)dρ(x, y) (4) given a training set (xi, yi)n i=1 of points independently sampled from an unknown distribution ρ on X × Y, where L : Y × Y →R is a loss function. The output sets Y and C ⊆Y are not assumed to be linear spaces but can be either discrete (e.g. strings, graphs, etc.) or dense (e.g. manifolds, distributions, etc.) sets of “structured” objects. This generalization will be key to tackle the question of multitask learning with nonlinear output relations in Sec. 3 since it allows to consider the case where C is a generic subset of Y = RT . The analysis in [21] hinges on the assumption that the loss L is “bi-linearizable”, namely Definition 1 (SELF). Let Y be a compact set. A function ℓ: Y × Y →R is a Structure Encoding Loss Function (SELF) if there exists a continuous feature map ψ : Y →H, with H a reproducing kernel Hilbert space on Y and a continuous linear operator V : H →H such that for all y, y′ ∈Y ℓ(y, y′) = ⟨ψ(y), V ψ(y′)⟩H. (5) In the original work the SELF definition was dubbed “loss trick” as a parallel to the kernel trick [25]. As we discuss in Sec. 4, most MTL loss functions indeed satisfy the SELF property. Under this assumption, it can be shown that a solution f ∗: X →C to Eq. (4) must satisfy f ∗(x) = argmin c∈C ⟨ψ(c), V g∗(x)⟩H with g∗(x) = Z Y ψ(y) dρ(y|x) (6) for all x ∈X (see [21] or the Appendix). Since g∗: X →H is a function with values in a linear space, we can apply standard regression techniques to learn a bg : X →H to approximate g∗given (xi, ψ(yi))n i=1 and then obtain the estimator bf : X →C as bf(x) = argmin c∈C ⟨ψ(c) , V bg(x)⟩H ∀x ∈X. (7) The intuition here is that if bg is close to g∗, so it will be bf to f ∗(see Sec. 4 for a rigorous analysis of this relation). If bg is the kernel ridge regression estimator obtained by minimizing the empirical risk 1 n Pn i=1 ∥g(xi) −ψ(yi)∥2 H (plus regularization), Eq. (7) becomes bf(x) = argmin c∈C n X i=1 αi(x)L(c, yi), α(x) = (α1(x), . . . , αn(x)) ⊤= (K + nλI)−1Kx (8) since bg can be written as the linear combination bg(x) = Pn i=1 αi(x) ψ(yi) and the loss function L is SELF. In the above formula λ > 0 is a hyperparameter, I ∈Rn×n the identity matrix, K ∈Rn×n the kernel matrix with elements Kij = k(xi, xj), Kx ∈Rn the vector with entries (Kx)i = k(x, xi) and k : X × X →R a reproducing kernel on X. 3 The SELF structured prediction approach is therefore conceptually divided into two distinct phases: a learning step, where the score functions αi : X →R are estimated, which consists in solving the kernel ridge regression in bg, followed by a prediction step, where the vector c ∈C minimizing the weighted sum in Eq. (8) is identified. Interestingly, while the feature map ψ, the space H and the operator V allow to derive the SELF estimator, their knowledge is not needed to evaluate bf(x) in practice since the optimization at Eq. (8) depends exclusively on the loss L and the score functions αi. 3 Structured Prediction for Nonlinear MTL In this section we present the main contribution of this work, namely the extension of the SELF framework to the MTL setting. Furthermore, we discuss how to cope with possible violations of the constraint set in practice. We study the theoretical properties of the proposed estimator in Sec. 4. We begin our analysis by applying the SELF approach to vector-valued regression which will then lead to the MTL formulation. 3.1 Nonlinear Vector-valued Regression Vector-valued regression (VVR) is a special instance of MTL where for each input, all output examples are available during training. In other words, the training sets can be combined into a single dataset (xi, yi)n i=1, with yi = (yi1, . . . , yit)⊤∈RT . If we denote L : RT × RT →R the separable loss L(y, y′) = 1 T P t=1 ℓ(yt, y′ t), nonlinear VVR coincides with the structured prediction problem in Eq. (4). If L is SELF, we can therefore obtain an estimator according to Eq. (8). Example 1 (Nonlinear VVR with Square Loss). Let L(y, y′) = PT t=1(yt −y′ t)2. Then, the SELF estimator for nonlinear VVR can be obtained as bf : X →C from Eq. (8) and corresponds to the projection onto C bf(x) = argmin c∈C ∥c −b(x)/a(x)∥2 2 = ΠC (b(x)/a(x)) (9) with a(x) = Pn i=1 αi(x) and b(x) = Pn i=1 αi(x) yi. Interestingly, b(x) = Pn i=1 αi(x)yi = Y ⊤(K+nλI)−1Kx corresponds to the solution of the standard vector-valued kernel ridge regression without constraints (we denoted Y ∈Rn×T the matrix with rows y⊤ i ). Therefore, nonlinear VVR consists in: 1) computing the unconstrained kernel ridge regression estimator b(x), 2) normalizing it by a(x) and 3) projecting it onto C. The example above shows that for specific loss functions the estimation of bf(x) can be significantly simplified. In general, such optimization will depend on the properties of the constraint set C (e.g. convex, connected, etc.) and the loss ℓ(e.g. convex, smooth, etc.). In practice, if C is a discrete (or discretized) subset of RT , the computation can be performed efficiently via a nearest neighbor search (e.g. using k-d trees based approaches to speed up computations [26]). If C is a manifold, recent geometric optimization methods [27] (e.g. SVRG [28]) can be applied to find critical points of Eq. (8). This setting suggests a connection with manifold regression as discussed below. Remark 1 (Connection to Manifold Regression). When C is a Riemannian manifold, the problem of learning f : X →C shares some similarities to the manifold regression setting studied in [17] (see also [29] and references therein). Manifold regression can be interpreted as a vector-valued learning setting where outputs are constrained to be in C ⊆RT and prediction errors are measured according to the geodesic distance. However, note that the two problems are also significantly different since, 1) in MTL noise could make output examples yi lie close but not exactly on the constraint set C and moreover, 2) the loss functions used in MTL typically measure errors independently for each task (as in Eq. (3), see also [5]) and rarely coincide with a geodesic distance. 3.2 Nonlinear Multitask Learning Differently from nonlinear vector-valued regression, the SELF approach introduced in Sec. 2.1 cannot be applied to the MTL setting. Indeed, the estimator at Eq. (8) requires knowledge of all tasks outputs yi ∈Y = RT for every training input xi ∈X while in MTL we have a separate dataset (xit, yit)nt i=1 for each task, with yit ∈R (this could be interpreted as the vector yi to have “missing entries”). 4 Therefore, in this work we extend the SELF framework to nonlinear MTL. We begin by proving a characterization of the minimizer f ∗: X →C of the expected risk E(f) akin to Eq. (6). Proposition 2. Let ℓ: R × R →R be SELF, with ℓ(y, y′) = ⟨ψ(y), V ψ(y′)⟩H. Then, the expected risk E(f) introduced at Eq. (3) admits a measurable minimizer f ∗: X →C. Moreover, any such minimizer satisfies, almost everywhere on X, f ∗(x) = argmin c∈C T X t=1 ⟨ψ(ct), V g∗ t (x)⟩H, with g∗ t (x) = Z R ψ(y) dρt(y|x). (10) Prop. 2 extends Eq. (6) by relying on the linearity induced by the SELF assumption combined with the Aumann’s principle [30], which guarantees the existence of a measurable selector f ∗for the minimization problem at Eq. (10) (see Appendix). By following the strategy outlined in Sec. 2.1, we propose to learn T independent functions bgt : X →H, each aiming to approximate the corresponding g∗ t : X →H and then define bf : X →C such that bf(x) = argmin c∈C T X t=1 ⟨ψ(ct) , V bgt(x) ⟩H ∀x ∈X. (11) We choose the bgt to be the solutions to T independent kernel ridge regressions problems minimize g∈H⊗G 1 nt nt X i=1 ∥g(xit) −ψ(yit)∥2 + λt∥g∥2 H⊗G (12) for t = 1, . . . , T, where G is a reproducing kernel Hilbert space on X associated to a kernel k : X × X →R and the candidate solution g : X →H is an element of H ⊗G. The following result shows that in this setting, evaluating the estimator bf can be significantly simplified. Proposition 3 (The Nonlinear MTL Estimator). Let k : X × X →R be a reproducing kernel with associated reproducing kernel Hilbert space G. Let bgt : X →H be the solution of Eq. (12) for t = 1, . . . , T. Then the estimator bf : X →C defined at Eq. (11) is such that bf(x) = argmin c∈C T X t=1 nt X i=1 αit(x)ℓ(ct, yit), (α1t(x), . . . , αntt(x))⊤= (Kt + ntλtI)−1Ktx (13) for all x ∈X and t = 1, . . . , T, where Kt ∈Rnt×nt denotes the kernel matrix of the t-th task, namely (Kt)ij = k(xit, xjt), and Ktx ∈Rnt the vector with i-th component equal to k(x, xit). Prop. 3 provides an equivalent characterization for nonlinear MTL estimator at Eq. (11) that is more amenable to computations (it does not require explicit knowledge of H, ψ or V ) and generalizes the SELF approach (indeed for VVR, Eq. (13) reduces to the SELF estimator at Eq. (8)). Interestingly, the proposed strategy learns the score functions αim : X →R separately for each task and then combines them in the joint minimization over C. This can be interpreted as the estimator weighting predictions according to how “reliable” each task is on the input x ∈X. We make this intuition more clear in the following. Example 2 (Nonlinear MTL with Square Loss). Let ℓbe the square loss. Then, analogously to Example 1 we have that for any x ∈X, the multitask estimator at Eq. (13) is bf(x) = argmin c∈C T X t=1 at(x) ct −bt(x)/at(x) 2 (14) with at(x) = Pnt i=1 αit(x) and bt(x) = Pnt i=1 αit(x)yit, which corresponds to perform the projection bf(x) = Π A(x) C (w(x)) of the vector w(x) = (b1(x)/a1(x), . . . , bT (x)/aT (x)) according to the metric deformation induced by the matrix A(x) = diag(a1(x), . . . , aT (x)). This suggests to interpret at(x) as a measure of confidence of task t with respect to x ∈X. Indeed, tasks with small at(x) will affect less the weighted projection Π A(x) C . 5 3.3 Extensions: Violating C In practice, it is natural to expect the knowledge of the constraints set C to be not exact, for instance due to noise or modeling inaccuracies. To address this issue, we consider two extensions of nonlinear MTL that allow candidate predictors to slightly violate the constraints C and introduce a hyperparameter to control this effect. Robustness w.r.t. perturbations of C. We soften the effect of the constraint set by requiring candidate predictors to take value within a radius δ > 0 from C, namely f : X →Cδ with Cδ = { c + r | c ∈C, r ∈RT , ∥r∥≤δ }. (15) The scalar δ > 0 is now a hyperparameter ranging from 0 (C0 = C) to +∞(C∞= RT ). Penalizing w.r.t. the distance from C. We can penalize predictions depending on their distance from the set C by introducing a perturbed version ℓt µ : RT × RT →R of the loss ℓt µ(y, z) = ℓ(yt, zt) + ∥z −ΠC(z)∥2/µ for all y, z ∈RT (16) where ΠC : RT →C denotes the orthogonal projection onto C (see Example 1). Below we report the closed-from solution for nonlinear vector-valued regression with square loss. Example 3 (VVR and Violations of C). With the same notation as Example 1, let f0 : X →C denote the solution at Eq. (9) of nonlinear VVR with exact constraints, let r = b(x)/a(x)−f0(x) ∈RT . Then, the solutions to the problem with robust constraints Cδ and perturbed loss function Lµ = 1 T P t ℓt µ are respectively (see Appendix for the MTL) bfδ(x) = f0(x) + r min(1, δ/∥r∥) and bfµ(x) = f0(x) + r µ/(1 + µ). (17) 4 Generalization Properties of Nonlinear MTL We now study the statistical properties of the proposed nonlinear MTL estimator. Interestingly, this will allow to identify specific training regimes in which nonlinear MTL achieves learning rates significantly faster than those available when learning the tasks independently. Our analysis revolves around the assumption that the loss function used to measure prediction errors is SELF. To this end we observe that most multitask loss functions are indeed SELF. Proposition 4. Let ¯ℓ: [a, b] →R be differentiable almost everywhere with derivative Lipschitz continuous almost everywhere. Let ℓ: [a, b] × [a, b] →R be such that ℓ(y, y′) = ¯ℓ(y −y′) or ℓ(y, y′) = ¯ℓ(yy′) for all y, y′ ∈R. Then: (i) ℓis SELF and (ii) the separable function L : YT × YT →R such that L(y, y′) = 1 T PT t=1 ℓ(yt, y′ t) for all y, y′ ∈YT is SELF. Interestingly, most (mono-variate) loss functions used in multitask and supervised learning satisfy the assumptions of Prop. 4. Typical examples are the square loss (y −y′)2, hinge max(0, 1 −yy′) or logistic log(1 −exp(−yy′)): the corresponding derivative with respect to z = y −y′ or z = yy′ exists and it is Lipschitz almost everywhere on compact sets. The nonlinear MTL estimator introduced in Sec. 3.2 relies on the intuition that if for each x ∈X the kernel ridge regression solutions bgt(x) are close to the conditional expectations g∗ t (x), then also bf(x) will be close to f ∗(x). The following result formally characterizes the relation between the two problems, proving what is often referred to as a comparison inequality in the context of surrogate frameworks [31]. Throughout the rest of this section we assume ρt(x, y) = ρt(y|x)ρX (x) for each t = 1, . . . , T and denote ∥g∥L2 ρX the L2 ρX = L2(X, H, ρX ) norm of a function g : X →H according to the marginal distribution ρX . Theorem 5 (Comparison Inequality). With the same assumptions of Prop. 2, for t = 1, . . . , T let f ∗: X →C and g∗ t : X →H be defined as in Eq. (10), let bgt : X →H be measurable functions and let bf : X →C satisfy Eq. (11). Let V ∗be the adjoint of V . Then, E( bf) −E(f ∗) ≤qC,ℓ,T v u u t 1 T T X t=1 ∥bgt −g∗ t ∥2 Lρ2 X , qC,ℓ,T = 2 sup c∈C v u u t 1 T T X t=1 ∥V ∗ψ(ct)∥2 H. (18) 6 The comparison inequality at Eq. (18) is key to study the generalization properties of our nonlinear MTL estimator by showing that we can control its excess risk in terms of how well the bgt approximate the true g∗ t (see Appendix for a proof of Thm. 5). Theorem 6. Let C ⊆[a, b]T , let X be a compact set and k : X × X →R a continuous universal reproducing kernel (e.g. Gaussian). Let ℓ: [a, b] × [a, b] →R be a SELF. Let bfN : X →C denote the estimator at Eq. (13) with N = (n1, . . . , nT ) training points independently sampled from ρt for each task t = 1, . . . , T and λt = n−1/4 t . Let n0 = min1≤t≤T nt. Then, with probability 1 lim n0→+∞E( bfN) = inf f:X→C E(f). (19) The proof of Thm. 6 relies on the comparison inequality in Thm. 5, which links the excess risk of the MTL estimator to the square error between ˆgt and g∗ t . Standard results from kernel ridge regression allow to conclude the proof [32] (see a more detailed discussion in the Appendix). By imposing further standard assumptions, we can also obtain generalization bounds on ∥bgt −g∗ t ∥L2 that automatically apply to nonlinear MTL again via the comparison inequality, as shown below. Theorem 7. With the same assumptions and notation of Thm. 6 let bfN : X →C denote the estimator at Eq. (13) with λt = n−1/2 t and assume g∗ t ∈H ⊗G, for all t = 1, . . . , T. Then for any τ > 0 we have, with probability at least 1 −8e−τ, that E( bfN) − inf f:X→C E(f) ≤qC,ℓ,T hℓτ 2 n−1/4 0 log T, (20) where qC,ℓ,T is defined as in Eq. (18) and hℓis a constant independent of C, N, nt, λt, τ, T. The the excess risk bound in Thm. 7 is comparable to that in [21] (Thm. 5). To our knowledge this is the first result studying the generalization properties of a learning approach to MTL with constraints. 4.1 Benefits of Nonlinear MTL The rates in Thm. 7 strongly depend on the constraints C via the constant qC,ℓ,T . The following result studies two special cases that allow to appreciate this effect. Lemma 8. Let B ≥1, B = [−B, B]T , S ⊂RT be the sphere of radius B centered at the origin and let ℓbe the square loss. Then qB,ℓ,T ≤2 √ 5 B2 and qS,ℓ,T ≤2 √ 5 B2 T −1/2. To explain the effect of C on MTL, define n = PT t=1 nt and assume that n0 = nt = n/T. Lemma 8 together with Thm. 7 shows that when the tasks are assumed not to be related (i.e. C = B) the learning rate of nonlinear MTL is of eO(( T n )1/4), as if the tasks were learned independently. On the other hand, when the tasks have a relation (e.g. C = S, implying a quadratic relation between the tasks) nonlinear MTL achieves a learning rate of eO(( 1 nT )1/4), which improves as the number of tasks increases and as the total number of observed examples increases. Specifically, for T of the same order of n, we obtain a rate of eO(n−1/2) which is comparable to the optimal rates available for kernel ridge regression with only one task trained on the total number n of examples [32]. This observation corresponds to the intuition that if we have many related tasks with few training examples each, we can expect to achieve significantly better generalization by taking advantage of such relations rather than learning each task independently. 5 Connection to Previous Work: Linear MTL In this work we formulated the nonlinear MTL problem as that of learning a function f : X →C taking values in a set of constraints C ⊆RT implicitly identified by a set of equations γ(f(x)) = 0. An alternative approach would be to characterize the set C via an explicit parametrization θ : RQ →C, for Q ∈N, so that the multitask predictor can be decomposed as f = θ ◦h, with h : X →RQ. We can learn h : X →RQ using empirical risk minimization strategies such as Tikhonov regularization, minimize h=(h1,...,hQ)∈HQ 1 n n X i=1 L(θ ◦h(xi), yi) + λ Q X q=1 ∥hq∥2 H (21) 7 Figure 1: (Bottom) MSE (logaritmic scale) of MTL methods for learning constrained on a circumference (Left) or a Lemniscate (Right). Results are reported in a boxplot across 10 trials. (Top) Sample predictions of the three methods trained on 100 points and compared with the ground truth. since candidate h take value in RQ and therefore H can be a standard linear space of hypotheses. However, while Eq. (21) is interesting from the modeling standpoint, it also poses several problems: 1) θ can be nonlinear or even non-continuous, making Eq. (21) hard to solve in practice even for L convex; 2) θ is not uniquely identified by C and therefore different parametrizations may lead to very different bf = θ ◦bh, which is not always desirable; 3) There are few results on empirical risk minimization applied to generic loss functions L(θ(·), ·) (via so-called oracle inequalities, see [30] and references therein), and it is unclear what generalization properties to expect in this setting. A relevant exception to the issues above is the case where θ is linear. In this setting Eq. (21) becomes more amenable to both computations and statistical analysis and indeed most previous MTL literature has been focused on this setting, either by designing ad-hoc output metrics [33], linear output encodings [34] or regularizers [5]. Specifically, in this latter case the problem is cast as that of minimizing the functional minimize f=(f1,...,fT )∈HT n X i=1 L(f(xi), yi) + λ T X t,s=1 Ats⟨ft, fs⟩H (22) where the psd matrix A = (Ats)T s,t=1 encourages linear relations between the tasks. It can be shown that this problem is equivalent to Eq. (21) when the θ ∈RT ×Q is linear and A is set to the pseudoinverse of θθ⊤. As shown in [14], a variety of situations are recovered considering the approach above, such as the case where tasks are centered around a common average [9], clustered in groups [10] or sharing the same subset of features [3, 35]. Interestingly, the above framework can be further extended to estimate the structure matrix A directly from data, an idea initially proposed in [12] and further developed in [2, 14, 16]. 6 Experiments Synthetic Dataset. We considered a model of the form y = f ∗(x) + ϵ, with ϵ ∼N(0, σI) noise sampled according to a normal distribution and f ∗: X →C, where C ⊂R2 was either a circumference or a lemniscate (see Fig. 1) of equation γcirc(y) = y2 1 + y2 2 −1 = 0 and γlemn(y) = y4 1 −(y2 1 −y2 2) = 0 for y ∈R2. We set X = [−π, π] and f ∗ circ(x) = (cos(x), sin(x)) or f ∗ lemn(x) = (sin(x), sin(2x)) the parametric functions associated respectively to the circumference and Lemniscate. We sampled from 10 to 1000 points for training and 1000 for testing, with noise σ = 0.05. We trained and tested three regression models over 10 trials. We used a Gaussian kernel on the input and chose the corresponding bandwidth and the regularization parameter λ by hold-out crossvalidation on 30% of the training set (see details in the appendix). Fig. 1 (Bottom) reports the mean 8 Table 1: Explained variance of the robust (NL-MTL[R]) and perturbed (NL-MTL[P]) variants of nonlinear MTL, compared with linear MTL methods on the Sarcos dataset reported from [16]. STL MTL[36] CMTL[10] MTRL[11] MTFL[13] FMTL[16] NL-MTL[R] NL-MTL[P] Expl. 40.5 34.5 33.0 41.6 49.9 50.3 55.4 54.6 Var. (%) ±7.6 ±10.2 ±13.4 ±7.1 ±6.3 ±5.8 ±6.5 ±5.1 Table 2: Rank prediction error according to the weighted binary loss in [37, 21]. NL-MTL SELF[21] Linear [37] Hinge [38] Logistic [39] SVMStruct [20] STL MTRL[11] Rank 0.271 0.396 0.430 0.432 0.432 0.451 0.581 0.613 Loss ±0.004 ±0.003 ±0.004 ±0.008 ±0.012 ±0.008 0.003 ±0.005 square error (MSE) of our nonlinear MTL approach (NL-MTL) compared with the standard least squares single task learning (STL) baseline and the multitask relations learning (MTRL) from [11], which encourages tasks to be linearly dependent. However, for both circumference and Lemniscate, the tasks are strongly nonlinearly related. As a consequence our approach consistently outperforms its two competitors which assume only linear relations (or none at all). Fig. 1 (Top) provides a qualitative comparison on the three methods (when trained with 100 examples) during a single trial. Sarcos Dataset. We report experiments on the Sarcos dataset [22]. The goal is to predict the torque measured at each joint of a 7 degrees-of-freedom robotic arm, given the current state, velocities and accelerations measured at each joint (7 tasks/torques for 21-dimensional input). We used the 10 dataset splits available online for the dataset in [13], each containing 2000 examples per task with 15 examples used for training/validation while the rest is used to measure errors in terms of the explained variance, namely 1 - nMSE (as a percentage). To compare with results in [13] we used the linear kernel on the input. We refer to the Appending for details on model selection. Tab. 1 reports results from [13, 16] for a wide range of previous linear MTL methods [36, 10, 3, 11, 13, 16], together with our NL-MTL approach (both robust and perturbed versions). Since, we did not find Sarcos robot model parameters online, we approximated the constraint set C as a point cloud by collecting 1000 random output vectors that did not belong to training or test sets in [13] (we sampled them from the original dataset [22]). NL-MTL clearly outperforms the “linear” competitors. Note indeed that the torques measured at different joints of a robot are highly nonlinear (see for instance [23]) and therefore taking such structure into account can be beneficial to the learning process. Ranking by Pair-wise Comparison. We consider a ranking problem formulated withing the MTL setting: given D documents, we learn T = D(D −1)/2 functions fp,q : X →{−1, 0, 1}, for each pair of documents p, q = 1, . . . , D that predict whether one document is more relevant than the other for a given input query x. The problem can be formulated as multi-label MTL with 0-1 loss: for a given training query x only some labels yp,q ∈{−1, 0, 1} are available in output (with 1 corresponding to document p being more relevant than q, −1 the opposite and 0 that the two are equivalent). We have therefore T separate training sets, one for each task (i.e. pair of documents). Clearly, not all possible combinations of outputs f : X →{−1, 0, 1}T are allowed since predictions need to be consistent (e.g. if p ≻q (read “p more relevant than q”) and q ≻r, then we cannot have r ≻p). As shown in [37] these constraints are naturally encoded in a set DAG(D) in RT of all vectors G ∈RT that correspond to (the vectorized, upper triangular part of the adjacency matrix of) a Directed Acyclic Graph with D vertices. The problem can be cast in our nonlinear MTL framework with f : X →C = DAG(D) (see Appendix for details on how to perform the projection onto C). We performed experiments on Movielens100k [40] (movies = documents, users = queries) to compare our NL-MTL estimator with both standard MTL baselines as well as methods designed for ranking problems. We used the (linear) input kernel and the train, validation and test splits adopted in [21] to perform 10 independent trials with 5-fold cross-validation for model selection. Tab. 2 reports the average ranking error and standard deviation of the (weighed) 0-1 loss function considered in [37, 21] for the ranking methods proposed in [38, 39, 37], the SVMStruct estimator [20], the SELF estimator considered in [21] for ranking, the MTRL and STL baseline, corresponding to individual SVMs trained for each pairwise comparison. Results for previous methods are reported from [21]. NL-MTL outperforms all competitors, achieving better performance than the the original SELF estimator. For the sake of brevity we refer to the Appendix for more details on the experiments. Acknowledgments. This work was supported in part by EPSRC grant EP/P009069/1. 9 References [1] Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 2012. [2] Mauricio A. Álvarez, Neil Lawrence, and Lorenzo Rosasco. Kernels for vector-valued functions: a review. Foundations and Trends in Machine Learning, 4(3):195–266, 2012. [3] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Multi-task feature learning. Advances in neural information processing systems, 19:41, 2007. [4] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2010. [5] Charles A Micchelli and Massimiliano Pontil. Kernels for multi–task learning. In Advances in Neural Information Processing Systems, pages 921–928, 2004. [6] Christopher M Bishop. Machine learning and pattern recognition. Information Science and Statistics. Springer, Heidelberg, 2006. [7] Andreas Maurer and Massimiliano Pontil. Excess risk bounds for multitask learning with trace norm regularization. In Conference on Learning Theory (COLT), volume 30, pages 55–76, 2013. [8] Andreas Maurer, Massimiliano Pontil, and Bernardino Romera-Paredes. The benefit of multitask representation learning. Journal of Machine Learning Research, 17(81):1–32, 2016. [9] Theodoros Evgeniou, Charles A. Micchelli, and Massimiliano Pontil. Learning multiple tasks with kernel methods. In Journal of Machine Learning Research, pages 615–637, 2005. [10] Laurent Jacob, Francis Bach, and Jean-Philippe Vert. Clustered multi-task learning: a convex formulation. Advances in Neural Information Processing Systems, 2008. [11] Yu Zhang and Dit-Yan Yeung. A convex formulation for learning task relationships in multi-task learning. In Conference on Uncertainty in Artificial Intelligence (UAI), 2010. [12] Francesco Dinuzzo, Cheng S. Ong, Peter V. Gehler, and Gianluigi Pillonetto. Learning output kernels with block coordinate descent. International Conference on Machine Learning, 2011. [13] Pratik Jawanpuria and J Saketha Nath. A convex feature learning formulation for latent task structure discovery. International Conference on Machine Learning, 2012. [14] Carlo Ciliberto, Youssef Mroueh, Tomaso A Poggio, and Lorenzo Rosasco. Convex learning of multiple tasks and their structure. In International Conference on Machine Learning (ICML), 2015. [15] Carlo Ciliberto, Lorenzo Rosasco, and Silvia Villa. Learning multiple visual tasks while discovering their structure. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 131–139, 2015. [16] Pratik Jawanpuria, Maksim Lapin, Matthias Hein, and Bernt Schiele. Efficient output kernel learning for multiple tasks. In Advances in Neural Information Processing Systems, pages 1189–1197, 2015. [17] Florian Steinke and Matthias Hein. Non-parametric regression between manifolds. In Advances in Neural Information Processing Systems, pages 1561–1568, 2009. [18] Arvind Agarwal, Samuel Gerber, and Hal Daume. Learning multiple tasks using manifold regularization. In Advances in neural information processing systems, pages 46–54, 2010. [19] Thomas Hofmann Bernhard Schölkopf Alexander J. Smola Ben Taskar Bakir, Gökhan and S.V.N Vishwanathan. Predicting structured data. MIT press, 2007. [20] Ioannis Tsochantaridis, Thorsten Joachims, Thomas Hofmann, and Yasemin Altun. Large margin methods for structured and interdependent output variables. In Journal of Machine Learning Research, 2005. [21] Carlo Ciliberto, Lorenzo Rosasco, and Alessandro Rudi. A consistent regularization approach for structured prediction. Advances in Neural Information Processing Systems 29 (NIPS), pages 4412–4420, 2016. [22] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian processes for machine learning. The MIT Press, 2006. [23] Lorenzo Sciavicco and Bruno Siciliano. Modeling and control of robot manipulators, volume 8. McGrawHill New York, 1996. [24] Sebastian Nowozin, Christoph H Lampert, et al. Structured learning and prediction in computer vision. Foundations and Trends in Computer Graphics and Vision, 2011. [25] Bernhard Schölkopf and Alexander J Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2002. [26] Thomas H Cormen. Introduction to algorithms. MIT press, 2009. [27] Suvrit Sra and Reshad Hosseini. Geometric optimization in machine learning. In Algorithmic Advances in Riemannian Geometry and Applications, pages 73–91. Springer, 2016. 10 [28] Hongyi Zhang, Sashank J. Reddi, and Suvrit Sra. Riemannian svrg: Fast stochastic optimization on riemannian manifolds. In Advances in Neural Information Processing Systems 29. 2016. [29] Florian Steinke, Matthias Hein, and Bernhard Schölkopf. Nonparametric regression between general riemannian manifolds. SIAM Journal on Imaging Sciences, 3(3):527–563, 2010. [30] Ingo Steinwart and Andreas Christmann. Support Vector Machines. Information Science and Statistics. Springer New York, 2008. [31] 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. [32] Andrea Caponnetto and Ernesto De Vito. Optimal rates for the regularized least-squares algorithm. Foundations of Computational Mathematics, 7(3):331–368, 2007. [33] Vikas Sindhwani, Aurelie C. Lozano, and Ha Quang Minh. Scalable matrix-valued kernel learning and high-dimensional nonlinear causal inference. CoRR, abs/1210.4792, 2012. [34] Rob Fergus, Hector Bernal, Yair Weiss, and Antonio Torralba. Semantic label sharing for learning with many categories. European Conference on Computer Vision, 2010. [35] Guillaume Obozinski, Ben Taskar, and Michael I Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Statistics and Computing, 20(2):231–252, 2010. [36] Theodoros Evgeniou and Massimiliano Pontil. Regularized multi–task learning. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2004. [37] John C Duchi, Lester W Mackey, and Michael I Jordan. On the consistency of ranking algorithms. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 327–334, 2010. [38] Ralf Herbrich, Thore Graepel, and Klaus Obermayer. Large margin rank boundaries for ordinal regression. Advances in neural information processing systems, pages 115–132, 1999. [39] Ofer Dekel, Yoram Singer, and Christopher D Manning. Log-linear models for label ranking. In Advances in neural information processing systems, page None, 2004. [40] F Maxwell Harper and Joseph A Konstan. The movielens datasets: History and context. ACM Transactions on Interactive Intelligent Systems (TiiS), 5(4):19, 2015. 11 | 2017 | 468 |
6,972 | Deep Recurrent Neural Network-Based Identification of Precursor microRNAs Seunghyun Park Electrical and Computer Engineering Seoul National University Seoul 08826, Korea School of Electrical Engineering Korea University Seoul 02841, Korea Seonwoo Min Electrical and Computer Engineering Seoul National University Seoul 08826, Korea Hyun-Soo Choi Electrical and Computer Engineering Seoul National University Seoul 08826, Korea Sungroh Yoon∗ Electrical and Computer Engineering Seoul National University Seoul 08826, Korea sryoon@snu.ac.kr Abstract MicroRNAs (miRNAs) are small non-coding ribonucleic acids (RNAs) which play key roles in post-transcriptional gene regulation. Direct identification of mature miRNAs is infeasible due to their short lengths, and researchers instead aim at identifying precursor miRNAs (pre-miRNAs). Many of the known pre-miRNAs have distinctive stem-loop secondary structure, and structure-based filtering is usually the first step to predict the possibility of a given sequence being a pre-miRNA. To identify new pre-miRNAs that often have non-canonical structure, however, we need to consider additional features other than structure. To obtain such additional characteristics, existing computational methods rely on manual feature extraction, which inevitably limits the efficiency, robustness, and generalization of computational identification. To address the limitations of existing approaches, we propose a pre-miRNA identification method that incorporates (1) a deep recurrent neural network (RNN) for automated feature learning and classification, (2) multimodal architecture for seamless integration of prior knowledge (secondary structure), (3) an attention mechanism for improving long-term dependence modeling, and (4) an RNN-based class activation mapping for highlighting the learned representations that can contrast pre-miRNAs and non-pre-miRNAs. In our experiments with recent benchmarks, the proposed approach outperformed the compared state-of-the-art alternatives in terms of various performance metrics. 1 Introduction MicroRNAs (miRNAs) play crucial roles in post-transcriptional gene regulation by binding to the 3′ untranslated region of target messenger RNAs [16]. Among the research problems related to miRNA, computational identification of miRNAs has been one of the most significant. The biogenesis of a miRNA consists of the primary miRNA stage, the precursor miRNA (pre-miRNA) stage, and the mature miRNA stage [17]. Mature miRNAs are usually short, having only 20–23 base pairs (bp), and it is difficult to identify them directly. Most computational approaches focus on detecting ∗To whom correspondence should be addressed. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. pre-miRNAs since they are usually more identifiable because they are longer (approximately 80bp) and have a distinctive stem-loop secondary structure. In terms of the machine learning (ML), pre-miRNA identification can be viewed as a binary classification problem in which a given sequence must be classified as either a pre-miRNA or a non-pre-miRNA. A variety of computational approaches for miRNA identification have been proposed, and we can broadly classify them [18] into rule-based such as MIReNA [1], and ML-based approaches, which can be categorized into three groups in terms of the classification algorithm used: (1) MiPred [12], microPred [2], triplet-SVM [3], iMiRNA-SSF [38], miRNApre [39], and miRBoost [4] use support vector machines; (2) MiRANN [1] and DP-miRNA [37] use neural networks; and (3) (CSHMM) [5], which use a context-sensitive hidden Markov model. Known pre-miRNAs have distinctive structural characteristics, and therefore most computational methods make first-order decisions based on the secondary structure of the input RNA sequence. However, the identification of new pre-miRNAs with non-canonical structure and subtle properties, and maybe both, it requires the consideration of features other than secondary structure. Some authors [19] have even argued that the performance of ML-based tools are more dependent on the set of input features than the ML algorithms that are used. The discovery of new features which are effective in pre-miRNA identification currently involves either searching for hand-crafted features (such as the frequency of nucleotide triplets in the loop, global and intrinsic folding attributes, stem length, and minimum free energy) or combining existing features. One recent study utilized 187 such features [4], another 48 features [2], most of which were manually prepared. Manual feature extraction requires ingenuity and inevitably limits the efficiency, robustness, and generalization of the resulting identification scheme developed. Furthermore, neural network-based methods above only use neural networks for classification of hand-designed features, and not for feature learning. Similar challenges exist in other disciplines. Recently, end-to-end deep learning approaches have been successfully applied to tasks such as speech and image recognition, largely eliminating the manual construction of feature engineerings. Motivated by these successes, we propose a deep neural network-based pre-miRNA identification method which we call deepMiRGene to address the limitations of existing approaches. It incorporates the following key components: 1. A deep recurrent neural network (RNN) with long short-term memory (LSTM) units for RNA sequence modeling, automated feature learning, and robust classification based on the learned representations. 2. A multimodal architecture for seamless integration of prior knowledge (such as the importance of RNA secondary structure in pre-miRNA identification) with automatically learned features. 3. An attention mechanism for effective modeling of the long-term dependence of the primary structure (i.e., sequence) and the secondary structure of RNA molecules. 4. An RNN-based class activation mapping (CAM) to highlight the learned representations in the way that contrasts pre-miRNAs and non-pre-miRNAs to obtain biological insight. We found that simply combining existing deep learning modules did not deliver satisfactory performance in our task. Thus our contribution can be seen as inventing a novel pipeline and with components optimized for handling RNA sequences and structures to predict (possibly subtle) premiRNA signals, rather than just assembling pre-packaged components. Our research for an optimal set of RNN architectures and hyperparameters for pre-miRNA identification involved an exploration of the design space spanned by the components of our methodology. The result of this research is a technique with demonstrable advantages over other state-of-the-art alternatives in terms of both cross-validation results but also the generalization ability (i.e., performance on test data). The source code for the proposed method is available at https://github.com/eleventh83/deepMiRGene. 2 Related Work 2.1 The Secondary Structure of a Pre-miRNA The secondary structure of an RNA transcript represents the base-pairing interactions within that transcript. The usual secondary structure of a pre-miRNA is shown in Fig. 1, which shows that a pre-miRNA is a base-paired double helix rather than a single strand, and this pairing is one 2 ACGUGCCACGAUUCAACGUGGCACAG sequence ..((((((((......)))))))).. secondary structure . . . . . . . . . . folding 5’ 3’ 5’ 3’ 5’ 3’ A C C C U G G G C A G G A C C C G U A U U C A A A G ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) A B Figure 1: (A) sequence of a pre-miRNA, and (B) the secondary structure of the given sequence. The dot-bracket notation in (A) describes RNA secondary structures. Unpaired nucleotides are represented as “.”s and base-paired nucleotides are represented as “(”s and “)”s. LSTM Layer Input Sequences Output Onehot Encoding (#sample, lseq) Fully Connected Layer Preprocessing Neural Network Layers True/False (#sample, lseq, 16) Folding Dropout (0.1) Dropout (0.1) (#sample, lseqx10) Secondary Structures (#sample, 2) Fully Connected Layer Fully Connected Layer (lseqx10)x400 400x100 100x2 Dropout (0.1) Dropout (0.1) Dropout (0.1) LLSTM 2 LFC 1 LFC 2 LFC 3 States Merging AƩenƟon (SoŌmax) LSTM Layer LLSTM 1 (#sample, lseq,20) Dropout (0.1) SoŌmax Figure 2: Overview of our method: #sample is the number of input sequences and lseq is the maximum length of the input sequence. The dimension of intermediate data is labeled (#sample, lseq, 16). of the most prominent features for pre-miRNA identification [12, 2]. The secondary structure of a given sequence can be predicted by tools such as RNAfold [5], which is widely used. It constructs a thermodynamically stable secondary structure from a given RNA sequence by calculating the minimum free energy and the probable base-pairings [20]. However, reliable pre-miRNA identification requires features other than the secondary structure to be considered, since false positives may be generated due to the limitations of structure prediction algorithms and the inherent unpredictability of these structures [21]. 2.2 Deep Recurrent Neural Networks RNNs are frequently used for sequential modeling and learning. RNNs process one element of input data at a time and implicitly store past information using cyclic connections of hidden units [8]. However, early RNNs often had difficulty in learning long-term dependencies because of the vanishing or exploding gradient problem [9]. Recent deep RNNs incorporate mechanisms to address this problem. Explicit memory units, such as LSTM units [10] or GRUs [3], are one such mechanism. An LSTM unit, for works as a sophisticated hidden unit that uses multiplicative gates to learn when to input, output, and forget in addition to cyclic connections to store the state vector. A more recent innovation [2] is the attention mechanism. This can take various forms, but in our system, a weighted combination of the output vectors at each point in time replaces the single final output vector of a standard RNN. An attention mechanism of this sort helps learn long-term dependencies and also facilitates the interpretation of results, e.g., by showing how closely the output at a specific time point is related to the final output [30, 29, 2]. 3 Methodology Fig. 2 shows the proposed methodology of our system. The input consists of either a set of premiRNA sequences (in the training phase) or a test sequence (in the testing phase). The output for each input sequence is a two-dimensional (softmax) vector which indicates whether the input sequence encodes pre-miRNA or not. In a preprocessing phase, we derive the secondary structure of the input sequence and then encode the sequence and its structure together into a 16-dimensional binary vector. Encoded vectors are then processed by the RNN architecture, consisting of LSTM layers and fully connected (FC) layers, and the attention mechanism. The pseudocode of our approach is available as Appendix A, in the supplementary material. 3 3.1 Preprocessing Preprocessing a set of input pre-miRNA sequences involves two tasks. First, RNAfold is used to obtain the secondary structure of each sequence; we already noted the importance of this data. We clarify that each position in an RNA sequence as one of {A, C, G, U}, and the corresponding location in the secondary structure as one of {(, ), ., :}. This dot-bracket notation is shown in Fig. 1. The symbol “:” represents a position inside a loop (unpaired nucleotides surrounded by a stem). Let xs and xt denote an input sequence and its secondary structure, respectively. Then, xs ∈{A, C, G, U}|xs| and xt ∈{(, ), ., :}|xt|. Note that |xs| = |xt|. Next, each input sequence xs is combined with its secondary structure xt into a numerical representation. This is a simple one-hot encoding [4], which gave better results in our experiments than a soft encoding (see Section 4). Our encoding scheme uses a 16-dimensional one-hot vector, in which position i (i = 0, 1, . . . , 15) is interpreted as follows: if ⌊i/4⌋= 0 then A 1 then G 2 then C 3 then U and if i%4 = 0 then ( 1 then ) 2 then . 3 then : The “%” symbol denotes the modulus operator. After preprocessing, the sequence xs and the structure xt are together represented by the matrix Xs ∈{0, 1}|xs|×16, each row of which is the 16-dimensional one-hot vector described above. For instance, xs = AUG and xt = (:) are represented by the following 3 × 16 binary matrix: Xs = A z }| { 1 0 0 0 C z }| { 0 0 0 0 G z }| { 0 0 0 0 U z }| { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 | {z } ().: 0 0 0 0 0 1 0 0 0 0 0 0 . 3.2 Neural Network Architecture The main features of our neural network is the attention mechanism provided by the LTSM and FC layers. 1) LSTM layers: The purpose of these layers is sequential modeling of the primary and secondary structure of the input pre-miRNA transcripts. We use two stacked LSTM layers denoted by LLSTM 1 and LLSTM 2 respectively. LLSTM 1 takes the matrix Xs produced in the preprocessing stage and returns a weight matrix H1, as follows: H1 = LLSTM 1 (Xs) ∈R|xs|×d1, (1) where d1 is the number of LSTM units in the first layer. Similarly, the second layer first returns a second weight matrix H2: H2 = LLSTM 2 (H1) ∈R|xs|×d2, (2) where d2 is the number of LSTM units in the second layer. We apply an attention mechanism to the output of LLSTM 2 with the aim of learning the importance of each position of xs. The neural networks first learn an attention weight for each output of the second LSTM layer for each sequence position in a training process. These weights are collectively represented by a matrix Ω∈Rd2×|xs|. An attention weight matrix Ωatt ∈R|xs|×|xs| is then constructed as follows: Ωatt = H2Ω. (3) This yields the attention weight vector ωatt ωatt = softmax(diag(Ωatt)) ∈R|xs|, (4) 4 where the ith element of ωatt corresponds to the attention weight for the ith position of xs. Then, Hatt ∈R|xs|×d2, the attention-weighted representation of H2, can be expressed as follows: Hatt = H2 ⊙(ωatt ⊗ud2), (5) where ud2 is the d2-dimensional unit vector, and ⊙and ⊗respectively denote the element-wise multiplication and outer product operators. Finally, we reshape the matrix Hatt by flattening it into a (d2 · |xs|)-dimensional vector ˜hatt for the sake of compatibility with third-party software. We use the standard nonlinearities (i.e., hyperbolic tangent and logistic sigmoid) inside each LSTM cell. 2) Fully connected layers: The neural network collects the outputs from the last LSTM layer and makes a final decision using three FC layers. We denote the operations performed by these three layers by LFC 1 , LFC 2 , and LFC 3 , which allows us to represent the outputs of the three FC layers as f1 = LFC 1 ˜hatt , f2 = LFC 2 (f1), and ˆy = LFC 3 (f2), where f1 ∈Rd3 and f2 ∈Rd4 are intermediate vectors, and ˆy ∈R2 denotes the final softmax output; d3 and d4 are the numbers of hidden nodes in the last two FC layers. The first two FC layers use logistic sigmoids as theirs activation functions, while the last FC layer uses the softmax function. 3.3 Training We based our training objective on binary cross-entropy (also known as logloss). As will be explained in Section 4 (see Table 1), we encountered a class-imbalance problem in this study, since there exist significantly more negative training examples (non-pre-miRNA sequences) than positives (known pre-miRNA sequences). We addressed this issue by augmenting the logloss training objective with balanced class weights [31], so that the training error E is expressed as follows: E = −1 b X i c−yi log(ˆyi) + c+(1 −yi) log(1 −ˆyi) where b is the mini-batch size (we used b = 128), and yi ∈{0, 1} is the class label provided in training data (yi = 0 for pre-miRNA; yi = 1 for non-pre-miRNA); c−and c+ represent the balanced class weights given by ck = N 2 · nk , k ∈{−, +} (6) where N is the total number of training examples and nk is the number of examples in either the positive or the negative class. We minimized E using the Adam [6] gradient descent method, which uses learning rates which adapt to the first and second moments of the gradients of each parameter. We tried other optimization methods (e.g., the stochastic gradient descent [27] and RMSprop [28]), but they did not give better results. We used dropout regularization with an empirical setup. In the LSTM layers, a dropout parameter for input gates and another for recurrent connection were both set to 0.1. In the FC layers, we set the dropout parameter to 0.1. We tried batch normalization [22], but did not find it effective. All the weights were randomly initialized in the range of [−0.05, 0.05]. The number of hidden nodes in the LSTM (d1, d2) and the FC (d3, d4) layers were determined by cross validation as d1 = 20, d2 = 10, d3 = 400, and d4 = 100. The mini-batch size and training epochs were set to 128 and 300 respectively. 4 Experimental Results We used three public benchmark datasets [4] named human, cross-species, and new. The positive pre-miRNA sequences in all three datasets were obtained from miRBase [25] (release 18). For the negative training sets, we obtained noncoding RNAs other than pre-miRNAs and exonic regions of protein-coding genes from NCBI (http://www.ncbi.nlm.nih.gov), fRNAdb [23], NONCODE [24], and 5 Table 1: Numbers of sequences in the three benchmark datasets [4] used in this study. The median length of each dataset is given in brackets. Type \ Dataset name Human Cross-species New Positive examples 863 (85) 1677 (93) 690 (71) Negative examples 7422 (92) 8266 (96) 8246 (96) Table 2: Performance evaluation of different pre-miRNA identification methods with cross-validation (CV) and test data using sensitivity (SE), specificity (SP), positive predictive value (PPV), F-score, geometric mean (g-mean), area under the receiver operating characteristic curve (AUROC), and area under the precision-recall curve (AUPR). Human Cross-species Methods SE1 SP2 PPV3 F-score4 g-mean5 AUROC AUPR SE SP PPV F-score g-mean AUROC AUPR miRBoost (CV) 0.803 0.988 0.887 0.843 0.891 0.861 0.977 0.884 0.872 0.917 CSHMM (CV) 0.713 0.777 0.559 0.570 0.673 0.826 0.576 0.533 0.564 0.524 triplet-SVM (CV) 0.669 0.986 0.851 0.749 0.812 0.957 0.854 0.735 0.967 0.819 0.775 0.843 0.943 0.869 microPred (CV) 0.763 0.989 0.888 0.820 0.869 0.974 0.890 0.825 0.975 0.875 0.848 0.897 0.970 0.873 MIReNA (CV) 0.818 0.943 0.624 0.708 0.878 0.766 0.952 0.765 0.765 0.854 Proposed (CV) 0.799 0.988 0.885 0.839 0.888 0.984 0.915 0.886 0.982 0.911 0.898 0.933 0.985 0.927 miRBoost (test) 0.884 0.969 0.768 0.822 0.925 0.856 0.844 0.526 0.651 0.850 CSHMM (test) 0.616 0.978 0.768 0.684 0.777 0.749 0.960 0.791 0.769 0.848 triplet-SVM (test) 0.744 0.992 0.914 0.821 0.859 0.947 0.830 0.760 0.977 0.870 0.812 0.862 0.952 0.908 microPred (test) 0.779 0.988 0.882 0.827 0.877 0.980 0.892 0.814 0.985 0.919 0.863 0.896 0.963 0.906 MIReNA (test) 0.826 0.941 0.617 0.706 0.881 0.796 0.950 0.764 0.780 0.870 Proposed (test) 0.822 0.992 0.919 0.868 0.903 0.981 0.918 0.900 0.983 0.913 0.906 0.940 0.984 0.955 TP: P true positive, TN: P true negative, FP: P false positive, FN: P false negative. 1 SE = TP/(TP + FN) 2 SP = TN/(TN + FP) 3 PPV (precision) = TP/(TP + FP) 4 F-score = 2TP/(2TP + FP + FN) 5 g-mean = √ SE · SP snoRNA-LBME-db [26]. Note that we only acquired those datasets that had undergone redundancy removal and had annotation corrected by the data owners. As shown in Table 1, the human dataset contains 863 human pre-miRNA sequences (positive examples) and 7422 non-pre-miRNA sequences (negative examples). The cross-species dataset contains 1677 pre-miRNA sequences collected from various species (e.g., human, mouse, and fly), and 8266 non-miRNA sequences. The new dataset has 690 newly discovered pre-miRNA sequences, which are in miRBase releases 19 and 20, with 8246 non-pre-miRNA sequences. For the human and cross-species datasets, 10% of the data was randomly chosen as a clean test dataset (also known as a publication dataset) and was never used in training. Using the remaining 90% of each dataset, we carried out five-fold cross-validation for training and model selection. Note that the new dataset was used for testing purposes only, as described in Tran et al. [4]. Additional details of the experimental settings used can be found in Appendix B. 4.1 Validation and Test Performance Evaluation We used seven evaluation metrics: sensitivity (SE), specificity (SP), positive predictive value (PPV), Fscore, the geometric mean of SE and SP (g-mean), the area under the receiver operating characteristic curve (AUROC), and the area under the precision-recall curve (AUPR). Higher sensitivity indicates a more accurate pre-miRNAs predictor which is likely to assist the discovery of novel pre-miRNAs. Higher specificity indicates more effective filtering of pseudo pre-miRNAs, which increases the efficiency of biological experiments. Because they take account of results with different decision thresholds, AUROC and AUPR typically deliver more information than the more basic metrics such as sensitivity, specificity, and PPV, which are computed with a single decision threshold. Note that miRBoost, MIReNA, and CSHMM do not provide decision values, and so the AUROC and AUPR metrics cannot be obtained from these methods. The results of a cross-validation performance comparison are shown in the upper half of Table 2, while the results of the test performance comparison are shown in the bottom half. For the human dataset, the cross-validation performance of our method was comparable to that of others, but our method achieved the highest test performance in terms of F-score, AUROC, and AUPRG. For the cross-species dataset, our method achieved the best overall performance in terms of both crossvalidation and test evaluation results. Some tools, such as miRBoost, showed fair performance in 6 Table 3: Evaluation of performance on the new dataset. Methods SE SP PPV F-score g-mean AUROC AUPR miRBoost 0.921 0.936 0.609 0.733 0.928 CSHMM 0.536 0.069 0.046 0.085 0.192 triplet-SVM 0.721 0.981 0.759 0.740 0.841 0.934 0.766 microPred 0.728 0.970 0.672 0.699 0.840 0.940 0.756 MIReNA 0.450 0.941 0.392 0.419 0.650 Proposed method 0.917 0.964 0.682 0.782 0.941 0.981 0.808 SE SP F-score g-mean 0.5 0.6 0.7 0.8 0.9 1 0.537 0.987 0.649 0.727 0.783 0.978 0.795 0.875 0.799 0.988 0.839 0.888 Sequence only Structure only Multimodal Figure 3: Using both sequence and structure information gives the best performance on the human dataset. Each bar shows the metrics of average cross-validation results. terms of the cross-validation but failed to deliver the same level of performance on the test data. These results suggest that our approach provides better generalization than the alternatives. The similarity of the performance in terms of the cross-validation and test results suggests that overfitting was handled effectively. Following the experimental setup used by Tran et al. [4], we also evaluated the proposed method on the new dataset, with a model trained by the cross-species dataset, as shown in Table 3, to assess the potential of our approach in the search for novel pre-miRNAs. Again, our method did not show the best performance in terms of basic metrics such as sensitivity and specificity, but it returned the best values of AUROC and AUPR. The results show that the proposed method can be used effectively to identify novel pre-miRNAs as well as to filter out pseudo pre-miRNAs. To evaluate the statistical significance of our approach, we applied a Kolmogorov-Smirnov test [40] to the classifications produced by our method, grouped by true data labels. For the human, cross-species, and new datasets, the p-values we obtained were 5.23 × 10−54, 6.06 × 10−102, and 7.92 × 10−49 respectively, indicating that the chance of these results occurring at random is very small indeed. 4.2 Effectiveness of Multimodal Learning Our approach to the identification of pre-miRNAs takes both biological sequence information and secondary structure information into account. To assess the benefit of this multimodality, we measured the performance of our method using only sequences or secondary structures in training on the human dataset. As shown in Fig. 3, all of the performance metrics were higher when both sequence and structure information were used together. Compared with the use of sequence or structure alone, the sensitivity of the multimodal approach was increased by 48% point and 2% point, respectively. For specificity, the cases using both sequence and structure achieved higher performance values (0.988) than those of the sequence only (0.987) and structure only (0.978) cases. Similarly, in terms of F-score, using the multimodality gave 29% point and 5% point higher scores (0.839) than using sequence only (0.649) or structure only (0.795), respectively. 4.3 Gaining Insights by Analyzing Attention Weights A key strength of our approach is its ability to learn the features useful for pre-miRNA identification from data. This improves efficiency, and also has the potential to aid the discovery of subtle features that might be missed in manual feature design. However, learned features, which are implicitly represented by the trained weights of a deep model, come without intuitive significance. To address this issue, we experimented with the visualization of attention weights using the class activation mapping [32], a technique that was originally proposed to interpret the operation of 7 negative predicted examples positive predicted examples A B C Stem-loop U G G G A A A C A U A C U U C U U U A U A U G C C C A U A U G G A C C U G C U A A G C U A U G G A A U G U A A A G A A G U A U G U A U C U C A 10 20 30 40 50 60 70 5’ 3’ sequence position (%) sequence position (%) UGGGAAACAUACUUCUUUAUAUGCCCAUAUGGACCUGCUAAGCUAUGGAAUGUAAAGAAGUAUGUAUCUCA Homo sapiens miR-1-1 5’ stem mature miRNA 5’ 3’ Figure 4: Attention weighted RNN outputs with the human dataset. (A) Class activation mapping for predicted examples (negatives: non-pre-miRNAs). (B) Class activation mapping for predicted examples (positives: pre-miRNAs). (C) Stem-loop structure of a pre-miRNA (homo sapiens miR-1-1). Table 4: Performance of different types of neural network, assessed in terms of five-fold cross-validation results from the human dataset. The number of stacked layers is shown in brackets. ATT means that an attention mechanism was included, and a BiLSTM is a bi-directional LSTM. The configuration that we finally adopted is shown in row 6. No. Type SE SP F-score g-mean 1 1D-CNN(2) 0.745 0.978 0.771 0.853 2 1D-CNN(2)+LSTM(2) 0.707 0.976 0.738 0.830 3 1D-CNN(2)+LSTM(2)+ ATT 0.691 0.979 0.739 0.822 4 LSTM(2) 0.666 0.988 0.751 0.810 5 LSTM(1) + ATT 0.781 0.987 0.824 0.878 6 LSTM(2) + ATT (proposed) 0.799 0.988 0.839 0.888 7 BiLSTM(1) + ATT 0.783 0.987 0.827 0.879 8 BiLSTM(2) + ATT 0.795 0.987 0.834 0.886 convolutional neural networks (CNNs) in image classification by highlighting discriminative regions. We modified the class activation mapping of RNNs to discover which part of the sequential output is significant for identifying pre-miRNAs. We performed one-dimensional global average pooling (GAP) on the attention weighted output Hatt (see Section 3.2) to derive a d2-dimensional weight vector ωgap. We then multiplied Hatt by ωgap to obtain a class activation map of size |xs| for each sequence sample. Fig. 4 (A) and Fig. 4 (B) show the resulting heatmap representations of class activation mapping on the human dataset for positive and negative predicted examples, respectively. Since sequences can have different lengths, we normalized the sequence lengths to 1 and presented individual positions in a sequence between 0% and 100% in the x-axis. By comparing the plots in Fig. 4 (A) and (B), we can see that class activation maps of the positive and negative data show clear differences, especially at the 10–50% sequence positions, within the red box in Fig. 4 (B). This region corresponds to the 5′ stem region of typical pre-miRNAs, as shown in Fig. 4 (C). This region coincides with the location of a mature miRNA encoded within a pre-miRNA, suggesting that the data-driven features learned by our approach have revealed relevant characteristics of pre-miRNAs. The presence of some nucleotide patterns has recently been reported in the mature miRNA region inside a pre-miRNA [33]. We anticipate that further interpretation of our data-driven features may assist in confirming such patterns, and also in discovering novel motifs in pre-miRNAs. 4.4 Additional Experiments 1) Architecture exploration: We explored various alternative network architectures, as listed in Table 4, which shows the performance of different network architectures, annotated with the number of layers and any of attention mechanism. Rows 1–3 of the table, show results for CNNs with and without LSTM networks. Rows 4–6 show the results of LSTM networks. Rows 7–8, show results for bi-directional LSTM (BiLSTM) networks. More details can be found in Appendix C.1. 2) Additional results: Appendix C.2–4 presents more details of hyperparameter tuning, the design decisions made between the uses of soft and hard encoding, and running-time comparisons. 8 5 Discussion Given the importance of the secondary structure in pre-miRNA identification (e.g., see Section 4.2), we derived the secondary structure of each input sequence using RNAfold. We then combined the secondary structure information with the primary structure (i.e. the sequence), and sent the result to the RNN. However, a fully end-to-end approach to pre-miRNA identification we would need to learn even the secondary structure from the input sequences. Due to the limited numbers of known pre-miRNA sequences, this remains as challenging future work. Our experimental results supported the effectiveness of a multi-modal approach that considers sequences and structures together from an early stage of the pipeline. Incorporating other types of information would be possible and might improve performance further. For example, sequencing results from RNA-seq experiments reflect the expression levels and the positions of each sequenced RNA [34]; and conservation information would allow a phylogenetic perspective [35]. Such additional information could be integrated into the current framework by representing it as new network branches and merging them with the current data before the FC layers. Our proposed method has the clear advantage over existing approaches that it does not require hand-crafted features. But we need to ensure that learned feature provide satisfactory performance, and they also need to have some biological meaning. Biomedical researchers naturally hesitate to use a black-box methodology. Our method of visualizing attention weights provides a tool for opening that black-box, and assist data-driven discovery. Acknowledgments This work was supported in part by the Samsung Research Funding Center of the Samsung Electronics [No. SRFC-IT1601-05], the Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIT) [No. 2016-0-00087], the Future Flagship Program funded by the Ministry of Trade, Industry & Energy (MOTIE, Korea) [No. 10053249], the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science, ICT & Future Planning [No. 2016M3A7B4911115], and Brain Korea 21 Plus Project in 2017. References [1] M. E. Rahman, et al. MiRANN: A reliable approach for improved classification of precursor microRNA using Artificial Neural Network model. Genomics, 99(4):189–194, 2012. [2] K. Xu, et al. Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. In ICML, volume 14, pages 77–81, 2015. [3] J. Chung, et al. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. [4] P. Baldi and S. Brunak. Chapter 6. Neural Networks: applications. In Bioinformatics: The Machine Learning Approach. MIT press, 2001. [5] I. L. Hofacker. Vienna RNA secondary structure server. Nucleic acids research, 31(13):3429–3431, 2003. [6] D. P. Kingma and J. Ba. Adam: A Method for Stochastic Optimization. CoRR, abs/1412.6980, 2014. [7] V. D. T. Tran, et al. miRBoost: boosting support vector machines for microRNA precursor classification. RNA, 21(5):775–785, 2015. [8] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [9] Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994. [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [11] R. Batuwita and V. Palade. microPred: effective classification of pre-miRNAs for human miRNA gene prediction. Bioinformatics, 25(8):989–995, 2009. [12] P. Jiang, et al. MiPred: classification of real and pseudo microRNA precursors using random forest prediction model with combined features. Nucleic acids research, 35(suppl 2):W339–W344, 2007. [13] S. Agarwal, et al. Prediction of novel precursor miRNAs using a context-sensitive hidden Markov model (CSHMM). BMC bioinformatics, 11(Suppl 1):S29, 2010. 9 [14] A. Mathelier and A. Carbone. MIReNA: finding microRNAs with high accuracy and no learning at genome scale and from deep sequencing data. Bioinformatics, 26(18):2226–2234, 2010. [15] C. Xue, et al. Classification of real and pseudo microRNA precursors using local structure-sequence features and support vector machine. BMC bioinformatics, 6(1):310, 2005. [16] R. C. Lee, R. L. Feinbaum, and V. Ambros. The C. elegans heterochronic gene lin-4 encodes small RNAs with antisense complementarity to lin-14. Cell, 75(5):843–854, 1993. [17] D. P. Bartel. MicroRNAs: genomics, biogenesis, mechanism, and function. cell, 116(2):281–297, 2004. [18] D. Kleftogiannis, et al. Where we stand, where we are moving: Surveying computational techniques for identifying miRNA genes and uncovering their regulatory role. Journal of biomedical informatics, 46(3):563–573, 2013. [19] I. de ON Lopes, A. Schliep, and A. C. d. L. de Carvalho. The discriminant power of RNA features for pre-miRNA recognition. BMC bioinformatics, 15(1):1, 2014. [20] R. Lorenz, et al. ViennaRNA Package 2.0. Algorithms for Molecular Biology, 6(1):1, 2011. [21] R. B. Lyngsø. Complexity of pseudoknot prediction in simple models. In Automata, Languages and Programming, pages 919–931. Springer, 2004. [22] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [23] T. Kin, et al. fRNAdb: a platform for mining/annotating functional RNA candidates from non-coding RNA sequences. Nucleic acids research, 35(suppl 1):D145–D148, 2007. [24] D. Bu, et al. NONCODE v3. 0: integrative annotation of long noncoding RNAs. Nucleic acids research, page gkr1175, 2011. [25] S. Griffiths-Jones, et al. miRBase: microRNA sequences, targets and gene nomenclature. Nucleic acids research, 34(suppl 1):D140–D144, 2006. [26] L. Lestrade and M. J. Weber. snoRNA-LBME-db, a comprehensive database of human H/ACA and C/D box snoRNAs. Nucleic acids research, 34(suppl 1):D158–D162, 2006. [27] L. Bottou. Stochastic gradient learning in neural networks. Proceedings of Neuro-Nımes, 91(8), 1991. [28] 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. [29] O. Vinyals, et al. Grammar as a foreign language. In Advances in Neural Information Processing Systems, pages 2773–2781, 2015. [30] T. Rocktäschel, et al. Reasoning about entailment with neural attention. arXiv preprint arXiv:1509.06664, 2015. [31] G. King and L. Zeng. Logistic regression in rare events data. Political analysis, 9(2):137–163, 2001. [32] B. Zhou, et al. Learning deep features for discriminative localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2921–2929, 2016. [33] J. Starega-Roslan, P. Galka-Marciniak, and W. J. Krzyzosiak. Nucleotide sequence of miRNA precursor contributes to cleavage site selection by Dicer. Nucleic acids research, 43(22):10939–10951, 2015. [34] M. R. Friedländer, et al. Discovering microRNAs from deep sequencing data using miRDeep. Nature biotechnology, 26(4):407–415, 2008. [35] N. Mendes, A. T. Freitas, and M.-F. Sagot. Current tools for the identification of miRNA genes and their targets. Nucleic acids research, 37(8):2419–2433, 2009. [36] T. Mikolov, et al. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111–3119, 2013. [37] J. Thomas, S. Thomas, and L. Sael. DP-miRNA: An improved prediction of precursor microRNA using deep learning model. In Big Data and Smart Computing (BigComp), 2017 IEEE International Conference on, pages 96–99. IEEE, 2017. [38] J. Chen, X. Wang, and B. Liu. IMiRNA-SSF: improving the identification of MicroRNA precursors by combining negative sets with different distributions. Scientific reports, 6, 2016. [39] L. Wei, et al. Improved and promising identification of human microRNAs by incorporating a high-quality negative set. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 11(1):192–201, 2014. [40] H. W. Lilliefors. On the Kolmogorov-Smirnov test for normality with mean and variance unknown. Journal of the American statistical Association, 62(318):399–402, 1967. 10 | 2017 | 469 |
6,973 | Robust Optimization for Non-Convex Objectives Robert Chen Computer Science Harvard University Brendan Lucier Microsoft Research New England Yaron Singer Computer Science Harvard University Vasilis Syrgkanis Microsoft Research New England Abstract We consider robust optimization problems, where the goal is to optimize in the worst case over a class of objective functions. We develop a reduction from robust improper optimization to stochastic optimization: given an oracle that returns ↵-approximate solutions for distributions over objectives, we compute a distribution over solutions that is ↵-approximate in the worst case. We show that derandomizing this solution is NP-hard in general, but can be done for a broad class of statistical learning tasks. We apply our results to robust neural network training and submodular optimization. We evaluate our approach experimentally on corrupted character classification and robust influence maximization in networks. 1 Introduction In many learning tasks we face uncertainty about the loss we aim to optimize. Consider, for example, a classification task such as character recognition, required to perform well under various types of distortion. In some environments, such as recognizing characters in photos, the classifier must handle rotation and patterned backgrounds. In a different environment, such as low-resolution images, it is more likely to encounter noisy pixelation artifacts. Instead of training a separate classifier for each possible scenario, one seeks to optimize performance in the worst case over different forms of corruption (or combinations thereof) made available to the trainer as black-boxes. More generally, our goal is to find a minimax solution that optimizes in the worst case over a given family of functions. Even if each individual function can be optimized effectively, it is not clear such solutions would perform well in the worst case. In many cases of interest, individual objectives are non-convex and hence state-of-the-art methods are only approximate. In stochastic optimization, where one must optimize a distribution over loss functions, approximate stochastic optimization is often straightforward, since loss functions are commonly closed under convex combination. Can approximately optimal stochastic solutions yield an approximately optimal robust solution? In this paper we develop a reduction from robust optimization to stochastic optimization. Given an ↵approximate oracle for stochastic optimization we show how to implement an ↵-approximate solution for robust optimization under a necessary extension, and illustrate its effectiveness in applications. Main Results. Given an ↵-approximate stochastic oracle for distributions over (potentially nonconvex) loss functions, we show how to solve ↵-approximate robust optimization in a convexified solution space. This outcome is “improper” in the sense that it may lie outside the original solution space, if the space is non-convex. This can be interpreted as computing a distribution over solutions. We show that the relaxation to improper learning is necessary in general: It is NP-hard to achieve robust optimization with respect to the original outcome space, even if stochastic optimization can be solved exactly, and even if there are only polynomially many loss functions. We complement this by showing that in any statistical learning scenario where loss is convex in the predicted dependent variable, we can find a single (deterministic) solution with matching performance guarantees. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Technical overview. Our approach employs an execution of no-regret dynamics on a zero-sum game, played between a learner equipped with an ↵-approximate stochastic oracle, and an adversary who aims to find a distribution over loss functions that maximizes the learner’s loss. This game converges to an approximately robust solution, in which the learner and adversary settle upon an ↵approximate minimax solution. This convergence is subject to an additive regret term that converges at a rate of T −1/2 over T rounds of the learning dynamics. Applications. We illustrate the power of our reduction through two main examples. We first consider statistical learning via neural networks. Given an arbitrary training method, our reduction generates a net that optimizes robustly over a given class of loss functions. We evaluate our method experimentally on a character recognition task, where the loss functions correspond to different corruption models made available to the learner as black boxes. We verify experimentally that our approach significantly outperforms various baselines, including optimizing for average performance and optimizing for each loss separately. We also apply our reduction to influence maximization, where the goal is to maximize a concave function (the independent cascade model of influence [11]) over a non-convex space (subsets of vertices in a network). Previous work has studied robust influence maximization directly [9, 5, 15], focusing on particular, natural classes of functions (e.g., edge weights chosen within a given range) and establishing hardness and approximation results. In comparison, our method is agnostic to the particular class of functions, and achieves a strong approximation result by returning a distribution over solutions. We evaluate our method on real and synthetic datasets, with the goal of robustly optimizing a suite of random influence instantiations. We verify experimentally that our approach significantly outperforms natural baselines. Related work. There has recently been a great deal of interest in robust optimization in machine learning [20, 4, 17, 21, 16]. For continuous optimization, the work that is closest to ours is perhaps that by Shalev-Shwartz and Wexler [20] and Namkoong and Duchi [17] that use robust optimization to train against convex loss functions. The main difference is that we assume a more general setting in which the loss functions are non-convex and one is only given access to the stochastic oracle. Hence, the proof techniques and general results from these papers do not apply to our setting. We note that our result generalizes these works, as they can be considered as the special case in which we have a distributional oracle whose approximation is optimal. In particular, [20, Theorem 1] applies to the realizable statistical learning setting where the oracle has small mistake bound C. Our applications require a more general framing that hold for any optimization setting with access to an approximate oracle, and approximation is in the multiplicative sense with respect to the optimal value. In submodular optimization there has been a great deal of interest in robust optimization as well [12, 13, 10, 6]. The work closest to ours is that by He and Kempe [10] who consider a slightly different objective than ours. Kempe and He’s results apply to influence but do not extend to general submodular functions. Finally, we note that unlike recent work on non-convex optimization [7, 1, 8] our goal in this paper is not to optimize a non-convex function. Rather, we abstract the non-convex guarantees via the approximate stochastic oracle. 2 Robust Optimization with Approximate Stochastic Oracles We consider the following model of optimization that is robust to objective uncertainty. There is a space X over which to optimize, and a finite set of loss functions1 L = {L1, . . . , Lm} where each Li 2 L is a function from X to [0, 1]. Intuitively, our goal is to find some x 2 X that achieves low loss in the worst-case over loss functions in L. For x 2 X, write g(x) = maxi2[m] Li(x) for the worst-case loss of x. The minimax optimum ⌧is given by ⌧= min x2X g(x) = min x2X max i2[m] Li(x). (1) The goal of ↵-approximate robust optimization is to find x such that g(x) ↵⌧.2 1We describe an extension to infinite sets of loss functions in the full version of the paper. Our results also extend naturally to the goal of maximizing the minimum of a class of reward functions. 2This oracle framework is similar to that used by Ben-Tal et al. [3], but where the approximation is multiplicative rather than additive. 2 Algorithm 1 Oracle Efficient Improper Robust Optimization Input: Objectives L = {L1, . . . , Lm}, Apx stochastic oracle M, parameters T, ⌘ for each time step t 2 [T] do Set wt[i] / exp ( ⌘ t−1 X ⌧=1 Li(x⌧) ) (3) Set xt = M(wt) end for Output: the uniform distribution over {x1, . . . , xT } Given a distribution P over solutions X, write g(P) = maxi2[m] Ex⇠P[Li(x)] for the worst-case expected loss of a solution drawn from P. A weaker version of robust approximation is improper robust optimization: find a distribution P over X such that g(P) ↵⌧. Our results take the form of reductions to an approximate stochastic oracle, which finds a solution x 2 X that approximately minimizes a given distribution over loss functions.3 Definition 1 (↵-Approximate Stochastic Oracle). Given a distribution D over L, an ↵-approximate stochastic oracle M(D) computes x⇤2 X such that EL⇠D [L(x⇤)] ↵min x2X EL⇠D [L(x)] . (2) 2.1 Improper Robust Optimization with Oracles We first show that, given access to an ↵-approximate stochastic oracle, it is possible to efficiently implement improper ↵-approximate robust optimization, subject to a vanishing additive loss term. Theorem 1. Given access to an ↵-approximate stochastic oracle, Algorithm 1 with ⌘= q log(m) 2T computes a distribution P over solutions, defined as a uniform distribution over a set {x1, . . . , xT }, so that max i2[m] Ex⇠P [Li(x)] ↵⌧+ r 2 log(m) T . (4) Moreover, for any ⌘the distribution P computed by Algorithm 1 satisfies: max i2[m] Ex⇠P [Li(x)] ↵(1 + ⌘)⌧+ log(m) ⌘T . (5) Proof. We give the proof of the first result and defer the second result to the full version of the paper. We can interpret Algorithm 1 in the following way. We define a zero-sum game between a learner and an adversary. The learner’s action set is equal to X and the adversary’s action set is equal to [m]. The loss of the learner when he picks x 2 X and the adversary picks i 2 [m] is defined as Li(x). The corresponding payoff of the adversary is Li(x). We will run no-regret dynamics on this zero-sum game, where at every iteration t = 1, . . . , T, the adversary will pick a distribution over functions and subsequently the learner picks a solution xt. For simpler notation we will denote with wt the probability density function on [m] associated with the distribution of the adversary. That is, wt[i] is the probability of picking function Li 2 L. The adversary picks a distribution wt based on some arbitrary no-regret learning algorithm on the m actions in L. For concreteness consider the case where the adversary picks a distribution based on the multiplicative weight updates algorithm, i.e., wt[i] / exp (r log(m) 2T t−1 X ⌧=1 Li(x⌧) ) . (6) 3All our results easily extend to the case where the oracle computes a solution that is approximately optimal up to an additive error, rather than a multiplicative one. For simplicity of exposition we present the multiplicative error case as it is more in line with the literature on approximation algorithms. 3 Subsequently the learner picks a solution xt that is the output of the ↵-approximate stochastic oracle on the distribution selected by the adversary at time-step t. That is, xt = M (wt) . (7) Write ✏(T) = q 2 log(m) T . By the guarantees of the no-regret algorithm for the adversary, we have that 1 T T X t=1 EI⇠wt [LI(xt)] ≥max i2[m] 1 T T X t=1 Li(xt) −✏(T). (8) Combining the above with the guarantee of the stochastic oracle we have ⌧= min x2X max i2[m] Li(x) ≥min x2X 1 T T X t=1 EI⇠wt [LI(x)] ≥1 T T X t=1 min x2X EI⇠wt [LI(x)] ≥1 T T X t=1 1 ↵· EI⇠wt [LI(xt)] (By oracle guarantee for each t) ≥1 ↵· max i2[m] 1 T T X t=1 Li(xt) −✏(T) ! . (By no-regret of adversary) Thus, if we define with P to be the uniform distribution over {x1, . . . , xT }, then we have derived max i2[m] Ex⇠P [Li(x)] ↵⌧+ ✏(T) (9) as required. A corollary of Theorem 1 is that if the solution space X is convex and the objective functions Li 2 L are all convex functions, then we can compute a single solution x⇤that is approximately minimax optimal. Of course, in this setting one can calculate and optimize the maximum loss directly in time proportional to |L|; this result therefore has the most bite when the set of functions is large. Corollary 2. If the space X is a convex space and each loss function Li 2 L is a convex function, then the point x⇤= 1 T PT t=1 xt 2 X, where {x1, . . . , xT } are the output of Algorithm 1, satisfies: max i2[m] Li(x⇤) ↵⌧+ r 2 log(m) T (10) Proof. By Theorem 1, we get that if P is the uniform distribution over {x1, . . . , xT } then max i2[m] Ex⇠P[Li(x)] ↵⌧+ r 2 log(m) T . Since X is convex, the solution x⇤= Ex⇠P[x] is also part of X. Moreover, since each Li 2 L is convex, we have that Ex⇠P[Li(x)] ≥Li(Ex⇠P[x]) = Li(x⇤). We therefore conclude max i2[m] Li(x⇤) max i2[m] Ex⇠P[Li(x)] ↵⌧+ r 2 log(m) T as required. 2.2 Robust Statistical Learning Next we apply our main theorem to statistical learning. Consider regression or classification settings where data points are pairs (z, y), z 2 Z is a vector of features, and y 2 Y is the dependent variable. The solution space X is then a space of hypotheses H, with each h 2 H a function from Z to Y. We also assume that Y is a convex subset of a finite-dimensional vector space. We are given a set of loss functions L = {L1, . . . , Lm}, where each Li 2 L is a functional Li : H ! [0, 1]. Theorem 1 implies that, given an ↵-approximate stochastic optimization oracle, 4 we can compute a distribution over T hypotheses from H that achieves an ↵-approximate minimax guarantee. If the loss functionals are convex over hypotheses, then we can compute a single ensemble hypothesis h⇤(possibly from a larger space of hypotheses, if H is non-convex) that achieves this guarantee. Theorem 3. Suppose that L = {L1, . . . , Lm} are convex functionals. Then the ensemble hypothesis h⇤= 1 T PT t=1 h, where {h1, . . . , hT } are the hypotheses output by Algorithm 1 given an ↵-approximate stochastic oracle, satisfies max i2[m] Li(h⇤) ↵min h2H max i2[m] Li(h) + r 2 log(m) T . (11) Proof. The proof is similar to the proof of Corollary 2. We emphasize that the convexity condition in Theorem 3 is over the class of hypotheses, rather than over features or any natural parameterization of H (such as weights in a neural network). This is a mild condition that applies to many examples in statistical learning theory. For instance, consider the case where each loss Li(h) is the expected value of some ex-post loss function `i(h(z), y) given a distribution Di over Z ⇥Y : Li(h) = E(z,y)⇠Di [`i(h(z), y)] . (12) In this case, it is enough for the function `i(·, ·) to be convex with respect to its first argument (i.e., the predicted dependent variable). This is satisfied by most loss functions used in machine learning, such as multinomial logistic loss (cross-entropy loss) `(ˆy, y) = −P c2[k] yc log(ˆyc) from multi-class classification or squared loss `(ˆy, y) = kˆy −yk2 as used in regression. For all these settings, Theorem 3 provides a tool for improper robust learning, where the final hypothesis h⇤is an ensemble of T base hypotheses from H. Again, the underlying optimization problem can be arbitrarily non-convex in the natural parameters of the hypothesis space; in Section 3.1 we will show how to apply this approach to robust training of neural networks, where the stochastic oracle is simply a standard network training method. For neural networks, the fact that we achieve improper learning (as opposed to standard learning) corresponds to training a neural network with a single extra layer relative to the networks generated by the oracle. 2.3 Robust Submodular Maximization In robust submodular maximization we are given a family of reward functions F = {f1, . . . , fm}, where each fi 2 F is a monotone submodular function from a ground set N of n elements to [0, 1]. Each function is assumed to be monotone and submodular, i.e., for any S ✓T ✓N, fi(S) fi(T); and for any S, T ✓N, f(S [ T) + f(S \ T) f(S) + f(T). The goal is to select a set S ✓N of size k whose worst-case value over i, i.e., g(S) = mini2[m] fi(S), is at least a 1/↵factor of the minimax optimum ⌧= maxT :|T |k mini2[m] fi(T). This setting is a special case of our general robust optimization setting (phrased in terms of rewards rather than losses). The solution space X is equal to the set of subsets of size k among all elements in N and the set F is the set of possible objective functions. The stochastic oracle 1, instantiated in this setting, asks for the following: given a convex combination of submodular functions F(S) = Pm i=1 w[i] · fi(S), compute a set S⇤such that F(S⇤) ≥1 ↵maxS:|S|k F(S). Computing the maximum value set of size k is NP-hard even for a single submodular function. The following very simple greedy algorithm computes a (1 −1/e)-approximate solution [19]: begin with Scur = ;, and at each iteration add to the current solution Scur the element j 2 N −Scur that has the largest marginal contribution: f({j} [ Scur) −f(Scur). Moreover, this approximation ratio is known to be the best possible in polynomial time [18]. Since a convex combination of monotone submodular functions is also a monotone submodular function, we immediately get that there exists a (1 −1/e)-approximate stochastic oracle that can be computed in polynomial time. The algorithm is formally given in Algorithm 2. Combining the above with Theorem 1 we get the following corollary. Corollary 4. Algorithm 1, with stochastic oracle Mgreedy, computes in time poly(T, n) a distribution P over sets of size k, defined as a uniform distribution over a set {S1, . . . , ST }, such that min i2[m] ES⇠P [fi(S)] ≥ ✓ 1 −1 e ◆ (1 −⌘)⌧−log(m) ⌘T . (13) 5 Algorithm 2 Greedy stochastic Oracle for Submodular Maximization Mgreedy Input: Set of elements N, objectives F = {f1, . . . , fm}, distribution over objectives w Set Scur = ; for j = 1 to k do Let j⇤= arg maxj2N−Scur Pm i=1 w[i] (fi({j} [ Scur) −fi(Scur)) Set Scur = {j⇤} [ Scur end for Figure 1: Sample MNIST image with each of the corruptions applied to it. Background Corruption Set & Shrink Corruption Set (top). Pixel Corruption Set & Mixed Corruption Set (bottom). We show in the full version of the paper that computing a single set S that achieves a (1 −1/e)approximation to ⌧is also NP-hard. This is true even if the functions fi are additive. However, by allowing a randomized solution over sets we can achieve a constant factor approximation to ⌧in polynomial time. Since the functions are monotone, the above result implies a simple way of constructing a single set S⇤that is of larger size than k, which deterministically achieves a constant factor approximation to ⌧. The latter holds by simply taking the union of the sets {S1, . . . , ST } in the support of the distribution returned by Algorithm 1. We get the following bi-criterion approximation scheme. Corollary 5. Suppose that we run the reward version of Algorithm 1, with ⌘= ✏and for T = log(m) ⌧✏2 , returning {S1, . . . , ST }. Then the set S⇤= S1 [ . . . [ ST , which is of size at most k log(m) ⌧✏2 , satisfies min i2[m] fi(S⇤) ≥ ✓ 1 −1 e −2✏ ◆ ⌧. (14) 3 Experiments4 3.1 Robust Classification with Neural Networks A classic application of our robust optimization framework is classification with neural networks for corrupted or perturbed datasets. We have a data set Z of pairs (z, y) of an image z 2 Z and label y 2 Y that can be corrupted in m different ways which produces data sets Z1, . . . , Zm. The hypothesis space H is the set of all neural nets of some fixed architecture and for each possible assignment of weights. We denote each such hypothesis with h(·; ✓) : Z ! Y for ✓2 Rd, with d being the number of parameters (weights) of the neural net. If we let Di be the uniform distribution over each corrupted data set Zi, then we are interested in minimizing the empirical cross-entropy (aka multinomial logistic) loss in the worst case over these different distributions Di. The latter is a special case of our robust statistical learning framework from Section 2.2. Training a neural network is a non-convex optimization problem and we have no guarantees on its performance. We instead assume that for any given distribution D over pairs (z, y) of images and labels and for any loss function `(h(z; ✓), y), training a neural net with stochastic gradient descent run on images drawn from D can achieve an ↵approximation to the optimal expected loss, i.e. min✓2Rd E(z,y)⇠D [`(h(z; ✓), y)]. Notice that this implies an ↵-approximate stochastic oracle for the 4Code used to implement the algorithms and run the experiments is available at https://github.com/ 12degrees/Robust-Classification/. 6 corrupted dataset robust training problem: for any distribution w over the different corruptions [m], the stochastic oracle asks to give an ↵-approximation to the minimization problem: min ✓2Rd m X i=1 w[i] · E(z,y)⇠Di [`(h(z; ✓), y)] (15) The latter is simply another expected loss problem with distribution over images being the mixture distribution defined by first drawing a corruption index i from w and then drawing a corrupted image from distribution Di. Hence, our oracle assumption implies that SGD on this mixture is an ↵-approximation. By linearity of expectation, an alternative way of viewing the stochastic oracle problem is that we are training a neural net on the original distribution of images, but with loss function being the weighted combination of loss functions Pm i=1 w[i] · `(h(ci(z); ✓), y), where ci(z) is the i-th corrupted version of image z. In our experiments we implemented both of these interpretations of the stochastic oracle, which we call the Hybrid Method and Composite Method, respectively, when designing our neural network training scheme (see the full version of the paper for further details). Finally, because we use the cross-entropy loss, which is convex in the prediction of the neural net, we can also apply Theorem 3 to get that the ensemble neural net, which takes the average of the predictions of the neural nets created at each iteration of the robust optimization, will also achieve good worst-case loss (we refer to this as Ensemble Bottleneck Loss). Experiment Setup. We use the MNIST handwritten digits data set containing 55000 training images, 5000 validation images, and 10000 test images, each image being a 28 ⇥28 pixel grayscale image. The intensities of these 576 pixels (ranging from 0 to 1) are used as input to a neural network that has 1024 nodes in its one hidden layer. The output layer uses the softmax function to give a distribution over digits 0 to 9. The activation function is ReLU and the network is trained using Gradient Descent with learning parameter 0.5 through 500 iterations of mini-batches of size 100. In general, the corruptions can be any black-box corruption of the image. In our experiments, we consider four types of corruption (m = 4). See the full version of the paper for further details about corruptions. Baselines. We consider three baselines: (i) Individual Corruption: for each corruption type i 2 [m], we construct an oracle that trains a neural network using the training data perturbed by corruption i, and then returns the trained network weights as ✓t, for every t = 1, . . . , T. This gives m baselines, one for each corruption type; (ii) Even Split: this baseline alternates between training with different corruption types between iterations. In particular, call the previous m baseline oracles O1, ..., Om. Then this new baseline oracle will produce ✓t with Oi+1, where i ⌘t mod m, for every t = 1, ..., T; (iii) Uniform Distribution: This more advanced baseline runs the robust optimization scheme with the Hybrid Method (see Appendix), but without the distribution updates. Instead, the distribution over corruption types is fixed as the discrete uniform [ 1 m, ..., 1 m] over all T iterations. This allows us to check if the multiplicative weight updates in the robust optimization algorithm are providing benefit. Results. The Hybrid and Composite Methods produce results far superior to all three baseline types, with differences both substantial in magnitude and statistically significant, as shown in Figure 2. The more sophisticated Composite Method outperforms the Hybrid Method. Increasing T improves performance, but with diminishing returns–largely because for sufficiently large T, the distribution over corruption types has moved from the initial uniform distribution to some more optimal stable distribution (see the full version for details). All these effects are consistent across the 4 different corruption sets tested. The Ensemble Bottleneck Loss is empirically much smaller than Individual Bottleneck Loss. For the best performing algorithm, the Composite Method, the mean Ensemble Bottleneck Loss (mean Individual Bottleneck Loss) with T = 50 was 0.34 (1.31) for Background Set, 0.28 (1.30) for Shrink Set, 0.19 (1.25) for Pixel Set, and 0.33 (1.25) for Mixed Set. Thus combining the T classifiers obtained from robust optimization is practical for making predictions on new data. 3.2 Robust Influence Maximization We apply the results of Section 2.3 to the robust influence maximization problem. Given a directed graph G = (V, E), the goal is to pick a seed set S of k nodes that maximize an influence function 7 Figure 2: Comparison of methods, showing mean of 10 independent runs and a 95% confidence band. The criterion is Individual Bottleneck Loss: min[m] E✓⇠P [`(h(z; ✓), y)], where P is uniform over all solutions ✓i for that method. Baselines (i) and (ii) are not shown as they produce significantly higher loss. fG(S), where fG(S) is the expected number of individuals influenced by opinion of the members of S. We used fG(S) to be the number of nodes reachable from S (our results extend to other models). In robust influence maximization, the goal is to maximize influence in the worst-case (Bottleneck Influence) over m functions {f1, . . . , fm}, corresponding to m graphs {G1, . . . , Gm}, for some fixed seed set of size k. This is a special case of robust submodular maximization after rescaling to [0, 1]. Experiment Setup. Given a base directed graph G(V, E), we produce m graphs Gi = (V, Ei) by randomly including each edge e 2 E with some probability p. We consider two base graphs and two sets of parameters for each: (i) The Wikipedia Vote Graph [14]. In Experiment A, the parameters are |V | = 7115, |E| = 103689, m = 10, p = 0.01 and k = 10. In Experiment B, change p = 0.015 and k = 3. (ii) The Complete Directed Graph on |V | = 100 vertices. In Experiment A, the parameters are m = 50, p = 0.015 and k = 2. In Experiment B, change p = 0.01 and k = 4. Baselines. We compared our algorithm (Section 2.3) to three baselines: (i) Uniform over Individual Greedy Solutions: Apply greedy maximization (Algorithm 2) on each graph separately, to get solutions {Sg 1, . . . , Sg m}. Return the uniform distribution over these solutions; (ii) Greedy on Uniform Distribution over Graphs: Return the output of greedy submodular maximization (Algorithm 2) on the uniform distribution over influence functions. This can be viewed as maximizing expected influence; (iii) Uniform over Greedy Solutions on Multiple Perturbed Distributions: Generate T distributions {w⇤ 1, . . . , w⇤ T } over the m functions, by randomly perturbing the uniform distribution. Perturbation magnitudes were chosen s.t. w⇤ t has the same expected `1 distance from uniform as the distribution returned by robust optimization at iteration t. Results. For both graph experiments, robust optimization outperforms all baselines on Bottleneck Influence; the difference is statistically significant as well as large in magnitude for all T > 50 (see Figure 3). Moreover, the individual seed sets generated at each iteration t of robust optimization themselves achieve empirically good influence as well; see the full version for further details. References [1] Zeyuan Allen Zhu and Elad Hazan. Variance reduction for faster non-convex optimization. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pages 699–707, 2016. 8 Figure 3: Comparison for various T, showing mean Bottleneck Influence and 95% confidence on 10 runs. [2] Sanjeev Arora, Elad Hazan, and Satyen Kale. The multiplicative weights update method: a meta-algorithm and applications. Theory of Computing, 8(6):121–164, 2012. [3] Aharon Ben-Tal, Elad Hazan, Tomer Koren, and Shie Mannor. Oracle-based robust optimization via online learning. Operations Research, 63(3):628–638, 2015. [4] Sabyasachi Chatterjee, John C. Duchi, John D. Lafferty, and Yuancheng Zhu. Local minimax complexity of stochastic convex optimization. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 3423–3431, 2016. [5] Wei Chen, Tian Lin, Zihan Tan, Mingfei Zhao, and Xuren Zhou. Robust influence maximization. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, pages 795–804, 2016. [6] Wei Chen, Tian Lin, Zihan Tan, Mingfei Zhao, and Xuren Zhou. Robust influence maximization. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, pages 795–804, 2016. [7] Elad Hazan, Kfir Y. Levy, and Shai Shalev-Shwartz. Beyond convexity: Stochastic quasi-convex optimization. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1594–1602, 2015. [8] Elad Hazan, Kfir Yehuda Levy, and Shai Shalev-Shwartz. On graduated optimization for stochastic non-convex problems. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pages 1833–1841, 2016. [9] Xinran He and David Kempe. Robust influence maximization. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, pages 885–894, 2016. [10] Xinran He and David Kempe. Robust influence maximization. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, August 13-17, 2016, pages 885–894, 2016. [11] 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 9 Knowledge Discovery and Data Mining, KDD ’03, pages 137–146, New York, NY, USA, 2003. ACM. [12] Andreas Krause, H. Brendan McMahan, Carlos Guestrin, and Anupam Gupta. Selecting observations against adversarial objectives. In Advances in Neural Information Processing Systems 20, Proceedings of the Twenty-First Annual Conference on Neural Information Processing Systems, Vancouver, British Columbia, Canada, December 3-6, 2007, pages 777–784, 2007. [13] Andreas Krause, Alex Roper, and Daniel Golovin. Randomized sensing in adversarial environments. In Proceedings of the 22nd International Joint Conference On Artificial Intelligence, Barcelona, Catalonia, Spain, July 16-22, 2011, pages 2133–2139, 2011. [14] Jure Leskovec. Wikipedia vote network. Stanford Network Analysis Project. [15] Meghna Lowalekar, Pradeep Varakantham, and Akshat Kumar. Robust influence maximization: (extended abstract). In Proceedings of the 2016 International Conference on Autonomous Agents & Multiagent Systems, Singapore, May 9-13, 2016, pages 1395–1396, 2016. [16] Yishay Mansour, Aviad Rubinstein, and Moshe Tennenholtz. Robust probabilistic inference. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 449–460, 2015. [17] Hongseok Namkoong and John C. Duchi. Stochastic gradient methods for distributionally robust optimization with f-divergences. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 2208–2216, 2016. [18] G. L. Nemhauser and L. A. Wolsey. Best algorithms for approximating the maximum of a submodular set function. Mathematics of Operations Research, 3(3):177–188, 1978. [19] G. L. Nemhauser, L. A. Wolsey, and M. L. Fisher. An analysis of approximations for maximizing submodular set functions—i. Mathematical Programming, 14(1):265–294, 1978. [20] Shai Shalev-Shwartz and Yonatan Wexler. Minimizing the maximal loss: How and why. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pages 793–801, 2016. [21] Jacob Steinhardt and John C. Duchi. Minimax rates for memory-bounded sparse linear regression. In Proceedings of The 28th Conference on Learning Theory, COLT 2015, Paris, France, July 3-6, 2015, pages 1564–1587, 2015. 10 | 2017 | 47 |
6,974 | Boltzmann Exploration Done Right Nicolò Cesa-Bianchi Università degli Studi di Milano Milan, Italy nicolo.cesa-bianchi@unimi.it Claudio Gentile INRIA Lille – Nord Europe Villeneuve d’Ascq, France cla.gentile@gmail.com Gábor Lugosi ICREA & Universitat Pompeu Fabra Barcelona, Spain gabor.lugosi@gmail.com Gergely Neu Universitat Pompeu Fabra Barcelona, Spain gergely.neu@gmail.com Abstract Boltzmann exploration is a classic strategy for sequential decision-making under uncertainty, and is one of the most standard tools in Reinforcement Learning (RL). Despite its widespread use, there is virtually no theoretical understanding about the limitations or the actual benefits of this exploration scheme. Does it drive exploration in a meaningful way? Is it prone to misidentifying the optimal actions or spending too much time exploring the suboptimal ones? What is the right tuning for the learning rate? In this paper, we address several of these questions for the classic setup of stochastic multi-armed bandits. One of our main results is showing that the Boltzmann exploration strategy with any monotone learning-rate sequence will induce suboptimal behavior. As a remedy, we offer a simple non-monotone schedule that guarantees near-optimal performance, albeit only when given prior access to key problem parameters that are typically not available in practical situations (like the time horizon T and the suboptimality gap ∆). More importantly, we propose a novel variant that uses different learning rates for different arms, and achieves a distribution-dependent regret bound of order K log2 T ∆ and a distributionindependent bound of order √ KT log K without requiring such prior knowledge. To demonstrate the flexibility of our technique, we also propose a variant that guarantees the same performance bounds even if the rewards are heavy-tailed. 1 Introduction Exponential weighting strategies are fundamental tools in a variety of areas, including Machine Learning, Optimization, Theoretical Computer Science, and Decision Theory [3]. Within Reinforcement Learning [23, 25], exponential weighting schemes are broadly used for balancing exploration and exploitation, and are equivalently referred to as Boltzmann, Gibbs, or softmax exploration policies [22, 14, 24, 19]. In the most common version of Boltzmann exploration, the probability of choosing an arm is proportional to an exponential function of the empirical mean of the reward of that arm. Despite the popularity of this policy, very little is known about its theoretical performance, even in the simplest reinforcement learning setting of stochastic bandit problems. The variant of Boltzmann exploration we focus on in this paper is defined by pt,i ∝eηtbµt,i, (1) where pt,i is the probability of choosing arm i in round t, bµt,i is the empirical average of the rewards obtained from arm i up until round t, and ηt > 0 is the learning rate. This variant is broadly used 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. in reinforcement learning [23, 25, 14, 26, 16, 18]. In the multiarmed bandit literature, exponentialweights algorithms are also widespread, but they typically use importance-weighted estimators for the rewards —see, e.g., [6, 8] (for the nonstochastic setting), [12] (for the stochastic setting), and [20] (for both stochastic and nonstochastic regimes). The theoretical behavior of these algorithms is generally well understood. For example, in the stochastic bandit setting Seldin and Slivkins [20] show a regret bound of order K log2 T ∆ , where ∆is the suboptimality gap (i.e., the smallest difference between the mean reward of the optimal arm and the mean reward of any other arm). In this paper, we aim to achieve a better theoretical understanding of the basic variant of the Boltzmann exploration policy that relies on the empirical mean rewards. We first show that any monotone learning-rate schedule will inevitably force the policy to either spend too much time drawing suboptimal arms or completely fail to identify the optimal arm. Then, we show that a specific non-monotone schedule of the learning rates can lead to regret bound of order K log T ∆2 . However, the learning schedule has to rely on full knowledge of the gap ∆and the number of rounds T. Moreover, our negative result helps us to identify a crucial shortcoming of the Boltzmann exploration policy: it does not reason about the uncertainty of the empirical reward estimates. To alleviate this issue, we propose a variant that takes this uncertainty into account by using separate learning rates for each arm, where the learning rates account for the uncertainty of each reward estimate. We show that the resulting algorithm guarantees a distribution-dependent regret bound of order K log2 T ∆ , and a distribution-independent bound of order √ KT log K. Our algorithm and analysis is based on the so-called Gumbel–softmax trick that connects the exponential-weights distribution with the maximum of independent random variables from the Gumbel distribution. 2 The stochastic multi-armed bandit problem Consider the setting of stochastic multi-armed bandits: each arm i ∈[K] def= {1, 2, . . . , K} yields a reward with distribution νi, mean µi, with the optimal mean reward being µ∗= maxi µi. Without loss of generality, we will assume that the optimal arm is unique and has index 1. The gap of arm i is defined as ∆i = µ∗−µi. We consider a repeated game between the learner and the environment, where in each round t = 1, 2, . . . , the following steps are repeated: 1. The learner chooses an arm It ∈[K], 2. the environment draws a reward Xt,It ∼νIt independently of the past, 3. the learner receives and observes the reward Xt,It. The performance of the learner is measured in terms of the pseudo-regret defined as RT = µ∗T − T X t=1 E [Xt,It] = µ∗T −E " T X t=1 µIt # = E " T X t=1 ∆It # = K X i=1 ∆iE [NT,i] , (2) where we defined Nt,i = Pt s=1 I{Is=i}, that is, the number of times that arm i has been chosen until the end of round t. We aim at constructing algorithms that guarantee that the regret grows sublinearly. We will consider the above problem under various assumptions of the distribution of the rewards. For most of our results, we will assume that each νi is σ-subgaussian with a known parameter σ > 0, that is, that E h ey(X1,i−E[X1,i])i ≤eσ2y2/2 holds for all y ∈R and i ∈[K]. It is easy to see that any random variable bounded in an interval of length B is B2/4-subgaussian. Under this assumption, it is well known that any algorithm will suffer a regret of at least Ω P i>1 σ2 log T ∆i , as shown in the classic paper of Lai and Robbins [17]. There exist several algorithms guaranteeing matching upper bounds, even for finite horizons [7, 10, 15]. We refer to the survey of Bubeck and Cesa-Bianchi [9] for an exhaustive treatment of the topic. 2 3 Boltzmann exploration done wrong We now formally describe the heuristic form of Boltzmann exploration that is commonly used in the reinforcement learning literature [23, 25, 14]. This strategy works by maintaining the empirical estimates of each µi defined as bµt,i = Pt s=1 Xs,iI{Is=i} Nt,i (3) and computing the exponential-weights distribution (1) for an appropriately tuned sequence of learning rate parameters ηt > 0 (which are often referred to as the inverse temperature). As noted on several occasions in the literature, finding the right schedule for ηt can be very difficult in practice [14, 26]. Below, we quantify this difficulty by showing that natural learning-rate schedules may fail to achieve near-optimal regret guarantees. More precisely, they may draw suboptimal arms too much even after having estimated all the means correctly, or commit too early to a suboptimal arm and never recover afterwards. We partially circumvent this issue by proposing an admittedly artificial learning-rate schedule that actually guarantees near-optimal performance. However, a serious limitation of this schedule is that it relies on prior knowledge of problem parameters ∆and T that are typically unknown at the beginning of the learning procedure. These observations lead us to the conclusion that the Boltzmann exploration policy as described by Equations (1) and (3) is no more effective for regret minimization than the simplest alternative of ε-greedy exploration [23, 7]. Before we present our own technical results, we mention that Singh et al. [21] propose a learning-rate schedule ηt for Boltzmann exploration that simultaneously guarantees that all arms will be drawn infinitely often as T goes to infinity, and that the policy becomes greedy in the limit. This property is proven by choosing a learning-rate schedule adaptively to ensure that in each round t, each arm gets drawn with probability at least 1 t , making it similar in spirit to ε-greedy exploration. While this strategy clearly leads to sublinear regret, it is easy to construct examples on which it suffers a regret of at least Ω T 1−α for any small α > 0. In this paper, we pursue a more ambitious goal: we aim to find out whether Boltzmann exploration can actually guarantee polylogarithmic regret. In the rest of this section, we present both negative and positive results concerning the standard variant of Boltzmann exploration, and then move on to providing an efficient generalization that achieves consistency in a more universal sense. 3.1 Boltzmann exploration with monotone learning rates is suboptimal In this section, we study the most natural variant of Boltzmann exploration that uses a monotone learning-rate schedule. It is easy to see that in order to achieve sublinear regret, the learning rate ηt needs to increase with t so that the suboptimal arms are drawn with less and less probability as time progresses. For the sake of clarity, we study the simplest possible setting with two arms with a gap of ∆between their means. We first show that, in order to guarantee near-optimal (logarithmic) regret, the learning rate has to increase at least at a rate log t ∆ even when the mean rewards are perfectly known, and that any learning-rate sequence that increases at a slower logarithmic rate will lead to polynomial regret. In other words, log t ∆is the minimal affordable learning rate. Proposition 1. Let us assume that bµt,i = µi for all t and i = 1, 2 with µ1 > µ2. Assume that for some constants k ≥1, α ≥0 and ε ≤1 ∆, the learning rate satisfies ηt ≤log(t∆2) (1+α)∆+ ε for all t ≥k. Then, the regret grows as • RT = Ω log T ∆ if α = 0, and • RT = Ω T α 1+α 1 ∆ 1−α 1+α if α > 0. Proof. For t ≥k, the probability of pulling the suboptimal arm can be bounded as P [It = 2] = 1 1 + eηt∆≥e−ηt∆ 2 = Ω ∆2t − 1 1+α 3 by our assumption on ηt. Summing up for all t, we get that the regret is at least RT = ∆ T X t=1 P [It = 2] ≥∆· k + Ω T X t=k ∆2t − 1 1+α !! . The proof is concluded by observing that the sum PT t=k t− 1 1+α is of the order Ω(log T) if α = 0 and Ω T α 1+α if α > 0. This simple proposition thus implies an asymptotic lower bound on the schedule of learning rates ηt that provide near-optimal guarantees. In contrast, Theorem 1 below shows that all learning rate sequences that grow faster than 2 log t yield a linear regret, provided this schedule is adopted since the beginning of the game. This should be contrasted with Theorem 2, which exhibits a schedule achieving logarithmic regret where ηt grows faster than 2 log t only after the first τ rounds. Theorem 1. There exists a 2-armed stochastic bandit problem with rewards bounded in [0, 1] where Boltzmann exploration using any learning rate sequence ηt such that ηt > 2 log t for all t ≥1 has regret RT = Ω(T). Proof. Consider the case where arm 2 gives a reward deterministically equal to 1 2 whereas the optimal arm 1 has a Bernoulli distribution of parameter p = 1 2 + ∆for some 0 < ∆< 1 2. Note that the regret of any algorithm satisfies RT ≥∆(T −t0)P [∀t > t0, It = 2]. Without loss of generality, assume that bµ1,1 = 0 and bµ1,2 = 1/2. Then for all t, independent of the algorithm, bµt,2 = 1/2 and pt,1 = eηtBin(Nt−1,1,p) eηt/2 + eηtBin(Nt−1,1,p) and pt,2 = eηt/2 eηt/2 + eηtBin(Nt−1,1,p) . For t0 ≥1, Let Et0 be the event that Bin(Nt0,1, p) = 0, that is, up to time t0, arm 1 gives only zero reward whenever it is sampled. Then P [∀t > t0 It = 2] ≥P [Et0] 1 −P [∃t > t0 It = 1 | Et0] ≥ 1 2 −∆ t0 1 −P [∃t > t0 It = 1 | Et0] . For t > t0, let At,t0 be the event that arm 1 is sampled at time t but not at any of the times t0 + 1, t0 + 2, . . . , t −1. Then, for any t0 ≥1, P [∃t > t0 It = 1 | Et0] = P [∃t > t0 At,t0 | Et0] ≤ X t>t0 P [At,t0 | Et0] = X t>t0 1 1 + eηt/2 t−1 Y s=t0+1 1 − 1 1 + eηs/2 ≤ X t>t0 e−ηt/2 . Therefore RT ≥∆(T −t0) 1 2 −∆ t0 1 − X t>t0 e−ηt/2 ! . Assume ηt ≥c log t for some c > 2 and for all t ≥t0. Then X t>t0 e−ηt/2 ≤ X t>t0 t−c 2 ≤ Z ∞ t0 x−c 2 dx = c 2 −1 t −( c 2 −1) 0 ≤1 2 whenever t0 ≥(2a) 1 a where a = c 2 −1. This implies RT = Ω(T). 3.2 A learning-rate schedule with near-optimal guarantees The above negative result is indeed heavily relying on the assumption that ηt > 2 log t holds since the beginning. If we instead start off from a constant learning rate which we keep for a logarithmic number of rounds, then a logarithmic regret bound can be shown. Arguably, this results in a rather simplistic exploration scheme, which can be essentially seen as an explore-then-commit strategy (e.g., [13]). Despite its simplicity, this strategy can be shown to achieve near-optimal performance if the parameters are tuned as a function the suboptimality gap ∆(although its regret scales at the suboptimal rate of 1/∆2 with this parameter). The following theorem (proved in Appendix A.1) states this performance guarantee. 4 Theorem 2. Assume the rewards of each arm are in [0, 1] and let τ = 16eK log T ∆2 . Then the regret of Boltzmann exploration with learning rate ηt = I{t<τ} + log(t∆2) ∆ I{t≥τ} satisfies RT ≤16eK log T ∆2 + 9K ∆2 . 4 Boltzmann exploration done right We now turn to give a variant of Boltzmann exploration that achieves near-optimal guarantees without prior knowledge of either ∆or T. Our approach is based on the observation that the distribution pt,i ∝exp (ηtbµt,i) can be equivalently specified by the rule It = arg maxj {ηtbµt,j + Zt,j}, where Zt,j is a standard Gumbel random variable1 drawn independently for each arm j (see, e.g., Abernethy et al. [1] and the references therein). As we saw in the previous section, this scheme fails to guarantee consistency in general, as it does not capture the uncertainty of the reward estimates. We now propose a variant that takes this uncertainty into account by choosing different scaling factors for each perturbation. In particular, we will use the simple choice βt,i = q C2 Nt,i with some constant C > 0 that will be specified later. Our algorithm operates by independently drawing perturbations Zt,i from a standard Gumbel distribution for each arm i, then choosing action It+1 = arg max i {bµt,i + βt,iZt,i} . (4) We refer to this algorithm as Boltzmann–Gumbel exploration, or, in short, BGE. Unfortunately, the probabilities pt,i no longer have a simple closed form, nevertheless the algorithm is very straightforward to implement. Our main positive result is showing the following performance guarantee about the algorithm.2 Theorem 3. Assume that the rewards of each arm are σ2-subgaussian and let c > 0 be arbitrary. Then, the regret of Boltzmann–Gumbel exploration satisfies RT ≤ K X i=2 9C2 log2 + T∆i/c2 ∆i + K X i=2 c2eγ + 18C2eσ2/2C2 (1 + e−γ) ∆i + K X i=2 ∆i. In particular, choosing C = σ and c = σ guarantees a regret bound of RT = O K X i=2 σ2 log2(T∆2 i /σ2) ∆i ! . Notice that, unlike any other algorithm that we are aware of, Boltzmann–Gumbel exploration still continues to guarantee meaningful regret bounds even if the subgaussianity constant σ is underestimated—although such misspecification is penalized exponentially in the true σ2. A downside of our bound is that it shows a suboptimal dependence on the number of rounds T: it grows asymptotically as P i>1 log2(T∆2 i ) ∆i, in contrast to the standard regret bounds for the UCB algorithm of Auer et al. [7] that grow as P i>1(log T) ∆i. However, our guarantee improves on the distribution-independent regret bounds of UCB that are of order √KT log T. This is shown in the following corollary. Corollary 1. Assume that the rewards of each arm are σ2-subgaussian. Then, the regret of Boltzmann– Gumbel exploration with C = σ satisfies RT ≤200σ √ KT log K. Notably, this bound shows optimal dependence on the number of rounds T, but is suboptimal in terms of the number of arms. To complement this upper bound, we also show that these bounds are tight in the sense that the log K factor cannot be removed. Theorem 4. For any K and T such that p K/T log K ≤1, there exists a bandit problem with rewards bounded in [0, 1] where the regret of Boltzmann–Gumbel exploration with C = 1 is at least RT ≥1 2 √ KT log K. 1The cumulative density function of a standard Gumbel random variable is F(x) = exp(−e−x+γ) where γ is the Euler-Mascheroni constant. 2We use the notation log+(·) = max{0, ·}. 5 The proofs can be found in the Appendices A.5 and A.6. Note that more sophisticated policies are known to have better distribution-free bounds. The algorithm MOSS [4] achieves minimax-optimal √ KT distribution-free bounds, but distribution-dependent bounds of the form (K/∆) log(T∆2) where ∆is the suboptimality gap. A variant of UCB using action elimination and due to Auer and Ortner [5] has regret P i>1 log(T∆2 i ) ∆i corresponding to a p KT(log K) distribution-free bound. The same bounds are achieved by the Gaussian Thompson sampling algorithm of Agrawal and Goyal [2], given that the rewards are subgaussian. We finally provide a simple variant of our algorithm that allows to handle heavy-tailed rewards, intended here as reward distributions that are not subgaussian. We propose to use technique due to Catoni [11] based on the influence function ψ(x) = log 1 + x + x2/2 , for x ≥0, −log 1 −x + x2/2 , for x ≤0. Using this function, we define our estimates as bµt,i = βt,i t X s=1 I{Is=i}ψ Xs,i βt,iNt,i We prove the following result regarding Boltzmann–Gumbel exploration run with the above estimates. Theorem 5. Assume that the second moment of the rewards of each arm are bounded uniformly as E X2 i ≤V and let c > 0 be arbitrary. Then, the regret of Boltzmann–Gumbel exploration satisfies RT ≤ K X i=2 9C2 log2 + T∆i/c2 ∆i + K X i=2 c2eγ + 18C2eV/2C2 (1 + e−γ) ∆i + K X i=2 ∆i. Notably, this bound coincides with that of Theorem 3, except that σ2 is replaced by V . Thus, by following the proof of Corollary 1, we can show a distribution-independent regret bound of order √ KT log K. 5 Analysis Let us now present the proofs of our main results concerning Boltzmann–Gumbel exploration, Theorems 3 and 5. Our analysis builds on several ideas from Agrawal and Goyal [2]. We first provide generic tools that are independent of the reward estimator and then move on to providing specifics for both estimators. We start with introducing some notation. We define eµt,i = bµt,i + βt,iZt,i, so that the algorithm can be simply written as It = arg maxi eµt,i. Let Ft−1 be the sigma-algebra generated by the actions taken by the learner and the realized rewards up to the beginning of round t. Let us fix thresholds xi, yi satisfying µi ≤xi ≤yi ≤µ1 and define qt,i = P [ eµt,1 > yi| Ft−1]. Furthermore, we define the events Ebµ t,i = {bµt,i ≤xi} and Eeµ t,i = {eµt,i ≤yi}. With this notation at hand, we can decompose the number of draws of any suboptimal i as follows: E [NT,i] = T X t=1 P h It = i, Eeµ t,i, Ebµ t,i i + T X t=1 P h It = i, Eeµ t,i, Ebµ t,i i + T X t=1 P h It = i, Ebµ t,i i . (5) It remains to choose the thresholds xi and yi in a meaningful way: we pick xi = µi + ∆i 3 and yi = µ1 −∆i 3 . The rest of the proof is devoted to bounding each term in Eq. (5). Intuitively, the individual terms capture the following events: • The first term counts the number of times that, even though the estimated mean reward of arm i is well-concentrated and the additional perturbation Zt.i is not too large, arm i was drawn instead of the optimal arm 1. This happens when the optimal arm is poorly estimated or when the perturbation Zt,1 is not large enough. Intuitively, this term measures the interaction between the perturbations Zt,1 and the random fluctuations of the reward estimate bµt,1 around its true mean, and will be small if the perturbations tend to be large enough and the tail of the reward estimates is light enough. 6 • The second term counts the number of times that the mean reward of arm i is well-estimated, but it ends up being drawn due to a large perturbation. This term can be bounded independently of the properties of the mean estimator and is small when the tail of the perturbation distribution is not too heavy. • The last term counts the number of times that the reward estimate of arm i is poorly concentrated. This term is independent of the perturbations and only depends on the properties of the reward estimator. As we will see, the first and the last terms can be bounded in terms of the moment generating function of the reward estimates, which makes subgaussian reward estimators particularly easy to treat. We begin by the most standard part of our analysis: bounding the third term on the right-hand-side of (5) in terms of the moment-generating function. Lemma 1. Let us fix any i and define τk as the k’th time that arm i was drawn. We have T X t=1 P h It = i, Ebµ t,i i ≤1 + T −1 X k=1 E exp bµτk,i −µi βτk,i · e−∆i √ k 3C . Interestingly, our next key result shows that the first term can be bounded by a nearly identical expression: Lemma 2. Let us define τk as the k’th time that arm 1 was drawn. For any i, we have T X t=1 P h It = i, Eeµ t,i, Ebµ t,i i ≤ T −1 X k=0 E exp µ1 −bµτk,1 βτk,1 e−γ−∆i √ k 3C . It remains to bound the second term in Equation (5), which we do in the following lemma: Lemma 3. For any i ̸= 1 and any constant c > 0, we have T X t=1 P h It = i, Eeµ t,i, Ebµ t,i i ≤9C2 log2 + T∆2 i /c2 + c2eγ ∆2 i . The proofs of these three lemmas are included in the supplementary material. 5.1 The proof of Theorem 3 For this section, we assume that the rewards are σ-subgaussian and that bµt,i is the empirical-mean estimator. Building on the results of the previous section, observe that we are left with bounding the terms appearing in Lemmas 1 and 2. To this end, let us fix a k and an i and notice that by the subgaussianity assumption on the rewards, the empirical mean eµτk,i is σ √ k-subgaussian (as Nτk,i = k). In other words, E h eα(bµτk,i−µi)i ≤eα2σ2/2k holds for any α. In particular, using this above formula for α = 1/βτk,i = q k C2 , we obtain E exp bµτk,i −µi βτk,i ≤eσ2/2C2. Thus, the sum appearing in Lemma 1 can be bounded as T −1 X k=1 E exp bµτk,i −µi βτk,i · e−∆i √ k 3C ≤eσ2/2C2 T −1 X k=1 e−∆i √ k 3C ≤18C2eσ2/2C2 ∆2 i , where the last step follows from the fact3 that P∞ k=0 ec √ k ≤ 2 c2 holds for all c > 0. The statement of Theorem 3 now follows from applying the same argument to the bound of Lemma 2, using Lemma 3, and the standard expression for the regret in Equation (2). 3This can be easily seen by bounding the sum with an integral. 7 10 -2 10 0 10 2 C2 0 2000 4000 6000 8000 10000 regret (a) 10 -2 10 0 10 2 C2 0 2000 4000 6000 8000 10000 regret (b) BE(const) BE(log) BE(sqrt) BGE UCB Figure 1: Empirical performance of Boltzmann exploration variants, Boltzmann–Gumbel exploration and UCB for (a) i.i.d. initialization and (b) malicious initialization, as a function of C2. The dotted vertical line corresponds to the choice C2 = 1/4 suggested by Theorem 3. 5.2 The proof of Theorem 5 We now drop the subgaussian assumption on the rewards and consider reward distributions that are possibly heavy-tailed, but have bounded variance. The proof of Theorem 5 trivially follows from the arguments in the previous subsection and using Proposition 2.1 of Catoni [11] (with θ = 0) that guarantees the bound E exp ±µi −bµt,i βt,i Nt,i = n ≤exp E X2 i 2C2 ! . (6) 6 Experiments This section concludes by illustrating our theoretical results through some experiments, highlighting the limitations of Boltzmann exploration and contrasting it with the performance of Boltzmann– Gumbel exploration. We consider a stochastic multi-armed bandit problem with K = 10 arms each yielding Bernoulli rewards with mean µi = 1/2 for all suboptimal arms i > 1 and µ1 = 1/2 + ∆for the optimal arm. We set the horizon to T = 106 and the gap parameter to ∆= 0.01. We compare three variants of Boltzmann exploration with inverse learning rate parameters • βt = C2 (BE-const), • βt = C2/ log t (BE-log), and • βt = C2/ √ t (BE-sqrt) for all t, and compare it with Boltzmann–Gumbel exploration (BGE), and UCB with exploration bonus p C2 log(t)/Nt,i. We study two different scenarios: (a) all rewards drawn i.i.d. from the Bernoulli distributions with the means given above and (b) the first T0 = 5,000 rewards set to 0 for arm 1. The latter scenario simulates the situation described in the proof of Theorem 1, and in particular exposes the weakness of Boltzmann exploration with increasing learning rate parameters. The results shown on Figure 1 (a) and (b) show that while some variants of Boltzmann exploration may perform reasonably well when initial rewards take typical values and the parameters are chosen luckily, all standard versions fail to identify the optimal arm when the initial draws are not representative of the true mean (which happens with a small constant probability). On the other hand, UCB and Boltzmann–Gumbel exploration continue to perform well even under this unlikely event, as predicted by their respective theoretical guarantees. Notably, Boltzmann–Gumbel exploration performs comparably to UCB in this example (even slightly outperforming its competitor here), and performs notably well for the recommended parameter setting of C2 = σ2 = 1/4 (noting that Bernoulli random variables are 1/4-subgaussian). 8 Acknowledgements Gábor Lugosi was supported by the Spanish Ministry of Economy and Competitiveness, Grant MTM2015-67304-P and FEDER, EU. Gergely Neu was supported by the UPFellows Fellowship (Marie Curie COFUND program n◦600387). References [1] J. Abernethy, C. Lee, A. Sinha, and A. Tewari. Online linear optimization via smoothing. In M.-F. Balcan and Cs. Szepesvári, editors, Proceedings of The 27th Conference on Learning Theory, volume 35 of JMLR Proceedings, pages 807–823. JMLR.org, 2014. [2] S. Agrawal and N. Goyal. Further optimal regret bounds for thompson sampling. In AISTATS, pages 99–107, 2013. [3] S. Arora, E. Hazan, and S. Kale. The multiplicative weights update method: A meta-algorithm and applications. Theory of Computing, 8:121–164, 2012. [4] J.-Y. Audibert and S. Bubeck. Minimax policies for bandits games. In S. Dasgupta and A. Klivans, editors, Proceedings of the 22nd Annual Conference on Learning Theory. Omnipress, June 18–21 2009. [5] P. Auer and R. Ortner. UCB revisited: Improved regret bounds for the stochastic multi-armed bandit problem. Periodica Mathematica Hungarica, 61:55–65, 2010. ISSN 0031-5303. [6] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. Gambling in a rigged casino: The adversarial multi-armed bandit problem. In Foundations of Computer Science, 1995. Proceedings., 36th Annual Symposium on, pages 322–331. IEEE, 1995. [7] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Mach. Learn., 47(2-3):235–256, May 2002. ISSN 0885-6125. doi: 10.1023/A:1013689704352. URL http://dx.doi.org/10.1023/A:1013689704352. [8] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The nonstochastic multiarmed bandit problem. SIAM J. Comput., 32(1):48–77, 2002. ISSN 0097-5397. [9] S. Bubeck and N. Cesa-Bianchi. Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems. Now Publishers Inc, 2012. [10] O. Cappé, A. Garivier, O.-A. Maillard, R. Munos, G. Stoltz, et al. Kullback–leibler upper confidence bounds for optimal sequential allocation. The Annals of Statistics, 41(3):1516–1541, 2013. [11] O. Catoni. Challenging the empirical mean and empirical variance: A deviation study. Annales de l’Institut Henri Poincaré, Probabilités et Statistiques, 48(4):1148–1185, 11 2012. [12] N. Cesa-Bianchi and P. Fischer. Finite-time regret bounds for the multiarmed bandit problem. In ICML, pages 100–108, 1998. [13] A. Garivier, E. Kaufmann, and T. Lattimore. On explore-then-commit strategies. In NIPS, 2016. [14] L. P. Kaelbling, M. L. Littman, and A. W. Moore. Reinforcement learning: A survey. Journal of artificial intelligence research, 4:237–285, 1996. [15] E. Kaufmann, N. Korda, and R. Munos. Thompson sampling: An asymptotically optimal finite-time analysis. In ALT’12, pages 199–213, 2012. [16] V. Kuleshov and D. Precup. Algorithms for multi-armed bandit problems. arXiv preprint arXiv:1402.6028, 2014. [17] T. L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6:4–22, 1985. [18] I. Osband, B. Van Roy, and Z. Wen. Generalization and exploration via randomized value functions. 2016. 9 [19] T. Perkins and D. Precup. A convergent form of approximate policy iteration. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 1595–1602, Cambridge, MA, USA, 2003. MIT Press. [20] Y. Seldin and A. Slivkins. One practical algorithm for both stochastic and adversarial bandits. In Proceedings of the 30th International Conference on Machine Learning (ICML 2014), pages 1287–1295, 2014. [21] S. P. Singh, T. Jaakkola, M. L. Littman, and Cs. Szepesvári. Convergence results for single-step on-policy reinforcement-learning algorithms. Machine Learning, 38(3):287–308, 2000. URL citeseer.ist.psu.edu/article/singh98convergence.html. [22] R. Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Proceedings of the Seventh International Conference on Machine Learning, pages 216–224. San Mateo, CA, 1990. [23] R. Sutton and A. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. [24] R. S. Sutton, D. A. McAllester, S. P. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In S. Solla, T. Leen, and K. Müller, editors, Advances in Neural Information Processing Systems 12, pages 1057–1063, Cambridge, MA, USA, 1999. MIT Press. [25] Cs. Szepesvári. Algorithms for Reinforcement Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2010. [26] J. Vermorel and M. Mohri. Multi-armed bandit algorithms and empirical evaluation. In European conference on machine learning, pages 437–448. Springer, 2005. 10 | 2017 | 470 |
6,975 | End-to-End Differentiable Proving Tim Rocktäschel University of Oxford tim.rocktaschel@cs.ox.ac.uk Sebastian Riedel University College London & Bloomsbury AI s.riedel@cs.ucl.ac.uk Abstract We introduce neural networks for end-to-end differentiable proving of queries to knowledge bases by operating on dense vector representations of symbols. These neural networks are constructed recursively by taking inspiration from the backward chaining algorithm as used in Prolog. Specifically, we replace symbolic unification with a differentiable computation on vector representations of symbols using a radial basis function kernel, thereby combining symbolic reasoning with learning subsymbolic vector representations. By using gradient descent, the resulting neural network can be trained to infer facts from a given incomplete knowledge base. It learns to (i) place representations of similar symbols in close proximity in a vector space, (ii) make use of such similarities to prove queries, (iii) induce logical rules, and (iv) use provided and induced logical rules for multi-hop reasoning. We demonstrate that this architecture outperforms ComplEx, a state-of-the-art neural link prediction model, on three out of four benchmark knowledge bases while at the same time inducing interpretable function-free first-order logic rules. 1 Introduction Current state-of-the-art methods for automated Knowledge Base (KB) completion use neural link prediction models to learn distributed vector representations of symbols (i.e. subsymbolic representations) for scoring fact triples [1–7]. Such subsymbolic representations enable these models to generalize to unseen facts by encoding similarities: If the vector of the predicate symbol grandfatherOf is similar to the vector of the symbol grandpaOf, both predicates likely express a similar relation. Likewise, if the vector of the constant symbol LISA is similar to MAGGIE, similar relations likely hold for both constants (e.g. they live in the same city, have the same parents etc.). This simple form of reasoning based on similarities is remarkably effective for automatically completing large KBs. However, in practice it is often important to capture more complex reasoning patterns that involve several inference steps. For example, if ABE is the father of HOMER and HOMER is a parent of BART, we would like to infer that ABE is a grandfather of BART. Such transitive reasoning is inherently hard for neural link prediction models as they only learn to score facts locally. In contrast, symbolic theorem provers like Prolog [8] enable exactly this type of multi-hop reasoning. Furthermore, Inductive Logic Programming (ILP) [9] builds upon such provers to learn interpretable rules from data and to exploit them for reasoning in KBs. However, symbolic provers lack the ability to learn subsymbolic representations and similarities between them from large KBs, which limits their ability to generalize to queries with similar but not identical symbols. While the connection between logic and machine learning has been addressed by statistical relational learning approaches, these models traditionally do not support reasoning with subsymbolic representations (e.g. [10]), and when using subsymbolic representations they are not trained end-to-end from training data (e.g. [11–13]). Neural multi-hop reasoning models [14–18] address the aforementioned limitations to some extent by encoding reasoning chains in a vector space or by iteratively refining subsymbolic representations of a question before comparison with answers. In many ways, these models operate like basic theorem provers, but they lack two of their most crucial ingredients: 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. interpretability and straightforward ways of incorporating domain-specific knowledge in form of rules. Our approach to this problem is inspired by recent neural network architectures like Neural Turing Machines [19], Memory Networks [20], Neural Stacks/Queues [21, 22], Neural Programmer [23], Neural Programmer-Interpreters [24], Hierarchical Attentive Memory [25] and the Differentiable Forth Interpreter [26]. These architectures replace discrete algorithms and data structures by end-toend differentiable counterparts that operate on real-valued vectors. At the heart of our approach is the idea to translate this concept to basic symbolic theorem provers, and hence combine their advantages (multi-hop reasoning, interpretability, easy integration of domain knowledge) with the ability to reason with vector representations of predicates and constants. Specifically, we keep variable binding symbolic but compare symbols using their subsymbolic vector representations. Concretely, we introduce Neural Theorem Provers (NTPs): End-to-end differentiable provers for basic theorems formulated as queries to a KB. We use Prolog’s backward chaining algorithm as a recipe for recursively constructing neural networks that are capable of proving queries to a KB using subsymbolic representations. The success score of such proofs is differentiable with respect to vector representations of symbols, which enables us to learn such representations for predicates and constants in ground atoms, as well as parameters of function-free first-order logic rules of predefined structure. By doing so, NTPs learn to place representations of similar symbols in close proximity in a vector space and to induce rules given prior assumptions about the structure of logical relationships in a KB such as transitivity. Furthermore, NTPs can seamlessly reason with provided domain-specific rules. As NTPs operate on distributed representations of symbols, a single hand-crafted rule can be leveraged for many proofs of queries with symbols that have a similar representation. Finally, NTPs demonstrate a high degree of interpretability as they induce latent rules that we can decode to human-readable symbolic rules. Our contributions are threefold: (i) We present the construction of NTPs inspired by Prolog’s backward chaining algorithm and a differentiable unification operation using subsymbolic representations, (ii) we propose optimizations to this architecture by joint training with a neural link prediction model, batch proving, and approximate gradient calculation, and (iii) we experimentally show that NTPs can learn representations of symbols and function-free first-order rules of predefined structure, enabling them to learn to perform multi-hop reasoning on benchmark KBs and to outperform ComplEx [7], a state-of-the-art neural link prediction model, on three out of four KBs. 2 Background In this section, we briefly introduce the syntax of KBs that we use in the remainder of the paper. We refer the reader to [27, 28] for a more in-depth introduction. An atom consists of a predicate symbol and a list of terms. We will use lowercase names to refer to predicate and constant symbols (e.g. fatherOf and BART), and uppercase names for variables (e.g. X, Y, Z). As we only consider function-free first-order logic rules, a term can only be a constant or a variable. For instance, [grandfatherOf, Q, BART] is an atom with the predicate grandfatherOf, and two terms, the variable Q and the constant BART. We consider rules of the form H :– B, where the body B is a possibly empty conjunction of atoms represented as a list, and the head H is an atom. We call a rule with no free variables a ground rule. All variables are universally quantified. We call a ground rule with an empty body a fact. A substitution set = {X1/t1, . . . , XN/tN} is an assignment of variable symbols Xi to terms ti, and applying substitutions to an atom replaces all occurrences of variables Xi by their respective term ti. Given a query (also called goal) such as [grandfatherOf, Q, BART], we can use Prolog’s backward chaining algorithm to find substitutions for Q [8] (see appendix A for pseudocode). On a high level, backward chaining is based on two functions called OR and AND. OR iterates through all rules (including rules with an empty body, i.e., facts) in a KB and unifies the goal with the respective rule head, thereby updating a substitution set. It is called OR since any successful proof suffices (disjunction). If unification succeeds, OR calls AND to prove all atoms (subgoals) in the body of the rule. To prove subgoals of a rule body, AND first applies substitutions to the first atom that is then proven by again calling OR, before proving the remaining subgoals by recursively calling AND. This function is called AND as all atoms in the body need to be proven together (conjunction). As an example, a rule such as [grandfatherOf, X, Y] :– [[fatherOf, X, Z], [parentOf, Z, Y]] is used 2 in OR for translating a goal like [grandfatherOf, Q, BART] into subgoals [fatherOf, Q, Z] and [parentOf, Z, BART] that are subsequently proven by AND.1 3 Differentiable Prover In the following, we describe the recursive construction of NTPs – neural networks for end-to-end differentiable proving that allow us to calculate the gradient of proof successes with respect to vector representations of symbols. We define the construction of NTPs in terms of modules similar to dynamic neural module networks [29]. Each module takes as inputs discrete objects (atoms and rules) and a proof state, and returns a list of new proof states (see Figure 1 for a graphical representation). X/Q Y/BART S S⇢ X/Q Y/BART Z/HOMER S0 S0 ⇢ Figure 1: A module is mapping an upstream proof state (left) to a list of new proof states (right), thereby extending the substitution set S and adding nodes to the computation graph of the neural network S⇢representing the proof success. A proof state S = ( , ⇢) is a tuple consisting of the substitution set constructed in the proof so far and a neural network ⇢that outputs a real-valued success score of a (partial) proof. While discrete objects and the substitution set are only used during construction of the neural network, once the network is constructed a continuous proof success score can be calculated for many different goals at training and test time. To summarize, modules are instantiated by discrete objects and the substitution set. They construct a neural network representing the (partial) proof success score and recursively instantiate submodules to continue the proof. The shared signature of modules is D⇥S ! SN where D is a domain that controls the construction of the network, S is the domain of proof states, and N is the number of output proof states. Furthermore, let S denote the substitution set of the proof state S and let S⇢denote the neural network for calculating the proof success. We use pseudocode in style of a functional programming language to define the behavior of modules and auxiliary functions. Particularly, we are making use of pattern matching to check for properties of arguments passed to a module. We denote sets by Euler script letters (e.g. E), lists by small capital letters (e.g. E), lists of lists by blackboard bold letters (e.g. E) and we use : to refer to prepending an element to a list (e.g. e : E or E : E). While an atom is a list of a predicate symbol and terms, a rule can be seen as a list of atoms and thus a list of lists where the head of the list is the rule head.2 3.1 Unification Module Unification of two atoms, e.g., a goal that we want to prove and a rule head, is a central operation in backward chaining. Two non-variable symbols (predicates or constants) are checked for equality and the proof can be aborted if this check fails. However, we want to be able to apply rules even if symbols in the goal and head are not equal but similar in meaning (e.g. grandfatherOf and grandpaOf) and thus replace symbolic comparison with a computation that measures the similarity of both symbols in a vector space. The module unify updates a substitution set and creates a neural network for comparing the vector representations of non-variable symbols in two sequences of terms. The signature of this module is L ⇥L ⇥S ! S where L is the domain of lists of terms. unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success). To this end, unify iterates through the list of terms of two atoms and compares their symbols. If one of the symbols is a variable, a substitution is added to the substitution set. Otherwise, the vector representations of the two non-variable symbols are compared using a Radial Basis Function (RBF) kernel [30] where µ is a hyperparameter that we set to 1 p 2 in our experiments. The following pseudocode implements unify. Note that "_" matches every argument and that the 1For clarity, we will sometimes omit lists when writing rules and atoms, e.g., grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y). 2For example, [[grandfatherOf, X, Y], [fatherOf, X, Z], [parentOf, Z, Y]]. 3 order matters, i.e., if arguments match a line, subsequent lines are not evaluated. 1. unify✓([ ], [ ], S) = S 2. unify✓([ ], _, _) = FAIL 3. unify✓(_, [ ], _) = FAIL 4. unify✓(h : H, g : G, S) = unify✓(H, G, S0) = (S0 , S0 ⇢) where S0 = 8 < : S [ {h/g} if h 2 V S [ {g/h} if g 2 V, h 62 V S otherwise 9 = ; , S0 ⇢= min S⇢, ( exp ⇣ −k✓h:−✓g:k2 2µ2 ⌘ if h, g 62 V 1 otherwise )! Here, S0 refers to the new proof state, V refers to the set of variable symbols, h/g is a substitution from the variable symbol h to the symbol g, and ✓g: denotes the embedding lookup of the non-variable symbol with index g. unify is parameterized by an embedding matrix ✓2 R|Z|⇥k where Z is the set of non-variables symbols and k is the dimension of vector representations of symbols. Furthermore, FAIL represents a unification failure due to mismatching arity of two atoms. Once a failure is reached, we abort the creation of the neural network for this branch of proving. In addition, we constrain proofs to be cycle-free by checking whether a variable is already bound. Note that this is a simple heuristic that prohibits applying the same non-ground rule twice. There are more sophisticated ways for finding and avoiding cycles in a proof graph such that the same rule can still be applied multiple times (e.g. [31]), but we leave this for future work. Example Assume that we are unifying two atoms [grandpaOf, ABE, BART] and [s, Q, i] given an upstream proof state S = (?, ⇢) where the latter input atom has placeholders for a predicate s and a constant i, and the neural network ⇢would output 0.7 when evaluated. Furthermore, assume grandpaOf, ABE and BART represent the indices of the respective symbols in a global symbol vocabulary. Then, the new proof state constructed by unify is: unify✓([grandpaOf, ABE, BART], [s, Q, i], (?, ⇢)) = (S0 , S0 ⇢) = ! {Q/ABE}, min ! ⇢, exp(−k✓grandpaOf: −✓s:k2), exp(−k✓BART: −✓i:k2) "" Thus, the output score of the neural network S0 ⇢will be high if the subsymbolic representation of the input s is close to grandpaOf and the input i is close to BART. However, the score cannot be higher than 0.7 due to the upstream proof success score in the forward pass of the neural network ⇢. Note that in addition to extending the neural networks ⇢to S0 ⇢, this module also outputs a substitution set {Q/ABE} at graph creation time that will be used to instantiate submodules. 3.2 OR Module Based on unify, we now define the or module which attempts to apply rules in a KB. The signature of or is L ⇥N ⇥S ! SN where L is the domain of goal atoms and N is the domain of integers used for specifying the maximum proof depth of the neural network. Furthermore, N is the number of possible output proof states for a goal of a given structure and a provided KB.3 We implement or as 1. orK ✓(G, d, S) = [S0 | S0 2 andK ✓(B, d, unify✓(H, G, S)) for H :– B 2 K] where H :– B denotes a rule in a given KB K with a head atom H and a list of body atoms B. In contrast to the symbolic OR method, the or module is able to use the grandfatherOf rule above for a query involving grandpaOf provided that the subsymbolic representations of both predicates are similar as measured by the RBF kernel in the unify module. Example For a goal [s, Q, i], or would instantiate an and submodule based on the rule [grandfatherOf, X, Y] :– [[fatherOf, X, Z], [parentOf, Z, Y]] as follows orK ✓([s, Q, i], d, S) = [S0|S0 2 andK ✓([[fatherOf, X, Z], [parentOf, Z, Y]], d, ({X/Q, Y/i}, ˆS⇢) | {z } result of unify ), . . .] 3The creation of the neural network is dependent on the KB but also the structure of the goal. For instance, the goal s(Q, i) would result in a different neural network, and hence a different number of output proof states, than s(i, j). 4 3.3 AND Module For implementing and we first define an auxiliary function called substitute which applies substitutions to variables in an atom if possible. This is realized via 1. substitute([ ], _) = [ ] 2. substitute(g : G, ) = ⇢ x if g/x 2 g otherwise $ : substitute(G, ) For example, substitute([fatherOf, X, Z], {X/Q, Y/i}) results in [fatherOf, Q, Z]. The signature of and is L ⇥N ⇥S ! SN where L is the domain of lists of atoms and N is the number of possible output proof states for a list of atoms with a known structure and a provided KB. This module is implemented as 1. andK ✓(_, _, FAIL) = FAIL 2. andK ✓(_, 0, _) = FAIL 3. andK ✓([ ], _, S) = S 4. andK ✓(G : G, d, S) = [S00 | S00 2 andK ✓(G, d, S0) for S0 2 orK ✓(substitute(G, S ), d −1, S)] where the first two lines define the failure of a proof, either because of an upstream unification failure that has been passed from the or module (line 1), or because the maximum proof depth has been reached (line 2). Line 3 specifies a proof success, i.e., the list of subgoals is empty before the maximum proof depth has been reached. Lastly, line 4 defines the recursion: The first subgoal G is proven by instantiating an or module after substitutions are applied, and every resulting proof state S0 is used for proving the remaining subgoals G by again instantiating and modules. Example Continuing the example from Section 3.2, the and module would instantiate submodules as follows: andK ✓([[fatherOf, X, Z], [parentOf, Z, Y]], d, ({X/Q, Y/i}, ˆS⇢) | {z } result of unify in or ) = [S00|S00 2 andK ✓([[parentOf, Z, Y]], d, S0) for S0 2 orK ✓([fatherOf, Q, Z] | {z } result of substitute , d −1, ({X/Q, Y/i}, ˆS⇢) | {z } result of unify in or )] 3.4 Proof Aggregation Finally, we define the overall success score of proving a goal G using a KB K with parameters ✓as ntpK ✓(G, d) = arg max S 2 orK ✓(G,d,(?,1)) S6=FAIL S⇢ where d is a predefined maximum proof depth and the initial proof state is set to an empty substitution set and a proof success score of 1. Example Figure 2 illustrates an examplary NTP computation graph constructed for a toy KB. Note that such an NTP is constructed once before training, and can then be used for proving goals of the structure [s, i, j] at training and test time where s is the index of an input predicate, and i and j are indices of input constants. Final proof states which are used in proof aggregation are underlined. 3.5 Neural Inductive Logic Programming We can use NTPs for ILP by gradient descent instead of a combinatorial search over the space of rules as, for example, done by the First Order Inductive Learner (FOIL) [32]. Specifically, we are using the concept of learning from entailment [9] to induce rules that let us prove known ground atoms, but that do not give high proof success scores to sampled unknown ground atoms. Let ✓r:, ✓s:, ✓t: 2 Rk be representations of some unknown predicates with indices r, s and t respectively. The prior knowledge of a transitivity between three unknown predicates can be specified via 5 orK ✓([s, i, j], 2, (?, 1)) unify✓([fatherOf, ABE, HOMER], [s, i, j], (?, 1)) unify✓([grandfatherOf, X, Y], [s, i, j], (?, 1)) 1. 3. S1 = (?, ⇢1) S2 = (?, ⇢2) 2. . . . andK ✓([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3) S3 = ({X/i, Y/j}, ⇢3) orK ✓([fatherOf, i, Z], 1, S3) substitute unify✓([fatherOf, ABE, HOMER], [fatherOf, i, Z], S3) unify✓([parentOf, HOMER, BART], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK ✓([parentOf, Z, Y], 2, S31) S31 = ({X/i, Y/j, Z/HOMER}, ⇢31) orK ✓([parentOf, HOMER, j], 1, S31) substitute S311 = ({X/i, Y/j, Z/HOMER}, ⇢311) S312 = ({X/i, Y/j, Z/HOMER}, ⇢312) S313 = FAIL 1. . . . 2. . . . 3. . . . andK ✓([parentOf, Z, Y], 2, S32) S32 = ({X/i, Y/j, Z/BART}, ⇢32) orK ✓([parentOf, BART, j], 1, S32) substitute S321 = ({X/i, Y/j, Z/BART}, ⇢321) S322 = ({X/i, Y/j, Z/BART}, ⇢322) S323 = FAIL 1. . . . 2. . . . 3. . . . Example Knowledge Base: 1. fatherOf(ABE, HOMER). 2. parentOf(HOMER, BART). 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y). Figure 2: Exemplary construction of an NTP computation graph for a toy knowledge base. Indices on arrows correspond to application of the respective KB rule. Proof states (blue) are subscripted with the sequence of indices of the rules that were applied. Underlined proof states are aggregated to obtain the final proof success. Boxes visualize instantiations of modules (omitted for unify). The proofs S33, S313 and S323 fail due to cycle-detection (the same rule cannot be applied twice). r(X, Y) :– s(X, Z), t(Z, Y). We call this a parameterized rule as the corresponding predicates are unknown and their representations are learned from data. Such a rule can be used for proofs at training and test time in the same way as any other given rule. During training, the predicate representations of parameterized rules are optimized jointly with all other subsymbolic representations. Thus, the model can adapt parameterized rules such that proofs for known facts succeed while proofs for sampled unknown ground atoms fail, thereby inducing rules of predefined structures like the one above. Inspired by [33], we use rule templates for conveniently defining the structure of multiple parameterized rules by specifying the number of parameterized rules that should be instantiated for a given rule structure (see appendix E for examples). For inspection after training, we decode a parameterized rule by searching for the closest representations of known predicates. In addition, we provide users with a rule confidence by taking the minimum similarity between unknown and decoded predicate representations using the RBF kernel in unify. This confidence score is an upper bound on the proof success score that can be achieved when the induced rule is used in proofs. 4 Optimization In this section, we present the basic training loss that we use for NTPs, a training loss where a neural link prediction models is used as auxiliary task, as well as various computational optimizations. 4.1 Training Objective Let K be the set of known facts in a given KB. Usually, we do not observe negative facts and thus resort to sampling corrupted ground atoms as done in previous work [34]. Specifically, for every [s, i, j] 2 K we obtain corrupted ground atoms [s,ˆi, j], [s, i, ˆj], [s,˜i, ˜j] 62 K by sampling ˆi, ˆj,˜i and ˜j from the set of constants. These corrupted ground atoms are resampled in every iteration of training, and we denote the set of known and corrupted ground atoms together with their target score (1.0 for known ground atoms and 0.0 for corrupted ones) as T . We use the negative log-likelihood of the proof success score as loss function for an NTP with parameters ✓and a given KB K LntpK ✓= X ([s,i,j],y) 2 T −y log(ntpK ✓([s, i, j], d)⇢) −(1 −y) log(1 −ntpK ✓([s, i, j], d)⇢) where [s, i, j] is a training ground atom and y its target proof success score. Note that since in our application all training facts are ground atoms, we only make use of the proof success score ⇢and not 6 the substitution list of the resulting proof state. We can prove known facts trivially by a unification with themselves, resulting in no parameter updates during training and hence no generalization. Therefore, during training we are masking the calculation of the unification success of a known ground atom that we want to prove. Specifically, we set the unification score to 0 to temporarily hide that training fact and assume it can be proven from other facts and rules in the KB. 4.2 Neural Link Prediction as Auxiliary Loss At the beginning of training all subsymbolic representations are initialized randomly. When unifying a goal with all facts in a KB we consequently get very noisy success scores in early stages of training. Moreover, as only the maximum success score will result in gradient updates for the respective subsymbolic representations along the maximum proof path, it can take a long time until NTPs learn to place similar symbols close to each other in the vector space and to make effective use of rules. To speed up learning subsymbolic representations, we train NTPs jointly with ComplEx [7] (Appendix B). ComplEx and the NTP share the same subsymbolic representations, which is feasible as the RBF kernel in unify is also defined for complex vectors. While the NTP is responsible for multi-hop reasoning, the neural link prediction model learns to score ground atoms locally. At test time, only the NTP is used for predictions. Thus, the training loss for ComplEx can be seen as an auxiliary loss for the subsymbolic representations learned by the NTP. We term the resulting model NTPλ. Based on the loss in Section 4.1, the joint training loss is defined as LntpλK ✓= LntpK ✓+ X ([s,i,j],y) 2 T −y log(complex✓(s, i, j)) −(1 −y) log(1 −complex✓(s, i, j)) where [s, i, j] is a training atom and y its ground truth target. 4.3 Computational Optimizations NTPs as described above suffer from severe computational limitations since the neural network is representing all possible proofs up to some predefined depth. In contrast to symbolic backward chaining where a proof can be aborted as soon as unification fails, in differentiable proving we only get a unification failure for atoms whose arity does not match or when we detect cyclic rule application. We propose two optimizations to speed up NTPs in the Appendix. First, we make use of modern GPUs by batch processing many proofs in parallel (Appendix C). Second, we exploit the sparseness of gradients caused by the min and max operations used in the unification and proof aggregation respectively to derive a heuristic for a truncated forward and backward pass that drastically reduces the number of proofs that have to be considered for calculating gradients (Appendix D). 5 Experiments Consistent with previous work, we carry out experiments on four benchmark KBs and compare ComplEx with the NTP and NTPλ in terms of area under the Precision-Recall-curve (AUC-PR) on the Countries KB, and Mean Reciprocal Rank (MRR) and HITS@m [34] on the other KBs described below. Training details, including hyperparameters and rule templates, can be found in Appendix E. Countries The Countries KB is a dataset introduced by [35] for testing reasoning capabilities of neural link prediction models. It consists of 244 countries, 5 regions (e.g. EUROPE), 23 subregions (e.g. WESTERN EUROPE, NORTHERN AMERICA), and 1158 facts about the neighborhood of countries, and the location of countries and subregions. We follow [36] and split countries randomly into a training set of 204 countries (train), a development set of 20 countries (dev), and a test set of 20 countries (test), such that every dev and test country has at least one neighbor in the training set. Subsequently, three different task datasets are created. For all tasks, the goal is to predict locatedIn(c, r) for every test country c and all five regions r, but the access to training atoms in the KB varies. S1: All ground atoms locatedIn(c, r) where c is a test country and r is a region are removed from the KB. Since information about the subregion of test countries is still contained in the KB, this task can be solved by using the transitivity rule locatedIn(X, Y) :– locatedIn(X, Z), locatedIn(Z, Y). S2: In addition to S1, all ground atoms locatedIn(c, s) are removed where c is a test country and s 7 Table 1: AUC-PR results on Countries and MRR and HITS@m on Kinship, Nations, and UMLS. Corpus Metric Model Examples of induced rules and their confidence ComplEx NTP NTPλ Countries S1 AUC-PR 99.37 ± 0.4 90.83 ± 15.4 100.00 ± 0.0 0.90 locatedIn(X,Y) :– locatedIn(X,Z), locatedIn(Z,Y). S2 AUC-PR 87.95 ± 2.8 87.40 ± 11.7 93.04 ± 0.4 0.63 locatedIn(X,Y) :– neighborOf(X,Z), locatedIn(Z,Y). S3 AUC-PR 48.44 ± 6.3 56.68 ± 17.6 77.26 ± 17.0 0.32 locatedIn(X,Y) :– neighborOf(X,Z), neighborOf(Z,W), locatedIn(W,Y). Kinship MRR 0.81 0.60 0.80 0.98 term15(X,Y) :– term5(Y,X) HITS@1 0.70 0.48 0.76 0.97 term18(X,Y) :– term18(Y,X) HITS@3 0.89 0.70 0.82 0.86 term4(X,Y) :– term4(Y,X) HITS@10 0.98 0.78 0.89 0.73 term12(X,Y) :– term10(X, Z), term12(Z, Y). Nations MRR 0.75 0.75 0.74 0.68 blockpositionindex(X,Y) :– blockpositionindex(Y,X). HITS@1 0.62 0.62 0.59 0.46 expeldiplomats(X,Y) :– negativebehavior(X,Y). HITS@3 0.84 0.86 0.89 0.38 negativecomm(X,Y) :– commonbloc0(X,Y). HITS@10 0.99 0.99 0.99 0.38 intergovorgs3(X,Y) :– intergovorgs(Y,X). UMLS MRR 0.89 0.88 0.93 0.88 interacts_with(X,Y) :– HITS@1 0.82 0.82 0.87 interacts_with(X,Z), interacts_with(Z,Y). HITS@3 0.96 0.92 0.98 0.77 isa(X,Y) :– isa(X,Z), isa(Z,Y). HITS@10 1.00 0.97 1.00 0.71 derivative_of(X,Y) :– derivative_of(X,Z), derivative_of(Z,Y). is a subregion. The location of test countries needs to be inferred from the location of its neighboring countries: locatedIn(X, Y) :– neighborOf(X, Z), locatedIn(Z, Y). This task is more difficult than S1, as neighboring countries might not be in the same region, so the rule above will not always hold. S3: In addition to S2, all ground atoms locatedIn(c, r) where r is a region and c is a training country that has a test or dev country as a neighbor are also removed. The location of test countries can for instance be inferred using the three-hop rule locatedIn(X, Y) :– neighborOf(X, Z), neighborOf(Z, W), locatedIn(W, Y). Kinship, Nations & UMLS We use the Nations, Alyawarra kinship (Kinship) and Unified Medical Language System (UMLS) KBs from [10]. We left out the Animals dataset as it only contains unary predicates and can thus not be used for evaluating multi-hop reasoning. Nations contains 56 binary predicates, 111 unary predicates, 14 constants and 2565 true facts, Kinship contains 26 predicates, 104 constants and 10686 true facts, and UMLS contains 49 predicates, 135 constants and 6529 true facts. Since our baseline ComplEx cannot deal with unary predicates, we remove unary atoms from Nations. We split every KB into 80% training facts, 10% development facts and 10% test facts. For evaluation, we take a test fact and corrupt its first and second argument in all possible ways such that the corrupted fact is not in the original KB. Subsequently, we predict a ranking of every test fact and its corruptions to calculate MRR and HITS@m. 6 Results and Discussion Results for the different model variants on the benchmark KBs are shown in Table 1. Another method for inducing rules in a differentiable way for automated KB completion has been introduced recently by [37] and our evaluation setup is equivalent to their Protocol II. However, our neural link prediction baseline, ComplEx, already achieves much higher HITS@10 results (1.00 vs. 0.70 on UMLS and 0.98 vs. 0.73 on Kinship). We thus focus on the comparison of NTPs with ComplEx. First, we note that vanilla NTPs alone do not work particularly well compared to ComplEx. They only outperform ComplEx on Countries S3 and Nations, but not on Kinship or UMLS. This demonstrates the difficulty of learning subsymbolic representations in a differentiable prover from unification alone, and the need for auxiliary losses. The NTPλ with ComplEx as auxiliary loss outperforms the other models in the majority of tasks. The difference in AUC-PR between ComplEx and NTPλ is significant for all Countries tasks (p < 0.0001). A major advantage of NTPs is that we can inspect induced rules which provide us with an interpretable representation of what the model has learned. The right column in Table 1 shows examples of induced rules by NTPλ (note that predicates on Kinship are anonymized). For Countries, the NTP recovered those rules that are needed for solving the three different tasks. On UMLS, the NTP induced transitivity rules. Those relationships are particularly hard to encode by neural link prediction models like ComplEx, as they are optimized to locally predict the score of a fact. 8 7 Related Work Combining neural and symbolic approaches to relational learning and reasoning has a long tradition and let to various proposed architectures over the past decades (see [38] for a review). Early proposals for neural-symbolic networks are limited to propositional rules (e.g., EBL-ANN [39], KBANN [40] and C-IL2P [41]). Other neural-symbolic approaches focus on first-order inference, but do not learn subsymbolic vector representations from training facts in a KB (e.g., SHRUTI [42], Neural Prolog [43], CLIP++ [44], Lifted Relational Neural Networks [45], and TensorLog [46]). Logic Tensor Networks [47] are in spirit similar to NTPs, but need to fully ground first-order logic rules. However, they support function terms, whereas NTPs currently only support function-free terms. Recent question-answering architectures such as [15, 17, 18] translate query representations implicitly in a vector space without explicit rule representations and can thus not easily incorporate domainspecific knowledge. In addition, NTPs are related to random walk [48, 49, 11, 12] and path encoding models [14, 16]. However, instead of aggregating paths from random walks or encoding paths to predict a target predicate, reasoning steps in NTPs are explicit and only unification uses subsymbolic representations. This allows us to induce interpretable rules, as well as to incorporate prior knowledge either in the form of rules or in the form of rule templates which define the structure of logical relationships that we expect to hold in a KB. Another line of work [50–54] regularizes distributed representations via domain-specific rules, but these approaches do not learn such rules from data and only support a restricted subset of first-order logic. NTPs are constructed from Prolog’s backward chaining and are thus related to Unification Neural Networks [55, 56]. However, NTPs operate on vector representations of symbols instead of scalar values, which are more expressive. As NTPs can learn rules from data, they are related to ILP systems such as FOIL [32], Sherlock [57] and meta-interpretive learning of higher-order dyadic Datalog (Metagol) [58]. While these ILP systems operate on symbols and search over the discrete space of logical rules, NTPs work with subsymbolic representations and induce rules using gradient descent. Recently, [37] introduced a differentiable rule learning system based on TensorLog and a neural network controller similar to LSTMs [59]. Their method is more scalable than the NTPs introduced here. However, on UMLS and Kinship our baseline already achieved stronger generalization by learning subsymbolic representations. Still, scaling NTPs to larger KBs for competing with more scalable relational learning methods is an open problem that we seek to address in future work. 8 Conclusion and Future Work We proposed an end-to-end differentiable prover for automated KB completion that operates on subsymbolic representations. To this end, we used Prolog’s backward chaining algorithm as a recipe for recursively constructing neural networks that can be used to prove queries to a KB. Specifically, we introduced a differentiable unification operation between vector representations of symbols. The constructed neural network allowed us to compute the gradient of proof successes with respect to vector representations of symbols, and thus enabled us to train subsymbolic representations end-toend from facts in a KB, and to induce function-free first-order logic rules using gradient descent. On benchmark KBs, our model outperformed ComplEx, a state-of-the-art neural link prediction model, on three out of four KBs while at the same time inducing interpretable rules. To overcome the computational limitations of the end-to-end differentiable prover introduced in this paper, we want to investigate the use of hierarchical attention [25] and reinforcement learning methods such as Monte Carlo tree search [60, 61] that have been used for learning to play Go [62] and chemical synthesis planning [63]. In addition, we plan to support function terms in the future. Based on [64], we are furthermore interested in applying NTPs to automated proving of mathematical theorems, either in logical or natural language form, similar to recent approaches by [65] and [66]. Acknowledgements We thank Pasquale Minervini, Tim Dettmers, Matko Bosnjak, Johannes Welbl, Naoya Inoue, Kai Arulkumaran, and the anonymous reviewers for very helpful comments on drafts of this paper. This work has been supported by a Google PhD Fellowship in Natural Language Processing, an Allen Distinguished Investigator Award, and a Marie Curie Career Integration Award. 9 References [1] Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. Factorizing YAGO: scalable machine learning for linked data. In Proceedings of the 21st World Wide Web Conference 2012, WWW 2012, Lyon, France, April 16-20, 2012, pages 271–280, 2012. doi: 10.1145/2187836.2187874. [2] Sebastian Riedel, Limin Yao, Andrew McCallum, and Benjamin M. Marlin. Relation extraction with matrix factorization and universal schemas. In Human Language Technologies: Conference of the North American Chapter of the Association of Computational Linguistics, Proceedings, June 9-14, 2013, Westin Peachtree Plaza Hotel, Atlanta, Georgia, USA, pages 74–84, 2013. [3] Richard Socher, Danqi Chen, Christopher D. Manning, and Andrew Y. Ng. Reasoning with neural tensor networks for knowledge base completion. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States., pages 926–934, 2013. [4] Kai-Wei Chang, Wen-tau Yih, Bishan Yang, and Christopher Meek. Typed tensor decomposition of knowledge bases for relation extraction. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 1568–1579, 2014. [5] Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Embedding entities and relations for learning and inference in knowledge bases. In International Conference on Learning Representations (ICLR), 2015. [6] Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoifung Poon, Pallavi Choudhury, and Michael Gamon. Representing text for joint embedding of text and knowledge bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, EMNLP 2015, Lisbon, Portugal, September 17-21, 2015, pages 1499–1509, 2015. [7] Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. Complex embeddings for simple link prediction. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pages 2071–2080, 2016. [8] Hervé Gallaire and Jack Minker, editors. Logic and Data Bases, Symposium on Logic and Data Bases, Centre d’études et de recherches de Toulouse, 1977, Advances in Data Base Theory, New York, 1978. Plemum Press. ISBN 0-306-40060-X. [9] Stephen Muggleton. Inductive logic programming. New Generation Comput., 8(4):295–318, 1991. doi: 10.1007/BF03037089. [10] Stanley Kok and Pedro M. Domingos. Statistical predicate invention. In Machine Learning, Proceedings of the Twenty-Fourth International Conference (ICML 2007), Corvallis, Oregon, USA, June 20-24, 2007, pages 433–440, 2007. doi: 10.1145/1273496.1273551. [11] Matt Gardner, Partha Pratim Talukdar, Bryan Kisiel, and Tom M. Mitchell. Improving learning and inference in a large knowledge-base using latent syntactic cues. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, EMNLP 2013, 18-21 October 2013, Grand Hyatt Seattle, Seattle, Washington, USA, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 833–838, 2013. [12] Matt Gardner, Partha Pratim Talukdar, Jayant Krishnamurthy, and Tom M. Mitchell. Incorporating vector space similarity in random walk inference over knowledge bases. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 397–406, 2014. [13] Islam Beltagy, Stephen Roller, Pengxiang Cheng, Katrin Erk, and Raymond J Mooney. Representing meaning with a combination of logical and distributional models. Computational Linguistics, 2017. [14] Arvind Neelakantan, Benjamin Roth, and Andrew McCallum. Compositional vector space models for knowledge base completion. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, July 26-31, 2015, Beijing, China, Volume 1: Long Papers, pages 156–166, 2015. [15] Baolin Peng, Zhengdong Lu, Hang Li, and Kam-Fai Wong. Towards neural network-based reasoning. CoRR, abs/1508.05508, 2015. 10 [16] Rajarshi Das, Arvind Neelakantan, David Belanger, and Andrew McCallum. Chains of reasoning over entities, relations, and text using recurrent neural networks. In Conference of the European Chapter of the Association for Computational Linguistics (EACL), 2017. [17] Dirk Weissenborn. Separating answers from queries for neural reading comprehension. CoRR, abs/1607.03316, 2016. [18] Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In Proceedings of the Workshop on Cognitive Computation: Integrating neural and symbolic approaches 2016 co-located with the 30th Annual Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain, December 9, 2016., 2016. [19] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. [20] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. CoRR, abs/1410.3916, 2014. [21] Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1828–1836, 2015. [22] Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 190–198, 2015. [23] Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. In International Conference on Learning Representations (ICLR), 2016. [24] Scott E. Reed and Nando de Freitas. Neural programmer-interpreters. In International Conference on Learning Representations (ICLR), 2016. [25] Marcin Andrychowicz, Misha Denil, Sergio Gomez Colmenarejo, Matthew W. Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 3981–3989, 2016. [26] Matko Bosnjak, Tim Rocktäschel, Jason Naradowsky, and Sebastian Riedel. Programming with a differentiable forth interpreter. In International Conference on Machine Learning (ICML), 2017. [27] Stuart J. Russell and Peter Norvig. Artificial Intelligence - A Modern Approach (3. internat. ed.). Pearson Education, 2010. ISBN 978-0-13-207148-2. [28] Lise Getoor. Introduction to statistical relational learning. MIT press, 2007. [29] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Learning to compose neural networks for question answering. In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego California, USA, June 12-17, 2016, pages 1545–1554, 2016. [30] David S Broomhead and David Lowe. Radial basis functions, multi-variable functional interpolation and adaptive networks. Technical report, DTIC Document, 1988. [31] Allen Van Gelder. Efficient loop detection in prolog using the tortoise-and-hare technique. J. Log. Program., 4(1):23–31, 1987. doi: 10.1016/0743-1066(87)90020-3. [32] J. Ross Quinlan. Learning logical definitions from relations. Machine Learning, 5:239–266, 1990. doi: 10.1007/BF00117105. [33] William Yang Wang and William W. Cohen. Joint information extraction and reasoning: A scalable statistical relational learning approach. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, July 26-31, 2015, Beijing, China, Volume 1: Long Papers, pages 355–364, 2015. [34] Antoine Bordes, Nicolas Usunier, Alberto García-Durán, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States., pages 2787–2795, 2013. 11 [35] Guillaume Bouchard, Sameer Singh, and Theo Trouillon. On approximate reasoning capabilities of low-rank vector spaces. In Proceedings of the 2015 AAAI Spring Symposium on Knowledge Representation and Reasoning (KRR): Integrating Symbolic and Neural Approaches, 2015. [36] Maximilian Nickel, Lorenzo Rosasco, and Tomaso A. Poggio. Holographic embeddings of knowledge graphs. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA., pages 1955–1961, 2016. [37] Fan Yang, Zhilin Yang, and William W. Cohen. Differentiable learning of logical rules for knowledge base completion. CoRR, abs/1702.08367, 2017. [38] Artur S. d’Avila Garcez, Krysia Broda, and Dov M. Gabbay. Neural-symbolic learning systems: foundations and applications. Springer Science & Business Media, 2012. [39] Jude W Shavlik and Geoffrey G Towell. An approach to combining explanation-based and neural learning algorithms. Connection Science, 1(3):231–253, 1989. [40] Geoffrey G. Towell and Jude W. Shavlik. Knowledge-based artificial neural networks. Artif. Intell., 70 (1-2):119–165, 1994. doi: 10.1016/0004-3702(94)90105-8. [41] Artur S. d’Avila Garcez and Gerson Zaverucha. The connectionist inductive learning and logic programming system. Appl. Intell., 11(1):59–77, 1999. doi: 10.1023/A:1008328630915. [42] Lokendra Shastri. Neurally motivated constraints on the working memory capacity of a production system for parallel processing: Implications of a connectionist model based on temporal synchrony. In Proceedings of the Fourteenth Annual Conference of the Cognitive Science Society: July 29 to August 1, 1992, Cognitive Science Program, Indiana University, Bloomington, volume 14, page 159. Psychology Press, 1992. [43] Liya Ding. Neural prolog-the concepts, construction and mechanism. In Systems, Man and Cybernetics, 1995. Intelligent Systems for the 21st Century., IEEE International Conference on, volume 4, pages 3603–3608. IEEE, 1995. [44] Manoel V. M. França, Gerson Zaverucha, and Artur S. d’Avila Garcez. Fast relational learning using bottom clause propositionalization with artificial neural networks. Machine Learning, 94(1):81–104, 2014. doi: 10.1007/s10994-013-5392-1. [45] Gustav Sourek, Vojtech Aschenbrenner, Filip Zelezný, and Ondrej Kuzelka. Lifted relational neural networks. In Proceedings of the NIPS Workshop on Cognitive Computation: Integrating Neural and Symbolic Approaches co-located with the 29th Annual Conference on Neural Information Processing Systems (NIPS 2015), Montreal, Canada, December 11-12, 2015., 2015. [46] William W. Cohen. Tensorlog: A differentiable deductive database. CoRR, abs/1605.06523, 2016. [47] Luciano Serafini and Artur S. d’Avila Garcez. Logic tensor networks: Deep learning and logical reasoning from data and knowledge. In Proceedings of the 11th International Workshop on Neural-Symbolic Learning and Reasoning (NeSy’16) co-located with the Joint Multi-Conference on Human-Level Artificial Intelligence (HLAI 2016), New York City, NY, USA, July 16-17, 2016., 2016. [48] Ni Lao, Tom M. Mitchell, and William W. Cohen. Random walk inference and learning in A large scale knowledge base. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, EMNLP 2011, 27-31 July 2011, John McIntyre Conference Centre, Edinburgh, UK, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 529–539, 2011. [49] Ni Lao, Amarnag Subramanya, Fernando C. N. Pereira, and William W. Cohen. Reading the web with learned syntactic-semantic inference rules. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, EMNLP-CoNLL 2012, July 12-14, 2012, Jeju Island, Korea, pages 1017–1026, 2012. [50] Tim Rocktäschel, Matko Bosnjak, Sameer Singh, and Sebastian Riedel. Low-Dimensional Embeddings of Logic. In ACL Workshop on Semantic Parsing (SP’14), 2014. [51] Tim Rocktäschel, Sameer Singh, and Sebastian Riedel. Injecting logical background knowledge into embeddings for relation extraction. In NAACL HLT 2015, The 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Denver, Colorado, USA, May 31 - June 5, 2015, pages 1119–1129, 2015. [52] Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. In International Conference on Learning Representations (ICLR), 2016. 12 [53] Zhiting Hu, Xuezhe Ma, Zhengzhong Liu, Eduard H. Hovy, and Eric P. Xing. Harnessing deep neural networks with logic rules. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers, 2016. [54] Thomas Demeester, Tim Rocktäschel, and Sebastian Riedel. Lifted rule injection for relation embeddings. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pages 1389–1399, 2016. [55] Ekaterina Komendantskaya. Unification neural networks: unification by error-correction learning. Logic Journal of the IGPL, 19(6):821–847, 2011. doi: 10.1093/jigpal/jzq012. [56] Steffen Hölldobler. A structured connectionist unification algorithm. In Proceedings of the 8th National Conference on Artificial Intelligence. Boston, Massachusetts, July 29 - August 3, 1990, 2 Volumes., pages 587–593, 1990. [57] Stefan Schoenmackers, Jesse Davis, Oren Etzioni, and Daniel S. Weld. Learning first-order horn clauses from web text. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, EMNLP 2010, 9-11 October 2010, MIT Stata Center, Massachusetts, USA, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 1088–1098, 2010. [58] Stephen H Muggleton, Dianhuan Lin, and Alireza Tamaddoni-Nezhad. Meta-interpretive learning of higher-order dyadic datalog: Predicate invention revisited. Machine Learning, 100(1):49–73, 2015. [59] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. doi: 10.1162/neco.1997.9.8.1735. [60] Rémi Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In Computers and Games, 5th International Conference, CG 2006, Turin, Italy, May 29-31, 2006. Revised Papers, pages 72–83, 2006. doi: 10.1007/978-3-540-75538-8_7. [61] Levente Kocsis and Csaba Szepesvári. Bandit based monte-carlo planning. In Machine Learning: ECML 2006, 17th European Conference on Machine Learning, Berlin, Germany, September 18-22, 2006, Proceedings, pages 282–293, 2006. doi: 10.1007/11871842_29. [62] David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Vedavyas Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy P. Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. doi: 10.1038/nature16961. [63] Marwin H. S. Segler, Mike Preuß, and Mark P. Waller. Towards "alphachem": Chemical synthesis planning with tree search and deep neural network policies. CoRR, abs/1702.00020, 2017. [64] Mark E. Stickel. A prolog technology theorem prover. New Generation Comput., 2(4):371–383, 1984. doi: 10.1007/BF03037328. [65] Cezary Kaliszyk, François Chollet, and Christian Szegedy. Holstep: A machine learning dataset for higher-order logic theorem proving. In International Conference on Learning Representations (ICLR), 2017. [66] Sarah M. Loos, Geoffrey Irving, Christian Szegedy, and Cezary Kaliszyk. Deep network guided proof search. In LPAR-21, 21st International Conference on Logic for Programming, Artificial Intelligence and Reasoning, Maun, Botswana, May 7-12, 2017, pages 85–105, 2017. [67] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. [68] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2010, Chia Laguna Resort, Sardinia, Italy, May 13-15, 2010, pages 249–256, 2010. [69] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Józefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. 13 | 2017 | 471 |
6,976 | Matching on Balanced Nonlinear Representations for Treatment Effects Estimation Sheng Li Adobe Research San Jose, CA sheli@adobe.com Yun Fu Northeastern University Boston, MA yunfu@ece.neu.edu Abstract Estimating treatment effects from observational data is challenging due to the missing counterfactuals. Matching is an effective strategy to tackle this problem. The widely used matching estimators such as nearest neighbor matching (NNM) pair the treated units with the most similar control units in terms of covariates, and then estimate treatment effects accordingly. However, the existing matching estimators have poor performance when the distributions of control and treatment groups are unbalanced. Moreover, theoretical analysis suggests that the bias of causal effect estimation would increase with the dimension of covariates. In this paper, we aim to address these problems by learning low-dimensional balanced and nonlinear representations (BNR) for observational data. In particular, we convert counterfactual prediction as a classification problem, develop a kernel learning model with domain adaptation constraint, and design a novel matching estimator. The dimension of covariates will be significantly reduced after projecting data to a low-dimensional subspace. Experiments on several synthetic and real-world datasets demonstrate the effectiveness of our approach. 1 Introduction Causal questions exist in many areas, such as health care [24, 12], economics [14], political science [17], education [36], digital marketing [6, 43, 5, 15, 44], etc. In the field of health care, it is critical to understand if a new medicine could cure a certain illness and perform better than the old ones. In political science, it is of great importance to evaluate whether the government should fund a job training program, by assessing if the program is the true factor that leads to the success of job hunting. All of these causal questions can be addressed by the causal inference technique. Formally, causal inference estimates the treatment effect on some units after interventions [33, 20]. In the above example of heath care, the units could be patients, and the intervention would be taking new medicines. Due to the wide applications of causal questions, effective causal inference techniques are highly desired to address these problems. Generally, the causal inference problems can be tackled by either experimental study or observational study. Experimental study is popular in traditional causal inference problems, but it is time-consuming and sometimes impractical. As an alternative strategy, observational study has attracted increasing attention in the past decades, which extracts causal knowledge only from the observed data. Two major paradigms for observational study have been developed in computer science and statistics, including the causal graphical model [29] and the potential outcome framework [27, 33]. The former builds directed acyclic graphs (DAG) from covariates, treatment and outcome, and uses probabilistic inference to determine causal relationships; while the latter estimates counterfactuals for each treated unit, and gives a precise definition of causal effect. The equivalence of two paradigms has been discussed in [11]. In this paper, we mainly focus on the potential outcome framework. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. A missing data problem needs to be dealt with in the potential outcome framework. As each unit is either treated or not treated, it is impossible to observe its outcomes in both scenarios. In other words, one has to predict the missing counterfactuals. A widely used solution to estimating counterfactuals is matching. According to the (binary) treatment assignments, a set of units can be divided into a treatment group and a control group. For each treated unit, matching methods select its counterpart in the control group based on certain criteria, and treat the selected unit as a counterfactual. Then the treatment effect can be estimated by comparing the outcomes of treated units and the corresponding counterfactuals. Some popular matching estimators include nearest neighbor matching (NNM) [32], propensity score matching [31], coarsened exact matching (CEM) [17], genetic matching [9], etc. Existing matching methods have three major drawbacks. First, they either perform matching in the original covariate space (e.g., NNM, CEM) or in the one-dimensional propensity score space (e.g., PSM). The potential of using intermediate representations has not been extensively studied before. Second, existing methods work well for data with a moderate number of covariates, but may fail for data with a large number of covariates, as theoretical analysis suggests that the bias of treatment effect estimation would increase with the dimension of covariates [1]. Third, most matching methods do not take into account whether the distributions of two groups are balanced or not. The matching process would make no sense if the distributions of two groups have little overlap. To address the above problems, we propose to learn balanced and nonlinear representations (BNR) from observational data, and design a novel matching estimator named BNR-NNM. First, the counterfactual prediction problem is converted to a multi-class classification problem, by categorizing the outcomes to ordinal labels. Then, we propose a novel criterion named ordinal scatter discrepancy (OSD) for supervised kernel learning on data with ordinal labels, and extract low-dimensional nonlinear representations from covariates. Further, to achieve balanced distributions in the lowdimensional space, a maximum mean discrepancy (MMD) criterion [4] is incorporated to the model. Finally, matching strategy is performed on the extracted balanced representations, in order to provide a robust estimation of causal effect. In summary, the main contributions of our work include: • We propose a novel matching estimator, BNR-NNM, which learns low-dimensional balanced and nonlinear representations via kernel learning. • We convert the counterfactual prediction problem into a multi-class classification problem, and design an OSD criterion for nonlinear kernel learning with ordinal labels. • We incorporate a domain adaptation constraint to feature learning by using the maximum mean discrepancy criterion, which leads to balanced representations. • We evaluate the proposed estimator on both synthetic datasets and real-world datasets, and demonstrate its superiority over the state-of-the-art methods. 2 Background Potential Outcome Framework. The potential outcome framework is proposed by Neyman and Rubin [27, 33]. Considering binary treatments for a set of units, there are two possible outcomes for each unit. Formally, for unit k, the outcome is defined as Yk(1) if it received treatment, and Yk(0) if it did not. Then, the individual-level treatment effect is defined as γk = Yk(1) −Yk(0). Clearly, each unit only belongs to one of the two groups, and therefore, we can only observe one of the two possible outcomes. This is the well-known missing data problem in causal inference. In particular, if unit k received treatment, Yk(1) is the observed outcome, and Yk(0) is missing data, i.e., counterfactual. The potential outcome framework usually makes the following assumptions [19]. Assumption 1. Stable Unit Treatment Value Assumption (SUTVA): The potential outcomes for any units do not vary with the treatments assigned to other units, and for each unit there are no differences forms or versions of each treatment level, which lead to different potential outcomes. Assumption 2. Strongly Ignorable Treatment Assignment (SITA): Conditional on covariates xk, treatment Tk is independent of potential outcomes. (Yk(1), Yk(0)) |= Tk|xk. (Unconfoundedness) 0 < Pr(Tk = 1|xk) < 1. (Overlap) (1) These assumptions enable the modeling of treatment of one unit with respect to covariates, independent of outcomes and other units. Matching Estimators. To address the aforementioned missing data problem, a simple yet effective strategy has been developed, which is matching [32, 33, 14, 40]. The idea of matching is to estimate 2 the counterfactual for a treated unit by seeking its most similar counterpart in the control group. Existing matching methods can be roughly divided into three categories: nearest neighbor matching (NNM), weighting, and subclassification. We mainly focus on NNM in this paper. Let XC ∈Rd×NC and XT ∈Rd×NT denote the covariates of a control group and a treatment group, respectively, where d is the number of covariates, NC and NT are the group sizes. T is a binary vector indicating if the units received treatments (i.e., Tk = 1) or not (i.e., Tk = 0). Y is an outcome vector. For each treated unit k, NNM finds its nearest neighbor in the control group in terms of the covariates. The outcome of the selected control unit is considered as an estimation of counterfactual. Then, the average treatment effect on treated (ATT) is defined as: ATT = 1 NT X k:Tk=1 Yk(1) −ˆYk(0) , (2) where ˆYk(0) is the counterfactual estimated from unit k’s nearest neighbor in the control group. NNM can be implemented in various ways, such as using different distance metrics, or choosing different number of neighbors. Euclidean distance and Mahalanobis distance are two widely-used distance metrics for NNM. They work well when there are a few covariates with normal distributions [34]. Another important matching estimator is propensity score matching (PSM) [31]. PSM estimates the propensity score (i..e., the probability of receiving treatment) for each unit via logistic regression, and pairs the units from two groups with similar scores [35, 8, 30]. Most recently, a covariate balancing propensity score (CBPS) method is developed to balance the distributions of two groups by weighting the covariates, and has shown promising performance [18]. The key differences between the proposed BNR-NNM estimator and the traditional matching estimators are two-fold. First, BNR-NNM performs matching in an intermediate low-dimensional subspace that could guarantee a low estimation bias, while the traditional estimators adopt either the original covariate space or the one-dimensional space. Second, BNR-NNM explicitly considers the balanced distributions across treatment and control groups, while the traditional estimators usually fail to achieve such a property. Machine Learning for Causal Inference. In recent years, researchers have been exploring the relationships between causal inference and machine learning [39, 10, 38]. A number of predictive models have been designed to estimate the causal effects, such as causal trees [3] and causal forests [42]. Balancing the distributions of two groups is considered as a key issue in observational study, which is closely related to covariate shift and in general domain adaptation [2]. Meanwhile, causal inference has also been incorporated to improve the performance of domain adaptation [46, 45]. Most recently, the idea of representation learning is introduced to learn new features from covariates through random projections [25], informative subspace learning [7], and deep neural networks [21, 37]. 3 Learning Balanced and Nonlinear Representations (BNR) In this section, we first define the notations that will be used throughout this paper. Then we introduce how to convert the counterfactual prediction problem into a multi-class classification problem, and justify the rationality of this strategy. We will also present the details of how to learn nonlinear and balanced representations, and derive the closed-form solutions to the model. Notations. Let X = [XC, XT] ∈Rd×N denote the covariates of all units, where XC ∈Rd×NC is the control group with NC units, and XT ∈Rd×NT is the treatment group with NT units. N is the total number of units, and d is the number of covariates for each unit. φ : x ∈Rd →φ(x) ∈F is a nonlinear mapping function from sample space R to an implicit feature space F. T ∈RN×1 is a binary vector to indicate if the units received treatments or not. Y ∈RN×1 is an outcome vector. The elements in Y could be either discrete or continuous values. 3.1 From Counterfactual Prediction to Multi-Class Classification When estimating the treatment effects as shown in Eq.(2), we only have the observed outcome Yk(1), but need to estimate the counterfactual ˆYk(0). Ideally, we would train a model ˆYk(0) = Fcf(xk) that can predict the counterfactual for any units, given the covariate vector xk. One strategy is to build a predictive model (e.g., regression) that maps each unit xi to its output Yi, which has been extensively 3 studied before. Alternatively, we can convert the counterfactual prediction problem into a multi-class classification problem. Given a set of units X and the corresponding outcome vector Y , we aim to learn a predictive model Fcf(xk) that maps from the covariate space to the outcome space. In particular, we propose to seek an intermediate representation space in which the units close to each other should have very similar outcomes. The outcome vector Y usually contains continuous values. We categorize outcomes in Y into multiple levels on the basis of the magnitude of outcome value, and consider them as (pseudo) class labels. Clustering or kernel density estimation can be used for discretizing Y . Finally, Y is converted to a (pseudo) class label vector Yc with c categories. For example, Y = [0.3, 0.5, 1.1, 1.2, 2.4] could be categorized as Y3 = [1, 1, 2, 2, 3]. As a result, we could use Yc and X to train a classifier. Note that the Yc actually contains ordinal labels, as the discretized labels carry additional information. In particular, the labels [1, 2, 3] are not totally independent. We actually assume that Class 1 should be more close to Class 2 than Class 3, since the outcome values in Class 1 are closer to those in Class 2. We will make use of such ordinal label information when designing the classification model. 3.2 Learning Nonlinear Representations via Ordinal Scatter Discrepancy To obtain effective representations from X, we propose to train a nonlinear classifier in a reproducing kernel Hilbert space (RKHS). The reasons of employing the RKHS based nonlinear models are as follows. First, compared to linear models, nonlinear models are usually more capable of dealing with complicated data distributions. It is well known that the treatment and control groups might have diverse distributions, and the nonlinear models would be able to tightly couple them in a shared low-dimensional subspace. Second, the RKHS based nonlinear models usually have closed-form solutions because of the kernel trick, which is beneficial for handling large-scale data. Let φ(xi) denote the mapped counterpart of xi in kernel space, and then Φ(X) = [φ(x1), φ(x2), · · · , φ(xN)]. In light of the maximum scatter difference criterion [26], we take into account the ordinal label information, and propose a novel criterion named Ordinal Scatter Discrepancy (OSD) to achieve the desired data distribution after projecting Φ(X) to a low-dimensional subspace. In particular, OSD minimizes the within-class scatter, and meanwhile maximize the noncontiguous-class scatter matrix. Let P denote a transformation matrix, OSD maps samples onto a subspace by maximizing the differences of noncontiguous-class scatter and within-class scatter. We perform OSD in kernel space to learn nonlinear representations, and have the following objective function: arg max P F(P, Φ(X), Yc) = tr(P ⊤(KI −αKW )P), s.t. P ⊤P = I, (3) where α is a non-negative trade-off parameter, tr(·) is the trace operator for matrix, and I is an identity matrix. The orthogonal constraint P ⊤P = I is introduced to reduce the redundant information in projection. In Eq.(3), KI and KW are the noncontiguous-class scatter matrix and within-class scatter matrix in kernel space, respectively. The detailed definitions are: KΦ I = c(c−1) 2 cP i=1 cP j=i+1 e(j−i)(mi −mj)(mi −mj)⊤ (4) KΦ W = 1 N cP i=1 ni P j=1 (ξ(xij) −¯m)(ξ(xij) −¯ mi)⊤ (5) where ξ(xij) = [k(x1, xij), k(x2, xij), · · · , k(xN, xij)]⊤, mi is the mean vector of ξ(xij) that belongs to the i-th class, ¯m is the mean vector of all ξ(xij), and ni is the number of units in the i-th class. k(xi, xj) = ⟨φ(xi), φ(xj)⟩is a kernel function, which is utilized to avoid calculating the explicit form of function φ (i.e., the kernel trick). Eq. (4) characterizes the scatter of a set of classes with (pseudo) ordinal labels. It measures the scatter of every pair of classes. The factor e(j−i) is used to penalize the classes that are noncontiguous. The intuition is that, for ordinal labels, we may expect the contiguous classes will be close to each other after projection, while the noncontiguous classes should be pushed away. Therefore, we put larger 4 weights for the noncontiguous classes. For example, e(2−1) < e(3−1), since Class 1 should be more close to Class 2 than Class 3, as we explained in Section 3.1. Eq. (5) measures the within-class scatter. We expect that the units having the same (pseudo) class labels will be very close to each other in the feature space, and therefore they will have similar feature representations after projection. The differences between the proposed OSD criterion and other discriminative criteria (e.g., Fisher criterion, maximum scatter difference criterion) are two-fold. (1) OSD criterion learns nonlinear projection and feature representations in the RKHS space; (2) OSD explicitly makes use of the ordinal label information that are usually ignored by existing criteria. Moreover, the maximum scatter difference criterion is a special case of OSD. 3.3 Learning Balanced Representations via Maximum Mean Discrepancy Balanced distributions of control and treatment groups, in terms of covariates, would greatly facilitate the causal inference methods such as NNM. To this end, we adopt the idea of maximum mean discrepancy (MMD) [4] when learning the transformation P, and finally obtain balanced nonlinear representations. The MMD criterion has been successfully applied to some problems like domain adaptation [28]. Assume that the control group XC and treatment group XT are random variable sets with distributions P and Q, MMD implies the empirical estimation of the distance between P and Q. In particular, MMD estimates the distance between nonlinear feature sets Φ(XC) and Φ(XT ), which can be formulated as: Dist(Φ(XC), Φ(XT )) = ∥1 NC nC P i=1 φ(XCi) − 1 NT nT P i=1 φ(XT i)∥2 F, (6) where F denotes a kernel space. By utilizing the kernel trick, Dist(Φ(XC), Φ(XT )) in the original kernel space can be equivalently converted to: Dist(Φ(XC), Φ(XT )) = tr(KL), (7) where K = KCC KCT KT C KT T is a kernel matrix, KCC, KT T , and KT C are kernel matrices defined on control group, treatment group, and cross groups, respectively. L is a constant matrix. If xi, xj ∈XC, Lij = 1 N 2 C ; if xi, xj ∈XT , Lij = 1 N 2 T ; otherwise, Lij = − 1 NCNT . As all the units are projected into a new space via projection P, we need to measure the MMD for new representations Ψ(XC) = P ⊤Φ(XC) and Ψ(XT ) = P ⊤Φ(XT ), and rewrite Eq.(7) into the following form after some derivations: Dist(Ψ(XC), Ψ(XT )) = tr(P ⊤KLKP). (8) 3.4 BNR Model and Solutions The representation learning objectives described in Section 3.2 and Section 3.3 are actually performed on the same data set with different partitions. For nonlinear representation learning, we merge the control group and treatment group, assign a (pseudo) ordinal label for each unit, and then learn discriminative nonlinear features accordingly. For balanced representation learning, we aim to mitigate the distribution discrepancy between control group and treatment group. Two learning objectives are motivated from different perspectives, and therefore they are complementary to each other. By combing the objectives for nonlinear and balanced representations in Eq.(3) and Eq.(8), we can extract effective representations for the purpose of treatment effect estimation. The objective function of BNR is formulated as follows: arg max P F(P, Φ(X), Yc) −βDist(Ψ(XC), Ψ(XT )) = tr(P ⊤(KI −αKW )P) −βtr(P ⊤KLKP), s.t. P ⊤P = I, (9) where β is a trade-off parameter to balance the effects of two terms. A negative sign is added before βDist(Ψ(XC), Ψ(XT )) in order to adapt it into this maximization problem. 5 The problem Eq.(9) can be efficiently solved by using a closed-form solution described in Proposition 1. The proof is provided in the supplementary document due to space limit. Proposition 1. The optimal solution of P in problem Eq.(9) is the eigenvectors of matrix (KI − αKW −βKLK), which correspond to the m leading eigenvalues. 4 BNR for Nearest Neighbor Matching Leveraging on the balanced nonlinear representations extracted from observational data, we propose a novel nearest neighbor matching estimator named BNR-NNM. After obtaining the transformation P in kernel space, we could generate nonlinear and balanced representations for control and treated units as: ˆ XC = P ⊤KC, ˆ XT = P ⊤KT , where KC and KT are kernel matrices defined in control and treatment groups, respectively. Then we follow the basic idea of nearest neighbor matching. On the new representations ˆ XC and ˆ XT , we calculate the distance between each treated unit and control unit, and choose the one with the smallest distance. The outcome of the selected control unit serves as the estimation of counterfactual. Finally, the average treatment effect on treated (ATT) can be calculated, as defined in Eq.(2). The complete procedures of BNR-NNM are summarized in Algorithm 1. Algorithm 1. BNR-NNM Input: Treatment group XT ∈Rd×Nt Control group XC ∈Rd×Nc Outcome vectors YT and YC Total sample size N Kernel function k Parameters α, β, c 1: Convert outcomes to (pseudo) ordinal labels 2: Construct KI and KW using Eqs.(4) and (5) 3: Construct kernel matrix K using Eq.(7) 4: Learn the transformation P using Eq.(9) 5: Construct kernel matrix KC and KT 6: Project KC and KT using P ˆ XC = P ⊤KC, ˆ XT = P ⊤KT . 7: Perform NNM between ˆ XC and ˆ XT 8: Estimate the ATT A from Eq.(2) Output: Return A The estimated ATT is dependent on the transformation matrix P. Although P is optimal for the representation learning model Eq.(9), it might not be optimal for the whole causal inference process, for three reasons. First, the model Eq.(9) contains two major hyperparameters, α and β. Different “optimal” transformations P would be obtained with different parameter settings. Second, the groundtruth label information required by supervised learning are unknown. Recall that we categorize the outcome vector as pseudo labels, which introduces considerable uncertainty. Third, the ground-truth information of causal effect is unknown in observational studies with real-world data. Therefore, it is impossible to use the faithful supervision information of causal effect to guide the learning process. These uncertainties from three perspectives might result in an unreliable estimation of ATT. Thus, we present two strategies to tackle the above issue. (1) Median causal effect from multiple estimations. Following the randomized NNM estimator [25], we implement multiple settings of BNR-NNM with different parameters α, β and c, calculate multiple ATT values, and finally choose the median value as the final estimation. In this way, a robust estimation of causal effect can be obtained. (2) Model selection by cross-validation. Alternatively, the cross-validation strategy can be employed to select proper values for α and β, by equally dividing the data and pseudo labels into k subsets. Although the multiple runs in the above strategies would increase the computational cost, our method is still efficient for three reasons. First, the dimension of covariates will be significantly reduced, which enables a faster matching process. Second, owing to the closed-form solution to P introduced in Proposition 1, the representation learning procedure is efficient. Third, these settings are independent from each other, and therefore they can be executed in parallel. 5 Experiments and Analysis Synthetic Dataset. Data Generation. We generate a synthetic dataset by following the protocols described in [41, 25]. In particular, the sample size N is set to 1000, and the number of covariates d is set to 100. The following basis functions are adopted in the data generation process: g1(x) = x −0.5, g2(x) = (x −0.5)2 + 2, g3(x) = x2 −1/3, g4(x) = −2 sin(2x), g5(x) = e−x −e−1 −1, g6(x) = e−x, g7(x) = x2, g8(x) = x, g9(x) = Ix>0, and g10(x) = cos(x). For each unit, the covariates x1, x2, · · · , xd are drawn independently from the standard normal distribution N(0, 1). We only consider binary treatment in this paper, and define the treatment vector T as T|x = 1 if P5 k=1 gk(xk) > 0 and T|x = 0 otherwise. Given covariate vector x and the treatment vector T, the outcome variables in Y are generated from the following model: Y |x, T ∼N(P5 j=1 gj+5(xj) + 6 T, 1). It is obvious that Y contains continuous values. The first five covariates are correlated to the treatments in T and the outcomes in Y , simulating a confounding effect, while the rest are noisy components. By definition, the true causal effect (i.e., the ground truth of ATT) in this dataset is 1. Baselines and Settings. We compare our matching estimator BNR-NNM with the following baseline methods: Euclidean distance based NNM (Eud-NNM), Mahalanobis distance based NNM (MahNNM) [34], PSM [31], principal component analysis based NNM (PCA-NNM), locality preserving projections based NNM (LPP-NNM), and randomized NNM (RNNM) [25]. 2 5 10 20 30 40 50 60 70 80 90 100 10 −2 10 −1 10 0 Dimension Mean Square Error Eud−NNM PSM Mah−NNM PCA−NNM LPP−NNM RNNM BNR−NNM (Ours) Figure 1: MSE of different estimators on the synthetic dataset. Note that Eud-NNM and Mah-NNM only involve matching in the original 100 dimensional data space. PSM is a classical causal inference approach, which estimates the propensity scores for each control or treated unit using logistic regression, and then perform matching on these scores. As our approach learns new representations via transformations, we also implement two matching estimators based on the popular subspace learning methods PCA [22] and LPP [13]. The nearest neighbor matching is performed on the low-dimensional feature space learned by PCA and LPP, respectively. RNNM is the state-ofthe-art matching estimator, especially for highdimensional data. It projects units to multiple random subspaces, performs matching in each of them, and finally selects the median value of estimations. In RNNM, the number of random projections is set to 20. The proposed BNRNNM and RNNM share a similar idea on projecting data to low-dimensional subspaces, but they have different motivations and learn different data representations. The major parameters in BNR-NNM include α, β, and c. In the experiments, α is empirically set to 1. β is chosen from {10−3, 10−1, 1, 10, 103}. The number of categories c is chosen from {2, 4, 6, 8}. As described in Section 4, the median ATT of multiple estimations is used as the final result. We use the Gaussian kernel function k(xi, xj) = exp(−∥xi −xj∥2/2σ2), in which the bandwidth parameter σ is empirically set to 5. In the experiments we observe that our approach allows flexible settings for these parameters, and intuitively selecting parameters from a wider range would lead to a robust estimation of ATT. Results and Discussions. To ensure a robust estimation of the performance of each matching estimator, we repeat the data generation process 500 times, calculate the ATT for each estimator in every replication, and compute the mean square error (MSE) with standard error (SD) for each estimator over all of the replications. Eud-NNM and Mah-NNM perform matching in the original covariate space, and PSM maps each unit to a single score. Thus we only have a single point estimation for each of them. For PCA-NNM, LPP-NNM, RNNM and our method, we can choose the dimension of feature space where the matching is conducted. Specifically, we increase the dimension from 2 to 100, and calculate MSE and SD in each case. Figure 1 shows the MSE and SD (shown as error bars) of each estimator when varying the dimensions. We observe from Figure 1 that the proposed estimator BNR-NNM obtains lower MSE than all other methods in every case. The lowest MSE is achieved when the dimension is 5. In addition, we have analyzed the sensitivity of parameter settings. The detailed results are provided in the supplementary document. IHDP Dataset with Simulated Outcomes. IHDP data [16] is an experimental dataset collected by the Infant Health and Development Program. In particular, a randomized experiment was conducted, where intensive high-quality care were provided to the low-birth-weight and premature infants. By using the original data, an observation study can be conducted by removing a nonrandom subset of the treatment group: all children with non-white mothers. After this preprocessing step, there are in total 24 pretreatment covariates (excluding race) and 747 units, including 608 control units and 139 treatment units. The outcomes are simulated by using the pretreatment covariates and the treatment assignment information, in order to hold the unconfoundedness assumption. 7 Table 1: Results on IHDP dataset. Method εAT T Eu-NNM 0.18±0.06 Mah-NNM 0.31±0.12 PSM 0.26±0.08 PCA-NNM 0.19±0.11 LPP-NNM 0.25±0.13 RNNM 0.16±0.07 BNR-NNM 0.16±0.06 Due to the space limit, the outcome simulation procedures are provided in the supplementary document. We repeat such procedures for 200 times and generate 200 sets of simulated outcomes, in order to conduct extensive evaluations. For each set of simulated outcomes, we run our method and the baselines introduced above, and report the results in Table 1. We use the error in average treatment effect on treated (ATT), εAT T , as the evaluation metric. It is defined as the absolute difference between true ATT and estimated ATT ( [ ATT), i.e., εAT T = |ATT −[ ATT|. Table 1 shows that the proposed BNR-NNM estimator outperforms most baselines, which further validates the effectiveness of the balanced and nonlinear representations. LaLonde Dataset with Real Outcomes. The LaLonde dataset is a widely used benchmark for observational studies [23]. It consists of a treatment group and a control group. The treatment group contains 297 units from a randomized study of a job training program (the “National Supported Work Demonstration”), where an unbiased estimate of the average treatment effect is available. The original LaLonde dataset contains 425 control units that are collected from the Current Population Survey. Recently, Imai et al. augmented the data by including 2,490 units from the Panel Study of Income Dynamics [18]. Thus, the sample size of control group is increased to 2,915. For each sample, the covariates include age, education, race (black, white, or Hispanic), marriage status, high school degree, earnings in 1974, and earnings in 1975. The outcome variable is earnings in 1978. In this benchmark dataset, the unbiased estimation of ATT is $886 with a standard error of $448. Table 2: Results on LaLonde dataset. BIAS (%) is the bias in percentage of the true effect. Method ATT SD BIAS (%) Ground Truth 886 488 N/A Eu-NNM -565.9 592.8 164% Mah-NNM -67.9 526.1 108% PSM -947.6 567.9 201% PCA-NNM -499.8 592.5 156% LPP-NNM -457.1 581.2 152% RNNM -557.6 584.9 163% CBPS 423.3 1295.2 52% DNN 742.0 N/A 16% BNR-NNM 783.6 546.3 12% We compare our estimator with the baselines used in the previous experiments. In addition, we also compare with a recently proposed matching estimator, covariate balancing propensity score (CBPS) [18] and a deep neural network (DNN) method [37]. CBPS aims to achieve balanced distributions between control and treatment groups by adjusting the weights for covariates. The DNN method utilizes a deep neural network architecture for counterfactual regression, which is the state-of-the-art method on representation learning based counterfactual inference. For BNR-NNM, we use the same settings for β and c as in the previous experiments. Table 2 shows the ground truth of ATT, and the estimations of different methods. We can observe from Table 2 that CBPS and DNN obtain better results than other baselines, as both of them consider the balanced property across treatment and control groups. Moreover, our BNR-NNM estimator achieves the best result, due to the fully exploitation of balanced and nonlinear feature representations. The evaluations on runtime behavior of each compared method are provided in the supplementary document due to space limit. 6 Conclusions In this paper, we propose a novel matching estimator based on balanced and nonlinear representations for treatment effect estimation. Our method leverages on the predictive power of machine learning models to estimate counterfactuals, and achieves balanced distributions in an intermediate feature space. In particular, an ordinal scatter discrepancy criterion is designed to extract discriminative features from observational data with ordinal pseudo labels, while a maximum mean discrepancy criterion is incorporated to achieve balanced distributions. Extensive experimental results on three synthetic and real-world datasets show that our approach provides more accurate estimation of causal effects than the state-of-the-art matching estimators and representation learning methods. In future work, we will extend the balanced representation learning model to other causal inference strategies such as weighting and regression, and design estimators for multiple levels of treatments. Acknowledgement. This research is supported in part by the NSF IIS award 1651902, ONR Young Investigator Award N00014-14-1-0484, and U.S. Army Research Office Award W911NF-17-1-0367. 8 References [1] Alberto Abadie and Guido W Imbens. Large sample properties of matching estimators for average treatment effects. Econometrica, 74(1):235–267, 2006. [2] Deepak Agarwal, Lihong Li, and Alexander J Smola. Linear-time estimators for propensity scores. In Proceedings of the International Conference on Artificial Intelligence and Statistics, pages 93–100, 2011. [3] Susan Athey and Guido Imbens. Recursive partitioning for heterogeneous causal effects. Proceedings of the National Academy of Sciences, 113(27):7353–7360, 2016. [4] Karsten M Borgwardt, Arthur Gretton, Malte J Rasch, Hans-Peter Kriegel, Bernhard Schölkopf, and Alex J Smola. Integrating structured biological data by kernel maximum mean discrepancy. Bioinformatics, 22(14):e49–e57, 2006. [5] Kay H Brodersen, Fabian Gallusser, Jim Koehler, Nicolas Remy, and Steven L Scott. Inferring causal impact using bayesian structural time-series models. The Annals of Applied Statistics, 9(1):247–274, 2015. [6] David Chan, Rong Ge, Ori Gershony, Tim Hesterberg, and Diane Lambert. Evaluating online ad campaigns in a pipeline: causal models at scale. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 7–16. ACM, 2010. [7] Yale Chang and Jennifer G Dy. Informative subspace learning for counterfactual inference. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, pages 1770–1776, 2017. [8] Rajeev H Dehejia and Sadek Wahba. Propensity score-matching methods for nonexperimental causal studies. Review of Economics and Statistics, 84(1):151–161, 2002. [9] Alexis Diamond and Jasjeet S Sekhon. Genetic matching for estimating causal effects: A general multivariate matching method for achieving balance in observational studies. Review of Economics and Statistics, 95(3):932–945, 2013. [10] Doris Entner, Patrik Hoyer, and Peter Spirtes. Data-driven covariate selection for nonparametric estimation of causal effects. In Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics, pages 256–264, 2013. [11] David Galles and Judea Pearl. An axiomatic characterization of causal counterfactuals. Foundations of Science, 3(1):151–182, 1998. [12] Thomas A Glass, Steven N Goodman, Miguel A Hernán, and Jonathan M Samet. Causal inference in public health. Annual Review of Public Health, 34:61–75, 2013. [13] Xiaofei He and Partha Niyogi. Locality preserving projections. In Advances in Neural Information Processing Systems, pages 153–160, 2004. [14] James J Heckman, Hidehiko Ichimura, and Petra Todd. Matching as an econometric evaluation estimator. The Review of Economic Studies, 65(2):261–294, 1998. [15] Daniel N Hill, Robert Moakler, Alan E Hubbard, Vadim Tsemekhman, Foster Provost, and Kiril Tsemekhman. Measuring causal impact of online actions via natural experiments: application to display advertising. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1839–1847. ACM, 2015. [16] Jennifer L Hill. Bayesian nonparametric modeling for causal inference. Journal of Computational and Graphical Statistics, 20(1):217–240, 2012. [17] Stefano M Iacus, Gary King, and Giuseppe Porro. Causal inference without balance checking: Coarsened exact matching. Political Analysis, 20(1):1–24, 2011. [18] Kosuke Imai and Marc Ratkovic. Covariate balancing propensity score. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(1):243–263, 2014. [19] Guido Imbens and Donald B. Rubin. Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction. Cambridge University Press, 2015. [20] Hui Jin and Donald B Rubin. Principal stratification for causal inference with extended partial compliance. Journal of the American Statistical Association, 103(481):101–111, 2008. [21] Fredrik D. Johansson, Uri Shalit, and David Sontag. Learning representations for counterfactual inference. In Proceedings of the 33nd International Conference on Machine Learning, pages 3020–3029, 2016. 9 [22] Ian Jolliffe. Principal Component Analysis. John Wiley and Sons, 2002. [23] Robert J LaLonde. Evaluating the econometric evaluations of training programs with experimental data. The American Economic Review, pages 604–620, 1986. [24] Brian K Lee, Justin Lessler, and Elizabeth A Stuart. Improving propensity score weighting using machine learning. Statistics in Medicine, 29(3):337–346, 2010. [25] Sheng Li, Nikos Vlassis, Jaya Kawale, and Yun Fu. Matching via dimensionality reduction for estimation of treatment effects in digital marketing campaigns. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, pages 3768–3774, 2016. [26] Qingshan Liu, Xiaoou Tang, Hanqing Lu, Songde Ma, et al. Face recognition using kernel scatterdifference-based discriminant analysis. IEEE Transactions on Neural Networks, 17(4):1081–1085, 2006. [27] Jerzy Neyman. On the application of probability theory to agricultural experiments. Essay on principles. Section 9. Statistical Science, 5(4):465–480, 1923. [28] Sinno Jialin Pan, James T Kwok, and Qiang Yang. Transfer learning via dimensionality reduction. In Proceedings of the Twenty-Third AAAI Conference on Artificial Intelligence, volume 8, pages 677–682, 2008. [29] Judea Pearl. Causality. Cambridge University Press, 2009. [30] Deborah N Peikes, Lorenzo Moreno, and Sean Michael Orzol. Propensity score matching: A note of caution for evaluators of social programs. The American Statistician, 62(3):222–231, 2008. [31] Paul R Rosenbaum and Donald B Rubin. The central role of the propensity score in observational studies for causal effects. Biometrika, 70(1):41–55, 1983. [32] Donald B Rubin. Matching to remove bias in observational studies. Biometrics, pages 159–183, 1973. [33] Donald B Rubin. Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology, 66(5):688–701, 1974. [34] Donald B Rubin. Using multivariate matched sampling and regression adjustment to control bias in observational studies. Journal of the American Statistical Association, 74(366):318–328, 1979. [35] Donald B Rubin and Neal Thomas. Combining propensity score matching with additional adjustments for prognostic covariates. Journal of the American Statistical Association, 95(450):573–585, 2000. [36] Adam C Sales, Asa Wilks, and John F Pane. Student usage predicts treatment effect heterogeneity in the cognitive tutor algebra i program. In Proceedings of the International Conference on Educational Data Mining, pages 207–214, 2016. [37] Uri Shalit, Fredrik Johansson, and David Sontag. Bounding and minimizing counterfactual error. arXiv preprint arXiv:1606.03976, 2016. [38] Ricardo Silva and Robin Evans. Causal inference through a witness protection program. In Advances in Neural Information Processing Systems, pages 298–306, 2014. [39] Peter Spirtes. Introduction to causal inference. Journal of Machine Learning Research, 11(May):1643– 1662, 2010. [40] Elizabeth A Stuart. Matching methods for causal inference: A review and a look forward. Statistical science: a review journal of the Institute of Mathematical Statistics, 25(1):1–21, 2010. [41] Wei Sun, Pengyuan Wang, Dawei Yin, Jian Yang, and Yi Chang. Causal inference via sparse additive models with application to online advertising. In Proceedings of Twenty-Ninth AAAI Conference on Artificial Intelligence, pages 297–303, 2015. [42] Stefan Wager and Susan Athey. Estimation and inference of heterogeneous treatment effects using random forests. arXiv preprint arXiv:1510.04342, 2015. [43] Pengyuan Wang, Wei Sun, Dawei Yin, Jian Yang, and Yi Chang. Robust tree-based causal inference for complex ad effectiveness analysis. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining, pages 67–76. ACM, 2015. 10 [44] Pengyuan Wang, Dawei Yin, Jian Yang, Yi Chang, and Marsha Meytlis. Rethink targeting: detect ‘smart cheating’ in online advertising through causal inference. In Proceedings of the 24th International Conference on World Wide Web Companion, pages 133–134, 2015. [45] Kun Zhang, Mingming Gong, and Bernhard Schölkopf. Multi-source domain adaptation: A causal view. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, pages 3150–3157, 2015. [46] Kun Zhang, Bernhard Schölkopf, Krikamol Muandet, and Zhikun Wang. Domain adaptation under target and conditional shift. In Proceedings of the International Conference on Machine Learning (3), pages 819–827, 2013. 11 | 2017 | 472 |
6,977 | Tomography of the London Underground: a Scalable Model for Origin-Destination Data Nicolò Colombo Department of Statistical Science University College London nicolo.colombo@ucl.ac.uk Ricardo Silva The Alan Turing Institute and Department of Statistical Science University College London ricardo.silva@ucl.ac.uk Soong Kang School of Management University College London smkang@ucl.ac.uk Abstract The paper addresses the classical network tomography problem of inferring local traffic given origin-destination observations. Focusing on large complex public transportation systems, we build a scalable model that exploits input-output information to estimate the unobserved link/station loads and the users’ path preferences. Based on the reconstruction of the users’ travel time distribution, the model is flexible enough to capture possible different path-choice strategies and correlations between users travelling on similar paths at similar times. The corresponding likelihood function is intractable for medium or large-scale networks and we propose two distinct strategies, namely the exact maximum-likelihood inference of an approximate but tractable model and the variational inference of the original intractable model. As an application of our approach, we consider the emblematic case of the London underground network, where a tap-in/tap-out system tracks the starting/exit time and location of all journeys in a day. A set of synthetic simulations and real data provided by Transport For London are used to validate and test the model on the predictions of observable and unobservable quantities. 1 Introduction In the last decades, networks have been playing an increasingly important role in our all-day lives [1, 2, 3, 4, 5, 6]. Most of the time, networks cannot be inspected directly and their properties should be reconstructed form end-point or partial and local observations [7, 8]. The problem has been referred to as network ‘tomography’, a medical word to denote clinical techniques that produce detailed images of the interior of the body from external signals [9, 10]. Nowadays the concept of tomography has gained wider meanings and the idea applies, in different forms, to many kinds of communication and transportation networks [11, 12, 13]. In particular, as the availability of huge amounts of data has grown exponentially, network tomography has become an important branch of statistical modelling [14, 15, 16, 17, 8]. However, due to the complexity of the task, existing methods are usually only designed for small-size networks and become intractable for most real-world applications (see [7, 18] for a discussion on this point). The case of large public transportation networks has attracted special attention since massive datasets of input-output single-user data have been produced by tap-in and tap-out systems installed in big city as London, Singapore and Beijing [19, 20, 18, 21]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Depending on the available measurements, two complementary formulations of network tomography have been considered: (i) the reconstruction of origin-destination distributions from local and partial traffic observations [11, 14, 9, 15, 16] and (ii) the estimation of the link and node loads from inputoutput information [22, 23, 24]. In practice, the knowledge of the unobserved quantities may help design structural improvements of the network or be used to predict the system’s behaviour in case of disruptions [25, 26, 13, 27, 28]. Focusing on the second (also referred to as ‘dual’) formulation of the tomography problem, this paper addresses the challenging case where both the amount of data and the size of the network are large. When only aggregated data are observable, traffic flows over a given network can also be analysed by methods such as collective graphical models for diffusion dynamics [29, 30]. An important real-world application of dual network tomography is reconstructing the traffic of bits sent from a source node to a destination node in a network of servers, terminals and routers. The usual assumption, in those cases, is the tree structure of the network and models infer the bits trajectories from a series of local delays, i.e. loss functions defined at each location in the network [22, 23, 24]. The posterior of the travel time distribution at each intermediate position along the path is then used to reconstruct the unobserved local loads, i.e. the number of packets at a given node and time. We extend and apply this general idea to urban public transportation systems. The traffic to be estimated is the flow of people travelling across the system during a day, i.e. the number of people at a given location and time (station/link load). The nodes of the network are (> 100) underground stations, connected via (∼10) partially overlapping underground ‘lines’, which can be look at as interacting ‘layers’ of connectivity [31]. The observations are single-user records with information about the origin, destination, starting time and exit time of each journey. Two key unobserved quantities to be estimated are (i) the users’ path preferences for a given origin-destination pair [32, 28] and (ii) the station/link loads [33, 34, 35]. Put together, a model for the users’ path preferences and a precise estimation of the local train loads can help detect network anomalies or predict the behaviour of the system in case of previously unobserved disruptions [18, 27, 21]. Respect to the classical communication network case, modelling a complex transportation system requires three challenging extensions: (i) the network structure is a multi-layer (loopy) network, where users are allowed to ‘change line’ on those nodes that are shared by different layers; (ii) the user’s choice between many feasible paths follows rules that can go far beyond simple length-related schemes; (iii) harder physical constraints (the train time schedule for example) may create high correlations between users travelling on the same path at similar times. Taking into a account such peculiar features of transportation networks, while keeping the model scalable respect to both the size of the network and the dataset, is the main contribution of this work. Model outline We represent the transportation system by a sparse graph, where each node is associated with an underground station and each edge with a physical connection between two stations. The full network is the sum of simple sub-graphs (lines) connected by sets of shared nodes (where the users are allowed to change line) [31]. For a given origin-destination pair, there may exist a finite number of possible simple (non redundant) trajectories, corresponding to distinct line-change strategies. The unobserved user’s choice is treated as a latent variable taking values over the set of all feasible paths between the origin and destination. The corresponding probability distribution may depend on the length of the path, i.e. the number of nodes crossed by the path, or any other arbitrary feature of the path. In our multi-layers setup, for example, it is natural to include a ‘depth’ parameter taking into account the number of layers visited, i.e. the number of lines changes. For any feasible path γ = [γ1, . . . , γℓ], the travel time at the intermediate stations is defined by the recursive relation t(γi) ∼t(γi−1) + Poisson(a(γi−1, so + t(γi−1), γ)) i = 1, . . . , ℓ (1) where t(x) the is travel time at location x ∈{γ1, . . . , γℓ}, so is the starting time, a = a(x, so+t(x), γ) are local delays that depend on the location, x, the absolute time so + t(x) and the path γ. The choice of the Poisson distribution is convenient 1 in this framework due to its simple single-parameter form and the fact that t(x) is an integer in the dataset that motivates this work (travel time is recorded in minutes). The dependence on γ allows including global path-related features, such as, for example, an extra delay associated to each line change along the path or the time spent by the user while walking through the origin and destination stations. The dependence on so and t(x) is what ensures 1Other options include negative binomial and shifted geometric distributions 2 the scalability of the model because all users can be treated independently given their starting time. The likelihood associated with all journeys in a day has a factorised form p(t(1) d , . . . , t(N) d |s(1) o , . . . , s(N) o ) = N Y n=1 p(t(n) d |s(n) o ) (2) where t(n) d is the total travel time of the nth user and N the total number of users in a day and each p(t(n) d |s(n) o ) depends only locally on the model parameters, i.e. on the delay functions associated with the nodes crossed by the corresponding path. The drawback is that an exact computation of (2) is intractable and one needs approximate inference methods to identify the model parameters from the data. We address the inference problem in two complementary ways. The first one is a model-approximation method, where we perform the exact inference of the approximate (tractable) model t(γi) ∼t(γi−1) + Poisson(a(γi−1, so + ¯ti−1, γ)) i = 1, . . . , ℓ (3) where ¯ti−1 is a deterministic function of the model parameters that is defined by the difference equation ¯ti = ¯ti−1 + a(γi−1, so + ¯ti−1, γ) i = 1, . . . , ℓ (4) The second one is a variational inference approach where we maximise a lower bound of the intractable likelihood associated with (1). In both cases, we use stochastic gradient updates to solve iteratively the corresponding non-convex optimization. Since the closed form solution of (4) is in general not available, the gradients of the objective functions cannot be computed explicitly. At each iteration, they are obtained recursively from a set of difference equations derived from (4), following a scheme that can be seen as a simple version of the back-propagation method used to train neural networks. Finally, we initialize the iterative algorithms by means of a method of moments estimation of the time-independent part of the delay functions. Choosing a random distribution over the feasible paths, this is obtained from the empirical moments of the travel time distribution (of the approximate model (10)) by solving a convex optimization problem. London underground experiments The predictive power of our model is tested via a series of synthetic and real-world experiments based on the London underground network. All details of the multi-layer structure of the network can be found in [36]. In the training step we use input-output data that contain the origin, the destination, the starting time and the exit time of each (pseudonymised) user of the system. This kind of data are produced nowadays by tap-in/tap-out smart card systems such as the Oyster Card systems in London [19]. The trained models can then used to predict the unobserved number of people travelling through a given station at a given time in the day, as well as the user’s path preferences for given origin-destination pair. In the synthetic experiments, we compared the model estimations with the values produced by the ‘ground-truth’ (a set of random parameters used to generate the synthetic data) and test the performance of the two proposed inference methods. In the real-world experiment, we used original pseudonymised data provided by Transport for London. The dataset consisted of more than 500000 origin destination records, from journeys realised in a single day on the busiest part of the London underground network (Zone 1 and 2, see [36]), and a subset of NetMIS records [37] from the same day. NetMIS data contain realtime information about the trains transiting through a given station and, for an handful of major underground stations (all of them on the Victoria line), include quantitative estimation of the realtime train weights. The latter can be interpreted as a proxy of the realtime (unobserved) number of people travelling through the corresponding nodes of the network and used to evaluate the model’s predictions in a quantitative way. The model has also been tested on a out-of-sample Oyster-card dataset by comparing expected and observed travel time between a selection of station pairs. Unfortunately, we are not aware of any existing algorithm that could be applicable for a fair comparison on similar settings. 2 Travel time model Let o, d and so be the origin, the destination and the starting time of a user travelling through the system. Let Γod be the set of all feasible paths between o and d. Then the probability of observing a 3 travel time td is a mixture of probability distributions p(td) = X γ∈Γod ppath(γ)p(td|γ) ppath(γ) = e−L(γ) P γ∈Γod e−L(γ) (5) where the conditional p(td|γ) can be interpreted as the travel time probability over a particular path, ppath(γ) is the probability of choosing that particular path and L(γ) is some arbitrary ‘effective length’ of the path γ. According to (1), the conditional probabilities p(td|γ) are complicated convolutions of Poisson distributions. An equivalent but more intuitive formulation is td = ℓ(γ) X i=2 ri ri ∼Poisson(a(γi−1, so + ℓ X k=2 rk, γ)) γ ∼Ppath(L(γ)) (6) where the travel time td is explicitly expressed as the sum of the local delays, ri = t(γi) −t(γi−1), along a feasible path γ ∈Γod. Since the time at the intermediate positions, i.e. t(γi) for i ̸= 1, ℓ, is not observed, the local delays r2, . . . , rℓ(γ) are treated as hidden variables. Letting ¯ℓ= maxγ∈Γod ℓ(γ), the complete likelihood is p(r1, . . . , r¯ℓ, γ) = p(r1, . . . , r¯ℓ|γ)ppath(γ) p(r1, . . . , r¯ℓ|γ) = ¯ℓ Y i=1 e−λiλri i ri! (7) where λi = a(γi−1, so + Pi−1 k=2 rk, γ) if i ≤ℓ(γ) and λi = 0 if i > ℓ(γ). Marginalizing over all hidden variables one obtains the explicit form of the conditional probability distributions in the mixture (5), i.e. p(td|γ) = ∞ X r2=0 · · · ∞ X r¯ℓ=0 δ(td − ¯ℓ X i=2 ri) ¯ℓ Y i=2 e−λiλri i ri! (8) Since λi = λi(ri−1, . . . , r2) for each i = 2, . . . , ℓ, the evaluation of each conditional probabilities requires performing a (ℓ−1)-dimensional infinite sum, which is numerically intractable and makes an exact maximum likelihood approach infeasible. 2 3 Inference An exact maximum likelihood estimation of the model parameters in a(x, s, γ) and L(γ) is infeasible due to the intractability of the evidence (8). One possibility is to use a Monte Carlo approximation of the exact evidence (8) by sampling from the nested Poisson distributions. In this section we propose two alternative methods that do not require sampling from the target distribution. The first method is based on the exact inference of an approximate but tractable model. The latter depends on the same parameters as the original one (the ‘reference’ model (6)) but is such that the local delays become independent given the path and the starting time. The second approach consists of an approximate variational inference of (6) with the variational posterior distribution defined in terms of the deterministic model (4). 3.1 Exact inference of an approximate model We consider the approximation of the reference model (6) defined by td = ℓ(γ) X i=2 ri ri ∼Poisson(a(γi−1, so + ¯ti−1, γ)) γ ∼Ppath(L(γ)) (10) 2An exact evaluation of the moments ⟨tn d⟩= ∞ X t=0 tn p(t) = X γ∈Γod ppath(γ) ∞ X r2=0 · · · ∞ X r¯ℓ=0 ( ¯ℓ X i=2 ri)n ¯ℓ Y i=2 e−λiλri i ri! (9) is also intractable. 4 where the ¯ti are obtained recursively from (4). In this case, the ℓ(γ) −1 local delays ri are decoupled and the complete likelihood is given by p(r1, . . . , r¯ℓ, γ) = p(r1, . . . , r¯ℓ|γ)ppath(γ) p(r1, . . . , r¯ℓ|γ) = ¯ℓ Y i=1 e−λiλri i ri! (11) where λi = a(γi−1, so + ¯ti−1(γ), γ) if i ≤ℓ(γ) and λi = 0 if i > ℓ(γ). Noting that td is the sum of independent Poisson random variables, we have p(td) = X γ∈Γod ppath(γ) td X r2=0 . . . , td X r¯ℓ=0 δ(td − ¯ℓ X i=2 ri) ¯ℓ Y i=2 e−λiλri i ri! = X γ∈Γod ppath(γ)e−¯t¯ℓ¯ttd ¯ℓ td! (12) where we have used P¯ℓ i=2 λi = ¯t¯ℓ. The parameters in the model function a and L can then be identified with the solution of the following non-convex maximization problem maxa,L D X o=1 D X d=1 T −1 X so=0 T X sd=so N(o, d, so, sd) log p(sd −so) (13) where N(o, d, so, sd) is the number of users travelling from o to d with enter and exit time so and sd respectively. 3.2 Variational inference of model the original model We define the approximate posterior distribution q(r, γ) = q(r|γ)qpath(γ) q(r|γ) = pmulti(r; td, η) q(γ) = e−˜L(γ,td) P γ∈Γode−˜ L(γ,td) (14) where we have defined r = [r2, . . . , r¯ℓ], ηi = ¯ti−¯ti−1 ¯t¯ℓ , with ¯ti = ¯ti−1 for all ℓ(γ) < i ≤¯ℓ, pmulti(r; td, η) = δ(td −P¯ℓ i=2 ri)td! Q¯ℓ i=2 η ri i ri! and the function ˜L(γ, td) depends on the path, γ, and the observed travel time, td. Except for the corrected length ˜L(γ, td), the variational distribution (14) share the same parameters over all data points and can be used directly to evaluate the likelihood lower bound (ELBO) L = Eq(log p(td)) −Eq(log q) 3. One has L(o, d, so, td) = −log td! + X γ∈Γod qpath(γ) log ppath(γ) qpath(γ) + X γ∈Γod qpath(γ) ¯ℓ X i=2 Li(γ) Li(γ) = td X r2=1 . . . , td X r¯ℓ=1 pmulti(r; td, η) ¯ℓ X i=2 (−λi + ri log λi ηi ) (15) with λi = a(γi−1, so + Pi−1 k=2 rk) and ηi = a(γi−1,so+¯ti−1) ¯t¯ℓ if i ≤ℓ(γ) and λi = 0 = ηi if i > ℓ(γ). The exact evaluation of each Li(γ) is still intractable due to the multidimensional sum. However, since for any γ and i = 2, . . . , ℓ, λi depends only on the ‘previous’ delays and we can define ηpast = ¯ti−1 ¯t¯ℓ ηfuture = ¯t¯ℓ−¯ti ¯t¯ℓ λi = a(γi−1, so + rpast) (16) where rpast = r2 + · · · + ri−1 and rfuture = ri+1 + · · · + r¯ℓ, and by the grouping property of the multinomial distribution we obtain Li(γ) = td X rfuture=1 td X ri=1 pmulti(r(i), td, η(i))(−λi + ri log λi ηi ) (17) where r(i) = [rpast, ri, rfuture] and η(i) = [ηfuture, ηi, ηpast]. Every Li(γ) can now be computed in O(t3 d) operations and the model parameter identified with the solution of the following non-convex optimization problem maxa,L,˜L D X o=1 D X d=1 T −1 X so=0 T X sd=so N(o, d, so, sd)L(o, d, so, sd −so) (18) 3Similar ‘amortised’ approaches have been used elsewhere to make the approximate inference scalable [38, 39] 5 0 1 2 3 4 5 6 7 8 9 10 log(runtime) 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 prediction error optimization VI ML 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 |uniform-ptrue| 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 |popt-ptrue| path choice probability 1.9 6.977 1 Figure 1: On the left, stochastic iterative solution of (18) (VI) and (13) (ML) for the synthetic dataset. At each iteration, the prediction error is obtained on a small out-of-sample dataset. On the right, distance from the ground-truth of the uniform distribution (x-axis) and the models’ path probability (y-axis) for various origin-destination pairs. In the legend box, total distance from the ground-truth. Stochastic gradient descent Both (13) and (18) consist of O(D2T 2) terms and the estimation of the exact gradient at each iteration can be expansive for large networks D >> 1 or fine time resolutions T >> 1. A common practice in this case is to use a stochastic approximation of the gradient where only a random selection of origin-destination pairs and starting times are used. Note that each L(o, d, so, td) depends on a(x, s, γ) only if the location x is crossed by at least one of the feasible paths between o and d. Initialization The analytic form of the first moments of (12), ⟨td⟩so = P∞ td=1 tdp(td) = P γ∈Γod ppath(γ)¯tℓ(γ), can be used to obtain a partial initialization of the iterative algorithms via a simple moment-matching technique. We assume that, averaging over all possible starting time, the system behaves like a simple communication network with constant delays at each nodes or, equivalently, that a(x, s, γ) = α(x) + V (x, s, γ), with PT s=0 V (x, s, γ) = 0. In this case an initialization of α(x) is obtained by solving minα D X o=1 D X d=1 (tod − X γ∈Γod ppath(γ) ℓ(γ)−1 X k=1 α(γk))2 (19) where tod = 1 Z PT −1 so=0 PT sd=so N(o, d, so, sd)(sd −so), with Z = PT −1 so=0 PT sd=so N(o, d, so, sd), is the ‘averaged’ empirical moments computed from the data. Note that (19) is convex for any fixed choice of ppath(γ). Total derivatives All terms in (13) and (18) are in the form g = g(ξ, ¯ti), where ξ denotes the model parameters and ¯ti = ¯ti(ξ) is defined by the difference equation (4). Since ¯ti is not available as an explicit function of ξ it is not possible to write g = g(ξ) or compute directly its gradient ∇ξg. A way out is to compute the total derivative of the function g with respect to ξ, i.e. dg(ξ, ¯ti) dξ = ∂g(ξ, ¯ti) ∂ξ + ∂g(ξ, ¯ti) ∂¯ti d¯ti dξ (20) where d¯ti dξ , for i = 1, . . . , ℓ, can be obtained from the iterative integration of d¯ti dξ = d¯ti−1 dξ + ∂a(x, s, γ)) ∂ξ + ∂a(x, s, γ)) ∂s s=¯ti−1 d¯ti−1 dξ i = 1, . . . , ℓ (21) which is implied by (4). 4 Experiments The method described in the previous sections is completely general and, except for the initialization step, no special form of the model functions is assumed. In order to captures few key features of 6 0 200 400 600 800 1000 1200 starting time 0 5 10 15 20 25 30 35 exp travel time Kings Cross LU to Oxford Circus true 0.2991 0.2376 0 200 400 600 800 1000 1200 starting time 0 5 10 15 20 25 30 35 40 45 50 exp travel time Oxford Circus to Waterloo LU true 0.09152 0.09095 0 200 400 600 800 1000 1200 starting time 0 10 20 30 40 50 60 70 80 exp travel time Waterloo LU to Paddington LU true 0.1192 0.1131 0 200 400 600 800 1000 1200 starting time 0 5 10 15 20 25 30 35 40 45 50 exp travel time Paddington LU to Kings Cross LU true 0.1715 0.1486 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people Kings Cross LU 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people 0.0165 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people 0.01263 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people Oxford Circus 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people 0.0151 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people 0.01293 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people Paddington LU 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people 0.01355 0 200 400 600 800 1000 1200 time 0 10 20 30 40 50 # of people 0.01341 1 Figure 2: On the left, travel time predicted by the VI model (in blue) and the ML model (in red) of Figure 1 and the ground-truth model (in green) plotted against the starting time for a selection of origin-destination pairs. In the legend box, normalised total distance (∥vexp −vtrue∥/∥vtrue∥) between model’s and ground-truth’s predictions. On the right, station loads predicted by the ground-truth (in green) and the VI model (in blue) and ML model (in red) of Figure 1. The three models and a reduced dataset of N = 10000 true origin, destination and starting time records has been used to simulate the trajectories of N synthetic users. For each model, the N simulated trajectories give the users expected positions at all times (the position is set to 0 if the users is not yet into the system or has finished his journey) that have been used to compute the total number of people being at a given station at a given time. The reported score is the total distance between model’s and ground-truth’s normalised predictions. For station x, the normalised load vector is vx/1T vx where vx(s) is the number of people being at station x at time s. a large transportation system and apply the model to the tomography of the London underground, we have chosen the specific parametrization of the function L(γ) and a(x, s, γ) given in Section 4.1. The parametrised model has then been trained and tested on a series of synthetic and real-world datasets as described in Section 4.2. 4.1 Parametrization For each origin o and the destination d, we have reduced the set of all feasible paths, Γod, to a small set including the shortest path and few perturbations of the shortest path (by forcing different choices at the line-change points). Let C(γ) ∈{0, 1}ℓsuch that C(γi) = 1 if the user changes line at γi and zero otherwise. To parametrize the path probability (5) we chose L(γ) = β1ℓ(γ) + β2c(γ) where ℓ(γ) = |γ|, c(γ) = P i C(γi) and β1, β2 ∈R are free parameters. The posterior-corrected effective length ˜L(γ, td) in (14) was defined as ˜L(γ) = ˜βℓℓ(γ) + ˜βcc(γ) ˜βi = θi1 + θi2u + θi3u−1 u = ˆt−2 d (td −ˆtd)2 i = ℓ, c (22) where td is the observed travel time, ˆtd = P o,d,so,sd N(o, d, so, sd)(sd −so) and θij ∈R, i = ℓ, c and j = 1, 2, 3, are extra free parameters. A regularization term λ(∥β∥2 + P i=ℓ,c ∥θi∥2), with λ = 1/80, has been added to help the convergence of the stochastic algorithm. We let the local time-dependent delay at location x and time s be a(x, s, γ) = softplus(α(x) + V (x, s) + W(x, γ)) with V = Nω X i=1 Nφ X j=1 σij(x) cos (ωis + φj) W = ℓ X i=1 ρ(x)δx,γiC(γi) + η(x) (δx,γ1 + δx,γℓ) (23) where α(x), ρ(x), η(x) ∈R and σ(x) ∈RNω×Nφ are free parameters and {ω1, . . . ωNω} and {φ1, . . . φNφ} two sets of library frequencies and phases. In the synthetic simulation, we have restricted the London underground network [36] to Zone 1 (63 stations), chosen Nω = 5 = Nψ and set W = 0. For the real-data experiments we have considered Zone 1 and 2 (131 stations), Nω = 10, Nψ = 5 and W ̸= 0. 7 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 1.0873 0 10 20 30 40 50 60 70 80 true travel time 0 20 40 60 80 100 120 predicted travel time 0.9043 0 10 20 30 40 50 60 70 80 true travel time 0 20 40 60 80 100 120 predicted travel time 0.59661 0 10 20 30 40 50 60 70 80 true travel time 0 20 40 60 80 100 120 predicted travel time 0.898 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.28693 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.22488 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.35173 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.2634 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.20544 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.18855 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.35999 0 10 20 30 40 50 60 70 80 true travel time 0 10 20 30 40 50 60 70 80 predicted travel time 0.2308 Figure 3: Travel times predicted by a random model (top), the initialization model (middle) obtained from (19) and the ML model (bottom) are scattered against the observed travel times of an out-of-sample test dataset (real data). The plots in the first three columns show the prediction-error of each model on three subsets of the test sample, Sshort (first column), Smedium (second column) and Slong (third column), consisting respectively of short, medium-length and long journeys. The plots in the last column show the prediction error of each model on the whole test dataset Sall = Sshort + Smedium + Slong The reported score is the relative prediction error for the corresponding model and subset of journeys defined as ∥vexp −vtrue∥/∥vtrue∥, with vexp(n) and vtrue(n) being the expected and observed travel times for the nth journey in Si, i ∈{short, medium, long, all}. 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10-4 Euston LU 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.6986 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10-4Finsbury Park 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.7982 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10-4 Green Park 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.9311 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10-4Kings Cross LU 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.5959 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10-4Oxford Circus 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.6311 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10 -4 Stockwell 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 1.453 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10 -4 Victoria LU 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.5859 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10 -4Warren Street 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.7161 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10 -4 Pimlico 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.677 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 observed load #10 -4 Vauxhall LU 400 600 800 1000 1200 1400 1600 time 0 2 4 6 8 predicted load #10 -4 0.6172 Figure 4: Station loads obtained from NetMIS data (in blue) and predicted by the model (in red). NetMIS data contain information about the time period during which a train was at the station and an approximate weight-score of the train. At time s, a proxy of the load at a given station is obtained by summing the score of all trains present at that station at time s. To make the weight scores and the model predictions comparable we have divided both quantities by the area under the corresponding plots (proportional to the number of people travelling through the selected stations during the day). The reported score is the relative prediction error ∥vexp −vtrue∥/∥vtrue∥, with vexp(s) being the (normalised) expected number of people being at the station at time s and vtrue(s) the (normalised) weight-score obtained from the NetMIS data. 8 4.2 Methods and discussion Synthetic and real-world numerical experiments have been performed to: (i) understand how reliable is the proposed approximation method compared to more standard approach (variational inference), (ii) provide quantitative tests of our inference algorithm on the prediction of key unobservable quantities from a ground-truth model and (iii) assess the scalability and applicability of our method by modelling the traffic of a large-scale real-world system. Both synthetic and real-world experiments were are based on the London underground network [36]. Synthetic data were generated from the true origins, destinations and starting times by simulating the trajectories with the ground-truth (random) model described in Section 4.1. On such dataset, we have compared the training performance of the variational inference and the maximum likelihood approaches by measuring the prediction error on an out-of-sample dataset at each stochastic iteration (Figure 1, right). The two trained models have then been tested against the ground-truth on predicting (i) the total travel time (Figure 2, left), (ii) the shape of the users’ path preferences (Figure 1, right) and (iii) the local loads (Figure 2, right). In the real-world experiments, we have trained the model on a dataset of smart-card origin-destination data (pseudonymised Oyster Card records from 21st October 2013 provided by Transport for London4 ) and then tested the prediction of the total travel time on a small out-of-sample set of journeys (Figure 3) . In this case we have compared the model prediction with its indirect estimation obtained from NetMIS records of the same day (Figure 4). NetMIS data contain a partial reconstruction of the actual position and weights of the trains and it is possible to combine them to estimate the load of a given station an any given time in the day. Since full train information was recorded only on one of the 11 underground lines of the network (the Victoria Line), we have restricted the comparison to a small set of stations. The two inference methods (VI for (18) and ML for (13)) have obtained good and statistically similar scores on recovering the ground-truth model predictions (Figure 2). ML has been trained orders of magnitude faster and was almost as accurate as VI on reproducing the users’ path preferences (see Figure 1). Since the performance of ML and VI have shown to be statistically equivalent. Only ML has been used in the real-data experiments. On the prediction of out-of-sample travel times, ML outperformed both a random model and the constant model used for the initialization (a(x, s, γ) = α(x) with α(x) obtained from (19) with uniform ppath). In particular, when all journeys in the test dataset are considered, ML outperforms the baseline method with a 24% improvement. The only sub-case where ML does worse ( 8% less accurate) is on the small subset of long journeys (see Figure 3). These are journeys where i) something unusual happens to the user or ii) the user visits lot of stations. In the latter case, a constant-delay model (as our initialization model) may perform well because we can expect some averaging process between the time variability of all visited stations. Figure 4 shows that ML was able to reproduce the shape and relative magnitude of the ‘true’ time distributions obtained from the NetMIS data. For a more quantitative comparison, we have computed the normalised distance (reported on the top of the red plots in Figure 4) between observed and predicted loads over the day. 5 Conclusions We have proposed a new scalable method for the tomography of large-scale networks from input output data. Based on the prediction of the users’ travel time, the model allows an estimation of the unobserved path preferences and station loads. Since the original model is intractable, we have proposed and compared two different approximate inference schemes. The model hes been tested on both synthetic and real data from the London underground. On synthetic data, we have trained two distinct models with the proposed approximate inference techniques and compare their performance against the ground-truth. Both of them could successfully reproduce the outputs of the ground-truth on observable and unobservable quantities. Trained on real data via stochastic gradient descent, the model outperforms a simple constant-delay model on predicting out-of-sample travel times and produces reasonable estimation of the unobserved station loads. In general, the training step could be made more efficient by a careful design of the mini-batches used in the stochastic optimization. More precisely, since each term in (13) or (18) involves only a very restricted set of parameters (depending on the set feasible paths between the corresponding origin and destination), the inference could be radically improved by stratified sampling techniques as described for example in [40, 41, 42]. 4 The data shown in Figure 3 and 4 are not publicly available, but a reduced database containing similar records can be downloaded from [19] 9 Acknowledgments We thank Transport for London for kindly providing access to data. This work has been funded by a EPSRC grant EP/N020723/1. RS also acknowledges support by The Alan Turing Institute under the EPSRC grant EP/N510129/1 and the Alan Turing Institute-Lloyd’s Register Foundation programme on Data-Centric Engineering. References [1] Everett M Rogers and D Lawrence Kincaid. Communication networks: toward a new paradigm for research. 1981. [2] Stanley Wasserman and Katherine Faust. Social network analysis: Methods and applications, volume 8. Cambridge university press, 1994. [3] Michael GH Bell and Yasunori Iida. Transportation network analysis. 1997. [4] Mark EJ Newman. The structure and function of complex networks. SIAM review, 45(2):167– 256, 2003. [5] Mark Newman, Albert-Laszlo Barabasi, and Duncan J Watts. The structure and dynamics of networks. Princeton University Press, 2011. [6] Nicholas A Christakis and James H Fowler. Social contagion theory: examining dynamic social networks and human behavior. Statistics in medicine, 32(4):556–577, 2013. [7] Mark Coates, Alfred Hero, Robert Nowak, and Bin Yu. Large scale inference and tomography for network monitoring and diagnosis. IEEE Signal Processing Magazine, 2001. [8] Edoardo M Airoldi and Alexander W Blocker. Estimating latent processes on a network from indirect measurements. Journal of the American Statistical Association, 108(501):149–164, 2013. [9] Yehuda Vardi. Network tomography: Estimating source-destination traffic intensities from link data. Journal of the American statistical association, 91(433):365–377, 1996. [10] Rui Castro, Mark Coates, Gang Liang, Robert Nowak, and Bin Yu. Network tomography: Recent developments. Statistical science, pages 499–517, 2004. [11] Luis G Willumsen. Estimation of an od matrix from traffic counts–a review. 1978. [12] Nathan Eagle, Alex Sandy Pentland, and David Lazer. Inferring friendship network structure by using mobile phone data. Proceedings of the national academy of sciences, 106(36):15274– 15278, 2009. [13] Yu Zheng, Licia Capra, Ouri Wolfson, and Hai Yang. Urban computing: concepts, methodologies, and applications. ACM Transactions on Intelligent Systems and Technology (TIST), 5(3):38, 2014. [14] Robert J Vanderbei and James Iannone. An em approach to od matrix estimation. Technical report, Technical Report SOR 94-04, Princeton University, 1994. [15] Claudia Tebaldi and Mike West. Bayesian inference on network traffic using link count data. Journal of the American Statistical Association, 93(442):557–573, 1998. [16] Jin Cao, Drew Davis, Scott Vander Wiel, and Bin Yu. Time-varying network tomography: router link data. Journal of the American statistical association, 95(452):1063–1075, 2000. [17] Yolanda Tsang, Mark Coates, and Robert Nowak. Nonparametric internet tomography. In Acoustics, Speech, and Signal Processing (ICASSP), 2002 IEEE International Conference on, volume 2, pages II–2045. IEEE, 2002. [18] Ricardo Silva, Soong Moon Kang, and Edoardo M Airoldi. Predicting traffic volumes and estimating the effects of shocks in massive transportation systems. Proceedings of the National Academy of Sciences, 112(18):5643–5648, 2015. 10 [19] Transport For London. Official website. https://tfl.gov.uk/. [20] Camille Roth, Soong Moon Kang, Michael Batty, and Marc Barthélemy. Structure of urban movements: polycentric activity and entangled hierarchical flows. PloS one, 6(1):e15923, 2011. [21] Chen Zhong, Michael Batty, Ed Manley, Jiaqiu Wang, Zijia Wang, Feng Chen, and Gerhard Schmitt. Variability in regularity: Mining temporal mobility patterns in london, singapore and beijing using smart-card data. PloS one, 11(2):e0149222, 2016. [22] Ramón Cáceres, Nick G Duffield, Joseph Horowitz, and Donald F Towsley. Multicast-based inference of network-internal loss characteristics. IEEE Transactions on Information theory, 45(7):2462–2480, 1999. [23] Mark J Coates and Robert David Nowak. Network loss inference using unicast end-to-end measurement. In ITC Conference on IP Traffic, Modeling and Management, pages 28–1, 2000. [24] F Lo Presti, Nick G Duffield, Joseph Horowitz, and Don Towsley. Multicast-based inference of network-internal delay distributions. IEEE/ACM Transactions On Networking, 10(6):761–775, 2002. [25] Llewellyn Michael Kraus Boelter and Melville Campbell Branch. Urban planning, transportation, and systems analysis. Proceedings of the National Academy of Sciences, 46(6):824–831, 1960. [26] Jayanth R Banavar, Amos Maritan, and Andrea Rinaldo. Size and form in efficient transportation networks. Nature, 399(6732):130–132, 1999. [27] Haodong Yin, Baoming Han, Dewei Li, Jianjun Wu, and Huijun Sun. Modeling and simulating passenger behavior for a station closure in a rail transit network. PLoS one, 11(12):e0167126, 2016. [28] Junbo Zhang, Yu Zheng, and Dekang Qi. Deep spatio-temporal residual networks for citywide crowd flows prediction. arXiv preprint arXiv:1610.00081, 2016. [29] Akshat Kumar, Daniel Sheldon, and Biplav Srivastava. Collective diffusion over networks: Models and inference. arXiv preprint arXiv:1309.6841, 2013. [30] Jiali Du, Akshat Kumar, and Pradeep Varakantham. On understanding diffusion dynamics of patrons at a theme park. In Proceedings of the 2014 international conference on Autonomous agents and multi-agent systems, pages 1501–1502. International Foundation for Autonomous Agents and Multiagent Systems, 2014. [31] Maciej Kurant and Patrick Thiran. Layered complex networks. Physical review letters, 96(13):138701, 2006. [32] Yu Zheng and Xiaofang Zhou. Computing with spatial trajectories. Springer Science and Business Media, 2011. [33] A Nuzzolo, U Crisalli, L Rosati, and A Ibeas. Stop: a short term transit occupancy prediction tool for aptis and real time transit management systems. In Intelligent Transportation Systems(ITSC), 2013 16th International IEEE Conference on, pages 1894–1899. IEEE, 2013. [34] Bo Friis Nielsen, Laura Frølich, Otto Anker Nielsen, and Dorte Filges. Estimating passenger numbers in trains using existing weighing capabilities. Transportmetrica A: Transport Science, 10(6):502–517, 2014. [35] Gilles Vandewiele, Pieter Colpaert, Olivier Janssens, Joachim Van Herwegen, Ruben Verborgh, Erik Mannens, Femke Ongenae, and Filip De Turck. Predicting train occupancies based on query logs and external data sources. In Proceedings of the 26th International Conference on World Wide Web Companion, pages 1469–1474. International World Wide Web Conferences Steering Committee, 2017. [36] Transport For London. Tube map. https://tfl.gov.uk/cdn/static/cms/documents/standard-tubemap.pdf. 11 [37] Transport For London. Netmis dataset. http://lu.uat.cds.co.uk/Ops_maintenance/Library_tools/Apps_tools/696.html. [38] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [39] Samuel Gershman and Noah Goodman. Amortized inference in probabilistic reasoning. In CogSci, 2014. [40] Prem K Gopalan, Sean Gerrish, Michael Freedman, David M Blei, and David M Mimno. Scalable inference of overlapping communities. In Advances in Neural Information Processing Systems, pages 2249–2257, 2012. [41] Peilin Zhao and Tong Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1–9, 2015. [42] Olivier Canévet, Cijo Jose, and Francois Fleuret. Importance sampling tree for large-scale empirical expectation. In International Conference on Machine Learning, pages 1454–1462, 2016. 12 | 2017 | 473 |
6,978 | Gaussian process based nonlinear latent structure discovery in multivariate spike train data Anqi Wu, Nicholas A. Roy, Stephen Keeley, & Jonathan W. Pillow Princeton Neuroscience Institute Princeton University Abstract A large body of recent work focuses on methods for extracting low-dimensional latent structure from multi-neuron spike train data. Most such methods employ either linear latent dynamics or linear mappings from latent space to log spike rates. Here we propose a doubly nonlinear latent variable model that can identify low-dimensional structure underlying apparently high-dimensional spike train data. We introduce the Poisson Gaussian-Process Latent Variable Model (P-GPLVM), which consists of Poisson spiking observations and two underlying Gaussian processes—one governing a temporal latent variable and another governing a set of nonlinear tuning curves. The use of nonlinear tuning curves enables discovery of low-dimensional latent structure even when spike responses exhibit high linear dimensionality (e.g., as found in hippocampal place cell codes). To learn the model from data, we introduce the decoupled Laplace approximation, a fast approximate inference method that allows us to efficiently optimize the latent path while marginalizing over tuning curves. We show that this method outperforms previous Laplace-approximation-based inference methods in both the speed of convergence and accuracy. We apply the model to spike trains recorded from hippocampal place cells and show that it compares favorably to a variety of previous methods for latent structure discovery, including variational auto-encoder (VAE) based methods that parametrize the nonlinear mapping from latent space to spike rates with a deep neural network. 1 Introduction Recent advances in multi-electrode array recording techniques have made it possible to measure the simultaneous spiking activity of increasingly large neural populations. These datasets have highlighted the need for robust statistical methods for identifying the latent structure underlying high-dimensional spike train data, so as to provide insight into the dynamics governing large-scale activity patterns and the computations they perform [1–4]. Recent work has focused on the development of sophisticated model-based methods that seek to extract a shared, low-dimensional latent process underlying population spiking activity. These methods can be roughly categorized on the basis of two basic modeling choices: (1) the dynamics of the underlying latent variable; and (2) the mapping from latent variable to neural responses. For choice of dynamics, one popular approach assumes the latent variable is governed by a linear dynamical system [5–11], while a second assumes that it evolves according to a Gaussian process, relaxing the linearity assumption and imposing only smoothness in the evolution of the latent state [1, 12–14]. For choice of mapping function, most previous methods have assumed a fixed linear or log-linear relationship between the latent variable and the mean response level [1, 5–8, 11, 12]. These methods seek to find a linear embedding of population spiking activity, akin to PCA or factor analysis. In many cases, however, the relationship between neural activity and the quantity it encodes can be highly nonlinear. Hippocampal place cells provide an illustrative example: if each discrete location in a 2D 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 10 0 1 2 3 0 spike rate latent process log tuning curves tuning curves time (s) spike trains 10 0 time (s) Figure 1: Schematic diagram of the Poisson Gaussian Process Latent Variable Model (P-GPLVM), illustrating multi-neuron spike train data generated by the model with a one-dimensional latent process. environment has a single active place cell, population activity spans a space whose dimensionality is equal to the number of neurons; a linear latent variable model cannot find a reduced-dimensional representation of population activity, despite the fact that the underlying latent variable (“position”) is clearly two-dimensional. Several recent studies have introduced nonlinear coupling between latent dynamics and firing rate [7, 9, 10, 15]. These models use deep neural networks to parametrize the nonlinear mapping from latent space to spike rates, but often require repeated trials or long training sets. Table 1 summarizes these different model structures for latent neural trajectory estimation (including the original Gaussian process latent variable model (GPLVM) [16], which assumes Gaussian observations and does not produce spikes). model latent mapping function output nonlinearity observation PLDS [8] LDS linear exp Poisson PfLDS [9, 10] LDS neural net exp Poisson LFADS [15] RNN neural net exp Poisson GPFA [1] GP linear identity Gaussian P-GPFA [13, 14] GP linear exp Poisson GPLVM [16] GP GP identity Gaussian P-GPLVM GP GP exp Poisson Table 1: Modeling assumptions of various latent variable models for spike trains. In this paper, we propose the Poisson Gaussian process latent variable model (P-GPLVM) for spike train data, which allows for nonlinearity in both the latent state dynamics and in the mapping from the latent states to the spike rates. Our model posits a low-dimensional latent variable that evolves in time according to a Gaussian process prior; this latent variable governs firing rates via a set of non-parametric tuning curves, parametrized as exponentiated samples from a second Gaussian process, from which spikes are then generated by a Poisson process (Fig. 1). The paper is organized as follows: Section 2 introduces the P-GPLVM; Section 3 describes the decoupled Laplace approximation for performing efficient inference for the latent variable and tuning curves; Section 4 describes tuning curve estimation; Section 5 compares P-GPLVM to other models using simulated data and hippocampal place-cell recordings, demonstrating the accuracy and interpretability of P-GPLVM relative to other methods. 2 Poisson-Gaussian process latent variable model (P-GPLVM) Suppose we have simultaneously recorded spike trains from N neurons. Let Y ∈RN×T denote the matrix of spike count data, with neurons indexed by i ∈(1, . . . , N) and spikes counted in discrete 2 time bins indexed by t ∈(1, . . . , T). Our goal is to construct a generative model of the latent structure underlying these data, which will here take the form of a P-dimensional latent variable x(t) and a set of mapping functions or tuning curves {hi(x)}, i ∈(1, . . . , N) which map the latent variable to the spike rates of each neuron. Latent dynamics Let x(t) denote a (vector-valued) latent process, where each component xj(t), j ∈(1, . . . , P), evolves according to an independent Gaussian process (GP), xj(t) ∼GP (0, kt) , (1) with covariance function kt(t, t′) ≜cov(xj(t), xj(t′)) governing how each scalar process varies over time. Although we can select any valid covariance function for kt, here we use the exponential covariance function, a special case of the Matérn kernel, given by k(t, t′) = r exp (−|t −t′|/l), which is parametrized by a marginal variance r > 0 and length-scale l > 0. Samples from this GP are continuous but not differentiable, equivalent to a Gaussian random walk with a bias toward the origin, also known as the Ornstein-Uhlenbeck process [17]. The latent state x(t) at any time t is a P-dimensional vector that we will write as xt ∈RP ×1. The collection of such vectors over T time bins forms a matrix X ∈RP ×T . Let xj denote the jth row of X, which contains the set of states in latent dimension j. From the definition of a GP, xj has a multivariate normal distribution, xj ∼N(0, Kt) (2) with a T × T covariance matrix Kt generated by evaluating the covariance function kt at all time bins in (1, . . . , T). Nonlinear mapping Let h : RP −→R denote a nonlinear function mapping from the latent vector xt to a firing rate λt. We will refer to h(x) as a tuning curve, although unlike traditional tuning curves, which describe firing rate as a function of some externally (observable) stimulus parameter, here h(x) describes firing rate as a function of the (unobserved) latent vector x. Previous work has modeled h with a parametric nonlinear function such as a deep neural network [9, 10]. Here we develop a nonparametric approach using a Gaussian process prior over the log of h. The logarithm assures that spike rates are non-negative. Let fi(x) = log hi(x) denote the log tuning curve for the i’th neuron in our population, which we model with a GP, fi(x) ∼GP (0, kx) , (3) where kx is a (spatial) covariance function that governs smoothness of the function over its Pdimensional input space. For simplicity, we use the common Gaussian or radial basis function (RBF) covariance function: kx(x, x′) = ρ exp −||x −x′||2 2/2δ2 , where x and x′ are arbitrary points in latent space, ρ is the marginal variance and δ is the length scale. The tuning curve for neuron i is then given by hi(x) = exp(fi(x)). Let fi ∈RT ×1 denote a vector with the t’th element equal to fi(xt). From the definition of a GP, fi has a multivariate normal distribution given latent vectors at all time bins x1:T = {xt}T t=1, fi|x1:T ∼N(0, Kx) (4) with a T × T covariance matrix Kx generated by evaluating the covariance function kx at all pairs of latent vectors in x1:T . Stacking fi for N neurons, we will formulate a matrix F ∈RN×T with f ⊤ i on the i’th row. The element on the i’th row and the t’th column is fi,t = fi(xt). Poisson spiking Lastly, we assume Poisson spiking given the latent firing rates. We assume that spike rates are in units of spikes per time bin. Let λi,t = exp(fi,t) = exp(fi(xt)) denote the spike rate of neuron i at time t. The spike-count of neuron i at t given the log tuning curve fi and latent vector xt is Poisson distributed as yi,t|fi, xt ∼Poiss(exp(fi(xt))). (5) In summary, our model is as a doubly nonlinear Gaussian process latent variable model with Poisson observations (P-GPLVM). One GP is used to model the nonlinear evolution of the latent dynamic x, while a second GP is used to generate the log of the tuning curve f as a nonlinear function of x, which is then mapped to a tuning curve h via a nonlinear link function, e.g. exponential function. Fig. 1 provides a schematic of the model. 3 3 Inference using the decoupled Laplace approximation For our inference procedure, we estimate the log of the tuning curve, f, as opposed to attempting to infer the tuning curve h directly. Once f is estimated, h can be obtained by exponentiating f. Given the model outlined above, the joint distribution over the observed data and all latent variables is written as, p(Y, F, X, θ) = p(Y|F)p(F|X, ρ, δ)p(X|r, l) = N Y i=1 T Y t=1 p(yi,t|fi,t) N Y i=1 p(fi|X, ρ, δ) P Y j=1 p(xj|r, l), (6) where θ = {ρ, δ, r, l} is the hyperparameter set, references to which will now be suppressed for simplification. This is a Gaussian process latent variable model (GPLVM) with Poisson observations and a GP prior, and our goal is to now estimate both F and X. A standard Bayesian treatment of the GPLVM requires the computation of the log marginal likelihood associated with the joint distribution (Eq.6). Both F and X must be marginalized out, log p(Y) = log Z Z p(Y, F, X)dXdF = log Z p(Y|F) Z p(F|X)p(X)dX dF. (7) However, propagating the prior density p(X) through the nonlinear mapping makes this inference difficult. The nested integral in (Eq. 7) contains X in a complex nonlinear manner, making analytical integration over X infeasible. To overcome these difficulties, we can use a straightforward MAP training procedure where the latent variables F and X are selected according to FMAP, XMAP = argmaxF,X p(Y|F)p(F|X)p(X). (8) Note that point estimates of the hyperparameters θ can also be found by maximizing the same objective function. As discussed above, learning X remains a challenge due to the interplay of the latent variables, i.e. the dependency of F on X. For our MAP training procedure, fixing one latent variable while optimizing for the other in a coordinate descent approach is highly inefficient since the strong interplay of variables often means getting trapped in bad local optima. In variational GPLVM [18], the authors introduced a non-standard variational inference framework for approximately integrating out the latent variables X then subsequently training a GPLVM by maximizing an analytic lower bound on the exact marginal likelihood. An advantage of the variational framework is the introduction of auxiliary variables which weaken the strong dependency between X and F. However, the variational approximation is only applicable to Gaussian observations; with Poisson observations, the integral over F remains intractable. In the following, we will propose using variations of the Laplace approximation for inference. 3.1 Standard Laplace approximation We first use Laplace’s method to find a Gaussian approximation q(F|Y, X) to the true posterior p(F|Y, X), then do MAP estimation for X only. We employ the Laplace approximation for each fi individually. Doing a second order Taylor expansion of log p(fi|yi, X) around the maximum of the posterior, we obtain a Gaussian approximation q(fi|yi, X) = N(ˆfi, A−1), (9) where ˆfi = argmaxfi p(fi|yi, X) and A = −∇∇log p(fi|yi, X)|fi=ˆfi is the Hessian of the negative log posterior at that point. By Bayes’ rule, the posterior over fi is given by p(fi|yi, X) = p(yi|fi)p(fi|X)/p(yi|X), but since p(yi|X) is independent of fi, we need only consider the unnormalized posterior, defined as Ψ(fi), when maximizing w.r.t. fi. Taking the logarithm gives Ψ(fi) = log p(yi|fi) + log p(fi|X) = log p(yi|fi) −1 2f ⊤ i K−1 x fi −1 2 log |Kx| + const. (10) Differentiating (Eq. 10) w.r.t. fi we obtain ∇Ψ(fi) = ∇log p(yi|fi) −K−1 x fi (11) ∇∇Ψ(fi) = ∇∇log p(yi|fi) −K−1 x = −Wi −K−1 x , (12) where Wi = −∇∇log p(yi|fi). The approximated log conditional likelihood on X (see Sec. 3.4.4 in [17]) can then be written as log q(yi|X) = log p(yi|ˆfi) −1 2 ˆf ⊤ i K−1 x ˆfi −1 2 log |IT + KxWi|. (13) 4 We can then estimate X as XMAP = argmaxX N X i=1 q(yi|X)p(X). (14) When using standard LA, the gradient of log q(yi|X) w.r.t. X should be calculated for a given posterior mode ˆfi. Note that not only is the covariance matrix Kx an explicit function of X, but also ˆfi and Wi are also implicitly functions of X — when X changes, the optimum of the posterior ˆfi changes as well. Therefore, log q(yi|X) contains an implicit function of X which does not allow for a straightforward closed-form gradient expression. Calculating numerical gradients instead yields a very inefficient implementation empirically. 3.2 Third-derivative Laplace approximation One method to derive this gradient explicitly is described in [17] (see Sec. 5.5.1). We adapt their procedure to our setting to make the implicit dependency of ˆfi and Wi on X explicit. To solve (Eq. 14), we need to determine the partial derivative of our approximated log conditional likelihood (Eq. 13) w.r.t. X, given as ∂log q(yi|X) ∂X = ∂log q(yi|X) ∂X explicit + T X t=1 ∂log q(yi|X) ∂ˆfi,t ∂ˆfi,t ∂X (15) by the chain rule. When evaluating the second term, we use the fact that ˆfi is the posterior maximum, so ∂Ψ(fi)/∂fi = 0 at fi = ˆfi, where Ψ(fi) is defined in (Eq. 11). Thus the implicit derivatives of the first two terms in (Eq. 13) vanish, leaving only ∂log q(yi|X) ∂ˆfi,t = −1 2tr (K−1 x + Wi)−1 ∂Wi ∂ˆfi,t ! = −1 2 (K−1 x + Wi)−1 tt ∂3 ∂ˆf 3 i,t log p(yi|ˆfi). (16) To evaluate ∂ˆfi,t/∂X, we differentiate the self-consistent equation ˆfi = Kx∇log p(yi|ˆfi) (setting (Eq. 11) to be 0 at ˆfi) to obtain ∂ˆfi ∂X = ∂Kx ∂X ∇log p(yi|ˆfi) + Kx ∇log p(yi|ˆfi) ∂ˆfi ∂ˆfi ∂X = (IT + KxWi)−1 ∂Kx ∂X ∇log p(yi|ˆfi), (17) where we use the chain rule ∂ ∂X = ∂ˆfi ∂X · ∂ ∂ˆfi and ∂∇log p(yi|ˆfi)/∂ˆfi = −Wi from (Eq. 12). The desired implicit derivative is obtained by multiplying (Eq. 16) and (Eq. 17) to formulate the second term in (Eq. 15). We can now estimate XMAP with (Eq. 14) using the explicit gradient expression in (Eq. 15). We call this method third-derivative Laplace approximation (tLA), as it depends on the third derivative of the data likelihood term (see [17] for further details). However, there is a big computational drawback with tLA: for each step along the gradient we have just derived, the posterior mode ˆfi must be reevaluated. This method might lead to a fast convergence theoretically, but this nested optimization makes for a very slow computation empirically. 3.3 Decoupled Laplace approximation We propose a novel method to relax the Laplace approximation, which we refer to as the decoupled Laplace approximation (dLA). Our relaxation not only decouples the strong dependency between X and F, but also avoids the nested optimization of searching for the posterior mode of F within each update of X. As in tLA, dLA also assumes ˆfi to be a function of X. However, while tLA assumes ˆfi to be an implicit function of X, dLA constructs an explicit mapping between ˆfi and X. The standard Laplace approximation uses a Gaussian approximation for the posterior p(fi|yi, X) ∝ p(yi|fi)p(fi|X) where, in this paper, p(yi|fi) is a Poisson distribution and p(fi|X) is a multivariate Gaussian distribution. We first do the same second order Taylor expansion of log p(fi|yi, X) around the posterior maximum to find q(fi|yi, X) as in (Eq. 9). Now if we approximate the likelihood distribution p(yi|fi) as a Gaussian distribution q(yi|fi) = N(m, S), we can derive its mean m and covariance S. If p(fi|X) = N(0, Kx) and q(fi|yi, X) = N(ˆfi, A−1), the relationship between two Gaussian distributions and their product allow us to solve for m and S from the relationship N(ˆfi, A−1) ∝N(m, S)N(0, Kx): 5 Algorithm 1 Decoupled Laplace approximation at iteration k Input: data observation yi, latent variable Xk−1 from iteration k −1 1. Compute the new posterior mode ˆf k i and the precision matrix Ak by solving (Eq. 10) to obtain q(fi|yi, Xk−1) = N(ˆf k i , Ak−1). 2. Derive mk and Sk (Eq. 18): Sk = (Ak −K−1 x )−1, mk = SkAkˆf k i . 3. Fix mk and Sk and derive the new mean and covariance for q(fi|yi, Xk−1) as functions of X: A(X) = Sk−1 + Kx(X)−1, ˆfi(X) = A(X)−1Sk−1mk = A(X)−1Akˆf k i . 4. Since A = Wi + K−1 x , we have Wi = Sk−1, and can obtain the new approximated conditional distribution q(yi|X) (Eq. 13) with ˆfi replaced by ˆfi(X). 5. Solve Xk = argmaxX PN i=1 q(yi|X)p(X). Output: new latent variable Xk A = S−1 + K−1 x , ˆfi = A−1S−1m =⇒ S = (A −K−1 x )−1, m = SAˆfi. (18) m and S represent the components of the posterior terms, ˆfi and A, that come from the likelihood. Now when estimating X, we fix these likelihood terms m and S, and completely relax the prior, p(fi|X). We are still solving (Eq. 14) w.r.t. X, but now q(fi|yi, X) has both mean and covariance approximated as explicit functions of X. Alg. 1 describes iteration k of the dLA algorithm, with which we can now estimate XMAP. Step 3 indicates that the posterior maximum for the current iteration ˆfi(X) = A(X)−1Akˆf k i is now explicitly updated as a function of X, avoiding the computationally demanding nested optimization of tLA. Intuitively, dLA works by finding a Gaussian approximation to the likelihood at ˆf k i such that the approximated posterior of fi, q(fi|yi, X), is now a closed-form Gaussian distribution with mean and covariance as functions of X, ultimately allowing for the explicit calculation of q(yi|X). 4 Tuning curve estimation Given the estimated ˆX and ˆf from the inference, we can now calculate the tuning curve h for each neuron. Let x1:G = {xg}G g=1 be a grid of G latent states, where xg ∈RP ×1. Correspondingly, for each neuron, we have the log of the tuning curve vector evaluated on the grid of latent states, fgrid ∈RG×1, with the g’th element equal to f(xg). Similar to (Eq. 4), we can write down its distribution as fgrid|x1:G ∼N(0, Kgrid) (19) with a G × G covariance matrix Kgrid generated by evaluating the covariance function kx at all pairs of vectors in x1:G. Therefore we can write a joint distribution for [ˆf, fgrid] as " ˆf fgrid # ∼N 0, Kˆx kgrid k⊤ grid Kgrid . (20) Kˆx ∈RT ×T is a covariance matrix with elements evaluated at all pairs of estimated latent vectors ˆx1:T = {ˆxt}T t=1 in ˆX, and kgridt,g = kx(ˆxt, xg). Thus we have the following posterior distribution over fgrid: fgrid|ˆf, ˆx1:T , x1:G ∼ N(µ(x1:G), Σ(x1:G)) (21) µ(x1:G) = k⊤ gridK−1 ˆx ˆf , Σ(x1:G) = diag(Kgrid) −k⊤ gridK−1 ˆx kgrid where diag(Kgrid) denotes a diagonal matrix constructed from the diagonal of Kgrid. Setting ˆfgrid = µ(x1:G), the spike rate vector ˆλgrid = exp(ˆfgrid) (22) describes the tuning curve h evaluated on the grid x1:G. 5 Experiments 5.1 Simulation data We first examine performance using two simulated datasets generated with different kinds of tuning curves, namely sinusoids and Gaussian bumps. We will compare our algorithm (P-GPLVM) with 6 PfLDS P-GPFA P-GPLVM PLDS True neuron 1 neuron 4 neuron 12 D) PLDS PfLDS True location P-GPFA P-GPLVM-dLA -1.2 -0.4 0.4 0 1.5 3 -1.2 -0.4 0.4 0 1.5 3 1.5 3 1.5 3 0 0 -1.2 -0.4 0.4 -1.2 -0.4 0.4 PLDS PfLDS P-GPFA P-GPLVM-dLA location spike rate neuron 4 neuron 10 neuron 19 True Estimated B) -2 0 2 1st dimension 0 2 2nd dimension 20 60 100 time Gaussian bump tuning curve C) time 20 60 100 -1.2 -0.4 0.4 1st dimension Sinusoid tuning curve A) 0.8 0.9 Gaussian bump tuning curve E) F) P-GPLVM-dLA PfLDS P-GPFA GPLVM P-GPLVM-tLA P-GPLVM-aLA Sinusoid tuning curve 0.9 0.6 0.3 PLDS 0.9 0.8 0.7 0.6 0 400 800 time (sec) P-GPLVM-tLA P-GPLVM-aLA P-GPLVM-dLA value value Figure 2: Results from the sinusoid and Gaussian bump simulated experiments. A) and C) are estimated latent processes. B) and D) display the tuning curves estimated by different methods. E) shows the R2 performances with error bars. F) shows the convergence R2 performances of three different Laplace approximation inference methods with error bars. Error bars are plotted every 10 seconds. PLDS, PfLDS, P-GPFA and GPLVM (see Table 1), using the tLA and dLA inference methods. We also include an additional variant on the Laplace approximation, which we call the approximated Laplace approximation (aLA), where we use only the explicit (first) term in (Eq. 15) to optimize over X for multiple steps given a fixed ˆfi. This allows for a coarse estimation for the gradient w.r.t. X for a few steps in X before estimation is necessary, partially relaxing the nested optimization so as to speed up the learning procedure. For comparison between models in our simulated experiments, we compute the R-squared (R2) values from the known latent processes and the estimated latent processes. In all simulation studies, we generate 1 single trial per neuron with 20 simulated neurons and 100 time bins for a single experiment. Each experiment is repeated 10 times and results are averaged across 10 repeats. Sinusoid tuning curve: This simulation generates a "grid cell" type response. A grid cell is a type of neuron that is activated when an animal occupies any point on a grid spanning the environment [19]. When an animal moves in a one-dimensional space (P = 1), grid cells exhibit oscillatory responses. Motivated by the response properties of grid cells, the log firing rate of each neuron i is coupled to the latent process through a sinusoid with a neuron-specific phase Φi and frequency ωi, fi = sin(ωix + Φi). (23) We randomly generated Φi uniformly from the region [0, 2π] and ωi uniformly from [1.0, 4.0]. An example of the estimated latent processes versus the true latent process is presented in Fig. 2A. We used least-square regression to learn an affine transformation from the latent space to the space of the true locations. Only P-GPLVM finds the global optimum by fitting the valley around t = 70. Fig. 2B displays the true tuning curves and the estimated tuning curves for neuron 4, 10, & 9 with PLDS, PfLDS, P-GPFA and P-GPLVM-dLA. For PLDS, PfLDS and P-GPFA, we replace the estimated ˆf with the observed spike count y in (Eq. 21), and treat the posterior mean as the tuning curve on a grid of latent representations. For P-GPLVM, the tuning curve is estimated via (Eq. 22). The R2 performance is shown in the first column of Fig. 2E. Deterministic Gaussian bump tuning curve: For this simulation, each neuron’s tuning curve is modeled as a unimodal Gaussian bump in a 2D space such that the log of the tuning curve, f, is a deterministic Gaussian function of x. Fig. 2C shows an example of the estimated latent processes. PLDS fits an overly smooth curve, while P-GPLVM can find the small wiggles that are missed by other methods. Fig. 2D displays the 2D tuning curves for neuron 1, 4, & 12 estimated by PLDS, PfLDS, P-GPFA and P-GPLVM-dLA. The R2 performance is shown in the second column of Fig. 2E. Overall, P-GPFA has a quite unstable performance due to the ARD kernel function in the GP prior, potentially encouraging a bias for smoothness even when the underlying latent process is actually 7 PLDS True location P-GPLVM-dLA 200 600 1000 180 220 1st dimension 200 600 1000 50 150 2nd dimension time (ms) rat 2 A) B) C) D) 0 100 200 0 4 0 100 200 0 5 0 100 200 0 4 0 100 200 0 5 0 100 200 0 4 0 100 200 0 5 0 100 200 0 4 0 100 200 0 5 location spike rate neuron 1 neuron 12 neuron 2 neuron 10 True location Estimated location 0 100 200 300 0.5 1.5 0 100 200 300 0 5 0 100 200 300 0 5 0 100 200 300 0 5 0 100 200 300 0.5 1.5 0 100 200 300 0 5 0 100 200 300 0 5 0 100 200 300 0 5 neuron 19 neuron 1 neuron 9 neuron 28 True location Estimated location location rat 1 200 600 1000 100 200 1st dimension 20 100 2nd dimension 200 600 1000 time (ms) E) F) value 0.8 0.75 0.7 0.65 0.4 0.3 0.2 PLL value 0.8 0.75 0.7 0.65 PLDS PfLDS P-GPFA GPLVM P-GPLVM-aLA P-GPLVM-tLA P-GPLVM-dLA 0.15 0.1 PLL Figure 3: Results from the hippocampal data of two rats. A) and B) are estimated latent processes during a 1s recording period for two rats. C) and D) show R2 and PLL performance with error bars. E) and F) display the true tuning curves and the tuning curves estimated by P-GPLVM-dLA. quite non-smooth. PfLDS performs better than PLDS in the second case, but when the true latent process is highly nonlinear (sinusoid) and the single-trial dataset is small, PfLDS losses its advantage to stochastic optimization. GPLVM has a reasonably good performance with the nonlinearities, but is worse than P-GPLVM which demonstrates the significance of using the Poisson observation model. For P-GPLVM, the dLA inference algorithm performs best overall w.r.t. both convergence speed and R2 (Fig. 2F). 5.2 Application to rat hippocampal neuron data Next, we apply the proposed methods to extracellular recordings from the rodent hippocampus. Neurons were recorded bilaterally from the pyramidal layer of CA3 and CA1 in two rats as they performed a spatial alternation task on a W-shaped maze [20]. We confine our analyses to simultaneously recorded putative place cells during times of active navigation. Total number of simultaneously recorded neurons ranged from 7-19 for rat 1 and 24-38 for rat 2. Individual trials of 50 seconds were isolated from 15 minute recordings, and binned at a resolution of 100ms. We used this hippocampal data to identify a 2D latent space using PLDS, PfLDS, P-GPFA, GPLVM and P-GPLVMs (Fig. 3), and compared these to the true 2D location of the rodent. For visualization purposes, we linearized the coordinates along the arms of the maze to obtain 1D representations. 8 Fig. 3A & B present two segments of 1s recordings for the two animals. The P-GPLVM results are smoother and recover short time-scale variations that PLDS ignores. The average R2 performance for all methods for each rodent is shown in Fig. 3C & D where P-GPLVM-dLA consistently performs the best. We also assessed the model fitting quality by doing prediction on a held-out dataset. We split all the time bins in each trial into training time bins (the first 90% time bins) and held-out time bins (the last 10% time bins). We first estimated the parameters for the mapping function or the tuning curve in each model using spike trains from all the neurons within training time bins. Then we fixed the parameters and inferred the latent process using spike trains from 70% neurons within held-out time bins. Finally, we calculated the predictive log likelihood (PLL) for the other 30% neurons within held-out time bins given the inferred latent process. We subtracted the log-likelihood of the population mean firing rate model (single spike rate) from the predictive log likelihood divided by number of observations, shown in Fig. 3C & D. Both P-GPLVM-aLA and P-GPLVM-dLA perform well. GPLVM has very negative PLL, omitted in the figures. Fig. 3E & F present the tuning curves learned by P-GPLVM-dLA where each row corresponds to a neuron. For our analysis we have the true locations xtrue, the estimated locations xP-GPLVM, a grid of G locations x1:G distributed with a shape of the maze, the spike count observation yi, and the estimated log of the tuning curves ˆfi for each neuron i. The light gray dots in the first column of Fig. 3E & F are the binned spike counts when mapping from the space of xtrue to the space of x1:G. The second column contains the binned spike counts mapped from the space of xP-GPLVM to the space of x1:G. The black curves in the first column are achieved by replacing ˆx and ˆf with xtrue and y respectively using the predictive posterior in (Eq. 21) and (Eq. 22). The yellow curves in the second column are the estimated tuning curves by using (Eq. 22) to get ˆλgrid for each neuron. We can tell that the estimated tuning curves closely match the true tuning curves from the observations, discovering different responsive locations for different neurons as the rat moves. 6 Conclusion We proposed a doubly nonlinear Gaussian process latent variable model for neural population spike trains that can identify nonlinear low-dimensional structure underlying apparently high-dimensional spike train data. We also introduced a novel decoupled Laplace approximation, a fast approximate inference method that allows us to efficiently maximize marginal likelihood for the latent path while integrating over tuning curves. We showed that this method outperforms previous Laplaceapproximation-based inference methods in both the speed of convergence and accuracy. We applied the model to both simulated data and spike trains recorded from hippocampal place cells and showed that it outperforms a variety of previous methods for latent structure discovery. 9 References [1] BM Yu, JP Cunningham, G Santhanam, SI Ryu, KV Shenoy, and M Sahani. Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity. In Adv neur inf proc sys, pages 1881–1888, 2009. [2] L. Paninski, Y. Ahmadian, Daniel G. Ferreira, S. Koyama, Kamiar R. Rad, M. Vidne, J. Vogelstein, and W. Wu. A new look at state-space models for neural data. J comp neurosci, 29(1-2):107–126, 2010. [3] John P Cunningham and B M Yu. Dimensionality reduction for large-scale neural recordings. Nature neuroscience, 17(11):1500–1509, 2014. [4] SW Linderman, MJ Johnson, MA Wilson, and Z Chen. A bayesian nonparametric approach for uncovering rat hippocampal population codes during spatial navigation. J neurosci meth, 263:36–47, 2016. [5] JH Macke, L Buesing, JP Cunningham, BM Yu, KV Shenoy, and M Sahani. Empirical models of spiking in neural populations. In Adv neur inf proc sys, pages 1350–1358, 2011. [6] L Buesing, J H Macke, and M Sahani. Spectral learning of linear dynamics from generalised-linear observations with application to neural population data. In Adv neur inf proc sys, pages 1682–1690, 2012. [7] EW Archer, U Koster, JW Pillow, and JH Macke. Low-dimensional models of neural population activity in sensory cortical circuits. In Adv neur inf proc sys, pages 343–351, 2014. [8] JH Macke, L Buesing, and M Sahani. Estimating state and parameters in state space models of spike trains. Advanced State Space Methods for Neural and Clinical Data, page 137, 2015. [9] Evan Archer, Il Memming Park, Lars Buesing, John Cunningham, and Liam Paninski. Black box variational inference for state space models. arXiv preprint arXiv:1511.07367, 2015. [10] Y Gao, EW Archer, L Paninski, and JP Cunningham. Linear dynamical neural population models through nonlinear embeddings. In Adv neur inf proc sys, pages 163–171, 2016. [11] JC Kao, P Nuyujukian, SI Ryu, MM Churchland, JP Cunningham, and KV Shenoy. Single-trial dynamics of motor cortex and their applications to brain-machine interfaces. Nature communications, 6, 2015. [12] David Pfau, Eftychios A Pnevmatikakis, and Liam Paninski. Robust learning of low-dimensional dynamics from large neural ensembles. In Adv neur inf proc sys, pages 2391–2399, 2013. [13] Hooram Nam. Poisson extension of gaussian process factor analysis for modeling spiking neural populations. Master’s thesis, Department of Neural Computation and Behaviour, Max Planck Institute for Biological Cybernetics, Tubingen, 8 2015. [14] Y. Zhao and I. M. Park. Variational latent gaussian process for recovering single-trial dynamics from population spike trains. arXiv preprint arXiv:1604.03053, 2016. [15] David Sussillo, Rafal Jozefowicz, LF Abbott, and Chethan Pandarinath. Lfads-latent factor analysis via dynamical systems. arXiv preprint arXiv:1608.06315, 2016. [16] Neil D Lawrence. Gaussian process latent variable models for visualisation of high dimensional data. In Adv neur inf proc sys, pages 329–336, 2004. [17] Carl Rasmussen and Chris Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [18] AC Damianou, MK Titsias, and ND Lawrence. Variational inference for uncertainty on the inputs of gaussian process models. arXiv preprint arXiv:1409.2287, 2014. [19] T Hafting, M Fyhn, S Molden, MB Moser, and EI Moser. Microstructure of a spatial map in the entorhinal cortex. Nature, 436(7052):801–806, 2005. [20] M Karlsson, M Carr, and Frank LM. Simultaneous extracellular recordings from hippocampal areas ca1 and ca3 (or mec and ca1) from rats performing an alternation task in two w-shapped tracks that are geometrically identically but visually distinct. crcns.org. http://dx.doi.org/10.6080/K0NK3BZJ, 2005. 10 | 2017 | 474 |
6,979 | Multi-Objective Non-parametric Sequential Prediction Guy Uziel Computer Science Department Technion - Israel Institute of Technology guziel@cs.technion.ac.il Ran El-Yaniv Computer Science Department Technion - Israel Institute of Technology rani@cs.technion.ac.il Abstract Online-learning research has mainly been focusing on minimizing one objective function. In many real-world applications, however, several objective functions have to be considered simultaneously. Recently, an algorithm for dealing with several objective functions in the i.i.d. case has been presented. In this paper, we extend the multi-objective framework to the case of stationary and ergodic processes, thus allowing dependencies among observations. We first identify an asymptomatic lower bound for any prediction strategy and then present an algorithm whose predictions achieve the optimal solution while fulfilling any continuous and convex constraining criterion. 1 Introduction In the traditional online learning setting, and in particular in sequential prediction under uncertainty, the learner is evaluated by a single loss function that is not completely known at each iteration [6]. When dealing with multiple objectives, since it is impossible to simultaneously minimize all of the objectives, one objective is chosen as the main function to minimize, leaving the others to be bound by pre-defined thresholds. Methods for dealing with one objective function can be transformed to deal with several objective functions by giving each objective a pre-defined weight. The difficulty, however, lies in assigning an appropriate weight to each objective in order to keep the objectives below a given threshold. This approach is very problematic in real world applications, where the player is required to to satisfy certain constraints. For example, in online portfolio selection [4], the player may want to maximize wealth while keeping the risk (i.e., variance) contained below a certain threshold. Another example is the Neyman-Pearson (NP) classification paradigm (see, e.g., [19]) (which extends the objective in classical binary classification) where the goal is to learn a classifier achieving low classification error whose type I error is kept below a given threshold. In the adversarial setting it is known that multiple-objective is generally impossible when the constraints are unknown a-priory [18]. In the stochastic setting, Mahdavi et al. [17] proposed a framework for dealing with multiple objectives in the i.i.d. case. They proved that if there exists a solution that minimizes the main objective function while keeping the other objectives below given thresholds, then their algorithm will converge to the optimal solution. In this work, we study online prediction with multiple objectives but now consider the challenging general case where the unknown underlying process is stationary and ergodic, thus allowing observations to depend on each other arbitrarily. The (single-objective) sequential prediction under stationary and ergodic sources, has been considered in many papers and in various application domains. For example, in online portfolio selection, [12, 9, 10] proposed non-parametric online strategies that guarantee, under mild conditions, the best possible outcome. Another interesting example in this regard is the work on time-series prediction by [2, 8, 3]. A common theme to all these results is that the asymptotically optimal strategies are constructed by combining the predictions of many simple 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. experts. The above strategies use a countably infinite set of experts, and the guarantees provided for these strategies are always asymptotic. This is no coincidence, as it is well known that finite sample guarantees for these methods cannot be achieved without additional strong assumptions on the source distribution [7, 16]. Approximate implementations of non-parametric strategies (which apply only a finite set of experts), however, turn out to work exceptionally well and, despite the inevitable approximation, are reported [11, 10, 9] to significantly outperform strategies designed to work in an adversarial, no-regret setting, in various domains. The algorithm presented in this paper utilizes as a sub-routine the Weak Aggregating Algorithm (WAA) of [21], and [13] to handle multiple objectives. While we discuss here the case of only two objective functions, our theorems can be extended easily to any fixed number of functions. 2 Problem Formulation We consider the following prediction game. Let X ≜[−D, D]d ⊂Rd be a compact observation space where D > 0. At each round, n = 1, 2, . . ., the player is required to make a prediction yn ∈Y, where Y ⊂Rm is a compact and convex set, based on past observations, Xn−1 1 ≜(x1, . . . , xn−1) and, xi ∈X (X0 1 is the empty observation). After making the prediction yn, the observation xn is revealed and the player suffers two losses, u(yn, xn) and c(yn, xn), where u and c are real-valued continuous functions and convex w.r.t. their first argument. We view the player’s prediction strategy as a sequence S ≜{Sn}∞ n=1 of forecasting functions Sn : X (n−1) →Y; that is, the player’s prediction at round n is given by Sn(Xn−1 1 ) (for brevity, we denote S(Xn−1 1 )). Throughout the paper we assume that x1, x2, . . . are realizations of random variables X1, X2, . . . such that the stochastic process (Xn)∞ −∞is jointly stationary and ergodic and P(Xi ∈X) = 1. The player’s goal is to play the game with a strategy that minimizes the average u-loss, 1 N PN i=1 u(S(Xi−1 1 ), xi), while keeping the average c-loss 1 N PN i=1 c(S(Xi−1 1 ), xi) bounded below a prescribed threshold γ. Formally, we define the following: Definition 1 (γ-bounded strategy). A prediction strategy S will be called γ-bounded if lim sup N→∞ 1 N N X i=1 c(S(Xi−1 1 ), Xi) ! ≤γ almost surely. The set of all γ-bounded strategies will be denoted Sγ. The well known result of [1] states that for the single objective case the best possible outcome is E maxy∈Y() EP∞[u(y, X0)] where P∞is the regular conditional probability distribution of X0 given F∞(the σ-algebra generated by the infinite past X−1, X−2, . . .) and the maximization is over the F∞-measurable functions. This motivates us to define the following: Definition 2 (γ-feasible process). We say that the stationary and ergodic process {Xi}∞ −∞is γfeasible w.r.t. the functions u and c, if for a threshold γ > 0, there exists some y′ ∈Y() such that E [c(y′, X0)] < γ. If γ-feasibility holds, then we will denote by y∗ ∞(y∗ ∞is not necessarily unique) the minimizer of the following minimization problem: minimize y∈Y() E [u(y, X0)] subject to E [c(y, X0)] ≤γ, (1) (1) and we define the γ-feasible optimal value as V∗= E [EP∞[u(y∗ ∞, X0)]] . Note that problem (1) is a convex minimization problem over Y(). Therefore, the problem is equivalent to finding the saddle point of the Lagrangian function [15], namely, min y∈Y() max λ∈R+ L(y, λ), where the Lagrangian is L(y, λ) ≜(E [u(y, X0)] + λ (E [c(y, X0)] −γ)) . 2 We denote the optimal dual by λ∗ ∞and assume that L can be maximize by a unique F∞-measurable function, λ∗ ∞(). Moreover, we set a constant λmax such that λmax > λ∗ ∞() P∞-a.s., and set Λ ≜[0, λmax]. We also define the instantaneous Lagrangian function as l(y, λ, x) ≜u(y, x) + λ (c(y, x) −γ) . (2) In Brief, we are seeking a strategy S ∈Sγ that is as good as any other γ-bounded strategy, in terms of the average u-loss, when the underlying process is γ-feasible. Such a strategy will be called γ-universal. 3 Optimality of V∗ In this section, we show that the average u-loss of any γ-bounded prediction strategy cannot be smaller than V∗, the γ-feasible optimal value. This result is a generalization of the well-known result of [1] regarding the best possible outcome under a single objective. Before stating and proving this optimality result, we state three lemmas that will be used repeatedly in this paper. The first lemma is known as Breiman’s generalized ergodic theorem. The second and the third lemmas concern the continuity of the saddle point w.r.t. the probability distribution, their proofs appear in the supplementary material. Lemma 1 (Ergodicity, [5]). Let X = {Xi}∞ −∞be a stationary and ergodic process. For each positive integer i, let Ti denote the operator that shifts any sequence by i places to the left. Let f1, f2, . . . be a sequence of real-valued functions such that limn→∞fn(X) = f(X) almost surely, for some function f. Assume that E supn |fn(X)| < ∞. Then, lim n→∞ 1 n n X i=1 fi(T iX) = Ef(X) almost surely. Lemma 2 (Continuity and Minimax). Let Y, Λ, X be compact real spaces. l : Y × Λ × X →R be a continuous function. Denote by P(X) the space of all probability measures on X (equipped with the topology of weak-convergence). Then the following function L∗: P(X) →R is continuous L∗(Q) = inf y∈Y sup λ∈Λ EQ [l(y, λ, x)] . (3) Moreover, for any Q ∈P(X), inf y∈Y sup λ∈Λ EQ [l(y, λ, x)] = sup λ∈Λ inf y∈Y EQ [l(y, λ, x)] . Lemma 3 (Continuity of the optimal selection). Let Y, Λ, X be compact real spaces. Then, there exist two measurable selection functions hX,hλ such that hy(Q) ∈arg min y∈Y max λ∈Λ EQ [l(y, λ, x)] , hλ(Q) ∈arg max λ∈Λ min y∈Y EQ [l(y, λ, x)] for any Q ∈P(X). Moreover, let L∗be as defined in Equation (3). Then, the set Gr(L∗) ≜{(u∗, v∗, Q) | u∗∈hy(Q), v∗∈hλ(Q), Q ∈P(X)}, is closed in Y × Λ × P(X). The importance of Lemma 3 stems from the fact that it proves the continuity properties of the multi-valued correspondences Q →hy(Q) and Q →hλ(Q). This leads to the knowledge that if for the limiting distribution, Q∞, the optimal set is a singleton, then Q →hy(Q) and Q →hλ(Q) are continuous in Q∞. We are now ready to prove the optimality of V∗. Theorem 1 (Optimality of V∗). Let {Xi}∞ −∞be a γ-feasible process. Then, for any strategy S ∈Sγ, the following holds a.s. lim inf N→∞ 1 N N X i=1 u(S(Xi−1 1 ), Xi) ≥V∗. 3 Proof. For any given strategy S ∈Sγ, we will look at the following sequence: 1 N N X i=1 l(S(Xi−1 1 ), ˜λ∗ i , Xi). (4) where ˜λ∗ i ∈hλ(PXi|Xi−1 1 ) Observe that (4) = 1 N N X i=1 l(S(Xi−1 1 ), ˜λ∗ i , Xi) −E h l(S(Xi−1 1 ), ˜λ∗ i , Xi) | Xi−1 1 i + 1 N N X i=1 E h l(S(Xi−1 1 ), ˜λ∗ i , Xi) | Xi−1 1 i . Since Ai = l(S(Xi−1 1 ), ˜λ∗ i , Xi) −E h l(S(Xi−1 1 ), ˜λ∗ i , Xi) | Xi−1 1 i is a martingale difference sequence, the last summand converges to 0 a.s., by the strong law of large numbers (see, e.g., [20]). Therefore, lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), ˜λ∗ i , Xi) = lim inf N→∞ 1 N N X i=1 E h l(S(Xi−1 1 ), ˜λ∗ i , Xi) | Xi−1 1 i ≥lim inf N→∞ 1 N N X i=1 min y∈Y() E h l(y, ˜λ∗ i , Xi) | Xi−1 1 i , (5) where the minimum is taken w.r.t. all the σ(Xi−1 1 )-measurable functions. Because the process is stationary, we get for ˆλ∗ i ∈hλ(PX0|X−1 1−i), (5) = lim inf N→∞ 1 N N X i=1 min y∈Y() E h l(y, ˆλ∗ i , X0) | X−1 1−i i = lim inf N→∞ 1 N N X i=1 L∗(PX0|X−1 1−i). (6) Using Levy’s zero-one law, PX0|X−1 1−i →P∞weakly as i approaches ∞and from Lemma 2 we know that L∗is continuous. Therefore, we can apply Lemma 1 and get that a.s. (6) = E [L∗(P∞)] = E [EP∞[l (y∗ ∞, λ∗ ∞, X0)]] = E [L (y∗ ∞, λ∗ ∞, X0)] . (7) Note also, that due to the complementary slackness condition of the optimal solution, i.e., E [λ∗ ∞(EP∞[c(y∗ ∞, X0)] −γ)] = 0, we get (7) = E [EP∞[u (y∗ ∞, X0)]] = V∗. From the uniqueness of λ∗ ∞, and using Lemma 3 ˆλ∗ i →λ∗ ∞as i approaches ∞. Moreover, since l is continuous on a compact set, l is also uniformly continuous. Therefore, for any given ϵ > 0, there exists δ > 0, such that if |λ′ −λ| < δ, then |l(y, λ′, x) −l(y, λ, x)| < ϵ for any y ∈Y and x ∈X. Therefore, there exists i0 such that if i > i0 then |l(y, ˆλ∗ i , x) − l(y, λ∗ ∞, x)| < ϵ for any y ∈Y and x ∈X. Thus, lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), λ∗ ∞, Xi) −lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), ˆλ∗ i , Xi) = lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), λ∗ ∞, Xi) + lim sup N→∞ 1 N N X i=1 −l(S(Xi−1 1 ), ˆλ∗ i , Xi) ≥lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), ˆλ∗ i , Xi) −1 N N X i=1 l(S(Xi−1 1 ), λ∗ ∞, Xi) ≥−ϵ a.s., 4 Algorithm 1 Minimax Histogram Based Aggregation (MHA) Input: Countable set of experts {Hk,h}, y0 ∈Y, λ0 ∈Λ, initial probability {αk,h}, For n = 0 to ∞ Play yn, λn. Nature reveals xn Suffer loss l(yn, λn, xn). Update the cumulative loss of the experts lk,h y,n ≜ n X i=0 l(yi k,h, λi, xi) lk,h λ,n ≜ n X i=0 l(yi, λi k,h, xi) Update experts’ weights wy,(k,h) n ≜αk,h exp −1 √nlk,h y,n py,(k,h) n+1 ≜ wy,(k,h) n+1 P∞ h=1 P∞ k=1 wy,(k,h) n+1 Update experts’ weights wλ,(k,h) n+1 wλ,(k,h) n+1 ≜αk,h exp 1 √nlk,h λ,n pλ,(k,h) n+1 = wλ,(k,h) n+1 P∞ h=1 P∞ k=1 wλ,(k,h) n+1 Choose yn+1 and λn+1 as follows yn+1 = X k,h py,(k,h) n+1 yn+1 k,h λn+1 = X k,h pλ,(k,h) n+1 λn+1 k,h End For and since ϵ is arbitrary, lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), λ∗ ∞, Xi) ≥lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), ˆλ∗ i , Xi). Therefore we can conclude that lim inf N→∞ 1 N N X i=1 l(S(Xi−1 1 ), λ∗ ∞, Xi) ≥V∗a.s. We finish the proof by noticing that since S ∈Sγ, then by definition lim sup N→∞ 1 N N X i=1 c(S(Xi−1 1 ), Xi) ≤γ a.s. and since λ∗ ∞is non negative, we will get the desired result. The above lemma also provides the motivation to find the saddle point of the Lagrangian L. Therefore, for the reminder of the paper we will use the loss function l as defined in Equation 2. 4 Minimax Histogram Based Aggregation We are now ready to present our algorithm Minimax Histogram based Aggregation (MHA) and prove that its predictions are as good as the best strategy. By Theorem 1 we can restate our goal: find a prediction strategy S ∈Sγ such that for any γ-feasible process {Xi}∞ −∞the following holds: lim N→∞ 1 N N X i=1 u(S(Xi−1 1 ), Xi) = V∗a.s. 5 Such a strategy will be called γ-universal. We do so by maintaining a countable set of experts {Hk,h} k, h = 1, 2, . . ., which are constructed in a similar manner to the experts used in [10]. Each expert is defined using a histogram which gets finer as h grows, allowing us to construct an empirical measure on X. An expert Hk,h therefore outputs a pair (yi k,h, λi k,h) ∈Y × Λ at round i. This pair is the minimax w.r.t. its empirical measure. We show that those emprical measures converge weakly to P∞, thus, the experts’ prediction will converge to V∗. Our algorithm outputs at round i a pair (yi, λi) ∈Y × Λ where the sequence of predictions y1, y2, . . . tries to minimize the average loss 1 N PN i=1 l(y, λi, xi) and the sequence of predictions λ1, λ2, . . . tries to maximize the average loss 1 N PN i=1 l(yi, λ, xi). Each of yi and λi is the aggregation of predictions yi k,h and λi k,h, k, h = 1, 2, . . . , respectively. In order to ensure that the performance of MHA will be as good as any other expert for both the y and the λ predictions, we apply the Weak Aggregating Algorithm of [21], and [13] twice alternately. Theorem 2 states that the selection of points made by the experts above converges to the optimal solution, the proof of Theorem 2 and the explicit construction of the experts appears in the supplementary material. Then, in Theorem 3 we prove that MHA applied on the experts defined in Theorem 2 generates a sequence of predictions that is γ-bounded and as good as any other strategy w.r.t. any γ-feasible process. Theorem 2. Assume that {Xi}∞ −∞is a γ-feasible process. Then, it is possible to construct a countable set of experts {Hk,h} for which lim k→∞lim h→∞lim n→∞ 1 N N X i=1 l(yi k,h, λi k,h, Xi) = V∗a.s., where (yi k,h, λi k,h) are the predictions made by expert Hk,h at round i. Before stating the main theorem regarding MHA, we state the following lemma (the proof appears in the supplementary material), which is used in the proof of the main result regarding MHA. Lemma 4. Let {Hk,h} be a countable set of experts as defined in the proof of Theorem 2. Then, the following relation holds a.s.: inf k,h lim sup n→∞ 1 N N X i=1 l yi k,h, λi, Xi ≤V∗≤sup k,h lim inf n→∞ 1 N N X i=1 l yi, λi k,h, Xi , where (yi, λi) are the predictions of MHA when applied on {Hk,h}. We are now ready to state and prove the optimality of MHA. Theorem 3 (Optimality of MHA). Let (yi, λi) be the predictions generated by MHA when applied on {Hk,h} as defined in the proof of Theorem 2. Then, for any γ-feasible process {Xi}∞ −∞: MHA is a γ-bounded and γ-universal strategy. Proof. We first show that lim N→∞ 1 N N X i=1 l(yi, λi, Xi) = V∗a.s. (8) Applying Lemma 5 in [13], we know that the x updates guarantee that for every expert Hk,h, 1 N N X i=1 l(yi, λi, xi) ≤1 N N X i=1 l(yi k,h, λi, xi) + Ck,h √ N (9) 1 N N X i=1 l(yi, λi, xi) ≥1 N N X i=1 l(yi, λi k,h, xi) − C′ k,h √ N , (10) where Ck,h, C′ k,h > 0 are some constants independent of N. In particular, using Equation (9), 1 N N X i=1 l(yi, λi, xi) ≤inf k,h 1 N N X i=1 l(yi k,h, λi, xi) + Ck,h √ N ! . 6 Therefore, we get lim sup N→∞ 1 N N X i=1 l(yi, λi, xi) ≤lim sup N→∞ inf k,h 1 N N X i=1 l(yi k,h, λi, xi) + Ck,h √ N ! ≤inf k,h lim sup N→∞ 1 N N X i=1 l(yi k,h, λi, xi) + Ck,h √ N ! ≤inf k,h lim sup N→∞ 1 N N X i=1 l(yi k,h, λi, xi) ! , (11) where in the last inequality we used the fact that lim sup is sub-additive. Using Lemma (4), we get that (11) ≤V∗≤sup k,h lim inf n→∞ 1 N N X i=1 l yi, λi k,h, Xi . (12) Using similar arguments and using Equation (10) we can show that (12) ≤lim inf N→∞ 1 N N X i=1 l(yi, λi, xi). Summarizing, we have lim sup N→∞ 1 N N X i=1 l(yi, λi, xi) ≤V∗≤lim inf N→∞ 1 N N X i=1 l(yi, λi, xi). Therefore, we can conclude that a.s. limN→∞1 N PN i=1 l(yi, λi, Xi) = V∗. To show that MHA is indeed a γ-bounded strategy, we use two special experts H0,0, H−1,−1 whose predictions are λn 0,0 = λmax and λn −1,−1 = 0 for every n and to shorten the notation, we denote g(y, λ, x) ≜λ(c(y, x) −γ). First, from Equation (10) applied on the expert H0,0, we get that: lim sup N→∞ 1 N N X i=1 g(yi, λmax, x) ≤lim sup N→∞ 1 N N X i=1 g(yi, λi, x). (13) Moreover, since l is uniformly continuous, for any given ϵ > 0, there exists δ > 0, such that if |λ′ −λ| < δ, then |l(y, λ′, x) −l(y, λ, x)| < ϵ for any y ∈Y and x ∈X. We also know from the proof of Theorem 2 that limk→∞limh→∞limi→∞λi k,h = λ∗ ∞. Therefore, there exist k0, h0, i0 such that |λi k0,h0 −λ∗ ∞| < δ for any i > i0. Therefore, lim sup N→∞ 1 N N X i=1 l(yi, λ∗ ∞, xi) −1 N N X i=1 l(yi, λi, xi) ! ≤ lim sup N→∞ 1 N N X i=1 l(yi, λ∗ ∞, xi) −1 N N X i=1 l(yi, λi k0,h0, xi) ! + lim sup N→∞ 1 N N X i=1 l(yi, λi k0,h0, xi) −1 N N X i=1 l(yi, λi, xi) ! (14) From the uniform continuity we also learn that the first summand is bounded above by ϵ, and from Equation (10), we get that the last summand is bounded above by 0. Thus, (14) ≤ϵ, and since ϵ is arbitrary, we get that lim sup N→∞ 1 N N X i=1 l(yi, λ∗ ∞, xi) −1 N N X i=1 l(yi, λi, xi) ! ≤0. 7 Thus, lim supN→∞ 1 N PN i=1 l(yi, λ∗ ∞, Xi) ≤V∗, and from Theorem 1 we can conclude that limN→∞1 N PN i=1 l(yi, λ∗ ∞, Xi) = V∗. Therefore, we can deduce that lim sup N→∞ 1 N N X i=1 g(yi, λi, xi) −lim sup N→∞ 1 N N X i=1 g(yi, λ∗ ∞, xi) = lim sup N→∞ 1 N N X i=1 g(yi, λi, xi) + lim inf N→∞ 1 N N X i=1 −g(yi, λ∗ ∞, xi) ≤lim sup N→∞ 1 N N X i=1 g(yi, λi, xi) −1 N N X i=1 g(yi, λ∗ ∞, xi) = lim sup N→∞ 1 N N X i=1 l(yi, λi, xi) −1 N N X i=1 l(yi, λ∗ ∞, xi) = 0, which results in lim sup N→∞ 1 N N X i=1 g(yi, λi, xi) ≤lim sup N→∞ 1 N N X i=1 g(yi, λ∗ ∞, xi). Combining the above with Equation (13), we get that lim sup N→∞ 1 N N X i=1 g(yi, λmax, xi) ≤lim sup N→∞ 1 N N X i=1 g(yi, λ∗ ∞, xi). Since 0 ≤λ∗ ∞< λmax, we get that MHA is γ-bounded. This also implies that lim sup N→∞ 1 N N X i=1 λi(c(yi, xi) −γ) ≤0. Now, if we apply Equation (10) on the expert H−1,−1, we get that lim inf N→∞ 1 N N X i=1 λi(c(yi, xi) −γ) ≥0. Thus, lim N→∞ 1 N N X i=1 λi(c(yi, xi) −γ) = 0, and using Equation (8), we get that MHA is also γ-universal. 5 Concluding Remarks In this paper, we introduced the Minimax Histogram Aggregation (MHA) algorithm for multipleobjective sequential prediction. We considered the general setting where the unknown underlying process is stationary and ergodic., and given that the underlying process is γ-feasible, we extended the well-known result of [1] regarding the asymptotic lower bound of prediction with a single objective, to the case of multi-objectives. We proved that MHA is a γ-bounded strategy whose predictions also converge to the optimal solution in hindsight. In the proofs of the theorems and lemmas above, we used the fact that the initial weights of the experts, αk,h, are strictly positive thus implying a countably infinite expert set. In practice, however, one cannot maintain an infinite set of experts. Therefore, it is customary to apply such algorithms with a finite number of experts (see [12, 9, 10]). Despite the fact that in the proof we assumed that the observation set X is known a priori, the algorithm can also be applied in the case that X is unknown by applying the doubling trick. For a further discussion on this point, see [8]. In our proofs, we relied on the compactness of the set X. It will be interesting to see whether the universality of MHA can be sustained under unbounded processes as well. A very interesting open question would be to identify conditions allowing for finite sample bounds when predicting with multiple objectives. 8 Acknowledgments We would like to thank the anonymous reviewers for providing helpful comments. This research was supported by The Israel Science Foundation (grant No. 1890/14) References [1] P.H. Algoet. The strong law of large numbers for sequential decisions under uncertainty. IEEE Transactions on Information Theory, 40(3):609–633, 1994. [2] G. Biau, K. Bleakley, L. Györfi, and G. Ottucsák. Nonparametric sequential prediction of time series. Journal of Nonparametric Statistics, 22(3):297–317, 2010. [3] G. Biau and B. Patra. Sequential quantile prediction of time series. IEEE Transactions on Information Theory, 57(3):1664–1674, 2011. [4] A. Borodin and R. El-Yaniv. Online Computation and Competitive Analysis. Cambridge University Press, 2005. [5] L. Breiman. The individual ergodic theorem of information theory. The Annals of Mathematical Statistics, 28(3):809–811, 1957. [6] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [7] L. Devroye, L. Györfi, and G. Lugosi. A probabilistic theory of pattern recognition, volume 31. Springer Science & Business Media, 2013. [8] L. Györfiand G. Lugosi. Strategies for sequential prediction of stationary time series. In Modeling uncertainty, pages 225–248. Springer, 2005. [9] L. Györfi, G. Lugosi, and F. Udina. Nonparametric kernel-based sequential investment strategies. Mathematical Finance, 16(2):337–357, 2006. [10] L. Györfiand D. Schäfer. Nonparametric prediction. Advances in Learning Theory: Methods, Models and Applications, 339:354, 2003. [11] L. Györfi, F. Udina, and H. Walk. Nonparametric nearest neighbor based empirical portfolio selection strategies. Statistics & Decisions, International Mathematical Journal for Stochastic Methods and Models, 26(2):145–157, 2008. [12] L. Györfi, A. Urbán, and I. Vajda. Kernel-based semi-log-optimal empirical portfolio selection strategies. International Journal of Theoretical and Applied Finance, 10(03):505–516, 2007. [13] Y. Kalnishkan and M. Vyugin. The weak aggregating algorithm and weak mixability. In International Conference on Computational Learning Theory, pages 188–203. Springer, 2005. [14] D. Luenberger. Optimization by vector space methods. John Wiley & Sons, 1997. [15] U.V. Luxburg and B. Schölkopf. Statistical learning theory: Models, concepts, and results. arXiv preprint arXiv:0810.4752, 2008. [16] M. Mahdavi, T. Yang, and R. Jin. Stochastic convex optimization with multiple objectives. In Advances in Neural Information Processing Systems, pages 1115–1123, 2013. [17] S. Mannor, J. Tsitsiklis, and J.Y. Yu. Online learning with sample path constraints. Journal of Machine Learning Research, 10(Mar):569–590, 2009. [18] P. Rigollet and X. Tong. Neyman-pearson classification, convexity and stochastic constraints. Journal of Machine Learning Research, 12(Oct):2831–2855, 2011. [19] W. Stout. Almost sure convergence, vol. 24 of probability and mathematical statistics, 1974. [20] V. Vovk. Competing with stationary prediction strategies. In International Conference on Computational Learning Theory, pages 439–453. Springer, 2007. 9 | 2017 | 475 |
6,980 | Optimal Sample Complexity of M-wise Data for Top-K Ranking Minje Jang∗ School of Electrical Engineering KAIST jmj427@kaist.ac.kr Sunghyun Kim∗ Electronics and Telecommunications Research Institute Daejeon, Korea koishkim@etri.re.kr Changho Suh School of Electrical Engineering KAIST chsuh@kaist.ac.kr Sewoong Oh Industrial and Enterprise Systems Engineering Department UIUC swoh@illinois.edu Abstract We explore the top-K rank aggregation problem in which one aims to recover a consistent ordering that focuses on top-K ranked items based on partially revealed preference information. We examine an M-wise comparison model that builds on the Plackett-Luce (PL) model where for each sample, M items are ranked according to their perceived utilities modeled as noisy observations of their underlying true utilities. As our result, we characterize the minimax optimality on the sample size for top-K ranking. The optimal sample size turns out to be inversely proportional to M. We devise an algorithm that effectively converts M-wise samples into pairwise ones and employs a spectral method using the refined data. In demonstrating its optimality, we develop a novel technique for deriving tight ℓ∞estimation error bounds, which is key to accurately analyzing the performance of top-K ranking algorithms, but has been challenging. Recent work relied on an additional maximum-likelihood estimation (MLE) stage merged with a spectral method to attain good estimates in ℓ∞error to achieve the limit for the pairwise model. In contrast, although it is valid in slightly restricted regimes, our result demonstrates a spectral method alone to be sufficient for the general M-wise model. We run numerical experiments using synthetic data and confirm that the optimal sample size decreases at the rate of 1/M. Moreover, running our algorithm on real-world data, we find that its applicability extends to settings that may not fit the PL model. 1 Introduction Rank aggregation has been explored in a variety of contexts such as social choice [15, 6], web search and information retrieval [20], recommendation systems [7], and crowd sourcing [16], to name a few. It aims to bring a consistent ordering to a collection of items, given partial preference information. ∗Equal contribution. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Preference information can take various forms depending on the context. One such form, which we examine in this paper, is ordinal; preferences for alternatives are represented as an ordering. Consider crowd-sourced data collected by annotators asked to rank a few given alternatives based on their preference. The aggregated data can be used to identify the most preferred. One example can be a review process for conference papers (e.g., NIPS) where reviewers are asked to not only review papers, but also order them based on how much they enjoy them. The collected data could be used to highlight papers that may interest a large audience. Alternatively, consider sports (races or the like) and online games where a number of players compete. One may wish to rank them according to skill. Its broad range of applications has led to a volume of work done. Of numerous schemes developed, arguably most dominant paradigms are spectral algorithms [14, 20, 37, 41, 47, 45] and maximum likelihood estimation (MLE) [22, 28]. Postulating the existence of underlying real-valued preferences of items, they aim to produce preference estimates consistent in a global sense, e.g., measured by low squared loss. But such estimates do not necessarily guarantee optimal ranking accuracy. Accurate ranking has more to do with how well the ordering of estimates matches that of the true preferences, and less to do with how close the estimates are to the true preferences minimizing overall errors. Moreover, in practice, what we expect from accurate ranking is an ordering that precisely separates only a few items ranked highest from the rest, not an ordering that respects the entire items. Main contributions. In light of it, we explore top-K ranking which aims to recover the correct set of top-ranked items only. We examine the Plackett-Luce (PL) model which has been extensively explored [24, 18, 5, 25, 38, 43, 33, 4]. It is a special case of random utility models [46] where true utilities of items are presumed and a user’s revealed preference is a partial ordering according to noisy manifestations of the utilities. It satisfies the ‘independence of irrelevant alternatives’ property in social choice theory [34, 35] and is the most popular model in studying human choice behavior given multiple alternatives (see Section 2). It is well-known that it subsumes as a special case the Bradley-Terry-Luce (BTL) model [12, 32] which concerns two items. We consider an M-wise comparison model where comparisons are given as a preference ordering of M items. In this setting, we characterize the minimax limit on the sample size (i.e., sample complexity) needed to reliably identify the set of top-K ranked items, which turns out to be inversely proportional to M. To the best of our knowledge, it is the first result that characterizes the limit under an M-wise comparison model. In achieving the limit, we propose an algorithm that consists of sample breaking and Rank Centrality [37], one spectral method we choose among other variants [10, 9, 37, 33]. First, it converts M-wise samples into many more pairwise ones, and in doing so, it carefully chooses only M out of all M 2 pairwise samples obtainable from each M-wise sample. This sample breaking (see Section 3.1) extracts only the essential information needed to achieve the limit from given M-wise data. Next, using the refined pairwise data, the algorithm runs a spectral method to identify top-ranked items. A novel technique we develop to attain tight ℓ∞estimation error bounds has been instrumental to our progress. Analyzing ℓ∞error bounds is a critical step to characterizing the minimax sample complexity for top-K ranking as presented in [17], but has been technically challenging. Even after decades of research since the introduction of spectral methods and MLE, two dominant approaches in the field, we lack notable results for tight ℓ∞error bounds. This is largely because techniques proven useful to obtain good ℓ2 error bounds do not translate into attaining good ℓ∞error bounds. In this regard, our result contributes to progress on ℓ∞error analysis (see Section 3.2 and the supplementary). We can compare our result to that of [17] by considering M = 2. Although the two optimal sample complexities match, the conditions under which they do differ; our result turns out to be valid under a slightly restricted condition (see Section 3.3). In terms of achievability, the algorithm in [17] merges an additional MLE stage with a spectral method, whereas we employ only a spectral method. From numerical experiments, we speculate that the condition under which the result of [17] holds may not be sufficient for spectral methods alone to achieve optimality (see Section 4.1). We conduct numerical experiments to support our result. Using synthetic data, we show that the minimax optimal sample size indeed decreases at the rate of 1/M. We run our algorithm on real-world data collected from a popular online game (League of Legends) and find its applicability to extend to settings that may not necessarily match the PL model. From the collected data, we extract M-wise comparisons and rank top users in terms of skill. We examine its robustness aspect against partial data and also evaluate its rank result with respect to the official rank League of Legends provides. In both cases, we compare it with a counting-based algorithm [42, 11] and demonstrate its advantages. 2 Related work. To the best of our knowledge, [17] investigated top-K identification under the random comparison model of interest for the first time. A key distinction here is that we examine the random listwise comparison model based on the PL model. Rank Centrality was developed in [37] based on which we devise our ranking scheme tailored for listwise comparison data. In the PL model, some viewed ranking as parameter estimation. Maystre and Grossglauser [33] developed an algorithm that shares a spirit of spectral ranking and showed its performance is the same as MLE for estimating underlying preference scores. Hajek et al. [25] derived minimax lower bounds of parameter estimation error, and examined gaps with upper bounds of MLE as well as MLE with a rank-breaking scheme that decomposes partial rankings into pairwise comparisons. Some works examined several sample breaking methods that convert listwise data into pairwise data in the PL model. Azari Soufiani et al. [5] considered various methods to see if they sustain some statistical property in parameter estimation. It examined full breaking that converts an M-wise sample into M 2 pairwise ones, and adjacent breaking that converts an ordinal M-wise sample into M −1 pairwise ones whose associated items are adjacent in the sample. Ashish and Oh [4] considered a method that converts an M-wise sample into multiple pairwise ones and assigns different importance weights to each, and examined the method on several types of comparison graphs. There are a number of works that explored ranking problems in different models and with different interests. Some works [43, 2] have adopted PAC (probably approximately correct) [44] or regret [21, 8, 23] as their metric to allow some margin of error, in contrast to our work where 0/1 loss (the most stringent criterion) is considered to investigate the worst-case scenario (see Section 2). Rajkumar and Agarwal [40] put forth statistical assumptions that ensure the convergence of rank aggregation methods including Rank Centrality and MLE to an optimal ranking. Active ranking where samples are obtained adaptively has received attention as well. Jamieson and Nowak [29] considered perfect total ranking and characterized the query complexity gain of adaptive sampling in the noise-free case, and the works of [29, 1] explored the query complexity in the presence of noise aiming at approximate total rankings. Recently, Braverman et al. [13] considered three noisy models, examining if their algorithm can achieve reliable top-K ranking. Heckel et al. [27] considered a model where noisy pairwise observations are given, with a goal to partition the items into sets of pre-specified sizes based on their scores, which includes top-K ranking as a special case. Mohajer et al. [36] considered a fairly general noisy model which subsumes as special cases various models. They derived upper bounds on the sample size required for reliable top-K sorting as well as top-K partitioning, and showed that active ranking can provide significant gains over passive ranking. 2 Problem Formulation Notation. We denote by [n] to represent {1, 2, . . . , n}, and by G = ([n], E(M)) to represent an M-wise comparison graph in which total n vertices reside and each hyper-edge is connected if there is a comparison among M vertices, and di to represent the out-degree of vertex i. Comparison model and assumptions. Suppose we perform a few evaluations on n items. We assume the comparison outcomes are generated based on the PL model [39]. We consider M-wise models where the comparison outcomes are obtained in the form of a preference ordering of M items. Preference scores. The PL model assumes the existence of underlying preferences w := {w1, w2, . . . , wn}, where wi represents the preference score of item i. The outcome of each comparison depends solely on the latent scores of the items being compared. Without loss of generality, we assume that w1 ≥w2 ≥· · · ≥wn > 0. We assume the range of scores to be fixed irrespective of n. For some positive constants wmin and wmax, wi ∈[wmin, wmax], 1 ≤i ≤n. We note that the case where the range wmax/wmin grows with n can be translated into the above fixed-range regime by separating out those items with vanishing scores (e.g. via a voting method like Borda count [11, 3]). Comparison model. We denote by G = ([n], E(M)) a comparison graph where a set of M items I = {i1, i2, . . . , iM} are compared if and only if I belongs to the hyper-edge set E(M). We examine random graphs, constructed in a similar manner according to the Erd˝os-Rényi random graph model; each set of M vertices is connected by a hyper-edge independently with probability p. Notice that when M = 2, such random graphs we consider follow precisely the Erd˝os-Rényi random model. 3 M-wise comparisons. We observe L samples for each I = {i1, i2, . . . , iM} ∈E(M). Each sample is an ordering of M items in order of preference. The outcome of the ℓth sample, denoted by s(ℓ) I , is generated according to the PL model: s(ℓ) I = (i1, i2, . . . , iM) with probability QM m=1 wim/PM r=m wir , where item ia is preferred over item ib in I if ia appears to the left of ib, which we also denote by ia ≻ib. We assume that conditional on G, s(ℓ) I ’s are jointly independent over I and ℓ. We denote the collection of all samples by s := {sI : I ∈E(M)}, where sI = {s(1) I , s(2) I , . . . , s(L) I }. Performance metric and goal. Given comparison data, one wishes to know whether or not the top-K ranked items are identifiable. We consider the probability of error Pe in identifying the correct set of the top-K ranked items: Pe(ψ) := P {ψ(s) ̸= [K]}, where ψ is any ranking scheme that returns a set of K indices and [K] is the set of the first K indices. Our goal in this work is to characterize the admissible region Rw of (p, L) in which top-K ranking is feasible for a given PL parameter w, in other words, Pe can be vanishingly small as n grows. The admissible region Rw is defined as Rw := {(p, L) : limn→∞Pe(ψ(s)) = 0}. In particular, we are interested in the minimax sample complexity of an estimator defined as Sδ := inf p∈[0,1],L∈Z+ sup v∈Ωδ n M pL : (p, L) ∈Rv , where Ωδ = {v ∈Rn : (vK −vK+1)/vmax ≥δ}. Note that this definition shows that we conservatively examine minimax scenarios where nature behaves adversely with the worst-case w. 3 Main Results Separating the two items near the decision boundary (i.e., the Kth and (K + 1)th ranked items) is key in top-K ranking. Unless the gap is large enough, noise in the observations leads to erroneous estimates which no ranking scheme can overcome. We pinpoint a separation measure as ∆K := (wK −wK+1)/wmax, which turns out to be crucial in establishing the fundamental limit. Noted in [22], if a comparison graph G is not connected, it is impossible to determine the relative preferences between two disconnected entities. Thus, we assume all comparison graphs to be connected. To guarantee it, for a hyper-random graph with edge size M, we assume p > log n/ n−1 M−1 2. Now, let us formally state our main results. First, for comparison graphs under M-wise observations, we establish a necessary condition for top-K ranking. Theorem 1. Fix ϵ ∈(0, 1 2). Given an M-wise comparison graph G = ([n], E(M)), if n M pL ≤c0(1 −ϵ)n log n ∆2 K 1 M , (1) for some numerical constant c0, then for any ranking scheme ψ, there exists a preference score vector w with separation measure ∆K such that Pe(ψ) ≥ϵ. The proof is a generalization of Theorem 2 in [17], and we provide it in the supplementary. Next, for comparison graphs under M-wise observations, we establish a sufficient condition for top-K ranking. Theorem 2. Given an M-wise comparison graph G = ([n], E(M)) and p ≥c1(M −1) r log n ( n−1 M−1), if n M pL ≥c2 n log n ∆2 K 1 M , (2) for some numerical constants c1 and c2, then Rank Centrality correctly identifies the top-K ranked items with probability at least 1 −2n−1 15 . We provide the proof of Theorem 2 in the supplementary. From below, we describe the algorithm we use, sample breaking and Rank Centrality [37], and soon give an outline of the proof. Note that Theorem 1 gives a necessary condition of the sample complexity S∆K ≳n log n/M∆2 K and Theorem 2 gives a sufficient condition of it S∆K ≲n log n/M∆2 K, and they match. That is, we establish the minimax optimality of Rank Centrality: n log n/M∆2 K. 2p > log n/ n M−1 is derived in [19] as a sharp threshold for connectivity of hyper-graphs. We assume a slightly more strict condition for ease of analysis. This does not make a big difference in our result, as the two conditions are almost identical order-wise given M < n/2, a reasonable condition for regimes where n is large. 4 3.1 Algorithm description Algorithm 1 Rank Centrality [37] Input the collection of statistics s = sI : I ∈E(M) . Convert the M-wise sample for each hyper-edge I into M pairwise samples: 1. Choose a circular permutation of the items in I uniformly at random, 2. Break it into the M pairs of adjacent items, and denote the set of pairs by φ(I), 3. Use the (pairwise) data of the pairs in φ(I). Compute the transition matrix ˆP = [ ˆPij]1≤i,j≤n: ˆPij = 1 2dmax yij if i ̸= j; 1 −P k:k̸=j ˆPkj if i = j; 0 otherwise., where dmax is the maximum out-degree of vertices in E(M). Output the stationary distribution of matrix ˆP . Rank Centrality aims to estimate rankings from pairwise comparison data. Thus, to make use of M-wise comparison data for Rank Centrality, we apply a sample breaking method that converts M-wise data into pairwise data. To be more specific, if there is a hyper-edge I = {1, 2, . . . , M}, we choose a circular permutation of the items in I uniformly at random. Suppose we pick a circular permutation (1, 2, . . . , M −1, M, 1). Then, we break it into M pairs of items in the order specified by the permutation: {1, 2}, {2, 3}, . . . , {M −1, M}, {M, 1} (see Section 3.3 for a remark on why we do not lose optimality by our sample breaking method). Let us denote by φ(I) this set of pairs. We use the converted pairwise comparison data associated with the pairs in φ(I)3: y(ℓ) ij,I = 1 if {i, j} ∈φ(I) and i ≻j; 0 otherwise , yij := X I:{i,j}∈φ(I) 1 L L X ℓ=1 y(ℓ) ij,I. (3) In an ideal scenario where we obtain an infinite number of samples per M-wise comparison, i.e., L →∞, sufficient statistics 1 L PL ℓ=1 y(ℓ) ij,I converge to wi/(wi + wj). Then, the constructed matrix ˆP defined in Algorithm 1 becomes a matrix P whose entries [Pij]1≤i,j≤n are defined as Pij = 1 2dmax P I:{i,j}∈φ(I) wi wi+wj for I ∈E(M); 1 −P k:k̸=j Pkj if i = j; 0 otherwise. (4) The entries for observed item pairs represent the relative likelihood of item i being preferred over item j. Intuitively, random walks of P in the long run visit some states more often, if they have been preferred over other frequently-visited states and/or preferred over many other states. The random walks are reversible as wiPji = wjPij holds, and irreducible under the connectivity assumption. Once we obtain the unique stationary distribution, it is equal to w = {w1, . . . , wn} up to some constant scaling. It is clear that random walks of ˆP , a noisy version of P , will give us an approximation of w. 3.2 Proof outline We outline the proof of Theorem 2 by introducing Theorem 3, which we show leads to Theorem 2. Theorem 3. When Rank Centrality is employed, with high probability, the ℓ∞norm estimation error is upper-bounded by ∥ˆw −w∥∞ ∥w∥∞ ≲ s n log n n M pL r 1 M , (5) where p ≥c1(M −1) r log n ( n−1 M−1), and c1 is some numerical constant. 3In comparison, the adjacent breaking method [5] directly follows the ordering evaluated in each sample; if it is 1 ≺2 ≺· · · ≺M −1 ≺M, it is broken into pairs of adjacent items: 1 ≺2 up to M −1 ≺M. Our method turns out to be consistent, i.e., Pr[yij=1] Pr[yji=0] = wi wj (see (4)), whereas the adjacent breaking method is not [5]. 5 Let ∥w∥∞ = wmax = 1 for ease of presentation. Suppose ∆K = wK −wK+1 ≳ q log n/ n M pL p 1/M. Then, ˆwi −ˆwj ≥wi −wj −| ˆwi −wi| −| ˆwj −wj| ≥wK −wK+1 − 2∥ˆw −w∥∞> 0, for all 1 ≤i ≤K and j ≥K + 1. That is, the top-K items are identified as desired. Hence, as long as ∆K ≳ q log n/ n M pL p 1/M, i.e., n M pL ≳n log n/M∆2 K, reliable top-K ranking is achieved with the sample size of n log n/M∆2 K. Now, let us prove Theorem 3. To find an ℓ∞error bound, we first derive an upper bound on the point-wise error between the score estimate of item i and its true score, which consists of three terms: | ˆwi −wi| ≤| ˆwi −wi| ˆPii + X j:j̸=i | ˆwj −wj| ˆPij + X j:j̸=i (wi + wj) ˆPji −Pji . (6) We can obtain (6) from ˆw = ˆP ˆw and w = P w. We then obtain upper bounds on the three terms: ˆPii < 1, X j:j̸=i (wi + wj) ˆPji −Pji ≲ s n log n n M pL r 1 M , X j:j̸=i | ˆwj −wj| ˆPij ≲ s n log n n M pL r 1 M , (7) with high probability (Lemmas 1, 2 and 3 in the supplementary). (7) ends the proof. We obtain the first two from Hoeffding’s inequality. The last is key; this is where we sharply link an ℓ2 error bound of q n log n/ n M pL p 1/M (Theorem 4 in the supplementary) to the desired ℓ∞error bound (5). On the left hand side of the third inequality, the point-wise error of item j which affects that of item i as expressed in (6), may not be captured for some j, since there may be no hyper-edge that includes items i and j. This makes it hard to draw a link from the obtained ℓ2 error bound to the inequality, since ℓ2 errors can be seen as the sum of all point-wise errors. To include them all, we recursively apply (6) to | ˆwj −wj| in the third inequality and then apply the rest two properly (for detailed derivation, see the beginning of the proof of Lemma 3 in the supplementary). Then, we get X j:j̸=i | ˆwj −wj| ˆPij ≲ X j:j̸=i X k:k̸=j | ˆwk −wk| ˆPjk ˆPij + s n log n n M pL r 1 M . (8) Manipulating the first term of the right hand side (for derivation, see the proof of Lemma 3), we get n X k=1 | ˆwk −wk| X j:j /∈{i,k} ˆPjk ˆPij ≤∥ˆw −w∥2 v u u t n X k=1 X j:j /∈{i,k} ˆPjk ˆPij 2 . (9) We show that P j:j /∈{i,k} ˆPjk ˆPij concentrates on the order of 1/n for all k’s in the proof of Lemma 3. Since ∥w∥2 ≤√n∥w∥∞= √n, we get ∥ˆw −w∥2 /√n ≤∥ˆw −w∥2/∥w∥2. We derive this ℓ2 error bound to be q n log n/ n M pL p 1/M (Theorem 4 in the supplementary), matching (5). To describe the concentration of P j:j /∈{i,k} ˆPjk ˆPij, we need to consider dependencies in it. To see them, we upper-bound it as follows (for details, see the proof of Lemma 3 in the supplementary). X j:j /∈{i,k} ˆPij ˆPjk ≤ 1 4d2max X j:j /∈{i,k} X I1:i,j∈I1,I2:j,k∈I2 XI1I2, (10) where XI1I2 := I [{i, j} ∈φ(I1)] I [{j, k} ∈φ(I2)] . For M > 2, there can exist ja and jb such that {i, ja, jb} ∈I1, ja ∈I2 and jb /∈I2. Then, summing over j, XI1I2 and XI1I3, where I3 is another hyper-edge that includes jb and k, are dependent concerning the same hyper-edge I1. To handle this, we use Janson’s inquality [30], one of concentration inequalities that consider dependencies. To derive a necessary condition matching our sufficient condition, we use a generalized version of Fano’s inequality [26] as in the proof of Theorem 3 in [17] and complete combinatorial calculations. 6 3.3 Discussion Optimality versus M — intuition behind our sample breaking method: For each M-wise sample, we form a circular permutation uniformly at random, and extract M pairwise samples each of which concerns two adjacent items in it. Suppose we have an M-wise sample 1 ≺2 ≺· · · ≺M, and for simplicity we happen to form a circular permutation as (1, 2, . . . , M −1, M, 1); we extract M pairwise samples as 1 ≺2, 2 ≺3, . . . , (M −1) ≺M, 1 ≺M. Let us provide the intuition behind why this leads us to the optimal sample complexity. For the case of M = 2, Rank Centrality achieves the optimal order-wise sample complexity of n log n/∆2 K as characterized in [17]. In addition, one M-wise sample in the PL model can be broken into M −1 independent pairwise ones, since pairwise data of two arbitrary items among the M items depend on the true scores of the two items only. In our example, one can convert the M-wise sample into M −1 independent pairwise ones as 1 ≺2, 2 ≺3, . . . , (M −1) ≺M. From these, it is intuitive to see that we can achieve reliable top-K ranking with an order-wise sample complexity of n log n/(M −1)∆2 K by converting each M-wise sample into M −1 independent pairwise ones. Notice a close gap to the optimal sample complexity in Section 3. Tight ℓ∞error bounds: As shown in Section 3.2, deriving a tight ℓ∞error bound is critical to analyzing the performance of a top-K ranking algorithm. Recent work [17] has relied on combining an additional stage of local refinement in series with Rank Centrality to derive it, and characterized the optimal sample complexity for the pairwise model. In contrast, although it is valid in a slightly restricted regime (see the next remark), we employ only Rank Centrality and still succeed in achieving optimality for the M-wise model that includes the pairwise model. Deriving tight ℓ∞error bounds being crucial, it is hard for one to attain this result without a fine analytical technique. It is our main theoretical contribution to develop one. For details, see the proof of Lemma 3 in the supplementary that sharply links an ℓ∞error bound (Theorem 3 therein) and an ℓ2 error bound (Theorem 4 therein). Rank Centrality has been shown to achieve the performance nearly as good as MLE in terms of ℓ2 error, but little has been known in terms of ℓ∞error, until now. Our result has made clear progress. Analytical technique: Our analysis is not limited to Rank Centrality. Whenever one wishes to compute the difference between the leading eigenvector of any matrix and that of its noisy version, one can obtain (6), (8) and (9). Thus, it can be adopted to link ℓ2 and ℓ∞error bounds for any spectral method. Dense regimes: Our main result concerns a slightly denser regime, indicated by the condition p ≳(M −1) q log n/ n−1 M−1 , where many distinct groups of items are likely to be compared. One can see that this dense regime condition is not necessary for top-K ranking; for the pairwise case M = 2, it is p ≳log n/n as shown in [17]. However, it is not clear yet whether or not the dense regime condition is required under our approach that employs only a spectral method. Our speculation from numerical experiments is that the sparse regime condition, log n/ n−1 M−1 ≲p ≲(M −1) q log n/ n−1 M−1 , may not be sufficient for spectral methods to achieve reliable top-K ranking (see Section 4). 4 Experimental Results 4.1 Synthetic data simulation L: number of repeated comparisons 1 5 10 15 20 25 ℓ∞norm of estimation errors 0 0.1 0.2 0.3 0.4 0.5 Rank Centrality: p = 0.25 Spectral MLE: p = 0.25 L: number of repeated comparisons 1 5 10 15 20 25 empirical success rate 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Rank Centrality: p = 0.25 Spectral MLE: p = 0.25 Borda Count: p = 0.25 L: number of repeated comparisons 10 50 100 150 200 250 ℓ∞norm of estimation errors 0 0.1 0.2 0.3 0.4 0.5 Rank Centrality: p = 0.025 Spectral MLE: p = 0.025 L: number of repeated comparisons 10 50 100 150 200 250 empirical success rate 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Rank Centrality: p = 0.025 Spectral MLE: p = 0.025 Borda Count: p = 0.025 Figure 1: Dense regime (pdense = 0.25, first two figures): empirical ℓ∞estimation error v.s. L (left); empirical success rate v.s. L (right). Sparse regime (psparse = 0.025, last two figures): empirical ℓ∞ estimation error v.s. L (left); empirical success rate v.s. L (right). First, we conduct a synthetic data experiment for M = 2, the pairwise comparison model, to compare our result in Theorem 2 to that in recent work [17]. We consider both dense (p ≳ p log n/n) and sparse (log n/n ≲p ≲ p log n/n) regimes. We set constant c1 = 2, and set pdense = 0.25 and psparse = 0.025, to make each be in its proper range. We use n = 500, K = 10, and ∆K = 0.1. Each result in all numerical simulations is obtained by averaging over 10000 Monte Carlo trials. 7 In Figure 1, the first two figures show the experiments in the dense regime. We see that as L increases, meaning as we obtain pairwise samples beyond the minimal sample complexity, (1) the ℓ∞error of Rank Centrality decreases and meets that of Spectral MLE (left); (2) the success rate of Rank Centrality increases and soon hits 100% along with Spectral MLE (right). The curves support our result; in the dense regime p ≳ p log n/n, Rank Centrality alone can achieve reliable top-K ranking. The last two figures show the experiments in the sparse regime. We see that as L increases, (1) the ℓ∞error of Rank Centrality decreases but does not meet that of Spectral MLE (left); (2) the success rate of Rank Centrality increases but does not reach that of Spectral MLE which hits nearly 100% (right). The curves lead us to speculate that the sparse regime condition log n/n ≲p ≲ p log n/n may not be sufficient for spectral methods to achieve reliable top-K ranking. 3 4 5 6 7 8 9 10 11 12 13 14 15 M: Size of hyper-edges 0 2000 4000 6000 8000 10000 12000 Minimal sample complexity Empirical Curve fitting: 1/M 0.1 0.15 0.2 0.25 0.3 ΔK 0 0.5 1 1.5 2 2.5 3 Minimal sample complexity ×105 Empirical Curve fitting: 1/Δ2 K 500 1000 1500 n 0 0.5 1 1.5 2 Minimal sample complexity ×105 Empirical Curve fitting: n log n Figure 2: Empirical minimal sample complexity v.s. M (first), ∆K (second), and n log n (third). Next, we corroborate our optimal sample complexity result in Theorem 2. We examine whether the empirical minimal sample complexity decreases at the rate of 1/M and 1/∆2 K, and increases at the rate of n log n. To verify its reduction at the rate of 1/M, we run experiments for M ranging from 3 to 15. We increase the number of samples by increasing p until the success rate reaches 95% for each M. The number of samples we use to achieve it is considered as the empirical minimal sample complexity for each M. We set the other parameters as n = 100, L = 20, K = 5 and ∆K = 0.3. The result for each M in all simulations is obtained by averaging over 1000 Monte Carlo trials. To verify the other two relations, we follow similar procedures. As for 1/∆2 K, we set n = 200, M = 2, L = 20 and K = 5. As for n log n, we set M = 2, L = 4, K = 5 and ∆K = 0.4. The first figure in Figure 2 shows the reduction in empirical minimal sample complexity with a blue solid curve. The red dashed curve is obtained by curve-fitting. We can see that the empirical minimal sample complexity drops inversely proportional to M. From the second and third figures, we can see that in terms of ∆K and n log n, it also behaves as our result in Theorem 2 predicts. 10 15 20 25 30 35 40 45 50 L 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Success rate Spectral MLE Proposed Least Square Counting 0.5 0.6 0.7 0.8 0.9 1 f: Fraction of samples used 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized overlap (K = 5) Proposed Spectral MLE Least Square Counting 1 2 3 4 5 Top-5 users based on average league point per match 0 20 40 60 80 100 Percentile Proposed Spectral MLE Least Square Counting Figure 3: (First) Empirical success rates of four algorithms: our algorithm (blue circle), heuristic Spectral MLE (red cross), least square (green plus), and counting (purple triangle); (Second) Top-5 ranked users: normalized overlap v.s. fraction of samples used; (Third) Top-5 users’ (sorted by average League of Legends points earned per match) percentile in the ranks by our algorithm, heuristic Spectral MLE, least square, and counting. For instance, the user who earns largest points per match (first entry) is at around the 80-th percentile according to our algorithm and heuristic Spectral MLE, the 60-th percentile according to least square, and the 10-th percentile according to counting. Last, we evaluate the success rates of various algorithms on M-wise comparison data. We consider our proposed algorithm, Spectral MLE, least square (HodgeRank [31]), and counting. Since Spectral MLE has been developed for pairwise data, we heuristically extend it. We apply our sample breaking method to obtain pairwise data needed. For any parameters required to run Spectral MLE, we heuristically find the best ones which give rise to the highest success rate. In the other two algorithms, we first apply our sample breaking method as well. Then, for least square, we find a score vector ˆw such that the squared error P (i,j)∈E (log( ˆwi/ ˆwj) −log(yij/yji))2, where E is the edge set for the converted pairwise data, is minimized. For counting, we count each item’s number of wins in all 8 involved pairwise data. We use n = 100, M = 4, p = 0.0025 · (M −1) q log n/ n−1 M−1 , K = 5 and ∆K = 0.3. Each result in all simulations is obtained by averaging over 5000 Monte Carlo trials. The first figure in Figure 3 shows that our algorithm and heuristic Spectral MLE perform best (the latter being marginally better), achieving near-100% success rates for large L. It also shows that they outperform the other two algorithms which do not achieve near-100% success rates even for large L. 4.2 Real-world data simulation One natural setting where we can obtain M-wise comparison data is an online game. Users randomly get together and play, and the results depend on their skills. We find League of Legends to be a proper fit4. In extracting M-wise data, we adopt a measure widely accepted as a factor that rates users’ skill in the user community5. We incorporate this measure into our model as follows. For each match (M-wise sample), we have 10 users, each associated with its measure. In breaking M-wise samples, for each user pair (i, j), we compare their measures and declare user i wins if its measure is larger than user j’s. This corresponds to y(ℓ) ij in our model. We assign 1 if user i wins and 0 otherwise. They may play together in multiple, say Lij, matches. We can compute yij := (PLij ℓ=1 y(ℓ) ij )/Lij to use for Rank Centrality. As M-wise data is extracted from team competitions, League of Legends does not perfectly fit our model. Yet one main reason to run this experiment is to see whether our algorithm works well in other settings that do not necessarily fit the PL model, being broadly applicable. We first investigate the robustness aspect by evaluating the performance against partial information. To this end, we use all collected data and obtain a ranking result for each algorithm which we consider as its baseline. Then, for each algorithm, we reduce sample sizes by discarding some of the data, and compare the results to the baseline to see how robust each algorithm is against partial information. We conduct this experiment for four algorithms: our proposed algorithm, the heuristic extension of Spectral MLE, least square and counting. We choose our metric as a normalized overlap: |Scomp ∩Spart|/K, where K = 5, Scomp is the set of top-K users identified using the complete dataset and Spart is that identified using partial datasets. In choosing partial data, we set f ∈(0.5, 1), and discard each match result with probability f independently. We compute the metric for each f by averaging over 1000 Monte Carlo trials. The second figure of Figure 3 shows that over the range of f where overlaps above 60% are retained, our algorithm, along with some others, demonstrates good robustness against partial information. In addition, we compare the ranks estimated by the four algorithms to the rank provided by League of Legends. By computing the average points earned per match for each user, we infer the rank of the users determined by official standards. In the third figure of Figure 3, the x-axis indicates the top-5 users identified by computing average League of Legends points earned per match and sorting them in descending order. The y-axis indicates the percentile of these top-5 users according to the ranks by the algorithms of interest. Notice that the top-5 ranked users by League of Legends standards are also placed at high ranks when ranked by our algorithm and heuristic Spectral MLE; they are all placed at the 80-th percentile or above. On the other hand, most of them (4 users out of the top-5 users) are placed at noticeably lower ranks when ranked by least square and counting. 5 Conclusion We characterized the minimax (order-wise) optimal sample complexity for top-K rank aggregation in the M-wise comparison model that builds on the PL model. We corroborated our result using synthetic data experiments and verified the applicability of our algorithm on real-world data. 4Two teams of 5 users compete. Each user kills an opponent, assists a mate to kill one, and dies from an attack. At the end, one team wins, and different points are given to the users. We use users’ kill/assist/death data (non-negative integers), which can be considered as noisy measurements of their skill, and rank them by skill. 5We define a measure as {(# of kills + # of assists)/(1 + # of deaths)}×weight. We adopt this measure since it is similar to the one officially provided (called KDA statistics). We assign winning users a weight of 1.1 and losing users a weight of 1.0, to give extra credit (10%) to users who lead their team’s winning. 9 Acknowledgments This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIT) (2017-0-00694, Coding for High-Speed Distributed Networks). References [1] Ailon, N. (2012). Active learning ranking from pairwise preferences with almost optimal query complexity. Journal of Machine Learning, 13, 137–164. [2] Ailon, N. and Mohri, M. (2007). An efficient reduction of ranking to classification. arXiv preprint arXiv:0710.2889. [3] Ammar, A. and Shah, D. (2011). Ranking: Compare, don’t score. In Allerton Conference, pages 776–783. IEEE. [4] Ashish, K. and Oh, S. (2016). Data-driven rank breaking for efficient rank aggregation. Journal of Machine Learning Research, 17, 1–54. [5] Azari Soufiani, H., Chen, W., Parkes, D. C., and Xia, L. (2013). Generalized method-of-moments for rank aggregation. In Neural Information Processing Systems, pages 2706–2714. [6] Azari Soufiani, H., Parkes, D. C., and Xia, L. (2014). A statistical decision-theoretic framework for social choice. In Neural Information Processing Systems, pages 3185–3193. [7] Baltrunas, L., Makcinskas, T., and Ricci, F. (2010). Group recommendations with rank aggregation and collaborative filtering. In ACM Conference on Recommender Systems, pages 119–126. ACM. [8] Bell, D. (1982). Econometric models for probabilisitic choice among products. Operations Research, 30(5), 961–981. [9] Bergstrom, C. T., W. J. D. and Wiseman, M. A. (2008). The eigenfactorTM metrics. Journal of Neuroscience, 28(45), 11433–11434. [10] Bonacich, P. and Lloyd, P. (2001). Eigenvector-like measures of centrality for asymmetric relations. Social networks, 23(3), 191–201. [11] Borda, J. C. (1781). Mémoire sur les élections au scrutin. [12] Bradley, R. A. and Terry, M. E. (1952). Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3-4), 324–345. [13] Braverman, M., Mao, J., and Weinberg, S. M. (2016). Parallel algorithms for select and partition with noisy comparisons. In ACM symposium on Theory of Computing, pages 851–862. [14] Brin, S. and Page, L. (1998). The anatomy of a large-scale hypertextual web search engine. Computer Networks and ISDN systems, 30(1), 107–117. [15] Caplin, A. and Nalebuff, B. (1991). Aggregation and social choice: a mean voter theorem. Econometrica, pages 1–23. [16] Chen, X., Bennett, P. N., Collins-Thompson, K., and Horvitz, E. (2013). Pairwise ranking aggregation in a crowdsourced setting. In ACM Conference on Web Search and Data Mining, pages 193–202. ACM. [17] Chen, Y. and Suh, C. (2015). Spectral MLE: Top-K rank aggregation from pairwise comparisons. In International Conference on Machine Learning, pages 371–380. [18] Cheng, W., H. E. and Dembczynski, K. J. (2010). Label ranking methods based on the Plackett-Luce model. In International Conference on Machine Learning, pages 215–222. [19] Cooley, O., Kang, M., and Koch, C. (2016). Threshold and hitting time for high-order connectedness in random hypergraphs. the electronic journal of combinatorics, pages 2–48. [20] Dwork, C., Kumar, R., Naor, M., and Sivakumar, D. (2001). Rank aggregation methods for the web. In International conference on World Wide Web, pages 613–622. ACM. [21] Fishburn, P. (1982). Nontransitive measurable utility. Journal of Mathematical Psychology, 26(1), 31–67. 10 [22] Ford, L. R. (1957). Solution of a ranking problem from binary comparisons. American Mathematical Monthly, pages 28–33. [23] Graham, L. and Sugden, R. (1982). Econometric models for probabilisitic choice among products. Economic Journal, 92(368), 805–824. [24] Guiver, J. and Snelson, E. (2009). Bayesian inference for Plackett-Luce ranking models. In ACM International Conference on Machine Learning, pages 377–384. [25] Hajek, B., Oh, S., and Xu, J. (2014). Minimax-optimal inference from partial rankings. In Neural Information Processing Systems, pages 1475–1483. [26] Han, T. and Verdú, S. (1994). Generalizing the Fano inequality. IEEE Transactions on Information Theory, 40, 1247–1251. [27] Heckel, R., Shah, N., Ramchandran, K., and Wainwright, M. (2016). Active ranking from pairwise comparisons and when parametric assumptions don’t help. arXiv preprint arXiv:1606.08842. [28] Hunter, D. R. (2004). MM algorithms for generalized Bradley-Terry models. Annals of Statistics, pages 384–406. [29] Jamieson, K. G. and Nowak, R. (2011). Active ranking using pairwise comparisons. In Neural Information Processing Systems, pages 2240–2248. [30] Janson, S. (2004). Large deviations for sums of partly dependent random variables. In Random Structures & Algorithms, pages 234–248. [31] Jiang, X., Lim, L. H., Yao, Y., and Ye, Y. (2011). Statistical ranking and combinatorial Hodge theory. Mathematical Programming, 127, 203–244. [32] Luce, R. D. (1959). Individual choice behavior: A theoretical analysis. Wiley. [33] Maystre, L. and Grossglauser, M. (2015). Fast and accurate inference of Plackett-Luce models. In Neural Information Processing Systems, pages 172–180. [34] McFadden, D. (1973). Conditional logit analysis of qualitative choice behavior. Frontiers in Econometrics, pages 105–142. [35] McFadden, D. (1980). Econometric models for probabilisitic choice among products. Journal of Business, 53(3), S13–S29. [36] Mohajer, S., Suh, C., and Elmahdy, A. (2017). Active learning for top-K rank aggregation from noisy comparisons. In International Conference on Machine Learning, pages 2488–2497. [37] Negahban, S., Oh, S., and Shah, D. (2016). Rank centrality: Ranking from pair-wise comparisons. Operations Research, 65, 266–287. [38] Oh, S., Thekumparampil, K. K., and Xu, J. (2015). Collaboratively learning preferences from ordinal data. In Neural Information Processing Systems, pages 1909–1917. [39] Plackett, R. L. and Luce, R. D. (1975). The analysis of permutations. Applied Statistics, pages 193–202. [40] Rajkumar, A. and Agarwal, S. (2014). A statistical convergence perspective of algorithms for rank aggregation from pairwise data. In International Conference on Machine Learning, pages 118–126. [41] Seeley, J. R. (1949). The net of reciprocal influence. Canadian Journal of Psychology, 3(4), 234–240. [42] Shah, N. B. and Wainwright, M. J. (2015). Simple, robust and optimal ranking from pairwise comparisons. arXiv preprint arXiv:1512.08949. [43] Szörényi, B., Busa-Fekete, R., Paul, A., and Hüllermeier, E. (2015). Online rank elicitation for PlackettLuce: A dueling bandits approach. In Neural Information Processing Systems, pages 604–612. [44] Valiant, L. G. (1984). A theory of the learnable. Communications of the ACM, 27(11), 1134–1142. [45] Vigna, S. (2016). Spectral ranking. Network Science, 4(4), 433–445. [46] Walker, J. and Ben-Akiva, M. (2002). Generalized random utility model. Mathematical Social Sciences, 43(3), 303–343. [47] Wei, T. H. (1952). The algebraic foundations of ranking theory. Ph.D. thesis, University of Cambridge. 11 | 2017 | 476 |
6,981 | From which world is your graph? Cheng Li College of William & Mary Felix M. F. Wong Independent Researcher∗ Zhenming Liu College of William & Mary Varun Kanade University of Oxford Abstract Discovering statistical structure from links is a fundamental problem in the analysis of social networks. Choosing a misspecified model, or equivalently, an incorrect inference algorithm will result in an invalid analysis or even falsely uncover patterns that are in fact artifacts of the model. This work focuses on unifying two of the most widely used link-formation models: the stochastic blockmodel (SBM) and the small world (or latent space) model (SWM). Integrating techniques from kernel learning, spectral graph theory, and nonlinear dimensionality reduction, we develop the first statistically sound polynomial-time algorithm to discover latent patterns in sparse graphs for both models. When the network comes from an SBM, the algorithm outputs a block structure. When it is from an SWM, the algorithm outputs estimates of each node’s latent position. 1 Introduction Discovering statistical structures from links is a fundamental problem in the analysis of social networks. Connections between entities are typically formed based on underlying feature-based similarities; however these features themselves are partially or entirely hidden. A question of great interest is to what extent can these latent features be inferred from the observable links in the network. This work focuses on the so-called assortative setting, the principle that similar individuals are more likely to interact with each other. Most stochastic models of social networks rely on this assumption, including the two most famous ones – the stochastic blockmodel [1] and the small-world model [2, 3], described below. Stochastic Blockmodel (SBM). In a stochastic blockmodel [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], nodes are grouped into disjoint “communities” and links are added randomly between nodes, with a higher probability if nodes are in the same community. In its simplest incarnation, an edge is added between nodes within the same community with probability p, and between nodes in different communities with probability q, for p > q. Despite arguably na¨ıve modelling choices, such as the independence of edges, algorithms designed with SBM work well in practice [14, 15]. Small-World Model (SWM). In a small-world model, each node is associated with a latent variable xi, e.g., the geographic location of an individual. The probability that there is a link between two nodes is proportional to an inverse polynomial of some notion of distance, dist(xi, xj), between them. The presence of a small number of “long-range” connections is essential to some of the most intriguing properties of these networks, such as small diameter and fast decentralized routing algorithms [3]. In general, the latent position may reflect geographic location as well as more abstract concepts, e.g., position on a political ideology spectrum. The Inference Problem. Without observing the latent positions, or knowing which model generates the underlying graph, the adjacency matrix of a social graph typically looks like the one shown in ∗Currently at Google. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Fig. 5(a) (App. A.1). However, if the model generating the graph is known, it is then possible to run a suitable “clustering algorithm” [14, 16] that reveals the hidden structure. When the vertices are ordered suitably, the SBM’s adjacency matrix looks like the one shown in Fig. 5(b) (App. A.1) and that of the SWM looks like the one shown in Fig. 5(c) (App. A.1). Existing algorithms typically depend on knowing the “true” model and are tailored to graphs generated according to one of these models, e.g., [14, 16, 17, 18]. Our Contributions. We consider a latent space model that is general enough to include both these models as special cases. In our model, an edge is added between two nodes with a probability that is a decreasing function of the distance between their latent positions. This model is a fairly natural one, and it is quite likely that a variant has already been studied; however, to the best of our knowledge there is no known statistically sound and computationally efficient algorithm for latent-position inference on a model as general as the one we consider. 1. A unified model. We propose a model that is a natural generalization of both the stochastic blockmodel and the small-world model that captures some of the key properties of real-world social networks, such as small out-degrees for ordinary users and large in-degrees for celebrities. We focus on a simplified model where we have a modest degree graph only on “celebrities”; the full paper material contains an analysis of the more realistic model using somewhat technical machinery [19]. 2. A provable algorithm. We present statistically sound and polynomial-time algorithms for inferring latent positions in our model(s). Our algorithm approximately infers the latent positions of almost all “celebrities” (1 −o(1)-fraction), and approximately infers a constant fraction of the latent positions of ordinary users. We show that it is statistically impossible to err on at most o(1) fraction of ordinary users by using standard lower bound arguments. 3. Proof-of-concept experiments. We report several experiments on synthetic and real-world data collected on Twitter from Oct 1 and Nov 30, 2016. Our experiments demonstrate that our model and inference algorithms perform well on real-world data and reveal interesting structures in networks. Additional Related Work. We briefly review the relevant published literature. 1. Graphon & Latent-space techniques. Studies using graphons and latent-space models have focused on the statistical properties of the estimators [20, 21, 22, 23, 24, 25, 26, 27, 28], with limited attention paid to computational efficiency. The “USVT” technique developed recently [29] estimates the kernel well when the graph is dense. Xu et al. [30] consider a polynomial time algorithm for a sparse model similar to ours, but focus on edge classification rather than latent position estimation. 2. Correspondence analysis in political science. Estimating the ideology scores of politicians is an important research topic in political science [31, 32, 33, 34, 35, 36, 17, 18]. High accuracy heuristics developed to analyze dense graphs include [17, 18]. Organization. Section 2 describes background, our model and results. Section 3 describes our algorithm and an gives an overview of its analysis. Section 4 contains the experiments. 2 Preliminaries and Summary of Results Basic Notation. We use c0, c1, etc. to denote constants which may be different in each case. We use whp to denote with high probability, by which we mean with probability larger 1 − 1 nc for any c. All notation is summarized in Appendix B for quick reference. Stochastic Blockmodel. Let n be the number of nodes in the graph with each node assigned a label from the set {1, . . . , k} uniformly at random. An edge is added between two nodes with the same label with probability p and between the nodes with different labels with probability q, with p > q (assortative case). In this work, we focus on the k = 2 case, where p, q = Ω((log n)c/n) and the community sizes are exactly the same. (Many studies of the regimes where recovery is possible have been published [37, 9, 5, 8].) Let A be the adjacency matrix of the realized graph and let M = E[A] = P Q Q P , where P and Q ∈R n 2 × n 2 with every entry equal to p and q, respectively. We next explain the inference algorithm, which uses two key observations. 1. Spectral Properties of M. M has rank 2 and the non-trivial eigenvectors are (1, . . . , 1)T and (1, . . . , 1, −1, . . . , −1) corresponding to eigenvalues n(p + q)/2 and n(p −q)/2, respectively. If one has access to M, the hidden structure in the graph is revealed merely by reading off the second eigenvector. 2. Low Discrepancy between A and 2 M. Provided the average degree n(p + q)/2 and the gap p −q are large enough, the spectrum and eigenspaces of the matrices A and M can be shown to be close using matrix concentration inequalities and the Davis-Kahan theorem [38, 39]. Thus, it is sufficient to look at the projection of the columns of A onto the top two eigenvectors of A to identify the hidden latent structure. Small-World Model (SWM). In a 1-dim. SWM, each node vi is associated with an independent latent variable xi ∈[0, 1] that is drawn from the uniform distribution on [0, 1]. The probability of a link between two nodes is Pr[{vi, vj} ∈E] ∝ 1 |xi−xj|∆+c0 , where ∆> 1 is a hyper-parameter. The inference algorithm for small-world models uses different ideas. Each edge in the graph is considered as either “short-range” or “long-range.” Short-range edges are those between nodes that are nearby in latent space, while long-range edges have end-points that are far away in latent space. After removing the long-range edges, the shortest path distance between two nodes scales proportionally to the corresponding latent space distance (see Fig. 6 in App. A.2). After obtaining estimates for pairwise distances, standard buidling blocks are used to find the latent positions xi [40]. The key observation used to remove the long-range edges is: an edge {vi, vj} is a short-range edge if and only if vi and vj will share many neighbors. A Unified Model. Both SBM and SWM are special cases of our unified latent space model. We begin by describing the full-fledged bipartite (heterogeneous) model that is a better approximation of real-world networks, but requires sophisticated algorithmic techniques (see [19] for a detailed analysis). Next, we present a simplified (homogeneous) model to explain the key ideas. Bipartite Model. We use latent-space model to characterize the stochastic interactions between users. Each individual is associated with a latent variable in [0, 1]. The bipartite graph model consists of two types of users: the left side of the graph Y = {y1, . . . , ym} are the followers (ordinary users) and the right side X = {x1, . . . , xn} are the influencers (celebrities). Both yi and xi are i.i.d. random variables from a distribution D. This assumption follows the convention of existing heterogeneous models [41, 42]. The probability that two individuals yi and xj interact is κ(yi, xj)/n, where κ : [0, 1]×[0, 1] →(0, 1] is a kernel function. Throughout this paper we assume that κ is a small-world kernel, i.e., κ(x, y) = c0/(∥x −y∥∆+ c1) for some ∆> 1 and suitable constants c0, c1, and that m = Θ(n · polylog(n)). Let B ∈Rm×n be a binary matrix that Bi,j = 1 if and only if there is an edge between yi and xj. Our goal is to estimate {xi}i∈[n] based on B for suitably large n. Simplified Model. The graph only has the node set is X = {x1, ..., xn} of celebrity users. Each xi is again an i.i.d. random variable from D. The probability that two users vi and vj interact is κ(xi, xj)/C(n). The denominator is a normalization term that controls the edge density of the graph. We assume C(n) = n/polylog(n), i.e., the average degree is polylog(n). Unlike the SWM where the xi are drawn uniformly from [0, 1], in the unified model D can be flexible. When D is the uniform distribution, the model is the standard SWM. When D has discrete support (e.g., xi = 0 with prob. 1/2 and xi = 1 otherwise), then the unified model reduces to the SBM. Our distributionagnostic algorithm can automatically select the most suitable model from SBM and SWM, and infer the latent positions of (almost) all the nodes. Bipartite vs. Simplified Model. The simplified model suffers from the following problem: If the average degree is O(1), then we err on estimating every individual’s latent position with a constant probability (e.g., whp the graph is disconnected), but in practice we usually want a high prediction accuracy on the subset of nodes corresponding to high-profile users. Assuming that the average degree is ω(1) mismatches empirical social network data. Therefore, we use a bipartite model that introduces heterogeneity among nodes: By splitting the nodes into two classes, we achieve high estimation accuracy on the influencers and the degree distribution more closely matches real-world data. For example, in most online social networks, nodes have O(1) average degree, and a small fraction of users (influencers) account for the production of almost all “trendy” content while most users (followers) simply consume the content. Additional Remarks on the Bipartite Model. 1. Algorithmic contribution. Our algorithm computes BTB and then regularizes the product by shrinking the diagonal entries before carrying out spectral analysis. Previous studies of the bipartite graph in similar settings [43, 44, 45] attempt to construct a regularized product using different heuristics. Our work presents the first theoretically sound regularization technique for spectral algorithms. In addition, some studies have suggested running SVD on B directly (e.g., [28]). We show that the (right) singular vectors of B do not converge 3 to the eigenvectors of K (the matrix with entries κ(xi, xj)). Thus, it is necessary to take the product and use regularization. 2. Comparison to degree-corrected models (DCM). In DCM, each node vi is associated with a degree parameter D(vi). Then we have Pr[{vi, vj} ∈E] ∝D(vi)κ(xi, xj)D(vj). The DCM model implies the subgraph induced by the highest degree nodes is dense, which is inconsistent with real-world networks. There is a need for better tools to analyze the asymptotic behavior of such models and we leave this for future work (see, e.g., [41, 42]). Theoretical Results. Let F be the cdf of D. We say F and κ are well-conditioned if: (1) F has finitely many points of discontinuity, i.e., the closure of the support of F can be expressed as the union of non-overlapping closed intervals I1, I2, ..., Ik for a finite number k. (2) F is near-uniform, i.e., for any interval I that has non-empty overlap with F’s support, R I dF(x) ≥c0|I|, for some constant c0. (3) Decay Condition: The eigenvalues of the integral operator based on κ and F decay sufficiently fast. We define the Kf(x) = R κ(x, x′)f(x′)dF(x′) and let (λi)i≥1 denote the eigenvalues of K. Then, it holds that λi = O(i−2.5). If we use the small-word kernel κ(x, y) = c0/(|x −y|∆+ c1) and choose F that gives rise to SBM or SWM, in each case the pair F and κ are well-conditioned, as described below. As the decay condition is slightly more invoved, we comment upon it. The condition is a mild one. When F is uniformly distributed on [0, 1], it is equivalent to requiring K to be twice differentiable, which is true for the small world kernel. When F has a finite discrete support, there are only finitely many non-zero eigenvalues, i.e., this condition also holds. The decay condition holds in more general settings, e.g., when F is piecewise linear [46] (see [19]). Without the decay condition, we would require much stronger assumptions: Either the graph is very dense or ∆≫2. Neither of these assumptions is realistic, so effectively our algorithm fails to work. In practice, whether the decay condition is satisfied can be checked by making a log-log plot and it has been observed that for several real-world networks, the eigenvalues follow a power-law distribution [47]. Next, we define the notion of latent position recovery for our algorithms. Definition 2.1 ((α, β, γ)-Aproximation Algorithm). Let Ii, F, and K be defined as above, and let Ri = {xj : xj ∈Ii}. An algorithm is called an (α, β, γ)-approximation algorithm if 1. It outputs a collection of disjoint points C1, C2, . . . , Ck such that Ci ⊆Ri, which correspond to subsets of reconstructed latent variables. 2. For each Ci, it produces a distance matrix D(i). Let Gi ⊆Ci be such that for any ij, ik ∈Gi D(i) ij,ik ≤|xij −xik| ≤(1 + β)D(i) ij,ik + γ. (1) 3. |S i Gi| ≥(1 −α)n. In bipartite graphs, Eq.(1) is required only for influencers. We do not attempt to optimize constants in this paper. We set α = o(1), β a small constant, and γ = o(1). Definition 2.1 allows two types of errors: Cis are not required to form a partition i.e., some nodes can be left out, and a small fraction of estimation errors is allowed in each Ci, e.g., if xj = 0.9 but bxj = 0.2, then the j-th “row” in D(i) is incorrect. To interpret the definition, consider the blockmodel with 2 communities. Condition 1 means that our algorithm will output two disjoint groups of points. Each group corresponds to one block. Condition 2 means that there are pairwise distance estimates within each group. Since the true distances for nodes within the same block are zero, our estimates must also be zero to satisfy Eq.1. Condition 3 says that the proportion of misclassified nodes is α = o(1). We can also interpret the definition when we consider a smallworld graph, in which case k = 1. The algorithm outputs pairwise distances for a subset C1. We know that there is a sufficiently large G1 ⊆C1 such that the pairwise distances are all correct in C1. Our algorithm does not attempt to estimate the distance between Ci and Cj for i ̸= j. When the support contains multiple disjoint intervals, e.g., in the SBM case, it first pulls apart the nodes in different communities. Estimating the distance between intervals, given the output of our algorithm is straightforward. Our main result is the following. Theorem 2.2. Using the notation above, assume F and κ are well-conditioned, and C(n) and m/n are Ω(logc n) for some suitably large c. The algorithm for the simplified model shown in Figure 1 and that for the bipartite model (appears in [19]) give us an (1/ log2 n, ϵ, O(1/ log n))approximation algorithm w.h.p. for any constant ϵ. Furthermore, the distance estimates D(i) for each Ci are constructed using the shortest path distance of an unweighted graph. 4 LATENT-INFERENCE(A) 1 // Step 1. Estimate Φ . 2 bΦ = SM-EST(A). 3 // Step 2. Execute isomap algo. 4 D = ISOMAP-ALGO(bΦ) 5 // Step 3. Find latent variables. 6 Run a line embedding algorithm [48, 49]. ISOMAP-ALGO(bΦ, ℓ) 1 Execute S ←DENOISE(bΦ) (See Section 3.2) 2 // S is a subset of [n]. 3 Build G = {S, E} s.t. {i, j} ∈E iff 4 |(˜Φd)i −(˜Φd)j| ≤ℓ/ log n (ℓa constant). 5 Compute D such D(i, j) is the shortest 6 path distance between i and j when i, j ∈S. 7 return D SM-EST(A, t) 1 [ ˜UA, ˜SA, ˜VA] = svd(A). 2 Let also λi be i-th singular value of A. 3 // let t be a suitable parameter. 4 d = DECIDETHRESHOLD(t, ρ(n)). 5 SA: diagonal matrix comprised of {λi}i≤d 6 UA, VA: the singular vectors 7 corresponding to SA. 8 Let bΦ = p C(n)UAS1/2 A . 9 return bΦ DECIDETHRESHOLD(t, ρ(n)) 1 // This procedure decides d the number 2 of Eigenvectors to keep. 3 // t is a tunable parameter. See Proposition 3.1. 4 d = arg maxd{λd( A ρ(n)) −λd+1( A ρ(n)) ≥θ}. 5 where θ = 10(t/ρ(n))24/59 Figure 1: Subroutines of our Latent Inference Algorithm. Pairwise Estimation to Line-embedding and High-dimensional Generalization. Our algorithm builds estimates on pairwise latent distance and uses well-studied metric-embedding methods [48, 49] as blackboxes to infer latent positions. Our inference algorithm can be generalized to d-dimensional space with d being a constant. But the metric-embedding on ℓd p becomes increasingly difficult, e.g., when d = 2, the approximation ratio for embedding a graph is Ω(√n) [50]. 3 Our algorithms As previously noted, SBM and SWM are special cases of our unified model and both require different algorithmic techniques. Given that it is not surprising that our algorithm blends ingredients from both sets of techniques. Before proceeding, we review basics of kernel learning. Notation. Let A be the adjacency matrix of the observed graph (simplified model) and let ρ(n) ≜ n/C(n). Let K be the matrix with entries κ(xi, xj). Let ˜UK ˜SK ˜V T K ( ˜UA ˜SA ˜V T A ) be the SVD of K (A). Let d be a parameter to be chosen later. Let SK (SA) be a d×d diagonal matrix comprising the d-largest eigenvalues of K (A). Let UK (UA) and VK (VA) be the corresponding singular vectors of K (A). Finally, let ¯K = UKSKV T K ( ¯A = UASAV T A ) be the low-rank approximation of K (A). Note that when a matrix is positive definite and symmetric SVD coincides with eigen-decomposition; as a consequence UK = VK and UA = VA. Kernel Learning. Define an integral operator K as Kf(x) = R κ(x, x′)f(x′)dF(x′). Let ψ1, ψ2, . . . be the eigenfunctions of K and λ1, λ2, . . . be the corresponding eigenvalues such that λ1 ≥λ2 ≥· · · and λi ≥0 for each i. Also let NH be the number of eigenfunctions/eigenvalues of K, which is either finite or countably infinite. We recall some important properties of K [51, 25]. For x ∈[0, 1], define the feature map Φ(x) = ( p λjψj(x) : j = 1, 2, ...), so that ⟨Φ(x), Φ(x′)⟩= κ(x, x′). We also consider a truncated feature Φd(x) = ( p λjψj(x) : j = 1, 2, ..., d). Intuitively, if λj is too small for sufficiently large j, then the first d coordinates (i.e., Φd) already approximate the feature map well. Finally, let Φd(X) ∈Rn×d such that its (i, j)-th entry is p λjψj(xi). Let’s further write (Φd(X)):,i be the i-th column of Φd(X). Let Φ(X) = limd→∞Φd(X). When the context is clear, shorten Φd(X) and Φ(X) to Φd and Φ, respectively. There are two main steps in our algorithm which we explain in the following two subsections. 3.1 Estimation of Φ through K and A The mapping Φ : [0, 1] →RNH is bijective so a (reasonably) accurate estimate of Φ(xi) can be used to recover xi. Our main result is the design of a data-driven procedure to choose a suitable number of eigenvectors and eigenvalues of A to approximate Φ (see SM-EST(A) in Fig. 1). 5 Proposition 3.1. Let t be a tunable parameter such that t = o(ρ(n)) and t2/ρ(n) = ω(log n). Let d be chosen by DECIDETHRESHOLD(·). Let bΦ ∈RNH be such that its first d-coordinates are equal to p C(n)UAS1/2 A , and its remaining entries are 0. If ρ(n) = ω(log n) and K (F and κ) is well-conditioned, then with high probability: ∥bΦ −Φ∥F = O √n (t/(ρ(n))) 2 29 (2) Specifically, by letting t = ρ2/3(n), we have ∥bΦ −Φ∥F = O √nρ−2/87(n) . We remark that our result is stronger than an analogous result for sparse graphs in [25] as our estimate is close to Φ rather than the truncated Φd. Remark on the Eigengap. In our analysis, there are three groups of eigenvalues: the eigenvalues of K, those of K, and those of A. They are in different scales: λi(K) ≤1 (resulting from the fact that κ(x, y) ≤1 for all x and y), and λi(A/ρ(n)) ≈λi(K/n) ≈λi(K) if n and ρ(n) are sufficiently large. Thus, λd(K) are independent of n for a fixed d and should be treated as Θ(1). Also δd ≜λd(K) −λd+1(K) →0 as d →∞. Since the procedure of choosing d depends on C(n) (and thus also on n), δd depends on n and can be bounded by a function in n. This is the reason why Proposition 3.1 does not explicitly depend on the eigengap. We also note that we cannot directly find δd based on the input matrix A. But standard interlacing results can give δd = Θ(λd(A/ρ(n))− λd+1(A/ρ(n))) (cf. [19]). Intuition of the algorithm. Using Mercer’s theorem, we have ⟨Φ(xi), Φ(xj)⟩ = limd→∞⟨Φd(xi), Φd(xj)⟩= κ(xi, xj). Thus, limd→∞ΦdΦT d = K. On the other hand, we have ( ˜UK ˜S1/2 K )( ˜UK ˜S1/2 K )T = K. Thus, Φd(X) and ˜UK ˜S1/2 K are approximately the same, up to a unitary transformation. We need to identify different sources of errors to understand the approximation quality. Error source 1. Finite samples to learn the kernel. We want to infer about “continuous objects” κ and D (specifically the eigenfunctions of K) but K only contains the kernel values of a finite set of pairs. From standard results in Kernel PCA [52, 25], we have with probability ≥1 −ϵ, ∥UKS 1/2 K W −Φd(X)∥F ≤2 √ 2 p log ϵ−1 λd(K) −λd+1(K) = 2 √ 2 p log ϵ−1 δd . Error source 2. Only observe A. We observe only the realized graph A and not K, though it holds that EA = K/C(n). Thus, we can only use singular vectors of C(n)A to approximate ˜UK ˜S1/2 K . We have:
p C(n)UAS1/2 A W −UKS1/2 K
F = O t √ dn δ2 dρ(n) . When A is dense (i.e., C(n) = O(1)), the problem is analyzed in [25]. We generalize the results in [25] for the sparse graph case. See [19] for a complete analysis. Error source 3. Truncation error. When i is large, the noise in λi(A)( ˜UA):,i “outweighs” the signal. Thus, we need to choose a d such that only the first d eigenvectors/eigenvalues of A are used to approximate Φd. Here, we need to address the truncation error: the tail {√λiψi(xj)}i>d is thrown away. Next we analyze the magitude of the tail. We abuse notation so that Φd(x) refers to both a d-dimensional vector and a NH-dimensional vector in which all entries after the d-th one are 0. We have E∥Φ(x) −Φd(x)∥2 = P i>d E[(√λiψi(x))2] = P i>d λi R |ψi(x)|2dF(x) = P i>d λi. (A Chernoff bound is used to obtain that ∥Φ −Φd∥F = O(√n/( pP i>d λi))). Using the decay condition, we show that a d can be identified so that the tail can be bounded by a polynomial in δd. The details are technical and are provided in [19]. 3.2 Estimating Pairwise Distances from bΦ(xi) through Isomap See ISOMAP-ALGO(·) in Fig. 1 for the pseudocode. After we construct our estimate bΦd, we estimate K by letting bK = bΦdbΦT d. Recalling Ki,j = c0/(|xi −xj|∆+ c1), a plausible approach is to estimate |xi −xj| = (c0/ bKi,j −c1)1/∆. However, κ(xi, xj) is a convex function in |xi −xj|. 6 (a) True features (b) Estimated features (c) Isomap w/o denoising (d) Isomap + denoising Figure 2: Using the Isomap Algorithm to recover pairwise distances. (a) The true curve C = {Φ(x)}x∈[0,1] (b) Estimate bΦ (c) Shows that an undesirable short-cut may exist when we run the Isomap algorithm and (d) Shows the result of running the Isomap algorithm after removal of the corrupted nodes. Thus, when Ki,j is small, a small estimation error here will result in an amplified estimation error in |xi −xj| (see also Fig. 7 in App. A.3). But when |xi −xj| is small, Ki,j is reliable (see the “reliable” region in Fig. 7 in App. A.3). Thus, our algorithm only uses large values of Ki,j to construct estimates. The isomap technique introduced in topological learning [53, 54] is designed to handle this setting. Specifically, the set C = {Φ(x)}x∈[0,1] forms a curve in RNH (Fig. 2(a)). Our estimate {bΦ(xi)}i∈[n] will be a noisy approximation of the curve (Fig. 2(b)). Thus, we build up a graph on {Φ(xi)}i≤n so that xi and xj are connected if and only if bΦ(xi) and bΦ(xj) are close (Fig. 2(c-d)). Then the shortest path distance on G approximates the geodesic distance on C. By using the fact that κ is a radial basis kernel, the geodesic distance will also be proportional to the latent distance. Corrupted nodes. Excessively corrupted nodes may help build up “undesirable bridges” and interfere with the shortest-path based estimation (cf.Fig. 2(c)). Here, the shortest path between two green nodes “jumps through” the excessively corrupted nodes (labeled in red) so the shortest path distance is very different from the geodesic distance. Below, we describe a procedure to remove excessively corrupted nodes and then explain how to analyze the isomap technique’s performance after their removal. Note that d in this section mostly refers to the shortest path distance. Step 1. Eliminate corrupted nodes. Recall that x1, x2, ..., xn are the latent variables. Let zi = Φ(xi) and bzi = bΦ(xi). For any z ∈RNH and r > 0, we let Ball(z, r) = {z′ : ∥z′−z∥≤r}. Define projection Proj(z) = arg minz′∈C ∥z′ −z∥, where C is the curve formed by {φ(x)}x∈[0,1]. Finally, for any point z ∈C, define Φ−1(z) such that Φ(Φ−1(z)) = z (i.e., z’s original latent position). For the points that fall outside of C, define Φ−1(z) = Φ−1(Proj(z)). Let us re-parametrize the error term in Propostion 3.1. Let f(n) be such that ∥bΦ −Φ∥F ≤√n/f(n), where f(n) = ρ2/87(n) = Ω(log2 n) for sufficiently large ρ(n). By Markov’s inequality, we have Pri[∥bΦ(xi) −Φ(xi)∥2 ≥ 1/ p f(n)] ≤1/f(n). Intuitively, when ∥bΦ(xi) −Φ(xi)∥2 ≥1/ p f(n), i becomes a candidate that can serve to build up undesirable shortcuts. Thus, we want to eliminate these nodes. Looking at a ball of radius O(1/ p f(n)) centered at a point bzi, consider two cases. Case 1. If bzi is close to Proj(bzi), i.e., corresponding to the blue nodes in Figure 2(c). For the purpose of exposition, let us assume bzi = zi. Now for any point zj, if |xi −xj| = O(f −1/∆(n)), then we have ∥bzi −bzj∥= O(1/ p f(n)), which means zj is in Ball(zi, O(1/ p f(n))). The total number of such nodes will be in the order of Θ(n/f 1/∆(n)), by using the near-uniform density assumption. Case 2. If bzi is far away from any point in C, i.e., corresponding to the red ball in Figure 2(c), any points in Ball(bzi, O(1/ p f(n))) will also be far from C. Then the total number of such nodes will be O(n/f(n)). As n/f 1/∆(n) = ω(n/f(n)) for ∆> 1, there is a phase-transition phenomenon: When bzi is far from C, then a neighborhood of bzi contains O(n/f(n)) nodes. When bzi is close to C, then a neighborhood of bzi contains ω(n/f(n)) nodes. We can leverage this intuition to design a countingbased algorithm to eliminate nodes that are far from C: DENOISE(bzi) : If |Ball(bzi, 3/ p f(n))| < n/f(n), remove bzi. (3) 7 Algo. ρ Slope of β S.E. p-value Ours 0.53 9.54 0.28 < 0.001 Mod. [55] 0.16 1.14 0.02 < 0.001 CA [18] 0.20 0.11 7e-4 < 0.001 Maj [56] 0.13 0.09 0.02 < 0.001 RW [54] 0.01 1.92 0.65 < 0.001 MDS [49] 0.05 30.91 120.9 0.09 Figure 3: Latent Estimates vs. Ground-truth. (a) Inferred kernel (b) SWM (c) SBM Figure 4: Visualization of real and synthetic networks. (a) Our inferred kernel matrix, which is “in-between” (b) the small-world model and (c) the stochastic blockmodel. Theoretical result. We classify a point i into three groups: 1. Good: Satisfying ∥bzi −Proj(bzi)∥≤1/ p f(n). We further partition the set of good points into two parts. Good-I are points such that ∥bzi −zi∥≤1/ p f(n), while Good-II are points that are good but not in Good-I. 2. Bad: when ∥zi −Proj(zi)∥> 4/ p f(n). 3. Unclear: otherwise. Lemma 3.2. (cf. [19] ) After running DENOISE that uses the counting-based decision rule, all good points are kept, all bad points are eliminated, and all unclear points have no performance guarantee. The total number of eliminated nodes is ≤n/f(n). Step 2. An isomap-based algorithm. Wlog assume there is only one closed interval for support(F). We build a graph G on [n] so that two nodes bzi and bzj are connected if and only if ∥bzi −bzj∥≤ℓ/ p f(n), where ℓis a sufficiently large constant (say 10). Consider the shortest path distance between arbitrary pairs of nodes i and j (that are not eliminated.) Because the corrupted nodes are removed, the whole path is around C. Also, by the uniform density assumption, walking on the shortest path in G is equivalent to walking on C with “uniform speed”, i.e., each edge on the path will map to an approximately fixed distance on C. Thus, the shortest path distance scales with the latent distance, i.e., (d−1) c 2 1/∆ ℓ−3 √ f(n) 2/∆ ≤|xi −xj| ≤d c 2 1/∆ ℓ+8 √ f(n) 2/∆ , which implies Theorem 2.2 (cf. [19] for details). Discussion: “Gluing together” two algorithms? The unified model is much more flexible than SBM and SWM. We were intrigued that the generalized algorithm needs only to “glue together” important techniques used in both models: Step 1 uses the spectral technique inspired by SBM inference methods, while Step 2 resembles techniques used in SWM: the isomap G only connects between two nodes that are close, which is akin to throwing away the long-range edges. 4 Experiments We apply our algorithm to a social interaction graph from Twitter to construct users’ ideology scores. We assembled a dataset by tracking keywords related to the 2016 US presidential election for 10 million users. First, we note that as of 2016 the Twitter interaction graph behaves “in-between” the small-world and stochastic blockmodels (see Figure 4), i.e., the latent distributions are bi-modal but not as extreme as the SBM. Ground-truth data. Ideology scores of the US Congress (estimated by third parties [57]) are usually considered as a “ground-truth” dataset, e.g., [18]. We apply our algorithm and other baselines on Twitter data to estimate the ideology score of politicians (members of the 114th Congress), and 8 observe that our algorithm has the highest correlation with ground-truth. See Fig. 3. Beyond correlation, we also need to estimate the statistical significance of our estimates. We set up a linear model y ∼β1bx + β0, in which bx’s are our estimates and y’s are ground-truth. We use bootstrapping to compute the standard error of our estimator, and use the standard error to estimate the p-value of our estimator. The details of this experiment and additional empirical evaluation are available in [19]. Acknowlegments The authors thank Amazon for partly providing AWS Cloud Credits for this research. References [1] Paul W Holland, Kathryn Blackmond Laskey, and Samuel Leinhardt. Stochastic blockmodels: First steps. Social networks, 5(2):109–137, 1983. [2] Duncan J Watts and Steven H Strogatz. Collective dynamics of small-world networks. Nature, 393(6684):440–442, 1998. [3] Jon Kleinberg. The small-world phenomenon: An algorithmic perspective. In Proceedings of the thirtysecond annual ACM symposium on Theory of computing, pages 163–170. ACM, 2000. [4] Se-Young Yun and Alexandre Prouti`ere. Optimal cluster recovery in the labeled stochastic block model. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 965–973, 2016. [5] Elchanan Mossel, Joe Neeman, and Allan Sly. Reconstruction and estimation in the planted partition model. Probability Theory and Related Fields, 162(3-4):431–461, 2015. [6] Emmanuel Abbe and Colin Sandon. Detection in the stochastic block model with multiple clusters: proof of the achievability conjectures, acyclic BP, and the information-computation gap. arXiv preprint arXiv:1512.09080, 2015. [7] Emmanuel Abbe and Colin Sandon. Community detection in the general stochastic block model: Fundamental limits and efficient algorithms for recovery. In Proceedings of 56th Annual IEEE Symposium on Foundations of Computer Science, Berkely, CA, USA, pages 18–20, 2015. [8] Laurent Massouli´e. Community detection thresholds and the weak Ramanujan property. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 694–703. ACM, 2014. [9] Elchanan Mossel, Joe Neeman, and Allan Sly. A proof of the block model threshold conjecture. arXiv preprint arXiv:1311.4115, 2013. [10] Peter J. Bickel and Aiyou Chen. A nonparametric view of network models and newmangirvan and other modularities. Proceedings of the National Academy of Sciences, 106(50):21068–21073, 2009. [11] Jure Leskovec, Kevin J Lang, Anirban Dasgupta, and Michael W Mahoney. Statistical properties of community structure in large social and information networks. In Proceedings of the 17th international conference on World Wide Web, pages 695–704. ACM, 2008. [12] Mark EJ Newman and Michelle Girvan. Finding and evaluating community structure in networks. Physical review E, 69(2):026113, 2004. [13] Mark EJ Newman, Duncan J Watts, and Steven H Strogatz. Random graph models of social networks. Proceedings of the National Academy of Sciences, 99(suppl 1):2566–2572, 2002. [14] Frank McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529–537. IEEE, 2001. [15] Jure Leskovec, Kevin J Lang, and Michael Mahoney. Empirical comparison of algorithms for network community detection. In Proceedings of the 19th international conference on World wide web, pages 631–640. ACM, 2010. [16] Ittai Abraham, Shiri Chechik, David Kempe, and Aleksandrs Slivkins. Low-distortion inference of latent similarities from a multiplex social network. In SODA, pages 1853–1872. SIAM, 2013. [17] Pablo Barber´a. Birds of the Same Feather Tweet Together. Bayesian Ideal Point Estimation Using Twitter Data. 2012. 9 [18] Pablo Barber´a, John T. Jost, Jonathan Nagler, Joshua A. Tucker, and Richard Bonneau. Tweeting from left to right. Psychological Science, 26(10):1531–1542, 2015. [19] Cheng Li, Felix M. F. Wong, Zhenming Liu, and Varun Kanade. From which world is your graph? Available on Arxiv, 2017. [20] Peter D. Hoff, Adrian E. Raftery, and Mark S. Handcock. Latent space approaches to social network analysis. JOURNAL OF THE AMERICAN STATISTICAL ASSOCIATION, 97:1090–1098, 2001. [21] Edoardo M. Airoldi, David M. Blei, Stephen E. Fienberg, and Eric P. Xing. Mixed membership stochastic blockmodels. J. Mach. Learn. Res., 9:1981–2014, 2008. [22] Karl Rohe, Sourav Chatterjee, and Bin Yu. Spectral clustering and the high-dimensional stochastic blockmodel. The Annals of Statistics, 39(4):1878–1915, 2011. [23] Edo 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. [24] Sofia C. Olhede Patrick J. Wolfe. Nonparametric graphon estimation. 2013. [25] Minh Tang, Daniel L. Sussman, and Carey E. Priebe. Universally consistent vertex classification for latent positions graphs. Ann. Statist., 41(3):1406–1430, 06 2013. [26] Patrick J. Wolfe and David Choi. Co-clustering separately exchangeable network data. The Annals of Statistics, 42(1):29–63, 2014. [27] Varun Kanade, Elchanan Mossel, and Tselil Schramm. Global and local information in clustering labeled block models. IEEE Trans. Information Theory, 62(10):5906–5917, 2016. [28] Karl Rohe, Tai Qin, and Bin Yu. Co-clustering directed graphs to discover asymmetries and directional communities. Proceedings of the National Academy of Sciences, 113(45):12679–12684, 2016. [29] Sourav Chatterjee. Matrix estimation by universal singular value thresholding. Ann. Statist., 43(1):177– 214, 02 2015. [30] Jiaming Xu, Laurent Massouli´e, and Marc Lelarge. Edge label inference in generalized stochastic block models: from spectral theory to impossibility results. In Maria Florina Balcan, Vitaly Feldman, and Csaba Szepesvri, editors, Proceedings of The 27th Conference on Learning Theory, volume 35 of Proceedings of Machine Learning Research, pages 903–920, Barcelona, Spain, 13–15 Jun 2014. PMLR. [31] K. T. Poole and H. Rosenthal. A spatial model for legislative roll call analysis. American Journal of Political Science, 29(2):357–384, 1985. [32] M. Laver, K. Benoit, and J. Garry. Extracting policy positions from political texts using words as data. American Political Science Review, 97(2), 2003. [33] J. Clinton, S. Jackman, and D. Rivers. The statistical analysis of roll call data. American Political Science Review, 98(2):355–370, 2004. [34] S. Gerrish and D. Blei. How the vote: Issue-adjusted models of legislative behavior. In Proc. NIPS, 2012. [35] S. Gerrish and D. Blei. Predicting legislative roll calls from text. In Proc. ICML, 2011. [36] J. Grimmer and B. M. Stewart. Text as data: The promise and pitfalls of automatic content analysis methods for political texts. Political Analysis, 2013. [37] Emmanuel Abbe. Community detection and the stochastic block model. 2016. [38] Joel A. Tropp. User-friendly tail bounds for sums of random matrices. Foundations of Computational Mathematics, 12(4):389–434, 2012. [39] C. Davis and W. M. Kahan. The rotation of eigenvectors by a perturbation. SIAM J. Numer. Anal., 7:1–46, 1970. [40] Piotr Indyk and Jiri Matouˇsek. Low-distortion embeddings of finite metric spaces. Handbook of discrete and computational geometry, page 177, 2004. [41] Yunpeng Zhao, Elizaveta Levina, and Ji Zhu. Consistency of community detection in networks under degree-corrected stochastic block models. Ann. Statist., 40(4):2266–2292, 08 2012. 10 [42] Tai Qin and Karl Rohe. Regularized spectral clustering under the degree-corrected stochastic blockmodel. In C.j.c. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K.q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 3120–3128. 2013. [43] Inderjit S. Dhillon. Co-clustering documents and words using bipartite spectral graph partitioning. In Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’01, pages 269–274, New York, NY, USA, 2001. ACM. [44] T. Zhou, J. Ren, M. Medo, and Y.-C. Zhang. Bipartite network projection and personal recommendation. 76(4):046115, October 2007. [45] Felix Ming Fai Wong, Chee-Wei Tan, Soumya Sen, and Mung Chiang. Quantifying political leaning from tweets, retweets, and retweeters. IEEE Trans. Knowl. Data Eng., 28(8):2158–2172, 2016. [46] H. K¨onig. Eigenvalue Distribution of Compact Operators. Operator Theory: Advances and Applications. Birkh¨auser, 1986. [47] Milena Mihail and Christos Papadimitriou. On the eigenvalue power law. In International Workshop on Randomization and Approximation Techniques in Computer Science, pages 254–262. Springer, 2002. [48] Mihai Badoiu, Julia Chuzhoy, Piotr Indyk, and Anastasios Sidiropoulos. Low-distortion embeddings of general metrics into the line. In Proceedings of the 37th Annual ACM Symposium on Theory of Computing, Baltimore, MD, USA, May 22-24, 2005, pages 225–233, 2005. [49] I. Borg and P.J.F. Groenen. Modern Multidimensional Scaling: Theory and Applications. Springer, 2005. [50] Piotr Indyk and Jiri Matousek. Low-distortion embeddings of finite metric spaces. In in Handbook of Discrete and Computational Geometry, pages 177–196. CRC Press, 2004. [51] Bernhard Scholkopf and Alexander J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press, Cambridge, MA, USA, 2001. [52] Lorenzo Rosasco, Mikhail Belkin, and Ernesto De Vito. On learning with integral operators. J. Mach. Learn. Res., 11:905–934, March 2010. [53] Joshua B. Tenenbaum, Vin de Silva, and John C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319, 2000. [54] Vin De Silva and Joshua B. Tenenbaum. Global versus local methods in nonlinear dimensionality reduction. In Advances in Neural Information Processing Systems 15, pages 705–712. MIT Press, 2003. [55] Mark EJ Newman. Finding community structure in networks using the eigenvectors of matrices. Physical review E, 74, 2006. [56] U. N. Raghavan, R. Albert, and S. Kumara. Near linear time algorithm to detect community structures in large-scale networks. Physical Review E, 76(3), 2007. [57] Joshua Tauberer. Observing the unobservables in the us congress. Law Via the Internet, 2012. 11 | 2017 | 477 |
6,982 | An Empirical Bayes Approach to Optimizing Machine Learning Algorithms James McInerney Spotify Research 45 W 18th St, 7th Floor New York, NY 10011 jamesm@spotify.com Abstract There is rapidly growing interest in using Bayesian optimization to tune model and inference hyperparameters for machine learning algorithms that take a long time to run. For example, Spearmint is a popular software package for selecting the optimal number of layers and learning rate in neural networks. But given that there is uncertainty about which hyperparameters give the best predictive performance, and given that fitting a model for each choice of hyperparameters is costly, it is arguably wasteful to “throw away” all but the best result, as per Bayesian optimization. A related issue is the danger of overfitting the validation data when optimizing many hyperparameters. In this paper, we consider an alternative approach that uses more samples from the hyperparameter selection procedure to average over the uncertainty in model hyperparameters. The resulting approach, empirical Bayes for hyperparameter averaging (EB-Hyp) predicts held-out data better than Bayesian optimization in two experiments on latent Dirichlet allocation and deep latent Gaussian models. EB-Hyp suggests a simpler approach to evaluating and deploying machine learning algorithms that does not require a separate validation data set and hyperparameter selection procedure. 1 Introduction There is rapidly growing interest in using Bayesian optimization (BayesOpt) to tune model and inference hyperparameters for machine learning algorithms that take a long time to run (Snoek et al., 2012). Tuning algorithms by grid search is a time consuming task. Tuning by hand is also time consuming and requires trial, error, and expert knowledge of the model. To capture this knowledge, BayesOpt uses a performance model (usually a Gaussian process) as a guide to regions of hyperparameter space that perform well. BayesOpt balances exploration and exploitation to decide which hyperparameter to evaluate next in an iterative procedure. BayesOpt for machine learning algorithms is a form of model selection in which some objective, such as predictive likelihood or root mean squared error, is optimized with respect to hyperparameters η. Thus, it is an empirical Bayesian procedure where the marginal likelihood is replaced by a proxy objective. Empirical Bayes optimizes the marginal likelihood of data set X (a summary of symbols is provided in Table 1), ˆη := arg max η Ep(θ | η)[p(X | θ)], (1) then uses p(θ | X, ˆη) as the posterior distribution over the unknown model parameters θ (Carlin and Louis, 2000). Empirical Bayes is applied in different ways, e.g., gradient-based optimization of Gaussian process kernel parameters, optimization of hyperparameters to conjugate priors in variational inference. What is special about BayesOpt is that it performs empirical Bayes in a way 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 0 20 40 60 80 100 120 iteration ordered by valiation error 0 200000 400000 600000 800000 1000000 1200000 negative log lik on validation data (a) Negative log likelihood on validation data 0 20 40 60 80 100 120 iteration ordered by valiation error 0 200000 400000 600000 800000 1000000 1200000 1400000 negative log lik on test data (b) Negative log likelihood on test data Figure 1: Performance in negative logarithm of the predictive likelihood for the validation data (left plot) and test data (right plot) ordered by validation error. Each iteration represents a different hyperparameter setting. Table 1: Summary of Symbols Symbol Meaning θ the model parameters η the hyperparameters λ the hyper-hyperparameters ˆη the hyperparameters fit by empirical Bayes ˆλ the hyper-hyperparameters fit by empirical Bayes X the dataset X∗ unseen data that requires calculating the posterior p(θ | X, η(s)) for each member in a sequence 1, . . . , S of candidate hyperparameters η(1), η(2), . . . , η(S). Often these posteriors are approximate, such as a point estimate, a Monte Carlo estimate, or a variational approximation. Nonetheless, these operations are usually expensive to compute. Therefore, what is surprising about BayesOpt for approximate inference is that it disregards most of the computed posteriors and keeps only the posterior p(θ | X, ˆη) that optimizes the marginal likelihood. It is surprising because the intermediate posteriors have something to say about the data, even if they condition on hyperparameter configurations that do not maximize the marginal likelihood. In other words, when we harbour uncertainty about η, should we be more Bayesian? We argue for this approach, especially if one believes there is a danger of overfitting η on the validation set, which is especially the case as the dimensionality of the hyperparameters grows. As an illustrative example, Figure 1 shows the predictive performance of a set of 115 posteriors (each corresponding to a different hyperparameter) of latent Dirichlet allocation on validation data and testing data. Overfitting validation means that the single best posterior would not be selected as the final answer in BayesOpt. Bayes empirical Bayes (Carlin and Louis, 2000) extends the empirical Bayes paradigm by introducing a family of hyperpriors p(η | λ) indexed by λ and calculates the posterior over the model parameters by integrating, p(θ | X, λ) = Ep(η | X,λ)[p(θ | X, η)]. (2) This leads to the question of how to select the hyper-hyperparameter λ. A natural answer is a hierarchical empirical Bayes approach where λ is maximized1, ˆλ = arg max λ Ep(η | λ)Ep(θ | η)[p(X | θ, η)], (3) 1this approach could also be called type-III maximum likelihood because it involves marginalizing over model parameters θ, hyperparameters η, and maximizing hyper-hyperparameters λ. 2 and p(θ | X, ˆλ) is used as the posterior. Comparing Eq. 3 to Eq. 1 highlights that we are adding an extra layer of marginalization that can be exploited with the intermediate posteriors in hand. Note the distinction between marginalizing the hyperparameters to the model vs. hyperparameters to the Gaussian process of model performance. Eq. 3 describes the former; the latter is already a staple of BayesOpt (Osborne, 2010). In this paper, we present empirical Bayes for hyperparameter averaging (EB-Hyp), an extension to BayesOpt that makes use of this hierarchical approach to incorporate the intermediate posteriors in an approximate predictive distribution over unseen data X∗. The Train-Marginalize-Test Pipeline EB-Hyp is an alternative procedure for evaluating and deploying machine learning algorithms that reduces the need for a separate validation data set. Validation data is typically used to avoid overfitting. Overfitting is a danger in selecting both parameters and hyperparameters. The state of the art provides sophisticated ways of regularizing or marginalizing over parameters to avoid overfitting on training data. But there is no general method for regularizing hyperparameters and typically there is a requirement of conjugacy or continuity in order to simultaneously fit parameters and hyperparameters in the same training procedure. Therefore, the standard practice for dealing with the hyperparameters of machine learning models and algorithms is to use a separate validation data set (Murphy, 2012). One selects the hyperparameter that results in the best performance on validation data after fitting the training data. The best hyperparameter and corresponding posterior are then applied to a held-out test data set and the resulting performance is the final estimate of the generalization performance of the entire system. This practice of separate validation has carried over to BayesOpt. EB-Hyp avoids overfitting training data through marginalization and allows us to train, marginalize, and test without a separate validation data set. It consists of three steps: 1. Train a set of parameters on training data Xtrain, each one conditioned on a choice of hyperparameter. 2. Marginalize the hyperparameters out of the set of full or approximate posteriors. 3. Test (or Deploy) the marginal predictive distribution on test data Xtest and report the performance. In this paper, we argue in favour of this framework as a way of simplifying the evaluation and deployment pipeline. We emphasize that the train step admits a broad category of posterior approximation methods for a large number of models, including maximum likelihood, maximum a posteriori, variational inference, or Markov chain Monte Carlo. In summary, our contributions are the following: • We highlight the three main shortcomings of the current prevalent approach to tuning hyperparameters of machine learning algorithms (computationally wasteful, potentially overfitting validation, added complexity of a separate validation data set) and propose a new empirical Bayes procedure, EB-Hyp, to address those issues. • We develop an efficient algorithm to perform EB-Hyp using Monte Carlo approximation to both sample hyperparameters from the marginal posterior and to optimize over the hyper-hyperparameters. • We apply EB-Hyp to two models and real world data sets, comparing to random search and BayesOpt, and find a significant improvement in held out predictive likelihood validating the approach and approximation in practice. 2 Related Work Empirical Bayes has a long history started by Robbins (1955) with a nonparametric approach, to parametric EB (Efron and Morris, 1972) and modern applications of EB (Snoek et al., 2012; Rasmussen and Williams, 2006). Our work builds on these hierarchical Bayesian approaches. BayesOpt uses a GP to model performance of machine learning algorithms. A previous attempt at reducing the wastefulness of BayesOpt has focused on directing computational resources toward 3 more optimal regions of hyperparameter space (Swersky et al., 2014). Another use of the GP as a performance model arises in Bayesian quadrature, which uses a GP to approximately marginalize over parameters (Osborne et al., 2012). However, quadrature is computationally infeasible for forming a predictive density after marginalizing hyperparameters because that requires knowing p(θ | X, η) for the whole space of η. In contrast, the EB-Hyp approximation depends on the posterior only at the sampled points, which has already been calculated to estimate the marginals. Finally, EB-Hyp resembles ensemble methods, such as boosting and bagging, because it is a weighted sum over posteriors. Boosting trains models on data reweighted to emphasize errors from previous models (Freund et al., 1999) while bagging takes an average of models trained on bootstrapped data (Breiman, 1996). 3 Empirical Bayes for Hyperparameter Averaging As introduced in Section 1, EB-Hyp adds another layer in the model hierarchy with the addition of a hyperprior p(η | λ). The Bayesian approach is to marginalize over η but, as usual, the question of how to select the hyper-hyperparameter λ lingers. Empirical Bayes provides a response to the selection of hyperprior in the form a maximum marginal likelihood approach (see Eq. 3). It is useful to incorporate maximization into the posterior approximation when tuning machine learning algorithms because of the small number of samples we can collect (due to the underlying assumption that the inner training procedure is expensive to run). Our starting point is to approximate the posterior predictive distribution under EB-Hyp using Monte Carlo samples of η(s) ∼p(η | X, ˆλ), p(X∗| X) ≈1 S S X s=1 Ep(θ | X,η(s))[p(X∗| θ, η(s))] (4) for a choice of hyperprior p(η | λ). There are two main challenges that Eq. 4 presents. The first is that the marginal posterior p(η | X, ˆλ) is not readily available to sample from. We address this in Section 3.1. The second is the choice of hyperprior p(η | λ) and how to find ˆλ. We describe our approach to this in Section 3.2. 3.1 Acquisition Strategy The acquisition strategy describes which hyperparameter to evaluate next during tuning. A naïve way to choose evaluation point η is to sample from the uniform distribution or the hyperprior. However, this is likely to select a number of points where p(X|η, λ) has low density, squandering computational resources. BayesOpt addresses this by using an acquisition function conditioned on the current performance model posterior then maximizing this function to select the next evaluation point. BayesOpt offers several choices for the acquisition function. The most prominent are expected improvement, upper confidence bound, and Thompson sampling (Brochu et al., 2010; Chapelle and Li, 2011). Expected improvement and the upper confidence bound result in deterministic acquisition functions and are therefore hard to incorporate into Eq. 4, which is a Monte Carlo average. In contrast, Thompson sampling is a stochastic procedure that is competitive with the non-stochastic procedures (Chapelle and Li, 2011), so we use it as a starting point for our acquisition strategy. Thompson sampling maintains a model of rewards for actions performed in an environment and repeats the following for iteration s = 1, . . . , S: 1. Draw a simulation of rewards from the current reward posterior conditioned on the history r(s) ∼p(r | {η(t), f (t) | t < s}). 2. Choose the action that gives the maximum reward in the simulation η(s) = arg maxη r(s)(η). 3. Observe reward f (s) from the environment for performing action η(s). 4 Thompson sampling balances exploration with exploitation because actions with large posterior means and actions with high variance are both more likely to appear as the optimal action in the sample r(s). However, the arg max presents difficulties in the reweighting required to perform Bayes empirical Bayes approaches. We discuss these difficulties in more depth in Section 3.2. Furthermore, it is unclear exactly what the sample set {η(1), . . . , η(S)} represents. This question becomes pertinent when we care about more than just the optimal hyperparameter. To address these issues, we next present a procedure that generalizes Thompson sampling when it is used for hyperparameter tuning. Performance Model Sampling Performance model sampling is based on the idea that the set of simulated rewards r(s) can themselves be treated as a probability distribution of hyperparameters, from which we can also draw samples. In a hyperparameter selection context, let ˜p(s)(X | η) ≡r(s), the marginal likelihood. The procedure repeats for iterations s = 1, . . . , S: 1. draw ˜p(s)(X | η) ∼P(p(X | η) | {η(t), f (t) X | t < s}) 2. draw η(s) ∼˜p(s)(η | X) 3. evaluate f (s) X = Z p(X | θ)p(θ | η(s))dθ where ˜p(s)(η | X) := Z−1˜p(s)(X | η)p(η) (5) where P is the performance model distribution and Z is the normalization constant.2 The marginal likelihood p(X | η(s)) may be evaluated exactly (e.g., Gaussian process marginal given kernel hyperparameters) or estimated using methods that approximate the posterior p(θ | X, η(s)) such as maximum likelihood estimation, Markov chain Monte Carlo sampling, or variational inference. Thompson sampling is recovered from performance model sampling when the sample in Step 2 of Eq. 5 is replaced with the maximum a posteriori approximation (with a uniform prior over the bounds of the hyperparameters) to select where to obtain the next hyperparameter sample η(s). Given the effectiveness of Thompson sampling in various domains (Chapelle and Li, 2011), this is likely to work well for hyperparameter selection. Furthermore, Eq. 5 admits a broader range of acquisition strategies, the simplest being a full sample. And importantly, it allows us to consider the convergence of EB-Hyp. The sample ˜p(s)(X | η) of iteration s from the procedure in Eq. 5 converges to the true probability density function p(X|η) as s →∞under the assumptions that p(X|η) is smooth and the performance model P is drawn from a log Gaussian process with smooth mean and covariance over a finite input space. Consistency of the Gaussian process in one dimension has been shown for fixed Borel probability measures (Choi and Schervish, 2004). Furthermore, rates of convergence are favourable for a variety of covariance functions using the log Gaussian process for density estimation (van der Vaart and van Zanten, 2008). Performance model sampling additionally changes the sampling distribution of η on each iteration. Simulation ˜p(s)(η | X) from the posterior of P conditioned on the evaluation history has non-zero density wherever the prior p(η) is non-zero by the definition of ˜p(s)(η | X) in Eq. 5 and the fact that draws from a log Gaussian process are non-zero. Therefore, as s →∞, the input-output set {η(t), f (t) X | t < s} on which P is conditioned will cover the input space. It follows from the above discussion that the samples {η(s) | s ∈[1, S]} from the procedure in Eq. 5 converge to the posterior distribution p(η | X) as S →∞. Therefore, the sample ˜p(s)(X | η) converges to the true pdf p(X | η) as s →∞. Since {η(s) | s ∈[1, S]} is sampled independently from {˜p(s)(X | η) | s ∈[1, S]} (respectively), the set of samples therefore tends to p(η | X) as S →∞. A key limitation to the above discussion for continuous hyperparameters is the assumption that the true marginal p(X | η) is smooth. This may not always be the case, for example an infinitesimal change in the learning rate for gradient descent on a non-convex objective could result in finding a completely different local optimum. This affects asymptotic convergence but discontinuities in the 2Z can be easily calculated if η is discrete or if p(η) is conjugate to p(X | η). In non-conjugate continuous cases, η may be discretized to a high granularity. Since EB-Hyp is an active procedure, the limiting computational bottleneck is to calculate the posterior of the performance model. For GPs, this is an O(S3) operation in the number of hyperparameter evaluations S. If onerous, the operation is amenable to well established fast approximations, e.g,. the inducing points method (Hensman et al., 2013). 5 1 inputs training data Xtrain and inference algorithm A : (X, η) →p(θ | X, η) 2 output predictive density p(X∗| Xtrain) 3 initialize evaluation history V = {} 4 while V not converged do 5 draw performance function from GP posterior ˜p(s)(X | η) ∼GP(· | V ) 6 calculate hyperparameter posterior ˜p(s)(η | X) := Z−1˜p(s)(X | η)p(η) 7 draw next evaluation point η(s) := arg maxη ˜p(s)(η | X) 8 run parameter inference conditioned on hyperparameter p(θ | η(s)) := A(Xtrain, η(s)) 9 evaluate performance f (s) X := R p(Xtrain | θ)p(θ | η(s))dθ 10 append (η(s), f (s) X ) to history V 11 end 12 find optimal ˆλ using Eq. 3 (discussed in Section 3.2) 13 return: approximation to p(X∗| Xtrain) using Eq. 4 Algorithm 1: Empirical Bayes for hyperparameter averaging (EB-Hyp) Table 2: Predictive log likelihood for latent Dirichlet allocation (LDA), 20 Newsgroup dataset Method Predictive Log Lik. (% Improvement on BayesOpt) BayesOpt with validation -357648 (0.00%) without validation -361661 (-1.12%) EB-Hyp with validation -357650 (-0.00%) without validation -351911 (+1.60%) Random -2666074 (-645%) marginal likelihood are not likely to affect the outcome at the scale number of evaluations typical in hyperparameter tuning. Importantly, the smoothness assumption does not pose a problem to discrete hyperparameters (e.g., number of units in a hidden layer). Another limitation of performance model sampling is that it focuses on the marginal likelihood as the metric to be optimized. This is less of a restriction as it may first appear. Various performance metrics are often equivalent or approximations to a particular likelihood, e.g., mean squared error is the negative log likelihood of a Gaussian-distributed observation. 3.2 Weighting Strategy Performance model sampling provides a set of hyperparameter samples, each with a performance f (s) X and a computed posterior p(θ | X, η(s)). These three elements can be combined in a Monte Carlo average to provide a prediction over unseen data or a mean parameter value. Following from Section 3.1, the samples of η from Eq. 5 converge to the distribution of p(η | X, λ). A standard Bayesian treatment of the hierarchical model requires selecting a fixed λ, equivalent to a predetermined weighted or unweighted average of the models of a BayesOpt run. However, we found that fixing λ is not competitive with approaches to hyperparameter tuning that involve some maximization. This is likely to arise from the small number of samples collected during tuning (recall that collecting more samples involves new entire runs of parameter training and is usually computationally expensive). The empirical Bayes selection of ˆλ selects the best hyper-hyperparameter and reintroduces maximization in a way that makes use of the intermediate posteriors during tuning, as in Eq. 4. In addition, it uses hyper-hyperparameter optimization to find ˆλ. This depends on the choice of hyperprior. There is flexibility in this choice; we found that a nonparametric hyperprior that places a uniform distribution over the top T < S samples (by value of fX(η(t))) from Eq. 4 works well in practice, and this is what we use in Section 4 with T = ⌊S 10⌋. This choice of hyperprior avoids converging on a point mass in the limit of infinite sized data X and forces the approximate marginal to spread probability 6 Table 3: Predictive log lik. for deep latent Gaussian model (DLGM), Labeled Faces in the Wild Method Predictive Log Lik. (% Improvement on BayesOpt) BayesOpt with validation -17071 (0.00%) without validation -15970 (+6.45%) EB-Hyp with validation -16375 (+4.08%) without validation -15872 (+7.02%) Random -17271 (-1.17%) mass across a well-performing set of models, any one of which is likely to dominate the prediction for any given data point (though, importantly, it will not always be the same model). After the Markov chain in Eq. 5 converges, the samples {η(s) | s = 1, . . . , S} and the (approximated) posteriors p(θ | X, η(s)) can be used in Eq. 4. The EB-Hyp algorithm is summarized in Algorithm 1. The dominating computational cost comes from running inference to evaluate A(Xtrain, η(s)). All the other steps combined are negligible in comparison. 4 Experiments We apply EB-Hyp and BayesOpt to two approximate inference algorithms and data sets. We also apply uniform random search, which is known to outperform a grid or manual search (Bergstra and Bengio, 2012). In the first experiment, we consider stochastic variational inference on latent Dirichlet allocation (SVI-LDA) applied to the 20 Newsgroups data.3 In the second, a deep latent Gaussian model (DLGM) on the Labeled Faces in the Wild data set (Huang et al., 2007). We find that EB-Hyp outperforms BayesOpt and random search as measured by predictive likelihood. For the performance model, we use the log Gaussian process in our experiments implemented in the GPy package (GPy, 2012). The performance model uses the Matérn 32 kernel to express the assumption that nearby hyperparameters typically perform similarly; but this kernel has the advantage of being less smooth than the squared exponential, making it more suitable to capture abrupt changes in the marginal likelihood (Stein, 1999). Between each hyperparameter sample, we optimize the kernel parameters and the independent noise distribution for the observations so far by maximizing the marginal likelihood of the Gaussian process. Throughout, we randomly split the data into training, validation, and test sets. To assess the necessity of a separate validation set we consider two scenarios: (1) training and validating on the train+validation data, (2) training on the train data and validating on the validation data. In either case, the test data is used only at the final step to report overall performance. 4.1 Latent Dirichlet Allocation Latent Dirichlet allocation (LDA) is an unsupervised model that finds topic structure in a set of text documents expressed as K word distributions (one per topic) and D topic distributions (one per document). We apply stochastic variational inference to LDA (Hoffman et al., 2013), a method that approximates the posterior over parameters p(θ |X, η) in Eq. 4 with variational distribution q(θ |v, η). The algorithm minimizes the KL divergence between q and p by adjusting the variational parameters. We explored four hyperparameters of SVI-LDA in the experiments: K ∈[50, 200], the number of topics; log(α) ∈[−5, 0], the hyperparameter to the Dirichlet document-topic prior; log(η) ∈ [−5, 0], the hyperparameter to the Dirichlet topic-word distribution prior; κ ∈[0.5, 0.9], the decay parameter to the learning rate (t0 + t)−κ, where t0 was fixed at 10 for this experiment. Several other hyperparameters are required and were kept fixed during the experiment. The minibatch size was fixed at 100 documents and the vocabulary was selected from the top 1,000 words, excluding stop words, words that appear in over 95% of documents, and words that appear in only one document. 3http://qwone.com/~jason/20Newsgroups/ 7 5 4 3 2 1 0 log(alpha) 5 4 3 2 1 0 log(eta) Figure 2: A 2D slice of the performance model posterior after a run of EB-Hyp on LDA. The two hyperparameters control the sparsity of the Dirichlet priors. The plot indicates a negative relationship between them. The 11,314 resulting documents were randomly split 80%-10%-10% into training, validation, and test sets. Table 2 shows performance in log likelihood on the test data of the two approaches. The percentage change over the BayesOpt benchmark is reported in parentheses. EB-Hyp performs significantly better than BayesOpt in this problem. To understand why, Figure 1 examines the error (negative log likelihood) on both the validation and test data for all the hyperparameters selected during BayesOpt. In the test scenario, BayesOpt chooses the hyperparameters corresponding to the left-most bar in Figure 1b because those hyperparameters minimized error on the validation set. However, Figure 1b shows that other hyperparameter settings outperform this selection when testing. For finite validation data, there is no way of knowing how the optimal hyperparameter will behave on test data before seeing it, motivating an averaging approach like EB-Hyp. In addition, Table 2 shows that a separate validation data set is not necessary with EB-Hyp. In contrast, BayesOpt does need separate validation and overfits the training data without it. Figure 2 shows a slice of the posterior mean function of the performance model for two of the hyperparameters, α and η, controlling the sparsity of the document-topics and the topic-word distributions, respectively. There is a negative relationship between the two hyperparameters, meaning that the sparser we make the topic distribution for documents, the denser we need to make the word distribution for topics to maintain the same performance (and vice versa). EB-Hyp combines several models of different degrees of sparsity in a way that respects this trade-off. 4.2 Supervised Deep Latent Gaussian Models Stochastic backpropagation for deep latent Gaussian models (DLGMs) approximates the posterior of an unsupervised deep model using variational inference and stochastic gradient ascent (Rezende et al., 2014). In addition to a generator network, a recognition network is introduced that amortizes inference (i.e., once trained, the recognition network finds variational parameters for new data in a closed-form expression). In this experiment, we use an extension of the DLGM with supervision (Li et al., 2015) to perform label prediction on a subset of the Labeled Faces in the Wild data set (Huang et al., 2007). The data consist of 1,288 images of 1,850 pixels each, split 60%-20%-20% into training, validation, and test data (respectively). We considered 4 hyperparameters for the DLGM with a one-layered recognition model: N1 ∈ [10, 200], the number of hidden units in the first layer of the generative and recognition models; N2 ∈[0, 200], the number of hidden units in the second layer of the generative model only (when N2 = 0, only one layer is used); log(κ) ∈[−5, −0.05], the variance of the prior of the weights in the generative model; and log(ρ) ∈[−5, −0.05], the gradient ascent step size. Table 3 shows performance for the DLGM. The single best performing hyperparameters were (N1 = 91, N2 = 86, log(κ) = −5, log(ρ) = −5). We find again that, EB-Hyp outperforms all the other methods on test data. This is achieved without validation. 8 5 Conclusions We introduced a general-purpose procedure for dealing with unknown hyperparameters that control the behaviour of machine learning models and algorithms. Our approach is based on approximately marginalizing the hyperparameters by taking a weighted average of posteriors calculated by existing inference algorithms that are time intensive. To do this, we introduced a procedure for sampling informative hyperparameters from a performance model. Our approaches are supported by an efficient algorithm. In two sets of experiments, we found this algorithm outperforms optimization and random approaches. The arguments and evidence presented in this paper point toward a tendency of the standard optimization-based methodologies to overfit hyperparameters. Other things being equal, this tendency punishes (in reported performance on test data) methods that are more sensitive to hyperparameters compared to methods that are less sensitive. The result is a bias in the literature towards methods whose generalization performance is less sensitive to hyperparameters. Averaging approaches like EB-Hyp help reduce this bias. Acknowledgments Many thanks to Scott Linderman, Samantha Hansen, Eric Humphrey, Ching-Wei Chen, and the reviewers of the workshop on Advances in Approximate Bayesian Inference (2016) for their insightful comments and feedback. References Bergstra, J. and Bengio, Y. (2012). Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13, 281–305. Breiman, L. (1996). Bagging predictors. Machine learning, 24(2), 123–140. Brochu, E., Cora, V. M., and De Freitas, N. (2010). A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv preprint arXiv:1012.2599. Carlin, B. P. and Louis, T. A. (2000). Empirical Bayes: Past, present and future. Journal of the American Statistical Association, 95(452), 1286–1289. Chapelle, O. and Li, L. (2011). An empirical evaluation of Thompson sampling. In Advances in Neural Information Processing Systems, pages 2249–2257. Choi, T. and Schervish, M. J. (2004). Posterior consistency in nonparametric regression problems under gaussian process priors. Efron, B. and Morris, C. (1972). Limiting the risk of Bayes and empirical Bayes estimators—Part II: The empirical Bayes case. Journal of the American Statistical Association, 67(337), 130–139. Freund, Y., Schapire, R., and Abe, N. (1999). A short introduction to boosting. Journal-Japanese Society For Artificial Intelligence, 14(771-780), 1612. GPy (2012). GPy: A Gaussian process framework in Python. http://github.com/SheffieldML/GPy. Hensman, J., Fusi, N., and Lawrence, N. D. (2013). Gaussian processes for big data. arXiv preprint arXiv:1309.6835. Hoffman, M. D., Blei, D. M., Wang, C., and Paisley, J. W. (2013). Stochastic variational inference. Journal of Machine Learning Research, 14(1), 1303–1347. Huang, G. B., Ramesh, M., Berg, T., and Learned-Miller, E. (2007). Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst. Li, C., Zhu, J., Shi, T., and Zhang, B. (2015). Max-margin deep generative models. In Advances in Neural Information Processing Systems, pages 1837–1845. Murphy, K. P. (2012). Machine learning: a probabilistic perspective. MIT press. 9 Osborne, M. (2010). Bayesian Gaussian Processes for Sequential Prediction, Optimisation and Quadrature. Ph.D. thesis, PhD thesis, University of Oxford. Osborne, M., Garnett, R., Ghahramani, Z., Duvenaud, D. K., Roberts, S. J., and Rasmussen, C. E. (2012). Active Learning of Model Evidence Using Bayesian Quadrature. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 46–54. Curran Associates, Inc. Rasmussen, C. E. and Williams, C. K. (2006). Gaussian processes for machine learning. the MIT Press, 2(3), 4. Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of The 31st International Conference on Machine Learning, pages 1278–1286. Robbins, H. (1955). The empirical Bayes approach to statistical decision problems. In Herbert Robbins Selected Papers, pages 49–68. Springer. Snoek, J., Larochelle, H., and Adams, R. P. (2012). Practical Bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pages 2951–2959. Stein, M. L. (1999). Interpolation of spatial data: some theory for kriging. Springer Science & Business Media. Swersky, K., Snoek, J., and Adams, R. P. (2014). Freeze-thaw bayesian optimization. arXiv preprint arXiv:1406.3896. van der Vaart, A. W. and van Zanten, J. H. (2008). Rates of contraction of posterior distributions based on Gaussian process priors. The Annals of Statistics, pages 1435–1463. 10 | 2017 | 478 |
6,983 | Multiscale Quantization for Fast Similarity Search Xiang Wu Ruiqi Guo Ananda Theertha Suresh Sanjiv Kumar Dan Holtmann-Rice David Simcha Felix X. Yu Google Research, New York {wuxiang, guorq, theertha, sanjivk, dhr, dsimcha, felixyu}@google.com Abstract We propose a multiscale quantization approach for fast similarity search on large, high-dimensional datasets. The key insight of the approach is that quantization methods, in particular product quantization, perform poorly when there is large variance in the norms of the data points. This is a common scenario for realworld datasets, especially when doing product quantization of residuals obtained from coarse vector quantization. To address this issue, we propose a multiscale formulation where we learn a separate scalar quantizer of the residual norm scales. All parameters are learned jointly in a stochastic gradient descent framework to minimize the overall quantization error. We provide theoretical motivation for the proposed technique and conduct comprehensive experiments on two large-scale public datasets, demonstrating substantial improvements in recall over existing state-of-the-art methods. 1 Introduction Large-scale similarity search is central to information retrieval and recommendation systems for images, audio, video, and textual information. For high-dimensional data, several hashing based methods have been proposed, including randomized [19, 1, 32] and learning-based techniques [34, 35, 15]. Another set of techniques, based on quantization, have become popular recently due to their strong performance on real-world data. In particular, product quantization (PQ) [12, 20] and its variants have regularly claimed top spots on public benchmarks such as GIST1M, SIFT1B [20] and DEEP10M [3]. In product quantization, the original vector space is decomposed into a Cartesian product of lower dimensional subspaces, and vector quantization is performed in each subspace independently. Vector quantization (VQ) approximates a vector x 2 Rdim(x) by finding the closest quantizer in a codebook C: φV Q(x; C) = argmin c2{Cj} kx −ck2 where C 2 Rdim(x)⇥m is a vector quantization codebook with m codewords, and the j-th column Cj represents the j-th quantizer. Similarly, product quantization (PQ) with K subspaces can be defined as following concatenation: φP Q(x; S = {S(k)}) = [φV Q(x(1); S(1)); · · · ; φV Q(x(K); S(K))] (1) where x(k) denotes the subvector of x in the k-th subspace, and S(k) 2 Rdim(x(k))⇥l is a collection of K product quantization codebooks, each with l sub-quantizers. Product quantization works well in large part due to the fact that it permits asymmetric distance computation [20], in which only dataset vectors are quantized while the query remains unquantized. This is more precise than techniques based on Hamming distances (which generally require hashing 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) ! "# 2 / ' "# 2 2 1/2 (b) Figure 1: Variance in data point norms poses a challenge to product quantization. (a) PQ quantization error on a synthetic dataset X 2 Rd⇥N grows as the standard deviation of data point norms σ(kxk2) increases. The mean of the dataset is zero µ(x) = 0, and the average squared norm is fixed, µ(kxk2 2) = 1. In both settings, m = 16 codes are generated per data point and one with l = 16 sub-quantizers per subspace, the other with l = 256. (b) Ratio between the standard deviation σ(krxk2) and normalization factor p µ(krxk2 2), where rx represents the residual after vector (coarse) quantization on the real-world dataset of SIFT1M. the query), while still being efficient to compute using lookup table operations. We will give a more detailed background on product quantization variants in Section 1.2. 1.1 Motivation of Multiscale Empirically, product quantization works the best when the variance in each subspace is roughly balanced [20]. To ensure this, a rotation matrix is often applied to the data prior to performing quantization. This rotation can be either random [20] or learned [11, 30, 39]. In this work, however, we argue that the quality of the product quantization codebook also degenerates when there is variance in the norms of the data points being encoded–even when the variance is relatively moderate. We illustrate this point by generating synthetic datasets such that: (1) the dataset mean is zero; (2) data point direction is chosen uniformly at random; (3) the average squared norm of the data points is fixed. In Figure 1a, we plot quantization error (MSE) of product quantization against the standard deviation of the norms of the data points. Clearly, quantization error increases with the variance of the data point norms. In real-world settings (Figure 1b), the residuals of a coarse vector quantization of the data also tend to have highly varying norms. To compensate for the case when there is large variance in norms, we modify the formulation of product quantization by separately scalar quantizing data point norms, and then unit-normalizing the data points before applying product quantization. When computing asymmetric distances, this simply requires a scalar multiplication of the PQ codebook once per scalar quantizer, which has negligible computational cost in practice. To scale quantization based search techniques to massive datasets, a popular strategy is to first vector quantize the input vectors in the original space (coarse quantization), and then apply product quantization on the vector quantization residuals [20]. However, in such a ‘VQ-PQ’ style approach, the norms of the residuals exhibit significant variance. Therefore, the proposed multiscale approach provides significant gains for massive search even when the original data is fully normalized. 1.2 Related Works The original idea of product quantization traces back to early works of signal processing [14, 12]. Jégou et al. [20] first introduced efficient asymmetric distance computation (ADC) and applied it to the approximate nearest neighbor (ANN) search problem. Since then, there have been multiple lines of work focused on improving PQ. Coarse Quantizer. Also termed inverted file (IVF) indexing structure in Jégou et al. [20], this approach learns a vector quantization of the data points via clustering, using the cluster indices to form an inverted index storing all data points corresponding to a given cluster index consecutively. A data point is encoded via PQ codes associated with the residual (offset) of the data point from its closet cluster center. This design enables non-exhaustive search by searching only a subset of the m 2 clusters/partitions in the inverted index. However, previous works have learned coarse quantizers as a separate preprocessing step, without training the coarse quantizers jointly with the PQ codebooks. Rotation Matrix. Since PQ quantizes each subspace independently, a rotation matrix can be applied to reduce the intra-subspace statistical dependence. Researchers have proposed multiple ways to estimate such a rotation matrix: Norouzi and Fleet [30] use ITQ [13] style alternating quantization; Optimized PQ [11] also applied a simple strategy to minimize the quantization error; Locally Optimized PQ [22] learns a separate R for each coarse partition (and incurs the extra overhead of multiplying each local rotation with the query vector to compute lookup tables specific to each partition). In high-dimensional setup, Zhang et al. [39] address the scalability issue in learning the d ⇥d rotation matrix by imposing a Kronecker product structure. While learning such orthogonal transformations is a good strategy in general, it does not change the norm of data points. Thus it still suffers from norm variance as discussed in Section 1.1. Additive Codebooks. Another line of research is focused on learning additive codebooks instead of subspace codebooks. This includes additive quantization [5, 6, 26], composite quantization [37, 38] and stacked quantization [27]. Since they do not work in subspaces, additive codebooks don’t require rotation, although they are harder to learn and more expensive to encode. Empirically, such additive codebooks are more expressive, and outperform OPQ at lower bitrates. However, OPQ achieves similar performance at higher bitrates. Since additive codebooks don’t address the variance of data point norms, the proposed multiscale approach can also be applied to additive codebooks as well. Implementation Improvements. Much effort has been put into optimizing the implementation of ADC, as it is computationally critical. Douze et al. [10] propose using Hamming distance for fast pruning. Johnson et al. [21] come up with an efficient GPU implementation for ADC lookup. André et al. [2] propose to use SIMD-based computation to compute lower bounds for ADC. Our method is compatible with all of these improvements. We also discuss our ADC implementation in Section 4.4. Non-quantization Techniques. There is a large body of similarity search literature on nonquantization based methods in both inner product search and nearest neighbor search. Tree based methods [7, 29, 9], graph based methods [16] and locality sensitive hashing style algorithms [19, 1, 32] focus on non-exhaustive search by partitioning the search space. In practice, these often lead to random memory accesses, and are often combined with exhaustive methods in ways similar to IVFADC [20, 4, 31, 28]. Binary embedding based approaches [36, 24, 18, 13, 17, 25] focus on learning short binary codes, and can be searched efficiently in Hamming space. However, there is typically a large gap between the precision of distance computations in Hamming vs. product codes under the same bitrate, and ADC can be computed with similar speed ([2, 21], Section 4.4). Therefore, we focus on comparison to ADC based techniques in this paper. 1.3 Contributions We propose a complete end-to-end training algorithm to learn coarse quantizers, a rotation matrix, and product quantization codebooks, together with scalar quantizers to capture coarse quantization residual norms. This differs from prior work in that it (a) identifies and addresses the problem of variance in data point norms; (b) includes coarse quantizers as a part of the optimization; and (c) is endto-end trainable using stochastic gradient descent (SGD), which leads to a significant improvement in quantization error compared to previous methods using alternating optimization [30, 11]. We also present ablation tests demonstrating the importance of each component of the algorithm in Section 4.2. In addition, we present theoretical motivation for our approach in Section 3. 2 Methodology We focus on minimizing quantization error kx −˜xk2, where x is a data point and ˜x is its quantized approximation, as a proxy for minimizing query-database distance approximation error |kq −xk2 −kq −˜xk2|. State-of-the-art quantization techniques take a hierarchical approach [11, 27]. For instance, one or more “coarse” quantization stages (VQ) can be followed by product quantization (PQ) of the vector quantization residuals. A learned rotation is often applied to the residuals prior to product quantization to further reduce quantization error [11]. This style of approach provides two key benefits: 3 1. Real world data is often clusterable, with the diameter of clusters substantially lower than the diameter of the dataset as a whole. The vector quantization can thus be used to obtain a “residual dataset” with much smaller diameter, yielding significant reductions in quantization error when quantized with only a product code [15]. 2. By additionally learning a rotation of the VQ residuals, the variance within each PQ subspace can be significantly reduced for many real world datasets, yielding substantially lower quantization error and correspondingly higher recall. As noted in Section 1.1, an additional source of quantization error when performing product quantization is the variance of data point norms. We extend the above strategy by explicitly representing the norm of VQ residuals, learning a PQ codebook only on the unit-normalized rotated VQ residuals, while separately scalar quantizing the residual norm scales. Specifically, multiscale quantization employs the following steps: (1) vector quantization of the dataset; (2) learned rotation of the vector quantization residuals; (3) reparameterization of the rotated residuals into direction and scale components; (4) product quantization of the direction component; (5) scalar quantization of the scale component. Formally, in multiscale quantization, the rotated residual rx and its `2 normalized version ˆrx are defined as: rx = R(x −φV Q(x)), ˆrx = rx/krxk2 And a data point x 2 Rd is approximated by x ⇡˜x = φV Q(x) + ˜rx, where ˜rx = φSQ(λx)RT φP Q(ˆrx) and λx = krxk2/kφP Q(ˆrx)k2 (2) From above, φV Q(x) = argminc2{Cj} kx −ck2 returns the closest vector quantization codeword for x; C 2 Rd⇥m is a vector quantization codebook with m codewords; Cj is its j-th codeword (i.e. the j-th column of C); And the matrix R 2 Rd⇥d is a learned rotation, applied to the residuals of vector quantization; The residual norm scale λx is a scalar multiplier to the product quantized φP Q(ˆrx) that helps preserve the `2 norm of the rotated residual rx; And φSQ returns the nearest scalar quantizer from a scalar quantization codebook W 2 Rp with p codewords (equivalent to one-dimensional vector quantization). The product quantizer φP Q(rx) is given by φP Q(ˆrx) = 0 B B B B @ φ(1) P Q(ˆr(1) x ) φ(2) P Q(ˆr(2) x ) ... φ(K) P Q(ˆr(K) x ) 1 C C C C A , ˆrx = 0 B B B B @ ˆr(1) x ˆr(2) x ... ˆr(K) x 1 C C C C A as the concatenation of codewords obtained by dividing the rotated and normalized residuals ˆrx into K subvectors ˆr(k) x , k = 1, 2, · · · , K, and quantizing the subvectors independently by vector quantizers φ(k) P Q(·) to minimize quantization error: φ(k) P Q(ˆr(k) x ) = argmin s2{S(k) j } kˆr(k) x −sk2. Hence, S(k) 2 Rd(k)⇥l is the vector quantization codebook for the k-th subspace (with l codewords). Frequently, d(k), the dimension of the k-th subvector, is simply d K , although subvectors of varying size are also possible. The quantized, normalized residuals are represented by the K indices of index(φ(k) P Q(ˆr(k) x )), k = 1, · · · , K. This representation has an overall bitrate of K log2 l, where K is the number of subspaces, and l is the number of product quantizers in each subspace. The residual norm scales are maintained by organizing the residuals associated with a VQ partition into groups, where within a group all residuals have the same quantized norm scale. The groups are ordered by quantized norm scale, and thus only the indices of group boundaries need to be maintained. The total storage cost incluiding group boundaries and scalar quantization levels is thus O(mp), where m is number of vector quantizers and p is the number of scalar quantizers. In our experiments, we set p to 8, which we find has a negligible effect on recall compared with using unquantized norm scales. 4 2.1 Efficient Search under Multiscale Quantization The multiscale quantization model enables nearest neighbor search to be carried out efficiently. For a query q, we compute the squared `2 distance of q with each codeword in the vector quantization codebook C, and search further within the nearest VQ partition. Suppose the corresponding quantizer is c⇤ q = argminc2{Cj} kq −ck2, and the corresponding quantization partition is P ⇤ q = {x 2 {Xj}[N] | φV Q(x) = c⇤ q}. Then, the approximate squared `2 distance between the query and database points in P ⇤ q are computed using a lookup table. The final prediction is made by taking the database point with the smallest approximate distance, i.e. xpred q = argmin x2P ⇤ q ( kq −c⇤ qk2 2 −2 ⇥ R(q −c⇤ q) ⇤ · [φSQ(λx)φP Q(ˆrx)] + kφSQ(λx)φP Q(ˆrx)k2 2 + . We use a lookup table to compute the quantized inner product between subvectors of the query’s rotated VQ residual ¯q = R(q −c⇤ q) and the scaled product quantized data point residuals φSQ(λx)φP Q(ˆrx). Letting ¯q(k) be the k-th subvector of ¯q and wx = φSQ(λx) the quantized norm scale, we first precompute inner products and the squared quantized `2 norm with the PQ codebook S as v(k) j = −2¯q(k) · wxS(k) j + wx2kS(k) j k2 2 for all j and k, giving K lookup tables v(1), . . . , v(K) each of dimension l. We can then compute −2¯q · wxφP Q(rx) + wx 2kφP Q(rx)k2 2 = K X k=1 v(k) index(φ(k) P Q(rx)) In practice, instead of searching only one vector quantization partition, one can use soft vector quantization and search the t partitions with the lowest kq −Cjk2. The final complexity of the search is O( NtK m ). In our implementation, since all the data points with the same quantized norm scale are stored in consecutive groups, we need only create a new lookup table at the beginning of a new group, by combining scale independent lookup tables of −2¯q(k) · S(k) j and kS(k) j k2 2 (multiplied by wx and wx2, respectively) using hardware optimized fused multiply-add instructions. We incur this computation cost only p times for a VQ partition, where p is the number of scalar quantizers. In our experiment, we set p = 8 and the number of VQ partitions to search t = 8, maintaining relatively low performance overhead. We discuss more on the lookup table implementation in Section 4.4. 2.2 Optimization Procedure We can explicitly formulate the mean squared loss as a function of our parameter vector ⇥= (C; {S(k)}[K]; R; {Wi}[m]) per our approximation formulation (2). Wi here represents the parameter vector for the scalar quantizer of norm scales in partition i. To jointly train the parameters of the model, we use stochastic gradient descent. To optimize the orthogonal transformation of vector quantization residuals while maintaining orthogonality, we parameterize it via the Cayley characterization of orthogonal matrices [8]: R = (I −A)(I + A)−1, (3) where A is a skew-symmetric matrix, i.e. A = −AT . Note that (3) is differentiable w.r.t. the d(d −1)/2 parameters of A. Computing the gradient requires an inversion of a d ⇥d matrix at each iteration. However we found this tradeoff to be acceptable for datasets with dimensionalities in the hundreds to thousands. When applying this method on high-dimensional datasets, one can restrict the number of parameters of A to trade off capacity and computational cost. The codebook for vector quantization is initialized using random samples from the dataset, while the codebook for product quantization is initialized using the residuals (after vector quantization, normalization and rotation) of a set of independent samples. To allow the vector quantization a chance to partition the space, we optimize only the vector quantization error for several epochs before initializing the product codes and doing full joint training. The parameters of the skew-symmetric matrix A were initialized by sampling from N(0, 1e−3). All optimization parameters were fixed for all datasets (although we note it would be possible to improve results slightly with more extensive per-dataset tuning). We used the Adam optimization algorithm [23] with the parameters suggested by the authors, minibatch sizes of 2000, and a learning rate of 1e−4 during joint training (and 1e−3 when training only the vector quantizers). 5 To learn the scalar quantizer for residual norm scales and capture their local distribution within a VQ partition, we jointly optimize the assignment of PQ codes and the scalar quantizer for all data points within the same partition. Leaving the PQ codebook and rotation fixed, we alternate between following two steps until convergence: 1. Fix all assigned PQ codes and scalar quantize the norm scales λx = krxk2/kφP Q(ˆrx)k2 only within the partition. 2. Fix all quantized norm scales within the partition and reassign PQ codes for rx/φSQ(λx). In practice, it only takes a few iterations to converge to a local minimum for every VQ partition. 3 Analysis Below we provide theoretical motivation and analysis for the components of the proposed quantization approach, including for multiscale, learned rotation, and coarse quantization stages. 3.1 Multiscale We first show that adding a scalar quantizer further increases the recall when the norms of the residuals exhibit large variance. For a query q and a given partition with center Cj, if we define qj = q −Cj, then the `2 error caused by residual quantization is |kqj −rxk2 2 −kqj −˜rxk2 2| = | −2qj · (rx −˜rx) + krxk2 2 −k˜rxk2 2| |2qj · (rx −˜rx)| + |krxk2 2 −k˜rxk2 2|. The first query dependent term can be further transformed as |2qj · (rx −˜rx)| = 2 q [(rx −˜rx)T qj][qT j (rx −˜rx)] = 2 q (rx −˜rx)T (qjqT j )(rx −˜rx) Taking expectation w.r.t q yields Eq|2qj · (rx −˜rx)| 2 q Eq[(rx −˜rx)T (qjqT j )(rx −˜rx)] = 2 q (rx −˜rx)T Eq(qjqT j )(rx −˜rx), where the inequality follows from Jensen’s inequality. If λq is the largest eigen value of the covariance matrix Eq(qjqT j ), then Eq|kqj −rxk2 2 −kqj −˜rxk2 2| 2 p λqkrx −˜rxk2 + |krxk2 2 −k˜rxk2 2|. Existing quantization methods have focused on the first term in the error of `2 distance. However for VQ residuals with large variance in krxk2, the second quadratic term becomes dominant. By scalar quantizing the residual norm scales, especially within each VQ partition locally, we can reduce the second term substantially and thus improve recall on real datasets. 3.2 Rotation Matrix Performing quantization after a learned rotation has been found to work well in practice [13, 30]. Here we show rotation is required in some scenarios. Let xi = Ryi, 1 i n. We show that there exist simple examples, where the yi’s have a product code with small codebook size and MSE 0, whereas to get any small MSE on xis one may need to use exponentially many codewords. On real-world datasets, this difference might not be quite so pronounced, but it is still significant and hence undoing the rotation can yield significantly better MSE. We provide the following Lemma (see the supplementary material for a proof). Lemma 1. Let X = RY, i.e., for 1 i n, xi = Ryi. There exists a dataset Y and a rotation matrix R such that a canonical basis product code of size 2 is sufficient to achieve MSE of 0 for Y, whereas any product code on X requires 2c·min(d/K,K)✏codewords to achieve MSE ✏kxkmax, where c is some universal constant and kxkmax is the maximum `2 norm of any data point. 6 (a) (b) Figure 2: (a) Break down by contribution to MSE reduction from each component in our model on SIFT1M and DEEP10M datasets with different bitrates. The baseline is the original IVFADC setup with no rotation or norm scale quantization. (b) Time spent per query by different distance computation methods on linear search of a database of size |X| = 27, 28, 29, · · · 216 under 128 bits. Lower curves indicate faster search time. 3.3 Coarse Quantization We analyze the proposed vector and product quantization when the data is generated by a K-subspace mixture model that captures two properties observed in many real-world data sets: samples belong to one of several underlying categories, also referred to as components, and within each component the residuals are generated independently in K subspaces. The precise model is defined in Appendix B. For a query q, let x⇤ q be the sample that minimizes kq −xk2. Let xV Q q be the output of the hierarchical nearest neighbor algorithm that first finds the nearest cluster center and then searches within that cluster. We show that if q is generated independently of x, then with high probability it returns an xV Q q that is near-optimal. Theorem 1. Given n samples from an underlying K-subspace mixture model that has been clustered correctly and an independently generated query q, with probability ≥1 −δ, ..kq −x⇤ qk2 2 −kq −xV Q q k2 2 .. 8b r dr2 2K log 4n δ + 4r2 r d2 2K log 2n δ . See Appendix B for a proof. Note that r = maxx2Xkrxk1 is the maximum value of the residual in any coordinate and offers a natural scaling for our problem and b = maxx2Xkq −xk2 is the maximum distance between q and any data point. 4 Experiments 4.1 Evaluation Datasets We evaluate the performance of end-to-end trained multiscale quantization (MSQ) on the SIFT1M [20] and DEEP10M [3] datasets, which are often used in benchmarking the performance of nearest neighbor search. SIFT1M [20] contains 1 million, 128 dimensional SIFT descriptors extracted from Flickr images. DEEP10M is introduced in [3], by extracting 96 PCA components from the final hidden layer activations of GoogLeNet [33]. At training time, each dataset is indexed with 1024 VQ coarse quantizers. At query time, quantized residuals from the 8 partitions closest to the query are further searched using ADC to generate the final nearest neighbors. We report results on both quantization error (MSE, Section 4.2) and in terms of retrieval recall (Recall1@N, Section 4.3). Often, the two metrics are strongly correlated. 4.2 Ablation Tests Compared to IVFADC [20], which uses plain PQ with coarse quantizers, our end-to-end trained MSQ reduces quantization error by 15-20% on SIFT1M, and 20-25% on DEEP10M, which is a substantial reduction. Multiple components contribute to this reduction: (1) learned rotation of the VQ residuals; (2) separate quantization of the residual norms into multiple scales; and (3) end-to-end training of all parameters. 7 Figure 3: Recall curves when retrieving Top-1 neighbors (Recall1@N) on the SIFT1M dataset with varying numbers of codebooks and centers. We search t = 8 out of m = 1024 VQ partitions. In order to understand the effect of each component, we plot the MSE reduction relative to IVFADC [20] for several ablation tests (Figure 2a). On DEEP10M, the proposed multiscale approach and the end-to-end learning contribute an additional 5-10% MSE reduction on top of learned rotation, while they contribute 10-15% on SIFT1M. It is important to note that on SIFT1M, multiscale quantization and end-to-end training have a bigger impact than learned rotation, which is itself often considered to yield a significant improvement. 4.3 Recall Experiments We compare the proposed end-to-end trained multiscale quantization method against three baselines methods: product quantization (PQ) [20], optimized product quantization (OPQ) [11] and stacked quantizers (SQ) [27]. We generate ground-truth results using brute force search, and compare the results of each method against ground-truth in fixed-bitrate settings. For fixed-bitrate experiments, we show recall curves for varying numbers of PQ codebooks from the range {8, 16, 32} for the SIFT1M dataset and {6, 12, 24} for the DEEP10M dataset. For each number of codebooks, we experimented with both 16 centers for in-register table lookup and 256 centers for in-memory table lookup in Figure 3 and 4. From the recall curves, it is clear that multiscale quantization performs better than all baselines across both datasets in all settings. 4.4 Speed Benchmarks We use the same indexing structure (IVF), and the same ADC computation implementation for all baselines (PQ [20], OPQ [11], SQ [27]). Thus the speed of all baselines are essentially identical at the same bitrate, meaning Figure 3 and 4 are both fixed-memory and fixed-time, and thus directly comparable. For codebooks with 256 centers, we implemented in-memory lookup table (LUT256) [20]; for codebooks with 16 centers, we implemented in-register lookup table (LUT16) using the VPSHUFB instruction from AVX2, which performs 32 lookups in parallel. Also, we notice that there have been different implementations of ADC. The original algorithm proposed in [20] uses in-memory lookup tables. We place tables in SIMD registers and leverage SIMD instructions for fast lookup. Similar ideas are also reported in recent literature [10, 17, 2]. Here we put them on equal footing and provide a comparison of different approaches. In Figure 2b, we plot the time for distance computation at the same bitrate. Clearly, VPSHUFB based LUT16 achieves almost the same speed compared to POPCNT based Hamming, and they are both 5x faster than in-memory based ADC. As a practical observation, when the number of neighbors to be retrieved is large, Recall1@N of LUT256 and LUT16 is often comparable at the same bitrate, and LUT16 with 5x speed up is almost always preferred. 8 Figure 4: Recall curves when retrieving Top-1 neighbors (Recall1@N) on the DEEP10M datasets varying numbers of codebooks and centers. We search t = 8 out of m = 1024 VQ partitions. 5 Conclusions We have proposed an end-to-end trainable multiscale quantization method that minimizes overall quantization loss. We introduce a novel scalar quantization approach to account for the variances in data point norms, which is both empirically and theoretically motivated. Together with the end-to-end training, this contributes to large reduction in quantization error over existing competing methods that already employ optimized rotation and coarse quantization. Finally, we conducted comprehensive nearest neighbor search retrieval experiments on two large-scale, publicly available benchmark datasets, and achieve considerable improvement over state-of-the-art. 6 Acknowledgements We thank Jeffrey Pennington and Chen Wang for their helpful comments and discussions. References [1] Alexandr Andoni, Piotr Indyk, Thijs Laarhoven, Ilya Razenshteyn, and Ludwig Schmidt. Practical and optimal lsh for angular distance. In Advances in Neural Information Processing Systems, pages 1225–1233, 2015. [2] Fabien André, Anne-Marie Kermarrec, and Nicolas Le Scouarnec. Cache locality is not enough: highperformance nearest neighbor search with product quantization fast scan. Proceedings of the VLDB Endowment, 9(4):288–299, 2015. [3] A. Babenko and V. Lempitsky. Efficient indexing of billion-scale datasets of deep descriptors. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2055–2063, June 2016. [4] Artem Babenko and Victor Lempitsky. The inverted multi-index. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 3069–3076. IEEE, 2012. [5] Artem Babenko and Victor Lempitsky. Additive quantization for extreme vector compression. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 931–938. IEEE, 2014. [6] Artem Babenko and Victor Lempitsky. Tree quantization for large-scale similarity search and classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4240–4248, 2015. [7] Jon Louis Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):509–517, 1975. [8] Arthur Cayley. Sur quelques propriétés des déterminants gauches. Journal für die reine und angewandte Mathematik, 32:119–123, 1846. 9 [9] Sanjoy Dasgupta and Yoav Freund. Random projection trees and low dimensional manifolds. In Proceedings of the fortieth annual ACM symposium on Theory of computing, pages 537–546. ACM, 2008. [10] Matthijs Douze, Hervé Jégou, and Florent Perronnin. Polysemous codes. In European Conference on Computer Vision, pages 785–801. Springer, 2016. [11] T. Ge, K. He, Q. Ke, and J. Sun. Optimized product quantization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(4):744–755, April 2014. [12] Allen Gersho and Robert M Gray. Vector quantization and signal compression, volume 159. Springer Science & Business Media, 2012. [13] Yunchao Gong, Svetlana Lazebnik, Albert Gordo, and Florent Perronnin. Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(12):2916–2929, 2013. [14] Robert M Gray. Vector quantization. ASSP Magazine, IEEE, 1(2):4–29, 1984. [15] Ruiqi Guo, Sanjiv Kumar, Krzysztof Choromanski, and David Simcha. Quantization based fast inner product search. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, AISTATS 2016, Cadiz, Spain, May 9-11, 2016, pages 482–490, 2016. [16] Ben Harwood and Tom Drummond. FANNG: Fast approximate nearest neighbour graphs. In Computer Vision and Pattern Recognition (CVPR), 2016 IEEE Conference on, pages 5713–5722. IEEE, 2016. [17] Kaiming He, Fang Wen, and Jian Sun. K-means hashing: An affinity-preserving quantization method for learning binary compact codes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2938–2945, 2013. [18] Jae-Pil Heo, Youngwoon Lee, Junfeng He, Shih-Fu Chang, and Sung-Eui Yoon. Spherical hashing. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2957–2964. IEEE, 2012. [19] Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 604–613. ACM, 1998. [20] Herve Jegou, Matthijs Douze, and Cordelia Schmid. Product quantization for nearest neighbor search. IEEE transactions on pattern analysis and machine intelligence, 33(1):117–128, 2011. [21] Jeff Johnson, Matthijs Douze, and Hervé Jégou. Billion-scale similarity search with gpus. arXiv preprint arXiv:1702.08734, 2017. [22] Yannis Kalantidis and Yannis Avrithis. Locally optimized product quantization for approximate nearest neighbor search. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 2329–2336. IEEE, 2014. [23] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [24] Brian Kulis and Trevor Darrell. Learning to hash with binary reconstructive embeddings. In Advances in neural information processing systems, pages 1042–1050, 2009. [25] Wei Liu, Jun Wang, Sanjiv Kumar, and Shih-Fu Chang. Hashing with graphs. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 1–8, 2011. [26] Julieta Martinez, Joris Clement, Holger H Hoos, and James J Little. Revisiting additive quantization. In European Conference on Computer Vision, pages 137–153. Springer, 2016. [27] Julieta Martinez, Holger H. Hoos, and James J. Little. Stacked quantizers for compositional vector compression. CoRR, abs/1411.2173, 2014. [28] Yusuke Matsui, Toshihiko Yamasaki, and Kiyoharu Aizawa. Pqtable: Fast exact asymmetric distance neighbor search for product quantization using hash tables. In Proceedings of the IEEE International Conference on Computer Vision, pages 1940–1948, 2015. [29] Marius Muja and David G Lowe. Scalable nearest neighbor algorithms for high dimensional data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(11):2227–2240, 2014. 10 [30] Mohammad Norouzi and David J Fleet. Cartesian k-means. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3017–3024, 2013. [31] Mohammad Norouzi, Ali Punjani, and David J Fleet. Fast exact search in hamming space with multi-index hashing. IEEE transactions on pattern analysis and machine intelligence, 36(6):1107–1119, 2014. [32] Anshumali Shrivastava and Ping Li. Asymmetric lsh (alsh) for sublinear time maximum inner product search (mips). In Advances in Neural Information Processing Systems, pages 2321–2329, 2014. [33] 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. [34] Jingdong Wang, Heng Tao Shen, Jingkuan Song, and Jianqiu Ji. Hashing for similarity search: A survey. arXiv preprint arXiv:1408.2927, 2014. [35] Jun Wang, Wei Liu, Sanjiv Kumar, and Shih-Fu Chang. Learning to hash for indexing big data survey. Proceedings of the IEEE, 104(1):34–57, 2016. [36] Yair Weiss, Antonio Torralba, and Rob Fergus. Spectral hashing. In Advances in neural information processing systems, pages 1753–1760, 2009. [37] Ting Zhang, Chao Du, and Jingdong Wang. Composite quantization for approximate nearest neighbor search. In ICML, number 2, pages 838–846, 2014. [38] Ting Zhang, Guo-Jun Qi, Jinhui Tang, and Jingdong Wang. Sparse composite quantization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4548–4556, 2015. [39] Xu Zhang, Felix X. Yu, Ruiqi Guo, Sanjiv Kumar, Shengjin Wang, and Shih-Fu Chang. Fast orthogonal projection based on kronecker product. In International Conference on Computer Vision (ICCV), 2015. 11 | 2017 | 479 |
6,984 | Exploring Generalization in Deep Learning Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, Nathan Srebro Toyota Technological Institute at Chicago {bneyshabur, srinadh, mcallester, nati}@ttic.edu Abstract With a goal of understanding what drives generalization in deep networks, we consider several recently suggested explanations, including norm-based control, sharpness and robustness. We study how these measures can ensure generalization, highlighting the importance of scale normalization, and making a connection between sharpness and PAC-Bayes theory. We then investigate how well the measures explain different observed phenomena. 1 Introduction Learning with deep neural networks has enjoyed huge empirical success in recent years across a wide variety of tasks. Despite being a complex, non-convex optimization problem, simple methods such as stochastic gradient descent (SGD) are able to recover good solutions that minimize the training error. More surprisingly, the networks learned this way exhibit good generalization behavior, even when the number of parameters is significantly larger than the amount of training data [20, 30]. In such an over parametrized setting, the objective has multiple global minima, all minimize the training error, but many of them do not generalize well. Hence, just minimizing the training error is not sufficient for learning: picking the wrong global minima can lead to bad generalization behavior. In such situations, generalization behavior depends implicitly on the algorithm used to minimize the training error. Different algorithmic choices for optimization such as the initialization, update rules, learning rate, and stopping condition, will lead to different global minima with different generalization behavior [7, 12, 18]. For example, Neyshabur et al. [18] introduced Path-SGD, an optimization algorithm that is invariant to rescaling of weights, and showed better generalization behavior over SGD for both feedforward and recurrent neural networks [18, 22]. Keskar et al. [12] noticed that the solutions found by stochastic gradient descent with large batch sizes generalizes worse than the one found with smaller batch sizes, and Hardt et al. [10] discuss how stochastic gradient descent ensures uniform stability, thereby helping generalization for convex objectives. What is the bias introduced by these algorithmic choices for neural networks? What ensures generalization in neural networks? What is the relevant notion of complexity or capacity control? As mentioned above, simply accounting for complexity in terms of the number of parameters, or any measure which is uniform across all functions representable by a given architecture, is not sufficient to explain the generalization ability of neural networks trained in practice. For linear models, norms and margin-based measures, and not the number of parameters, are commonly used for capacity control [5, 9, 25]. Also norms such as the trace norm and max norm are considered as sensible inductive biases in matrix factorization and are often more appropriate than parameter-counting measures such as the rank [27, 28]. In a similar spirit, Bartlett [3], Neyshabur et al. [20] and in parallel to this work, Bartlett et al. [2] suggested different norms of network parameters to measure the capacity of neural networks. In a different line of work, Keskar et al. [12] suggested “sharpness” (robustness of the training error to perturbations in the parameters) as a complexity measure for neural networks. Others, including Langford and Caruana [13] and more recently Dziugaite and Roy [8], propose a PAC-Bayes analysis. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. What makes a complexity measure appropriate for explaining generalization in deep learning? First, an appropriate complexity measure must be sufficient in ensuring generalization. Second, networks learned in practice should be of low complexity under this measure. This can happen if our optimization algorithms bias us toward lower complexity models under this measure and it is possible to capture real data using networks of low complexity. In particular, the complexity measure should help explain several recently observed empirical phenomena that are not explained by a uniform notion of complexity: • It is possible to obtain zero training error on random labels using the same architecture for which training with real labels leads to good generalization [30]. We would expect the networks learned using real labels (and which generalizes well) to have much lower complexity, under the suggested measure, than those learned using random labels (and which obviously do not generalize well). • Increasing the number of hidden units, thereby increasing the number of parameters, can lead to a decrease in generalization error even when the training error does not decrease [20]. We would expect to see the complexity measure decrease as we increase the number of hidden units. • When training the same architecture, with the same training set, using two different optimization methods (or different algorithmic or parameter choices), one method results in better generalization even though both lead to zero training error [18, 12]. We would expect to see a correlation between the complexity measure and generalization ability among zero-training error models. In this paper we examine complexity measures that have recently been suggested, or could be considered, in explaining generalization in deep learning. We evaluate the measures based on their ability to theoretically guarantee generalization, and their empirical ability to explain the above phenomena. Studying how each measure can guarantee generalization also let us better understand how it should be computed and compared in order to explain the empirical phenomena. We investigate complexity measures including norms, robustness and sharpness of the network. We emphasize in our theoretical and empirical study the importance of relating the scale of the parameters and the scale of the output of the network, e.g. by relating norm and margin. In this light, we discuss how sharpness by itself is not sufficient for ensuring generalization, but can be combined, through PAC-Bayes analysis, with the norm of the weights to obtain an appropriate complexity measure. The role of sharpness in PAC-Bayesian analysis of neural networks was also recently noted by Dziugaite and Roy [8], who used numerical techniques to numerically optimize the overall PAC-Bayes bound—here we emphasize the distinct role of sharpness as a balance for norm. Notation Let fw(x) be the function computed by a d layer feed-forward network with parameters w and Rectified Linear Unit (ReLU) activations, fw(x) = Wd φ(Wd−1 φ(....φ(W1x))) where φ(z) = max{0, z}. Let hi be the number of nodes in layer i, with h0 = n. Therefore, for any layer i, we have Wi ∈Rhi×hi−1. Given any input x, the loss of the prediction by the function fw is then given by ℓ(w, x). We also denote by L(w) the expected loss and by bL(w) the empirical loss over the training set. For any integer k, [k] denotes the set {1, 2, · · · , k}. Finally, ∥.∥F , ∥.∥2, ∥.∥1, ∥.∥∞denote Frobenius norm, the spectral norm, element-wise ℓ1-norm and element-wise ℓ∞norm respectively. 2 Generalization and Capacity Control in Deep Learning In this section, we discuss complexity measures that have been suggested, or could be used for capacity control in neural networks. We discuss advantages and weaknesses of each of these complexity measures and examine their abilities to explain the observed generalization phenomena in deep learning. We consider the statistical capacity of a model class in terms of the number of examples required to ensure generalization, i.e. that the population (or test error) is close to the training error, even when minimizing the training error. This also roughly corresponds to the maximum number of examples on which one can obtain small training error even with random labels. 2 Given a model class H, such as all the functions representable by some feedforward or convolutional networks, one can consider the capacity of the entire class H—this corresponds to learning with a uniform “prior” or notion of complexity over all models in the class. Alternatively, we can also consider some complexity measure, which we take as a mapping that assigns a non-negative number to every hypothesis in the class - M : {H, S} →R+, where S is the training set. It is then sufficient to consider the capacity of the restricted class HM,α = {h : h ∈H, M(h) ≤α} for a given α ≥0. One can then ensure generalization of a learned hypothesis h in terms of the capacity of HM,M(h). Having a good hypothesis with low complexity, and being biased toward low complexity (in terms of M) can then be sufficient for learning, even if the capacity of the entire H is high. And if we are indeed relying on M for ensuring generalization (and in particular, biasing toward models with lower complexity under M), we would expect a learned h with lower value of M(h) to generalize better. For some of the measures discussed, we allow M to depend also on the training set. If this is done carefully, we can still ensure generalization for the restricted class HM,α. We will consider several possible complexity measures. For each candidate measure, we first investigate whether it is sufficient for generalization, and analyze the capacity of HM,α. Understanding the capacity corresponding to different complexity measures also allows us to relate between different measures and provides guidance as to what and how we should measure: From the above discussion, it is clear that any monotone transformation of a complexity measures leads to an equivalent notion of complexity. Furthermore, complexity is meaningful only in the context of a specific hypothesis class H, e.g. specific architecture or network size. The capacity, as we consider it (in units of sample complexity), provides a yardstick by which to measure complexity (we should be clear though, that we are vague regarding the scaling of the generalization error itself, and only consider the scaling in terms of complexity and model class, thus we obtain only a very crude yardstick sufficient for investigating trends and relative phenomena, not a quantitative yardstick). 2.1 Network Size For any model, if its parameters have finite precision, its capacity is linear in the total number of parameters. Even without making an assumption on the precision of parameters, the VC dimension of feedforward networks can be bounded in terms of the number of parameters dim(w)[1, 3, 6, 23]. In particular, Bartlett [4] and Harvey et al. [11], following Bartlett et al. [6], give the following tight (up to logarithmic factors) bound on the VC dimension and hence capacity of feedforward networks with ReLU activations: VC-dim = ˜O(d ∗dim(w)) (1) In the over-parametrized settings, where the number of parameters is more than the number of samples, complexity measures that depend on the total number of parameters are too weak and cannot explain the generalization behavior. Neural networks used in practice often have significantly more parameters than samples, and indeed can perfectly fit even random labels, obviously without generalizing [30]. Moreover, measuring complexity in terms of number of parameters cannot explain the reduction in generalization error as the number of hidden units increase [20] (see also Figure 4). 2.2 Norms and Margins Capacity of linear predictors can be controlled independent of the number of parameters, e.g. through regularization of its ℓ2 norm. Similar norm based complexity measures have also been established for feedforward neural networks with ReLU activations. For example, capacity can be bounded based on the ℓ1 norm of the weights of hidden units in each layer, and is proportional to Qd i=1 ∥Wi∥2 1,∞, where ∥Wi∥1,∞is the maximum over hidden units in layer i of the ℓ1 norm of incoming weights to the hidden unit [5]. More generally Neyshabur et al. [19] considered group norms ℓp,q corresponding to ℓq norm over hidden units of ℓp norm of incoming weights to the hidden unit. This includes ℓ2,2 which is equivalent to the Frobenius norm where the capacity of the network is proportional to Qd i=1 ∥Wi∥2 F . They further motivated a complexity measure that is invariant to node-wise rescaling reparametrization 1, suggesting ℓp path norms which is the minimum over all node-wise rescalings of Qd i=1 ∥Wi∥p,∞and is equal to ℓp norm of a vector with coordinates each of which is the product 1Node-rescaling can be defined as a sequence of reparametrizations, each of which corresponds to multiplying incoming weights and dividing outgoing weights of a hidden unit by a positive scalar α. The resulting network computes the same function as the network before the reparametrization. 3 of weights along a path from an input node to an output node in the network. While preparing this manuscript, we became aware of parallel work Bartlett et al. [2] that proves generalization bounds with capacity is proportional to Qd i=1 ∥Wi∥2 2 Pd j=1 ∥Wj∥1 / ∥Wj∥2 2/33 . Capacity control in terms of norm, when using a zero/one loss (i.e. counting errors) requires us in addition to account for scaling of the output of the neural networks, as the loss is insensitive to this scaling but the norm only makes sense in the context of such scaling. For example, dividing all the weights by the same number will scale down the output of the network but does not change the 0/1 loss, and hence it is possible to get a network with arbitrary small norm and the same 0/1 loss. Using a scale sensitive losses, such as the cross entropy loss, does address this issue (if the outputs are scaled down toward zero, the loss becomes trivially bad), and one can obtain generalization guarantees in terms of norm and the cross entropy loss. However, we should be careful when comparing the norms of different models learned by minimizing the cross entropy loss, in particular when the training error goes to zero. When the training error goes to zero, in order to push the cross entropy loss (or any other positive loss that diminish at infinity) to zero, the outputs of the network must go to infinity, and thus the norm of the weights (under any norm) should also go to infinity. This means that minimizing the cross entropy loss will drive the norm toward infinity. In practice, the search is terminated at some finite time, resulting in large, but finite norm. But the value of this norm is mostly an indication of how far the optimization is allowed to progress—using a stricter stopping criteria (or higher allowed number of iterations) would yield higher norm. In particular, comparing the norms of models found using different optimization approaches is meaningless, as they would all go toward infinity. Instead, to meaningfully compare norms of the network, we should explicitly take into account the scaling of the outputs of the network. One way this can be done, when the training error is indeed zero, is to consider the “margin” of the predictions in addition to the norms of the parameters. We refer to the margin for a single data point x as the difference between the score of the correct label and the maximum score of other labels, i.e. fw(x)[ytrue] −max y̸=ytrue fw(x)[y] (2) In order to measure scale over an entire training set, one simple approach is to consider the “hard margin”, which is the minimum margin among all training points. However, this definition is very sensitive to extreme points as well as to the size of the training set. We consider instead a more robust notion that allows a small portion of data points to violate the margin. For a given training set and small value ϵ > 0, we define the margin γmargin as the lowest value of γ such that ⌈ϵm⌉data point have margin lower than γ where m is the size of the training set. We found empirically that the qualitative and relative nature of our empirical results is almost unaffected by reasonable choices of ϵ (e.g. between 0.001 and 0.1). The measures we investigate in this work and their corresponding capacity bounds are as follows 2: • ℓ2 norm with capacity proportional to 1 γ2 margin Qd i=1 4 ∥Wi∥2 F [19]. • ℓ1-path norm with capacity proportional to 1 γ2 margin P j∈Qd k=0[hk] dQ i=1 2Wi[ji, ji−1] 2 [5, 19]. • ℓ2-path norm with capacity proportional to 1 γ2 margin P j∈Qd k=0[hk] Qd i=1 4hiW 2 i [ji, ji−1]. • spectral norm with capacity proportional to 1 γ2 margin Qd i=1 hi ∥Wi∥2 2. where Qd k=0[hk] is the Cartesian product over sets [hk]. The above bounds indicate that capacity can be bounded in terms of either ℓ2-norm or ℓ1-path norm independent of number of parameters. The 2We have dropped the term that only depends on the norm of the input. The bounds based on ℓ2-path norm and spectral norm can be derived directly from the those based on ℓ1-path norm and ℓ2 norm respectively. Without further conditions on weights, exponential dependence on depth is tight but the 4d dependence might be loose [19]. As we discussed at the beginning of this subsection, in parallel work, Bartlett et al. [2] have improved the spectral bound. 4 size of traning set 10K 20K 30K 40K 50K 1020 1025 1030 true labels random labels size of traning set 10K 20K 30K 40K 50K 1025 1030 1035 size of traning set 10K 20K 30K 40K 50K 100 102 104 size of traning set 10K 20K 30K 40K 50K 105 1010 1015 ℓ2 norm ℓ1-path norm ℓ2-path norm spectral norm Figure 1: Comparing different complexity measures on a VGG network trained on subsets of CIFAR10 dataset with true (blue line) or random (red line) labels. We plot norm divided by margin to avoid scaling issues (see Section 2), where for each complexity measure, we drop the terms that only depend on depth or number of hidden units; e.g. for ℓ2-path norm we plot γ−2 margin P j∈Qd k=0[hk] Qd i=1 W 2 i [ji, ji−1]. We also set the margin over training set S to be 5th-percentile of the margins of the data points in S, i.e. Prc5 {fw(xi)[yi] −maxy̸=yi fw(x)[y]|(xi, yi) ∈S}. In all experiments, the training error of the learned network is zero. The plots indicate that these measures can explain the generalization as the complexity of model learned with random labels is always higher than the one learned with true labels. Moreover, the gap between the complexity of models learned with true and random labels increases as we increase the size of the training set. ℓ2-path norm dependence on the number of hidden units in each layer is unavoidable. However, it is not clear if a bound that only depends on the product of spectral norms is possible. As an initial empirical investigation of the appropriateness of the different complexity measures, we compared the complexity (under each of the above measures) of models trained on true versus random labels. We would expect to see two phenomena: first, the complexity of models trained on true labels should be substantially lower than those trained on random labels, corresponding to their better generalization ability. Second, when training on random labels, we expect capacity to increase almost linearly with the number of training examples, since every extra example requires new capacity in order to fit it’s random label. However, when training on true labels we expect the model to capture the true functional dependence between input and output and thus fitting more training examples should only require small increases in the capacity of the network. The results are reported in Figure 1. We indeed observe a gap between the complexity of models learned on real and random labels for all four norms, with the difference in increase in capacity between true and random labels being most pronounced for the ℓ2 norm and ℓ2-path norm. Lipschitz Continuity and Robustness The measures/norms we discussed so far also control the Lipschitz constant of the network with respect to its input. Is the capacity control achieved through the bound on the Lipschitz constant? Is bounding the Lipschitz constant alone enough for generalization? In Appendix A, we show that the current bounds using Lipschitz have exponential dependence to the input dimension and therefore the capacity bounds discussed above are not merely a consequence of bounding the Lipschitz constant. In Section 3 we present further empirical investigations of the appropriateness of these complexity measures to explain other phenomena. 2.3 Sharpness The notion of sharpness as a generalization measure was recently suggested by Keskar et al. [12] and corresponds to robustness to adversarial perturbations on the parameter space: ζα(w) = max|νi|≤α(|wi|+1) bL(fw+ν) −bL(fw) 1 + bL(fw) ≃ max |νi|≤α(|wi|+1) bL(fw+ν) −bL(fw), (3) where the training error bL(fw) is generally very small in the case of neural networks in practice, so we can simply drop it from the denominator without a significant change in the sharpness value. As we will explain below, sharpness defined this way does not capture the generalization behavior. To see this, we first examine whether sharpness can predict the generalization behavior for networks trained on true vs random labels. In the left plot of Figure 2, we plot the sharpness for networks trained on true vs random labels. While sharpness correctly predicts the generalization behavior for 5 size of traning set 10K 20K 30K 40K 50K sharpness 0.4 0.6 0.8 1 1.2 true labels random labels KL #108 0 1 2 3 expected sharpness 0 0.05 0.1 0.15 0.2 0.25 0.3 KL 2K 4K 6K expected sharpness 0 0.04 0.08 0.12 5K 10K 30K 50K KL #108 0 1 2 3 expected sharpness 0 0.05 0.1 0.15 0.2 0.25 0.3 KL 2K 4K 6K expected sharpness 0 0.04 0.08 0.12 5K 10K 30K 50K Figure 2: Sharpness and PAC-Bayes measures on a VGG network trained on subsets of CIFAR10 dataset with true or random labels. In the left panel, we plot max sharpness, calculated as suggested by Keskar et al. [12] where the perturbation for parameter wi has magnitude 5.10−4(|wi| + 1). The middle and right plots show the relationship between expected sharpness and KL divergence in PAC-Bayes bound for true and random labels respectively. For PAC-Bayes plots, each point in the plot correspond to a choice of α where the standard deviation of the perturbation for the parameter wi is α(10 |wi| + 1). The corresponding KL to each α is weighted ℓ2 norm where the weight for each parameter is the inverse of the standard deviation of the perturbation. true labels random labels bigger networks, for networks of smaller size, those trained on random labels have less sharpness than the ones trained on true labels. Furthermore sharpness defined above depends on the scale of w and can be artificially increased or decreased by changing the scale of the parameters. Therefore, sharpness alone is not sufficient to control the capacity of the network. Instead, we advocate viewing a related notion of expected sharpness in the context of the PACBayesian framework. Viewed this way, it becomes clear that sharpness controls only one of two relevant terms, and must be balanced with some other measure such as norm. Together, sharpness and norm do provide capacity control and can explain many of the observed phenomena. This connection between sharpness and the PAC-Bayes framework was also recently noted by Dziugaite and Roy [8]. The PAC-Bayesian framework [16, 17] provides guarantees on the expected error of a randomized predictor (hypothesis), drawn form a distribution denoted Q and sometimes referred to as a “posterior” (although it need not be the Bayesian posterior), that depends on the training data. Let fw be any predictor (not necessarily a neural network) learned from training data. We consider a distribution Q over predictors with weights of the form w + ν, where w is a single predictor learned from the training set, and ν is a random variable. Then, given a “prior” distribution P over the hypothesis that is independent of the training data, with probability at least 1 −δ over the draw of the training data, the expected error of fw+ν can be bounded as follows [15]: Eν[L(fw+ν)] ≤Eν[bL(fw+ν)] + 4 s KL (w + ν∥P) + ln 2m δ m (4) Substituting Eν[bL(fw+ν)] with bL(fw) + Eν[bL(fw+ν)] −bL(fw) we can see that the PAC-Bayes bound depends on two quantities - i) the expected sharpness and ii) the Kullback Leibler (KL) divergence to the “prior” P. The bound is valid for any distribution measure P, any perturbation distribution ν and any method of choosing w dependent on the training set. A simple way to instantiate the bound is to set P to be a zero mean, σ2 variance Gaussian distribution. Choosing the perturbation ν to also be a zero mean spherical Gaussian with variance σ2 in every direction, yields the following guarantee (w.p. 1 −δ over the training set): Eν∼N (0,σ)n[L(fw+ν)] ≤bL(fw) + Eν∼N (0,σ)n[bL(fw+ν)] −bL(fw) | {z } expected sharpness +4 v u u u t 1 m ∥w∥2 2 2σ2 | {z } KL + ln 2m δ , (5) Another interesting approach is to set the variance of the perturbation to each parameter with respect to the magnitude of the parameter. For example if σi = α |wi| + β, then the KL term in the above expression changes to P i w2 i 2σ2 i . The above generalization guarantees give a clear way to think about capacity control jointly in terms of both the expected sharpness and the norm, and as we discussed earlier indicates that sharpness by itself cannot control the capacity without considering the scaling. In the above generalization bound, norms and sharpness interact in a direct way depending on σ, 6 #random labels 0 1K 2K 3K 4K 5K error 0 0.1 0.2 0.3 0.4 training test #random labels 0 1K 2K 3K 4K 5K measure 0 0.2 0.4 0.6 0.8 1 `2 norm spectral norm path-`1 norm path-`2 norm sharpness KL #107 0 1 2 3 4 5 expected sharpness 0 0.05 0.1 0.15 0.2 0.25 0.3 KL #107 0 1 2 3 4 5 expected sharpness 0 0.05 0.1 0.15 0.2 0.25 0.3 0 1K 2K 3K 4K 5K Figure 3: Experiments on global minima with poor generalization. For each experiment, a VGG network is trained on union of a subset of CIFAR10 with size 10000 containing samples with true labels and another subset of CIFAR10 datasets with varying size containing random labels. The learned networks are all global minima for the objective function on the subset with true labels. The left plot indicates the training and test errors based on the size of the set with random labels. The plot in the middle shows change in different measures based on the size of the set with random labels. The plot on the right indicates the relationship between expected sharpness and KL in PAC-bayes for each of the experiments. Measures are calculated as explained in Figures 1 and 2. as increasing the norm by decreasing σ causes decrease in sharpness and vice versa. It is therefore important to find the right balance between the norm and sharpness by choosing σ appropriately in order to get a reasonable bound on the capacity. In our experiments we observe that looking at both these measures jointly indeed makes a better predictor for the generalization error. As discussed earlier, Dziugaite and Roy [8] numerically optimize the overall PAC-Bayes generalization bound over a family of multivariate Gaussian distributions (different choices of perturbations and priors). Since the precise way the sharpness and KL-divergence are combined is not tight, certainly not in (5), nor in the more refined bound used by Dziugaite and Roy [8], we prefer shying away from numerically optimizing the balance between sharpness and the KL-divergence. Instead, we propose using bi-criteria plots, where sharpness and KL-divergence are plotted against each other, as we vary the perturbation variance. For example, in the center and right panels of Figure 2 we show such plots for networks trained on true and random labels respectively. We see that although sharpness by itself is not sufficient for explaining generalization in this setting (as we saw in the left panel), the bi-criteria plots are significantly lower for the true labels. Even more so, the change in the bi-criteria plot as we increase the number of samples is significantly larger with random labels, correctly capturing the required increase in capacity. For example, to get a fixed value of expected sharpness such as ϵ = 0.05, networks trained with random labels require higher norm compared to those trained with true labels. This behavior is in agreement with our earlier discussion, that sharpness is sensitive to scaling of the parameters and is not a capacity control measure as it can be artificially changed by scaling the network. However, combined with the norm, sharpness does seem to provide a capacity measure. 3 Empirical Investigation In this section we investigate the ability of the discussed measures to explain the the generalization phenomenon discussed in the Introduction. We already saw in Figures 1 and 2 that these measures capture the difference in generalization behavior of models trained on true or random labels, including the increase in capacity as the sample size increases, and the difference in this increase between true and random labels. Different Global Minima Given different global minima of the training loss on the same training set and with the same model class, can these measures indicate which model is going to generalize better? In order to verify this property, we can calculate each measure on several different global minima and see if lower values of the measure imply lower generalization error. In order to find different global minima for the training loss, we design an experiment where we force the optimization methods to converge to different global minima with varying generalization abilities by forming a confusion set that includes samples with random labels. The optimization is done on the loss that includes examples from both the confusion set and the training set. Since deep learning models have very high capacity, the optimization over the union of confusion set and training set generally leads to a point with zero error over both confusion and training sets which thus is a global minima for the 7 #hidden units 8 32 128 512 2K 8K error 0 0.02 0.04 0.06 0.08 training test 32 128 512 2K 8K 0 0.2 0.4 0.6 0.8 1 KL #106 0 1 2 expected sharpness 0 0.05 0.1 0.15 0.2 0.25 0.3 KL #106 0 1 2 expected sharpness 0 0.05 0.1 0.15 0.2 0.25 0.3 32 128 512 2048 Figure 4: The generalization of two layer perceptron trained on MNIST with varying number of hidden units. The left plot indicates the training and test errors. The test error decreases as the size increases. The middle plot shows measures for each of the trained networks. The plot on the right indicates the relationship between sharpness and KL in PAC-Bayes for each experiment. Measures are calculated as explained in Figures 1 and 2. training set. We randomly select a subset of CIFAR10 dataset with 10000 data points as the training set and our goal is to find networks that have zero error on this set but different generalization abilities on the test set. In order to do that, we train networks on the union of the training set with fixed size 10000 and confusion sets with varying sizes that consists of CIFAR10 samples with random labels; and we evaluate the learned model on an independent test set. The trained network achieves zero training error but as shown in Figure 3, the test error of the model increases with increasing size of the confusion set. The middle panel of this Figure suggests that the norm of the learned networks can indeed be predictive of their generalization behavior. However, we again observe that sharpness has a poor behavior in these experiments. The right panel of this figure also suggests that PAC-Bayes measure of joint sharpness and KL divergence, has better behavior - for a fixed expected sharpness, networks that have higher generalization error, have higher norms. Increasing Network Size We also repeat the experiments conducted by Neyshabur et al. [20] where a fully connected feedforward network is trained on MNIST dataset with varying number of hidden units and we check the values of different complexity measures on each of the learned networks. The left panel in Figure 4 shows the training and test error for this experiment. While 32 hidden units are enough to fit the training data, we observe that networks with more hidden units generalize better. Since the optimization is done without any explicit regularization, the only possible explanation for this phenomenon is the implicit regularization by the optimization algorithm. Therefore, we expect a sensible complexity measure to decrease beyond 32 hidden units and behave similar to the test error. Different measures are reported for learned networks. The middle panel suggest that all margin/norm based complexity measures decrease for larger networks up to 128 hidden units. For networks with more hidden units, ℓ2 norm and ℓ1-path norm increase with the size of the network. The middle panel suggest that ℓ2-path norm and spectral norm can provide some explanation for this phenomenon. However, as we discussed in Section 2, the actual complexity measure based on ℓ2-path norm and spectral norm also depends on the number of hidden units and taking this into account indicates that these measures cannot explain this phenomenon. In Appendix A, we discuss another complexity measure that also depends the spectral norm through Lipschitz continuity or robustness argument. Even though this bound is very loose (exponential in input dimension), it is monotonic with respect to the spectral norm that is reported in the plots. The right panel shows that the joint PAC-Bayes measure decrease for larger networks up to size 128 but fails to explain this generalization behavior for larger networks. This suggests that the measures looked so far are not sufficient to explain all the generalization phenomenon observed in neural networks. 4 Conclusion Learning with deep neural networks displays good generalization behavior in practice, a phenomenon that remains largely unexplained. In this paper we discussed different candidate complexity measures that might explain generalization in neural networks. We outline a concrete methodology for investigating such measures, and report on experiments studying how well the measures explain different phenomena. While there is no clear choice yet, some combination of expected sharpness and norms do seem to capture much of the generalization behavior of neural networks. A major issue still left unresolved is how the choice of optimization algorithm biases such complexity to be low, and what is the precise relationship between optimization and implicit regularization. 8 References [1] M. Anthony and P. L. Bartlett. Neural network learning: Theoretical foundations. cambridge university press, 2009. [2] P. Bartlett, D. J. Foster, and M. Telgarsky. Spectrally-normalized margin bounds for neural networks. arXiv preprint arXiv:1706.08498, 2017. [3] 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, 1998. [4] P. L. Bartlett. The impact of the nonlinearity on the VC-dimension of a deep network. Preprint, 2017. [5] P. L. Bartlett and S. Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3(Nov):463–482, 2002. [6] P. L. Bartlett, V. Maiorov, and R. Meir. Almost linear vc dimension bounds for piecewise polynomial networks. Neural computation, 10(8):2159–2173, 1998. [7] P. Chaudhari, A. Choromanska, S. Soatto, and Y. LeCun. Entropy-sgd: Biasing gradient descent into wide valleys. arXiv preprint arXiv:1611.01838, 2016. [8] G. K. Dziugaite and D. M. Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017. [9] T. Evgeniou, M. Pontil, and T. Poggio. Regularization networks and support vector machines. Advances in computational mathematics, 13(1):1–50, 2000. [10] M. Hardt, B. Recht, and Y. Singer. Train faster, generalize better: Stability of stochastic gradient descent. In ICML, 2016. [11] N. Harvey, C. Liaw, and A. Mehrabian. Nearly-tight vc-dimension bounds for piecewise linear neural networks. arXiv preprint arXiv:1703.02930, 2017. [12] N. S. Keskar, D. Mudigere, J. Nocedal, M. Smelyanskiy, and P. T. P. Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016. [13] J. Langford and R. Caruana. (not) bounding the true error. In Proceedings of the 14th International Conference on Neural Information Processing Systems: Natural and Synthetic, pages 809–816. MIT Press, 2001. [14] U. v. Luxburg and O. Bousquet. Distance-based classification with lipschitz functions. Journal of Machine Learning Research, 5(Jun):669–695, 2004. [15] D. McAllester. Simplified pac-bayesian margin bounds. Lecture notes in computer science, pages 203–215, 2003. [16] D. A. McAllester. Some PAC-Bayesian theorems. In Proceedings of the eleventh annual conference on Computational learning theory, pages 230–234. ACM, 1998. [17] D. A. McAllester. PAC-Bayesian model averaging. In Proceedings of the twelfth annual conference on Computational learning theory, pages 164–170. ACM, 1999. [18] B. Neyshabur, R. Salakhutdinov, and N. Srebro. Path-SGD: Path-normalized optimization in deep neural networks. In Advanced in Neural Information Processsing Systems (NIPS), 2015. [19] B. Neyshabur, R. Tomioka, and N. Srebro. Norm-based capacity control in neural networks. In Proceeding of the 28th Conference on Learning Theory (COLT), 2015. [20] B. Neyshabur, R. Tomioka, and N. Srebro. In search of the real inductive bias: On the role of implicit regularization in deep learning. Proceeding of the International Conference on Learning Representations workshop track, 2015. 9 [21] B. Neyshabur, R. Tomioka, R. Salakhutdinov, and N. Srebro. Data-dependent path normalization in neural networks. In the International Conference on Learning Representations, 2016. [22] B. Neyshabur, Y. Wu, R. Salakhutdinov, and N. Srebro. Path-normalized optimization of recurrent neural networks with relu activations. Advances in Neural Information Processing Systems, 2016. [23] S. Shalev-Shwartz and S. Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014. [24] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [25] A. J. Smola, B. Schölkopf, and K.-R. Müller. The connection between regularization operators and support vector kernels. Neural networks, 11(4):637–649, 1998. [26] J. Sokolic, R. Giryes, G. Sapiro, and M. R. Rodrigues. Generalization error of invariant classifiers. arXiv preprint arXiv:1610.04574, 2016. [27] N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. In International Conference on Computational Learning Theory, pages 545–560. Springer Berlin Heidelberg, 2005. [28] N. Srebro, J. Rennie, and T. S. Jaakkola. Maximum-margin matrix factorization. In Advances in neural information processing systems, pages 1329–1336, 2005. [29] H. Xu and S. Mannor. Robustness and generalization. Machine learning, 86(3):391–423, 2012. [30] C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017. 10 | 2017 | 48 |
6,985 | Bregman Divergence for Stochastic Variance Reduction: Saddle-Point and Adversarial Prediction Zhan Shi Xinhua Zhang University of Illinois at Chicago Chicago, Illinois 60661 {zshi22,zhangx}@uic.edu Yaoliang Yu University of Waterloo Waterloo, ON, N2L3G1 yaoliang.yu@uwaterloo.ca Abstract Adversarial machines, where a learner competes against an adversary, have regained much recent interest in machine learning. They are naturally in the form of saddle-point optimization, often with separable structure but sometimes also with unmanageably large dimension. In this work we show that adversarial prediction under multivariate losses can be solved much faster than they used to be. We first reduce the problem size exponentially by using appropriate sufficient statistics, and then we adapt the new stochastic variance-reduced algorithm of Balamurugan & Bach (2016) to allow any Bregman divergence. We prove that the same linear rate of convergence is retained and we show that for adversarial prediction using KL-divergence we can further achieve a speedup of #example times compared with the Euclidean alternative. We verify the theoretical findings through extensive experiments on two example applications: adversarial prediction and LPboosting. 1 Introduction Many algorithmic advances have been achieved in machine learning by finely leveraging the separability in the model. For example, stochastic gradient descent (SGD) algorithms typically exploit the fact that the objective is an expectation of a random function, with each component corresponding to a training example. A “dual” approach partitions the problem into blocks of coordinates and processes them in a stochastic fashion [1]. Recently, by exploiting the finite-sum structure of the model, variance-reduction based stochastic methods have surpassed the well-known sublinear lower bound of SGD. Examples include SVRG [2], SAGA [3], SAG [4], Finito [5], MISO [6], and SDCA [7, 8], just to name a few. Specialized algorithms have also been proposed for accommodating proximal terms [9], and for further acceleration through the condition number [10–13]. However, not all empirical risks are separable in its plain form, and in many cases dualization is necessary for achieving separability. This leads to a composite saddle-point problem with convexconcave (saddle) functions K and M: (x∗, y∗) = arg minx maxy K(x, y) + M(x, y), where K(x, y) = 1 n Pn k=1 ψk(x, y). (1) Most commonly used supervised losses for linear models can be written as g⋆(Xw), where g⋆is the Fenchel dual of a convex function g, X is the design matrix, and w is the model vector. So the regularized risk minimization can be naturally written as minw maxα α′Xw + Ω(w) −g(α), where Ωis a regularizer. This fits into our framework (1) with a bilinear function K and a decoupled function M. Optimization for this specific form of saddle-point problems has been extensively studied. For example, [14] and [15] performed batch updates on w and stochastic updates on α, while [16] and [17] performed doubly stochastic updates on both w and α, achieving O( 1 ϵ ) and O(log 1 ϵ ) rates respectively. The latter two also studied the more general form (1). Our interest in this paper is double stochasticity, aiming to maximally harness the power of separability and stochasticity. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Adversarial machines, where the learner competes against an adversary, have re-gained much recent interest in machine learning [18–20]. On one hand they fit naturally into the saddle-point optimization framework (1) but on the other hand they are known to be notoriously challenging to solve. The central message of this work is that certain adversarial machines can be solved significantly faster than they used to be. Key to our development is a new extension of the stochastic variance-reduced algorithm in [17] such that it is compatible with any Bregman divergence, hence opening the possibility to largely reduce the quadratic condition number in [17] by better adapting to the underlying geometry using non-Euclidean norms and Bregman divergences. Improving condition numbers by Bregman divergence has long been studied in (stochastic, proximal) gradient descent [21, 22]. The best known algorithm is arguably stochastic mirror descent [23], which was extended to saddle-points by [16] and to ADMM by [24]. However, they can only achieve the sublinear rate O(1/ϵ) (for an ϵ-accurate solution). On the other hand, many recent stochastic variancereduced methods [2–6, 9, 17] that achieve the much faster linear rate O(log 1/ϵ) rely inherently on the Euclidean structure, and their extension to Bregman divergence, although conceptually clear, remains challenging in terms of the analysis. For example, the analysis of [17] relied on the resolvent of monotone operators [25] and is hence restricted to the Euclidean norm. In §2 we extend the notion of Bregman divergence to saddle functions and we prove a new Pythagorean theorem that may be of independent interest for analyzing first order algorithms. In §4 we introduce a fundamentally different proof technique (details relegated to Appendix C) that overcomes several challenges arising from a general Bregman divergence (e.g. asymmetry and unbounded gradient on bounded domain), and we recover similar quantitative linear rate of convergence as [17] but with the flexibility of using suitable Bregman divergences to reduce the condition number. The new stochastic variance-reduced algorithm Breg-SVRG is then applied to the adversarial prediction framework (with multivariate losses such as F-score) [19, 20]. Here we make three novel contributions: (a) We provide a significant reformulation of the adversarial prediction problem that reduces the dimension of the optimization variable from 2n to n2 (where n is the number of samples), hence making it amenable to stochastic variance-reduced optimization (§3). (b) We develop a new efficient algorithm for computing the proximal update with a separable saddle KL-divergence (§5). (c) We verify that Breg-SVRG accelerates its Euclidean alternative by a factor of n in both theory and practice (§6), hence confirming again the uttermost importance of adapting to the underlying problem geometry. To our best knowledge, this is the first time stochastic variance-reduced methods have been shown with great promise in optimizing adversarial machines. Finally, we mention that we expect our algorithm Breg-SVRG to be useful for solving many other saddle-point problems, and we provide a second example (LPboosting) in experiments (§6). 2 Bregman Divergence and Saddle Functions In this section we set up some notations, recall some background materials, and extend Bregman divergences to saddle functions, a key notion in our later analysis. Bregman divergence. For any convex and differentiable function ψ over some closed convex set C ⊆Rd, its induced Bregman divergence is defined as: ∀x ∈int(C), x′ ∈C, ∆ψ(x′, x) := ψ(x′) −ψ(x) −⟨∇ψ(x), x′ −x⟩, (2) where ∇ψ is the gradient and ⟨·, ·⟩is the standard inner product in Rd. Clearly, ∆ψ(x′, x) ≥0 since ψ is convex. We mention two familiar examples of Bregman divergence. • Squared Euclidean distance: ∆ψ(x′, x) = 1 2 ∥x′ −x∥2 2 , ψ(x) = 1 2 ∥x∥2 2, where ∥· ∥2 is ℓ2 norm. • (Unnormalized) KL-divergence: ∆ψ(x′, x) = P i x′ i log x′ i xi −x′ i + xi, ψ(x) = P i xi log xi. Strong convexity. Following [26] we call a function f ψ-convex if f −ψ is convex, i.e. for all x, x′ f(x′) ≥f(x) + ⟨∂f(x), x′ −x⟩+ ∆ψ(x′, x). (3) Smoothness. A function f is L-smooth wrt a norm ∥·∥if its gradient ∇f is L-Lipschitz continuous, i.e., for all x and x′, ∥∇f(x′) −∇f(x)∥∗≤L ∥x′ −x∥, where ∥· ∥∗is the dual norm of ∥· ∥. The change of a smooth function, in terms of its induced Bregman divergence, can be upper bounded by the change of its input and lower bounded by the change of its slope, cf. Lemma 2 in Appendix A. 2 Saddle functions. Recall that a function φ(x, y) over Cz = Cx × Cy is called a saddle function if it is convex in x for any y ∈Cy, and concave in y for any x ∈Cx. Given a saddle function φ, we call (x∗, y∗) its saddle point if ∀x ∈Cx, ∀y ∈Cy, φ(x∗, y) ≤φ(x∗, y∗) ≤φ(x, y∗), (4) or equivalently (x∗, y∗) ∈arg minx∈Cx maxy∈Cy φ(x, y). Assuming φ is differentiable, we denote Gφ(x, y) := [∂xφ(x, y); −∂yφ(x, y)]. (5) Note the negation sign due to the concavity in y. We can quantify the notion of “saddle”: A function f(x, y) is called φ-saddle iff f −φ is a saddle function, or equivalently, ∆f(z′, z) ≥∆φ(z′, z) (see below). Note that any saddle function φ is 0-saddle and φ-saddle. Bregman divergence for saddle functions. We now define the Bregman divergence induced by a saddle function φ: for z = (x, y) and z′ = (x′, y′) in Cz, ∆φ(z′, z) := ∆φy(x′, x) + ∆−φx(y′, y) = φ(x′, y) −φ(x, y′) −⟨Gφ(z), z′ −z⟩, (6) where φy(x) = φ(x, y) is a convex function of x for any fixed y, and similarly φx(y) = φ(x, y) is a concave (hence the negation) function of y for any fixed x. The similarity between (6) and the usual Bregman divergence ∆ψ in (2) is apparent. However, φ is never evaluated at z′ but z (for G) and the cross pairs (x′, y) and (x, y′). Key to our subsequent analysis is the following lemma that extends a result of [27] to saddle functions (proof in Appendix A). Lemma 1. Let f and g be φ-saddle and ϕ-saddle respectively, with one of them being differentiable. Then, for any z = (x, y) and any saddle point (if exists) z∗:= (x∗, y∗) ∈ arg minx maxy {f(z) + g(z)} , we have f(x, y∗)+g(x, y∗) ≥f(x∗, y)+g(x∗, y)+∆φ+ϕ(z, z∗). Geometry of norms. In the sequel, we will design two convex functions ψx(x) and ψy(y) such that their induced Bregman divergences are “distance enforcing” (a.k.a. 1-strongly convex), that is, w.r.t. two norms ∥·∥x and ∥·∥y that we also design, the following inequality holds: ∆x(x, x′) := ∆ψx(x, x′) ≥1 2 ∥x −x′∥2 x , ∆y(y, y′) := ∆ψy(y, y′) ≥1 2 ∥y −y′∥2 y . (7) Further, for z = (x, y), we define ∆z(z, z′) := ∆ψx−ψy(z, z′) ≥1 2 ∥z −z′∥2 z , where ∥z∥2 z := ∥x∥2 x + ∥y∥2 y (8) When it is clear from the context, we simply omit the subscripts and write ∆, ∥·∥, and ∥·∥∗. 3 Adversarial Prediction under Multivariate Loss A number of saddle-point based machine learning problems have been listed in [17]. Here we give another example (adversarial prediction under multivariate loss) that is naturally formulated as a saddle-point problem but also requires a careful adaptation to the underlying geometry—a challenge that was not addressed in [17] since their algorithm inherently relies on the Euclidean norm. We remark that adaptation to the underlying geometry has been studied in the (stochastic) mirror descent framework [23], with significant improvements on condition numbers or gradient norm bounds. Surprisingly, no analogous efforts have been attempted in the stochastic variance reduction framework—a gap we intend to fill in this work. The adversarial prediction framework [19, 20, 28], arising naturally as a saddle-point problem, is a convex alternative to the generative adversarial net [18]. Given a training sample X = [x1, . . . , xn] and ˜y = [˜y1, . . . , ˜yn] ∈{0, 1}n, adversarial prediction optimizes the following saddle function that is an expectation of some multivariate loss ℓ(y, z) (e.g. F-score) over the labels y, z ∈{0, 1}n of all data points: min p∈∆2n h max q∈∆2n E y∼p,z∼q ℓ(y, z), s.t. E z∼q( 1 nXz) = 1 nX˜y i (9) Here the proponent tries to find a distribution p(·) over the labeling on the entire training set in order to minimize the loss (∆2n is the 2n dimensional probability simplex). An opponent in contrast tries to maximize the expected loss by finding another distribution q(·), but his strategy is subject to the constraint that the feature expectation matches that of the empirical distribution. Introducing a 3 Lagrangian variable θ to remove the feature expectation constraint and specializing the problem to F-score where ℓ(y, z) = 2y′z 1′y+1′z and ℓ(0, 0) := 1, the partial dual problem can be written as max θ −λ 2 ∥θ∥2 2 + 1 nθ′X˜y + min p∈∆2n max q∈∆2n E y∼p,z∼q h 2y′z 1′y+1′z −1 nθ′Xy i , (10) where we use y′z to denote the standard inner product and we followed [19] to add an ℓ2 2 regularizer on θ penalizing the dual variables on the constraints over the training data. It appears that solving (10) can be quite challenging, because the variables p and q in the inner minimax problem have 2n entries! A constraint sampling algorithm was adopted in [19] to address this challenge, although no formal guarantee was established. Note that we can maximize the outer unconstrained variable θ (with dimension the same as the number of features) relatively easily using for instance gradient ascent, provided that we can solve the inner minimax problem quickly—a significant challenge to which we turn our attention below. Surprisingly, we show here that the inner minimax problem in (10) can be significantly simplified. The key observation is that the expectation in the objective depends only on a few sufficient statistics of p and q. Indeed, by interpreting p and q as probability distributions over {0, 1}n we have: E 2y′z 1′y + 1′z = p({0})q({0}) + n X i=1 n X j=1 E 2y′z 1′y+1′z[[1′y = i]][[1′z = j]] (11) = p({0})q({0}) + n X i=1 n X j=1 2ij i + j · 1 i E (y[[1′y = i]]) | {z } αi ′ · 1 j E (z[[1′z = j]]) | {z } βj , (12) where [[·]] = 1 if · is true, and 0 otherwise. Crucially, the variables αi and βj are sufficient for re-expressing (10), since 1′αi = 1 i E (1′y[[1′y = i]]) = E[[1′y = i]] = p({1′y = i}), (13) X i iαi = X i E (y[[1′y = i]]) = Ey, (14) and similar equalities also hold for βj. In details, the inner minimax problem of (10) simplifies to: min α∈S max β∈S 1 n2 n X i=1 n X j=1 2ijn2 i+j α′ iβj+n2α′ i11′βj | {z } fij(αi,βj) −n1′αi−n1′βj−θ′Xiαi +Ω(α)−Ω(β), (15) where S = {α ≥0 : 1′α ≤1, ∀i, ∥iαi∥∞≤∥αi∥1}, Ω(α) = µ P i,j αij log(αij). (16) Importantly, α = [α1; . . . , αn] (resp. β) has n2 entries, which is significantly smaller than the 2n entries of p (resp. q) in (10). For later purpose we have also incorporated an entropy regularizer for α and β respectively in (15). To justify the constraint set S, note from (12) and (13) that for any distribution p of y: since α ≥0 and y ∈{0, 1}n, ∥iαi∥∞≤E∥y[[1′y = i]]∥∞≤E[[1′y = i]] = ∥αi∥1. (17) Conversely, for any α ∈S, we can construct a distribution p such that iαij = E (yj[[1′y = i]]) = p({1′y = i, yj = 1}) in the following algorithmic way: Fix i and for each j define Yj = {y ∈ {0, 1}n : 1′y = i, yj = 1}. Let U = {1, . . . , n}. Find an index j in U that minimizes αij and set p({y}) = iαij/|Yj| for each y ∈Yj. Perform the following updates: U ←U \ {j}, ∀k ̸= j, Yk ←Yk \ Yj, αik ←αik −αij|Yk ∩Yj|/|Yj| (18) Continue this procedure until U is empty. Due to the way we choose j, α remains nonnegative and by construction αij = p({1′y = i, yj = 1}) once we remove j from U. The objective function in (15) fits naturally into the framework of (1), with Ω(α) −Ω(β) and constraints corresponding to M, and the rest terms to K. The entropy function Ωis convex wrt the KL-divergence, which is in turn distance enforcing wrt the ℓ1 norm over the probability simplex [23]. In the next section we propose the SVRG algorithm with Bregman divergence (Breg-SVRG) that (a) provably optimizes strongly convex saddle function with a linear convergence rate, and (b) adapts to the underlying geometry by choosing an appropriate Bregman divergence. Then, in §5 we apply Breg-SVRG to (15) and achieve a factor of n speedup over a straightforward instantiation of [17]. 4 4 Breg-SVRG for Saddle-Point Algorithm 1: Breg-SVRG for Saddle-Point 1 Initialize z0 randomly. Set ˜z = z0. 2 for s = 1, 2, . . . do ▷epoch index 3 ˜µ ←˜µs := ∇K(˜z), z0 ←zs 0 := zm 4 for t = 1, . . . , m do ▷iter index 5 Randomly pick ξ ∈{1, . . . , n}. 6 Compute vt using (20). 7 Update zt using (21). 8 ˜z ←˜zs := m P t=1 (1 + η)tzt . m P t=1 (1 + η)t. In this section we propose an efficient algorithm for solving the general saddle-point problem in (1) and prove its linear rate of convergence. Our main assumption is: Assumption 1. There exist two norms ∥·∥x and ∥·∥y such that each ψk is a saddle function and L-smooth; M is (ψx −ψy)-saddle; and ψx and ψy are distance enforcing (cf. (7)). Note that w.l.o.g. we have scaled the norms so that the usual strong convexity parameter of M is 1. Recall we defined ∥z∥z and ∆z in (8). For saddle-point optimization, it is common to define a signed gradient G(z) := [∂xK(z); −∂yK(z)] (since K is concave in y). Recall J = K + M, and (x∗, y∗) is a saddle-point of J. Using Assumption 1, we measure the gap of an iterate zt = (xt, yt) as follows: ϵt = ϵ(zt) = J(xt, y∗) −J(x∗, yt) ≥∆(zt, z∗) ≥1 2 ∥zt −z∗∥2 ≥0. (19) Inspired by [2, 9, 17], we propose in Algorithm 1 a new stochastic variance-reduced algorithm for solving the saddle-point problem (1) using Bregman divergences. The algorithm proceeds in epochs. In each epoch, we first compute the following stochastic estimate of the signed gradient G(zt) by drawing a random component from K: vt = vx(zt) −vy(zt) where vx(zt) := ∂xψξ(zt) −∂xψξ(˜z) + ∂xK(˜z) vy(zt) := ∂yψξ(zt) −∂yψξ(˜z) + ∂yK(˜z) . (20) Here ˜z is the pivot chosen after completing the previous epoch. We make two important observations: (1) By construction the stochastic gradient vt is unbiased: Eξ[vt] = G(zt); (2) The expensive gradient evaluation ∂K(˜z) need only be computed once in each epoch since ˜z is held unchanged. If ˜z →z∗, then the variance of vt would be largely reduced hence faster convergence may be possible. Next, Algorithm 1 performs the following joint proximal update: (xt+1, yt+1)=arg min x max y η ⟨vx(zt), x⟩+ η ⟨vy(zt), y⟩+ ηM(x, y) + ∆(x, xt) −∆(y, yt), (21) where we have the flexibility in choosing a suitable Bregman divergence to better adapt to the underlying geometry. When ∆(x, xt) = 1 2∥x −xt∥2 2, we recover the special case in [17]. However, to handle the asymmetry in a general Bregman divergence (which does not appear for the Euclidean distance), we have to choose the pivot ˜z in a significantly different way than [2, 9, 17]. We are now ready to present our main convergence guarantee for Breg-SVRG in Algorithm 1. Theorem 1. Let Assumption 1 hold, and choose a sufficiently small η > 0 such that m := l log 1−ηL 18ηL2 −η−1 /log(1 + η) m ≥1. Then Breg-SVRG enjoys linear convergence in expectation: Eϵ(˜zs) ≤(1 + η)−ms[∆(z∗, z0) + c(Z + 1)ϵ(z0)], where Z = Pm−1 t=0 (1+η)t, c = 18η2L2 1−ηL . (22) For example, we may set η = 1 45L2 , which leads to c = O(1/L2), m = Θ L2 , (1 + η)m ≥64 45, and Z = O(L2). Therefore, between epochs, the gap ϵ(˜zs) decays (in expectation) by a factor of 45 64, and each epoch needs to conduct the proximal update (21) for m = Θ(L2) number of times. (We remind that w.l.o.g. we have scaled the norms so that the usual strong convexity parameter is 1.) In total, to reduce the gap below some threshold ϵ, Breg-SVRG needs to call the proximal update (21) O(L2 log 1 ϵ ) number of times, plus a similar number of component gradient evaluations. Discussions. As mentioned, Algorithm 1 and Theorem 1 extend those in [17] which in turn extend [2, 9] to saddle-point problems. However, [2, 9, 17] all heavily exploit the Euclidean structure (in particular symmetry) hence their proofs cannot be applied to an asymmetric Bregman divergence. Our innovations here include: (a) A new Pythagorean theorem for the newly introduced saddle Bregman divergence (Lemma 1). (b) A moderate extension of the variance reduction lemma in [9] to accommodate any norm (Appendix B). (c) A different pivot ˜z is adopted in each epoch to handle 5 asymmetry. (d) A new analysis technique through introducing a crucial auxiliary variable that enables us to bound the function gap directly. See our proof in Appendix C for more details. Compared with classical mirror descent algorithms [16, 23] that can also solve saddle-point problems with Bregman divergences, our analysis is fundamentally different and we achieve the significantly stronger rate O(log(1/ϵ) than the sublinear O(1/ϵ) rate of [16], at the expense of a squared instead of linear dependence on L. Similar tradeoff also appeared in [17]. We will return to this issue in Section 5. Variants and acceleration. Our analysis also supports to use different ξ in vx and vy. The standard acceleration methods such as universal catalyst [10] and non-uniform sampling can be applied directly (see Appendix E where L, the largest smoothness constant over all pieces, is replaced by their mean). 5 Application of Breg-SVRG to Adversarial Prediction The quadratic dependence on L, the smoothness parameter, in Theorem 1 reinforces the need to choose suitable Bregman divergences. In this section we illustrate how this can be achieved for the adversarial prediction problem in Section 3. As pointed out in [17], the factorization of K is important, and we consider three schemes: (a) ψk = fij; (b) ψk = 1 n Pn j=1 fk,j; and (c) ψk = 1 n Pn i=1 fi,k. W.l.o.g. let us fix the µ in (16) to 1. Comparison of smoothness constant. Both α and β are n2-dimensional, and the bilinear function fij can be written as α′Aijβ, where Aij ∈Rn2×n2 is an n-by-n block matrix, with the (i, j)-th block being n2( 2ij i+j I + 11′) and all other blocks being 0. The linear terms in (15) can be absorbed into the regularizer Ωwithout affecting the smoothness parameter. For scheme (a), the smoothness constant L2 under ℓ2 norm depends on the spectral norm of Aij: L2 = maxi,j n2(n+ 2ij i+j )) = Θ(n3). In contrast the smoothness constant L1 under ℓ1 norm depends on the absolute value of the entries in Aij: L1 = maxi,j n2(1+ 2ij i+j ) = Θ(n3); no saving is achieved. For scheme (b), the bilinear function ψk corresponds to 1 nα′ Pn j=1 Akjβ. Then L1 = O(n2) while L2 2 = 1 n2 max k max v:∥v∥2=1 Xn j=1
Akjv
2 2 ≥n2 max ∥v∥2=1 Xn j=1 ∥11′v∥2 = n5. (23) Therefore, L2 1 saves a factor of n compared with L2 2. Comparison of smoothness constant for the overall problem. By strong duality, we may push the maximization over θ to the innermost level of (10), arriving at an overall problem in α and β only: min {αi}∈S max {βj}∈S 1 n2 n X i=1 n X j=1 fij(αi, βj) −i λnc′Xαi + ij 2λα′ iX′Xαj + 1 2λn2 ∥c∥2 2 . (24) where c = X˜y. The quadratic term w.r.t. α can be written as α′Bijα, where Bij ∈Rn2×n2 is an n-by-n block matrix, with its (i, j)-th block being ij 2λX′X and all other blocks being 0. And we assume each ∥xi∥2 ≤1. The smoothness constant can be bounded separately from Aij and Bij; see (128) in Appendix F. For scheme (a), the smoothness constant square L2 2 under ℓ2 norm is upper bounded by the sum of spectral norm square of Aij and Bij. So L2 2 ≥maxi,j ij 2λn 2 = Ω(n6), i.e. L2 = Θ(n3). In contrast the smoothness constant square L2 1 under ℓ1 norm is at most the sum of square of maximum absolute value of the entries in Aij and Bij. Hence L2 1 ≤maxi,j n2(1+ 2ij i+j ) 2 + maxi,j ij 2λ 2 = Θ(n6), i.e. L1 =Θ(n3). So no saving is achieved here. For scheme (b), ψk corresponds to 1 n(α′ Pn j=1 Akjβ + α′ Pn j=1 Bkjα). Then L2 1 ≤1 n2 max k max v:∥v∥1=1
Xn j=1 Akjv
2 ∞+ max v:∥v∥1=1
Xn j=1 Bkjv
2 ∞ (by (128)) (25) ≤1 n2 max k max j n2(1+ 2kj k+j ) 2 + kj 2 2 = n4, (26) and by setting β to 0 in (126), we get L2 2 ≥n5 similar to (23). Therefore, L2 1 saves a factor of n compared with L2 2. Similar results apply to scheme (c) too. We also tried non-uniform sampling, but 6 it does not change the order in n. It can also be shown that if our scheme randomly samples n entries from {Aij, Bij}, the above L1 and L2 cannot be improved by further engineering the factorization. Computational complexity. We finally seek efficient algorithms for the proximal update (21) used by Breg-SVRG. When M(α, β) = Ω(α) −Ω(β) as in (16), we can solve α and β separately as: min α X ik αik log(αik/bik) −cik, s.t. 1′α ≤1, ∀i ∀k, 0 ≤iαik ≤1′αi. (27) where bik and cik are constants. In Appendix D we designe an efficient “closed form” algorithm which finds an ϵ accurate solution in O(n2 log2 1 ϵ ) time, which is also on par with that for computing the stochastic gradient in schemes (b) and (c). Although scheme (a) reduces the cost of gradient computation to O(n), its corresponding smoothness parameter L2 1 is increased by n2 times, hence not worthwhile. We did manage to design an ˜O(n) algorithm for the proximal update in scheme (a), but empirically the overall convergence is rather slow. If we use the Euclidean squared distance as the Bregman divergence, then a term ∥α −αt∥2 2 needs to be added to the objective (27). No efficient “closed form” solution is available, and so in experiments we simply absorbed M into K, and then the proximal update becomes the Euclidean projection onto S, which does admit a competitive O(n2 log2(1/ϵ)) time solution. 6 Experimental Results Our major goal here is to show that empirically Entropy-SVRG (Breg-SVRG with KL divergence) is significantly more efficient than Euclidean-SVRG (Breg-SVRG with squared Euclidean distance) on some learning problems, especially those with an entropic regularizer and a simplex constraint. 6.1 Entropy regularized LPBoost We applied Breg-SVRG to an extension of LP Boosting using entropy regularization [29]. In a binary classification setting, the base hypotheses over the training set can be compactly represented as U = (y1x1, . . . , ynxn)′. Then the model considers a minimax game between a distribution d ∈∆n over training examples and a distribution w ∈∆m over the hypotheses: min d∈∆n,di≤ν max w∈∆m d′Uw + λΩ(d) −γΩ(w). (28) Here w tries to combine the hypotheses to maximize the edge (prediction confidence) yix′ iw, while the adversary d tries to place more weights (bounded by ν) on “hard” examples to reduce the edge. Settings. We experimented on the adult dataset from the UCI repository, which we partitioned into n = 32, 561 training examples and 16,281 test examples, with m = 123 features. We set λ = γ = 0.01 and ν = 0.1 due to its best prediction accuracy. We tried a range of values of the step size η, and the best we found was 10−3 for Entropy-SVRG and 10−6 for Euclidean-SVRG (larger step size for Euclidean-SVRG fluctuated even worse). For both methods, m = 32561/50 gave good results. The stochastic gradient in d was computed by U:jwj, where U:j is the j-th column and j is randomly sampled. The stochastic gradient in w is diU ′ i:. We tried with Uijwj and Uijdi (scheme (a) in §5), but they performed worse. We also tried with the universal catalyst in the same form as [17], which can be directly extended to Entropy-SVRG. Similarly we used the non-uniform sampling based on the ℓ2 norm of the rows and columns of U. It turned out that the Euclidean-SVRG can benefit slightly from it, while Entropy-SVRG does not. So we only show the “accelerated” results for the former. To make the computational cost comparable across machines, we introduced a counter called effective number of passes: #pass. Assume the proximal operator has been called #po number of times, then #pass := number of epochs so far + n+m nm · #po. (29) We also compared with a “convex” approach. Given d, the optimal w in (28) obviously admits a closed-form solution. General saddle-point problems certainly do not enjoy such a convenience. However, we hope to take advantage of this opportunity to study the following question: suppose we solve (28) as a convex optimization in d and the stochastic gradient were computed from the optimal 7 0 200 400 600 800 Number of effective passes 10-5 10-4 10-3 10-2 10-1 100 Primal gap Entropy, Saddle Entropy, Convex Euclidean, Saddle Euclidean, Convex (a) Primal gap v.s. #pass 0 200 400 600 800 Number of effective passes 75 77 79 81 83 85 Test accuracy (%) Entropy, Saddle Entropy, Convex Euclidean, Saddle Euclidean, Convex (b) Test accuracy v.s. #pass Figure 1: Entropy Regularized LPBoost on adult 0 100 200 300 400 Number of effective passes 10-4 10-2 100 Primal gap Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (a) Primal gap v.s. #pass 0 5 10 15 20 CPU time(mins) 10-4 10-2 100 Primal gap Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (b) Primal gap v.s. CPU time 0 100 200 300 Number of effective passes 0.9 0.92 0.94 0.96 Test F-score Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (c) Test F-score v.s. #pass 0 5 10 15 CPU time(mins) 0.9 0.92 0.94 0.96 Test F-score Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (d) Test F-score v.s. CPU time Figure 2: Adversarial Prediction on the synthetic dataset. w, would it be faster than the saddle SVRG? Since solving w requires visiting the entire U, strictly speaking the term n+m nm ·#po in the definition of #pass in (29) should be replaced by #po. However, we stuck with (29) because our interest is whether a more accurate stochastic gradient in d (based on the optimal w) can outperform doubly stochastic (saddle) optimization. We emphasize that this comparison is only for conceptual understanding, because generally optimizing the inner variable requires costly iterative methods. Results. Figure 1(a) demonstrated how fast the primal gap (with w optimized out for each d) is reduced as a function of the number of effective passes. Methods based on entropic prox are clearly much more efficient than Euclidean prox. This corroborates our theory that for problems like (28), Entropy-SVRG is more suitable for the underlying geometry (entropic regularizer with simplex constraints). We also observed that using entropic prox, our doubly stochastic method is as efficient as the “convex” method, meaning that although at each iteration the w in saddle SVRG is not the optimal for the current d, it still allows the overall algorithm to perform as fast as if it were. This suggests that for general saddle-point problems where no closed-form inner solution is available, our method will still be efficient and competitive. Note this “convex” method is similar to the optimizer used by [29]. Finally, we investigated the increase of test accuracy as more passes over the data are performed. Figure 1(b) shows, once more, that the entropic prox does allow the accuracy to be improved much faster than Euclidean prox. Again, the convex and saddle methods perform similarly. As a final note, the Euclidean/entropic proximal operator for both d and w can be solved in either closed form, or by a 1-D line search based on partial Lagrangian. So their computational cost differ in the same order of magnitude as multiplication v.s. exponentiation, which is much smaller than the difference of #pass shown in Figure 1. 6.2 Adversarial prediction with F-score Datasets. Here we considered two datasets. The first is a synthetic dataset where the positive examples are drawn from a 200 dimensional normal distribution with mean 0.1 · 1 and covariance 0.5 · I, and negative examples are drawn from N(−0.1 · 1, 0.5 · I). The training set has n = 100 samples, half are positive and half are negative. The test set has 200 samples with the same class ratio. Notice that n = 100 means we are optimizing over two 100-by-100 matrices constrained to a challenging set S. So the optimization problem is indeed not trivial. 8 0 200 400 600 Number of effective passes 10-4 10-2 100 102 Primal gap Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (a) Primal gap v.s. #pass 0 20 40 60 80 CPU time(mins) 10-4 10-2 100 102 Primal gap Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (b) Primal gap v.s. CPU time 0 50 100 150 200 Number of effective passes 0.75 0.8 0.85 0.9 Test F-score Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (c) Test F-score v.s. #pass 0 10 20 30 CPU time(mins) 0.75 0.8 0.85 0.9 Test F-score Euclidean, Convex Euclidean, Saddle Euclidean, Saddle, Catalyst Entropy, Convex Entropy, Saddle Entropy, Saddle, Catalyst (d) Test F-score v.s. CPU time Figure 3: Adversarial Prediction on the ionosphere dataset. The second dataset, ionosphere, has 211 training examples (122 pos and 89 neg). 89 examples were used for testing (52 pos and 37 neg). Each example has 34 features. Methods. To apply saddle SVRG, we used strong duality to push the optimization over θ to the inner-most level of (10), and then eliminated θ because it is a simple quadratic. So we ended up with the convexconcave optimization as shown in (24), where the K part of (15) is augmented with a quadratic term in α. The formulae for computing the stochastic gradient using scheme (b) are detailed in Appendix G. We fixed µ = 1, λ = 0.01 for the ionosphere dataset, and µ = 1, λ = 0.1 for the synthetic dataset. We also tried the universal catalyst along with non-uniform sampling where each i was sampled with a probability proportional to Pn k=1 ∥Aik∥2 F , and similarly for j. Here ∥·∥F is the Frobenious norm. Parameter Tuning. Since each entry in the n × n matrix α is relatively small when n is large, we needed a relatively small step size. When n = 100, we used 10−2 for Entropy-SVRG and 10−6 for Euclidean-SVRG (a larger step size makes it over-fluctuate). When applying catalyst, the catalyst regularizor can suppress the noise from larger step size. After a careful trade off between catalyst regularizor parameter and larger step size, we managed to achieve faster convergence empirically. Results. The results on the two datasets are shown in Figures 2 and 3 respectively. We truncated the #pass and CPU time in subplots (c) and (d) because the F-score has stabilized and we would rather zoom in to see the initial growing phase. In terms of primal gap versus #pass (subplot a), the entropy based method is significantly more effective than Euclidean methods on both datasets (Figure 2(a) and 3(a)). Even with catalyst, Euclidean-Saddle is still much slower than the entropy based methods on the synthetic dataset in Figure 2(a). The CPU time comparisons (subplot b) follow the similar trend, except that the “convex methods” should be ignored because they are introduced only to compare #pass. The F-score is noisy because, as is well known, it is not monotonic with the primal gap and glitches can appear. In subplots 2(d) and 3(d), the entropy based methods achieve higher F-score significantly faster than the plain Euclidean based methods on both datasets. In terms of passes (subplots 2(c) and 3(c)), Euclidean-Saddle and Entropy-Saddle achieved a similar F-score at first because their primal gaps are comparable at the beginning. After 20 passes, the F-score of Euclidean-Saddle is overtaken by Entropy-Saddle as the primal gap of Entropy-Saddle become much smaller than Euclidean-Saddle. 7 Conclusions and Future Work We have proposed Breg-SVRG to solve saddle-point optimization and proved its linear rate of convergence. Application to adversarial prediction confirmed its effectiveness. For future work, we are interested in relaxing the (potentially hard) proximal update in (21). We will also derive similar reformulations for DCG and precision@k, with a quadratic number of variables and with a finite sum structure that is again amenable to Breg-SVRG, leading to a similar reduction of the condition number compared to Euclidean-SVRG. These reformulations, however, come with different constraint sets, and new proximal algorithms with similar complexity as for the F-score can be developed. 9 References [1] S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate frank-wolfe optimization for structural SVMs. In ICML. 2013. [2] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS. 2013. [3] A. Defazio, F. Bach, and S. Lacoste-Julien. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In NIPS. 2014. [4] M. Schmidt, N. L. Roux, and F. Bach. Minimizing finite sums with the stochastic average gradient. Mathematical Programming, 2016. [5] A. J. Defazio, T. S. Caetano, and J. Domke. Finito: A faster, permutable incremental gradient method for big data problems. In ICML. 2014. [6] J. Mairal. Incremental majorization-minimization optimization with application to large-scale machine learning. SIAM Journal on Optimization, 25(2):829–855, 2015. [7] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss minimization. J. Mach. Learn. Res., 14:567–599, 2013. [8] S. Shalev-Shwartz. SDCA without duality, regularization, and individual convexity. In ICML. 2016. [9] L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. SIAM Journal on Optimization, 24(4):2057–2075, 2014. [10] H. Lin, J. Mairal, and Z. Harchaoui. A universal catalyst for first-order optimization. In NIPS. 2015. [11] A. Nitanda. Stochastic proximal gradient descent with acceleration techniques. In NIPS. 2014. [12] S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. In ICML. 2014. [13] R. Babanezhad, M. O. Ahmed, A. Virani, M. Schmidt, J. Koneˇcn´y, and S. Sallinen. Stop wasting my gradients: Practical svrg. In NIPS. 2015. [14] Y. Zhang and L. Xiao. Stochastic primal-dual coordinate method for regularized empirical risk minimization. In ICML. 2015. [15] Z. Zhu and A. J. Storkey. Adaptive stochastic primal-dual coordinate descent for separable saddle point problems. In Machine Learning and Knowledge Discovery in Databases, pp. 645–658. 2015. [16] 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. [17] P. Balamurugan and F. Bach. Stochastic variance reduction methods for saddle-point problems. In NIPS. 2016. [18] 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. [19] H. Wang, W. Xing, K. Asif, and B. D. Ziebart. Adversarial prediction games for multivariate losses. In NIPS. 2015. [20] F. Farnia and D. Tse. A minimax approach to supervised learning. In NIPS. 2016. [21] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103(1):127–152, 2005. [22] Y. Nesterov. Excessive gap technique in nonsmooth convex minimization. SIAM J. on Optimization, 16(1):235–249, 2005. ISSN 1052-6234. [23] A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31(3):167–175, 2003. [24] H. Wang and A. Banerjee. Bregman alternating direction method of multipliers. In NIPS. 2014. [25] R. T. Rockafellar. Monotone operators associated with saddle functions and minimax problems. Nonlinear Functional Analysis, 18(part 1):397–407, 1970. 10 [26] J. C. Duchi, S. Shalev-Shwartz, Y. Singer, and A. Tewari. Composite objective mirror descent. In Proc. Annual Conf. Computational Learning Theory. 2010. [27] P. Tseng. On accelerated proximal gradient methods for convex-concave optimization. submitted to SIAM Journal on Optimization, 2009. [28] K. Asif, W. Xing, S. Behpour, and B. D. Ziebart. Adversarial cost-sensitive classification. In UAI. 2015. [29] M. K. Warmuth, K. A. Glocer, and S. V. N. Vishwanathan. Entropy regularized LPBoost. In Y. Freund, Y. L. Gy¨orfi, and G. Tur`an, eds., Proc. Intl. Conf. Algorithmic Learning Theory, no. 5254 in Lecture Notes in Artificial Intelligence, pp. 256 – 271. Springer-Verlag, Budapest, October 2008. [30] P. L. Combettes and J.-C. Pesquet. Proximal splitting methods in signal processing. Fixed-Point Algorithms for Inverse Problems in Science and Engineering, 49:185–212, 2011. 11 | 2017 | 480 |
6,986 | Perturbative Black Box Variational Inference Robert Bamler∗ Disney Research Pittsburgh, USA Cheng Zhang∗ Disney Research Pittsburgh, USA Manfred Opper TU Berlin Berlin, Germany Stephan Mandt∗ Disney Research Pittsburgh, USA firstname.lastname@{disneyresearch.com, tu-berlin.de} Abstract Black box variational inference (BBVI) with reparameterization gradients triggered the exploration of divergence measures other than the Kullback-Leibler (KL) divergence, such as alpha divergences. In this paper, we view BBVI with generalized divergences as a form of estimating the marginal likelihood via biased importance sampling. The choice of divergence determines a bias-variance trade-offbetween the tightness of a bound on the marginal likelihood (low bias) and the variance of its gradient estimators. Drawing on variational perturbation theory of statistical physics, we use these insights to construct a family of new variational bounds. Enumerated by an odd integer order K, this family captures the standard KL bound for K = 1, and converges to the exact marginal likelihood as K →∞. Compared to alpha-divergences, our reparameterization gradients have a lower variance. We show in experiments on Gaussian Processes and Variational Autoencoders that the new bounds are more mass covering, and that the resulting posterior covariances are closer to the true posterior and lead to higher likelihoods on held-out data. 1 Introduction Variational inference (VI) (Jordan et al., 1999) provides a way to convert Bayesian inference to optimization by minimizing a divergence measure. Recent advances of VI have been devoted to scalability (Hoffman et al., 2013; Ranganath et al., 2014), divergence measures (Minka, 2005; Li and Turner, 2016; Hernandez-Lobato et al., 2016), and structured variational distributions (Hoffman and Blei, 2015; Ranganath et al., 2016). While traditional stochastic variational inference (SVI) (Hoffman et al., 2013) was limited to conditionally conjugate Bayesian models, black box variational inference (BBVI) (Ranganath et al., 2014) enables SVI on a large class of models. It expresses the gradient as an expectation, and estimates it by Monte-Carlo sampling. A variant of BBVI uses reparameterized gradients and has lower variance (Salimans and Knowles, 2013; Kingma and Welling, 2014; Rezende et al., 2014; Ruiz et al., 2016). BBVI paved the way for approximate inference in complex and deep generative models (Kingma and Welling, 2014; Rezende et al., 2014; Ranganath et al., 2015; Bamler and Mandt, 2017). Before the advent of BBVI, divergence measures other than the KL divergence had been of limited practical use due to their complexity in both mathematical derivation and computation (Minka, 2005), but have since then been revisited. Alpha-divergences (Hernandez-Lobato et al., 2016; Dieng et al., 2017; Li and Turner, 2016) achieve a better matching of the variational distribution to different regions of the posterior and may be tuned to either fit its dominant mode or to cover its entire support. The problem with reparameterizing the gradient of the alpha-divergence is, however, that the resulting gradient estimates have large variances. It is therefore desirable to find other divergence measures with low-variance reparameterization gradients. ∗Equal contributions. First authorship determined by coin flip among first two authors. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we use concepts from perturbation theory of statistical physics to propose a new family of variational bounds on the marginal likelihood with low-variance reparameterization gradients. The lower bounds are enumerated by an order K, which takes odd integer values, and are given by L(K)(λ, V0) = e−V0 K X k=0 1 k! E z∼q h log p(x, z) −log q(z; λ) + V0 ki . (1) Here, p(x, z) denotes the joint probability density function of the model with observations x and latent variables z, q is the variational distribution, which depends on variational parameters λ, and V0 ∈R is a reference point for the perturbative expansion, see below. In this paper, we motivate and discuss Eq. 1 (Section 3), and we analyze the properties of the proposed bound experimentally (Section 4). Our contributions are as follows. • We establish a view on black box variational inference with generalized divergences as a form of biased importance sampling (Section 3.1). The choice of divergence allows us to trade-off between a low-variance stochastic gradient and loose bound, and a tight variational bound with higher-variance Monte-Carlo gradients. As we explain below, importance sampling and point estimation are at opposite ends of this spectrum. • We combine these insights with ideas from perturbation theory of statistical physics to motivate the objective function in Eq. 1 (Section 3.2). We show that, for all odd K, L(K)(λ, V0) is a nontrivial lower bound on the marginal likelihood p(x). Thus, we propose the perturbative black box variational inference algorithm (PBBVI), which maximizes L(K)(λ, V0) over λ and V0 with stochastic gradient descent (SGD). For K = 1, our algorithm is equivalent to standard BBVI with the KL-divergence (KLVI). On the variance-bias spectrum, KLVI is on the side of large bias and low gradient variance. Increasing K to larger odd integers allows us to gradually trade in some increase in the gradient variance for some reduction of the bias. • We evaluate our PBBVI algorithm experimentally for the lowest nonstandard order K = 3 (Section 4). Compared to KLVI (K = 1), our algorithm fits variational distributions that cover more of the mass of the true posterior. Compared to alpha-VI, our experiments confirm that PBBVI uses gradient estimates with lower variance, and converges faster. 2 Related work Our approach is related to BBVI, VI with generalized divergences, and variational perturbation theory. We thus briefly discuss related work in these three directions. Black box variational inference (BBVI). BBVI has already been addressed in the introduction (Salimans and Knowles, 2013; Kingma and Welling, 2014; Rezende et al., 2014; Ranganath et al., 2014; Ruiz et al., 2016); it enables variational inference for many models. Our work builds upon BBVI in that BBVI makes a large class of new divergence measures between the posterior and the approximating distribution tractable. Depending on the divergence measure, BBVI may suffer from high-variance stochastic gradients. This is a practical problem that we aim to improve in this paper. Generalized divergences measures. Our work connects to generalized information-theoretic divergences (Amari, 2012). Minka (2005) introduced a broad class of divergences for variational inference, including alpha-divergences. Most of these divergences have been intractable in large-scale applications until the advent of BBVI. In this context, alpha-divergences were first suggested by Hernandez-Lobato et al. (2016) for local divergence minimization, and later for global minimization by Li and Turner (2016) and Dieng et al. (2017). As we show in this paper, alpha-divergences have the disadvantage of inducing high-variance gradients, since the ratio between posterior and variational distribution enters the bound polynomially instead of logarithmically. In contrast, our approach leads to a more stable inference scheme in high dimensions. Variational perturbation theory. Perturbation theory refers to methods that aim to truncate a typically divergent power series to a convergent series. In machine learning, these approaches have been addressed from an information-theoretic perspective by Tanaka (1999, 2000). ThoulessAnderson-Palmer (TAP) equations (Thouless et al., 1977) are a form of second-order perturbation theory. They were originally developed in statistical physics to include perturbative corrections to the mean-field solution of Ising models. They have been adopted into Bayesian inference in (Plefka, 1982) and were advanced by many authors (Kappen and Wiegerinck, 2001; Paquet et al., 2009; Opper 2 0 1 2 3 4 x −1 0 1 2 3 4 f(x) importance sampling: f(x) = x PBBVI (K =3, proposed): f (3) V0 (x) KLVI: f(x) = 1 + log(x) Figure 1: Different choices for f in Eq. 4. KLVI corresponds to f(x) = log(x)+const. (red), and importance sampling to f(x) = x (black). Our proposed PBBVI bound uses f (K) V0 (green, Eq. 7), which lies between KLVI and importance sampling (we set K = 3 and V0 = 0 for PBBVI here). −4 −2 0 2 4 z 0.0 0.1 0.2 0.3 0.4 0.5 p(z), q(z) target distribution p(z) PBBVI (K =3, proposed) α = 0.2 α →1 (KLVI) α = 2 Figure 2: Behavior of different VI methods on fitting a univariate Gaussian to a bimodal target distribution (black). PBBVI (proposed, green) covers more of the mass of the entire distribution than the traditional KLVI (red). Alpha-VI is mode seeking for large α and mass covering for smaller α. 1 50 100 150 200 number N of latent variables 10−7 10−1 105 1011 1017 1023 average variance of ∇˜L [log] α-divergence with α = 0.2 α-divergence with α = 2 α-divergence with α = 0.5 PBBVI (K =3, proposed) Figure 3: Sampling variance of the stochastic gradient (averaged over its components) in the optimum, for alpha-divergences (orange, purple, gray), and the proposed PBBVI (green). The variance grows exponentially with the latent dimension N for alpha-VI, and only algebraically for PBBVI. et al., 2013; Opper, 2015). In variational inference, perturbation theory yields extra terms to the mean-field variational objective which are difficult to calculate analytically. This may be a reason why the methods discussed are not widely adopted by practitioners. In this paper, we emphasize the ease of including perturbative corrections in a black box variational inference framework. Furthermore, in contrast to earlier formulations, our approach yields a strict lower bound to the marginal likelihood which can be conveniently optimized. Our approach is different from the traditional variational perturbation formulation (Kleinert, 2009), which generally does not result in a bound. 3 Method In this section, we present our main contributions. We first present our view of black box variational inference (BBVI) as a form of biased importance sampling in Section 3.1. With this view, we bridge the gap between variational inference and importance sampling. In Section 3.2, we introduce our family of new variational bounds, and analyze their properties further in Section 3.3. 3.1 Black Box Variational Inference as Biased Importance Sampling Consider a probabilistic model with data x, latent variables z, and joint distribution p(x, z). We are interested in the posterior distribution over the latent variables, p(z|x) = p(x, z)/p(x). This involves the intractable marginal likelihood p(x). In variational inference (Jordan et al., 1999), we instead minimize a divergence measure between a variational distribution q(z; λ) and the posterior. Here, λ are parameters of the variational distribution, and we aim to find the parameters λ∗that minimize the distance to the posterior. This is equivalent to maximizing a lower bound on the marginal likelihood. We call the difference between the log variational distribution and the log joint distribution the interaction energy, V (z; λ) = log q(z; λ) −log p(x, z). (2) We use V or V (z) interchangeably to denote V (z; λ), and q(z) to denote q(z; λ), when more convenient. Using this notation, the marginal likelihood is p(x) = E q(z)[e−V (z)]. (3) We call e−V (z) = p(x, z)/q(z) the importance ratio, since sampling from q(z) to estimate the righthand side of Eq. 3 is equivalent to importance sampling. As importance sampling is inefficient in high dimensions, we resort to variational inference. To this end, let f(·) be any concave function defined on the positive reals. We assume furthermore that for all x > 0, we have f(x) ≤x. Applying Jensen’s inequality, we can lower-bound the marginal likelihood, p(x) ≥f(p(x)) ≥E q(z)[f(e−V (z;λ))] ≡Lf(λ). (4) Figure 1 shows exemplary choices of f. We maximize Lf(λ) using reparameterization gradients, where the bound is not computed analytically, but rather its gradients are estimated by sampling from 3 q(z) (Kingma and Welling, 2014). This leads to a stochastic gradient descent scheme, where the noise is a result of the Monte-Carlo estimation of the gradients. Our approach builds on the insight that black box variational inference is a type of biased importance sampling, where we estimate a lower bound of the marginal likelihood by sampling from a proposal distribution, iteratively improving this distribution. The approach is biased since we do not estimate the exact marginal likelihood but only a lower bound to this quantity. As we argue below, the introduced bias allows us to estimate the bound more easily, because we decrease the variance of this estimator. The choice of the function f thereby trades-offbetween bias and variance in the following way: • For f = id being the identity, we obtain importance sampling. (See the black line in Figure 1). In this case, Eq. 4 does not depend on the variational parameters, so there is nothing to optimize and we can directly sample from any proposal distribution q. Since the expectation under q of the importance ratio e−V (z) gives the exact marginal likelihood, there is no bias. If the model has a large number of latent variables, the importance ratio e−V (z) becomes tightly peaked around the minimum of the interaction energy V , resulting in a very high variance of this estimator. Importance sampling is therefore on one extreme end of the bias-variance spectrum. • For f = log, we obtain the familiar Kullback-Leibler (KL) bound. (See the pink line in Figure 1; here we add a constant of 1 for comparison, which does not affect the optimization). Since f(e−V (z)) = −V (z), the bound is LKL(λ) = E q(z)[−V (z)] = E q(z)[log p(x, z) −log q(z)]. (5) The Monte-Carlo expectation of Eq[−V ] has a much smaller variance than Eq[e−V ], implying efficient learning (Bottou, 2010). However, by replacing e−V with −V we introduce a bias. We can further trade-offless variance for even more bias by dropping the entropy term on the right-hand side of Eq. 5. A flexible enough variational distribution will shrink to zero variance, which completely eliminates the sampling noise. This is equivalent to point-estimation, and is at the opposite end of the bias-variance spectrum. • Now, consider any f which is between the logarithm and the identity, e.g., the green line in Figure 1 (this is the regularizing function we propose in Section 3.2 below). The more similar f is to the identity, the less biased is our estimate of the marginal likelihood, but the larger the variance. Conversely, the more f behaves like the logarithm, the easier it is to estimate f(e−V (z)) by sampling, while at the same time the bias grows. One example of alternative divergences to the KL divergence that have been discussed in the literature are alpha-divergences (Minka, 2005; Hernandez-Lobato et al., 2016; Li and Turner, 2016; Dieng et al., 2017). Up to a constant, they correspond to the following choice of f: f (α)(e−V ) ∝e−(1−α)V . (6) The real parameter α determines the distance to the importance sampling case (α = 0). As α approaches 1 from below, this bound leads to a better-behaved estimation problem of the Monte-Carlo gradient. However, unless taking the limit of α →1 (where the objective becomes the KL-bound), V still enters exponentially in the bound. As we show, this leads to a high variance of the gradient estimator in high dimensions (see Figure 3 discussed below). The alpha-divergence bound is therefore similarly as hard to estimate as the marginal likelihood in importance sampling. Our analysis relies on the observation that expectations of exponentials in V are difficult to estimate, and expectations of polynomials in V are easy to estimate. We derive a family of new variational bounds which are polynomials in V , where increasing the order of the polynomial reduces the bias. 3.2 Perturbative Black Box Variational Inference Perturbative bounds. We now motivate the family of lower bounds proposed in Eq. 1 in the introduction based on the considerations outlined above. For fixed odd integer K and fixed real value V0, the bound L(K)(λ, V0) is of the form of Eq. 4 with the following regularizing function f: f (K) V0 (x) = e−V0 K X k=0 (V0 + log x)k k! =⇒ f (K) V0 (e−V ) = e−V0 K X k=0 (V0 −V )k k! . (7) 4 Algorithm 1: Perturbative Black Box Variational Inference (PBBVI) Input: joint probability p(x, z); order of perturbation K (odd integer); learning rate schedule ρt; number of Monte Carlo samples S; number of training iterations T; variational family q(z, λ) that allows for reparameterization gradients, i.e., z ∼q( · , λ) ⇐⇒z = g(ϵ, λ) where ϵ ∼pn with a fixed noise distribution pn and a differentiable reparameterization function g. Output: fitted variational parameters λ∗. 1 initialize λ randomly and V0 ←0; 2 for t ←1 to T do 3 draw S samples ϵ1, . . . , ϵS ∼pn from the noise distribution; // obtain reparameterization gradient estimates using automatic differentiation: 4 gλ ←ˆ∇λ ˜L(K)(λ, V0) ≡∇λ h 1 S PS s=1 PK k=0 1 k! log p(x, g(ϵs, λ))−log q(g(ϵs, λ); λ)+V0 ki ; 5 gV0 ←ˆ∇V0 ˜L(K)(λ, V0) ≡∇V0 h 1 S PS s=1 PK k=0 1 k! log p(x, g(ϵs, λ))−log q(g(ϵs, λ); λ)+V0 ki ; // perform variable updates (see second to last paragraph of Section 3.2): 6 λ ←λ + ρtgλ; 7 V0 ←V0 + ρt h gV0 −1 S PS s=1 PK k=0 1 k! log p(x, g(ϵs, λ)) −log q(g(ϵs, λ); λ) + V0 ki ; end Here, the second (equivalent) formulation makes it explicit that f (K) V0 is the Kth order Taylor expansion of its argument e−V in V around some reference energy V0. Figure 1 shows f (K) V0 (x) for K = 1 (red) and K = 3 (green). The curves are concave and lie below the identity, touching it at x = e−V0. We show in Section 3.3 that these properties extend to every odd K and every V0 ∈R. Therefore, L(K)(λ, V0) is indeed a lower bound on the marginal likelihood. The rationale for the design of the regularizing function in Eq. 7 is as follows. On the one hand, the gradients of the resulting bound should be easy to estimate via the reparameterization approach. We achieve low-variance gradient estimates by making f (K) V0 (e−V ) a polynomial in V , i.e., in contrast to the alpha-bound, V never appears in the exponent. On the other hand, the regularizing function should be close to the identity function so that the resulting bound has low bias. For K = 1, we have L(1)(λ, V0) = e−V0 Eq[log p −log q + V0]. Maximizing L(1) over λ is independent of the value of V0 and equivalent to maximizing the standard KL bound LKL, see Eq. 5, which has low gradient variance and large bias. Increasing the order K to larger odd integers makes the Taylor expansion tighter, leading to a bound with lower bias. In fact, in the limit K →∞, the right-hand side of Eq. 7 is the series representation of the exponential function, and thus f (K) V0 converges pointwise to the identity. In practice, we propose to set K to a small odd integer larger than 1. Increasing K further reduces the bias, but it comes at the cost of increasing the gradient variance because the random variable V appears in higher orders under the expectation in Eq. 4. As discussed in Section 3.1, the KL bound LKL can be derived from a regularizing function f = log that does not depend on any further parameters like V0. The derivation of the KL bound therefore does not require the first inequality in Eq. 4, and one directly obtains a bound on the model evidence log p(x) ≡f(p(x)) from the second inequality alone. For K > 1, the bound L(K)(λ, V0) depends nontrivially on V0, and we have to employ the first inequality in Eq. 4 in order to make the bounded quantity on the left-hand side independent of V0. This expenses some tightness of the bound but makes the method more flexible by allowing us to optimize over V0 as well, as we describe next. Optimization algorithm. We now propose the perturbative black box variational inference (PBBVI) algorithm. Since L(K)(λ, V0) is a lower bound on the marginal likelihood for all λ and all V0, we can find the values λ∗and V ∗ 0 for which the bound is tightest by maximizing simultaneously over λ and V0. Algorithm 1 summarizes the PBBVI algorithm. We minimize −L(K)(λ, V0) using stochastic gradient descent (SGD) with reparameterization gradients and a learning rate ρt that decreases with the training iteration t according to Robbins-Monro bounds (Robbins and Monro, 1951). We obtain unbiased gradient estimators (denoted by “ ˆ∇”) using standard techniques: we replace the expectation 5 Eq[ · ] in Eq. 1 with the empirical average over a fixed number of S samples from q, and we calculate the reparameterization gradients with respect to λ and V0 using automatic differentiation. In practice, we typically discard the value of V ∗ 0 once the optimization is converged since we are only interested in the fitted variational parameters λ∗. However, during the optimization process, V0 is an important auxiliary quantity and the inference algorithm would be inconsistent without an optimization over V0: if we were to extend the model p(x, z) by an additional observed variable ˜x which is statistically independent of the latent variables z, then the log joint (as a function of z alone) changes by a constant positive prefactor. The posterior remains unchanged by the constant prefactor, and a consistent VI algorithm must therefore produce the same approximate posterior distribution q for both models. Optimizing over V0 ensures this consistency since the log joint appears in the lower bound only in the combination log p(x, z) + V0. Therefore, a rescaling of the log joint by a constant positive prefactor can be completely absorbed by a change in the reference energy V0. We observed in our experiments that the reference energy V0 can become very large (in absolute value) for models with many latent variables. To avoid numerical overflow or underflow from the prefactor e−V0, we consider the surrogate objective ˜L(K)(λ, V0) ≡eV0L(K)(λ, V0). The gradients with respect to λ of L(K)(λ, V0) and ˜L(K)(λ, V0) are equal up to a positive prefactor, so we can replace the former with the latter in the update step (line 6 in Algorithm 1). The gradient with respect to V0 is ∇V0L(K)(λ, V0) ∝∇V0 ˜L(K)(λ, V0)−˜L(K)(λ, V0) (line 7). Using the surrogate ˜L(K)(λ, V0) avoids numerical underflow or overflow, as well as exponentially increasing or decreasing gradients. Mass covering effect. In Figure 2, we fit a Gaussian distribution to a one-dimensional bimodal target distribution (black line), using different divergences. Compared to BBVI with the standard KL divergence (KLVI, pink line), alpha-divergences are more mode-seeking (purple line) for large values of α, and more mass-covering (orange line) for small α (Li and Turner, 2016). Our PBBVI bound (K = 3, green line) achieves a similar mass-covering effect as in alpha-divergences, but with associated low-variance reparameterization gradients. This is seen in Figure 3, discussed in Section 4.2, which compares the gradient variances of alpha-VI and PBBVI as a function of dimensions. 3.3 Proof of Correctness and Nontriviality of the Bound To conclude the presentation of the PBBVI algorithm, we prove that the objective in Eq. 1 is indeed a lower bound on the marginal likelihood for all odd orders K, and that the bound is nontrivial. Correctness. The lower bound L(K)(λ, V0) results from inserting the regularizing function f (K) V0 from Eq. 7 into Eq. 4. For odd K, it is indeed a valid lower bound because f (K) V0 is concave and lies below the identity. To see this, note that the second derivative ∂2f (K) V0 (x)/∂x2 = −e−V0(V0 + log x)K−1/((K −1)! x2) is non-positive everywhere for odd K. Therefore, the function is concave. Next, consider the function g(x) = f (K) V0 (x) −x, which has a stationary point at x = x0 ≡e−V0. Since g is also concave, x0 is a global maximum, and thus g(x) ≤g(x0) = 0 for all x, implying that f (K) V0 (x) ≤x. Thus, for odd K, the function f (K) V0 satisfies all requirements for Eq. 4, and L(K)(λ, V0) ≡Eq[f (K) V0 (e−V )] is a lower bound on the marginal likelihood. Note that an even order K does not lead to a valid concave regularizing function. Nontriviality. Since the marginal likelihood p(x) is always positive, a lower bound would be trivial if it was negative. We show that once the optimization algorithm has converged, the bound at the optimum is always positive. At the optimum, all gradients vanish. By setting the derivative with respect to V0 of the right-hand side of Eq. 1 to zero we find that Eq∗[(V ∗ 0 −V )K] = 0, where q∗≡q( · ; λ∗) is the variational distribution at the optimum. Thus, the lower bound at the optimum is L(λ∗, V ∗ 0 ) = e−V0 Eq∗[h(V )] with h(V ) = PK−1 k=0 1 k!(V ∗ 0 −V )k, where the sum runs only to K −1 because the term with k = K vanishes at V0 = V ∗ 0 . We show that h(V ) is positive for all V . If K = 1, then h(V ) = 1 is a positive constant. For K ≥3, h(V ) is a polynomial in V of even order K −1, whose highest order term has a positive coefficient 1/(K −1)!. Therefore, as V →±∞, the function h(V ) goes to positive infinity and it thus has a global minimum at some value ˜V ∈R. At the global minimum, its derivative vanishes, 0 = ∇˜V h( ˜V ) = −PK−2 k=0 1 k!(V ∗ 0 −˜V )k. Thus, at the global minimum of the polynomial h, all terms except the highest order term cancel, and we find h( ˜V ) = 1 (K−1)!(V ∗ 0 −˜V )K−1 ≥0, which is nonnegative because K −1 is even. The case h( ˜V ) = 0 is achieved if and only if ˜V = V ∗ 0 , but this would violate the condition ∇˜V h( ˜V ) = 0. Therefore, 6 Observations Mean Analytic 3std Inferred 3std (a) KLVI Observations Mean Analytic 3std Inferred 3std (b) PBBVI with K = 3 Figure 4: Gaussian process regression on synthetic data (green dots). Three standard deviations are shown in varying shades of orange. The blue dashed lines show three standard deviations of the true posterior. The red dashed lines show the inferred three standard deviations using KLVI (a) and PBBVI (b). We see that the results from our proposed PBBVI are close to the analytic solution while traditional KLVI underestimates the variances. Method Avg variances Analytic 0.0415 KLVI 0.0176 PBBVI 0.0355 Table 1: Average variances across training examples in the synthetic data experiment. The closer to the analytic solution, the better. Data set Crab Pima Heart Sonar KLVI 0.22 0.245 0.148 0.212 PBBVI 0.11 0.240 0.1333 0.1731 Table 2: Error rate of GP classification on the test set. The lower the better. Our proposed PBBVI consistently obtains better classification results. h( ˜V ) is strictly positive, and since ˜V is a global minimum of h, we have h(V ) ≥h( ˜V ) > 0 for all V ∈R. Inserting into the expression for L(λ∗, V ∗ 0 ) concludes the proof that the lower bound at the optimum is positive. 4 Experiments We evaluate PBBVI with different models. First we investigate its behavior in a controlled setup of Gaussian processes on synthetic data (Section 4.1). We then evaluate PBBVI based on a classification task using Gaussian processes classifiers, where we use data from the UCI machine learning repository (Section 4.2). This is a Bayesian non-conjugate setup where black box inference is required. Finally, we use an experiment with the variational autoencoder (VAE) to explore our approach on a deep generative model (Section 4.3). This experiment is carried out on MNIST data. We use the perturbative order K = 3 for all experiments with PBBVI. This corresponds to the lowest order beyond standard KLVI, since KLVI is equivalent to PBBVI with K = 1, and K has to be an odd integer. Across all the experiments, PBBVI demonstrates advantages based on different metrics. 4.1 GP Regression on Synthetic Data In this section, we inspect the inference behavior using a synthetic data set with Gaussian processes (GP). We generate the data according to a Gaussian noise distribution centered around a mixture of sinusoids, and sample 50 data points (green dots in Figure 4). We then use a GP to model the data, thus assuming the generative process f ∼GP(0, Λ) and yi ∼N(fi, ϵ). We first compute an analytic solution of the posterior of the GP, (three standard deviations shown in blue dashed lines) and compare it to approximate posteriors obtained by KLVI (Figure 4 (a)) and the proposed PBBVI (Figure 4 (b)). The results from PBBVI are almost identical to the analytic solution. In contrast, KLVI underestimates the posterior variance. This is consistent with Table 1, which shows the average diagonal variances. PBBVI results are much closer to the exact posterior variances. 4.2 Gaussian Process Classification We evaluate the performance of PBBVI and KLVI on a GP classification task. Since the model is non-conjugate, no analytical baseline is available in this case. We model the data with the following generative process: f ∼GP(0, Λ), zi = σ(fi), yi ∼Bern(zi). 7 0 2 · 104 4 · 104 6 · 104 8 · 104 105 training iteration −0.68 −0.66 −0.64 −0.62 normalized test log-likelihood under posterior mean PBBVI (K =3, proposed) α-VI with α = 0.5 Figure 5: Test log-likelihood (normalized by the number of test points) as a function of training iterations using GP classification on the Sonar data set. PBBVI converges faster than alpha-VI even though we tuned the number of Monte Carlo samples per training step (100) and the constant learning rate (10−5) so as to maximize the performance of alpha-VI on a validation set. 102 103 104 size of training set [log] −300 −250 −200 −150 −100 log-likelihood of test set PBBVI (K =3, proposed) KLVI Figure 6: Predictive likelihood of a VAE trained on different sizes of the data. The training data are randomly sampled subsets of the MNIST training set. The higher value the better. Our proposed PBBVI method outperforms KLVI mainly when the size of the training data set is small. The fewer the training data, the more advantage PBBVI obtains. Above, Λ is the GP kernel, σ indicates the sigmoid function, and Bern indicates the Bernoulli distribution. We furthermore use the Matern 32 kernel, Λij = s2(1 + √ 3 rij l ) exp(− √ 3 rij l ), rij = p (xi −xj)T (xi −xj). Data. We use four data sets from the UCI machine learning repository, suitable for binary classification: Crab (200 datapoints), Pima (768 datapoints), Heart (270 datapoints), and Sonar (208 datapoints). We randomly split each of the data sets into two halves. One half is used for training and the other half is used for testing. We set the hyper parameters s = 1 and l = √ D/2 throughout all experiments, where D is the dimensionality of input x. Table 2 shows the classification performance (error rate) for these data sets. Our proposed PBBVI consistently performs better than the traditional KLVI. Convergence speed comparison. We also carry out a comparison in terms of speed of convergence, focusing on PBBVI and alpha-divergence VI. Our results indicate that the smaller variance of the reparameterization gradient leads to faster convergence of the optimization algorithm. We train the GP classifier from Section 4.2 on the Sonar UCI data set using a constant learning rate. Figure 5 shows the test log-likelihood under the posterior mean as a function of training iterations. We split the data set into equally sized training, validation, and test sets. We then tune the learning rate and the number of Monte Carlo samples per gradient step to obtain optimal performance on the validation set after minimizing the alpha-divergence with a fixed budget of random samples. We use α = 0.5 here; smaller values of α lead to even slower convergence. We optimize the PBBVI lower bound using the same learning rate and number of Monte Carlo samples. The final test error rate is 22% on an approximately balanced data set. PBBVI converges an order of magnitude faster. Figure 3 in Section 3 provides more insight in the scaling of the gradient variance. Here, we fit GP regression models on synthetically generated data by maximizing the PBBVI lower bound and the alpha-VI lower bound with α ∈{0.2, 0.5, 2}. We generate a separate synthetic data set for each N ∈{1, . . . , 200} by drawing N random data points around a sinusoidal curve. For each N, we fit a one-dimensional GP regression with PBBVI and alpha-VI, respectively, using the same data set for both methods. The variational distribution is a fully factorized Gaussian with N latent variables. After convergence, we estimate the sampling variance of the gradient of each lower bound with respect to the posterior mean. We calculate the empirical variance of the gradient based on 105 samples from q, and we average over the N coordinates. Figure 3 shows the average sampling variance as a function of N on a logarithmic scale. The variance of the gradient of the alpha-VI bound grows exponentially in the number of latent variables. By contrast, we find only algebraic growth for PBBVI. 4.3 Variational Autoencoder We experiment on Variational Autoencoders (VAEs), and we compare the PBBVI and the KLVI bound in terms of predictive likelihoods on held-out data (Kingma and Welling, 2014). Autoencoders compress unlabeled training data into low-dimensional representations by fitting it to an encoderdecoder model that maps the data to itself. These models are prone to learning the identity function 8 when the hyperparameters are not carefully tuned, or when the network is too expressive, especially for a moderately sized training set. VAEs are designed to partially avoid this problem by estimating the uncertainty that is associated with each data point in the latent space. It is therefore important that the inference method does not underestimate posterior variances. We show that, for small data sets, training a VAE by maximizing the PBBVI lower bound leads to higher predictive likelihoods than maximizing the KLVI lower bound. We train the VAE on the MNIST data set of handwritten digits (LeCun et al., 1998). We build on the publicly available implementation by Burda et al. (2016) and also use the same architecture and hyperparamters, with L = 2 stochastic layers and S = 5 samples from the variational distribution per gradient step. The model has 100 latent units in the first stochastic layer and 50 latent units in the second stochastic layer. The VAE model factorizes over all data points. We train it by stochastically maximizing the sum of the PBBVI lower bounds for all data points using a minibatch size of 20. The VAE amortizes the gradient signal across data points by training inference networks. The inference networks express the mean and variance of the variational distribution as a function of the data point. We add an additional inference network that learns the mapping from a data point to the reference energy V0. Here, we use a network with four fully connected hidden layers of 200, 200, 100, and 50 units, respectively. MNIST contains 60,000 training images. To test our approach on smaller-scale data where Bayesian uncertainty matters more, we evaluate the test likelihood after training the model on randomly sampled fractions of the training set. We use the same training schedules as in the publicly available implementation, keeping the total number of training iterations independent of the size of the training set. Different to the original implementation, we shuffle the training set before each training epoch as this turns out to increase the performance for both our method and the baseline. Figure 6 shows the predictive log-likelihood of the whole test set, where the VAE is trained on random subsets of different sizes of the training set. We use the same subset to train with PBBVI and KLVI for each training set size. PBBVI leads to a higher predictive likelihood than traditional KLVI on subsets of the data. We explain this finding with our observation that the variational distributions obtained from PBBVI capture more of the posterior variance. As the size of the training set grows—and the posterior uncertainty decreases—the performance of KLVI catches up with PBBVI. As a potential explanation why PBBVI converges to the KLVI result for large training sets, we note that Eq∗[(V ∗ 0 −V )3] = 0 at the optimal variational distribution q∗and reference energy V ∗ 0 (see Section 3.3). If V becomes a symmetric random variable (such as a Gaussian) in the limit of a large training set, then this implies that Eq∗[V ] = V ∗ 0 , and PBBVI reduces to KLVI for large training sets. 5 Conclusion We first presented a view on black box variational inference as a form of biased importance sampling, where we can trade-offbias versus variance by the choice of divergence. Bias refers to the deviation of the bound from the true marginal likelihood, and variance refers to its reparameterization gradient estimator. We then proposed a family of new variational bounds that connect to variational perturbation theory, and which include corrections to the standard Kullback-Leibler bound. Our proposed PBBVI bound converges to the true marginal likelihood for large order K of the perturbative expansion, and we showed both theoretically and experimentally that it has lower-variance reparameterization gradients compared to alpha-VI. In order to scale up our method to massive data sets, future work will explore stochastic versions of PBBVI. Since the PBBVI bound contains interaction terms between all data points, breaking it up into mini-batches is non-straightforward. Besides, while our experiments used a fixed perturbative order of K = 3, it could be beneficial to increase the perturbative order at some point during the training cycle once an empirical estimate of the gradient variance drops below a certain threshold. Furthermore, the PBBVI and alpha-bounds can also be combined, such that PBBVI further approximates alpha-VI. This could lead to promising results on large data sets where traditional alpha-VI is hard to optimize due to its variance, and traditional PBBVI converges to KLVI. As a final remark, a tighter variational bound is not guaranteed to always result in a better posterior approximation since the variational family limits the quality of the solution. However, in the context of variational EM, where one performs gradient-based hyperparameter optimization on the log marginal likelihood, our bound gives more reliable results since higher orders of K can be assumed to approximate the marginal likelihood better. 9 References Amari, S. (2012). Differential-geometrical methods in statistics, volume 28. Springer Science & Business Media. Bamler, R. and Mandt, S. (2017). Dynamic word embeddings. In ICML. Bottou, L. (2010). Large-scale machine learning with stochastic gradient descent. In COMPSTAT. Springer. Burda, Y., Grosse, R., and Salakhutdinov, R. (2016). Importance weighted autoencoders. In ICLR. Dieng, A. B., Tran, D., Ranganath, R., Paisley, J., and Blei, D. M. (2017). Variational inference via χ upper bound minimization. In ICML. Hernandez-Lobato, J., Li, Y., Rowland, M., Bui, T., Hernández-Lobato, D., and Turner, R. (2016). Black-box alpha divergence minimization. In ICML. Hoffman, M. and Blei, D. (2015). Stochastic Structured Variational Inference. In AISTATS. Hoffman, M. D., Blei, D. M., Wang, C., and Paisley, J. W. (2013). Stochastic variational inference. JMLR, 14(1). Jordan, M. I., Ghahramani, Z., Jaakkola, T. S., and Saul, L. K. (1999). An introduction to variational methods for graphical models. Machine learning, 37(2). Kappen, H. J. and Wiegerinck, W. (2001). Second order approximations for probability models. MIT; 1998. Kingma, D. P. and Welling, M. (2014). Auto-encoding variational Bayes. In ICLR. Kleinert, H. (2009). Path integrals in quantum mechanics, statistics, polymer physics, and financial markets. World scientific. LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. volume 86. IEEE. Li, Y. and Turner, R. E. (2016). Rényi divergence variational inference. In NIPS. Minka, T. (2005). Divergence measures and message passing. Technical report, Technical report, Microsoft Research. Opper, M. (2015). Expectation propagation. In Krzakala, F., Ricci-Tersenghi, F., Zdeborova, L., Zecchina, R., Tramel, E. W., and Cugliandolo, L. F., editors, Statistical Physics, Optimization, Inference, and Message-Passing Algorithms, chapter 9, pages 263–292. Oxford University Press. Opper, M., Paquet, U., and Winther, O. (2013). Perturbative corrections for approximate inference in gaussian latent variable models. JMLR, 14(1). Paquet, U., Winther, O., and Opper, M. (2009). Perturbation corrections in approximate inference: Mixture modelling applications. JMLR, 10(Jun). Plefka, T. (1982). Convergence condition of the TAP equation for the infinite-ranged ising spin glass model. Journal of Physics A: Mathematical and general, 15(6):1971. Ranganath, R., Gerrish, S., and Blei, D. M. (2014). Black box variational inference. In AISTATS. Ranganath, R., Tang, L., Charlin, L., and Blei, D. (2015). Deep exponential families. In AISTATS. Ranganath, R., Tran, D., and Blei, D. (2016). Hierarchical variational models. In ICML. Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In ICML. Robbins, H. and Monro, S. (1951). A stochastic approximation method. The annals of mathematical statistics. Ruiz, F., Titsias, M., and Blei, D. (2016). The generalized reparameterization gradient. In NIPS. Salimans, T. and Knowles, D. A. (2013). Fixed-form variational posterior approximation through stochastic line ar regression. Bayesian Analysis, 8(4). Tanaka, T. (1999). A theory of mean field approximation. In NIPS. Tanaka, T. (2000). Information geometry of mean-field approximation. Neural Computation, 12(8). Thouless, D., Anderson, P. W., and Palmer, R. G. (1977). Solution of ’solvable model of a spin glass’. Philosophical Magazine, 35(3). 10 | 2017 | 481 |
6,987 | Kernel Feature Selection via Conditional Covariance Minimization Jianbo Chen⇤ University of California, Berkeley jianbochen@berkeley.edu Mitchell Stern⇤ University of California, Berkeley mitchell@berkeley.edu Martin J. Wainwright University of California, Berkeley wainwrig@berkeley.edu Michael I. Jordan University of California, Berkeley jordan@berkeley.edu Abstract We propose a method for feature selection that employs kernel-based measures of independence to find a subset of covariates that is maximally predictive of the response. Building on past work in kernel dimension reduction, we show how to perform feature selection via a constrained optimization problem involving the trace of the conditional covariance operator. We prove various consistency results for this procedure, and also demonstrate that our method compares favorably with other state-of-the-art algorithms on a variety of synthetic and real data sets. 1 Introduction Feature selection is an important issue in statistical machine learning, leading to both computational benefits (lower storage and faster computation) and statistical benefits, including increased model interpretability. With large data sets becoming ever more prevalent, feature selection has seen widespread usage across a variety of real-world tasks in recent years, including text classification, gene selection from microarray data, and face recognition [3, 14, 17]. In this work, we consider the supervised variant of feature selection, which entails finding a subset of the input features that explains the output well. This practice can reduce the computational expense of downstream learning by removing features that are redundant or noisy, while simultaneously providing insight into the data through the features that remain. Feature selection algorithms can generally be divided into two groups: those which are agnostic to the choice of learning algorithm, and those which attempt to find features that optimize the performance of a specific learning algorithm.1 Kernel methods have been successfully applied under each of these paradigms in recent work; for instance, see the papers [1, 8, 16, 19, 23, 25, 26, 29]. Kernel feature selection methods have the advantage of capturing nonlinear relationships between the features and the labels. Many previous approaches are filter methods based on the Hilbert-Schmidt Independence Criterion (HSIC), as proposed by Gretton et al. [13] as a measure of dependence. For instance, Song et al. [24, 25] proposed to optimize HSIC with greedy algorithms on features. Masaeli et al. [19] proposed Hilbert-Schmidt Feature Selection (HSFS), which optimizes HSIC with a continuous relaxation. In later work, Yamada et al. [29] proposed the HSIC-LASSO, in which the dual augmented Lagrangian can be used to find a global optimum. There are also wrapper methods ⇤Equal contribution. 1Feature selection algorithms that operate independently of the choice of predictor are referred to as filter methods. Algorithms tailored to specific predictors can be further divided into wrapper methods, which use learning algorithms to evaluate features based on their predictive power, and embedded methods, which combine feature selection and learning into a single problem [14]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. and embedded methods using kernels. Most of the methods add weights to features and optimize the original kernelized loss function together with a penalty on the weights [1, 5, 8, 11, 12, 27, 28]. For example, Cao et al. [5] proposed margin-based algorithms for SVMs to select features in the kernel space. Lastly, Allen [1] proposed an embedded method suitable for kernel SVMs and kernel ridge regression. In this paper, we propose to use the trace of the conditional covariance operator as a criterion for feature selection. We offer theoretical motivation for this choice and show that our method can be interpreted both as a filter method and as a wrapper method for a certain class of learning algorithms. We also show that the empirical estimate of the criterion is consistent as the sample size increases. Finally, we conclude with an empirical demonstration that our algorithm is comparable to or better than several other popular feature selection algorithms on both synthetic and real-world tasks. 2 Formulating feature selection Let X ⇢Rd be the domain of covariates X, and let Y be the domain of responses Y . Given n independent and identically distributed (i.i.d.) samples {(xi, yi), i = 1, 2, . . . , n} generated from an unknown joint distribution PX,Y together with an integer m d, our goal is to select m of the d total features X1, X2, . . . , Xd which best predict Y . Let S be the full set of features, and let T ✓S denote a subset of features. For ease of notation, we identify S = {X1, . . . , Xd} with [d] = {1, . . . , d}, and also identify XT with T . We formulate the problem of supervised feature selection from two perspectives below. The first perspective motivates our algorithm as a filter method. The second perspective offers an interpretation as a wrapper method. 2.1 From a dependence perspective Viewing the problem from the perspective of dependence, we would ideally like to identify a subset of features T of size m such that the remaining features S \ T are conditionally independent of the responses given T . However, this may not be achievable when the number of allowable features m is small. We therefore quantify the extent of the remaining conditional dependence using some metric Q, and aim to minimize Q over all subsets T of the appropriate size. More formally, let Q : 2[d] ! [0, 1) be a function mapping subsets of [d] to the non-negative reals that satisfies the following properties: • For a subset of features T , we have Q(T ) = 0 if and only if XS\T and Y are conditionally independent given XT . • The function Q is non-increasing, meaning that Q(T ) ≥Q(S) whenever T ✓S. Hence, the function Q achieves its minimum for the full feature set T = [d]. Given a fixed integer m, the problem of supervised feature selection can then be posed as min T :|T |=m Q(T ). (1) This formulation can be taken as a filter method for feature selection. 2.2 From a prediction perspective An alternative perspective aims at characterizing how well XT can predict Y directly within the context of a specific learning problem. Formally, we define the error of prediction as EF(X) = inf f2F EX,Y L(Y, f(X)), (2) where F is a class of functions from X to Y, and L is a loss function specified by the user. For example, in a univariate regression problem, the function class F might be the set of all linear functions, and the loss function might be the squared error L(Y, f(X)) = (Y −f(X))2. We then hope to solve the following problem: min T :|T |m EF(XT ) = min T :|T |m inf f2Fm EX,Y L(Y, f(XT )), where Fm is a class of functions supported on Rm. That is, we aim to find the subset of m features that minimizes the prediction error. This formulation thus falls within the scope of wrapper methods for feature selection. 2 3 Conditional covariance operator The conditional covariance operator provides a measure of conditional dependence for random variables. It was first proposed by Baker [2], and was further studied and used for sufficient dimension reduction by Fukumizu et al. [9, 10]. We provide a brief overview of this operator and some of its key properties here. Let (HX , kX ) and (HY, kY) denote reproducing kernel Hilbert spaces (RKHSs) of functions on spaces X and Y, respectively. Also let (X, Y ) be a random vector on X ⇥Y with joint distribution PX,Y . Assume the kernels kX and kY are bounded in expectation: EX[kX (X, X)] < 1 and EY [kY(Y, Y )] < 1. (3) The cross-covariance operator associated with the pair (X, Y ) is the mapping ⌃Y X : HX ! HY defined by the relations hg, ⌃Y XfiHY = EX,Y [(f(X) −EX[f(X)])(g(Y ) −EY [g(Y )])] for all f 2 HX and g 2 HY . (4) Baker [2] showed there exists a unique bounded operator VY X such that ⌃Y X = ⌃1/2 Y Y VY X⌃1/2 XX. (5a) The conditional covariance operator is then defined as ⌃Y Y |X = ⌃Y Y −⌃1/2 Y Y VY XVXY ⌃1/2 Y Y . (5b) Among other results, Fukumizu et al. [9, 10] showed that the conditional covariance operator captures the conditional variance of Y given X. More precisely, if the sum HX + R is dense in L2(PX), where L2(PX) is the space of all square-integrable functions on X, then we have hg, ⌃Y Y |XgiHY = EX[varY |X[g(Y )|X]] for any g 2 HY. (6) From Proposition 2 in the paper [10], we also know the residual error of g(Y ) with g 2 HY can be characterized by the conditional covariance operator. More formally, for any g 2 HY, we have hg, ⌃Y Y |XgiHY = inf f2HX EX,Y ((g(Y ) −EY [g(Y )]) −(f(X) −EX[f(X)]))2. (7) 4 Proposed method In this section, we describe our method for feature selection, which we call conditional covariance minimization (CCM). Let (H1, k1) denote an RKHS supported on X ⇢Rd. Let T ✓[d] be a subset of features with cardinality m d, and for all x 2 Rd, take xT 2 Rd to be the vector with components xT i = xi if i 2 T or 0 otherwise. We define the kernel kT 1 by kT 1 (x, ˜x) = k1(xT , ˜xT ) for all x, ˜x 2 X. Suppose further that the kernel k1 is permutation-invariant. That is, for any x, ˜x 2 X and permutation ⇡, denoting (x⇡(1), . . . , x⇡(d)) as x⇡, we have k1(x, ˜x) = k1(x⇡, ˜x⇡). (Note that this property holds for many common kernels, including the linear, polynomial, Gaussian, and Laplacian kernels.) Then for every T of cardinality m, kT 1 generates the same RKHS supported on Rm. We call this RKHS ( ˜H1, ek1). We will show the trace of the conditional covariance operator trace(⌃Y Y |X) can be interpreted as a dependence measure, as long as the RKHS H1 is large enough. We say that an RKHS (H, k) is characteristic if the map P ! EP [k(X, ·)] 2 H is one-to-one. If k is bounded, this is equivalent to saying that H + R is dense in L2(P) for any probability measure P [10]. We have the following lemma, whose proof is given in the appendix: Lemma 1. If k1 is bounded and characteristic, then ek1 is also characteristic. Let (H2, k2) denote an RKHS supported on Y. Based on the above lemma, we have the following theorem, which is a parallel version of Theorem 4 in [10]: Theorem 2. If (H1, k1) and (H2, k2) are characteristic, we have ⌃Y Y |X ⪯⌃Y Y |XT with equality holding if and only if Y ?? X|XT . 3 The proof is postponed to the appendix. With this generic result in place, we now narrow our focus to problems with univariate responses, including univariate regression, binary classification and multi-class classification. In the case of regression, we assume H2 is supported on R, and we take k2 to be the linear kernel: k2(y, ˜y) = y˜y (8) for all y, ˜y 2 R. For binary or multi-class classification, we take k2 to be the Kronecker delta function: k2(y, ˜y) = δ(y, ˜y) = ⇢1 if y = ˜y, 0 otherwise. (9) This can be equivalently interpreted as a linear kernel k(y, ˜y) = hy, ˜yi assuming a one-hot encoding of Y , namely that Y = {y 2 {0, 1}k : P i yi = 1} ⇢Rk, where k is the number of classes. When Y is R or {y 2 {0, 1}k : P i yi = 1} ⇢Rk, we obtain the following corollary of Theorem 2: Corollary 3. If (H1, k1) is characteristic, Y is R or {y 2 {0, 1}k : P i yi = 1} ⇢Rk, and (H2, k2) includes the identity function on Y, then we have Tr(⌃Y Y |X) Tr(⌃Y Y |XT ) for any subset T of features. Moreover, the equality Tr(⌃Y Y |X) = Tr(⌃Y Y |XT ) holds if and only if Y ?? X|XT . Hence, in the univariate case, the problem of supervised feature selection reduces to minimizing the trace of the conditional covariance operator over subsets of features with controlled cardinality: min T :|T |=m Q(T ) := Tr(⌃Y Y |XT ). (10) In the regression setting, Equation (7) implies the residual error of regression can also be characterized by the trace of the conditional covariance operator when using the linear kernel on Y. More formally, we have the following observation: Corollary 4. Let ⌃Y Y |XT denote the conditional covariance operator of (XT , Y ) in ( ˜H1, ek1). Define the space of functions Fm from Rm to Y as Fm = ˜H1 + R := {f + c : f 2 ˜H1, c 2 R}. (11) Then we have Tr(⌃Y Y |XT ) = EFm(XT ) = inf f2Fm EX,Y (Y −f(XT ))2. (12) Given the fact that the trace of the conditional covariance operator can characterize the dependence and the prediction error in regression, we will use the empirical estimate of it as our objective. Given n samples {(x1, y1), . . . , (xn, yn)}, the empirical estimate is given by [10]: trace(ˆ⌃(n) Y Y |XT ) := trace[ˆ⌃(n) Y Y −ˆ⌃(n) Y XT (ˆ⌃(n) XT XT + "nI)−1 ˆ⌃(n) XT Y ] = "n trace[GY (GXT + n"nIn)−1], where ˆ⌃T (n) Y X , ˆ⌃T (n) XT X and ˆ⌃(n) Y Y are the covariance operators defined with respect to the empirical distribution and GXT and GY are the centralized kernel matrices, respectively. Concretely, we define GXT : = (In −1 n T )KXT (In −1 n T ) and GY : = (In −1 n T )KY (In −1 n T ). The (i, j)th entry of the kernel matrix KXT is ˜k1(xi T , xj T ), with xi T denoting the ith sample with only features in T . As the kernel k2 on the space of responses is linear, we have KY = YYT , where Y is the n ⇥k matrix with each row being a sample response. Without loss of generality, we assume each column of Y is zero-mean, so that GY = KY = YYT . Our objective then becomes: trace[GY (GXT + n"nIn)−1] = trace[YYT (GXT + n"nIn)−1] = trace[YT (GXT + n"nIn)−1Y]. (13) For simplicity, we only consider univariate regression and binary classification where k = 1, but our discussion carries over to the multi-class setting with minimal modification. The objective becomes min |T |=m ˆQ(n)(T ) := yT (GXT + n"nIn)−1y, (14) where y = (y1, . . . , yn)T is an n-dimensional vector. We show the global optimal of the problem (14) is consistent. More formally, we have the following theorem: 4 Theorem 5 (Feature Selection Consistency). Let the set A = argmin|T |mQ(T ) be the set of all the optimal solutions to (12) and ˆT (n) 2 argmin|T |m ˆQ(n)(T ) be a global optimal of (14). If "n ! 0 and "nn ! 1 as n ! 1, we have P( ˆT (n) 2 A) ! 1. (15) Our proof is provided in the appendix. A comparable result is given in Fukumizu et al. [10] for the consistency of their dimension reduction estimator, but as our minimization takes place over a finite set, our proof is considerably simpler. 5 Optimization Finding a global optimum for (14) is NP-hard for generic kernels [28], and exhaustive search is computationally intractable if the number of features is large. We therefore approximate the problem of interest via continuous relaxation, as has previously been done in past work on feature selection [4, 27, 28]. 5.1 Initial relaxation We begin by introducing a binary vector w 2 {0, 1}d to indicate which features are active. This allows us to rephrase the optimization problem from (14) as min w yT (Gw⊙X + n"nIn)−1y subject to wi 2 {0, 1}, i = 1, . . . , d, T w = m, (16) where ⊙denotes the Hadamard product between two vectors and Gw⊙X is the centralized version of the kernel matrix Kw⊙X with (Kw⊙X)ij = k1(w ⊙xi, w ⊙xj). We then approximate the problem (16) by relaxing the domain of w to the unit hypercube [0, 1]d and replacing the equality constraint with an inequality constraint: min w yT (Gw⊙X + n"nIn)−1y subject to 0 wi 1, i = 1, . . . , d, T w m. (17) This objective can be optimized using projected gradient descent, and represents our first tractable approximation. A solution to the relaxed problem is converted back into a solution for the original problem by setting the m largest values of w to 1 and remaining values to 0. We initialize w to the uniform vector (m/d)[1, 1, . . . , 1]T in order to avoid the corners of the constraint set during the early stages of optimization. 5.2 Computational issues The optimization problem can be approximated and manipulated in a number of ways so as to reduce computational complexity. We discuss a few such options below. Removing the inequality constrant. The hard constraint T w m requires a nontrivial projection step, such as the one detailed in Duchi et al. [6]. We can instead replace it with a soft constraint and move it to the objective. Letting λ1 ≥0 be a hyperparameter, this gives rise to the modified problem min w yT (Gw⊙X + n"nIn)−1y + λ1( T w −m) subject to 0 wi 1, i = 1, . . . , d. (18) 5 Removing the matrix inverse. The matrix inverse in the objective function is an expensive operation. In light of this, we first define an auxiliary variable ↵2 Rn, add the equality constraint ↵= (Gw⊙X+n"nIn)−1y, and rewrite the objective as ↵T y. We then note that we may multiply both sides of the constraint by the centered kernel matrix to obtain the relation (Gw⊙X + n"nIn)↵= y. Letting λ2 ≥0 be a hyperparameter, we finally replace this relation by a soft `2 constraint to obtain min w,↵ ↵T y + λ2k(Gw⊙X + n"nIn)↵−yk2 2 subject to 0 wi 1, i = 1, . . . , d, T w m. (19) Using a kernel approximation. Rahimi and Recht [22] propose a method for approximating kernel evaluations by inner products of random feature vectors, so that k(x, ˜x) ⇡z(x)T z(˜x) for a random map z depending on the choice of kernel k. Let Kw ⇡UwU T w be such a decomposition, where Uw 2 Rn⇥D for some D < n. Then, defining Vw = (I − T /n)Uw, we similarly have that the centered kernel matrix can be written as Gw ⇡VwV T w . By the Woodbury matrix identity, we may write (Gw⊙X + n"nIn)−1 ⇡ 1 "nnI − 1 "2nn2 Vw(ID + 1 "nnV T w Vw)−1V T w = 1 "nn(I −Vw(V T w Vw + "nnID)−1V T w ). (20) Substituting this into our objective function, scaling by ✏nn, and removing the constant term yT y resulting from the identity matrix gives a new approximate optimization problem. This modification reduces the complexity of each optimization step from O(n2d + n3) to O(n2D + D3 + nDd). Choice of formulation. We remark that each of the three approximations beyond the initial relaxation may be independently used or omitted, allowing for a number of possible objectives and constraint sets. We explore some of these configurations in the experimental section below. 6 Experiments In this section, we evaluate our approach (CCM) on both synthetic and real-world data sets. We compare with several strong existing algorithms, including recursive feature elimination (RFE) [15], Minimum Redundancy Maximum Relevance (mRMR) [21], BAHSIC [24, 25], and filter methods using mutual information (MI) and Pearson’s correlation (PC). We use the author’s implementation for BAHSIC2 and use Scikit-learn [20] and Scikit-feature [17] packages for the rest of the algorithms. The code for our approach is publicly available at https://github.com/Jianbo-Lab/CCM. 6.1 Synthetic data We begin with experiments on the following synthetic data sets: • Binary classification (Friedman et al. [7]). Given Y = −1, (X1, . . . , X10) ⇠N(0, I10). Given Y = 1, X1 through X4 are standard normal conditioned on 9 P4 j=1 X2 j 16, and (X5, . . . , X10) ⇠N(0, I6). • 3-dimensional XOR as 4-way classification. Consider the 8 corners of the 3-dimensional hypercube (v1, v2, v3) 2 {−1, 1}3, and group them by the tuples (v1v3, v2v3), leaving 4 sets of vectors paired with their negations {v(i), −v(i)}. Given a class i, a point is generated from the mixture distribution (1/2)N(v(i), 0.5I3) + (1/2)N(−v(i), 0.5I3). Each example additionally has 7 standard normal noise features for a total of 10 dimensions. • Additive nonlinear regression: Y = −2 sin(2X1)+max(X2, 0)+X3 +exp(−X4)+", where (X1, . . . , X10) ⇠N(0, I10) and " ⇠N(0, 1). 2http://www.cc.gatech.edu/~lsong/code.html 6 Figure 1: The above plots show the median rank (y-axis) of the true features as a function of sample size (x-axis) for the simulated data sets. Lower median ranks are better. The dotted line indicates the optimal median rank. The first data set represents a standard nonlinear binary classification task. The second data set is a multi-class classification task where each feature is independent of Y by itself but a combination of three features has a joint effect on Y . The third data set arises from an additive model for nonlinear regression. Each data set has d = 10 dimensions in total, but only m = 3 or 4 true features. Since the identity of these features is known, we can evaluate the performance of a feature selection algorithm by computing the median rank it assigns to the real features, with lower median ranks indicating better performance. Given enough samples, we would expect this value to come close to the optimal lower bound of (m + 1)/2. Our experimental setup is as follows. We generate 10 independent copies of each data set with sample sizes ranging from 10 to 100, and record the median ranks assigned to the true features by each algorithm. This process is repeated a total of 100 times, and the results are averaged across trials. For kernel-based methods, we use a Gaussian kernel k(x, ˜x) = exp(−kx −˜xk2/(2σ2)) on X and a linear kernel k(y, ˜y) = yT ˜y on Y . We take σ to be the median pairwise distance between samples scaled by 1/ p 2. Since the number of true features is known, we provide this as an input to algorithms that require it. Our initial experiments use the basic version of our algorithm from Section 5.1. When the number of desired features m is fixed, only the regularization parameter " needs to be chosen. We use " = 0.001 for the classification tasks and " = 0.1 for the regression task, selecting these values from {0.001, 0.01, 0.1} using cross-validation. Our results are shown in Figure 1. On the binary and 4-way classification tasks, our method outperforms all other algorithms, succeeding in identifying the true features using fewer than 50 samples where others require close to 100 or even fail to converge. On the additive nonlinear model, several algorithms perform well, and our method is on par with the best of them across all sample sizes. These experiments show that our algorithm is comparable to or better than several widely-used feature selection techniques on a selection of synthetic tasks, and is adept at capturing several kinds of nonlinear relationships between the covariates and the responses. When compared in particular to its closest relative BAHSIC, a backward-elimination algorithm based on the Hilbert–Schmidt independence criterion, we see that our algorithm often produces higher quality results with fewer samples, and even succeeds in the non-additive problem where BAHSIC fails to converge. We also rerun these experiments separately for each of the first two approximations described in Section 5.2 above, selecting λ1 from {0.001, 0.01, 0.1} and λ2 from {1, 10, 100} using crossvalidation. We find that comparable results can be attained with either approximate objective, but note that the algorithm is more robust to changes in λ1 than λ2. 6.2 Real-world data In the previous section, we found that our method for feature selection excelled in identifying nonlinear relationships on a variety of synthetic data sets. We now turn our attention to a collection 7 ALLAML CLL-SUB-111 glass ORL orlraws10P pixraw10P TOX-171 vowel warpAR10P warpPIE10P wine Yale Samples 72 111 214 400 100 100 171 990 130 210 178 165 Features 7,129 11,340 10 1,024 10,304 10,000 5,784 10 2,400 2,420 13 1,024 Classes 2 3 6 40 10 10 4 11 10 10 3 15 Table 1: Summary of the benchmark data sets we use for our empirical evaluation. Figure 2: The above plots show classification accuracy (y-axis) versus number of selected features (x-axis) for our real-world benchmark data sets. Higher accuracies are better. of real-word tasks, studying the performance of our method and other nonlinear approaches when used in conjunction with a kernel SVM for downstream classification. We carry out experiments on 12 standard benchmark tasks from the ASU feature selection website [17] and the UCI repository [18]. A summary of our data sets is provided in Table 1. The data sets are drawn from several domains including gene data, image data, and voice data, and span both the low-dimensional and high-dimensional regimes. For every task, we run each algorithm being evaluated to obtain ranks for all features. Performance is then measured by training a kernel SVM on the top m features and computing the resulting accuracy as measured by 5-fold cross-validation. This is done for m 2 {5, 10, . . . , 100} if the total number of features d is larger than 100, or m 2 {1, 2, . . . , d} otherwise. In all cases we fix the regularization constant of the SVM to C = 1 and use a Gaussian kernel with σ set as in the previous section over the selected features. For our own algorithm, we fix " = 0.001 across all experiments and set the number of desired features to m = 100 if d > 100 or dd/5e otherwise. Our results are shown in Figure 2. Compared with three other popular methods for nonlinear feature selection, i.e. mRMR, BAHSIC, and MI, we find that our method is the strongest performer in the large majority of cases, sometimes by a substantial margin as in the case of TOX-171. While our method is occasionally outperformed in the beginning when the number of selected features is small, it either ties or overtakes the leading method by the end in all but one instance. We remark that our method consistently improves upon the performance of the related BAHSIC method, suggesting that our objective based on conditional covariance may be more powerful than one based on the Hilbert-Schmidt independence criterion. 8 7 Conclusion In this paper, we proposed an approach to feature selection based on minimizing the trace of the conditional covariance operator. The idea is to select the features that maximally account for the dependence of the response on the covariates. We do so by relaxing from an intractable discrete formulation of the problem to a continuous approximation suitable for gradient-based optimization. We demonstrate the effectiveness of our approach on multiple synthetic and real-world experiments, finding that it often outperforms other state-of-the-art approaches, including another competitive kernel feature selection method based on the Hilbert-Schmidt independence criterion. References [1] Genevera I Allen. Automatic feature selection via weighted kernels and regularization. Journal of Computational and Graphical Statistics, 22(2):284–299, 2013. [2] Charles R Baker. Joint measures and cross-covariance operators. Transactions of the American Mathematical Society, 186:273–289, 1973. [3] Verónica Bolón-Canedo, Noelia Sánchez-Maroño, and Amparo Alonso-Betanzos. Recent advances and emerging challenges of feature selection in the context of big data. KnowledgeBased Systems, 86:33–45, 2015. [4] Paul S Bradley and Olvi L Mangasarian. Feature selection via concave minimization and support vector machines. In Machine Learning Proceedings of the Fifteenth International Conference(ICML ’98, pages 82–90. Morgan Kaufmann, 1998. [5] Bin Cao, Dou Shen, Jian-Tao Sun, Qiang Yang, and Zheng Chen. Feature selection in a kernel space. In Proceedings of the 24th international conference on Machine learning, pages 121–128. ACM, 2007. [6] John Duchi, Shai Shalev-Shwartz, Yoram Singer, and Tushar Chandra. Efficient projections onto the l1-ball for learning in high dimensions. In Proceedings of the 25th International Conference on Machine Learning, ICML ’08, pages 272–279, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-205-4. doi: 10.1145/1390156.1390191. URL http://doi.acm.org/10.1145/ 1390156.1390191. [7] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning, volume 1. Springer series in statistics Springer, Berlin, 2001. [8] Kenji Fukumizu and Chenlei Leng. Gradient-based kernel method for feature extraction and variable selection. In Advances in Neural Information Processing Systems, pages 2114–2122, 2012. [9] Kenji Fukumizu, Francis R Bach, and Michael I Jordan. Dimensionality reduction for supervised learning with reproducing kernel hilbert spaces. Journal of Machine Learning Research, 5(Jan): 73–99, 2004. [10] Kenji Fukumizu, Francis R Bach, and Michael I Jordan. Kernel dimension reduction in regression. The Annals of Statistics, pages 1871–1905, 2009. [11] Ran Gilad-Bachrach, Amir Navot, and Naftali Tishby. Margin based feature selection-theory and algorithms. In Proceedings of the twenty-first international conference on Machine learning, page 43. ACM, 2004. [12] Yves Grandvalet and Stéphane Canu. Adaptive scaling for feature selection in svms. In Proceedings of the 15th International Conference on Neural Information Processing Systems, NIPS’02, pages 569–576, Cambridge, MA, USA, 2002. MIT Press. URL http://dl.acm. org/citation.cfm?id=2968618.2968689. [13] Arthur Gretton, Olivier Bousquet, Alex Smola, and Bernhard Schölkopf. Measuring statistical dependence with hilbert-schmidt norms. In International conference on algorithmic learning theory, pages 63–77. Springer, 2005. 9 [14] Isabelle Guyon and André Elisseeff. An introduction to variable and feature selection. Journal of machine learning research, 3(Mar):1157–1182, 2003. [15] Isabelle Guyon, Jason Weston, Stephen Barnhill, and Vladimir Vapnik. Gene selection for cancer classification using support vector machines. Machine learning, 46(1):389–422, 2002. [16] P Jaganathan, N Rajkumar, and R Nagalakshmi. A kernel based feature selection method used in the diagnosis of wisconsin breast cancer dataset. Advances in Computing and Communications, pages 683–690, 2011. [17] Jundong Li, Kewei Cheng, Suhang Wang, Fred Morstatter, Trevino Robert, Jiliang Tang, and Huan Liu. Feature selection: A data perspective. arXiv:1601.07996, 2016. [18] Moshe Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci. edu/ml. [19] Mahdokht Masaeli, Jennifer G Dy, and Glenn M Fung. From transformation-based dimensionality reduction to feature selection. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 751–758, 2010. [20] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [21] Hanchuan Peng, Fuhui Long, and Chris Ding. Feature selection based on mutual information criteria of max-dependency, max-relevance, and min-redundancy. IEEE Transactions on pattern analysis and machine intelligence, 27(8):1226–1238, 2005. [22] Ali Rahimi and Ben Recht. Random features for large-scale kernel machines. In In Neural Infomration Processing Systems, 2007. [23] Shaogang Ren, Shuai Huang, John Onofrey, Xenios Papademetris, and Xiaoning Qian. A Scalable Algorithm for Structured Kernel Feature Selection. In Guy Lebanon and S. V. N. Vishwanathan, editors, Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38 of Proceedings of Machine Learning Research, pages 781–789, San Diego, California, USA, 09–12 May 2015. PMLR. [24] Le Song, Alex Smola, Arthur Gretton, Karsten M Borgwardt, and Justin Bedo. Supervised feature selection via dependence estimation. In Proceedings of the 24th international conference on Machine learning, pages 823–830. ACM, 2007. [25] Le Song, Alex Smola, Arthur Gretton, Justin Bedo, and Karsten Borgwardt. Feature selection via dependence maximization. Journal of Machine Learning Research, 13(May):1393–1434, 2012. [26] Shiquan Sun, Qinke Peng, and Adnan Shakoor. A kernel-based multivariate feature selection method for microarray data classification. PloS one, 9(7):e102541, 2014. [27] Jason Weston, Sayan Mukherjee, Olivier Chapelle, Massimiliano Pontil, Tomaso Poggio, and Vladimir Vapnik. Feature selection for svms. In Proceedings of the 13th International Conference on Neural Information Processing Systems, pages 647–653. MIT Press, 2000. [28] Jason Weston, André Elisseeff, Bernhard Schölkopf, and Mike Tipping. Use of the zeronorm with linear models and kernel methods. Journal of machine learning research, 3(Mar): 1439–1461, 2003. [29] Makoto Yamada, Wittawat Jitkrittum, Leonid Sigal, Eric P Xing, and Masashi Sugiyama. Highdimensional feature selection by feature-wise kernelized lasso. Neural computation, 26(1): 185–207, 2014. 10 | 2017 | 482 |
6,988 | Active Learning from Peers Keerthiram Murugesan Jaime Carbonell School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 {kmuruges,jgc}@cs.cmu.edu Abstract This paper addresses the challenge of learning from peers in an online multitask setting. Instead of always requesting a label from a human oracle, the proposed method first determines if the learner for each task can acquire that label with sufficient confidence from its peers either as a task-similarity weighted sum, or from the single most similar task. If so, it saves the oracle query for later use in more difficult cases, and if not it queries the human oracle. The paper develops the new algorithm to exhibit this behavior and proves a theoretical mistake bound for the method compared to the best linear predictor in hindsight. Experiments over three multitask learning benchmark datasets show clearly superior performance over baselines such as assuming task independence, learning only from the oracle and not learning from peer tasks. 1 Introduction Multitask learning leverages the relationship between the tasks to transfer relevant knowledge from information-rich tasks to information-poor ones. Most existing work in multitask learning focuses on how to take advantage of these task relationships, either by sharing data directly [1] or learning model parameters via cross-task regularization techniques [2, 3, 4]. This paper focuses on a specific multitask setting where tasks are allowed to interact by requesting labels from other tasks for difficult cases. In a broad sense, there are two settings to learn multiple related tasks together: 1) batch learning, in which an entire training set is available to the learner 2) online learning, in which the learner sees the data sequentially. In recent years, online multitask learning has attracted increasing attention [5, 6, 7, 8, 9, 10]. The online multitask setting starts with a learner at each round t, receiving an example (along with a task identifier) and predicts the output label. One may also consider learning multiple tasks simultaneously by receiving K examples for K tasks at each round t. Subsequently, the learner receives the true label and updates the model(s) as necessary. This sequence is repeated over the entire data, simulating a data stream. In this setting, the assumption is that the true label is readily available for the task learner, which is impractical in many applications. Recent works in active learning for sequential problems have addressed this concern by allowing the learner to make a decision on whether to ask the oracle to provide the true label for the current example and incur a cost or to skip this example. Most approach in active learning for sequential problems use a measure such a confidence of the learner in the current example [11, 12, 13, 14, 15]. In online multitask learning, one can utilize the task relationship to further reduce the total number of labels requested from the oracle. This paper presents a novel active learning for the sequential decision problems using peers or related tasks. The key idea is that when the learner is not confident on the current example, the learner is allowed to query its peers, which usually has a low cost, before requesting a true label from the oracle and incur a high cost. Our approach follows a perceptron-based update rule in which the model for a given task is updated only when the prediction for that task is 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. in error. The goal of an online learner in this setting is to minimize errors attempting to reach the performance of the full hindsight learner and at the same time, reduce the total number of queries issued to the oracle. There are many useful application areas for online multitask learning with selective sampling, including optimizing financial trading, email prioritization and filtering, personalized news, crowd source-based annotation, spam filtering and spoken dialog system, etc. Consider the latter, where several automated agents/bots servicing several clients. Each agent is specialized or trained to answer questions from customers on a specific subject such as automated payment, troubleshooting, adding or cancelling services, etc. In such setting, when one of the automated agents cannot answer a customer’s question, it may request the assistance of another automated agent that is an expert in the subject related to that question. For example, an automated agent for customer retention may request some help from an automated agent for new services to offer new deals for the customer. When both the agents could not answer the customer’s question, the system may then direct the call to a live agent. This may reduce the number of service calls directed to live agents and the cost associated with such requests. Similarly in spam filtering, 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 task relationship matrix as well as improving models from specific decisions from peers on difficult examples, 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 active learning for multiple related tasks and its use in estimating per-task model parameters in an online setting. 1.1 Related Work While there is considerable literature in online multitask learning, many crucial aspects remain largely unexplored. Most existing work in online multitask 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 [16] 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. In all these works, their proposed algorithms assume that the true labels are available for each instance. Selective sampling-based learners in online setting, on the other hand, decides whether to ask the human oracle for labeling of difficult instances [11, 12, 13, 14, 15]. It can be easily extended to online multitask learning setting by applying selective sampling for each individual task separately. Saha et. al [9] formulated the learning of task relationship matrix as a Bregman-divergence minimization problem w.r.t. positive definite matrices and used this task-relationship matrix to naively select the instances for labelling from the human oracle. Several recent works in online multitask learning recommended updating all the task learners on each round t [10, 9, 8]. When a task learner makes a mistake on an example, all the tasks’ model parameters are updated to account for the new examples. This significantly increases the computational complexity at each round, especially when the number of tasks is large [17]. Our proposed method avoids this issue by updating only the learner of the current example and utilize the knowledge from peers only when the current learner requested them. This work is motivated by the recent interests in active learning from multiple (strong or weak) teachers [18, 19, 12, 20, 21, 22]. Instead of single all-known oracle, these papers assume multiple oracles (or teachers) each with a different area of expertise. At round t, some of the teachers are experts in the current instance but the others may not be confident in their predicted labels. Such learning setting is very common in crowd-sourcing platform where multiple annotators are used to label an instance. Our learning setting is different from their approaches where, instead of learning from multiple oracles, we learn from our peers (or related tasks) without any associated high cost. Finally, our proposed method is closely related to learning with rejection option [23, 24] where the learner may choose not to predict label for an instance. To reject an instance, they use a measure of 2 1. Receive an example x(t) for the task k 2. If the task k is not confident in the prediction for this example, ask the peers or related tasks whether they can give a confident label to this example. 3. If the peers are not confident enough, ask the oracle for the true label y(t). Figure 1: Proposed learning approach from peers. confidence to identify difficult instances. We use a similar approach to identify when to query peers and when to query the human oracle for true label. 2 Problem Setup Suppose we are given K tasks where the kth task is associated with Nk training examples. For brevity, we consider a binary classification problem for each task, but the methods generalize to multi-class settings and are also applicable to regression tasks. We denote by [N] consecutive integers ranging from 1 to N. Let (x(i) k , y(i) k ) Nk i=1 be data for task k where x(i) k ∈Rd is the ith instance from the kth task and y(i) k is its corresponding true label. When the notation is clear from the context, we drop the index k and write ((x(i), k), y(i)). Let {w∗ k}k∈[K] be any set of arbitrary vectors where w∗ k ∈Rd. The hinge losses on the example (x(t), k), y(t) are given by ℓ(t)∗ kk = 1 −y(t)⟨x(t), w∗ k⟩ + and ℓ(t)∗ km = 1 −y(t)⟨x(t), w∗ m⟩ +, respectively, where (z)+ = max(0, z). Similarly, we define hinge losses ℓ(t) kk and ℓ(t) km for the linear predictors {w(t) k }k∈[K] learned at round t. Let Z(t) be a Bernoulli random variable to indicate whether the learner requested a true label for the example x(t). Let M (t) be a binary variable to indicate whether the learner made a mistake on the example x(t). We use the following expected hinge losses for our theoretical analysis: ˜Lkk = E P t M (t)Z(t)ℓ(t)∗ kk and ˜Lkm = E P t M (t)Z(t)ℓ(t)∗ km . We start with our proposed active learning from peers algorithm based on selective sampling for online multitask problems and study the mistake bound for the algorithm in Section 3. We report our experimental results and analysis in Section 4. Additionally, we extend our learning algorithm to learning multiple task in parallel in the supplementary. 3 Learning from Peers We consider multitask perceptron for our online learning algorithm. On each round t, we receive an example (x(t), k) from task k 1. Each perceptron learner for the task k maintains a model represented by w(t−1) k learned from examples received until round t −1. Task k predicts a label for the received example x(t) using hk(x(t)) = ⟨w(t−1) k , x(t)⟩2. As in the previous works [11, 12, 23], we use |hk(x(t))| to measure the confidence of the kth task learner on this example. When the confidence is higher, the learner doesn’t require the need to request the true label y(t) from the oracle. Built on this idea, [11] proposed a selective sampling algorithm using the margin |hk(x(t))| to decide whether to query the oracle or not. Intuitively, if |hk(x(t))| is small, then the kth task learner is not confident in the prediction of x(t) and vice versa. They consider a Bernoulli random variable P (t) for the event |hk(x(t))| ≤b1 with probability b1 b1+|hk(x(t))| for some predefined constant b1 ≥0. If 1We will consider a different online learning setting later in the supplementary section where we simultaneously receive K examples at each round, one for each task k 2We also use the notation ˆpkk = ⟨w(t−1) k , x(t)⟩and ˆpkm = ⟨w(t−1) m , x(t)⟩ 3 P (t) = 1 (confidence is low), then the kth learner requests the oracle for the true label. Similarly when P (t) = 0 (confidence is high), the learner skips the request to the oracle. This considerably saves a lot of label requests from the oracle. When dealing with multiple tasks, one may use similar idea and apply selective sampling for each task individually [25]. Unfortunately, such approach doesn’t take into account the inherent relationship between the tasks. In this paper, we consider a novel active learning (or selective sampling) for online multitask learning to address the concerns discussed above. Our proposed learning approach can be summarized in Figure 1. Unlike in the previous work [8, 9, 10], we update only the current task parameter wk when we made a mistake at round t, instead of updating all the task model parameters wm, ∀m ∈ [K], m ̸= k. Our proposed method avoids this issue by updating only the learner of the current example and share the knowledge from peers only when the assistance is needed. In addition, the task relationship is taken into account, to measure whether the peers are confident in predicting this example. This approach provides a compromise between learning them independently and learning them by updating all the learners when a specific learner makes a mistake. As in traditional selective sampling algorithm [11], we consider a Bernoulli random variable P (t) for the event |hk(x(t))| ≤b1 with probability b1 b1+|hk(x(t))|. In addition, we consider a second Bernoulli random variable Q(t) for the event |hm(x(t))| ≤b2 with probability b2 b2+P m∈[K],m̸=k τ (t−1) km |hm(x(t))|. The idea is that when the weighted sum of the confidence of the peers on the current example is high, then we use the predicted label ˜y(t) from the peers for the perceptron update instead of requesting a true label y(t) from the oracle. In our experiment in Section 4, we consider the confidence of most related task instead of the weighted sum to reduce the computational complexity at each round. We set Z(t) = P (t)Q(t) and set M (t) = 1 if we made a mistake at round t i.e., (y(t) ̸= ˆy(t)) (only when the label is revealed/queried). The pseudo-code is in Algorithm 1. Line 14 is executed when we request a label from the oracle or when peers are confident on the label for the current example. Note the two terms in (M (t)Z(t)y(t) + ˜Z(t)˜y(t)) are mutually exclusive (when P (t) = 1). Line (15-16) computes the relationship between tasks τkm based on the recent work by [10]. It maintains a distribution over peers w.r.t the current task. The value of τ is updated at each round using the cross-task error ℓkm. In addition, we use the τ to get the confidence of the most-related task rather than the weighted sum of the confidence of the peers to get the predicted label from the peers (see Section 4 for more details). When we are learning with many tasks [17], it provides a faster computation without significantly compromising the performance of the learning algorithm. One may use different notion of task relationship based on the application at hand. Now, we give the bound on the expected number of mistakes. Theorem 1. let Sk = (x(t), k), y(t) T t=1 be a sequence of T examples given to Algorithm 1 where x(t) ∈Rd, y(t) ∈{−1, +1} and X = maxt ∥x(t)∥. Let P (t) be a Bernoulli random variable for the event |hk(x(t))| ≤b1 with probability b1 b1+|hk(x(t))| and let Q(t) be a Bernoulli random variable for the event |hm(x(t))| ≤b2 with probability b2 b2+maxm∈[K] m̸=k |hm(x(t))|. Let Z(t) = P (t)Q(t) and M (t) = I(y(t) ̸= ˆy(t)). If the Algorithm 1 is run with b1 > 0 and b2 > 0 (b2 ≥b1), then ∀t ≥1 and γ > 0 we have E X t∈[T ] M (t) ≤b2 γ (2b1 + X2)2 8b1γ ∥w∗ k∥2 + max m∈[K],m̸=k ∥w∗ m∥2 + 1 + X2 2b1 ˜Lkk + max m∈[K],m̸=k ˜Lkm Then, the expected number of label requests to the oracle by the algorithm is X t b1 b1 + |hk(x(t))| b2 b2 + maxm∈[K] m̸=k |hm(x(t))| 4 Algorithm 1: Active Learning from Peers Input : b1 > 0, b2 > 0 s.t., b2 ≥b1, λ > 0, Number of rounds T 1 Initialize w(0) m = 0 ∀m ∈[K], τ (0). 2 for t = 1 . . . T do 3 Receive (x(t), k) 4 Compute ˆp(t) kk = ⟨x(t), w(t−1) k ⟩ 5 Predict ˆy(t) = sign(ˆp(t) kk) 6 Draw a Bernoulli random variable P (t) with probability b1 b1+|ˆp(t) kk | 7 if P (t) = 1 then 8 Compute ˆp(t) km = ⟨x(t), w(t−1) m ⟩∀m ̸= k, m ∈[K] 9 Compute ˜p(t) = P m̸=k,m∈[K] τ (t−1) km ˆp(t) km and ˜y(t) = sign(˜p(t)) 10 Draw a Bernoulli random variable Q(t) with probability b2 b2+|˜p(t)| 11 end 12 Set Z(t) = P (t)Q(t) & ˜Z(t) = P (t)(1 −Q(t)) 13 Query true label y(t) if Z(t) = 1 and set M (t) = 1 if ˆy(t) ̸= y(t) 14 Update w(t) k = w(t−1) k + (M (t)Z(t)y(t) + ˜Z(t)˜y(t))x(t) 15 Update τ: 16 τ (t) km = τ (t−1) km e−Z(t) λ ℓ(t) km P m′∈[K] m′̸=k τ (t−1) km′ e−Z(t) λ ℓ(t) km′ m ∈[K], m ̸= k (1) 17 end The proof is given in Appendix A. It follows from Theorem 1 in [11] and Theorem 1 in [10] and setting b2 = b1 + X2 2 + ∥w∗ k∥ 2 , where b1 = X2 2 q 1 + 4γ2 ∥w∗ k∥X2 ˜Lkk γ . Theorem 1 states that the quality of the bound depends on both ˜Lkk and the maximum of {˜Lkm}m∈[K],m̸=k. In other words, the worstcase regret will be lower if the kth true hypothesis w∗ k can predict the labels for training examples in both the kth task itself as well as those in all the other related tasks in high confidence. In addition, we consider a related problem setting in which all the K tasks receive an example simultaneously. We give the learning algorithm and mistake bound for this setting in Appendix B. 4 Experiments We evaluate the performance of our algorithm in the online setting. All reported results in this section are averaged over 10 random runs on permutations of the training data. We set the value of b1 = 1 for all the experiments and the value of b2 is tuned from 20 different values. Unless otherwise specified, all model parameters are chosen via 5-fold cross validation. 4.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. 3http://www.ee.duke.edu/~lcarin/LandmineData.zip 5 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 on a dataset containing 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. We use the rest of the examples for test set. On average, each task in landmine, spam, sentiment has 509, 400 and 2000 examples respectively. 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. 4.2 Results To evaluate the performance of our proposed approach, we compare our proposed methods to 2 standard baselines. The first baseline selects the examples to query randomly (Random) and the second baseline chooses the examples via selective sampling independently for each task (Independent) [11]. We compare these baselines against two versions of our proposed algorithm 1 with different confidence measures for predictions from peer tasks: PEERsum where the confidence ˜p(t) at round t is computed by the weighted sum of the confidence of each task as shown originally in Algorithm 1 and PEERone where the confidence ˜p(t) is set to the confidence of the most related task k (ˆp(t) k ), sampled from the probability distribution τ (t) km, m ∈[K], m ̸= k. The intuition is that, for multitask learning with many tasks [17], PEERone provides a faster computation without significantly compromising the performance of the learning algorithm. The task weights τ are computed based on the relationship between the tasks. As mentioned earlier, the τ values can be easily replaced by other functions based on the application at hand 6. In addition to PEERsum and PEERone, we evaluated a method that queries the peer with the highest confidence, instead of the most related task as in PEERone, to provide the label. Since this method uses only local information for the task with highest confidence, it is not necessarily the best peer in hindsight, and the results are worse than or comparable (in some cases) to the Independent baseline. Hence, we do not report its results in our experiment. Figure 2 shows the performance of the models during training. We measure the average rate of mistakes (cumulative measure), the number of label requests to the oracle and the number of peer query requests to evaluate the performance during the training time. From Figure 2 (top and middle), we can see that our proposed methods (PEERsum and PEERone) outperform both the baselines. Among the proposed methods, PEERsum outperforms PEERone as it uses the confidence from all the tasks (weighted by task relationship) to measure the final confidence. We notice that during the earlier part of the learning, all the methods issue more query to the oracle. After a few initial set of label requests, peer requests (dotted lines) steadily take over in our proposed methods. We can see three noticeable phases in our learning algorithm: initial label requests to the oracle, label requests to peers, and as task confidence grows, learning with less dependency on other tasks. 4http://ecmlpkdd2006.org/challenge.html 5http://www.cs.jhu.edu/~mdredze/datasets/sentiment 6Our algorithm and theorem can be easily generalized to other types of functions on τ 6 Number of samples 0 500 1000 1500 2000 2500 3000 Average rate of mistakes 0 0.2 0.4 0.6 0.8 1 Random Independent PEERsum PEERone Number of samples 0 500 1000 1500 Average rate of mistakes 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Number of samples 0 500 1000 1500 2000 2500 Average rate of mistakes 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 Number of samples 0 500 1000 1500 2000 2500 3000 Number of Label/Peer Requests 0 200 400 600 800 1000 1200 1400 1600 1800 Random (Label Request) Independent (Label Request) PEERsum (Label Request) PEERone (Label Request) PEERsum (Peer Request) PEERone (Peer Request) Number of samples 0 500 1000 1500 Number of Label/Peer Requests 0 200 400 600 800 1000 1200 Number of samples 0 500 1000 1500 2000 2500 Number of Label/Peer Requests 0 500 1000 1500 2000 2500 Number of samples 0 500 1000 1500 2000 2500 Average rate of mistakes 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 Random Independent PEERsum PEERone Number of samples 0 500 1000 1500 2000 2500 Average rate of mistakes 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 Number of samples 0 500 1000 1500 2000 2500 Average rate of mistakes 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 Figure 2: Average rate of mistakes vs. Number of examples calculated for compared models on the three datasets (top). Average number of label and peer requests on the three datasets (middle). Average rate of (training) mistakes vs. Number of examples with the query budget of (10%, 20%, 30%) of the total number of examples T on sentiment (bottom). These plots are generated during the training. In order to efficiently evaluate the proposed methods, we restrict the total number of label requests issued to the oracle during training, that is we give all the methods the same query budget: (10%, 20%, 30%) of the total number of examples T on sentiment dataset. After the desired number of label requests to the oracle reached the said budget limit, the baseline methods predicts label for the new examples based on the earlier assistance from the oracle. On the other hand, our proposed methods continue to reduce the average mistake rate by requesting labels from peers. This shows the power of learning from peers when human expert assistance is expensive, scarce or unavailable. Table 1 summarizes the performance of all the above algorithms on the test set for the three datasets. In addition to the average accuracy ACC scores, we report the average total number of queries or label requests to the oracle (#Queries) and the CPU time taken (seconds) for learning from T examples (Time). From the table, it is evident that PEER* outperforms all the baselines in terms of both ACC and #Queries. In case of landmine and sentiment, we get a significant improvement in the test set accuracy while reducing the total number of label requests to the oracle. As in the training set results before, PEERsum performs slightly better than PEERone. Our methods perform slightly better than Independent in spam, we can see from Figure 2 (middle) for spam dataset, the number of peer queries are lower compared to that of the other datasets. The results justify our claim that relying on assistance from peers in addition to human intervention leads to improved performance. Moreover, our algorithm consumes less or comparable CPU time than the baselines which take into account inter-task relationships and peer requests. Note that PEERone takes a little more training time than PEERsum. This is due to our implementation that takes more time in (MATLAB’s) inbuilt sampler to draw the most related task. One may improve the sampling procedure to get better run time. However, the time spent on selecting the most related tasks is small compared to the other operations when dealing with many tasks. Figure 3 (left) shows the average test set accuracy computed for 20 different values of b2 for PEER* methods in sentiment. We set b1 = 1. Each point in the plot corresponds to ACC (y-axis) and #Queries (x-axis) computed for a specific value of b2. We find the algorithm performs well for 7 Table 1: Average test accuracy on three datasets: means and standard errors over 10 random shuffles. Models Landmine Detection Spam Detection Sentiment Analysis ACC #Queries Time (s) ACC #Queries Time (s) ACC #Queries Time (s) Random 0.8905 (0.007) 1519.4 (31.9) 0.38 0.8117 (0.021) 753.4 (29.1) 8 0.7443 (0.028) 1221.8 (22.78) 35.6 Independent 0.9040 (0.016) 1802.8 (35.5) 0.29 0.8309 (0.022) 1186.6 (18.3) 7.9 0.7522 (0.015) 2137.6 (19.1) 35.6 PEERsum 0.9403 (0.001) 265.6 (18.7) 0.38 0.8497 (0.007) 1108.8 (32.1) 8 0.8141 (0.001) 1494.4 (68.59) 36 PEERone 0.9377 (0.003) 303 (17) 1.01 0.8344 (0.018) 1084.2 (24.2) 8.3 0.8120 (0.01) 1554.6 (92.2) 36.3 Number of Label Requests 1400 1500 1600 1700 1800 1900 2000 2100 2200 Average Test set Accuracy 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 PEERsum PEERone office electronics toys software outdoor cell_phones computer beauty instruments automative music apparel gourmet dvd kitchen video baby camera jewelry sports books magazines health grocery 0 20 0 20 0 0 20 0 20 0 0 20 0 20 0 0 0 0 20 0 0 20 0 0 20 0 0 20 0 0 20 0 0 20 0 20 0 κ 1 2 3 4 Average Test Accuracy 0.3 0.4 0.5 0.6 0.7 0.8 0.9 SHAMPO PEERsum PEERone Figure 3: Average test set ACC calculated for different values of b2 (left). A visualization of the peer query requests among the tasks in sentiment learned by PEERone (middle) and comparison of proposed methods against SHAMPO in parallel setting. We report the average test set accuracy (right). b2 > b1 and the small values of b2. When we increase the value of b2 to ∞, our algorithm reduces to the baseline (Independent), as all request are directed to the oracle instead of the peers. Figure 3 (middle) shows the snapshot of the total number of peer requests between the tasks in sentiment at the end of the training of PEERone. Each edge says that there was one peer query request from a task/domain to another related task/domain (based on the task relationship matrix τ). The edges with similar colors show the total number of peer requests from a task. It is evident from the figure that all the tasks are collaborative in terms of learning from each other. Figure 3 (right) compares the PEER* implementation of Algorithm 2 in Appendix B against SHAMPO in terms of test set accuracy for sentiment dataset (See Supplementary material for more details on the Algorithm). The algorithm learns multiple tasks in parallel, where at most κ out of K label requests to the oracle are allowed at each round. While SHAMPO ignores the other tasks, our PEER* allows peer query to related tasks and thereby improves the overall performance. As we can see from the figure, when κ is set to small values, PEER* performs significantly better than SHAMPO. 5 Conclusion We proposed a novel online multitask learning algorithm that learns to perform each task jointly with learning inter-task relationships. The primary intuition we leveraged in this paper is that task performance can be improved both by querying external oracles and by querying peer tasks. The former incurs a cost or at least a query-budget bound, but the latter requires no human attention. Hence, our hypothesis was that with bounded queries to the human expert, additionally querying peers should improve task performance. Querying peers requires estimating the relation among tasks. 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 closedform updating rules, we provided a theoretical bound on the expected number of mistakes. The effectiveness of our algorithm is empirically verified over three benchmark datasets where in all cases task accuracy improves both for PEERsum (sum of peer recommendations weighted by task similarity) and PEERone (peer recommendation from the most highly related task) over baselines such as assuming task independence. 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] Keerthiram Murugesan, Hanxiao Liu, Jaime Carbonell, and Yiming Yang. Adaptive smoothed online multi-task learning. In Advances in Neural Information Processing Systems, pages 4296–4304, 2016. [11] Nicolo Cesa-Bianchi, Claudio Gentile, and Luca Zaniboni. Worst-case analysis of selective sampling for linear classification. Journal of Machine Learning Research, 7(Jul):1205–1230, 2006. [12] Ofer Dekel, Claudio Gentile, and Karthik Sridharan. Selective sampling and active learning from single and multiple teachers. Journal of Machine Learning Research, 13(Sep):2655–2697, 2012. [13] Francesco Orabona and Nicolo Cesa-Bianchi. Better algorithms for selective sampling. In Proceedings of the 28th international conference on Machine learning (ICML-11), pages 433–440, 2011. [14] Giovanni Cavallanti, Nicolo Cesa-Bianchi, and Claudio Gentile. Linear classification and selective sampling under low noise conditions. In Advances in Neural Information Processing Systems, pages 249–256, 2009. [15] Alekh Agarwal. Selective sampling algorithms for cost-sensitive multiclass prediction. ICML (3), 28:1220–1228, 2013. [16] 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. [17] 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. 9 [18] Pinar Donmez and Jaime G Carbonell. Proactive learning: cost-sensitive active learning with multiple imperfect oracles. In Proceedings of the 17th ACM conference on Information and knowledge management, pages 619–628. ACM, 2008. [19] Pinar Donmez, Jaime G Carbonell, and Jeff Schneider. Efficiently learning the accuracy of labeling sources for selective sampling. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 259–268. ACM, 2009. [20] Ruth Urner, Shai Ben-David, and Ohad Shamir. Learning from weak teachers. In AISTATS, pages 4–3, 2012. [21] Chicheng Zhang and Kamalika Chaudhuri. Active learning from weak and strong labelers. In Advances in Neural Information Processing Systems, pages 703–711, 2015. [22] Yan Yan, Glenn M Fung, Rómer Rosales, and Jennifer G Dy. Active learning from crowds. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 1161–1168, 2011. [23] Peter L Bartlett and Marten H Wegkamp. Classification with a reject option using a hinge loss. Journal of Machine Learning Research, 9(Aug):1823–1840, 2008. [24] Corinna Cortes, Giulia DeSalvo, and Mehryar Mohri. Learning with rejection. In International Conference on Algorithmic Learning Theory, pages 67–82. Springer, 2016. [25] Haim Cohen and Koby Crammer. Learning multiple tasks in parallel with a shared annotator. In Advances in Neural Information Processing Systems, pages 1170–1178, 2014. 10 | 2017 | 483 |
6,989 | On Fairness and Calibration Geoff Pleiss∗, Manish Raghavan∗, Felix Wu, Jon Kleinberg, Kilian Q. Weinberger Cornell University, Department of Computer Science {geoff,manish,kleinber}@cs.cornell.edu, {fw245,kwq4}@cornell.edu Abstract The machine learning community has become increasingly concerned with the potential for bias and discrimination in predictive models. This has motivated a growing line of work on what it means for a classification procedure to be “fair.” In this paper, we investigate the tension between minimizing error disparity across different population groups while maintaining calibrated probability estimates. We show that calibration is compatible only with a single error constraint (i.e. equal false-negatives rates across groups), and show that any algorithm that satisfies this relaxation is no better than randomizing a percentage of predictions for an existing classifier. These unsettling findings, which extend and generalize existing results, are empirically confirmed on several datasets. 1 Introduction Recently, there has been growing concern about errors of machine learning algorithms in sensitive domains – including criminal justice, online advertising, and medical testing [33] – which may systematically discriminate against particular groups of people [2, 4, 8]. A recent high-profile example of these concerns was raised by the news organization ProPublica, who studied a riskassessment tool that is widely used in the criminal justice system. This tool assigns to each criminal defendant an estimated probability that they will commit a future crime. ProPublica found that the risk estimates assigned to defendants who did not commit future crimes were on average higher among African-American defendants than Caucasian defendants [1]. This is a form of false-positive error, and in this case it disproportionately affected African-American defendants. To mitigate issues such as these, the machine learning community has proposed different frameworks that attempt to quantify fairness in classification [2, 4, 8, 19, 26, 34, 37]. A recent and particularly noteworthy framework is Equalized Odds [19] (also referred to as Disparate Mistreatment [37]),1 which constrains classification algorithms such that no error type (false-positive or false-negative) disproportionately affects any population subgroup. This notion of non-discrimination is feasible in many settings, and researchers have developed tractable algorithms for achieving it [17, 19, 34, 37]. When risk tools are used in practice, a key goal is that they are calibrated: if we look at the set of people who receive a predicted probability of p, we would like a p fraction of the members of this set to be positive instances of the classification problem [11]. Moreover, if we are concerned about fairness between two groups G1 and G2 (e.g. African-American defendants and white defendants) then we would like this calibration condition to hold simultaneously for the set of people within each of these groups as well [16]. Calibration is a crucial condition for risk tools in many settings. If a risk tool for evaluating defendants were not calibrated with respect to groups defined by race, for example, then a probability estimate of p could carry different meaning for African-American and white defendants, and hence the tool would have the unintended and highly undesirable consequence of incentivizing judges to take race into account when interpreting its predictions. Despite the ∗Equal contribution, alphebetical order. 1 For the remainder of the paper, we will use Equalized Odds to refer to this notion of non-discrimination. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. importance of calibration as a property, our understanding of how it interacts with other fairness properties is limited. We know from recent work that, except in the most constrained cases, it is impossible to achieve calibration while also satisfying Equalized Odds [8, 26]. However, we do not know how best to achieve relaxations of these guarantees that are feasible in practice. Our goal is to further investigate the relationship between calibration and error rates. We show that even if the Equalized Odds conditions are relaxed substantially – requiring only that weighted sums of the group error rates match – it is still problematic to also enforce calibration. We provide necessary and sufficient conditions under which this calibrated relaxation is feasible. When feasible, it has a unique optimal solution that can be achieved through post-processing of existing classifiers. Moreover, we provide a simple post-processing algorithm to find this solution: withholding predictive information for randomly chosen inputs to achieve parity and preserve calibration. However, this simple post-processing method is fundamentally unsatisfactory: although the post-processed predictions of our information-withholding algorithm are “fair” in expectation, most practitioners would object to the fact that a non-trivial portion of the individual predictions are withheld as a result of coin tosses – especially in sensitive settings such as health care or criminal justice. The optimality of this algorithm thus has troubling implications and shows that calibration and error-rate fairness are inherently at odds (even beyond the initial results by [8] and [26]). Finally, we evaluate these theoretical findings empirically, comparing calibrated notions of nondiscrimination against the (uncalibrated) Equalized Odds framework on several datasets. These experiments further support our conclusion that calibration and error-rate constraints are in most cases mutually incompatible goals. In practical settings, it may be advisable to choose only one of these goals rather than attempting to achieve some relaxed notion of both. 2 Related Work Calibrated probability estimates are considered necessary for empirical risk analysis tools [4, 10, 12, 16]. In practical applications, uncalibrated probability estimates can be misleading in the sense that the end user of these estimates has an incentive to mistrust (and therefore potentially misuse) them. We note however that calibration does not remove all potential for misuse, as the end user’s biases might cause her or him to treat estimates differently based on group membership. There are several post-processing methods for producing calibrated outputs from classification algorithms. For example, Platt Scaling [31] passes outputs through a learned sigmoid function, transforming them into calibrated probabilities. Histogram Binning and Isotonic Regression [35] learn a general monotonic function from outputs to probabilities. See [30] and [18] for empirical comparisons of these methods. Equalized Odds [19], also referred to as Disparate Mistreatment [37], ensures that no error type disproportionately affects any particular group. Hardt et al. [19] provide a post-processing technique to achieve this framework, while Zafar et al. [37] introduce optimization constraints to achieve non-discrimination at training time. Recently, this framework has received significant attention from the algorithmic fairness community. Researchers have found that it is incompatible with other notions of fairness [8, 9, 26]. Additionally, Woodworth et al. [34] demonstrate that, under certain assumptions, post-processing methods for achieving non-discrimination may be suboptimal. Alternative fairness frameworks exist and are continuously proposed. We highlight several of these works, though by no means offer a comprehensive list. (More thorough reviews can be found in [2, 4, 32]). It has been shown that, under most frameworks of fairness, there is a trade-off between algorithmic performance and non-discrimination [4, 9, 19, 39]. Several works approach fairness through the lens of Statistical Parity [6, 7, 14, 20, 22, 23, 29, 38]. Under this definition, group membership should not affect the prediction of a classifier, i.e. members of different groups should have the same probability of receiving a positive-class prediction. However, it has been argued that Statistical Parity may not be applicable in many scenarios [8, 13, 19, 26], as it attempts to guarantee equal representation. For example, it is inappropriate in criminal justice, where base rates differ across different groups. A related notion is Disparate Impact [15, 36], which states that the prediction rates for any two groups should not differ by more than 80% (a number motivated by legal requirements). Dwork et al. [13] introduce a notion of fairness based on the idea that similar individuals should receive similar outcomes, though it challenging to achieve this notion in practice. Fairness has also been considered in online learning [21, 24], unsupervised learning [5], and causal inference [25, 27]. 2 3 Problem Setup The setup of our framework most follows the Equalized Odds framework [19, 37]; however, we extend their framework for use with probabilistic classifiers. Let P ⊂Rk × {0, 1} be the input space of a binary classification task. In our criminal justice example, (x, y) ∼P represents a person, with x representing the individual’s history and y representing whether or not the person will commit another crime. Additionally, we assume the presence of two groups G1, G2 ⊂P, which represent disjoint population subsets, such as different races. We assume that the groups have different base rates µt, or probabilities of belonging to the positive class: µ1 = P(x,y)∼G1 [y = 1] ̸= P(x,y)∼G2 [y = 1] = µ2. Finally, let h1, h2 : Rk →[0, 1] be binary classifiers, where h1 classifies samples from G1 and h2 classifies samples from G2.2 Each classifier outputs the probability that a given sample x belongs to the positive class. The notion of Equalized Odds non-discrimination is based on the false-positive and false-negative rates for each group, which we generalize here for use with probabilistic classifiers: Definition 1. The generalized false-positive rate of classifier ht for group Gt is cfp(ht) = E(x,y)∼Gt ht(x) | y = 0 . Similarly, the generalized false-negative rate of classifier ht is cfn(ht) = E(x,y)∼Gt (1 −ht(x)) | y=1 . If the classifier were to output either 0 or 1, this represents the standard notions of false-positive and false-negative rates. We now define the Equalized Odds framework (generalized for probabilistic classifiers), which aims to ensure that errors of a given type are not biased against any group. Definition 2 (Probabilistic Equalized Odds). Classifiers h1 and h2 exhibit Equalized Odds for groups G1 and G2 if cfp(h1) = cfp(h2) and cfn(h1) = cfn(h2). Calibration Constraints. As stated in the introduction, these two conditions do not necessarily prevent discrimination if the classifier predictions do not represent well-calibrated probabilities. Recall that calibration intuitively says that probabilities should carry semantic meaning: if there are 100 people in G1 for whom h1(x) = 0.6, then we expect 60 of them to belong to the positive class. Definition 3. A classifier ht is perfectly calibrated if ∀p ∈[0, 1], P(x,y)∼Gt y=1 | ht(x)=p = p. It is commonly accepted amongst practitioners that both classifiers h1 and h2 should be calibrated with respect to groups G1 and G2 to prevent discrimination [4, 10, 12, 16]. Intuitively, this prevents the probability scores from carrying group-specific information. Unfortunately, Kleinberg et al. [26] (as well as [8], in a binary setting) prove that a classifier cannot achieve both calibration and Equalized Odds, even in an approximate sense, except in the most trivial of cases. 3.1 Geometric Characterization of Constraints We now will characterize the calibration and error-rate constraints with simple geometric intuitions. Throughout the rest of this paper, all of our results can be easily derived from this interpretation. We begin by defining the region of classifiers which are trivial, or those that output a constant value for all inputs (i.e. hc(x) = c, where 0 ≤c ≤1 is a constant). We can visualize these classifiers on a graph with generalized false-positive rates on one axis and generalized false-negatives on the other. It follows from the definitions of generalized false-positive/false-negative rates and calibration that all trivial classifiers h lie on the diagonal defined by cfp(h) + cfn(h) = 1 (Figure 1a). Therefore, all classifiers that are “better than random” must lie below this diagonal in false-positive/false-negative space (the gray triangle in the figure). Any classifier that lies above the diagonal performs “worse than random,” as we can find a point on the trivial classifier diagonal with lower false-positive and false-negative rates. Now we will characterize the set of calibrated classifiers for groups G1 and G2, which we denote as H∗ 1 and H∗ 2. Kleinberg et al. show that the generalized false-positive and false-negative rates of a calibrated classifier are linearly related by the base rate of the group:3 cfn(ht) = (1 −µt)/µt cfp(ht). (1) 2 In practice, h1 and h2 can be trained jointly (i.e. they are the same classifier). 3 Throughout this work we will treat the calibration constraint as holding exactly; however, our results generalize to approximate settings as well. See the Supplementary Materials for more details. 3 1 1 Generalized FP Rate Generalized FN Rate H⇤ 1 H⇤ 2 µ2 µ1 1−µ2 1−µ1 0 hµ2 hµ1 (a) Possible cal. classifiers H∗ 1, H∗ 2 (blue/red). 1 1 Generalized FP Rate Generalized FN Rate 0 h2 h1 (b) Satisfying cal. and equal F.P. rates. 1 1 Generalized FP Rate Generalized FN Rate 0 h2 h1 (c) Satisfying cal. and equal F.N. rates. 1 1 Generalized FP Rate Generalized FN Rate 0 h2 h1 (d) Satisfying cal. and a general constraint. Figure 1: Calibration, trivial classifiers, and equal-cost constraints – plotted in the false-pos./false-neg. plane. H∗ 1, H∗ 2 are the set of cal. classifiers for the two groups, and hµ1, hµ2 are trivial classifiers. 1 1 Generalized FP Rate Generalized FN Rate H⇤ 1 H⇤ 2 0 g=1 g=2 g=3 (a) Level-order curves of cost. Low cost implies low error rates. 1 1 Generalized FP Rate Generalized FN Rate 0 h2 h1 hµ2 ˜h2 (b) Usually, there is a calibrated classifier ˜h2 with the same cost of h1. 1 1 Generalized FP Rate Generalized FN Rate 0 h2 h1 (c) Cal. and equal-cost are incompatible if h1 has high error. 1 1 Generalized FP Rate Generalized FN Rate 0 h2 hµ2 (d) Possible cal. classifiers for G2 (bold red) by mixing h2 and hµ2. Figure 2: Calibration-Preserving Parity through interpolation. In other words, h1 lies on a line with slope (1 −µ1)/µ1 and h2 lies on a line with slope (1 −µ2)/µ2 (Figure 1a). The lower endpoint of each line is the perfect classifier, which assigns the correct prediction with complete certainty to every input. The upper endpoint is a trivial classifier, as no calibrated classifier can perform “worse than random” (see Lemma 3 in Section S2). The only trivial classifier that satisfies the calibration condition for a group Gt is the one that outputs the base rate µt. We will refer to hµ1 and hµ2 as the trivial classifiers, calibrated for groups G1 and G2 respectively. It follows from the definitions that cfp(hµ1) = µ1 and cfn(hµ1) = 1 −µ1, and likewise for hµ2. Finally, it is worth noting that for calibrated classifiers, a lower false-positive rate necessarily corresponds to a lower false-negative rate and vice-versa. In other words, for a given base rate, a “better” calibrated classifier lies closer to the origin on the line of calibrated classifiers. Impossibility of Equalized Odds with Calibration. With this geometric intuition, we can provide a simplified proof of the main impossibility result from [26]: Theorem (Impossibility Result [26]). Let h1 and h2 be classifiers for groups G1 and G2 with µ1 ̸= µ2. h1 and h2 satisfy the Equalized Odds and calibration conditions if and only if h1 and h2 are perfect predictors. Intuitively, the three conditions define a set of classifiers which is overconstrained. Equalized Odds stipulates that the classifiers h1 and h2 must lie on the same coordinate in the false-positive/falsenegative plane. As h1 must lie on the blue line of calibrated classifiers for H∗ 1 and h2 on the red line H∗ 2 they can only satisfy EO at the unique intersection point — the origin (and location of the perfect classifier). This implies that unless the two classifiers achieve perfect accuracy, we must relax the Equalized Odds conditions if we want to maintain calibration. 4 Relaxing Equalized Odds to Preserve Calibration In this section, we show that a substantially simplified notion of Equalized Odds is compatible with calibration. We introduce a general relaxation that seeks to satisfy a single equal-cost constraint while maintaining calibration for each group Gt. We begin with the observation that Equalized 4 Odds sets constraints to equalize false-positives cfp(ht) and false-negatives cfn(ht). To capture and generalize this, we define a cost function gt to be a linear function in cfp(ht) and cfn(ht) with arbitrary dependence on the group’s base rate µt. More formally, a cost function for group Gt is gt(ht) = atcfp(ht) + btcfn(ht) (2) where at and bt are non-negative constants that are specific to each group (and thus may depend on µt): see Figure 1d. We also make the assumption that for any µt, at least one of at and bt is nonzero, meaning gt(ht) = 0 if and only if cfp(ht) = cfn(ht) = 0.4 This class of cost functions encompasses a variety of scenarios. As an example, imagine an application in which the equal false-positive condition is essential but not the false-negative condition. Such a scenario may arise in our recidivism-prediction example, if we require that non-repeat offenders of any race are not disproportionately labeled as high risk. If we plot the set of calibrated classifiers H∗ 1 and H∗ 2 on the false-positive/false-negative plane, we can see that ensuring the false-positive condition requires finding classifiers h1 ∈H∗ 1 and h2 ∈H∗ 2 that fall on the same vertical line (Figure 1b). Conversely, if we instead choose to satisfy only the false-negative condition, we would find classifiers h1 and h2 that fall on the same horizontal (Figure 1c). Finally, if both false-positive and false-negative errors incur a negative cost on the individual, we may choose to equalize a weighted combination of the error rates [3, 4, 8], which can be graphically described by the classifiers lying on a convex and negatively-sloped level set (Figure 1d). With these definitions, we can formally define our relaxation: Definition 4 (Relaxed Equalized Odds with Calibration). Given a cost function gt of the form in (2), classifiers h1 and h2 achieve Relaxed Equalized Odds with Calibration for groups G1 and G2 if both classifiers are calibrated and satisfy the constraint g1(h1) = g2(h2). It is worth noting that, for calibrated classifiers, an increase in cost strictly corresponds to an increase in both the false-negative and false-positive rate. This can be interpreted graphically, as the level-order cost curves lie further away from the origin as cost increases (Figure 2a). In other words, the cost function can always be used as a proxy for either error rate.5 Feasibility. It is easy to see that Definition 4 is always satisfiable – in Figures 1b, 1c, and 1d we see that there are many such solutions that would lie on a given level-order cost curve while maintaining calibration, including the case in which both classifiers are perfect. In practice, however, not all classifiers are achievable. For the rest of the paper, we will assume that we have access to “optimal” (but possibly discriminatory) calibrated classifiers h1 and h2 such that, due to whatever limitations there are on the predictability of the task, we are unable to find other classifiers that have lower cost with respect to gt. We allow h1 and h2 to be learned in any way, as long as they are calibrated. Without loss of generality, for the remainder of the paper, we will assume that g1(h1) ≥g2(h2). Since by assumption we have no way to find a classifier for G1 with lower cost than h1, our goal is therefore to find a classifier ˜h2 with cost equal to h1. This pair of classifiers would represent the lowest cost (and therefore optimal) set of classifiers that satisfies calibration and the equal cost constraint. For a given base rate µt and value of the cost function gt, a calibrated classifier’s position in the generalized false-positive/false-negative plane is uniquely determined (Figure 2a). This is because each level-order curve of the cost function gt has negative slope in this plane, and each level order curve only intersects a group’s calibrated classifier line once. In other words, there is a unique solution in the false-positive/false-negative plane for classifier ˜h2 (Figure 2b). Consider the range of values that gt can take. As noted above, gt(ht) ≥0, with equality if and only if ht is the perfect classifier. On the other hand, the trivial classifier (again, which outputs the constant µt for all inputs) is the calibrated classifier that achieves maximum cost for any gt (see Lemma 3 in Section S2). As a result, the cost of a classifier for group Gt is between 0 and gt(hµt). This naturally leads to a characterization of feasibility: Definition 4 can be achieved if and only if h1 incurs less cost than group G2’s trivial classifier hµ2; i.e. if g1(h1) ≤g2(hµ2). This can be seen graphically in Figure 2c, in which the level-order curve for g1(h1) does not intersect the set of calibrated classifiers for G2. Since, by assumption, we cannot find a calibrated classifier for G1 with strictly smaller cost than h1, there is no feasible solution. On the other hand, if h1 incurs less cost than hµ2, then we will show feasibility by construction with a simple algorithm. An Algorithm. While it may be possible to encode the constraints of Definition 4 into the training procedure of h1 and h2, it is not immediately obvious how to do so. Even naturally probabilistic 4 By calibration, we cannot have one of cfp(ht) = 0 or cfn(ht) = 0 without the other, see Figure 1a. 5 This holds even for approximately calibrated classifiers — see Section S3. 5 algorithms, such as logistic regression, can become uncalibrated in the presence of optimization constraints (as is the case in [37]). It is not straightforward to encode the calibration constraint if the probabilities are assumed to be continuous, and post-processing calibration methods [31, 35] would break equal-cost constraints by modifying classifier scores. Therefore, we look to achieve the calibrated Equalized Odds relaxation by post-processing existing calibrated classifiers. Again, given h1 and h2 with g1(h1) ≥g2(h2), we want to arrive at a calibrated classifier ˜h2 for group G2 such that g1(h1) = g2(˜h2). Recall that, under our assumptions, this would be the best possible solution with respect to classifier cost. We show that this cost constraint can be achieved by withholding predictive information for a randomly chosen subset of group G2. In other words, rather than always returning h2(x) for all samples, we will occasionally return the group’s mean probability (i.e. the output of the trivial classifier hµ2). In Lemma 4 in Section S2, we show that if ˜h2(x) = hµ2(x) = µ2 with probability α h2(x) with probability 1 −α (3) then the cost of ˜h2 is a linear interpolation between the costs of h2 and hµ2 (Figure 2d). More formally, we have that g2(˜h2) = (1 −α)g2(h2) + αg2(hµ2)), and thus setting α = g1(h1)−g2(h2) g2(hµ2)−g2(h2) ensures that g2(˜h2) = g1(h1) as desired (Figure 2b). Moreover, this randomization preserves calibration (see Section S4). Algorithm 1 summarizes this method. Algorithm 1 Achieving Calibration and an Equal-Cost Constraint via Information Withholding Input: classifiers h1 and h2 s.t. g2(h2) ≤g1(h1) ≤g2(hµ2), holdout set Pvalid. • Determine base rate µ2 of G2 (using Pvalid) to produce trivial classifier hµ2. • Construct ˜h2 using with α = g1(h1)−g2(h2) g2(hµ2)−g2(h2), where α is the interpolation parameter. return h1, ˜h2 — which are calibrated and satisfy g1(h1) = g2(˜h2). Implications. In a certain sense, Algorithm 1 is an “optimal” method because it arrives at the unique false-negative/false-positive solution for ˜h2, where ˜h2 is calibrated and has cost equal to h1. Therefore (by our assumptions) we can find no better classifiers that satisfy Definition 4. This simple result has strong consequences, as the tradeoffs to satisfy both calibration and the equal-cost constraint are often unsatisfactory — both intuitively and experimentally (as we will show in Section 5). We find two primary objections to this solution. First, it equalizes costs simply by making a classifier strictly worse for one of the groups. Second, it achieves this cost increase by withholding information on a randomly chosen population subset, making the outcome inequitable within the group (as measured by a standard measure of inequality like the Gini coefficient). Due to the optimality of the algorithm, the former of these issues is unavoidable in any solution that satisfies Definition 4. The latter, however, is slightly more subtle, and brings up the question of individual fairness (what guarantees we would like an algorithm to make with respect to each individual) and how it interacts with group fairness (population-level guarantees). While this certainly is an important issue for future work, in this particular setting, even if one could find another algorithm that distributes the burden of additional cost more equitably, any algorithm will make at least as many false-positive/false-negative errors as Algorithm 1, and these misclassifications will always be tragic to the individuals whom they affect. The performance loss across the entire group is often significant enough to make this combination of constraints somewhat worrying to use in practice, regardless of the algorithm. Impossibility of Satisfying Multiple Equal-Cost Constraints. It is natural to argue there might be multiple cost functions that we would like to equalize across groups. However, satisfying more than one distinct equal-cost constraint (i.e. different curves in the F.P./F.N. plane) is infeasible. Theorem 1 (Generalized impossibility result). Let h1 and h2 be calibrated classifiers for G1 and G2 with equal cost with respect to gt. If µ1 ̸= µ2, and if h1 and h2 also have equal cost with respect to a different cost function g′ t, then h1 and h2 must be perfect classifiers. (Proof in Section S5). Note that this is a generalization of the impossibility result of [26]. Furthermore, we show in Theorem 9 (in Section S5) that this holds in an approximate sense: if calibration and multiple distinct equal-cost constraints are approximately achieved by some classifier, then that classifier must have approximately zero generalized false-positive and false-negative rates. 6 (a) Income Prediction. 0.0 0.2 0.4 0.2 0.4 0.6 Generalized F.N. Rate Equal Odds (Derived) H∗ 1 H∗ 2 h1 h2 heo 1 heo 2 0.0 0.2 0.4 Calib. + Equal F.N. H∗ 1 H∗ 2 h1 h2 ˜h1 ˜h2 Generalized F.P. Rate (b) Health Prediction. 0.2 0.4 0.6 0.2 0.4 0.6 Generalized F.N. Rate Equal Odds (Derived) H∗ 1 H∗ 2 h1 h2 heo 1 heo 2 0.2 0.4 0.6 Calib. + Equal Cost H∗ 1 H∗ 2 h1 h2 ˜h1 ˜h2 Generalized F.P. Rate (c) Recidivism Prediction. 0.25 0.50 0.75 0.2 0.4 0.6 0.8 Generalized F.N. Rate Equal Odds (Trained) H∗ 1 H∗ 2 h1 h2 heo 1 heo 2 0.25 0.50 0.75 Equal Odds (Derived) H∗ 1 H∗ 2 h1 h2 heo 1 heo 2 0.25 0.50 0.75 Calib. + Equal F.P. H∗ 1 H∗ 2 h1 h2 ˜h1 ˜h2 Generalized F.P. Rate Figure 3: Generalized F.P. and F.N. rates for two groups under Equalized Odds and the calibrated relaxation. Diamonds represent post-processed classifiers. Points on the Equalized Odds (trained) graph represent classifiers achieved by modifying constraint hyperparameters. 5 Experiments In light of these findings, our goal is to understand the impact of imposing calibration and an equalcost constraint on real-world datasets. We will empirically show that, in many cases, this will result in performance degradation, while simultaneously increasing other notions of disparity. We perform experiments on three datasets: an income-prediction, a health-prediction, and a criminal recidivism dataset. For each task, we choose a cost function within our framework that is appropriate for the given scenario. We begin with two calibrated classifiers h1 and h2 for groups G1 and G2. We assume that these classifiers cannot be significantly improved without more training data or features. We then derive ˜h2 to equalize the costs while maintaining calibration. The original classifiers are trained on a portion of the data, and then the new classifiers are derived using a separate holdout set. To compare against the (uncalibrated) Equalized Odds framework, we derive F.P./F.N. matching classifiers using the post-processing method of [19] (EO-Derived). On the criminal recidivism dataset, we additionally learn classifiers that directly encode the Equalized Odds constraints, using the methods of [37] (EO-Trained). (See Section S6 for detailed training and post-processing procedures.) We visualize model error rates on the generalized F.P. and F.N. plane. Additionally, we plot the calibrated classifier lines for G1 and G2 to visualize model calibration. Income Prediction. The Adult Dataset from UCI Machine Learning Repository [28] contains 14 demographic and occupational features for various people, with the goal of predicting whether a person’s income is above $50, 000. In this scenario, we seek to achieve predictions with equalized cost across genders (G1 represents women and G2 represents men). We model a scenario where the primary concern is ensuring equal generalized F.N. rates across genders, which would, for example, help job recruiters prevent gender discrimination in the form of underestimated salaries. Thus, we choose our cost constraint to require equal generalized F.N. rates across groups. In Figure 3a, we see that the original classifiers h1 and h2 approximately lie on the line of calibrated classifiers. In the left plot (EO-Derived), we see that it is possible to (approximately) match both error rates of the classifiers at the cost of heo 1 deviating from the set of calibrated classifiers. In the right plot, we see that it is feasible to equalize the generalized F.N. rates while maintaining calibration. h1 and ˜h2 lie on the same level-order curve of gt (represented by the dashed-gray line), and simultaneously remain on the “line” of calibrated classifiers. It is worth noting that achieving either notion of non-discrimination requires some cost to at least one of the groups. However, maintaining calibration further increases the difference in F.P. rates between groups. In some sense, the calibrated framework trades off one notion of disparity for another while simultaneously increasing the overall error rates. 7 Health Prediction. The Heart Dataset from the UCI Machine Learning Repository contains 14 processed features from 906 adults in 4 geographical locations. The goal of this dataset is to accurately predict whether or not an individual has a heart condition. In this scenario, we would like to reduce disparity between middle-aged adults (G1) and seniors (G2). In this scenario, we consider F.P. and F.N. to both be undesirable. A false prediction of a heart condition could result in unnecessary medical attention, while false negatives incur cost from delayed treatment. We therefore utilize the following cost function gt(ht) = rfpht(x) (1 −y) + rfn (1 −ht(x)) y, which essentially assigns a weight to both F.N. and F.P. predictions. In our experiments, we set rfp = 1 and rfn = 3. In the right plot of Figure 3b, we can see that the level-order curves of the cost function form a curved line in the generalized F.P./F.N. plane. Because our original classifiers lie approximately on the same level-order curve, little change is required to equalize the costs of h1 and ˜h2 while maintaining calibration. This is the only experiment in which the calibrated framework incurs little additional cost, and therefore could be considered a viable option. However, it is worth noting that, in this example, the equal-cost constraint does not explicitly match either of the error types, and therefore the two groups will in expectation experience different types of errors. In the left plot of Figure 3b (EO-Derived), we see that it is alternatively feasible to explicitly match both the F.P. and F.N. rates while sacrificing calibration. Criminal Recidivism Prediction. Finally, we examine the frameworks in the context of our motivating example: criminal recidivism. As mentioned in the introduction, African Americans (G1) receive a disproportionate number of F.P. predictions as compared with Caucasians (G2) when automated risk tools are used in practice. Therefore, we aim to equalize the generalized F.P. rate. In this experiment, we modify the predictions made by the COMPAS tool [12], a risk-assessment tool used in practice by the American legal system. Additionally, we also see if it is possible to improve the classifiers with training-time Equalized Odds constraints using the methods of Zafar et al. [37] (EO-Trained). In Figure 3c, we first observe that the original classifiers h1 and h2 have large generalized F.P. and F.N. rates. Both methods of achieving Equalized Odds — training constraints (left plot) and postprocessing (middle plot) match the error rates while sacrificing calibration. However, we observe that, assuming h1 and h2 cannot be improved, it is infeasible to achieve the calibrated relaxation (Figure 3c right). This is an example where matching the F.P. rate of h1 would require a classifier worse than the trivial classifier hµ2. This example therefore represents an instance in which calibration is completely incompatible with any error-rate constraints. If the primary concern of criminal justice practitioners is calibration [12, 16], then there will inherently be discrimination in the form of F.P. and F.N. rates. However, if the Equalized Odds framework is adopted, the miscalibrated risk scores inherently cause discrimination to one group, as argued in the introduction. Therefore, the most meaningful change in such a setting would be an improvement to h2 (the classifier for African Americans) either through the collection of more data or the use of more salient features. A reduction in overall error to the group with higher cost will naturally lead to less error-rate disparity. 6 Discussion and Conclusion We have observed cases in which calibration and relaxed Equalized Odds are compatible and cases where they are not. When it is feasible, the penalty of equalizing cost is amplified if the base rates between groups differ significantly. This is expected, as base rate differences are what give rise to cost-disparity in the calibrated setting. Seeking equality with respect to a single error rate (e.g. false-negatives, as in the income prediction experiment) will necessarily increase disparity with respect to the other error. This may be tolerable (in the income prediction case, some employees will end up over-paid) but could also be highly problematic (e.g. in criminal justice settings). Finally, we have observed that the calibrated relaxation is infeasible when the best (discriminatory) classifiers are not far from the trivial classifiers (leaving little room for interpolation). In such settings, we see that calibration is completely incompatible with an equalized error constraint. In summary, we conclude that maintaining cost parity and calibration is desirable yet often difficult in practice. Although we provide an algorithm to effectively find the unique feasible solution to both constraints, it is inherently based on randomly exchanging the predictions of the better classifier with the trivial base rate. Even if fairness is reached in expectation, for an individual case, it may be hard to accept that occasionally consequential decisions are made by randomly withholding predictive information, irrespective of a particular person’s feature representation. In this paper we argue that, as long as calibration is required, no lower-error solution can be achieved. 8 Acknowledgements GP, FW, and KQW are supported in part by grants from the National Science Foundation (III1149882, III-1525919, III-1550179, III-1618134, and III-1740822), the Office of Naval Research DOD (N00014-17-1-2175), and the Bill and Melinda Gates Foundation. MR is supported by an NSF Graduate Research Fellowship (DGE-1650441). JK is supported in part by a Simons Investigator Award, an ARO MURI grant, a Google Research Grant, and a Facebook Faculty Research Grant. 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. ProPublica, 2016. https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing. [2] S. Barocas and A. D. Selbst. Big data’s disparate impact. California Law Review, 104, 2016. [3] R. Berk. A primer on fairness in criminal justice risk assessments. Criminology, 41(6):6–9, 2016. [4] R. Berk, H. Heidari, S. Jabbari, M. Kearns, and A. Roth. Fairness in criminal justice risk assessments: The state of the art. arXiv preprint arXiv:1703.09207, 2017. [5] T. Bolukbasi, K.-W. Chang, J. Y. Zou, V. Saligrama, and A. T. Kalai. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In NIPS, pages 4349–4357, 2016. [6] T. Calders and S. Verwer. Three naive bayes approaches for discrimination-free classification. KDD, 2012. [7] T. Calders, F. Kamiran, and M. Pechenizkiy. Building classifiers with independency constraints. In ICDM Workshops, 2009. [8] A. Chouldechova. Fair prediction with disparate impact: A study of bias in recidivism prediction instruments. arXiv preprint arXiv:1703.00056, 2017. [9] S. Corbett-Davies, E. Pierson, A. Feller, S. Goel, and A. Huq. Algorithmic decision making and the cost of fairness. In KDD, pages 797–806, 2017. [10] C. S. Crowson, E. J. Atkinson, and T. M. Therneau. Assessing calibration of prognostic risk scores. Statistical Methods in Medical Research, 25(4):1692–1706, 2016. [11] A. P. Dawid. The well-calibrated bayesian. Journal of the American Statistical Association, 77(379): 605–610, 1982. [12] W. Dieterich, C. Mendoza, and T. Brennan. COMPAS risk scales: Demonstrating accuracy equity and predictive parity. Technical report, Northpointe, July 2016. http://www.northpointeinc.com/northpointeanalysis. [13] C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel. Fairness through awareness. In Innovations in Theoretical Computer Science, 2012. [14] H. Edwards and A. Storkey. Censoring representations with an adversary. In ICLR, 2016. [15] M. Feldman, S. A. Friedler, J. Moeller, C. Scheidegger, and S. Venkatasubramanian. Certifying and removing disparate impact. In KDD, pages 259–268, 2015. [16] A. Flores, C. Lowenkamp, and K. Bechtel. False positives, false negatives, and false analyses: A rejoinder to “machine bias: There’s software used across the country to predict future criminals. and it’s biased against blacks.”. Technical report, Crime & Justice Institute, September 2016. http://www.crj.org/cji/entry/falsepositives-false-negatives-and-false-analyses-a-rejoinder. [17] G. Goh, A. Cotter, M. Gupta, and M. P. Friedlander. Satisfying real-world goals with dataset constraints. In NIPS, pages 2415–2423. 2016. [18] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. In ICML, 2017. [19] M. Hardt, E. Price, and S. Nathan. Equality of opportunity in supervised learning. In Advances in Neural Information Processing Systems, 2016. 9 [20] J. E. Johndrow and K. Lum. An algorithm for removing sensitive information: application to raceindependent recidivism prediction. arXiv preprint arXiv:1703.04957, 2017. [21] M. Joseph, M. Kearns, J. H. Morgenstern, and A. Roth. Fairness in learning: Classic and contextual bandits. In NIPS, 2016. [22] F. Kamiran and T. Calders. Classifying without discriminating. In International Conference on Computer Control and Communication, 2009. [23] T. Kamishima, S. Akaho, and J. Sakuma. Fairness-aware learning through regularization approach. In ICDM Workshops, 2011. [24] M. Kearns, A. Roth, and Z. S. Wu. Meritocratic fairness for cross-population selection. In International Conference on Machine Learning, pages 1828–1836, 2017. [25] N. Kilbertus, M. Rojas-Carulla, G. Parascandolo, M. Hardt, D. Janzing, and B. Schölkopf. Avoiding discrimination through causal reasoning. In NIPS, 2017. [26] J. Kleinberg, S. Mullainathan, and M. Raghavan. Inherent trade-offs in the fair determination of risk scores. In Innovations in Theoretical Computer Science. ACM, 2017. [27] M. J. Kusner, J. R. Loftus, C. Russell, and R. Silva. Counterfactual fairness. arXiv preprint arXiv:1703.06856, 2017. [28] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ml. [29] C. Louizos, K. Swersky, Y. Li, M. Welling, and R. Zemel. The variational fair auto encoder. In ICLR, 2016. [30] A. Niculescu-Mizil and R. Caruana. Predicting good probabilities with supervised learning. In ICML, 2005. [31] J. Platt. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in Large Margin Classifiers, 10(3):61–74, 1999. [32] A. Romei and S. Ruggieri. A multidisciplinary survey on discrimination analysis. The Knowledge Engineering Review, 29(05):582–638, 2014. [33] White-House. Big data: A report on algorithmic systems, opportunity, and civil rights. Technical report, May 2016. [34] B. Woodworth, S. Gunasekar, M. I. Ohannessian, and N. Srebro. Learning non-discriminatory predictors. In Proceedings of the 2017 Conference on Learning Theory, volume 65, pages 1920–1953, Amsterdam, Netherlands, 07–10 Jul 2017. PMLR. [35] B. Zadrozny and C. Elkan. Obtaining calibrated probability estimates from decision trees and naive bayesian classifiers. In ICML, pages 609–616, 2001. [36] M. B. Zafar, I. Valera, M. G. Rodriguez, and K. P. Gummadi. Learning fair classifiers. arXiv preprint arXiv:1507.05259, 2015. [37] M. B. Zafar, I. Valera, M. G. Rodriguez, and K. P. Gummadi. Fairness beyond disparate treatment & disparate impact: Learning classification without disparate mistreatment. In World Wide Web Conference, 2017. [38] R. S. Zemel, Y. Wu, K. Swersky, T. Pitassi, and C. Dwork. Learning fair representations. In ICML, 2013. [39] I. Zliobaite. On the relation between accuracy and fairness in binary classification. In ICML Workshop on Fairness, Accountability, and Transparency in Machine Learning, 2015. 10 | 2017 | 484 |
6,990 | One-Shot Imitation Learning Yan Duan†§, Marcin Andrychowicz‡, Bradly Stadie†‡, Jonathan Ho†§, Jonas Schneider‡, Ilya Sutskever‡, Pieter Abbeel†§, Wojciech Zaremba‡ †Berkeley AI Research Lab, ‡OpenAI §Work done while at OpenAI {rockyduan, jonathanho, pabbeel}@eecs.berkeley.edu {marcin, bstadie, jonas, ilyasu, woj}@openai.com Abstract Imitation learning has been commonly applied to solve different tasks in isolation. This usually requires either careful feature engineering, or a significant number of samples. This is far from what we desire: ideally, robots should be able to learn from very few demonstrations of any given task, and instantly generalize to new situations of the same task, without requiring task-specific engineering. In this paper, we propose a meta-learning framework for achieving such capability, which we call one-shot imitation learning. Specifically, we consider the setting where there is a very large (maybe infinite) set of tasks, and each task has many instantiations. For example, a task could be to stack all blocks on a table into a single tower, another task could be to place all blocks on a table into two-block towers, etc. In each case, different instances of the task would consist of different sets of blocks with different initial states. At training time, our algorithm is presented with pairs of demonstrations for a subset of all tasks. A neural net is trained such that when it takes as input the first demonstration demonstration and a state sampled from the second demonstration, it should predict the action corresponding to the sampled state. At test time, a full demonstration of a single instance of a new task is presented, and the neural net is expected to perform well on new instances of this new task. Our experiments show that the use of soft attention allows the model to generalize to conditions and tasks unseen in the training data. We anticipate that by training this model on a much greater variety of tasks and settings, we will obtain a general system that can turn any demonstrations into robust policies that can accomplish an overwhelming variety of tasks. 1 Introduction We are interested in robotic systems that are able to perform a variety of complex useful tasks, e.g. tidying up a home or preparing a meal. The robot should be able to learn new tasks without long system interaction time. To accomplish this, we must solve two broad problems. The first problem is that of dexterity: robots should learn how to approach, grasp and pick up complex objects, and how to place or arrange them into a desired configuration. The second problem is that of communication: how to communicate the intent of the task at hand, so that the robot can replicate it in a broader set of initial conditions. Demonstrations are an extremely convenient form of information we can use to teach robots to overcome these two challenges. Using demonstrations, we can unambiguously communicate essentially any manipulation task, and simultaneously provide clues about the specific motor skills required to perform the task. We can compare this with an alternative form of communication, namely natural language. Although language is highly versatile, effective, and efficient, natural language processing 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) Traditional Imitation Learning Task A e.g. stack blocks into towers of height 3 Many demonstrations Imitation Learning Algorithm Policy for task A action Environment obs Task B e.g. stack blocks into towers of height 2 Many demonstrations Imitation Learning Algorithm Policy for task B action Environment obs Many demonstrations for task A Meta Learning Algorithm … more demonstrations for more tasks One-Shot Imitator (Neural Network) Environment action obs Single demonstration for task F Policy for task F Many demonstrations for task B Many demonstrations for task A sample Many demonstrations for task B (b) One-Shot Imitation Learning (c) Training the One-Shot Imitator One-Shot Imitator (Neural Network) Supervised loss Demo1 observation from Demo2 corresponding action in Demo2 predicted action Figure 1: (a) Traditionally, policies are task-specific. For example, a policy might have been trained through an imitation learning algorithm to stack blocks into towers of height 3, and then another policy would be trained to stack blocks into towers of height 2, etc. (b) In this paper, we are interested in training networks that are not specific to one task, but rather can be told (through a single demonstration) what the current new task is, and be successful at this new task. For example, when it is conditioned on a single demonstration for task F, it should behave like a good policy for task F. (c) We can phrase this as a supervised learning problem, where we train this network on a set of training tasks, and with enough examples it should generalize to unseen, but related tasks. To train this network, in each iteration we sample a demonstration from one of the training tasks, and feed it to the network. Then, we sample another pair of observation and action from a second demonstration of the same task. When conditioned on both the first demonstration and this observation, the network is trained to output the corresponding action. systems are not yet at a level where we could easily use language to precisely describe a complex task to a robot. Compared to language, using demonstrations has two fundamental advantages: first, it does not require the knowledge of language, as it is possible to communicate complex tasks to humans that don’t speak one’s language. And second, there are many tasks that are extremely difficult to explain in words, even if we assume perfect linguistic abilities: for example, explaining how to swim without demonstration and experience seems to be, at the very least, an extremely challenging task. Indeed, learning from demonstrations have had many successful applications . However, so far these applications have either required careful feature engineering, or a significant amount of system interaction time. This is far from what what we desire: ideally, we hope to demonstrate a certain task only once or a few times to the robot, and have it instantly generalize to new situations of the same task, without long system interaction time or domain knowledge about individual tasks. In this paper we explore the one-shot imitation learning setting illustrated in Fig. 1, where the objective is to maximize the expected performance of the learned policy when faced with a new, previously unseen, task, and having received as input only one demonstration of that task. For the tasks we consider, the policy is expected to achieve good performance without any additional system interaction, once it has received the demonstration. We train a policy on a broad distribution over tasks, where the number of tasks is potentially infinite. For each training task we assume the availability of a set of successful demonstrations. Our learned policy takes as input: (i) the current observation, and (ii) one demonstration that successfully solves a different instance of the same task (this demonstration is fixed for the duration of the episode). The policy outputs the current controls. We note that any pair of demonstrations for the same task provides a supervised training example for the neural net policy, where one demonstration is treated as the input, while the other as the output. 2 To make this model work, we made essential use of soft attention [6] for processing both the (potentially long) sequence of states and action that correspond to the demonstration, and for processing the components of the vector specifying the locations of the various blocks in our environment. The use of soft attention over both types of inputs made strong generalization possible. In particular, on a family of block stacking tasks, our neural network policy was able to perform well on novel block configurations which were not present in any training data. Videos of our experiments are available at http://bit.ly/nips2017-oneshot. 2 Related Work Imitation learning considers the problem of acquiring skills from observing demonstrations. Survey articles include [48, 11, 3]. Two main lines of work within imitation learning are behavioral cloning, which performs supervised learning from observations to actions (e.g., [41, 44]); and inverse reinforcement learning [37], where a reward function [1, 66, 29, 18, 22] is estimated that explains the demonstrations as (near) optimal behavior. While this past work has led to a wide range of impressive robotics results, it considers each skill separately, and having learned to imitate one skill does not accelerate learning to imitate the next skill. One-shot and few-shot learning has been studied for image recognition [61, 26, 47, 42], generative modeling [17, 43], and learning “fast” reinforcement learning agents with recurrent policies [16, 62]. Fast adaptation has also been achieved through fast-weights [5]. Like our algorithm, many of the aforementioned approaches are a form of meta-learning [58, 49, 36], where the algorithm itself is being learned. Meta-learning has also been studied to discover neural network weight optimization algorithms [8, 9, 23, 50, 2, 31]. This prior work on one-shot learning and meta-learning, however, is tailored to respective domains (image recognition, generative models, reinforcement learning, optimization) and not directly applicable in the imitation learning setting. Recently, [19] propose a generic framework for meta learning across several aforementioned domains. However they do not consider the imitation learning setting. Reinforcement learning [56, 10] provides an alternative route to skill acquisition, by learning through trial and error. Reinforcement learning has had many successes, including Backgammon [57], helicopter control [39], Atari [35], Go [52], continuous control in simulation [51, 21, 32] and on real robots [40, 30]. However, reinforcement learning tends to require a large number of trials and requires specifying a reward function to define the task at hand. The former can be time-consuming and the latter can often be significantly more difficult than providing a demonstration [37]. Multi-task and transfer learning considers the problem of learning policies with applicability and re-use beyond a single task. Success stories include domain adaptation in computer vision [64, 34, 28, 4, 15, 24, 33, 59, 14] and control [60, 45, 46, 20, 54]. However, while acquiring a multitude of skills faster than what it would take to acquire each of the skills independently, these approaches do not provide the ability to readily pick up a new skill from a single demonstration. Our approach heavily relies on an attention model over the demonstration and an attention model over the current observation. We use the soft attention model proposed in [6] for machine translations, and which has also been successful in image captioning [63]. The interaction networks proposed in [7, 12] also leverage locality of physical interaction in learning. Our model is also related to the sequence to sequence model [55, 13], as in both cases we consume a very long demonstration sequence and, effectively, emit a long sequence of actions. 3 One Shot Imitation Learning 3.1 Problem Formalization We denote a distribution of tasks by T, an individual task by t ∼T, and a distribution of demonstrations for the task t by D(t). A policy is symbolized by πθ(a|o, d), where a is an action, o is an observation, d is a demonstration, and θ are the parameters of the policy. A demonstration d ∼D(t) is a sequence of observations and actions : d = [(o1, a1), (o2, a2), . . . , (oT , aT )]. We assume that the distribution of tasks T is given, and that we can obtain successful demonstrations for each task. We assume that there is some scalar-valued evaluation function Rt(d) (e.g. a binary value 3 indicating success) for each task, although this is not required during training. The objective is to maximize the expected performance of the policy, where the expectation is taken over tasks t ∈T, and demonstrations d ∈D(t). 3.2 Block Stacking Tasks To clarify the problem setting, we describe a concrete example of a distribution of block stacking tasks, which we will also later study in the experiments. The compositional structure shared among these tasks allows us to investigate nontrivial generalization to unseen tasks. For each task, the goal is to control a 7-DOF Fetch robotic arm to stack various numbers of cube-shaped blocks into a specific configuration specified by the user. Each configuration consists of a list of blocks arranged into towers of different heights, and can be identified by a string. For example, ab cd ef gh means that we want to stack 4 towers, each with two blocks, and we want block A to be on top of block B, block C on top of block D, block E on top of block F, and block G on top of block H. Each of these configurations correspond to a different task. Furthermore, in each episode the starting positions of the blocks may vary, which requires the learned policy to generalize even within the training tasks. In a typical task, an observation is a list of (x, y, z) object positions relative to the gripper, and information if gripper is opened or closed. The number of objects may vary across different task instances. We define a stage as a single operation of stacking one block on top of another. For example, the task ab cd ef gh has 4 stages. 3.3 Algorithm In order to train the neural network policy, we make use of imitation learning algorithms such as behavioral cloning and DAGGER [44], which only require demonstrations rather than reward functions to be specified. This has the potential to be more scalable, since it is often easier to demonstrate a task than specifying a well-shaped reward function [38]. We start by collecting a set of demonstrations for each task, where we add noise to the actions in order to have wider coverage in the trajectory space. In each training iteration, we sample a list of tasks (with replacement). For each sampled task, we sample a demonstration as well as a small batch of observation-action pairs. The policy is trained to regress against the desired actions when conditioned on the current observation and the demonstration, by minimizing an ℓ2 or cross-entropy loss based on whether actions are continuous or discrete. A high-level illustration of the training procedure is given in Fig. 1(c). Across all experiments, we use Adamax [25] to perform the optimization with a learning rate of 0.001. 4 Architecture While, in principle, a generic neural network could learn the mapping from demonstration and current observation to appropriate action, we found it important to use an appropriate architecture. Our architecture for learning block stacking is one of the main contributions of this paper, and we believe it is representative of what architectures for one-shot imitation learning could look like in the future when considering more complex tasks. Our proposed architecture consists of three modules: the demonstration network, the context network, and the manipulation network. An illustration of the architecture is shown in Fig. 2. We will describe the main operations performed in each module below, and a full specification is available in the Appendix. 4.1 Demonstration Network The demonstration network receives a demonstration trajectory as input, and produces an embedding of the demonstration to be used by the policy. The size of this embedding grows linearly as a function of the length of the demonstration as well as the number of blocks in the environment. Temporal Dropout: For block stacking, the demonstrations can span hundreds to thousands of time steps, and training with such long sequences can be demanding in both time and memory usage. Hence, we randomly discard a subset of time steps during training, an operation we call temporal dropout, analogous to [53, 27]. We denote p as the proportion of time steps that are thrown away. 4 Hidden layers Hidden layers Temporal Dropout Neighborhood Attention + Temporal Convolution Attention over Demonstration Demonstration Current State Action A Block# B C D E F G H I J Attention over Current State Context Network Demonstration Network Manipulation Network Context Embedding Figure 2: Illustration of the network architecture. In our experiments, we use p = 0.95, which reduces the length of demonstrations by a factor of 20. During test time, we can sample multiple downsampled trajectories, use each of them to compute downstream results, and average these results to produce an ensemble estimate. In our experience, this consistently improves the performance of the policy. Neighborhood Attention: After downsampling the demonstration, we apply a sequence of operations, composed of dilated temporal convolution [65] and neighborhood attention. We now describe this second operation in more detail. Since our neural network needs to handle demonstrations with variable numbers of blocks, it must have modules that can process variable-dimensional inputs. Soft attention is a natural operation which maps variable-dimensional inputs to fixed-dimensional outputs. However, by doing so, it may lose information compared to its input. This is undesirable, since the amount of information contained in a demonstration grows as the number of blocks increases. Therefore, we need an operation that can map variable-dimensional inputs to outputs with comparable dimensions. Intuitively, rather than having a single output as a result of attending to all inputs, we have as many outputs as inputs, and have each output attending to all other inputs in relation to its own corresponding input. We start by describing the soft attention module as specified in [6]. The input to the attention includes a query q, a list of context vectors {cj}, and a list of memory vectors {mj}. The ith attention weight is given by wi ←vT tanh(q + ci), where v is a learned weight vector. The output of attention is a weighted combination of the memory content, where the weights are given by a softmax operation over the attention weights. Formally, we have output ←P i mi exp(wi) P j exp(wj). Note that the output has the same dimension as a memory vector. The attention operation can be generalized to multiple query heads, in which case there will be as many output vectors as there are queries. Now we turn to neighborhood attention. We assume there are B blocks in the environment. We denote the robot’s state as srobot, and the coordinates of each block as (x1, y1, z1), . . . , (xB, yB, zB). The input to neighborhood attention is a list of embeddings hin 1 , . . . , hin B of the same dimension, which can be the result of a projection operation over a list of block positions, or the output of a previous neighborhood attention operation. Given this list of embeddings, we use two separate linear layers to compute a query vector and a context embedding for each block: qi ←Linear(hin i ), and ci ←Linear(hin i ). The memory content to be extracted consists of the coordinates of each block, concatenated with the input embedding. The ith query result is given by the following soft attention operation: resulti ←SoftAttn(query: qi, context: {cj}B j=1, memory: {((xj, yj, zj), hin j ))}B j=1). Intuitively, this operation allows each block to query other blocks in relation to itself (e.g. find the closest block), and extract the queried information. The gathered results are then combined with each block’s own information, to produce the output embedding per block. Concretely, we have 5 outputi ←Linear(concat(hin i , resulti, (xi, yi, zi), srobot)). In practice, we use multiple query heads per block, so that the size of each resulti will be proportional to the number of query heads. 4.2 Context network The context network is the crux of our model. It processes both the current state and the embedding produced by the demonstration network, and outputs a context embedding, whose dimension does not depend on the length of the demonstration, or the number of blocks in the environment. Hence, it is forced to capture only the relevant information, which will be used by the manipulation network. Attention over demonstration: The context network starts by computing a query vector as a function of the current state, which is then used to attend over the different time steps in the demonstration embedding. The attention weights over different blocks within the same time step are summed together, to produce a single weight per time step. The result of this temporal attention is a vector whose size is proportional to the number of blocks in the environment. We then apply neighborhood attention to propagate the information across the embeddings of each block. This process is repeated multiple times, where the state is advanced using an LSTM cell with untied weights. Attention over current state: The previous operations produce an embedding whose size is independent of the length of the demonstration, but still dependent on the number of blocks. We then apply standard soft attention over the current state to produce fixed-dimensional vectors, where the memory content only consists of positions of each block, which, together with the robot’s state, forms the context embedding, which is then passed to the manipulation network. Intuitively, although the number of objects in the environment may vary, at each stage of the manipulation operation, the number of relevant objects is small and usually fixed. For the block stacking environment specifically, the robot should only need to pay attention to the position of the block it is trying to pick up (the source block), as well as the position of the block it is trying to place on top of (the target block). Therefore, a properly trained network can learn to match the current state with the corresponding stage in the demonstration, and infer the identities of the source and target blocks expressed as soft attention weights over different blocks, which are then used to extract the corresponding positions to be passed to the manipulation network. Although we do not enforce this interpretation in training, our experiment analysis supports this interpretation of how the learned policy works internally. 4.3 Manipulation network The manipulation network is the simplest component. After extracting the information of the source and target blocks, it computes the action needed to complete the current stage of stacking one block on top of another one, using a simple MLP network.1 This division of labor opens up the possibility of modular training: the manipulation network may be trained to complete this simple procedure, without knowing about demonstrations or more than two blocks present in the environment. We leave this possibility for future work. 5 Experiments We conduct experiments with the block stacking tasks described in Section 3.2.2 These experiments are designed to answer the following questions: • How does training with behavioral cloning compare with DAGGER? • How does conditioning on the entire demonstration compare to conditioning on the final state, even when it already has enough information to fully specify the task? • How does conditioning on the entire demonstration compare to conditioning on a “snapshot” of the trajectory, which is a small subset of frames that are most informative? 1In principle, one can replace this module with an RNN module. But we did not find this necessary for the tasks we consider. 2Additional experiment results are available in the Appendix, including a simple illustrative example of particle reaching tasks and further analysis of block stacking 6 • Can our framework generalize to tasks that it has never seen during training? To answer these questions, we compare the performance of the following architectures: • BC: We use the same architecture as previous, but and the policy using behavioral cloning. • DAGGER: We use the architecture described in the previous section, and train the policy using DAGGER. • Final state: This architecture conditions on the final state rather than on the entire demonstration trajectory. For the block stacking task family, the final state uniquely identifies the task, and there is no need for additional information. However, a full trajectory, one which contains information about intermediate stages of the task’s solution, can make it easier to train the optimal policy, because it could learn to rely on the demonstration directly, without needing to memorize the intermediate steps into its parameters. This is related to the way in which reward shaping can significantly affect performance in reinforcement learning [38]. A comparison between the two conditioning strategies will tell us whether this hypothesis is valid. We train this policy using DAGGER. • Snapshot: This architecture conditions on a “snapshot” of the trajectory, which includes the last frame of each stage along the demonstration trajectory. This assumes that a segmentation of the demonstration into multiple stages is available at test time, which gives it an unfair advantage compared to the other conditioning strategies. Hence, it may perform better than conditioning on the full trajectory, and serves as a reference, to inform us whether the policy conditioned on the entire trajectory can perform as well as if the demonstration is clearly segmented. Again, we train this policy using DAGGER. We evaluate the policy on tasks seen during training, as well as tasks unseen during training. Note that generalization is evaluated at multiple levels: the learned policy not only needs to generalize to new configurations and new demonstrations of tasks seen already, but also needs to generalize to new tasks. Concretely, we collect 140 training tasks, and 43 test tasks, each with a different desired layout of the blocks. The number of blocks in each task can vary between 2 and 10. We collect 1000 trajectories per task for training, and maintain a separate set of trajectories and initial configurations to be used for evaluation. The trajectories are collected using a hard-coded policy. 5.1 Performance Evaluation 1 2 3 4 5 6 7 Number of Stages 0% 20% 40% 60% 80% 100% Average Success Rate Policy Type Demo BC DAGGER Snapshot Final state (a) Performance on training tasks. 2 4 5 6 7 8 Number of Stages 0% 20% 40% 60% 80% 100% Average Success Rate Policy Type Demo BC DAGGER Snapshot Final state (b) Performance on test tasks. Figure 3: Comparison of different conditioning strategies. The darkest bar shows the performance of the hard-coded policy, which unsurprisingly performs the best most of the time. For architectures that use temporal dropout, we use an ensemble of 10 different downsampled demonstrations and average the action distributions. Then for all architectures we use the greedy action for evaluation. Fig. 3 shows the performance of various architectures. Results for training and test tasks are presented separately, where we group tasks by the number of stages required to complete them. This is because tasks that require more stages to complete are typically more challenging. In fact, even our scripted policy frequently fails on the hardest tasks. We measure success rate per task by executing the greedy policy (taking the most confident action at every time step) in 100 different configurations, each conditioned on a different demonstration unseen during training. We report the average success rate over all tasks within the same group. 7 From the figure, we can observe that for the easier tasks with fewer stages, all of the different conditioning strategies perform equally well and almost perfectly. As the difficulty (number of stages) increases, however, conditioning on the entire demonstration starts to outperform conditioning on the final state. One possible explanation is that when conditioned only on the final state, the policy may struggle about which block it should stack first, a piece of information that is readily accessible from demonstration, which not only communicates the task, but also provides valuable information to help accomplish it. More surprisingly, conditioning on the entire demonstration also seems to outperform conditioning on the snapshot, which we originally expected to perform the best. We suspect that this is due to the regularization effect introduced by temporal dropout, which effectively augments the set of demonstrations seen by the policy during training. Another interesting finding was that training with behavioral cloning has the same level of performance as training with DAGGER, which suggests that the entire training procedure could work without requiring interactive supervision. In our preliminary experiments, we found that injecting noise into the trajectory collection process was important for behavioral cloning to work well, hence in all experiments reported here we use noise injection. In practice, such noise can come from natural human-induced noise through tele-operation, or by artificially injecting additional noise before applying it on the physical robot. 5.2 Visualization We visualize the attention mechanisms underlying the main policy architecture to have a better understanding about how it operates. There are two kinds of attention we are mainly interested in, one where the policy attends to different time steps in the demonstration, and the other where the policy attends to different blocks in the current state. Fig. 4 shows some of the attention heatmaps. (a) Attention over blocks in the current state. (b) Attention over downsampled demonstration. Figure 4: Visualizing attentions performed by the policy during an entire execution. The task being performed is ab cde fg hij. Note that the policy has multiple query heads for each type of attention, and only one query head per type is visualized. (a) We can observe that the policy almost always focuses on a small subset of the block positions in the current state, which allows the manipulation network to generalize to operations over different blocks. (b) We can observe a sparse pattern of time steps that have high attention weights. This suggests that the policy has essentially learned to segment the demonstrations, and only attend to important key frames. Note that there are roughly 6 regions of high attention weights, which nicely corresponds to the 6 stages required to complete the task. 6 Conclusions In this work, we presented a simple model that maps a single successful demonstration of a task to an effective policy that solves said task in a new situation. We demonstrated effectiveness of this approach on a family of block stacking tasks. There are a lot of exciting directions for future work. We plan to extend the framework to demonstrations in the form of image data, which will allow more end-to-end learning without requiring a separate perception module. We are also interested in enabling the policy to condition on multiple demonstrations, in case where one demonstration does not fully resolve ambiguity in the objective. Furthermore and most importantly, we hope to scale up 8 our method on a much larger and broader distribution of tasks, and explore its potential towards a general robotics imitation learning system that would be able to achieve an overwhelming variety of tasks. 7 Acknowledgement We would like to thank our colleagues at UC Berkeley and OpenAI for insightful discussions. This research was funded in part by ONR through a PECASE award. Yan Duan was also supported by a Huawei Fellowship. Jonathan Ho was also supported by an NSF Fellowship. References [1] Pieter Abbeel and Andrew Ng. Apprenticeship learning via inverse reinforcement learning. In International Conference on Machine Learning (ICML), 2004. [2] Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. In Neural Information Processing Systems (NIPS), 2016. [3] Brenna D Argall, Sonia Chernova, Manuela Veloso, and Brett Browning. A survey of robot learning from demonstration. Robotics and autonomous systems, 57(5):469–483, 2009. [4] Yusuf Aytar and Andrew Zisserman. Tabula rasa: Model transfer for object category detection. In 2011 International Conference on Computer Vision, pages 2252–2259. IEEE, 2011. [5] Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Neural Information Processing Systems (NIPS), 2016. [6] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. [7] Peter Battaglia, Razvan Pascanu, Matthew Lai, Danilo Jimenez Rezende, et al. Interaction networks for learning about objects, relations and physics. In Advances in Neural Information Processing Systems, pages 4502–4510, 2016. [8] Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and Jan Gecsei. On the optimization of a synaptic learning rule. In Optimality in Artificial and Biological Neural Networks, pages 6–8, 1992. [9] Yoshua Bengio, Samy Bengio, and Jocelyn Cloutier. Learning a synaptic learning rule. Université de Montréal, Département d’informatique et de recherche opérationnelle, 1990. [10] Dimitri P Bertsekas and John N Tsitsiklis. Neuro-dynamic programming: an overview. In Decision and Control, 1995., Proceedings of the 34th IEEE Conference on, volume 1, pages 560–564. IEEE, 1995. [11] Sylvain Calinon. Robot programming by demonstration. EPFL Press, 2009. [12] Michael B Chang, Tomer Ullman, Antonio Torralba, and Joshua B Tenenbaum. A compositional object-based approach to learning physical dynamics. In Int. Conf. on Learning Representations (ICLR), 2017. [13] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoderdecoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. [14] Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In ICML, pages 647–655, 2014. [15] Lixin Duan, Dong Xu, and Ivor Tsang. Learning with augmented features for heterogeneous domain adaptation. arXiv preprint arXiv:1206.4660, 2012. 9 [16] Yan Duan, John Schulman, Xi Chen, Peter L Bartlett, Ilya Sutskever, and Pieter Abbeel. Rl2: Fast reinforcement learning via slow reinforcement learning. arXiv preprint arXiv:1611.02779, 2016. [17] Harrison Edwards and Amos Storkey. Towards a neural statistician. International Conference on Learning Representations (ICLR), 2017. [18] Chelsea Finn, Sergey Levine, and Pieter Abbeel. Guided cost learning: Deep inverse optimal control via policy optimization. In Proceedings of the 33rd International Conference on Machine Learning, volume 48, 2016. [19] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400, 2017. [20] Abhishek Gupta, Coline Devin, YuXuan Liu, Pieter Abbeel, and Sergey Levine. Learning invariant feature spaces to transfer skills with reinforcement learning. In Int. Conf. on Learning Representations (ICLR), 2017. [21] Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pages 2944–2952, 2015. [22] Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, pages 4565–4573, 2016. [23] Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks. Springer, 2001. [24] Judy Hoffman, Erik Rodner, Jeff Donahue, Trevor Darrell, and Kate Saenko. Efficient learning of domain-invariant image representations. arXiv preprint arXiv:1301.3224, 2013. [25] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2014. [26] Gregory Koch. Siamese neural networks for one-shot image recognition. ICML Deep Learning Workshop, 2015. [27] David Krueger, Tegan Maharaj, János Kramár, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary Ke, Anirudh Goyal, Yoshua Bengio, Hugo Larochelle, Aaron Courville, et al. Zoneout: Regularizing rnns by randomly preserving hidden activations. arXiv preprint arXiv:1606.01305, 2016. [28] Brian Kulis, Kate Saenko, and Trevor Darrell. What you saw is not what you get: Domain adaptation using asymmetric kernel transforms. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 1785–1792. IEEE, 2011. [29] S. Levine, Z. Popovic, and V. Koltun. Nonlinear inverse reinforcement learning with gaussian processes. In Advances in Neural Information Processing Systems (NIPS), 2011. [30] Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. [31] Ke Li and Jitendra Malik. Learning to optimize. arXiv preprint arXiv:1606.01885, 2016. [32] Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. [33] Mingsheng Long and Jianmin Wang. Learning transferable features with deep adaptation networks. CoRR, abs/1502.02791, 1:2, 2015. [34] Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Domain adaptation: Learning bounds and algorithms. arXiv preprint arXiv:0902.3430, 2009. 10 [35] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [36] Devang K Naik and RJ Mammone. Meta-neural networks that learn by learning. In International Joint Conference on Neural Netowrks (IJCNN), 1992. [37] Andrew Ng and Stuart Russell. Algorithms for inverse reinforcement learning. In International Conference on Machine Learning (ICML), 2000. [38] Andrew Y Ng, Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, volume 99, pages 278–287, 1999. [39] Andrew Y Ng, H Jin Kim, Michael I Jordan, Shankar Sastry, and Shiv Ballianda. Autonomous helicopter flight via reinforcement learning. In NIPS, volume 16, 2003. [40] Jan Peters and Stefan Schaal. Reinforcement learning of motor skills with policy gradients. Neural networks, 21(4):682–697, 2008. [41] Dean A Pomerleau. Alvinn: An autonomous land vehicle in a neural network. In Advances in Neural Information Processing Systems, pages 305–313, 1989. [42] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In Under Review, ICLR, 2017. [43] Danilo Jimenez Rezende, Shakir Mohamed, Ivo Danihelka, Karol Gregor, and Daan Wierstra. One-shot generalization in deep generative models. International Conference on Machine Learning (ICML), 2016. [44] Stéphane Ross, Geoffrey J Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In AISTATS, volume 1, page 6, 2011. [45] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. [46] Fereshteh Sadeghi and Sergey Levine. (cad)2 rl: Real single-image flight without a single real image. 2016. [47] Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Meta-learning with memory-augmented neural networks. In International Conference on Machine Learning (ICML), 2016. [48] Stefan Schaal. Is imitation learning the route to humanoid robots? Trends in cognitive sciences, 3(6):233–242, 1999. [49] Jurgen Schmidhuber. Evolutionary principles in self-referential learning. On learning how to learn: The meta-meta-... hook.) Diploma thesis, Institut f. Informatik, Tech. Univ. Munich, 1987. [50] Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 1992. [51] John Schulman, Sergey Levine, Pieter Abbeel, Michael I Jordan, and Philipp Moritz. Trust region policy optimization. In ICML, pages 1889–1897, 2015. [52] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. [53] Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. 11 [54] Bradlie Stadie, Pieter Abbeel, and Ilya Sutskever. Third person imitation learning. In Int. Conf. on Learning Representations (ICLR), 2017. [55] 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. [56] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. [57] Gerald Tesauro. Temporal difference learning and td-gammon. Communications of the ACM, 38(3):58–68, 1995. [58] Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 1998. [59] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. [60] Eric Tzeng, Coline Devin, Judy Hoffman, Chelsea Finn, Xingchao Peng, Pieter Abbeel, Sergey Levine, Kate Saenko, and Trevor Darrell. Towards adapting deep visuomotor representations from simulated to real environments. arXiv preprint arXiv:1511.07111, 2015. [61] Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Neural Information Processing Systems (NIPS), 2016. [62] Jane X Wang, Zeb Kurth-Nelson, Dhruva Tirumala, Hubert Soyer, Joel Z Leibo, Remi Munos, Charles Blundell, Dharshan Kumaran, and Matt Botvinick. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016. [63] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C Courville, Ruslan Salakhutdinov, Richard S Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, volume 14, pages 77–81, 2015. [64] Jun Yang, Rong Yan, and Alexander G Hauptmann. Cross-domain video concept detection using adaptive svms. In Proceedings of the 15th ACM international conference on Multimedia, pages 188–197. ACM, 2007. [65] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. In International Conference on Learning Representations (ICLR), 2016. [66] B. Ziebart, A. Maas, J. A. Bagnell, and A. K. Dey. Maximum entropy inverse reinforcement learning. In AAAI Conference on Artificial Intelligence, 2008. 12 | 2017 | 485 |
6,991 | Triangle Generative Adversarial Networks Zhe Gan∗, Liqun Chen∗, Weiyao Wang, Yunchen Pu, Yizhe Zhang, Hao Liu, Chunyuan Li, Lawrence Carin Duke University zhe.gan@duke.edu Abstract A Triangle Generative Adversarial Network (∆-GAN) is developed for semisupervised cross-domain joint distribution matching, where the training data consists of samples from each domain, and supervision of domain correspondence is provided by only a few paired samples. ∆-GAN consists of four neural networks, two generators and two discriminators. The generators are designed to learn the two-way conditional distributions between the two domains, while the discriminators implicitly define a ternary discriminative function, which is trained to distinguish real data pairs and two kinds of fake data pairs. The generators and discriminators are trained together using adversarial learning. Under mild assumptions, in theory the joint distributions characterized by the two generators concentrate to the data distribution. In experiments, three different kinds of domain pairs are considered, image-label, image-image and image-attribute pairs. Experiments on semi-supervised image classification, image-to-image translation and attribute-based image generation demonstrate the superiority of the proposed approach. 1 Introduction Generative adversarial networks (GANs) [1] have emerged as a powerful framework for learning generative models of arbitrarily complex data distributions. When trained on datasets of natural images, significant progress has been made on generating realistic and sharp-looking images [2, 3]. The original GAN formulation was designed to learn the data distribution in one domain. In practice, one may also be interested in matching two joint distributions. This is an important task, since mapping data samples from one domain to another has a wide range of applications. For instance, matching the joint distribution of image-text pairs allows simultaneous image captioning and textconditional image generation [4], while image-to-image translation [5] is another challenging problem that requires matching the joint distribution of image-image pairs. In this work, we are interested in designing a GAN framework to match joint distributions. If paired data are available, a simple approach to achieve this is to train a conditional GAN model [4, 6], from which a joint distribution is readily manifested and can be matched to the empirical joint distribution provided by the paired data. However, fully supervised data are often difficult to acquire. Several methods have been proposed to achieve unsupervised joint distribution matching without any paired data, including DiscoGAN [7], CycleGAN [8] and DualGAN [9]. Adversarially Learned Inference (ALI) [10] and Bidirectional GAN (BiGAN) [11] can be readily adapted to this case as well. Though empirically achieving great success, in principle, there exist infinitely many possible mapping functions that satisfy the requirement to map a sample from one domain to another. In order to alleviate this nonidentifiability issue, paired data are needed to provide proper supervision to inform the model the kind of joint distributions that are desired. This motivates the proposed Triangle Generative Adversarial Network (∆-GAN), a GAN framework that allows semi-supervised joint distribution matching, where the supervision of domain ∗Equal contribution. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Illustration of the Triangle Generative Adversarial Network (∆-GAN). correspondence is provided by a few paired samples. ∆-GAN consists of two generators and two discriminators. The generators are designed to learn the bidirectional mappings between domains, while the discriminators are trained to distinguish real data pairs and two kinds of fake data pairs. Both the generators and discriminators are trained together via adversarial learning. ∆-GAN bears close resemblance to Triple GAN [12], a recently proposed method that can also be utilized for semi-supervised joint distribution mapping. However, there exist several key differences that make our work unique. First, ∆-GAN uses two discriminators in total, which implicitly defines a ternary discriminative function, instead of a binary discriminator as used in Triple GAN. Second, ∆-GAN can be considered as a combination of conditional GAN and ALI, while Triple GAN consists of two conditional GANs. Third, the distributions characterized by the two generators in both ∆-GAN and Triple GAN concentrate to the data distribution in theory. However, when the discriminator is optimal, the objective of ∆-GAN becomes the Jensen-Shannon divergence (JSD) among three distributions, which is symmetric; the objective of Triple GAN consists of a JSD term plus a Kullback-Leibler (KL) divergence term. The asymmetry of the KL term makes Triple GAN more prone to generating fake-looking samples [13]. Lastly, the calculation of the additional KL term in Triple GAN is equivalent to calculating a supervised loss, which requires the explicit density form of the conditional distributions, which may not be desirable. On the other hand, ∆-GAN is a fully adversarial approach that does not require that the conditional densities can be computed; ∆-GAN only require that the conditional densities can be sampled from in a way that allows gradient backpropagation. ∆-GAN is a general framework, and can be used to match any joint distributions. In experiments, in order to demonstrate the versatility of the proposed model, we consider three domain pairs: image-label, image-image and image-attribute pairs, and use them for semi-supervised classification, image-to-image translation and attribute-based image editing, respectively. In order to demonstrate the scalability of the model to large and complex datasets, we also present attribute-conditional image generation on the COCO dataset [14]. 2 Model 2.1 Generative Adversarial Networks (GANs) Generative Adversarial Networks (GANs) [1] consist of a generator G and a discriminator D that compete in a two-player minimax game, where the generator is learned to map samples from an arbitray latent distribution to data, while the discriminator tries to distinguish between real and generated samples. The goal of the generator is to “fool” the discriminator by producing samples that are as close to real data as possible. Specifically, D and G are learned as min G max D V (D, G) = Ex∼p(x)[log D(x)] + Ez∼pz(z)[log(1 −D(G(z)))] , (1) where p(x) is the true data distribution, and pz(z) is usually defined to be a simple distribution, such as the standard normal distribution. The generator G implicitly defines a probability distribution pg(x) as the distribution of the samples G(z) obtained when z ∼pz(z). For any fixed generator 2 G, the optimal discriminator is D(x) = p(x) pg(x)+p(x). When the discriminator is optimal, solving this adversarial game is equivalent to minimizing the Jenson-Shannon Divergence (JSD) between p(x) and pg(x) [1]. The global equilibrium is achieved if and only if p(x) = pg(x). 2.2 Triangle Generative Adversarial Networks (∆-GANs) We now extend GAN to ∆-GAN for joint distribution matching. We first consider ∆-GAN in the supervised setting, and then discuss semi-supervised learning in Section 2.4. Consider two related domains, with x and y being the data samples for each domain. We have fully-paired data samples that are characterized by the joint distribution p(x, y), which also implies that samples from both the marginal p(x) and p(y) can be easily obtained. ∆-GAN consists of two generators: (i) a generator Gx(y) that defines the conditional distribution px(x|y), and (ii) a generator Gy(x) that characterizes the conditional distribution in the other direction py(y|x). Gx(y) and Gy(x) may also implicitly contain a random latent variable z as input, i.e., Gx(y, z) and Gy(x, z). In the ∆-GAN game, after a sample x is drawn from p(x), the generator Gy produces a pseudo sample ˜y following the conditional distribution py(y|x). Hence, the fake data pair (x, ˜y) is a sample from the joint distribution py(x, y) = py(y|x)p(x). Similarly, a fake data pair (˜x, y) can be sampled from the generator Gx by first drawing y from p(y) and then drawing ˜x from px(x|y); hence (˜x, y) is sampled from the joint distribution px(x, y) = px(x|y)p(y). As such, the generative process between px(x, y) and py(x, y) is reversed. The objective of ∆-GAN is to match the three joint distributions: p(x, y), px(x, y) and py(x, y). If this is achieved, we are ensured that we have learned a bidirectional mapping px(x|y) and py(y|x) that guarantees the generated fake data pairs (˜x, y) and (x, ˜y) are indistinguishable from the true data pairs (x, y). In order to match the joint distributions, an adversarial game is played. Joint pairs are drawn from three distributions: p(x, y), px(x, y) or py(x, y), and two discriminator networks are learned to discriminate among the three, while the two conditional generator networks are trained to fool the discriminators. The value function describing the game is given by min Gx,Gy max D1,D2V (Gx, Gy, D1, D2) = E(x,y)∼p(x,y)[log D1(x, y)] (2) + Ey∼p(y),˜x∼px(x|y) h log (1 −D1(˜x, y)) · D2(˜x, y) i + Ex∼p(x),˜y∼py(y|x) h log (1 −D1(x, ˜y)) · (1 −D2(x, ˜y)) i . The discriminator D1 is used to distinguish whether a sample pair is from p(x, y) or not, if this sample pair is not from p(x, y), another discriminator D2 is used to distinguish whether this sample pair is from px(x, y) or py(x, y). D1 and D2 work cooperatively, and the use of both implicitly defines a ternary discriminative function D that distinguish sample pairs in three ways. See Figure 1 for an illustration of the adversarial game and Appendix B for an algorithmic description of the training procedure. 2.3 Theoretical analysis ∆-GAN shares many of the theoretical properties of GANs [1]. We first consider the optimal discriminators D1 and D2 for any given generator Gx and Gy. These optimal discriminators then allow reformulation of objective (2), which reduces to the Jensen-Shannon divergence among the joint distribution p(x, y), px(x, y) and py(x, y). Proposition 1. For any fixed generator Gx and Gy, the optimal discriminator D1 and D2 of the game defined by V (Gx, Gy, D1, D2) is D∗ 1(x, y) = p(x, y) p(x, y) + px(x, y) + py(x, y), D∗ 2(x, y) = px(x, y) px(x, y) + py(x, y) . Proof. The proof is a straightforward extension of the proof in [1]. See Appendix A for details. Proposition 2. The equilibrium of V (Gx, Gy, D1, D2) is achieved if and only if p(x, y) = px(x, y) = py(x, y) with D∗ 1(x, y) = 1 3 and D∗ 2(x, y) = 1 2, and the optimum value is −3 log 3. 3 Proof. Given the optimal D∗ 1(x, y) and D∗ 2(x, y), the minimax game can be reformulated as: C(Gx, Gy) = max D1,D2 V (Gx, Gy, D1, D2) (3) = −3 log 3 + 3 · JSD p(x, y), px(x, y), py(x, y) ≥−3 log 3 , (4) where JSD denotes the Jensen-Shannon divergence (JSD) among three distributions. See Appendix A for details. Since p(x, y) = px(x, y) = py(x, y) can be achieved in theory, it can be readily seen that the learned conditional generators can reveal the true conditional distributions underlying the data, i.e., px(x|y) = p(x|y) and py(y|x) = p(y|x). 2.4 Semi-supervised learning In order to further understand ∆-GAN, we write (2) as V = Ep(x,y)[log D1(x, y)] + Epx(˜x,y)[log(1 −D1(˜x, y))] + Epy(x,˜y)[log(1 −D1(x, ˜y))] | {z } conditional GAN (5) + Epx(˜x,y)[log D2(˜x, y)] + Epy(x,˜y)[log(1 −D2(x, ˜y))] | {z } BiGAN/ALI . (6) The objective of ∆-GAN is a combination of the objectives of conditional GAN and BiGAN. The BiGAN part matches two joint distributions: px(x, y) and py(x, y), while the conditional GAN part provides the supervision signal to notify the BiGAN part what joint distribution to match. Therefore, ∆-GAN provides a natural way to perform semi-supervised learning, since the conditional GAN part and the BiGAN part can be used to account for paired and unpaired data, respectively. However, when doing semi-supervised learning, there is also one potential problem that we need to be cautious about. The theoretical analysis in Section 2.3 is based on the assumption that the dataset is fully supervised, i.e., we have the ground-truth joint distribution p(x, y) and marginal distributions p(x) and p(y). In the semi-supervised setting, p(x) and p(y) are still available but p(x, y) is not. We can only obtain the joint distribution pl(x, y) characterized by the few paired data samples. Hence, in the semi-supervised setting, px(x, y) and py(x, y) will try to concentrate to the empirical distribution pl(x, y). We make the assumption that pl(x, y) ≈p(x, y), i.e., the paired data can roughly characterize the whole dataset. For example, in the semi-supervised classification problem, one usually strives to make sure that labels are equally distributed among the labeled dataset. 2.5 Relation to Triple GAN ∆-GAN is closely related to Triple GAN [12]. Below we review Triple GAN and then discuss the main differences. The value function of Triple GAN is defined as follows: V =Ep(x,y)[log D(x, y)] + (1 −α)Epx(˜x,y)[log(1 −D(˜x, y))] + αEpy(x,˜y)[log(1 −D(x, ˜y))] +Ep(x,y)[−log py(y|x)] , (7) where α ∈(0, 1) is a contant that controls the relative importance of the two generators. Let Triple GAN-s denote a simplified Triple GAN model with only the first three terms. As can be seen, Triple GAN-s can be considered as a combination of two conditional GANs, with the importance of each condtional GAN weighted by α. It can be proven that Triple GAN-s achieves equilibrium if and only if p(x, y) = (1 −α)px(x, y) + αpy(x, y), which is not desirable. To address this problem, in Triple GAN a standard supervised loss RL = Ep(x,y)[−log py(y|x)] is added. As a result, when the discriminator is optimal, the cost function in Triple GAN becomes: 2JSD p(x, y)||((1 −α)px(x, y) + αpy(x, y)) + KL(p(x, y)||py(x, y)) + const. (8) This cost function has the good property that it has a unique minimum at p(x, y) = px(x, y) = py(x, y). However, the objective becomes asymmetrical. The second KL term pays low cost for generating fake-looking samples [13]. By contrast ∆-GAN directly optimizes the symmetric Jensen-Shannon divergence among three distributions. More importantly, the calculation of 4 Ep(x,y)[−log py(y|x)] in Triple GAN also implies that the explicit density form of py(y|x) should be provided, which may not be desirable. On the other hand, ∆-GAN only requires that py(y|x) can be sampled from. For example, if we assume py(y|x) = R δ(y −Gy(x, z))p(z)dz, and δ(·) is the Dirac delta function, we can sample y through sampling z, however, the density function of py(y|x) is not explicitly available. 2.6 Applications ∆-GAN is a general framework that can be used for any joint distribution matching. Besides the semi-supervised image classification task considered in [12], we also conduct experiments on image-to-image translation and attribute-conditional image generation. When modeling image pairs, both px(x|y) and py(y|x) are implemented without introducing additional latent variables, i.e., px(x|y) = δ(x −Gx(y)), py(y|x) = δ(y −Gy(x)). A different strategy is adopted when modeling the image-label/attribute pairs. Specifically, let x denote samples in the image domain, y denote samples in the label/attribute domain. y is a one-hot vector or a binary vector when representing labels and attributes, respectively. When modeling px(x|y), we assume that x is transformed by the latent style variables z given the label or attribute vector y, i.e., px(x|y) = R δ(x−Gx(y, z))p(z)dz, where p(z) is chosen to be a simple distribution (e.g., uniform or standard normal). When learning py(y|x), py(y|x) is assumed to be a standard multi-class or multi-label classfier without latent variables z. In order to allow the training signal backpropagated from D1 and D2 to Gy, we adopt the REINFORCE algorithm as in [12], and use the label with the maximum probability to approximate the expectation over y, or use the output of the sigmoid function as the predicted attribute vector. 3 Related work The proposed framework focuses on designing GAN for joint-distribution matching. Conditional GAN can be used for this task if supervised data is available. Various conditional GANs have been proposed to condition the image generation on class labels [6], attributes [15], texts [4, 16] and images [5, 17]. Unsupervised learning methods have also been developed for this task. BiGAN [11] and ALI [10] proposed a method to jointly learn a generation network and an inference network via adversarial learning. Though originally designed for learning the two-way transition between the stochastic latent variables and real data samples, BiGAN and ALI can be directly adapted to learn the joint distribution of two real domains. Another method is called DiscoGAN [7], in which two generators are used to model the bidirectional mapping between domains, and another two discriminators are used to decide whether a generated sample is fake or not in each individual domain. Further, additional reconstructon losses are introduced to make the two generators strongly coupled and also alleviate the problem of mode collapsing. Similiar work includes CycleGAN [8], DualGAN [9] and DTN [18]. Additional weight-sharing constraints are introduced in CoGAN [19] and UNIT [20]. Our work differs from the above work in that we aim at semi-supervised joint distribution matching. The only work that we are aware of that also achieves this goal is Triple GAN. However, our model is distinct from Triple GAN in important ways (see Section 2.5). Further, Triple GAN only focuses on image classification, while ∆-GAN has been shown to be applicable to a wide range of applications. Various methods and model architectures have been proposed to improve and stabilize the training of GAN, such as feature matching [21, 22, 23], Wasserstein GAN [24], energy-based GAN [25], and unrolled GAN [26] among many other related works. Our work is orthogonal to these methods, which could also be used to improve the training of ∆-GAN. Instead of using adversarial loss, there also exists work that uses supervised learning [27] for joint-distribution matching, and variational autoencoders for semi-supervised learning [28, 29]. Lastly, our work is also closely related to the recent work of [30, 31, 32], which treats one of the domains as latent variables. 4 Experiments We present results on three tasks: (i) semi-supervised classification on CIFAR10 [33]; (ii) imageto-image translation on MNIST [34] and the edges2shoes dataset [5]; and (iii) attribute-to-image generation on CelebA [35] and COCO [14]. We also conduct a toy data experiment to further demonstrate the differences between ∆-GAN and Triple GAN. We implement ∆-GAN without introducing additional regularization unless explicitly stated. All the network architectures are provided in the Appendix. 5 (a) real data (b) Triangle GAN (c) Triple GAN Figure 2: Toy data experiment on ∆-GAN and Triple GAN. (a) the joint distribution p(x, y) of real data. For (b) and (c), the left and right figure is the learned joint distribution px(x, y) and py(x, y), respectively. Table 1: Error rates (%) on the partially labeled CIFAR10 dataset. Algorithm n = 4000 CatGAN [36] 19.58 ± 0.58 Improved GAN [21] 18.63 ± 2.32 ALI [10] 17.99 ± 1.62 Triple GAN [12] 16.99 ± 0.36 ∆-GAN (ours) 16.80 ± 0.42 Table 2: Classification accuracy (%) on the MNIST-toMNIST-transpose dataset. Algorithm n = 100 n = 1000 All DiscoGAN − − 15.00± 0.20 Triple GAN 63.79 ± 0.85 84.93 ± 1.63 86.70 ± 1.52 ∆-GAN 83.20± 1.88 88.98± 1.50 93.34± 1.46 4.1 Toy data experiment We first compare our method with Triple GAN on a toy dataset. We synthesize data by drawing (x, y) ∼1 4N(µ1, Σ1) + 1 4N(µ2, Σ2) + 1 4N(µ3, Σ3) + 1 4N(µ4, Σ4), where µ1 = [0, 1.5]⊤, µ2 = [−1.5, 0]⊤, µ3 = [1.5, 0]⊤, µ4 = [0, −1.5]⊤, Σ1 = Σ4 = ( 3 0 0 0.025 ) and Σ2 = Σ3 = ( 0.025 0 0 3 ). We generate 5000 (x, y) pairs for each mixture component. In order to implement ∆-GAN and Triple GAN-s, we model px(x|y) and py(y|x) as px(x|y) = R δ(x−Gx(y, z))p(z)dz, py(y|x) = R δ(y − Gy(x, z))p(z)dz where both Gx and Gy are modeled as a 4-hidden-layer multilayer perceptron (MLP) with 500 hidden units in each layer. p(z) is a bivariate standard Gaussian distribution. Triple GAN can be implemented by specifying both px(x|y) and py(y|x) to be distributions with explicit density form, e.g., Gaussian distributions. However, the performance can be bad since it fails to capture the multi-modality of px(x|y) and py(y|x). Hence, only Triple GAN-s is implemented. Results are shown in Figure 2. The joint distributions px(x, y) and py(x, y) learned by ∆-GAN successfully match the true joint distribution p(x, y). Triple GAN-s cannot achieve this, and can only guarantee 1 2(px(x, y) + py(x, y)) matches p(x, y). Although this experiment is limited due to its simplicity, the results clearly support the advantage of our proposed model over Triple GAN. 4.2 Semi-supervised classification We evaluate semi-supervised classification on the CIFAR10 dataset with 4000 labels. The labeled data is distributed equally across classes and the results are averaged over 10 runs with different random splits of the training data. For fair comparison, we follow the publically available code of Triple GAN and use the same regularization terms and hyperparameter settings as theirs. Results are summarized in Table 1. Our ∆-GAN achieves the best performance among all the competing methods. We also show the ability of ∆-GAN to disentangle classes and styles in Figure 3. ∆-GAN can generate realistic data in a specific class and the injected noise vector encodes meaningful style patterns like background and color. 4.3 Image-to-image translation We first evaluate image-to-image translation on the edges2shoes dataset. Results are shown in Figure 4(bottom). Though DiscoGAN is an unsupervised learning method, it achieves impressive results. However, with supervision provided by 10% paired data, ∆-GAN generally generates more accurate edge details of the shoes. In order to provide quantitative evaluation of translating shoes to edges, we use mean squared error (MSE) as our metric. The MSE of using DiscoGAN is 140.1; with 10%, 20%, 100% paired data, the MSE of using ∆-GAN is 125.3, 113.0 and 66.4, respectively. To further demonstrate the importance of providing supervision of domain correspondence, we created a new dataset based on MNIST [34], where the two image domains are the MNIST images and their corresponding tranposed ones. As can be seen in Figure 4(top), ∆-GAN matches images 6 Figure 3: Generated CIFAR10 samples, where each row shares the same label and each column uses the same noise. -GAN DiscoGAN Input: GT Output: DiscoGAN: -GAN: Input: Output: Input: Output: Figure 4: Image-to-image translation experiments on the MNIST-to-MNIST-transpose and edges2shoes datasets. Big Nose, Black Hair, Bushy Eyebrows, Male, Young, Sideburns Attractive, Smiling, High Cheekbones, Mouth Slightly Open, Wearing Lipstick Attractive, Black Hair, Male, High Cheekbones, Smiling, Straight Hair Big Nose, Chubby, Goatee, Male, Oval Face, Sideburns, Wearing Hat Attractive, Blond Hair, No Beard, Pointy Nose, Straight Hair, Arched Eyebrows High Cheekbones, Mouth Slightly Open, No Beard, Oval Face, Smiling Attractive, Brown Hair, Heavy Makeup, No Beard, Wavy Hair, Young Attractive, Eyeglasses, No Beard, Straight Hair, Wearing Lipstick, Young Input images Predicted attributes Generated images Figure 5: Results on the face-to-attribute-to-face experiment. The 1st row is the input images; the 2nd row is the predicted attributes given the input images; the 3rd row is the generated images given the predicted attributes. Table 3: Results of P@10 and nDCG@10 for attribute predicting on CelebA and COCO. Dataset CelebA COCO Method 1% 10% 100% 10% 50% 100% Triple GAN 40.97/50.74 62.13/73.56 70.12/79.37 32.64/35.91 34.00/37.76 35.35/39.60 ∆-GAN 53.21/58.39 63.68/75.22 70.37/81.47 34.38/37.91 36.72/40.39 39.05/42.86 betwen domains well, while DiscoGAN fails in this task. For supporting quantitative evaluation, we have trained a classifier on the MNIST dataset, and the classification accuracy of this classifier on the test set approaches 99.4%, and is, therefore, trustworthy as an evaluation metric. Given an input MNIST image x, we first generate a transposed image y using the learned generator, and then manually transpose it back to normal digits yT , and finally send this new image yT to the classifier. Results are summarized in Table 2, which are averages over 5 runs with different random splits of the training data. ∆-GAN achieves significantly better performance than Triple GAN and DiscoGAN. 4.4 Attribute-conditional image generation We apply our method to face images from the CelebA dataset. This dataset consists of 202,599 images annotated with 40 binary attributes. We scale and crop the images to 64 × 64 pixels. In order to qualitatively evaluate the learned attribute-conditional image generator and the multi-label classifier, given an input face image, we first use the classifier to predict attributes, and then use the image generator to produce images based on the predicted attributes. Figure 5 shows example results. Both the learned attribute predictor and the image generator provides good results. We further show another set of image editing experiment in Figure 6. For each subfigure, we use a same set of attributes with different noise vectors to generate images. For example, for the top-right subfigure, 7 1st row + pale skin = 2nd row 1st row + mouth slightly open = 2nd row 1st row + eyeglasses = 2nd row 1st row + wearing hat = 2nd row Figure 6: Results on the image editing experiment. Input Predicted attributes Generated images Input Predicted attributes Generated images baseball, standing, next, player, man, group, person, field, sport, ball, outdoor, game, grass, crowd ! tennis, player, court, man, playing, field, racket, sport, swinging, ball, outdoor, holding, game, grass surfing, people, woman, water, standing, wave, man, top, riding, sport, ocean, outdoor, board! skiing, man, group, covered, day, hill, person, snow, riding, outdoor red, sign, street, next, pole, outdoor, stop, grass ! pizza, rack, blue, grill, plate, stove, table, pan, holding, pepperoni, cooked sink, shower, indoor, tub, restroom, bathroom, small, standing, room, tile, white, stall, tiled, black, bath ! computer, laptop, room, front, living, indoor, table, desk ! Figure 7: Results on the image-to-attribute-to-image experiment. all the images in the 1st row were generated based on the following attributes: black hair, female, attractive, and we then added the attribute of “sunglasses” when generating the images in the 2nd row. It is interesting to see that ∆-GAN has great flexibility to adjust the generated images by changing certain input attribtutes. For instance, by switching on the wearing hat attribute, one can edit the face image to have a hat on the head. In order to demonstrate the scalablility of our model to large and complex datasets, we also present results on the COCO dataset. Following [37], we first select a set of 1000 attributes from the caption text in the training set, which includes the most frequent nouns, verbs, or adjectives. The images in COCO are scaled and cropped to have 64 × 64 pixels. Unlike the case of CelebA face images, the networks need to learn how to handle multiple objects and diverse backgrounds. Results are provided in Figure 7. We can generate reasonably good images based on the predicted attributes. The input and generated images also clearly share a same set of attributes. We also observe diversity in the samples by simply drawing multple noise vectors and using the same predicted attributes. Precision (P) and normalized Discounted Cumulative Gain (nDCG) are two popular evaluation metrics for multi-label classification problems. Table 3 provides the quantatitive results of P@10 and nDCG@10 on CelebA and COCO, where @k means at rank k (see the Appendix for definitions). For fair comparison, we use the same network architecures for both Triple GAN and ∆-GAN. ∆-GAN consistently provides better results than Triple GAN. On the COCO dataset, our semi-supervised learning approach with 50% labeled data achieves better performance than the results of Triple GAN using the full dataset, demonstrating the effectiveness of our approach for semi-supervised joint distribution matching. More results for the above experiments are provided in the Appendix. 5 Conclusion We have presented the Triangle Generative Adversarial Network (∆-GAN), a new GAN framework that can be used for semi-supervised joint distribution matching. Our approach learns the bidirectional mappings between two domains with a few paired samples. We have demonstrated that ∆-GAN may be employed for a wide range of applications. One possible future direction is to combine ∆-GAN with sequence GAN [38] or textGAN [23] to model the joint distribution of image-caption pairs. Acknowledgements This research was supported in part by ARO, DARPA, DOE, NGA and ONR. 8 References [1] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. [2] Emily Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. In NIPS, 2015. [3] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. [4] Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In ICML, 2016. [5] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. [6] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv:1411.1784, 2014. [7] Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jungkwon Lee, and Jiwon Kim. Learning to discover crossdomain relations with generative adversarial networks. In ICML, 2017. [8] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. [9] Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-to-image translation. In ICCV, 2017. [10] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. In ICLR, 2017. [11] Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. In ICLR, 2017. [12] Chongxuan Li, Kun Xu, Jun Zhu, and Bo Zhang. Triple generative adversarial nets. In NIPS, 2017. [13] Martin Arjovsky and Léon Bottou. Towards principled methods for training generative adversarial networks. In ICLR, 2017. [14] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. [15] Guim Perarnau, Joost van de Weijer, Bogdan Raducanu, and Jose M Álvarez. Invertible conditional gans for image editing. arXiv:1611.06355, 2016. [16] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaolei Huang, Xiaogang Wang, and Dimitris Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. In ICCV, 2017. [17] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photo-realistic single image superresolution using a generative adversarial network. In CVPR, 2017. [18] Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. In ICLR, 2017. [19] Ming-Yu Liu and Oncel Tuzel. Coupled generative adversarial networks. In NIPS, 2016. [20] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In NIPS, 2017. [21] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NIPS, 2016. [22] Yizhe Zhang, Zhe Gan, and Lawrence Carin. Generating text via adversarial training. In NIPS workshop on Adversarial Training, 2016. [23] Yizhe Zhang, Zhe Gan, Kai Fan, Zhi Chen, Ricardo Henao, Dinghan Shen, and Lawrence Carin. Adversarial feature matching for text generation. In ICML, 2017. [24] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. arXiv:1701.07875, 2017. 9 [25] Junbo Zhao, Michael Mathieu, and Yann LeCun. Energy-based generative adversarial network. In ICLR, 2017. [26] Luke Metz, Ben Poole, David Pfau, and Jascha Sohl-Dickstein. Unrolled generative adversarial networks. In ICLR, 2017. [27] Yingce Xia, Tao Qin, Wei Chen, Jiang Bian, Nenghai Yu, and Tie-Yan Liu. Dual supervised learning. In ICML, 2017. [28] Yunchen Pu, Zhe Gan, Ricardo Henao, Xin Yuan, Chunyuan Li, Andrew Stevens, and Lawrence Carin. Variational autoencoder for deep learning of images, labels and captions. In NIPS, 2016. [29] Yunchen Pu, Zhe Gan, Ricardo Henao, Chunyuan Li, Shaobo Han, and Lawrence Carin. Vae learning via stein variational gradient descent. In NIPS, 2017. [30] Chunyuan Li, Hao Liu, Changyou Chen, Yunchen Pu, Liqun Chen, Ricardo Henao, and Lawrence Carin. Alice: Towards understanding adversarial learning for joint distribution matching. In NIPS, 2017. [31] Yunchen Pu, Weiyao Wang, Ricardo Henao, Liqun Chen, Zhe Gan, Chunyuan Li, and Lawrence Carin. Adversarial symmetric variational autoencoder. In NIPS, 2017. [32] Yunchen Pu, Liqun Chen, Shuyang Dai, Weiyao Wang, Chunyuan Li, and Lawrence Carin. Symmetric variational autoencoder and connections to adversarial learning. In NIPS, 2017. [33] Alex Krizhevsky. Learning multiple layers of features from tiny images. Citeseer, 2009. [34] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [35] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015. [36] Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv:1511.06390, 2015. [37] Zhe Gan, Chuang Gan, Xiaodong He, Yunchen Pu, Kenneth Tran, Jianfeng Gao, Lawrence Carin, and Li Deng. Semantic compositional networks for visual captioning. In CVPR, 2017. [38] Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: sequence generative adversarial nets with policy gradient. In AAAI, 2017. 10 | 2017 | 486 |
6,992 | Learning Populations of Parameters Kevin Tian, Weihao Kong, and Gregory Valiant Department of Computer Science Stanford University Stanford, CA, 94305 (kjtian, whkong, valiant)@stanford.edu Abstract Consider the following estimation problem: there are n entities, each with an unknown parameter pi ∈[0, 1], and we observe n independent random variables, X1, . . . , Xn, with Xi ∼Binomial(t, pi). How accurately can one recover the “histogram” (i.e. cumulative density function) of the pi’s? While the empirical estimates would recover the histogram to earth mover distance Θ( 1 √ t) (equivalently, ℓ1 distance between the CDFs), we show that, provided n is sufficiently large, we can achieve error O( 1 t ) which is information theoretically optimal. We also extend our results to the multi-dimensional parameter case, capturing settings where each member of the population has multiple associated parameters. Beyond the theoretical results, we demonstrate that the recovery algorithm performs well in practice on a variety of datasets, providing illuminating insights into several domains, including politics, sports analytics, and variation in the gender ratio of offspring. 1 Introduction In many domains, from medical records, to the outcomes of political elections, performance in sports, and a number of biological studies, we have enormous datasets that reflect properties of a large number of entities/individuals. Nevertheless, for many of these datasets, the amount of information that we have about each entity is relatively modest—often too little to accurately infer properties about that entity. In this work, we consider the extent to which we can accurately recover an estimate of the population or set of property values of the entities, even in the regime in which there is insufficient data to resolve properties of each specific entity. To give a concrete example, suppose we have a large dataset representing 1M people, that records whether each person had the flu in each of the past 5 years. Suppose each person has some underlying probability of contracting the flu in a given year, with pi representing the probability that the ith person contracts the flu each year (and assuming independence between years). With 5 years of data, the empirical estimates ˆpi for each person are quite noisy (and the estimates will all be multiples of 1 5). Despite this, to what extent can we hope to accurately recover the population or set of pi’s? An accurate recovery of this population of parameters might be very useful—is it the case that most people have similar underlying probabilities of contracting the flu, or is there significant variation between people? Additionally, such an estimate of this population could be fruitfully leveraged as a prior in making concrete predictions about individuals’ pi’s, as a type of empirical Bayes method. The following example motivates the hope for significantly improving upon the empirical estimates: Example 1. Consider a set of n biased coins, with the ith coin having an unknown bias pi. Suppose we flip each coin twice (independently), and observe that the number of coins where both flips landed heads is roughly n 4 , and similarly for the number coins that landed HT, TH, and TT. We can safely conclude that almost all of the pi’s are almost exactly 1 2. The reasoning proceeds in two 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. steps: first, since the average outcome is balanced between heads and tails, the average pi must be very close to 1 2. Given this, if there was any significant amount of variation in the pi’s, one would expect to see significantly more HHs and TTs than the HT and TH outcomes, simply because Pr[Binomial(2, p) = 1] = 2p(1 −p) attains a maximum for p = 1/2. Furthermore, suppose we now consider the ith coin, and see that it landed heads twice. The empirical estimate of pi would be 1, but if we observe close to n 4 coins with each pair of outcomes, using the above reasoning that argues that almost all of the p’s are likely close to 1 2, we could safely conclude that pi is likely close to 1 2. This ability to “denoise” the empirical estimate of a parameter based on the observations of a number of independent random variables (in this case, the outcomes of the tosses of the other coins), was first pointed out by Charles Stein in the setting of estimating the means of a set of Gaussians and is known as “Stein’s phenomenon” [14]. We discuss this further in Section 1.1. Example 1 was chosen to be an extreme illustration of the ability to leverage the large number of entities being studied, n, to partially compensate for the small amount of data reflecting each entity (the 2 tosses of each coin, in the above example). Our main result, stated below, demonstrates that even for worst-case sets of p’s, significant “denoising” is possible. While we cannot hope to always accurately recover each pi, we show that we can accurately recover the set or histogram of the p’s, as measured in the ℓ1 distance between the cumulative distribution functions, or equivalently, the “earth mover’s distance” (also known as 1Wasserstein distance) between the set of p’s regarded as a distribution P that places mass 1 n at each pi, and the distribution Q returned by our estimator. Equivalently, our returned distribution Q can also be represented as a set of n values q1, . . . , qn, in which case this earth mover’s distance is precisely 1/n times the ℓ1 distance between the vector of sorted pi’s, and the vector of sorted qi’s. Theorem 1. Consider a set of n probabilities, p1, . . . , pn with pi ∈[0, 1], and suppose we observe the outcome of t independent flips of each coin, namely X1, . . . , Xn, with Xi ∼Binomial(t, pi). There is an algorithm that produces a distribution Q supported on [0, 1], such that with probability at least 1 −δ over the randomness of X1, . . . , Xn, ∥P −Q∥W ≤π t + 3t t X i=1 r ln(2t δ ) 3 n ≤π t + Oδ(3tt ln t √n ), where P denotes the distribution that places mass 1 n at value pi, and ∥· ∥W denotes the Wasserstein distance. The above theorem applies to the setting where we hope to recover a set of arbitrary pi’s. In some practical settings, we might think of each pi as being sampled independently from some underlying distribution Ppop over probabilities, and the goal is to recover this population distribution Ppop. Since the empirical distribution of n draws from a distribution Ppop over [0, 1] converges to Ppop in Wasserstein distance at a rate of O(1/√n), the above theorem immediately yeilds the analogous result in this setting: Corollary 1. Consider a distribution Ppop over [0, 1], and suppose we observe X1, . . . , Xn where Xi is obtained by first drawing pi independently from Ppop, and then drawing Xi from Binomial(t, pi). There is an algorithm that will output a distribution Q such that with probability at least 1 −δ, ∥Ppop −Q∥W ≤π t + Oδ 3tt ln t √n . The inverse linear dependence on t of Theorem 1 and Corollary 1 is information theoretically optimal, and is attained asymptotically for sufficiently large n: Proposition 1. Let Ppop denote a distribution over [0, 1], and for positive integers t and n, let X1, . . . , Xn denote random variables with Xi distributed as Binomial(t, pi) where pi is drawn independently according to Ppop. An estimator f maps X1, . . . , Xn to a distribution f(X1, . . . , Xn). Then, for every fixed t, the following lower bound on the accuracy of any estimator holds for all n: inf f sup Ppop E [∥f(X1, . . . , Xn) −Ppop∥W ] > 1 4t. Our estimation algorithm, whose performance is characterized by Theorem 1, proceeds via the method of moments. Given X1, . . . , Xn with Xi ∼Binomial(t, pi), and sufficiently large n, we can 2 obtain accurate estimates of the first t moments of the distribution/histogram P defined by the pi’s. Accurate estimates of the first t moments can then be leveraged to recover an estimate of P that is accurate to error 1 t plus a factor that depends (exponentially on t) on the error in the recovered moments. The intuition for the lower bound, Proposition 1, is that the realizations of Binomial(t, pi) give no information beyond the first t moments. Additionally, there exist distributions P and Q whose first t moments agree exactly, but which differ in their t + 1st moment, and have ∥P −Q∥W ≥1 2t. Putting these two pieces together establishes the lower bound. We also extend our results to the practically relevant multi-parameter analog of the setting described above, where the ith datapoint corresponds to a pair, or d-tuple of hidden parameters, p(i,1), . . . , p(i,d), and we observe independent random variables X(i,1), . . . , X(i,d) with X(i,j) ∼ Binomial(t(i,j), p(i,j)). In this setting, the goal is to recover the multivariate set of d-tuples {p(i,1), . . . , p(i,d)}, again in an earth mover’s sense. This setting corresponds to recovering an approximation of an underlying joint distribution over these d-tuples of parameters. To give one concrete motivation for this problem, consider a hypothetical setting where we have n genotypes (sets of genetic features), with ti people of the ith genotype. Let X(i,1) denote the number of people with the ith genotype who exhibit disease 1, and X(i,2) denote the number of people with genotype i who exhibit disease 2. The interpretation of the hidden parameters pi,1 and pi,2 are the respective probabilities of people with the ith genotype of developing each of the two diseases. Our results imply that provided n is large, one can accurately recover an approximation to the underlying set or two-dimensional joint distribution of {(pi,1, pi,2)} pairs, even in settings where there are too few people of each genotype to accurately determine which of the genotypes are responsible for elevated disease risk. Recovering this set of pairs would allow one to infer whether there are common genetic drivers of the two diseases—even in the regime where there is insufficient data to resolve which genotypes are the common drivers. Our multivariate analog of Theorem 1 is also formulated in terms of multivariate analog of earth mover’s distance (see Definition 1 for a formal definition): Theorem 2. Let {pi,j} denote a set of n d-tuples of hidden parameters in [0, 1]d, with i ∈{1, . . . , n} and j ∈{1, . . . , d}, and suppose we observe random variables Xi,j, with Xi,j ∼Binomial(t, pi,j). There is an algorithm that produces a distribution Q supported on [0, 1]d, such that with probability at least 1 −δ over the randomness of the Xi,js, ∥P −Q∥W ≤C1 t + C2 t X |α|=1 d(2t)d+12t 3|α| r ln(1 δ ) 1 n ≤C1 t + Oδ,t,d( 1 √n), for absolute constants C1, C2, where α is a d-dimensional multi-index consisting of all d-tuples of nonnegative integers summing to at most t, P denotes the distribution that places mass 1 n at value pi = (pi,1, . . . , pi,d) ∈[0, 1]d, and ∥· ∥W denotes the d-dimensional Wasserstein distance between P and Q. 1.1 Related Work The seminal paper of Charles Stein [14] was one of the earliest papers to identify the surprising possibility of leveraging the availability of independent data reflecting a large number of parameters of interest, to partially compensate for having little information about each parameter. The specific setting examined considered the problem of estimating a list of unknown means, µ1, . . . , µn given access to n independent Gaussian random variables, X1, . . . , Xn, with Xi ∼N(µi, 1). Stein showed that, perhaps surprisingly, that there is an estimator for the list of parameters µ1, . . . , µn that has smaller expected squared error than the naive unbiased empirical estimates of ˆµi = Xi. This improved estimator “shrinks” the empirical estimates towards the average of the Xi’s. In our setting, the process of recovering the set/histogram of unknown pi’s and then leveraging this recovered set as a prior to correct the empirical estimates of each pi can be viewed as an analog of Stein’s “shrinkage”, and will have the property that the empirical estimates are shifted (in a non-linear fashion) towards the average of the pi’s. More closely related to the problem considered in this paper is the work on recovering an approximation to the unlabeled set of probabilities of domain elements, given independent draws from a 3 distribution of large discrete support (see e.g. [11, 2, 15, 16, 1]). Instead of learning the distribution, these works considered the alternate goal of simply returning an approximation to the multiset of probabilities with which the domain elements arise but without specifying which element occurs with which probability. Such a multiset can be used to estimate useful properties of the distribution that do not depend on the labels of the domain of the distribution, such as the entropy or support size of the distribution, or the number of elements likely to be observed in a new, larger sample [12, 17]. The benefit of pursuing this weaker goal of returning the unlabeled multiset is that it can be learned to significantly higher accuracy for a given sample size—essentially as accurate as the empirical distribution of a sample that is a logarithmic factor larger [15, 17]. Building on the above work, the recent work [18] considered the problem of recovering the “frequency spectrum” of rare genetic variants. This problem is similar to the problem we consider, but focuses on a rather different regime. Specifically, the model considered posits that each location i = 1, . . . , n in the genome has some probability pi of being mutated in a given individual. Given the sequences of t individuals, the goal is to recover the set of pi’s. The work [18] focused on the regime in which many of the pi’s are significantly less than 1 nt, and hence correspond to mutations that have never been observed; one conclusion of that work was that one can accurately estimate the number of such rare mutations that would be discovered in larger sequencing cohorts. Our work, in contrast, focuses on the regime where the pi’s are constant, and do not scale as a function of n, and the results are incomparable. Also related to the current work are the works [9, 10] on testing whether certain properties of collections of distributions hold. The results of these works show that specific properties, such as whether most of the distributions are identical versus have significant variation, can be decided based on a sample size that is significantly sublinear in the number of distributions. Finally, the papers [5, 6] consider the related by more difficult setting of learning “Poisson Binomials,” namely a sum of independent non-identical Bernoulli random variables, given access to samples. In contrast to our work, in the setting they consider, each “sample” consists of only the sum of these n random variables, rather than observing the outcome of each random variable. 1.2 Organization of paper In Section 2 we describe the two components of our algorithm for recovering the population of Bernoulli parameters: obtaining accurate estimates of the low-order moments (Section 2.1), and leveraging those moments to recover the set of parameters (Section 2.3). The complete algorithm is presented in Section 2.2, and a discussion of the multi-dimensional extension to which Theorem 2 applies is described in Section 2.4. In Section 3 we validate the empirical performance of our approach on synthetic data, as well as illustrate its potential applications to several real-world settings. 2 Learning a population of binomial parameters Our approach to recovering the underlying distribution or set of pi’s proceeds via the method of moments. In the following section we show that, given ≥t samples from each Bernoulli distribution, we can accurately estimate each of the first t moments. In Section 2.3 we explain how these first t moments can then be leveraged to recover the set of pi’s, to earth mover’s distance O(1/t). 2.1 Moment estimation Our method-of-moments approach proceeds by estimating the first t moments of P, namely 1 n Pn i=1 pk i , for each integer k between 1 and t. The estimator we describe is unbiased, and also applies in the setting of Corollary 1 where each pi is drawn i.i.d. from a distribution Ppop. In this case, we will obtain an unbiased estimator for Ep←Ppop[pk]. We limit ourselves to estimating the first t moments because, as show in the proof of the lower bound, Proposition 1, the distribution of the Xi’s are determined by the first t moments, and hence no additional information can be gleaned regarding the higher moments. For 1 ≤k ≤t, our estimate for the kth moment is βk = 1 n Pn i=1 Xi k t k . The motivation for this unbiased estimator is the following: Note that given any k i.i.d. samples of a variable distributed 4 according to Bernoulli(pi), an unbiased estimator for pk i is their product, namely the estimator which is 1 if all the tosses come up heads, and otherwise is 0. Thus, if we average over all t k subsets of size k, and then average over the population, we still derive an unbiased estimator. Lemma 1. Given {p1, . . . , pn}, let Xi denote the random variable distributed according to Binomial(t, pi). For k ∈{1, . . . , t}, let αk = 1 n Pn i=1 pk i denote the kth true moment, and βk = 1 n Pn i=1 Xi k t k denote our estimate of the kth moment. Then E[βk] = αk, and Pr(|βk −αk| ≥ ϵ) ≤2e−1 3 nϵ2. Given the above lemma, we obtain the fact that, with probability at least 1−δ, the events |αk −βk| ≤ q ln( 2t δ ) 3 n simultaneously occur for all k ∈{1, . . . , t}. 2.2 Distribution recovery from moment estimates Given the estimates of the moments of the distribution P, as described above, our algorithm will recover a distribution, Q, whose moments are close to the estimated moments. We propose two algorithms, whose distribution recoveries are via the standard linear programming or quadratic programming approaches which will recover a distribution Q supported on some (sufficiently fine) ϵnet of [0, 1]: the variables of the linear (or quadratic) program correspond to the amount of probability mass that Q assigns to each element of the ϵ-net, the constraints correspond to ensuring that the amount of mass at each element is nonnegative and that the total amount of mass is 1, and the objective function will correspond to the (possibly weighted) sum of the discrepancies between the estimated moments, and the moments of the distribution represented by Q. To see why it suffices to solve this program over an ϵ-net of the unit interval, note that any distribution over [0, 1] can be rounded so as to be supported on an ϵ-net, while changing the distribution by at most ϵ 2 in Wasserstein distance. Additionally, such a rounding alters each moment by at most O(ϵ), because the rounding alters the individual contributions of point masses to the kth moment by only O(ϵk) < O(ϵ). As our goal is to recover a distribution with distance O(1/t), it suffices to choose and ϵ-net with ϵ ≪1/t so that the additional error due to this discretization is negligible. As this distribution recovery program has O(1/ϵ) variables and O(t) constraints, both of which are independent of n, this program can be solved extremely efficiently both in theory and in practice. We formally describe this algorithm below, which takes as input X1, . . . , Xn, binomial parameter t, an integer m corresponding to the size of the ϵ-net, and a weight vector w. Algorithms 1 and 2: Distribution Recovery with Linear / Quadratic Objectives Input: Integers X1, . . . , Xn, integers t and m, and weight vector w ∈Rt. Output: Vector q = (q0, . . . , qm) of length m + 1, representing a distribution with probability mass qi at value i m. • For each k ∈{1, . . . , t}, compute βk = 1 n P Xi k t k . • (Algorithm 1) Solve the linear program over variables q0, . . . , qm: minimize: t X k=1 |ˆβk −βk|wk, where ˆβk = m X i=0 qi( i m)k, subject to: X i qi = 1, and for all i, qi ≥0. • (Algorithm 2) Solve the quadratic program over variables q0, . . . , qm: minimize: t X k=1 (ˆβk −βk)2w2 k, where ˆβk = m X i=0 qi( i m)k, subject to: X i qi = 1, and for ll i, qi ≥0. 5 2.2.1 Practical considerations Our theoretical results, Theorem 1 and Corollary 1, apply to the setting where the weight vector, w in the above linear program objective function has wk = 1 for all k. It makes intuitive sense to penalize the discrepancy in the kth moment inversely proportionally to the empirically estimated standard deviation of the kth moment estimate, and our empirical results are based on such a weighted objective. Additionally, in some settings we observed an empirical improvement in the robustness and quality of the recovered distribution if one averages the results of running Algorithm 1 or 2 on several random subsamples of the data. In our empirical section, Section 3, we refer to this as a bootstrapped version of our algorithm. 2.3 Close moments imply close distributions In this section we complete the high-level proof that Algorithm 1 accurately recovers P, the distribution corresponding to the set of pi’s, establishing Theorem 1 and Corollary 1. The guarantees of Lemma 1 ensure that, with high probability, the estimated moments will be close to the true moments. Together with the observation that discretizing P to be supported on an ϵ-net of [0, 1] alters the moments by O(ϵ), it follows that there is a solution to the linear program in the second step of Algorithm 1 corresponding to a distribution whose moments are close to the true moments of P, and hence with high probability Algorithm 1 will return such a distribution. To conclude the proof, all that remains is to show that, provided the distribution Q returned by Algorithm 1 has similar first t moments to the true distribution, P, then P and Q will be close in Wasserstein (earth mover’s) distance. We begin by formally defining the Wasserstein (earth mover’s) distance between two distributions P and Q: Definition 1. The Wasserstein, or earth mover’s, distance between distributions P, Q, is ||P − Q||W := inf γ∈Γ(P,Q) R [0,1]2d d(x, y)dγ(x, y), where Γ(P, Q) is the set of all couplings on P and Q, namely a distribution whose marginals agree with the distributions. The equivalent dual definition is ||P −Q||W := sup g∈Lip(1) R g(x)d(P −Q)(x) where the supremum is taken over Lipschitz functions, g. As its name implies, this distance metric can be thought of as the cost of the optimal scheme of “moving” the probability mass from P to create Q, where the cost per unit mass of moving from probability x and y is |x −y|. Distributions over R, it is not hard to see that this distance is exactly the ℓ1 distance between the associated cumulative distribution functions. The following slightly stronger version of Proposition 1 in [7] bounds the Wasserstein distance between any pair of distributions in terms of the discrepancies in their low-order moments: Theorem 3. For two distributions P and Q supported on [0, 1] whose first t moments are α and β respectively, the Wasserstein distance ||P −Q||W is bounded by π t + 3t Pt k=1 |αk −βk|. The formal proof of this theorem is provided in the Appendix A, and we conclude this section with an intuitive sketch of this proof. For simplicity, first consider the setting where the two distributions P, Q have the exact same first t moments. This immediately implies that for any polynomial f of degree at most t, the expectation of f with respect to P is equal to the expectation of f with respect to Q. Namely, R f(x)(P(x) −Q(x))dx = 0. Leveraging the definition of Wasserstein distance ∥P −Q∥W = P g∈Lip R g(x)(P(x) −Q(x))dx, the theorem now follows from the standard fact that, for any Lipschitz function g, there exists a degree t polynomial fg that approximates it to within ℓ∞distance O(1/t) on the interval [0, 1]. If there is nonzero discrepancy between the first t moments of P and Q, the above proof continues to hold, with an additional error term of Pt k=1 ck(αk −βk), where ck is the coefficient of the degree k term in the polynomial approximation fg. Leveraging the fact that any Lipschitz function g can be approximated to ℓ∞distance O(1/t) on the unit interval using a polynomial with coefficients bounded by 3t, we obtain Theorem 3. 6 2.4 Extension: multivariate distribution estimation We also consider the natural multivariate extension of the the problem of recovering a population of Bernoulli parameters. Suppose, for example, that every member i of a population of size n has two associated binomial parameters p(i,1), p(i,2), as in Theorem 2. One could estimate the marginal distribution of the p(i,1) and p(i,2) separately using Algorithm 1, but it is natural to also want to estimate the joint distribution up to small Wasserstein distance in the 2-d sense. Similarly, one can consider the analogous d-dimensional distribution recovery question. The natural idea underlying our extension to this setting is to include estimates of the multivariate moments represented by multi-indices α with |α| ≤t. For example, in a 2-d setting, the moments for members i of the population would look like Epi∼P [pa (i,1)pb (i,2)]. Again, it remains to bound how close an interpolating polynomial can get to any d-dimensional Lipschitz function, and bound the size of the coefficients of such a polynomial. To this end, we use the following theorem from [3]: Lemma 2. Given any Lipschitz function f supported on [0, 1]d, there is a degree s polynomial p(x) such that sup x∈[0,1]d |p(x) −f(x)| ≤Cd t , where Cd is a constant that depends on d. In Appendix D, we prove the following bound on the magnitude of the coefficients of the interpolating polynomial: |cα| ≤(2t)d2t 3|α| , where cα is the coefficient of the α multinomial term. Together with the concentration bound of the αth moment of the distribution, we obtain Theorem 2, the multivariate analog of Theorem 1. 3 Empirical performance 3.1 Recovering distributions with known ground truth We begin by demonstrating the effectiveness of our algorithm on several synthetic datasets. We considered three different choices for an underlying distribution Ppop over [0, 1], then drew n independent samples p1, . . . , pn ←Ppop. For a parameter t, for each i ∈{1, . . . , n}, we then drew Xi ←Binomial(t, pi), and ran our population estimation algorithm on the set X1, . . . , Xn, and measured the extent to which we recovered the distribution Ppop. In all settings, n was sufficiently large that there was little difference between the histogram corresponding to the set {p1, . . . , pn} and the distribution Ppop. Figure 1 depicts the error of the recovered distribution as t takes on all even values from 2 to 14, for three choices of Ppop: the “3-spike” distribution with equal mass at the values 1/4, 1/2, and 3/4, a Normal distribution truncated to be supported on [0, 1], and the uniform distribution over [0, 1]. (a) 3-spike distribution (b) truncated normal (c) Uniform on [0, 1] Figure 1: Earth mover’s distance (EMD) between the true underlying distribution Ppop and the distribution recovered by Algorithm 2 for three choices of Ppop: (a) the distribution consisting of equally weighted point masses at locations 1 4, 1 2, 3 4; (b) the normal distribution with mean 0.5 and standard deviation 0.15, truncated to be supported on [0, 1]; and (c) the uniform distribution over [0, 1]. For each underlying distributions, we plot the EMD (median over 20 trials) between Ppop and the distribution recovered with Algorithm 2 as t, the number of samples from each of the n Bernoulli random variables, takes on all even values from 2 to 14. These results are given for n = 10, 000 (green) and n = 100, 000 (blue). For comparison, the distance between Ppop and the histogram of the empirical probabilities for n = 100, 000 is also shown (red). 7 Figure 2 shows representative plots of the CDFs of the recovered histograms and empirical histograms for each of the three choices of Ppop considered above. (a) 3-spike distribution (b) truncated normal (c) Uniform on [0, 1] Figure 2: CDFs of the true distribution P (green), the histogram recovered by Algorithm 2 (blue) for P, and the empirical histogram (red) corresponding to t = 10 samples and n = 100, 000. Note that the empirical distribution is only supported on multiples of 1 10. We also considered recovering the distribution of probabilities that different flights are delayed (i.e. each flight—for example Delta Airlines 123—corresponds to a parameter p ∈[0, 1] representing the probability that flight is delayed on a given day. Our algorithm was able to recover this non-parametric distribution of flight delay parameters extremely well based on few (≤10) data points per flight. In this setting, we had access to a dataset with > 50 datapoints per flight, and hence could compare the recovered distribution to a close approximation of the ground truth distribution. These results are included in the appendix. 3.2 Distribution of offspring sex ratios One of the motivating questions for this work was the following naive sounding question: do all members of a given species have the same propensity of giving birth to a male vs female child, or is there significant variation in this probability across individuals? For a population of n individuals, letting pi represent the probability that a future child of the ith individual is male, this questions is precisely the question of characterizing the histogram or set of the pi’s. This question of the uniformity of the pi’s has been debated both by the popular science community (e.g. the recent BBC article “Why Billionaires Have More Sons”), and more seriously by the biology community. Meiosis ensures that each male produces the same number of spermatozoa carrying the X chromosome as carrying the Y chromosome. Nevertheless, some studies have suggested that the difference in the amounts of genetic material in these chromosomes result in (slight) morphological differences between the corresponding spermatozoa, which in turn result in differences in their motility (speed of movement), etc. (see e.g. [4, 13]). Such studies have led to a chorus of speculation that the relative timing of ovulation and intercourse correlates with the sex of offspring. While it is problematic to tackle this problem in humans (for a number of reasons, including sexselective abortions), we instead consider this question for dogs. Letting pi denote the probability that each puppy in the ith litter is male, we could hope to recover the distribution of the pi’s. If this sex-ratio varies significantly according to the specific parents involved, or according to the relative timing of ovulation and intercourse, then such variation would be evident in the pi’s. Conveniently, a typical dog litter consists of 4-8 puppies, allowing our approach to recover this distribution based on accurate estimates of these first moments. Based on a dataset of n ≈8, 000 litters, compiled by the Norwegian Kennel Club, we produced estimates of the first 10 moments of the distribution of pi’s by considering only litters consisting of at least 10 puppies. Our algorithm suggests that the distribution of the pi’s is indistinguishable from a spike at 1 2, given the size of the dataset. Indeed, this conclusion is evident based even on the estimates of the first two moments: 1 n P i pi ≈0.497 and 1 n P i p2 i ≈0.249, since among distribution over [0, 1] with expectation 1/2, the distribution consisting of a point mass at 1/2 has minimal variance, equal to 0.25, and these two moments robustly characterize this distribution. (For example, any distribution supported on [0, 1] with mean 1/2 and for which > 10% of the mass lies outside the range (0.45, 0.55), must have second moment at least 0.2505, though reliably resolving such small variation would require a slightly large dataset.) 8 3.3 Political tendencies on a county level We performed a case study on the political leanings of counties. We assumed the following model: Each of the n = 3116 counties in the US have an intrinsic “political-leaning” parameter pi denoting their likelihood of voting Republican in a given election. We observe t = 8 independent samples of each parameter, corresponding to whether each county went Democratic or Republican during the 8 presidential elections from 1976 to 2004. (a) CDF recovered from 6 moments (blue), empirical CDF (red) (b) CDF recovered from 8 moments (blue), empirical CDF (red) Figure 3: Output of bootstrapping Algorithm 2 on political data for n =3,116 counties over t = 8 elections. 3.4 Game-to-game shooting of NBA players We performed a case study on the scoring probabilities of two NBA players. One can think of this experiment as asking whether NBA players, game-to-game, have differences in their intrinsic ability to score field goals (in the sports analytics world, this is the idea of “hot / cold” shooting nights). The model for each player is as follows: for the ith basketball game there is some parameter pi representing the player’s latent shooting percentage for that game, perhaps varying according to the opposing team’s defensive strategy. The empirical shooting percentage of a player varies significantly from game-to-game—recovering the underlying distribution or histogram of the pi’s allows one to directly estimate the consistency of a player. Additionally, such a distribution could be used as a prior for making decisions during games. For example, conditioned on the performance during the first half of a game, one could update the expected fraction of subsequent shots that are successful. The dataset used was the per-game 3 point shooting percentage of players, with sufficient statistics of “3 pointers made” and “3 pointers attempted” for each game. To generate estimates of the kth moment, we considered games where at least k 3 pointers were attempted. The players chosen were Stephen Curry of the Golden State Warriors (who is considered a very consistent shooter) and Danny Green of the San Antonio Spurs (whose nickname “Icy Hot” gives a good idea of his suspected consistency). (a) Estimated CDF of Curry’s gameto-game shooting percentage (blue), empirical CDF (red), n=457 games. (b) Estimated CDF of Green’s gameto-game shooting percentage (blue), empirical CDF (red), n=524 games. Figure 4: Estimates produced by bootstrapped version of Algorithm 2 on NBA dataset, 8 moments included 9 Acknowledgments We thank Kaja Borge and Ane Nødtvedt for sharing an anonymized dataset on sex composition of dog litters, based on data collected by the Norwegian Kennel Club. This research was supported by NSF CAREER Award CCF-1351108, ONR Award N00014-17-1-2562, NSF Graduate Fellowship DGE-1656518, and a Google Faculty Fellowship. References [1] Jayadev Acharya, Hirakendu Das, Alon Orlitsky, and Ananda Theertha Suresh. A unified maximum likelihood approach for optimal distribution property estimation. arXiv preprint arXiv:1611.02960, 2016. [2] Jayadev Acharya, Alon Orlitsky, and Shengjun Pan. Recent results on pattern maximum likelihood. In Networking and Information Theory, 2009. ITW 2009. IEEE Information Theory Workshop on, pages 251–255. IEEE, 2009. [3] Thomas Bagby, Len Bos, and Norman Levenberg. Multivariate simultaneous approximation. Constructive Approximation, 18(4), 2002. [4] P. Barlow and C.G. Vosa. The y chromosome in human spermatozoa. Nature, 226:961–962, 1970. [5] Constantinos Daskalakis, Ilias Diakonikolas, and Rocco A Servedio. Learning poisson binomial distributions. Algorithmica, 72(1):316–357, 2015. [6] Ilias Diakonikolas, Daniel M Kane, and Alistair Stewart. Properly learning poisson binomial distributions in almost polynomial time. In Conference on Learning Theory, pages 850–878, 2016. [7] Weihao Kong and Gregory Valiant. Spectrum estimation from samples. arXiv preprint arXiv:1602.00061, 2016. [8] Nicolai Korneichuk and Nikolaj Pavlovˇıc Korn˘eichuk. Exact constants in approximation theory, volume 38. Cambridge University Press, 1991. [9] Reut Levi, Dana Ron, and Ronitt Rubinfeld. Testing properties of collections of distributions. Theory of Computing, 9(8):295–347, 2013. [10] Reut Levi, Dana Ron, and Ronitt Rubinfeld. Testing similar means. Siam J. Discrete Math, 28(4):1699– 1724, 2014. [11] Alon Orlitsky, Narayana P Santhanam, Krishnamurthy Viswanathan, and Junan Zhang. On modeling profiles instead of values. In Proceedings of the 20th conference on Uncertainty in artificial intelligence, pages 426–435. AUAI Press, 2004. [12] Alon Orlitsky, Ananda Theertha Suresh, and Yihong Wu. Optimal prediction of the number of unseen species. Proceedings of the National Academy of Sciences, page 201607774, 2016. [13] L.M. Penfold, C. Holt, W.V. Holt, G.R. Welch, D.G. Cran, and L.A. Johnson. Comparative motility of x and y chromosome–bearing bovine sperm separated on the basis of dna content by flow sorting. Molecular Reproduction and Development, 50(3):323–327, 1998. [14] Charles Stein. Inadmissibility of the usual estimator for the mean of a multivariate normal distribution. In Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics, pages 197–206, Berkeley, Calif., 1956. University of California Press. [15] Gregory Valiant and Paul Valiant. Estimating the unseen: an n/log(n)-sample estimator for entropy and support size, shown optimal via new clts. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 685–694. ACM, 2011. [16] Gregory Valiant and Paul Valiant. Estimating the unseen: improved estimators for entropy and other properties. In Advances in Neural Information Processing Systems, pages 2157–2165, 2013. [17] Gregory Valiant and Paul Valiant. Instance optimal learning of discrete distributions. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, pages 142–155. ACM, 2016. [18] James Zou, Gregory Valiant, Paul Valiant, Konrad Karczewski, Siu On Chan, Kaitlin Samocha, Monkol Lek, Shamil Sunyaev, Mark Daly, and Daniel G MacArthur. Quantifying unobserved protein-coding variants in human populations provides a roadmap for large-scale sequencing projects. Nature Communications, 7, 2016. 10 | 2017 | 487 |
6,993 | Multi-Armed Bandits with Metric Movement Costs Tomer Koren Google Brain tkoren@google.com Roi Livni Princeton University rlivni@cs.princeton.edu Yishay Mansour Tel Aviv University and Google mansour@cs.tau.ac.il Abstract We consider the non-stochastic Multi-Armed Bandit problem in a setting where there is a fixed and known metric on the action space that determines a cost for switching between any pair of actions. The loss of the online learner has two components: the first is the usual loss of the selected actions, and the second is an additional loss due to switching between actions. Our main contribution gives a tight characterization of the expected minimax regret in this setting, in terms of a complexity measure C of the underlying metric which depends on its covering numbers. In finite metric spaces with k actions, we give an efficient algorithm that achieves regret of the form e O(max{C1/3T2/3, √ kT}), and show that this is the best possible. Our regret bound generalizes previous known regret bounds for some special cases: (i) the unit-switching cost regret eΘ(max{k1/3T2/3, √ kT}) where C = Θ(k), and (ii) the interval metric with regret eΘ(max{T2/3, √ kT}) where C = Θ(1). For infinite metrics spaces with Lipschitz loss functions, we derive a tight regret bound of eΘ(T d+1 d+2 ) where d ≥1 is the Minkowski dimension of the space, which is known to be tight even when there are no switching costs. 1 Introduction Multi-Armed Bandit (MAB) is perhaps one of the most well studied model for learning that allows to incorporate settings with limited feedback. In its simplest form, MAB can be thought of as a game between a learner and an adversary: At first, the adversary chooses an arbitrary sequence of losses ℓ1, . . ., ℓT (possibly adversarially). Then, at each round the learner chooses an action it from a finite set of actions K. At the end of each round, the learner gets to observe her loss ℓt(it), and only the loss of her chosen action. The objective of the learner is to minimize her (external) regret, defined as the expected difference between her loss, PT t=1 ℓt(it), and the loss of the best action in hindsight, i.e., mini∈K PT t=1 ℓt(i). One simplification of the MAB is that it assumes that the learner can switch between actions without any cost, this is in contrast to online algorithms that maintain a state and have a cost of switching between states. One simple intermediate solution is to add further costs to the learner that penalize movements between actions. (Since we compare the learner to the single best action, the adversary has no movement and hence no movement cost.) This approach has been studied in the MAB with unit switching costs [2, 12], where the learner is not only penalized for her loss but also pays a unit cost for any time she switches between actions. This simple penalty implicitly advocates the construction of algorithms that avoid frequent fluctuation in their decisions. Regulating switching has been successfully applied to many interesting instances such as buffering problems [16], limited-delay lossy coding [19] and dynamic pricing with patient buyers [15]. The unit switching cost assumes that any pair of actions have the same cost, which in many scenarios is far from true. For example, consider an ice-cream vendor on a beach, where his actions are to select a location and price. Clearly, changing location comes at a cost, while changing prices might come with no cost. In this case we can define a interval metric (the coast line) and the movement cost is the distance. A more involved case is a hot-dog vendor in Manhattan, which needs to select a location 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. and price. Again, it makes sense to charge a switching cost between locations according to their distance, and in this case the Manhattan-distance seems the most appropriate. Such settings are at the core of our model for MAB with movement cost. The authors of [24] considered a MAB problem equipped with an interval metric, i.e, the actions are [0, 1] and the movement cost is the distance between the actions. They proposed a new online algorithm, called the Slowly Moving Bandit (SMB) algorithm, that achieves optimal regret bound for this setting, and applied it to a dynamic pricing problem with patient buyers to achieve a new tight regret bound. The objective of this paper is to handle general metric spaces, both finite and infinite. We show how to generalize the SMB algorithm and its analysis to design optimal moving-cost algorithms for any metric space over finite decision space. Our main result identifies an intrinsic complexity measure of the metric space, which we call the covering/packing complexity, and give a tight characterization of the expected movement regret in terms of the complexity of the underlying metric. In particular, in finite metric spaces of complexity C with k actions, we give a regret bound of the form e O(max{C1/3T2/3, √ kT}) and present an efficient algorithm that achieves it. We also give a matching eΩ(max{C1/3T2/3, √ kT}) lower bound that applies to any metric with complexity C. We extend out results to general continuous metric spaces. For such a settings we clearly have to make some assumption about the losses, and we make the rather standard assumption that the losses are Lipchitz with respect to the underlying metric. In this setting our results depend on a quite different complexity measures: the upper and lower Minkowski dimensions of the space, thus exhibiting a phase transition between the finite case (that corresponds to Minkowski dimension zero) and the infinite case. Specifically, we give an upper bound on the regret of e O(T d+1 d+2 ) where d ≥1 is the upper Minkowski dimension. When the upper and lower Minkowski dimensions coincide—which is the case in many natural spaces, such as normed vector spaces—the latter bound matches a lower bound of [10] that holds even when there are no switching costs. Thus, a surprising implication of our result is that in infinite actions spaces (of bounded Minkowski dimension), adding movement costs do not add to the complexity of the MAB problem! Our approach extends the techniques of [24] for the SMB algorithm, which was designed to optimize over an interval metric, which is equivalent to a complete binary Hierarchally well-Separated Tree (HST) metric space. By carefully balancing and regulating its sampling distributions, the SMB algorithm avoids switching between far-apart nodes in the tree and possibly incurring large movement costs with respect to the associated metric. We show that the SMB regret guarantees are much more general than just binary balanced trees, and give an analysis of the SMB algorithm when applied to general HSTs. As a second step, we show that a rich class of trees, on which the SMB algorithm can be applied, can be used to upper-bound any general metric. Finally, we reduce the case of an infinite metric space to the finite case via simple discretization, and show that this reduction gives rise to the Minkowski dimension as a natural complexity measure. All of these contractions turn out to be optimal (up to logarithmic factors), as demonstrated by our matching lower bounds. 1.1 Related Work Perhaps the most well known classical algorithm for non-stochastic bandit is the Exp3 Algorithm [4] that guarantee a regret of e O( √ kT) without movement costs. However, for general MAB algorithms there are no guarantees for slow movement between actions. In fact, it is known that in a worst case eΩ(T) switches between actions are expected (see [12]). A simple case of MAB with movement cost is the uniform metric, i.e., when the distance between any two actions is the same. This setting has seen intensive study, both in terms of analyzing optimal regret rates [2, 12], as well as applications [16, 19, 15]. Our main technical tools for achieving lower bounds is through the lower bound of Dekel et al. [12] that achieve such bound for this special case. The general problem of bandits with movement costs has been first introduced in [24], where the authors gave an efficient algorithm for a 2-HST binary balanced tree metric, as well as for evenly spaced points on the interval. The main contribution of this paper is a generalization of these results to general metric spaces. There is a vast and vigorous study of MAB in continuous spaces [23, 11, 5, 10, 32]. These works relate the change in the payoffto the change in the action. Specifically, there has been a vast research on Lipschitz MAB with stochastic payoffs [22, 29, 30, 21, 26], where, roughly, the expected reward is Lipschitz. For applying our results in continuous spaces we too need to assume Lipschitz losses, 2 however, our metric defines also the movement cost between actions and not only relates the losses of similar actions. Our general findings is that in Euclidean spaces, one can achieve the same regret bounds when movement cost is applied. Thus, the SMB algorithm can achieve the optimal regret rate. One can model our problem as a deterministic Markov Decision Process (MDP), where the states are the MAB actions and in every state there is an action to move the MDP to a given state (which correspond to switching actions). The payoffwould be the payoffof the MAB action associated with the state plus the movement cost to the next state. The work of Ortner [28] studies deterministic MDP where the payoffs are stochastic, and also allows for a fixed uniform switching cost. The work of Even-Dar et al. [13] and it extensions [27, 33] studies a MDP where the payoffs are adversarial but there is full information of the payoffs. Latter this work was extended to the bandit model by Neu et al. [27]. This line of works imposes various assumptions regarding the MDP and the benchmark policies, specifically, that the MDP is “mixing” and that the policies considered has full support stationary distributions, assumptions that clearly fail in our very specific setting. Bayesian MAB, such as in the Gittins index (see [17]), assume that the payoffs are from some stochastic process. It is known that when there are switching costs then the existence of an optimal index policy is not guaranteed [6]. There have been some works on special cases with a fixed uniform switching cost [1, 3]. The most relevant work is that of Guha and Munagala [18] which for a general metric over the actions gives a constant approximation off-line algorithm. For a survey of switching costs in this context see [20]. The MAB problem with movement costs is related to the literature on online algorithms and the competitive analysis framework [8]. A prototypical online problem is the Metrical Task System (MTS) presented by Borodin et al. [9]. In a metrical task system there are a collection of states and a metric over the states. Similar to MAB, the online algorithm at each time step moves to a state, incurs a movement cost according to the metric, and suffers a loss that corresponds to that state. However, unlike MAB, in an MTS the online algorithm is given the loss prior to selecting the new state. Furthermore, competitive analysis has a much more stringent benchmark: the best sequence of actions in retrospect. Like most of the regret minimization literature, we use the best single action in hindsight as a benchmark, aiming for a vanishing average regret. One of our main technical tools is an approximation from above of a metric via a Metric Tree (i.e., 2-HST). k-HST metrics have been vastly studied in the online algorithms starting with [7]. The main goal is to derive a simpler metric representation (using randomized trees) that will both upper and lower bound the given metric. The main result is to show a bound of O(log n) on the expected stretch of any edge, and this is also the best possible [14]. It is noteworthy that for bandit learning, and in contrast with these works, an upper bound over the metric suffices to achieve optimal regret rate. This is since in online learning we compete against the best static action in hindsight, which does not move at all and hence has zero movement cost. In contrast, in a MTS, where one compete against the best dynamic sequence of actions, one needs both an upper a lower bound on the metric. 2 Problem Setup and Background In this section we recall the setting of Multi-armed Bandit with Movement Costs introduced in [24], and review the necessary background required to state our main results. 2.1 Multi-armed Bandits with Movement Costs In the Multi-armed Bandits (MAB) with Movement Costs problem, we consider a game between an online learner and an adversary continuing for T rounds. There is a set K, possibly infinite, of actions (or “arms”) that the learner can choose from. The set of actions is equipped with a fixed and known metric ∆that determines a cost ∆(i, j) ∈[0, 1] for moving between any pair of actions i, j ∈K. Before the game begins, an adversary fixes a sequence ℓ1, . . ., ℓT : K 7→[0, 1] of loss functions assigning loss values in [0, 1] to actions in K (in particular, we assume an oblivious adversary). Then, on each round t = 1, . . .,T, the learner picks an action it ∈K, possibly at random. At the end of each round t, the learner gets to observe her loss (namely, ℓt(it)) and nothing else. In contrast with the standard MAB setting, in addition to the loss ℓt(it) the learner suffers an additional cost due to her movement between actions, which is determined by the metric and is equal to ∆(it, it−1). Thus, the total cost at round t is given by ℓt(it) + ∆(it−1, it). 3 The goal of the learner, over the course of T rounds of the game, is to minimize her expected movement-regret, which is defined as the difference between her (expected) total costs and the total costs of the best fixed action in hindsight (that incurs no movement costs); namely, the movement regret with respect to a sequence ℓ1:T of loss vectors and a metric ∆equals RegretMC(ℓ1:T, ∆) = E " T X t=1 ℓt(it) + T X t=2 ∆(it, it−1) # −min i∈K T X t=1 ℓt(i) . Here, the expectation is taken with respect to the learner’s randomization in choosing the actions i1, . . ., iT; notice that, as we assume an oblivious adversary, the loss functions ℓt are deterministic and cannot depend on the learner’s randomization. 2.2 Basic Definitions in Metric Spaces We recall basic notions in metric space that govern the regret in the MAB with movement costs setting. Throughout we assume a bounded metric space (K, ∆), where for normalization we assume ∆(i, j) ∈[0, 1] for all i, j ∈K. Given a point i ∈K we will denote by Bϵ(i) = {j ∈K : ∆(i, j) ≤ϵ} the ball of radius ϵ around i. The following definitions are standard. Definition 1 (Packing numbers). A subset P ⊂K in a metric space (K, ∆) is an ϵ-packing if the sets {Bϵ(i)}i∈P are disjoint sets. The ϵ-packing number of ∆, denoted Np ϵ (∆), is the maximum cardinality of any ϵ-packing of K. Definition 2 (Covering numbers). A subset C ⊂K in a metric space (K, ∆) is an ϵ-covering if K ⊆∪i∈CBϵ(i). The ϵ-covering number of K, denoted Nc ϵ (∆), is the minimum cardinality of any ϵ-covering of K. Tree metrics and HSTs. We recall the notion of a tree metric, and in particular, a metric induced by an Hierarchically well-Separated (HST) Tree; see [7] for more details. Any weighted tree defines a metric over the vertices, by considering the shortest path between each two nodes. An HST tree (2-HST tree, to be precise) is a rooted weighted tree such that: 1) the edge weight from any node to each of its children is the same and 2) the edge weight along any path from the root to a leaf are decreasing by a factor 2 per edge. We will also assume that all leaves are of the same depth in the tree (this does not imply that the tree is complete). Given a tree T we let depth(T) denote its height, which is the maximal length of a path from any leaf to the root. Let level(v) be the level of a node v ∈T, where the level of the leaves is 0 and the level of the root is depth(T). Given nodes u, v ∈T, let LCA(u, v) be their least common ancestor node in T. The metric which we next define is equivalent (up to a constant factor) to standard tree–metric induced over the leaves by an HST. By a slight abuse of terminology, we will call it HST metric: Definition 3 (HST metric). Let K be a finite set and let T be a tree whose leaves are at the same depth and are indexed by elements of K. Then the HST metric ∆T over K induced by the tree T is defined as follows: ∆T(i, j) = 2level(LCA(i, j)) 2depth(T) ∀i, j ∈K. For a HST metric ∆T, observe that the packing number and covering number are simple to characterize: for all 0 ≤h < depth(T) we have that for ϵ = 2h−H, Nc ϵ (∆T) = Np ϵ (∆T) = {v ∈T : level(v) = h} . Complexity measures for finite metric spaces. We next define the two notions of complexity that, as we will later see, governs the complexity of MAB with metric movement costs. Definition 4 (covering complexity). The covering complexity of a metric space (K, ∆) denoted Cc(∆) is given by Cc(∆) = sup 0<ϵ<1 ϵ ·Nc ϵ (∆). 4 Definition 5 (packing complexity). The packing complexity of a metric space (K, ∆) denoted Cp(∆) is given by Cp(∆) = sup 0<ϵ<1 ϵ ·Np ϵ (∆). For a HST metric, the two complexity measures coincide as its packing and covering numbers are the same. Therefore, for a HST metric ∆T we will simply denote the complexity of (K, ∆T) as C(T). In fact, it is known that in any metric space Np ϵ (∆) ≤Nc ϵ (∆) ≤Np ϵ/2(∆) for all ϵ > 0. Thus, for a general metric space we obtain that Cp(∆) ≤Cc(∆) ≤2Cp(∆). (1) Complexity measures for infinite metric spaces. For infinite metric spaces, we require the following definition. Definition 6 (Minkowski dimensions). Let (K, ∆) be a bounded metric space. The upper Minkowski dimension of (K, ∆), denoted D(∆), is defined as D(∆) = lim sup ϵ→0 log Np ϵ (∆) log(1/ϵ) = lim sup ϵ→0 log Nc ϵ (∆) log(1/ϵ) . Similarly, the lower Minkowski dimension is denoted by D(∆) and is defined as D(∆) = lim inf ϵ→0 log Np ϵ (∆) log(1/ϵ) = lim inf ϵ→0 log Nc ϵ (∆) log(1/ϵ) . We refer to [31] for more background on the Minkowski dimensions and related notions in metric spaces theory. 3 Main Results We now state the main results of the paper, which give a complete characterization of the expected regret in the MAB with movement costs problem. 3.1 Finite Metric Spaces The following are the main results of the paper. Theorem 7 (Upper Bound). Let (K, ∆) be a finite metric space over |K| = k elements with diameter ≤1 and covering complexity Cc = Cc(∆). There exists an algorithm such that for any sequence of loss functions ℓ1, . . ., ℓT guarantees that RegretMC(ℓ1:T, ∆) = e O max C1/3 c T2/3, √ kT . Theorem 8 (Lower Bound). Let (K, ∆) be a finite metric space over |K| = k elements with diameter ≥1 and packing complexity Cp = Cp(∆). For any algorithm there exists a sequence ℓ1, . . ., ℓT of loss functions such that RegretMC(ℓ1:T, ∆) = eΩ max C1/3 p T2/3, √ kT . For the detailed proofs, see the full version of the paper [25]. Recalling Eq. (1), we see that the regret bounds obtained in Theorems 7 and 8 are matching up to logarithmic factors. Notice that the tightness is achieved per instance; namely, for any given metric we are able to fully characterize the regret’s rate of growth as a function of the intrinsic properties of the metric. (In particular, this is substantially stronger than demonstrating a specific metric for which the upper bound cannot be improved.) Note that for the lower bound statement in Theorem 8 we require that the diameter of K is bounded away from zero, where for simplicity we assume a constant bound of 1. Such an assumption is necessary to avoid degenerate metrics. Indeed, when the diameter is very small, the problem reduces to the standard MAB setting without any additional costs and we obtain a regret rate of Ω( √ kT). Notice how the above results extend known instances of the problem from previous work: for uniform movement costs (i.e., unit switching costs) over K = {1, . . ., k} we have Cc = Θ(k), so that the 5 obtain bound is eΘ(max{k1/3T2/3, √ kT}), which recovers the results in [2, 12]; and for a 2-HST binary balanced tree with k leaves, we have Cc = Θ(1) and the resulting bound is eΘ(max{T2/3, √ kT}), which is identical to the bound proved in [24]. The 2-HST regret bound in [24] was primarily used to obtain regret bounds for the action space K = [0, 1]. In the next section we show how this technique is extended for infinite metric space to obtain regret bounds that depend on the dimensionality of the action space. 3.2 Infinite Metric Spaces When (K, ∆) is an infinite metric space, without additional constraints on the loss functions, the problem becomes ill-posed with a linear regret rate, even without movement costs. Therefore, one has to make additional assumptions on the loss functions in order to achieve sublinear regret. One natural assumption, which is common in previous work, is to assume that the loss functions ℓ1, . . ., ℓT are all 1-Lipschitz with respect to the metric ∆. Under this assumption, we have the following result. Theorem 9. Let (K, ∆) be a metric space with diameter ≤1 and upper Minkowski dimension d = D(∆), such that d ≥1. There exists a strategy such that for any sequence of loss functions ℓ1, . . ., ℓT, which are all 1-Lipschitz with respect to ∆, guarantees that RegretMC(ℓ1:T, ∆) = e O T d+1 d+2 . We refer the full version of the paper [25] for a proof of the theorem. Again, we observe that the above result extend the case of K = [0, 1] where d = 1. Indeed, for Lipschitz functions over the interval a tight regret bound of eΘ(T2/3) was achieved in [24], which is exactly the bound we obtain above. We mention that a lower bound of eΩ(T d+1 d+2 ) is known for MAB in metric spaces with Lipschitz cost functions—even without movement costs—where d = D(∆) is the lower Minkowski dimension. Theorem 10 (Bubeck et al. [10]). Let (K, ∆) be a metric space with diameter ≤1 and lower Minkowski dimension d = D(∆), such that d ≥1. Then for any learning algorithm, there exists a sequence of loss function ℓ1, . . ., ℓT, which are all 1-Lipschitz with respect to ∆, such that the regret (without movement costs) is eΩ T d+1 d+2 . In many natural metric spaces in which the upper and lower Minkowski dimensions coincide (e.g., normed spaces), the bound of Theorem 9 is tight up to logarithmic factors in T. In particular, and quite surprisingly, we see that the movement costs do not add to the regret of the problem! It is important to note that Theorem 9 holds only for metric spaces whose (upper) Minkowski dimension is at least 1. Indeed, finite metric spaces are of Minkowski dimension zero, and as we demonstrated in Section 3.1 above, a O( √ T) regret bound is not achievable. Finite matric spaces are associated with a complexity measure which is very different from the Minkowski dimension (i.e., the covering/packing complexity). In other words, we exhibit a phase transition between dimension d = 0 and d ≥1 in the rate of growth of the regret induced by the metric. 4 Algorithms In this section we turn to prove Theorem 7. Our strategy is much inspired by the approach in [24], and we employ a two-step approach: First, we consider the case that the metric is a HST metric; we then turn to deal with general metrics, and show how to upper-bound any metric with a HST metric. 4.1 Tree Metrics: The Slowly-Moving Bandit Algorithm In this section we analyze the simplest case of the problem, in which the metric ∆= ∆T is induced by a HST tree T (whose leaves are associated with actions in K). In this case, our main tool is the Slowly-Moving Bandit (SMB) algorithm [24]: we demonstrate how it can be applied to general tree metrics, and analyze its performance in terms of intrinsic properties of the metric. We begin by reviewing the SMB algorithm. In order to present the algorithm we require few additional notations. The algorithm receives as input a tree structure over the set of actions K, and its operation depends on the tree structure. We fix a HST tree T and let H = depth(T). For any level 0 ≤h ≤H and action i ∈K, let Ah(i) be the set of leaves of T that share a common ancestor with i at level h 6 (recall that level h = 0 is the bottom–most level corresponding to the singletons). In terms of the tree metric we have that Ah(i) = {j : ∆T(i, j) ≤2−H+h}. The SMB algorithm is presented in Algorithm 1. The algorithm is based on the multiplicative update method, in the spirit of Exp3 algorithms [4]. Similarly to Exp3, the algorithm computes at each round t an estimator eℓt to the loss vector ℓt using the single loss value ℓt(it) observed. In addition to being an (almost) unbiased estimate for the true loss vector, the estimator eℓt used by SMB has the additional property of inducing slowly-changing sampling distributions pt: This is done by choosing at random a level ht of the tree to be rebalanced (in terms of the weights maintained by the algorithm): As a result, the marginal probabilities pt+1(Aht (i)) are not changed at round t. In turn, and in contrast with Exp3, the algorithm choice of action at round t + 1 is not purely sampled from pt, but rather conditioned on our last choice of level ht. This is informally justified by the fact that pt and pt+1 agree on the marginal distribution of Aht (it), hence we can think of the level drawn at round t as if it were drawn subject to pt+1(Aht ) = pt(Aht ). Input: A tree T with a set of finite leaves K, η > 0. Initialize: H = depth(T), Ah(i) = B2−H+h(i), ∀i ∈K, 0 ≤h ≤H Initialize p1 = unif(K), h0 = H and i0 ∼p1 For t = 1, . . .,T: (1) Choose action it ∼pt( · | Aht−1(it−1)), observe loss ℓt(it) (2) Choose σt,0, . . ., σt,H−1 ∈{±1} uniformly at random; let ht = min{0 ≤h ≤H : σt,h < 0} where σt,H = −1 (3) Compute vectors ¯ℓt,0, . . ., ¯ℓt,H−1 recursively via ¯ℓt,0(i) = 1{it = i} pt(i) ℓt(it), and for all h ≥1: ¯ℓt,h(i) = −1 η ln X j∈Ah(i) pt(j) pt(Ah(i))e−η(1+σt,h−1) ¯ℓt,h−1(j) ! (4) Define Et = {i : pt(Ah(i)) < 2hη for some 0 ≤h < H} and set: eℓt = ( 0 if it ∈Et; ¯ℓt,0 + PH−1 h=0 σt,h ¯ℓt,h otherwise (5) Update: pt+1(i) = pt(i) e−ηeℓt(i) Pk j=1 pt(j) e−ηeℓt(j) ∀i ∈K Algorithm 1: The SMB algorithm. A key observation is that by directly applying SMB to the metric ∆T, we can achieve the following regret bound: Theorem 11. Let (K, ∆T) be a metric space defined by a 2-HST T with depth(T) = H and complexity C(T) = C. Using SMB algorithm we can achieve the following regret bound: RegretMC(ℓ1:T, ∆T) = O H p 2HTClog C + H2−HT . (2) To show Theorem 11, we adapt the analysis of [24] (that applies only to complete binary HSTs) to handle more general HSTs. We defer this part of our analysis to the full version of the paper [25], since it follows from a technical modification of the original proof. For a tree that is either too deep or too shallow, Eq. (2) may not necessarily lead to a sublinear regret bound, let alone optimal. The main idea behind achieving optimal regret bound for a general tree, is to modify it until one of two things happen: Either we have optimized the depth so that the two terms in the left-hand side of Eq. (2) are of same order: In that case, we will show that one can achieve 7 regret rate of order O(C(T)1/3T2/3). If we fail to do that, we show that the first term in the left-hand side is the dominant one, and it will be of order O( √ kT). For trees that are in some sense “well behaved" we have the following Corollary of Theorem 11. Corollary 12. Let (K, ∆T) be a metric space defined by a tree T over |K| = k leaves with depth(T) = H and complexity C(T) = C. Assume that T satisfies the following: (1) 2−HHT ≤ √ 2HHCT; (2) One of the following is true: (a) 2HC ≤k; (b) 2−(H−1)(H −1)T ≥ p 2H−1(H −1)CT. Then, the SMB algorithm can be used to attain RegretMC(ℓ1:T, ∆T) = e O max C1/3T2/3, √ kT . The following establishes Theorem 7 for the special case of tree metrics. Lemma 13. For any tree T and time horizon T, there exists a tree T ′ (over the same set K of k leaves) that satisfies the conditions of Corollary 12, such that ∆T′ ≥∆T and C(T ′) = C(T). Furthermore, T ′ can be constructed efficiently from T (i.e., in time polynomial in |K| and T). Hence, applying SMB to the metric space (K, ∆T′) leads to RegretMC(ℓ1:T, ∆T) = e O max C(T)1/3T2/3, √ kT . We refer to [25] for the proofs of both results. 4.2 General Finite Metrics Finally, we obtain the general finite case as a corollary of the following. Lemma 14. Let (K, ∆) be a finite metric space. There exists a tree metric ∆T over K (with |K| = k) such that 4∆T, dominates ∆(i.e., such that 4∆T(i, j) ≥∆(i, j) for all i, j ∈K) for which C(T) = O(Cc(∆) log k). Furthermore, T can be constructed efficiently. Proof. Let H be such that the minimal distance in ∆is larger than 2−H. For each r = 2−1, 2−2, . . ., 2−H we let {Br(i{1,r }), . . ., Br(i{mr,r })} = Br be a covering of K of size Nc r (T) log k using balls of radius r. Note that finding a minimal set of balls of radius r that covers K is exactly the set cover problem. Hence, we can efficiently approximate it (to within a O(log k) factor) and construct the sets Br. We now construct a tree graph, whose nodes are associated with the cover balls: The leaves correspond to singleton balls, hence correspond to the action space. For each leaf i we find an action a1(i) ∈K such that: i ∈B2−H+1(a1(i)) ∈B2−H+1. If there is more than one, we arbitrarily choose one, and we connect an edge between i and B2−H+1(a1(i)). We continue in this manner inductively to define ar(i) for every a and r < 1: given ar−1(i) we find an action ar(i) such that ar−1(i) ∈B2−H+r (ar(i)) ∈B2−H+r, and we connect an edge from B2−H+r−1(ar−1(i)) and B2−H+r (ar(i)). We now claim that the metric induced by the tree graph dominates up to factor 4 the original metric. Let i, j ∈K such that ∆T(i, j) < 2−H+r then by construction there are i, a1(i), a2(i), . . . ar(i) and j, a1(j), a2(j), . . . ar(j), such that ar(i) = ar(j) and for which it holds that ∆(as(i), as−1(i)) ≤2−H+s and similarly ∆(as(j), as−1(j)) ≤2−H+s for every s ≤r. Denoting a0(i) = i and a0(j) = j, we have that ∆(i, j) ≤ rX s=1 ∆(as−1(i), as(i)) + rX s=1 ∆(as−1(j), as(j)) ≤2 rX s=1 2−H+s ≤2·2−H ·2r+1 ≤4∆T(i, j). □ 4.3 Infinite Metric Spaces Finally, we address infinite spaces by discretizing the space K and reducing to the finite case. Recall that in this case we also assume that the loss functions are Lipschitz. Proof of Theorem 9. Given the definition of the covering dimension d = D(∆) ≥1, it is straightforward that for some constant C > 0 (that might depend on the metric ∆) it holds that Nc r (∆) ≤Cr−d for 8 all r > 0. Fix some ϵ > 0, and take a minimal 2ϵ-covering K′ of K of size |K′| ≤C(2ϵ)−d ≤Cϵ−d. Observe that by restricting the algorithm to pick actions from K′, we might lose at most O(ϵT) in the regret. Also, since K′ is minimal, the distance between any two elements in K′ is at least ϵ, thus the covering complexity of the space has Cc(∆) = sup r ≥ϵ r·Nc r (∆) ≤C sup r ≥ϵ r−d+1 ≤Cϵ−d+1, as we assume that d ≥1. Hence, by Theorem 7 and the Lipschitz assumption, there exists an algorithm for which RegretMC(ℓ1:T, ∆) = e O max ϵ−d−1 3 T 2 3, ϵ−d 2 T 1 2, ϵT . A simple computation reveals that ϵ = Θ(T− 1 d+2 ) optimizes the above bound, and leads to e O(T d+1 d+2 ) movement regret. □ Acknowledgements RL is supported in funds by the Eric and Wendy Schmidt Foundation for strategic innovations. YM is supported in part by a grant from the Israel Science Foundation, a grant from the United States-Israel Binational Science Foundation (BSF), and the Israeli Centers of Research Excellence (I-CORE) program (Center No. 4/11). References [1] R. Agrawal, M. V. Hegde, and D. Teneketzis. Asymptotically efficient adaptive allocation rules for the multiarmed bandit problem with switching costs. IEEE Transactions on Optimal Control, 33(10):899–906, 1988. [2] R. Arora, O. Dekel, and A. Tewari. Online bandit learning against an adaptive adversary: from regret to policy regret. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 1503–1510, 2012. [3] M. Asawa and D. Teneketzis. Multi-armed bandits with switching penalties. IEEE Transactions on Automatic Control, 41(3):328–348, 1996. [4] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [5] P. Auer, R. Ortner, and C. Szepesvári. Improved rates for the stochastic continuum-armed bandit problem. Proceedings of the 20th Annual Conference on Learning Theory, pages 454–468, 2007. [6] J. S. Banks and R. K. Sundaram. Switching costs and the gittins index. Econometrica, 62: 687–694, 1994. [7] Y. Bartal. Probabilistic approximations of metric spaces and its algorithmic applications. In 37th Annual Symposium on Foundations of Computer Science, FOCS ’96, Burlington, Vermont, USA, 14-16 October, 1996, pages 184–193, 1996. [8] A. Borodin and R. El-Yaniv. Online Computation and Competitive Analysis. Cambridge University Press, 1998. [9] A. Borodin, N. Linial, and M. E. Saks. An optimal on-line algorithm for metrical task system. Journal of the ACM (JACM), 39(4):745–763, 1992. [10] S. Bubeck, R. Munos, G. Stoltz, and C. Szepesvári. X-armed bandits. Journal of Machine Learning Research, 12:1587–1627, 2011. [11] E. Cope. Regret and convergence bounds for a class of continuum-armed bandit problems. IEEE Transactions on Automatic Control, 54(6):1243–1253, 2009. 9 [12] O. Dekel, J. Ding, T. Koren, and Y. Peres. Bandits with switching costs: T2/3 regret. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 459–467. ACM, 2014. [13] E. Even-Dar, S. M. Kakade, and Y. Mansour. Online markov decision processes. Math. Oper. Res., 34(3):726–736, 2009. [14] J. Fakcharoenphol, S. Rao, and K. Talwar. A tight bound on approximating arbitrary metrics by tree metrics. J. Comput. Syst. Sci., 69(3):485–497, 2004. [15] M. Feldman, T. Koren, R. Livni, Y. Mansour, and A. Zohar. Online pricing with strategic and patient buyers. In Annual Conference on Neural Information Processing Systems, 2016. [16] S. Geulen, B. Vöcking, and M. Winkler. Regret minimization for online buffering problems using the weighted majority algorithm. In COLT, pages 132–143, 2010. [17] J. Gittins, K. Glazebrook, and R. Weber. Multi-Armed Bandit Allocation Indices, 2nd Edition. John Wiley, 2011. [18] S. Guha and K. Munagala. Multi-armed bandits with metric switching costs. In International Colloquium on Automata, Languages, and Programming, pages 496–507. Springer, 2009. [19] A. Gyorgy and G. Neu. Near-optimal rates for limited-delay universal lossy source coding. IEEE Transactions on Information Theory, 60(5):2823–2834, 2014. [20] T. Jun. A survey on the bandit problem with switching costs. De Economist, 152(4):513–541, 2004. [21] R. Kleinberg and A. Slivkins. Sharp dichotomies for regret minimization in metric spaces. In Proceedings of the twenty-first annual ACM-SIAM symposium on Discrete Algorithms, pages 827–846. Society for Industrial and Applied Mathematics, 2010. [22] R. Kleinberg, A. Slivkins, and E. Upfal. Multi-armed bandits in metric spaces. In Proceedings of the fortieth annual ACM symposium on Theory of computing, pages 681–690. ACM, 2008. [23] R. D. Kleinberg. Nearly tight bounds for the continuum-armed bandit problem. In Advances in Neural Information Processing Systems, pages 697–704, 2004. [24] T. Koren, R. Livni, and Y. Mansour. Bandits with movement costs and adaptive pricing. In COLT, 2017. [25] T. Koren, R. Livni, and Y. Mansour. Multi-armed bandits with metric movement costs. arXiv preprint arXiv:1710.08997, 2017. [26] S. Magureanu, R. Combes, and A. Proutiere. Lipschitz bandits: Regret lower bound and optimal algorithms. In COLT, pages 975–999, 2014. [27] G. Neu, A. György, C. Szepesvári, and A. Antos. Online markov decision processes under bandit feedback. IEEE Trans. Automat. Contr., 59(3):676–691, 2014. [28] R. Ortner. Online regret bounds for markov decision processes with deterministic transitions. Theor. Comput. Sci., 411(29-30):2684–2695, 2010. [29] A. Slivkins. Multi-armed bandits on implicit metric spaces. In Advances in Neural Information Processing Systems, pages 1602–1610, 2011. [30] A. Slivkins, F. Radlinski, and S. Gollapudi. Ranked bandits in metric spaces: learning diverse rankings over large document collections. Journal of Machine Learning Research, 14(Feb): 399–436, 2013. [31] T. Tao. 245c, notes 5: Hausdorffdimension. http://terrytao.wordpress.com/2009/05/ 19/245c-notes-5-hausdorff-dimension-optional/, 2009. [32] J. Yu and S. Mannor. Unimodal bandits. In Proceedings of the 28th International Conference on Machine Learning, 2011. [33] J. Y. Yu, S. Mannor, and N. Shimkin. Markov decision processes with arbitrary reward processes. Math. Oper. Res., 34(3):737–757, Aug. 2009. ISSN 0364-765X. 10 | 2017 | 488 |
6,994 | Structured Embedding Models for Grouped Data Maja Rudolph Columbia Univ. maja@cs.columbia.edu Francisco Ruiz Univ. of Cambridge Columbia Univ. Susan Athey Stanford Univ. David Blei Columbia Univ. Abstract Word embeddings are a powerful approach for analyzing language, and exponential family embeddings (EFE) extend them to other types of data. Here we develop structured exponential family embeddings (S-EFE), a method for discovering embeddings that vary across related groups of data. We study how the word usage of U.S. Congressional speeches varies across states and party affiliation, how words are used differently across sections of the ArXiv, and how the copurchase patterns of groceries can vary across seasons. Key to the success of our method is that the groups share statistical information. We develop two sharing strategies: hierarchical modeling and amortization. We demonstrate the benefits of this approach in empirical studies of speeches, abstracts, and shopping baskets. We show how S-EFE enables group-specific interpretation of word usage, and outperforms EFE in predicting held-out data. 1 Introduction Word embeddings (Bengio et al., 2003; Mikolov et al., 2013d,c,a; Pennington et al., 2014; Levy and Goldberg, 2014; Arora et al., 2015) are unsupervised learning methods for capturing latent semantic structure in language. Word embedding methods analyze text data to learn distributed representations of the vocabulary that capture its co-occurrence statistics. These representations are useful for reasoning about word usage and meaning (Harris, 1954; Rumelhart et al., 1986). Word embeddings have also been extended to data beyond text (Barkan and Koenigstein, 2016; Rudolph et al., 2016), such as items in a grocery store or neurons in the brain. Exponential family embeddings (EFE) is a probabilistic perspective on embeddings that encompasses many existing methods and opens the door to bringing expressive probabilistic modeling (Bishop, 2006; Murphy, 2012) to the problem of learning distributed representations. We develop structured exponential family embeddings (S-EFE), an extension of EFE for studying how embeddings can vary across groups of related data. We will study several examples: in U.S. Congressional speeches, word usage can vary across states or party affiliations; in scientific literature, the usage patterns of technical terms can vary across fields; in supermarket shopping data, co-purchase patterns of items can vary across seasons of the year. We will see that S-EFE discovers a per-group embedding representation of objects. While the naïve approach of fitting an individual embedding model for each group would typically suffer from lack of data—especially in groups for which fewer observations are available—we develop two methods that can share information across groups. Figure 1a illustrates the kind of variation that we can capture. We fit an S-EFE to ArXiv abstracts grouped into different sections, such as computer science (cs), quantitative finance (q-fin), and nonlinear sciences (nlin). S-EFE results in a per-section embedding of each term in the vocabulary. Using the fitted embeddings, we illustrate similar words to the word INTELLIGENCE. We can see that how INTELLIGENCE is used varies by field: in computer science the most similar words include ARTIFICIAL and AI; in finance, similar words include ABILITIES and CONSCIOUSNESS. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) S-EFE uncover variations in the usage of the word INTELLIGENCE. ρ(s) v αv X(s) hierarchical: ρ(s) v ∼N(ρ(0) v , σ2 ρI) amortized: ρ(s) v = fs(ρ(0) v ) V S (b) Graphical repres. of S-EFE. Figure 1: (a) INTELLIGENCE is used differently across the ArXiv sections. Words with the closest embedding to the query are listed for 5 sections. (The embeddings were obtained by fitting an amortized S-EFE.) The method automatically orders the sections along the horizontal axis by their similarity in the usage of INTELLIGENCE. See Section 3 additional for details. (b) Graphical representation of S-EFE for data in S categories. The embedding vectors ρ(s) v are specific to each group, and the context vectors αv are shared across all categories. In more detail, embedding methods posit two representation vectors for each term in the vocabulary; an embedding vector and a context vector. (We use the language of text for concreteness; as we mentioned, EFE extend to other types of data.) The idea is that the conditional probability of each observed word depends on the interaction between the embedding vector and the context vectors of the surrounding words. In S-EFE, we posit a separate set of embedding vectors for each group but a shared set of context vectors; this ensures that the embedding vectors are in the same space. We propose two methods to share statistical strength among the embedding vectors. The first approach is based on hierarchical modeling (Gelman et al., 2003), which assumes that the groupspecific embedding representations are tied through a global embedding. The second approach is based on amortization (Dayan et al., 1995; Gershman and Goodman, 2014), which considers that the individual embeddings are the output of a deterministic function of a global embedding representation. We use stochastic optimization to fit large data sets. Our work relates closely to two threads of research in the embedding literature. One is embedding methods that study how language evolves over time (Kim et al., 2014; Kulkarni et al., 2015; Hamilton et al., 2016; Rudolph and Blei, 2017; Bamler and Mandt, 2017; Yao et al., 2017). Time can be thought of as a type of “group”, though with evolutionary structure that we do not consider. The second thread is multilingual embeddings (Klementiev et al., 2012; Mikolov et al., 2013b; Ammar et al., 2016; Zou et al., 2013); our approach is different in that most words appear in all groups and we are interested in the variations of the embeddings across those groups. Our contributions are thus as follows. We introduce the S-EFE model, extending EFE to grouped data. We present two techniques to share statistical strength among the embedding vectors, one based on hierarchical modeling and one based on amortization. We carry out a thorough experimental study on two text databases, ArXiv papers by section and U.S. Congressional speeches by home state and political party. Using Poisson embeddings, we study market basket data from a large grocery store, grouped by season. On all three data sets, S-EFE outperforms EFE in terms of held-out log-likelihood. Qualitatively, we demonstrate how S-EFE discovers which words are used most differently across U.S. states and political parties, and show how word usage changes in different ArXiv disciplines. 2 Model Description In this section, we develop structured exponential family embeddings (S-EFE), a model that builds on exponential family embeddings (EFE) (Rudolph et al., 2016) to capture semantic variations across groups of data. In embedding models, we represent each object (e.g., a word in text, or an item in shopping data) using two sets of vectors, an embedding vector and a context vector. In this paper, we 2 are interested in how the embeddings vary across groups of data, and for each object we want to learn a separate embedding vector for each group. Having a separate embedding for each group allows us to study how the usage of a word like INTELLIGENCE varies across categories of the ArXiv, or which words are used most differently by U.S. Senators depending on which state they are from and whether they are Democrats or Republicans. The S-EFE model extends EFE to grouped data, by having the embedding vectors be specific for each group, while sharing the context vectors across all groups. We review the EFE model in Section 2.1. We then formalize the idea of sharing the context vectors in Section 2.2, where we present two approaches to build a hierarchical structure over the group-specific embeddings. 2.1 Background: Exponential Family Embeddings In exponential family embeddings, we have a collection of objects, and our goal is to learn a vector representation of these objects based on their co-occurrence patterns. Let us consider a dataset represented as a (typically sparse) matrix X, where columns are datapoints and rows are objects. For example, in text, each column corresponds to a location in the text, and each entry xvi is a binary variable that indicates whether word v appears at location i. In EFE, we represent each object v with two sets of vectors, embeddings vectors ρv[i] and context vectors αv[i], and we posit a probability distribution of data entries xvi in which these vectors interact. The definition of the EFE model requires three ingredients: a context, a conditional exponential family, and a parameter sharing structure. We next describe these three components. Exponential family embeddings learn the vector representation of objects based on the conditional probability of each observation, conditioned on the observations in its context. The context cvi gives the indices of the observations that appear in the conditional probability distribution of xvi. The definition of the context varies across applications. In text, it corresponds to the set of words in a fixed-size window centered at location i. Given the context cvi and the corresponding observations xcvi indexed by cvi, the distribution for xvi is in the exponential family, xvi | xcvi ∼ExpFam (t(xvi), ηv(xcvi)) , (1) with sufficient statistics t(xvi) and natural parameter ηv(xcvi). The parameter vectors interact in the conditional probability distributions of each observation xvi as follows. The embedding vectors ρv[i] and the context vectors αv[i] are combined to form the natural parameter, ηv(xcvi) = g ρv[i]⊤ X (v′,i′)∈cvi αv′[i′]xv′i′ , (2) where g(·) is the link function. Exponential family embeddings can be understood as a bank of generalized linear models (GLMs). The context vectors are combined to give the covariates, and the “regression coefficients” are the embedding vectors. In Eq. 2, the link function g(·) plays the same role as in GLMs and is a modeling choice. We use the identity link function. The third ingredient of the EFE model is the parameter sharing structure, which indicates how the embedding vectors are shared across observations. In the standard EFE model, we use ρv[i] ≡ρv and αv[i] ≡αv for all columns of X. That is, each unique object v has a shared representation across all instances. The objective function. In EFE, we maximize the objective function, which is given by the sum of the log-conditional likelihoods in Eq. 1. In addition, we add an ℓ2-regularization term (we use the notation of the log Gaussian pdf) over the embedding and context vectors, yielding L = log p(α) + log p(ρ) + X v,i log p xvi xcvi; α, ρ , (3) Note that maximizing the regularized conditional likelihood is not equivalent to maximum a posteriori. Rather, it is similar to maximization of the pseudo-likelihood in conditionally specified models (Arnold et al., 2001; Rudolph et al., 2016). 3 2.2 Structured Exponential Family Embeddings Here, we describe the S-EFE model for grouped data. In text, some examples of grouped data are Congressional speeches grouped into political parties or scientific documents grouped by discipline. Our goal is to learn group-specific embeddings from data partitioned into S groups, i.e., each instance i is associated with a group si ∈{1, . . . , S}. The S-EFE model extends EFE to learn a separate set of embedding vectors for each group. To build the S-EFE model, we impose a particular parameter sharing structure over the set of embedding and context vectors. We posit a structured model in which the context vectors are shared across groups, i.e., αv[i] ≡αv (as in the standard EFE model), but the embedding vectors are only shared at the group level, i.e., for an observation i belonging to group si, ρv[i] ≡ρ(si) v . Here, ρ(s) v denotes the embedding vector corresponding to group s. We show a graphical representation of the S-EFE in Figure 1b. Sharing the context vectors αv has two advantages. First, the shared structure reduces the number of parameters, while the resulting S-EFE model is still flexible to capture how differently words are used across different groups, as ρ(s) v is allowed to vary.1 Second, it has the important effect of uniting all embedding parameters in the same space, as the group-specific vectors ρ(s) v need to agree with the components of αv. While one could learn a separate embedding model for each group, as has been done for text grouped into time slices (Kim et al., 2014; Kulkarni et al., 2015; Hamilton et al., 2016), this approach would require ad-hoc postprocessing steps to align the embeddings.2 When there are S groups, the S-EFE model has S times as many embedding vectors than the standard embedding model. This may complicate inferences about the group-specific vectors, especially for groups with less data. Additionally, an object v may appear with very low frequency in a particular group. Thus, the naïve approach for building the S-EFE model without additional structure may be detrimental for the quality of the embeddings, especially for small-sized groups. To address this problem, we propose two different methods to tie the individual ρ(s) v together, sharing statistical strength among them. The first approach consists in a hierarchical embedding structure. The second approach is based on amortization. In both methods, we introduce a set of global embedding vectors ρ(0) v , and impose a particular structure to generate ρ(s) v from ρ(0) v . Hierarchical embedding structure. Here, we impose a hierarchical structure that allows sharing statistical strength among the per-group variables. For that, we assume that each ρ(s) v ∼N(ρ(0) v , σ2 ρI), where σ2 ρ is a fixed hyperparameter. Thus, we replace the EFE objective function in Eq. 3 with Lhier = log p(α) + log p(ρ(0)) + X s log p(ρ(s) | ρ(0)) + X v,i log p xvi xcvi; α, ρ . (4) where the ℓ2-regularization term now applies only on αv and the global vectors ρ(0) v . Fitting the hierarchical model involves maximizing Eq. 4 with respect to αv, ρ(0) v , and ρ(s) v . We note that we have not reduced the number of parameters to be inferred; rather, we tie them together through a common prior distribution. We use stochastic gradient ascent to maximize Eq. 4. Amortization. The idea of amortization has been applied in the literature to develop amortized inference algorithms (Dayan et al., 1995; Gershman and Goodman, 2014). The main insight behind amortization is to reuse inferences about past experiences when presented with a new task, leveraging the accumulated knowledge to quickly solve the new problem. Here, we use amortization to control the number of parameters of the S-EFE model. In particular, we set the per-group embeddings ρ(s) v to be the output of a deterministic function of the global embedding vectors, ρ(s) v = fs(ρ(0) v ). We use a different function fs(·) for each group s, and we parameterize them using neural networks, similarly to other works on amortized inference (Korattikara et al., 2015; Kingma and Welling, 2014; Rezende et al., 2014; Mnih and Gregor, 2014). Unlike standard uses of amortized inference, in S-EFE the 1Alternatively, we could share the embedding vectors ρv and have group-specific context vectors α(s) v . We did not explore that avenue and leave it for future work. 2Another potential advantage of the proposed parameter sharing structure is that, when the context vectors are held fixed, the resulting objective function is convex, by the convexity properties of exponential families (Wainwright and Jordan, 2008). 4 input to the functions fs(·) is unobserved and must be estimated together with the parameters of the functions fs(·). Depending on the architecture of the neural networks, the amortization can significantly reduce the number of parameters in the model (as compared to the non-amortized model), while still having the flexibility to model different embedding vectors for each group. The number of parameters in the S-EFE model is KL(S + 1), where S is the number of groups, K is the dimensionality of the embedding vectors, and L is the number of objects (e.g., the vocabulary size). With amortization, we reduce the number of parameters to 2KL + SP, where P is the number of parameters of the neural network. Since typically L ≫P, this corresponds to a significant reduction in the number of parameters, even when P scales linearly with K. In the amortized S-EFE model, we need to introduce a new set of parameters φ(s) ∈RP for each group s, corresponding to the neural network parameters. Given these, the group-specific embedding vectors ρ(s) v are obtained as ρ(s) v = fs(ρ(0) v ) = f(ρ(0) v ; φ(s)). (5) We compare two architectures for the function fs(·): fully connected feed-forward neural networks and residual networks (He et al., 2016). For both, we consider one hidden layer with H units. Hence, the network parameters φ(s) are two weight matrices, φ(s) = {W (s) 1 ∈RH×K, W (s) 2 ∈RK×H}, (6) i.e., P = 2KH parameters. The neural network takes as input the global embedding vector ρ(0) v , and it outputs the group-specific embedding vectors ρ(s) v . The mathematical expression for ρ(s) v for a feed-forward neural network and a residual network is respectively given by ρ(s) v = fffnet(ρ(0) v ; φ(s)) = W (s) 2 tanh W (s) 1 ρ(0) v , (7) ρ(s) v = fresnet(ρ(0) v ; φ(s)) = ρ(0) v + W (s) 2 tanh W (s) 1 ρ(0) v , (8) where we have considered the hyperbolic tangent nonlinearity. The main difference between both network architectures is that the residual network focuses on modeling how the group-specific embedding vectors ρ(s) v differ from the global vectors ρ(0) v . That is, if all weights were set to 0, the feed-forward network would output 0, while the residual network would output the global vector ρ(0) v for all groups. The objective function under amortization is given by Lamortiz = log p(α) + log p(ρ(0)) + X v,i log p xvi xcvi; α, ρ(0), φ . (9) We maximize this objective with respect to αv, ρ(0) v , and φ(s) using stochastic gradient ascent. We implement the hierarchical and amortized S-EFE models in TensorFlow (Abadi et al., 2015), which allows us to leverage automatic differentiation.3 Example: structured Bernoulli embeddings for grouped text data. Here, we consider a set of documents broken down into groups, such as political affiliations or scientific disciplines. We can represent the data as a binary matrix X and a set of group indicators si. Since only one word can appear in a certain position i, the matrix X contains one non-zero element per column. In embedding models, we ignore this one-hot constraint for computational efficiency, and consider that the observations are generated following a set of conditional Bernoulli distributions (Mikolov et al., 2013c; Rudolph et al., 2016). Given that most of the entries in X are zero, embedding models typically downweigh the contribution of the zeros to the objective function. Mikolov et al. (2013c) use negative sampling, which consists in randomly choosing a subset of the zero observations. This corresponds to a biased estimate of the gradient in a Bernoulli exponential family embedding model (Rudolph et al., 2016). The context cvi is given at each position i by the set of surrounding words in the document, according to a fixed-size window. 3Code is available at https://github.com/mariru/structured_embeddings 5 data embedding of groups grouped by size ArXiv abstracts text 15k terms 19 subject areas 15M words Senate speeches text 15k terms 83 home state/party 20M words Shopping data counts 5.5k items 12 months 0.5M trips Table 1: Group structure and size of the three corpora analyzed in Section 3. Example: structured Poisson embeddings for grouped shopping data. EFE and S-EFE extend to applications beyond text and we use S-EFE to model supermarket purchases broken down by month. For each market basket i, we have access to the month si in which that shopping trip happened. Now, the rows of the data matrix X index items, while columns index shopping trips. Each element xvi denotes the number of units of item v purchased at trip i. Unlike text, each column of X may contain more than one non-zero element. The context cvi corresponds to the set of items purchased in trip i, excluding v. In this case, we use the Poisson conditional distribution, which is more appropriate for count data. In Poisson S-EFE, we also downweigh the contribution of the zeros in the objective function, which provides better results because it allows the inference to focus on the positive signal of the actual purchases (Rudolph et al., 2016; Mikolov et al., 2013c). 3 Empirical Study In this section, we describe the experimental study. We fit the S-EFE model on three datasets and compare it against the EFE (Rudolph et al., 2016). Our quantitative results show that sharing the context vectors provides better results, and that amortization and hierarchical structure give further improvements. Data. We apply the S-EFE on three datasets: ArXiv papers, U.S. Senate speeches, and purchases on supermarket grocery shopping data. We describe these datasets below, and we provide a summary of the datasets in Table 1. ArXiv papers: This dataset contains the abstracts of papers published on the ArXiv under the 19 different tags between April 2007 and June 2015. We treat each tag as a group and fit S-EFE with the goal of uncovering which words have the strongest shift in usage. We split the abstracts into training, validation, and test sets, with proportions of 80%, 10%, and 10%, respectively. Senate speeches: This dataset contains U.S. Senate speeches from 1994 to mid 2009. In contrast to the ArXiv collection, it is a transcript of spoken language. We group the data into state of origin of the speaker and his or her party affiliation. Only affiliations with the Republican and Democratic Party are considered. As a result, there are 83 groups (Republicans from Alabama, Democrats from Alabama, Republicans from Arkansas, etc.). Some of the state/party combinations are not available in the data, as some of the 50 states have only had Senators with the same party affiliation. We split the speeches into training (80%), validation (10%), and testing (10%). Grocery shopping data: This dataset contains the purchases of 3, 206 customers. The data covers a period of 97 weeks. After removing low-frequency items, the data contains 5, 590 unique items at the UPC (Universal Product Code) level. We split the data into a training, test, and validation sets, with proportions of 90%, 5%, and 5%, respectively. The training data contains 515, 867 shopping trips and 5, 370, 623 purchases in total. For the text corpora, we fix the vocabulary to the 15k most frequent terms and remove all words that are not in the vocabulary. Following Mikolov et al. (2013c), we additionally remove each word with probability 1 − p 10−5/fv, where fv is the word frequency. This downsamples especially the frequent words and speeds up training. (Sizes reported in Table 1 are the number of words remaining after preprocessing.) Models. Our goal is to fit the S-EFE model on these datasets. For the text data, we use the Bernoulli distribution as the conditional exponential family, while for the shopping data we use the Poisson distribution, which is more appropriate for count data. 6 On each dataset, we compare four approaches based on S-EFE with two EFE (Rudolph et al., 2016) baselines. All are fit using stochastic gradient descent (SGD) (Robbins and Monro, 1951). In particular, we compare the following methods: • A global EFE model, which cannot capture group structure. • Separate EFE models, fitted independently on each group. • (this paper) S-EFE without hierarchical structure or amortization. • (this paper) S-EFE with hierarchical group structure. • (this paper) S-EFE, amortized with a feed-forward neural network (Eq. 7). • (this paper) S-EFE, amortized using a residual network (Eq. 8). Experimental setup and hyperparameters. For text we set the dimension of the embeddings to K = 100, the number of hidden units to H = 25, and we experiment with two context sizes, 2 and 8.4 In the shopping data, we use K = 50 and H = 20, and we randomly truncate the context of baskets larger than 20 to reduce their size to 20. For both methods, we use 20 negative samples. For all methods, we subsample minibatches of data in the same manner. Each minibatch contains subsampled observations from all groups and each group is subsampled proportionally to its size. For text, the words subsampled from within a group are consecutive, and for shopping data the observations are sampled at the shopping trip level. This sampling scheme reduces the bias from imbalanced group sizes. For text, we use a minibatch size of N/10000, where N is the size of the corpus, and we run 5 passes over the data; for the shopping data we use N/100 and run 50 passes. We use the default learning rate setting of TensorFlow for Adam5 (Kingma and Ba, 2015). We use the standard initialization schemes for the neural network parameters. The weights are drawn from a uniform distribution bounded at ± √ 6/ √ K + H (Glorot and Bengio, 2010). For the embeddings, we try 3 initialization schemes and choose the best one based on validation error. In particular, these schemes are: (1) all embeddings are drawn from the Gaussian prior implied by the regularizer; (2) the embeddings are initialized from a global embedding; (3) the context vectors are initialized from a global embedding and held constant, while the embeddings vectors are drawn randomly from the prior. Finally, for each method we choose the regularization variance from the set {100, 10, 1, 0.1}, also based on validation error. Runtime. We implemented all methods in Tensorflow. On the Senate speeches, the runtime of S-EFE is 4.3 times slower than the runtime of global EFE, hierarchical EFE is 4.6 times slower than the runtime of global EFE, and amortized S-EFE is 3.3 times slower than the runtime of global EFE. (The Senate speeches have the most groups and hence the largest difference in runtime between methods.) Evaluation metric. We evaluate the fits by held-out pseudo (log-)likelihood. For each model, we compute the test pseudo log-likelihood, according to the exponential family distribution used (Bernoulli or Poisson). For each test entry, a better model will assign higher probability to the observed word or item, and lower probability to the negative samples. This is a fair metric because the competing methods all produce conditional likelihoods from the same exponential family.6 To make results comparable, we train and evaluate all methods with the same number of negative samples (20). The reported held out likelihoods give equal weight to the positive and negative samples. Quantitative results. We show the test pseudo log-likelihood of all methods in Table 2 and report that our method outperforms the baseline in all experiments. We find that S-EFE with either hierarchical structure or amortization outperforms the competing methods based on standard EFE highlighted in bold. This is because the global EFE ignores per-group variations, whereas the separate EFE cannot share information across groups. The results of the global EFE baseline are better than fitting separate EFE (the other baseline), but unlike the other methods the global EFE cannot be used for the exploratory analysis of variations across groups. Our results show that using a hierarchical S-EFE is always better than using the simple S-EFE model or fitting a separate EFE on each group. The hierarchical structure helps, especially for the Senate speeches, where the data is divided into many 4To save space we report results for context size 8 only. Context size 2 shows the same relative performance. 5Adam needs to track a history of the gradients for each parameter that is being optimized. One advantage from reducing the number of parameters with amortization is that it results in a reduced computational overhead for Adam (as well as for other adaptive stepsize schedules). 6Since we hold out chunks of consecutive words usually both a word and its context are held out. For all methods we have to use the words in the context to compute the conditional likelihoods. 7 ArXiv papers Senate speeches Shopping data Global EFE (Rudolph et al., 2016) −2.176 ± 0.005 −2.239 ± 0.002 −0.772 ± 0.000 Separated EFE (Rudolph et al., 2016) −2.500 ± 0.012 −2.915 ± 0.004 −0.807 ± 0.002 S-EFE −2.287 ± 0.007 −2.645 ± 0.002 −0.770 ± 0.001 S-EFE (hierarchical) −2.170 ± 0.003 −2.217 ± 0.001 −0.767 ± 0.000 S-EFE (amortiz+feedf) −2.153 ± 0.004 −2.484 ± 0.002 −0.774 ± 0.000 S-EFE (amortiz+resnet) −2.120 ± 0.004 −2.249 ± 0.002 −0.762 ± 0.000 Table 2: Test log-likelihood on the three considered datasets. S-EFE consistently achieves the highest held-out likelihood. The competing methods are the global EFE, which can not capture group variations, and the separate EFE, which cannot share information across groups. groups. Among the amortized S-EFE models we developed, at least amortization with residual networks outperforms the base S-EFE. The advantage of residual networks over feed-forward neural networks is consistent with the results reported by (He et al., 2016). While both hierarchical S-EFE and amortized S-EFE share information about the embedding of a particular word across groups (through the global embedding ρ(0) v ), amortization additionally ties the embeddings of all words within a group (through learning the neural network of that group). We hypothesize that for the Senate speeches, which are split into many groups, this is a strong modeling constraint, while it helps for all other experiments. Structured embeddings reveal a spectrum of word usage. We have motivated S-EFE with the example that the usage of INTELLIGENCE varies by ArXiv category (Figure 1a). We now explain how for each term the per-group embeddings place the groups on a spectrum. For a specific term v we take its embeddings vectors {ρ(s) v } for all groups s, and project them onto a one-dimensional space using the first component of principal component analysis (PCA). This is a one-dimensional summary of how close the embeddings of v are across groups. Such comparison is posible because the S-EFE shares the context vectors, which grounds the embedding vectors in a joint space. The spectrum for the word INTELLIGENCE along its first principal component is the horizontal axis in Figure 1a. The dots are the projections of the group-specific embeddings for that word. (The embeddings come from a fitted S-EFE with feed-forward amortization.) We can see that in an unsupervised manner, the method has placed together groups related to physics on one end on the spectrum, while computer science, statistics and math are on the other end of the spectrum. To give additional intuition of what the usage of INTELLIGENCE is at different locations on the spectrum, we have listed the 8 most similar words for the groups computer science (cs), quantitative finance (q-fin), math (math), statistics (stat), and nonlinear sciences (nlin). Word similarities are computed using cosine distance in the embedding space. Eventhough their embeddings are relatively close to each other on the spectrum, the model has the flexibility to capture high variabilty in the lists of similar words. Exploring group variations with structured embeddings. The result of the S-EFE also allows us to investigate which words have the highest deviation from their average usage for each group. For example, in the Congressional speeches, there are many terms that we do not expect the Senators to use differently (e.g., most stopwords). We might however want to ask a question like “which words do Republicans from Texas use most differently from other Senators?” By suggesting an answer, our method can guide an exploratory data analysis. For each group s (state/party combination), we compute the top 3 words in argsortv ||ρ(s) v −1 S PS t=1 ρ(t) v || from within the top 1k words. Table 3 shows a summary of our findings (the full table is in the Appendix). According to the S-EFE (with residual network amortization), Republican Senators from Texas use BORDER and the phrase OUR COUNTRY in different contexts than other Senators. Some of these variations are probably influenced by term frequency, as we expect Democrats from Washington to talk about WASHINGTON more frequently than other states. But we argue that our method provides more insights than a frequency based analysis, as it is also sensitive to the context in which a word appears. For example, WASHINGTON might in some groups be used more often in 8 TEXAS FLORIDA IOWA WASHINGTON border medicaid bankruptcy agriculture prescription washington our country prescription water farmers drug energy iraq medicare waste food drugs oil Table 3: List of the three most different words for different groups for the Congressional speeches. S-EFE uncovers which words are used most differently by Republican Senators (red) and Democratic Senators (blue) from different states. The complete table is in the Appendix. the context of PRESIDENT and GEORGE, while in others it might appear in the context of DC and CAPITAL, or it may refer to the state. 4 Discussion We have presented several structured extensions of EFE for modeling grouped data. Hierarchical S-EFE can capture variations in word usage across groups while sharing statistical strength between them through a hierarchical prior. Amortization is an effective way to reduce the number of parameters in the hierarchical model. The amortized S-EFE model leverages the expressive power of neural networks to reduce the number of parameters, while still having the flexibility to capture variations between the embeddings of each group. Below are practical guidelines for choosing a S-EFE. How can I fit embeddings that vary across groups of data? To capture variations across groups, never fit a separate embedding model for each group. We recommend at least sharing the context vectors, as all the S-EFE models do. This ensures that the latent dimensions of the embeddings are aligned across groups. In addition to sharing context vectors, we also recommend sharing statistical strength between the embedding vectors. In this paper we have presented two ways to do so, hierarchical modeling and amortization. Should I use a hierarchical prior or amortization? The answer depends on how many groups the data contain. In our experiments, the hierarchical S-EFE works better when there are many groups. With less groups, the amortized S-EFE works better. The advantage of the amortized S-EFE is that it has fewer parameters than the hierarchical model, while still having the flexibility to capture across-group variations. The global embeddings in an amortized S-EFE have two roles. They capture the semantic similarities of the words, and they also serve as the input into the amortization networks. Thus, the global embeddings of words with similar pattern of across-group variation need to be in regions of the embedding space that lead to similar modifications by the amortization network. As the number of groups in the data increases, these two roles become harder to balance. We hypothesize that this is why the amortized S-EFE has stronger performance when there are fewer groups. Should I use feed-forward or residual networks? To amortize a S-EFE we recommend residual networks. They perform better than the feed-forward networks in all of our experiments. While the feed-forward network has to output the entire meaning of a word in the group-specific embedding, the residual network only needs the capacity to model how the group-specific embedding differs from the global embedding. Acknowledgements We thank Elliott Ash and Suresh Naidu for the helpful discussions and for sharing the Senate speeches. This work is supported by NSF IIS-1247664, ONR N00014-11-1-0651, DARPA PPAML FA8750-142-0009, DARPA SIMPLEX N66001-15-C-4032, the Alfred P. Sloan Foundation, and the John Simon Guggenheim Foundation. Francisco J. R. Ruiz is supported by the EU H2020 programme (Marie Skłodowska-Curie grant agreement 706760). 9 References Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G., Davis, A., Dean, J., Devin, M., et al. (2015). TensorFlow: Large-scale machine learning on heterogeneous systems. Software available from tensorflow.org. Ammar, W., Mulcaire, G., Tsvetkov, Y., Lample, G., Dyer, C., and Smith, N. A. (2016). Massively multilingual word embeddings. arXiv preprint arXiv:1602.01925. Arnold, B. C., Castillo, E., Sarabia, J. M., et al. (2001). Conditionally specified distributions: an introduction (with comments and a rejoinder by the authors). Statistical Science, 16(3):249–274. Arora, S., Li, Y., Liang, Y., Ma, T., and Risteski, A. (2015). Rand-walk: A latent variable model approach to word embeddings. arXiv preprint arXiv:1502.03520. Bamler, R. and Mandt, S. (2017). Dynamic word embeddings. International Conference on Machine Learning. Barkan, O. and Koenigstein, N. (2016). Item2vec: neural item embedding for collaborative filtering. In Machine Learning for Signal Processing (MLSP), 2016 IEEE 26th International Workshop on, pages 1–6. IEEE. Bengio, Y., Ducharme, R., Vincent, P., and Jauvin, C. (2003). A neural probabilistic language model. Journal of machine learning research, 3(Feb):1137–1155. Bishop, C. M. (2006). Machine learning and pattern recognition. Information Science and Statistics. Springer, Heidelberg. Dayan, P., Hinton, G. E., Neal, R. M., and Zemel, R. S. (1995). The Helmholtz machine. Neural Computation, 7(5):889–904. Gelman, A., Carlin, J. B., Stern, H. S., and Rubin, D. B. (2003). Bayesian data analysis. Chapman and Hall/CRC. Gershman, S. J. and Goodman, N. D. (2014). Amortized inference in probabilistic reasoning. In Proceedings of the Thirty-Sixth Annual Conference of the Cognitive Science Society. Glorot, X. and Bengio, Y. (2010). Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256. Hamilton, W. L., Leskovec, J., and Jurafsky, D. (2016). Diachronic word embeddings reveal statistical laws of semantic change. arXiv preprint arXiv:1605.09096. Harris, Z. S. (1954). Distributional structure. Word, 10(2-3):146–162. He, K., Zhang, X., Ren, S., and Sun, J. (2016). Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition. Kim, Y., Chiu, Y.-I., Hanaki, K., Hegde, D., and Petrov, S. (2014). Temporal analysis of language through neural language models. arXiv preprint arXiv:1405.3515. Kingma, D. P. and Ba, J. L. (2015). Adam: A method for stochastic optimization. In International Conference on Learning Representations. Kingma, D. P. and Welling, M. (2014). Auto-encoding variational Bayes. In International Conference on Learning Representations. Klementiev, A., Titov, I., and Bhattarai, B. (2012). Inducing crosslingual distributed representations of words. Korattikara, A., Rathod, V., Murphy, K. P., and Welling, M. (2015). Bayesian dark knowledge. In Advances in Neural Information Processing Systems. Kulkarni, V., Al-Rfou, R., Perozzi, B., and Skiena, S. (2015). Statistically significant detection of linguistic change. In Proceedings of the 24th International Conference on World Wide Web, pages 625–635. ACM. Levy, O. and Goldberg, Y. (2014). Neural word embedding as implicit matrix factorization. In Neural Information Processing Systems, pages 2177–2185. Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013a). Efficient estimation of word representations in vector space. ICLR Workshop Proceedings. arXiv:1301.3781. Mikolov, T., Le, Q. V., and Sutskever, I. (2013b). Exploiting similarities among languages for machine translation. arXiv preprint arXiv:1309.4168. Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. (2013c). Distributed representations of words and phrases and their compositionality. In Neural Information Processing Systems, pages 3111–3119. 10 Mikolov, T., Yih, W.-T. a., and Zweig, G. (2013d). Linguistic regularities in continuous space word representations. In HLT-NAACL, pages 746–751. Mnih, A. and Gregor, K. (2014). Neural variational inference and learning in belief networks. In International Conference on Machine Learning. Murphy, K. P. (2012). Machine learning: a probabilistic perspective. MIT press. Pennington, J., Socher, R., and Manning, C. D. (2014). Glove: Global vectors for word representation. In Conference on Empirical Methods on Natural Language Processing, volume 14, pages 1532–1543. Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning. Robbins, H. and Monro, S. (1951). A stochastic approximation method. The annals of mathematical statistics, pages 400–407. Rudolph, M. and Blei, D. (2017). Dynamic bernoulli embeddings for language evolution. arXiv preprint at arXiv:1703.08052. Rudolph, M., Ruiz, F., Mandt, S., and Blei, D. (2016). Exponential family embeddings. In Advances in Neural Information Processing Systems, pages 478–486. Rumelhart, D. E., Hintont, G. E., and Williams, R. J. (1986). Learning representations by back-propagating errors. Nature, 323:9. Wainwright, M. J. and Jordan, M. I. (2008). Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1–2):1–305. Yao, Z., Sun, Y., Ding, W., Rao, N., and Xiong, H. (2017). Discovery of evolving semantics through dynamic word embedding learning. arXiv preprint arXiv:1703.00607. Zou, W. Y., Socher, R., Cer, D. M., and Manning, C. D. (2013). Bilingual word embeddings for phrase-based machine translation. In EMNLP, pages 1393–1398. 11 | 2017 | 489 |
6,995 | Spherical convolutions and their application in molecular modelling Wouter Boomsma Department of Computer Science University of Copenhagen wb@di.ku.dk Jes Frellsen Department of Computer Science IT University of Copenhagen jefr@itu.dk Abstract Convolutional neural networks are increasingly used outside the domain of image analysis, in particular in various areas of the natural sciences concerned with spatial data. Such networks often work out-of-the box, and in some cases entire model architectures from image analysis can be carried over to other problem domains almost unaltered. Unfortunately, this convenience does not trivially extend to data in non-euclidean spaces, such as spherical data. In this paper, we introduce two strategies for conducting convolutions on the sphere, using either a spherical-polar grid or a grid based on the cubed-sphere representation. We investigate the challenges that arise in this setting, and extend our discussion to include scenarios of spherical volumes, with several strategies for parameterizing the radial dimension. As a proof of concept, we conclude with an assessment of the performance of spherical convolutions in the context of molecular modelling, by considering structural environments within proteins. We show that the models are capable of learning non-trivial functions in these molecular environments, and that our spherical convolutions generally outperform standard 3D convolutions in this setting. In particular, despite the lack of any domain specific feature-engineering, we demonstrate performance comparable to state-of-the-art methods in the field, which build on decades of domain-specific knowledge. 1 Introduction Given the transformational role that convolutional neural networks (CNNs) have had in the area of image analysis, it is natural to consider whether such networks can be efficiently applied in other contexts. In particular spatially embedded data can often be interpreted as images, allowing for direct transfer of neural network architectures to these domains. Recent years have demonstrated interesting examples in a broad selection of the natural sciences, ranging from physics (Aurisano et al., 2016; Mills et al., 2017) to biology (Wang et al., 2016; Min et al., 2017), in many cases showing convolutional neural networks to substantially outperform existing methods. The standard convolutional neural network can be applied naturally to data embedded in a Euclidean space, where uniformly spaced grids can be trivially defined. For other manifolds, such as the sphere, it is less obvious, and to our knowledge, convolutional neural networks for such manifolds have not been systematically investigated. In particular for the sphere, the topic has direct applications in a range of scientific disciplines, such as the earth sciences, astronomy, and modelling of molecular structure. This paper presents two strategies for creating spherical convolutions, as understood in the context of convolutional neural networks (i.e., discrete, and efficiently implementable as tensor operations). The first is a straightforward periodically wrapped convolution on a spherical-polar grid. The second builds on the concept of a cubed-sphere (Ronchi et al., 1996). We proceed with extending these 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. strategies to include the radial component, using concentric grids, which allows us to conduct convolutions in spherical volumes. Our hypothesis is that these concentric spherical convolutions should outperform standard 3D convolutions in cases where data is naturally parameterized in terms of a radial component. We test this hypothesis in the context of molecular modelling. We will consider structural environments in a molecule as being defined from the viewpoint of a single amino acid or nucleotide: how does such an entity experience its environment in terms of the mass and charge of surrounding atoms? We show that a standard convolutional neural network architectures can be used to learn various features of molecular structure, and that our spherical convolutions indeed outperform standard 3D convolutions for this purpose. We conclude by demonstrating state-of-the art performance in predicting mutation induced changes in protein stability. 2 Spherical convolutions Conventional CNNs work on discretized input data on a grid in Rn, such as time series data in R and image data in R2. At each convolutional layer l a CNN performs discrete convolutions (or a correlation) [f ∗ki](x) = X x′∈Zn Cl X c=1 fc(x′)ki c(x −x′) (1) of the input feature map f : Zn →RCl and a set of Cl+1 filters ki : Zn →RCl (Cohen and Welling, 2016; Goodfellow et al., 2016). While such convolutions are equivariant to translation on the grid, they are not equivariant to scaling (Cohen and Welling, 2016). This means that in order to preserve the translation equivariance in Rn, conventional CNNs rely on the grid being uniformly spaced within each dimension of Rn. Constructing such a grid is straightforward in Rn. However, for convolutions on other manifolds such as the 2D sphere, S2 = {v ∈R3|vv⊺= 1}, no such planar uniform grid is available, due to the non-linearity of the space (Mardia and Jupp, 2009). In this section, we briefly discuss the consequences of using convolutions in the standard non-uniform spherical-polar grid, and present an alternative grid for which the non-uniformity is expected to be less severe. 2.1 Convolutions of features on S2 A natural approach to a discretization on the sphere is to represent points v on the sphere by their spherical-polar coordinates (θ, φ) and construct uniformly spaced grid in these coordinates, where the spherical coordinates are defined by v = (cos θ, sin θ cos φ, sin θ sin φ)⊺. Convolutions on such a grid can be implemented efficiently using standard 2D convolutions when taking care of using periodic padding at the φ boundaries. The problem with a spherical-polar coordinate grid is that it is highly non-equidistant when projected onto the sphere: the distance between grid points becomes increasingly small as we move from the equator to the poles (figure 1, left). This reduces the ability to share filters between different areas of the sphere. Figure 1: Two realizations of a grid on the sphere. Left: a grid using equiangular spacing in a standard spherical-polar coordinate system, and Right: An equiangular cubed-sphere representation, as described in Ronchi et al. (1996). 2 Figure 2: Left: A cubed-sphere grid and a curve on the sphere. Right: The six planes of a cubed-sphere representation and the transformation of the curve to this representation. As a potential improvement, we will investigate a spherical convolution based on the cubed-sphere transformation (Ronchi et al., 1996). The transformation is constructed by decomposing the sphere into six patches defined by projecting the circumscribed cube onto the sphere (figure 1, right). In this transformation a point on the sphere v ∈S2 is mapped to a patch b ∈{1, 2, 3, 4, 5, 6} and two coordinates (ξ, η) ∈[−π/4, π/4[2 on that patch. The coordinate are given by the angles between the axis pointing to the patch and v measured in the two coordinate planes perpendicular to the patch. For instance the vectors {v ∈S2|vx > vy and vx > vz} map to patch b = 1 and we have tan ξ = vy/vx and tan η = vz/vx. The remaining mappings are described by Ronchi et al. (1996). If we grid the two angles (ξ, η) uniformly in the cubed-sphere transformation and project this grid onto the sphere, we obtain a grid that is more regular (Ronchi et al., 1996), although it has artefacts in the 8 corners of the circumscribed cube (figure 1, right). The cubed-sphere convolution is then constructed by applying the conventional convolution in equation (1) to a uniformly spaced grid on each of the six cubed shape patches. This construction has two main advances: 1) within each patch, the convolution is almost equivariant to translation in ξ and η and 2) features on the cubed-sphere grid can naturally be expressed using tensors, which means that the spherical convolution can be efficiently implemented on a GPU. When implementing convolutions and pooling operations for the cubed-sphere grid, one has to be careful in padding each patch with the contents of the four neighbouring patches, in order to preserve the wrapped topology of the sphere (figure 2, right). Both of these two approaches to spherical convolutions are hampered by a lack of rotational equivariance, which restricts the degree with which filters can be shared over the surface of the sphere, leading to suboptimal efficiency in the learning of the parameters. Despite this limitation, for capturing patterns in spherical volumes, we expect that the ability to express patterns naturally in terms of radial and angular dimensions has advantages over standard 3D convolutions. We test this hypothesis in the following sections. 2.2 Convolutions of features on B3 The two representations from figure 1 generalize to the ball B3 by considering concentric shells at uniformly separated radii. In the case of the cubed-sphere, this means that a vector v ∈B3 is mapped to the unique coordinates (r, b, ξ, η), where r = √ vv⊺is the radius and (b, ξ, η) are the cubed-sphere coordinates at r, and we construct a uniform grid in r, ξ and η. Likewise, in the spherical-polar case, we construct a uniform grid in r, θ and φ. We will refer to these grids as concentric cubed-sphere grid and concentric spherical-polar grid respectively (figure 3). As is the case for their S2 counterparts, features on these grids can be naturally expressed using tensors. We can apply the conventional 3D convolutions in equation (1) to features on the concentric cubedsphere and the concentric spherical-polar grids, and denote these as concentric cubed-sphere convolution (CCSconv) and concentric spherical-polar convolution (CSPconv). For fixed r, the convolutions will thus have the same properties as in the S2 case. In these concentric variants, the convolutions will not be equivariant to translations in r, which again reduces the potential to share filter parameters. 3 Figure 3: Three realizations of a grid on the ball. Left: a grid using equiangular spacing in a standard spherical-polar coordinate system (concentric spherical-polar grid). Center: An equiangular cubed-sphere representation, as described in Ronchi et al. (1996) (concentric cubed-sphere grid). Right: a Cartesian grid. We propose to address this issue in three ways. First, we can simply apply the convolution over the full range of r with a large number of filters Cl+1 and hope that the network will automatically allocate different filters at different radii. Secondly, we can make the filters ki(x −x′, xr) depend on r, which corresponds to using different (possibly overlapping) filters on each spherical shell (conv-banded-disjoint). Thirdly, we can divide the r-grid into segments and apply the same filter within each segment (conv-banded), potentially with overlapping regions (depending on the stride). The three approaches are illustrated in figure 4. In the experiments below, we will be comparing the performance of our concentric spherical convolution methods to that of a simple 3D convolution in a Cartesian grid (figure 3, right). (a) conv (b) conv-banded-disjoint (convbd) (c) conv-banded (convb) Figure 4: Three strategies for the radial component of concentric cubed-sphere or concentric spherical convolutions. (a) conv: The same convolution-filter is applied to all values of r, (b) conv-bandeddisjoint (convbd): convolution-filters are only applied in the angular directions, using different filters for each block in r, (c) conv-banded (convb): convolutions are applied within radial segments, Note that for visual clarity, we use a stride of 3 in this figure, although we use a stride of 1 in practice. 3 Modelling structural environments in molecules In the last decades, substantial progress has been made in the ability to simulate and analyse molecular structures on a computer. Much of this progress can be ascribed to the molecular force fields used to capture the physical interactions between atoms. The basic functional forms of these models were established in the late 1960s, and through gradual refinements they have become a success story of molecular modelling. Despite these positive developments, the accuracy of molecular force fields is known to still be a limiting factor for many biological and pharmaceutical applications, and further improvements are necessary in this area to increase the robustness of methods for e.g. protein prediction and design. There are indications that Machine Learning could provide solutions to such challenges. While, traditionally, most of the attention in the Machine Learning community has been dedicated 4 Figure 5: Example of the environment surrounding an amino acid in a protein, in this case the phenylalanine at position 30 in protein GB1 (PDB ID: 2GB1). Left: a cartoon representation of GB1, where the helix is red, the sheets are yellow and the coils are grey. The phenylalanine is shown using an atomic representation in green. Right: an atomic representation of GB1, where carbon atoms are green, oxygen atoms are red, nitrogen atoms are blue and hydrogen atoms are grey. A sphere centered at the Cα atom of the phenylalanine with a radius of 12Å is shown in grey. to predicting structural features from amino acid sequences (e.g. secondary structure, disorder, and contact prediction), there are increasingly applications taking three dimensional molecular structure as input (Behler and Parrinello, 2007; Jasrasaria et al., 2016; Schütt et al., 2017; Smith et al., 2017). In particular in the field of quantum chemistry, a number of studies have demonstrated the ability of deep learning techniques to accurately predict energies of molecular systems. Common to many of these methods is a focus on manually engineered features, where the molecular input structure is encoded based on prior domain-specific knowledge, such as specific functional relationships between atoms and their environments (Behler and Parrinello, 2007; Smith et al., 2017). Recently, a few studies have demonstrated the potential of automatically learning such features, by encoding the molecular structural input in a more domain-agnostic manner, for instance considering only pairwise distance matrices (Schütt et al., 2017), space filling curves (Jasrasaria et al., 2016), or basic structural features (Wallach et al., 2015). The fact that atomic forces are predominantly distance-based suggests that molecular environments are most naturally represented with a radial-based parameterization, which makes it an obvious test case for the convolutions presented in the previous section. If successful, such convolutions could allow us to make inferences directly from the raw molecular structure of a molecule, avoiding the need of manual feature engineering. We will consider the environments that each amino acids experience within its globular protein structure as images in the 3-ball. Figure 5 shows an example of the environment experienced by an arbitrarily chosen amino acid in the GB1 protein (PDB ID: 2GB1). Although distorted by the fish-eye perspective, the local environment (right) displays several key features of the data: we see clear patterns among neighboring atoms, depending on their local structure, and we can imagine the model learning to recognize hydrogen bonds and charge interactions between an amino acid and its surroundings. Our representation of the molecular environment includes all atoms within a 12 Å radius of the Cα atom of the amino acid in question. Each atom is represented by three fundamental properties: 1) its position relative to the amino acid in question (i.e., the position in the grid), 2) its mass, and 3) its partial charge, as defined by the amber99sb force field (Hornak et al., 2006). We construct two types of models, which are identical except for their output. The first outputs the propensity for different secondary structure labels at a given position (i.e., helix, extended, coil), while the second outputs the propensity for different amino acid types. Each of these models will be implemented with both the Cartesian, the concentric spherical and the concentric cubed-sphere convolutions. Furthermore, for the concentric cubed-sphere convolutions, we compare the three strategies for dealing with the radial component illustrated in figure 4. 5 Table 1: The architecture of the CNN where o represent the output size, which is 3 for secondary structure output and 20 for amino acid output. As an example, we use the convolutional filter sizes from the concentric cubed-sphere (CCS) case. Similar sizes are used for the other representations. Layer Operation Filter / weight size Layer output size 0 Input 6 × 24 × 38 × 38 × 2 1 CCSconv + ReLU 3 × 5 × 5 × 2 × 16 6 × 22 × 19 × 19 × 16 1 CCSsumpool 1 × 3 × 3 6 × 22 × 10 × 10 × 16 2 CCSconv + ReLU 3 × 3 × 3 × 16 × 32 6 × 20 × 10 × 10 × 32 2 CCSsumpool 3 × 3 × 3 6 × 9 × 5 × 5 × 32 3 CCSconv + ReLU 3 × 3 × 3 × 32 × 64 6 × 7 × 5 × 5 × 64 3 CCSsumpool 1 × 3 × 3 6 × 7 × 3 × 3 × 64 4 CCSconv + ReLU 3 × 3 × 3 × 64 × 128 6 × 5 × 3 × 3 × 128 4 CCSsumpool 1 × 3 × 3 6 × 5 × 3 × 3 × 128 5 Dense + ReLU 34 560 × 2 048 2 048 6 Dense + ReLU 2 048 × 2 048 2 048 7 Dense + Softmax 2 048 × o o 3.1 Model architecture The input to the network is a grid (concentric cubed-sphere, concentric spherical polar or Cartesian). Each voxel has two input channels: the mass of the atom that lies in the given bin and the atom’s partial charge (or zeros if no atom is found). The resolution of the grids are chosen so that the maximum distance within a bin is 0.5Å, which ensures that bins are occupied by at most one atom. The radius of the ball is set to 12Å, since most physical interactions between atoms occur within this distance (Irbäck and Mohanty, 2006). This gives us an input tensor of shape (b = 6, r = 24, ξ = 38, η = 38, C1 = 2) for the concentric cubed-sphere case, (r = 24, θ = 76, φ = 151, C1 = 2) for the concentric spherical polar case, and (x = 60, y = 60, z = 60, C1 = 2) for the Cartesian case. We use a deep model architecture that is loosely inspired by the VGG models (Simonyan and Zisserman, 2015), but employs the convolution operators described above. Our models have four convolutional layers followed by three dense layers, as illustrated in table 1. Each convolutional layer is followed by rectified linear unit (ReLU) activation function (Hahnloser et al., 2000; Glorot et al., 2011) and a sum pooling operation which is appropriately wrapped in the case of the concentric cubed-sphere and the concentric spherical polar grid. We use sum pooling since the input features, mass and partial charge, are both physical quantities that are naturally additive. The total number of parameters is the models (with the amino acid output) are 75 313 253 (concentric cubed-sphere), 69 996 645 (concentric spherical polar), and 61 159 077 (Cartesian). Furthermore, for the concentric cubed-sphere case, we include a comparison of the two alternative strategies for the radial component: the convb and the convbd, which have 75 745 333 and 76 844 661 parameters respectively. Finally, to see the effect of convolutions over a purely dense model, we include a baseline model where the convolutional layers are replaced with dense layers, but otherwise following the same architecture, and roughly the same number of parameters (66 670 613). 3.2 Training We minimized the cross-entropy loss using Adam (Kingma and Ba, 2015), regularized by penalizing the loss with the sum of the L2 of all weights, using a multiplicative factor of 0.001. All dense layers also used dropout regularization with a probability of 0.5 of keeping a neuron. The models were trained on NVIDIA Titan X (Pascal) GPUs, using a batch size of 100 and a learning rate of 0.0001. The models were trained on data set of high resolution crystal structures. A large initial (nonhomology-reduced) data set was constructed using the PISCES server (Wang and Dunbrack, 2003). For all structures, hydrogen atoms were added using the Reduce program (Word et al., 1999), after which partial charges were assigned using the OpenMM framework (Eastman et al., 2012), using the amber99sb force field (Hornak et al., 2006). During these stages strict filters were applied to remove structures that 1) were incomplete (missing chains or missing residues compared to the seqres 6 entry), 2) had chain breaks, 3) failed to parse in OpenMM, or 4) led the Reduce program to crash. Finally, the remaining set was resubmitted to the PISCES server, where homology-reduction was done at the 30% level. This left us with 2336 proteins, out of which 1742 were used for training, 10 for validation, and the remainder was set aside for testing. The homology-reduction ensures that any pair of sequences in the data set are at most 30% identical at the amino-acid-level, which allows us to safely split the data into non-overlapping sets. 4 Results We now discuss results obtained with the secondary structure and amino acid models, respectively. Despite the apparent similarity of the two models, the two tasks have substantially different biological implications: secondary structure is related to the 3D structure locally at a given position in a protein, i.e. whether the protein assumes a helical or a more extended shape. In contrast, amino acid propensities describe allowed mutations in a protein, which is related to the fundamental biochemistry of the molecule, and is relevant for understanding genetic disease and for design of new proteins. 4.1 Learning the DSSP secondary structure function Predicting the secondary structure of a protein conditioned on knowledge of the three dimensional structure is not considered a hard problem. We include it here because we are interested in the ability of the neural network to learn the function that is typically used to annotate three dimensional structures with secondary structure, in our case DSSP (Kabsch and Sander, 1983). Interestingly, the different concentric convolutional models are seen to perform about equally well on this problem (table 2, Q3), marginally outperforming the Cartesian convolution and substantially outperforming the dense baseline model. To get a sense of the absolute performance, we would ideally compare to existing methods on the same problem. However, rediscovering the DSSP function is not a common task in bioinformatics, and not many tools are available that would constitute a meaningful comparison, in particular because secondary structure annotation algorithms use different definitions of secondary structure. We here use the TORUSDBN model (Boomsma et al., 2008, 2014) to provide such a baseline. The model is sequential in the sequence of a protein, and thus captures local structural information only. While the model is originally designed to sample backbone dihedral angles conditioned on an amino acid sequence or secondary structure sequence, it is generative, and can thus be used in reverse and provide the most probable secondary structure or amino acid sequence given using viterbi decoding. Most importantly, it is trained on DSSP, making it useful as a comparison for this study. Included as the last row in table 2, TORUSDBN demonstrates slightly lower performance compared to our convolutional approaches, illustrating that most of the secondary structure signal is encoded in the local angular preferences. It is encouraging to see that the convolutional networks capture all these local signals, but obtain additional performance through more non-local interactions. 4.1.1 Learning amino acid propensities Compared to secondary structure, predicting the amino acid propensity is substantially harder—partly because of the larger sample space, but also because we expect such preferences to be defined by more global interaction patterns. Interestingly, the two concentric convolutions perform about equally well, suggesting that the added regularity of the cubed-sphere representation does not provide a substantial benefit for this case (table 2, Q20). However, both methods substantially outperform the standard 3D convolution, which again outperforms the dense baseline model. We also note that there is now a significant difference between the three radial strategies, with conv-banded-disjoint (bd) and conv-banded (b) both performing worse than the simpler case of using a single convolution over the entire r-range. Again, we include TorusDBN as an external reference. The substantially lower performance of this model confirms that the amino acid label prediction task depends predominantly on non-local features not captured by this model. Finally, we include another baseline: the most frequent amino acid observed at this position among homologous (evolutionarily related) proteins. It is remarkable that the concentric models (which are trained on a homology-reduced protein set), are capable of learning the structural preferences of amino acids to the same extent as the information that is encoded as genetic variation in the sequence databases. This strongly suggests the ability of our models to learn general relationships between structure and sequence. 7 Table 2: Performance of various models in the prediction of (a) DSSP-style secondary structure conditioned and (b) amino acid propensity conditioned on the structure. The Q3 score is defined as the percentage of correct predictions for the three possible labels: helix, extended and coil. The Q20 score is defined as the percentage of correct predictions for the 20 possible amino acid labels. Model Q3 (secondary structure) Q20 (amino acid) CCSconv 0.933 0.564 CCSconvbd 0.931 0.515 CCSconvb 0.932 0.548 CSPconv 0.932 0.560 Cartesian 0.922 0.500 CCSdense 0.888 0.348 PSSM 0.547 TORUSDBN 0.894 0.183 4.1.2 Predicting change-of-stability The models in the previous section not only predict the most likely amino acid, but also the entire distribution. A natural question is whether the ratio of probabilities of two amino acids according to this distribution is related to the change of stability induced by the corresponding mutation. We briefly explore this question here. The stability of a protein is the difference in free energy ∆G between the folded and unfolded conformation of a protein. The change in stability that occurs as a consequence of a mutation is thus frequently referred to as ∆∆G. These values can be measured experimentally, and several data sets with these values are publicly available. As a simple approximation, we can interpret the sum of negative log-probabilities of each amino acid along the sequence as a free energy of the folded state Gf. To account for the free energy of the unfolded state, Gu, we could consider the negative log-probability that the amino acid in question occurs in the given amino acid sequence (without conditioning on the environment). Again, assuming independence between sites in the chain, this could be modelled by simply calculating the log-frequencies of the different amino acids across the data set, and summing over all sites of the specific protein to get the total free energy. Subtracting these two pairs of values for the wild type (W) and mutant (M) would give us a rough estimate of the ∆∆G, which due to our assumption of independence between sites simplifies to just the difference in values at the given site: ∆∆G( ¯W, ¯ M) = (Gf(Mn) −Gu(Mn)) −(Gf(Wn) −Gu(Wn)), (2) where ¯W and ¯ M denote the full wild type and mutant sequence respectively, and Wn and Mn denote the amino acids of wild type and mutant at the site n at which they differ. Given the extensive set of simplifying assumptions in the argument above, we do not use the expression in equation (2) directly but rather use the four log-probabilities (Gf(Mn), Gu(Mn), Gf(Wn), Gu(Wn)) as input to a simple regression model (a single hidden layer neural network with 10 hidden nodes and a ReLU activation function), trained on experimentally observed ∆∆G data. We calculate the performance on several standard experimental data sets on mutation-induced change-of-stability, in each case using 5-fold cross validation, and reporting the correlation between experimentally measured and our calculated ∆∆G. As a baseline, we compare our performance to two of the best known programs for calculating ∆∆G: Rosetta and FoldX. The former were taken from a recent publication (Conchúir et al., 2015), while the latter were calculated using the FoldX program (version 4). The comparison shows that even a very simple approach based on our convolutional models produces results that are comparable to the state-of-the-art in the field (table 3). This is despite the fact that we use a rather crude approximation of free energy, and that our approach disregards the fact that a mutation at a given site modifies the environment grids of all amino acids within the 12 Å range. Although these initial results should therefore not be considered conclusive, they suggest that models like the ones we propose could play a future role in ∆∆G predictions. Apart from the overall levels of performance, the most remarkable feature of table 3 is that it shows equal performance for the Cartesian and concentric cubed-sphere convolutions, despite the fact that the former displayed substantially lower Q20 scores. This peculiar result points to an interesting 8 Table 3: Pearson correlation coefficients between experimentally measured and predicted changes of stability for several sets of published stability measurements. Rosetta FoldX CCSconv CSPconv Cartesian Kellogg 0.65 0.70 0.66 0.64 0.66 Guerois 0.65 0.73 0.66 0.64 0.66 Potapov 0.52 0.59 0.52 0.51 0.52 ProTherm* 0.44 0.53 0.49 0.48 0.49 caveat in the interpretation of the predicted distribution over amino acids for a given environment. At sufficiently high resolution of the structural environment, a perfect model would be able to reliably predict the identity of the wild type amino acid by the specific shape of the hole it left behind. This means that as models improve, the entropy of the predicted amino acid distributions is expected to decrease, with increasingly peaked distributions centered at the wild type. An increased sensitivity towards the exact molecular environment will therefore eventually decrease the models ability to consider other amino acids at that position, leading to lower ∆∆G performance. The missing ingredient in our approach is the structural rearrangement in the environments that occurs as a consequence of the mutation. A full treatment of the problem should average the predictions over the available structural variation, and structural resampling is indeed part of both Rosetta and FoldX. For these reasons, it is difficult to make clear interpretations of the relative differences in performance of the three convolution procedures in table 3. The overall performance of all three, however, indicates that convolutions might be useful as part of a more comprehensive modelling strategy such as those used in Rosetta and FoldX. 5 Conclusions Convolutional neural networks are a powerful tool for analyzing spatial data. In this paper, we investigated the possibility of extending the applicability of the technique to data in the 3-ball, presenting two strategies for conducting convolutions in these spherical volumes. We assessed the performance of the two strategies (and variants thereof) on various tasks in molecular modelling, and demonstrate a substantial potential of these such concentric convolutional approaches to outperform standard 3D convolutions for such data. We expect that further improvements to the concentric convolution approach can be obtained by improving the spherical convolutions themselves. In particular, a convolution operation that is rotationally equivariant would provide greater data efficiency than the approach used here. Very recently, a procedure for conducting convolutions in SO(3) was proposed, which seems to provide an elegant solution to this problem (Cohen et al., 2018). Finally, we note that while this manuscript was in review, another paper on the application of convolutional neural networks for predicting amino acid preferences conditioned on structural environments was published, by Torng and Altman (Torng and Altman, 2017). Their study is conceptually similar to one of the applications described in this paper, but uses a Cartesian grid and standard 3D convolution (in addition to other minor differences, such as a one-hot atom type encoding). While Torng and Altman present a more thorough biological analysis in their paper than we do here, the accuracy they report is considerably lower than what we obtained. Based on the comparisons reported here, we anticipate that models such as theirs could be improved by switching to a concentric representation. 6 Availability The spherical convolution Tensorflow code and the datasets used in this paper are available at https://github.com/deepfold. Acknowledgments This work was supported by the Villum Foundation (W.B., grant number VKR023445). 9 References A. Aurisano, A. Radovic, D. Rocco, A. Himmel, M. Messier, E. Niner, G. Pawloski, F. Psihas, A. Sousa, and P. Vahle. A convolutional neural network neutrino event classifier. Journal of Instrumentation, 11(9):P09001, 2016. J. Behler and M. Parrinello. Generalized neural-network representation of high-dimensional potential-energy surfaces. Physical Review Letters, 98(14):146401, 2007. W. Boomsma, K. V. Mardia, C. C. Taylor, J. Ferkinghoff-Borg, A. Krogh, and T. Hamelryck. A generative, probabilistic model of local protein structure. Proceedings of the National Academy of Sciences, 105(26): 8932–8937, 2008. W. Boomsma, P. Tian, J. Frellsen, J. Ferkinghoff-Borg, T. Hamelryck, K. Lindorff-Larsen, and M. Vendruscolo. Equilibrium simulations of proteins using molecular fragment replacement and NMR chemical shifts. Proceedings of the National Academy of Sciences, 111(38):13852–13857, 2014. T. Cohen and M. Welling. Group equivariant convolutional networks. In M. F. Balcan and K. Q. Weinberger, editors, Proceedings of The 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pages 2990–2999, New York, USA, 2016. T. S. Cohen, M. Geiger, J. Köhler, and M. Welling. Spherical CNNs. International Conference on Learning Representations, 2018. S. Ó. Conchúir, K. A. Barlow, R. A. Pache, N. Ollikainen, K. Kundert, M. J. O’Meara, C. A. Smith, and T. Kortemme. A web resource for standardized benchmark datasets, metrics, and Rosetta protocols for macromolecular modeling and design. PLoS ONE, 10(9):e0130433, 2015. P. Eastman, M. S. Friedrichs, J. D. Chodera, R. J. Radmer, C. M. Bruns, J. P. Ku, K. A. Beauchamp, T. J. Lane, L.-P. Wang, D. Shukla, T. Tye, M. Houston, T. Stich, C. Klein, M. R. Shirts, and V. S. Pande. OpenMM 4: a reusable, extensible, hardware independent library for high performance molecular simulation. Journal of Chemical Theory and Computation, 9(1):461–469, 2012. X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In G. Gordon, D. Dunson, and M. Dudík, editors, Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, volume 15 of Proceedings of Machine Learning Research, pages 315–323, Fort Lauderdale, FL, USA, 2011. I. Goodfellow, Y. Bengio, and A. Courville. Deep Learning. MIT Press, 2016. R. H. R. Hahnloser, R. Sarpeshkar, M. A. Mahowald, R. J. Douglas, and H. S. Seung. Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. Nature, 405:947–951, 2000. V. Hornak, R. Abel, A. Okur, B. Strockbine, A. Roitberg, and C. Simmerling. Comparison of multiple Amber force fields and development of improved protein backbone parameters. Proteins: Structure, Function, and Bioinformatics, 65(3):712–725, 2006. A. Irbäck and S. Mohanty. PROFASI: a Monte Carlo simulation package for protein folding and aggregation. Journal of Computational Chemistry, 27(13):1548–1555, 2006. D. Jasrasaria, E. O. Pyzer-Knapp, D. Rappoport, and A. Aspuru-Guzik. Space-filling curves as a novel crystal structure representation for machine learning models. arXiv, 1608.05747, 2016. W. Kabsch and C. Sander. Dictionary of protein secondary structure: pattern recognition of hydrogen-bonded and geometrical features. Biopolymers, 22(12):2577–2637, 1983. D. Kingma and J. Ba. Adam: A method for stochastic optimization. In 3th International Conference on Learning Representations, San Diego, USA, 2015. K. V. Mardia and P. E. Jupp. Directional statistics, 2009. K. Mills, M. Spanner, and I. Tamblyn. Deep learning and the Schrödinger equation. Physical Review A, 96: 042113, 2017. S. Min, B. Lee, and S. Yoon. Deep learning in bioinformatics. Briefings in Bioinformatics, 18(5):851–869, 2017. C. Ronchi, R. Iacono, and P. Paolucci. The "cubed sphere": A new method for the solution of partial differential equations in spherical geometry. Journal of Computational Physics, 124(1):93–114, 1996. 10 K. T. Schütt, F. Arbabzadah, S. Chmiela, K. R. Müller, and A. Tkatchenko. Quantum-chemical insights from deep tensor neural networks. Nature Communications, 8:13890, 2017. K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In 3th International Conference on Learning Representations, San Diego, USA, 2015. J. Smith, O. Isayev, and A. Roitberg. ANI-1: an extensible neural network potential with DFT accuracy at force field computational cost. Chemical Science, 8(4):3192–3203, 2017. W. Torng and R. B. Altman. 3D deep convolutional neural networks for amino acid environment similarity analysis. BMC Bioinformatics, 18(1):302, 2017. I. Wallach, M. Dzamba, and A. Heifets. AtomNet: a deep convolutional neural network for bioactivity prediction in structure-based drug discovery. arXiv, 1510.02855, 2015. G. Wang and R. L. Dunbrack. PISCES: a protein sequence culling server. Bioinformatics, 19(12):1589–1591, 2003. S. Wang, J. Peng, J. Ma, and J. Xu. Protein secondary structure prediction using deep convolutional neural fields. Scientific Reports, 6, 2016. J. M. Word, S. C. Lovell, J. S. Richardson, and D. C. Richardson. Asparagine and glutamine: using hydrogen atom contacts in the choice of side-chain amide orientation. Journal of Molecular Biology, 285(4):1735–1747, 1999. 11 | 2017 | 49 |
6,996 | Conservative Contextual Linear Bandits Abbas Kazerouni Stanford University abbask@stanford.edu Mohammad Ghavamzadeh DeepMind ghavamza@google.com Yasin Abbasi-Yadkori Adobe Research abbasiya@adobe.com Benjamin Van Roy Stanford University bvr@stanford.edu Abstract Safety is a desirable property that can immensely increase the applicability of learning algorithms in real-world decision-making problems. It is much easier for a company to deploy an algorithm that is safe, i.e., guaranteed to perform at least as well as a baseline. In this paper, we study the issue of safety in contextual linear bandits that have application in many different fields including personalized recommendation. We formulate a notion of safety for this class of algorithms. We develop a safe contextual linear bandit algorithm, called conservative linear UCB (CLUCB), that simultaneously minimizes its regret and satisfies the safety constraint, i.e., maintains its performance above a fixed percentage of the performance of a baseline strategy, uniformly over time. We prove an upper-bound on the regret of CLUCB and show that it can be decomposed into two terms: 1) an upper-bound for the regret of the standard linear UCB algorithm that grows with the time horizon and 2) a constant term that accounts for the loss of being conservative in order to satisfy the safety constraint. We empirically show that our algorithm is safe and validate our theoretical analysis. 1 Introduction Many problems in science and engineering can be formulated as decision-making problems under uncertainty. Although many learning algorithms have been developed to find a good policy/strategy for these problems, most of them do not provide any guarantee for the performance of their resulting policy during the initial exploratory phase. This is a major obstacle in using learning algorithms in many different fields, such as online marketing, health sciences, finance, and robotics. Therefore, developing learning algorithms with safety guarantees can immensely increase the applicability of learning in solving decision problems. A policy generated by a learning algorithm is considered to be safe, if it is guaranteed to perform at least as well as a baseline. The baseline can be either a baseline value or the performance of a baseline strategy. It is important to note that since the policy is learned from data, it is a random variable, and thus, the safety guarantees are in high probability. Safety can be studied in both offline and online scenarios. In the offline case, the algorithm learns the policy from a batch of data, usually generated by the current strategy or recent strategies of the company, and the question is whether the learned policy will perform as well as the current strategy or no worse than a baseline value, when it is deployed. This scenario has been recently studied heavily in both model-based (e.g., Petrik et al. [2016]) and model-free (e.g., Bottou et al. 2013; Thomas et al. 2015a,b; Swaminathan and Joachims 2015a,b) settings. In the model-based approach, we first use the batch of data and build a simulator that mimics the behavior of the dynamical system under study (hospital’s ER, financial market, robot), and then use this simulator to generate data and learn the policy. The main challenge here is to have guarantees on the performance of the learned policy, given the error in the simulator. This line of research is closely related to the area of robust learning and control. In the model-free approach, we learn the policy directly from the batch of data, without building a simulator. This line of research is related to off-policy evaluation and control. While the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. model-free approach is more suitable for problems in which we have access to a large batch of data, such as in online marketing, the model-based approach works better in problems in which data is harder to collect, but instead, we have good knowledge about the underlying dynamical system that allows us to build an accurate simulator. In the online scenario, the algorithm learns a policy while interacting with the real system. Although (reasonable) online algorithms will eventually learn a good or an optimal policy, there is no guarantee for their performance along the way (the performance of their intermediate policies), especially at the very beginning, when they perform a large amount of exploration. Thus, in order to guarantee safety in online algorithms, it is important to control their exploration and make it more conservative. Consider a manager that allows our learning algorithm runs together with her company’s current strategy (baseline policy), as long as it is safe, i.e., the loss incurred by letting a portion of the traffic handled by our algorithm (instead of by the baseline policy) does not exceed a certain threshold. Although we are confident that our algorithm will eventually perform at least as well as the baseline strategy, it should be able to remain alive (not terminated by the manager) long enough for this to happen. Therefore, we should make it more conservative (less exploratory) in a way not to violate the manager’s safety constraint. This setting has been studied in the multi-armed bandit (MAB) [Wu et al., 2016]. Wu et al. [2016] considered the baseline policy as a fixed arm in MAB, formulated safety using a constraint defined based on the performance of the baseline policy (mean of the baseline arm), and modified the UCB algorithm [Auer et al., 2002] to satisfy this constraint. In this paper, we study the notion of safety in contextual linear bandits, a setting that has application in many different fields including personalized recommendation. We first formulate safety in this setting, as a constraint that must hold uniformly in time, in Section 2. Our goal is to design learning algorithms that minimize regret under the constraint that at any given time, their expected sum of rewards should be above a fixed percentage of the expected sum of rewards of the baseline policy. This fixed percentage depends on the amount of risk that the manager is willing to take. In Section 3, we propose an algorithm, called conservative linear UCB (CLUCB), that satisfies the safety constraint. At each round, CLUCB plays the action suggested by the standard linear UCB (LUCB) algorithm (e.g., Dani et al. 2008; Rusmevichientong and Tsitsiklis 2010; Abbasi-Yadkori et al. 2011; Chu et al. 2011; Russo and Van Roy 2014), only if it satisfies the safety constraint for the worst choice of the parameter in the confidence set, and plays the action suggested by the baseline policy, otherwise. We prove an upper-bound for the regret of CLUCB, which can be decomposed into two terms. The first term is an upper-bound on the regret of LUCB that grows at the rate √ T log(T). The second term is constant (does not grow with the horizon T) and accounts for the loss of being conservative in order to satisfy the safety constraint. This improves over the regret bound derived in Wu et al. [2016] for the MAB setting, where the regret of being conservative grows with time. In Section 4, we show how CLUCB can be extended to the case that the reward of the baseline policy is unknown without a change in its rate of regret. Finally in Section 5, we report experimental results that show CLUCB behaves as expected in practice and validate our theoretical analysis. 2 Problem Formulation In this section, we first review the standard linear bandit setting and then introduce the conservative linear bandit formulation considered in this paper. 2.1 Linear Bandit In the linear bandit setting, at any time t, the agent is given a set of (possibly) infinitely many actions/options At, where each action a ∈At is associated with a feature vector φt a ∈Rd. At each round t, the agent selects an action at ∈At and observes a random reward yt generated as yt = ⟨θ∗, φt at⟩+ ηt, (1) where θ∗∈Rd is the unknown reward parameter, ⟨θ∗, φt at⟩= rt at is the expected reward of action at at time t, i.e., rt at = E[yt], and ηt is a random noise such that Assumption 1 Each element ηt of the noise sequence {ηt}∞ t=1 is conditionally σ-sub-Gaussian, i.e., E[eζηt | a1:t, η1:t−1] ≤exp(ζ2σ2/2), ∀ζ ∈R. The sub-Gaussian assumption implies that E[ηt | a1:t, η1:t−1] = 0 and Var[ηt | a1:t, η1:t−1] ≤σ2. 2 Note that the above formulation contains time-varying action sets and time-dependent feature vectors for each action, and thus, includes the linear contextual bandit setting. In linear contextual bandit, if we denote by xt, the state of the system at time t, the time-dependent feature vector φt a for action a will be equal to φ(xt, a), the feature vector of state-action pair (xt, a). We also make the following standard assumption on the unknown parameter θ∗and feature vectors: Assumption 2 There exist constants B, D ≥0 such that ∥θ∗∥2 ≤B, ∥φt a∥2 ≤D, and ⟨θ∗, φt a⟩∈ [0, 1], for all t and all a ∈At. We define B = θ ∈Rd : ∥θ∥2 ≤B and F = φ ∈Rd : ∥φ∥2 ≤D, ⟨θ∗, φ⟩∈[0, 1] to be the parameter space and feature space, respectively. Obviously, if the agent knows θ∗, she will choose the optimal action a∗ t = arg maxa∈At⟨θ∗, φt a⟩at each round t. Since θ∗is unknown, the agent’s goal is to maximize her cumulative expected rewards after T rounds, i.e., PT t=1⟨θ∗, φt at⟩, or equivalently, to minimize its (pseudo)-regret, i.e., RT = T X t=1 ⟨θ∗, φt a∗ t ⟩− T X t=1 ⟨θ∗, φt at⟩, (2) which is the difference between the cumulative expected rewards of the optimal and agent’s strategies. 2.2 Conservative Linear Bandit The conservative linear bandit setting is exactly the same as the linear bandit, except that there exists a baseline policy πb (e.g., the company’s current strategy) that at each round t, selects action bt ∈At and incurs the expected reward rt bt = ⟨θ∗, φt bt⟩. We assume that the expected rewards of the actions taken by the baseline policy, rt bt, are known (see Remark 1). We relax this assumption in Section 4 and extend our proposed algorithm to the case that the reward function of the baseline policy is not known in advance. Another difference between the conservative and standard linear bandit settings is the performance constraint, which is defined as follows: Definition 1 (Performance Constraint) At each round t, the difference between the performances of the baseline and the agent’s policies should remain below a pre-defined fraction α ∈(0, 1) of the baseline performance. This constraint may be written formally as ∀t ∈{1, . . . , T}, t X i=1 ri bi− t X i=1 ri ai ≤α t X i=1 ri bi or equivalently as t X i=1 ri ai ≥(1−α) t X i=1 ri bi. (3) The parameter α controls the level of conservatism of the agent. Small values show that only small losses are tolerated and the agent should be overly conservative, whereas large values indicate that the manager is willing to take risk and the agent can be more explorative. Here, given the value of α, the agent should select her actions in a way to both minimize her regret (2) and to satisfy the performance constraint (3). In the next section, we propose a linear bandit algorithm to achieve this goal with high probability. Remark 1. Since the baseline policy is often our company’s strategy, it is reasonable to assume that a large amount of data generated by this policy is available, and thus, we have an accurate estimate of its reward function. If in addition to this accurate estimate, we have access to the actual data, we can use them in our algorithms. The reason we do not use the data generated by the actions suggested by the baseline policy in constructing the confidence sets of our algorithm in Section 3 is mainly to keep the analysis simple. However, when dealing with the more general case of unknown baseline reward in Section 4, we construct the confidence sets using all available data, including those generated by the baseline policy. It is important to note that having a good estimate of the baseline reward function does not necessarily mean that we know the unknown parameter θ∗. This is because the data used for this estimate has been generated by the baseline policy, and thus, may only provide a good estimate of θ∗in a limited subspace. 3 A Conservative Linear Bandit Algorithm In this section, we propose a linear bandit algorithm, called conservative linear upper confidence bound (CLUCB), whose pseudocode is shown in Algorithm 1. CLUCB is based on the optimism in the face of uncertainty principle, and given the value of α, minimizes the regret (2) and satisfies the performance constraint (3) with high probability. At each round t, CLUCB uses the previous 3 Algorithm 1 CLUCB Input: α, B, F Initialize: S0 = ∅, z0 = 0 ∈Rd, and C1 = B for t = 1, 2, 3, · · · do Find (a′ t, eθt) ∈arg max(a,θ)∈At×Ct ⟨θ, φt a⟩ Compute Lt = minθ∈Ct ⟨θ, zt−1 + φt a′ t⟩ if Lt + P i∈Sc t−1 ri bi ≥(1 −α) Pt i=1 ri bi then Play at = a′ t and observe reward yt defined by (1) Set zt = zt−1 + φt at, St = St−1 ∪t, Sc t = Sc t−1 Given at and yt, construct the confidence set Ct+1 according to (5) else Play at = bt and observe reward yt defined by (1) Set zt = zt−1, St = St−1, Sc t = Sc t−1 ∪t, Ct+1 = Ct end if end for observations and builds a confidence set Ct that with high probability contains the unknown parameter θ∗. It then selects the optimistic action a′ t ∈arg maxa∈At maxθ∈Ct⟨θ, φt a⟩, which has the best performance among all the actions available in At, within the confidence set Ct. In order to make sure that the constraint (3) is satisfied, the algorithm plays the optimistic action a′ t, only if it satisfies the constraint for the worst choice of the parameter θ ∈Ct. To make this more precise, let St−1 be the set of rounds i < t at which CLUCB has played the optimistic action, i.e., ai = a′ i. Similarly, Sc t−1 = {1, 2, · · · , t −1} −St−1 is the set of rounds j < t at which CLUCB has followed the baseline policy, i.e., aj = bj. In order to guarantee that it does not violate constraint (3), at each round t, CLUCB plays the optimistic action, i.e., at = a′ t, only if min θ∈Ct h X i∈Sc t−1 ri bi + D θ, zt−1 z }| { X i∈St−1 φi ai E + ⟨θ, φt a′ t⟩ i ≥(1 −α) t X i=1 ri bi, and plays the conservative action, i.e., at = bt, otherwise. In the following, we describe how CLUCB constructs and updates its confidence sets Ct. 3.1 Construction of Confidence Sets CLUCB starts by the most general confidence set C1 = B and updates its confidence set only when it plays an optimistic action. This is mainly to simplify the analysis and is based on the idea that since the reward function of the baseline policy is known ahead of time, playing a baseline action does not provide any new information about the unknown parameter θ∗. However, this can be easily changed to update the confidence set after each action. In fact, this is what we do in the algorithm proposed in Section 4. We follow the approach of Abbasi-Yadkori et al. [2011] to build confidence sets for θ∗. Let St = {i1, . . . , imt} be the set of rounds up to and including round t at which CLUCB has played the optimistic action. Note that we have defined mt = |St|. For a fixed value of λ > 0, let bθt = (ΦtΦ⊺ t + λI)−1 ΦtYt, (4) be the regularized least square estimate of θ at round t, where Φt = [φi1 ai1 , . . . , φ imt aimt ] and Yt = [yi1, . . . , yimt ]⊤. For a fixed confidence parameter δ ∈(0, 1), we construct the confidence set for the next round t + 1 as Ct+1 = n θ ∈Rd : ∥θ −bθt∥Vt ≤βt+1 o , (5) where βt+1 = σ r d log 1+(mt+1)D2/λ δ + √ λB, Vt = λI + ΦtΦ⊤ t , and the weighted norm is defined as ∥x∥V = √ x⊤V x for any x ∈Rd and any positive definite V ∈Rd×d. Note that similar to the linear UCB algorithm (LUCB) in Abbasi-Yadkori et al. [2011], the sub-Gaussian parameter σ and the regularization parameter λ that appear in the definitions of βt+1 and Vt should also be given to the CLUCB algorithm as input. The following proposition (Theorem 2 in Abbasi-Yadkori et al. 2011) shows that the confidence sets constructed by (5) contain the true parameter θ∗with high probability. 4 Proposition 1 For the confidence set Ct defined by (5), we have P θ∗∈Ct, ∀t ∈N ≥1 −δ. As mentioned before, CLUCB ensures that performance constraint (3) holds for all θ ∈Ct at all rounds t. As a result, if all the confidence sets hold (i.e., contain the true parameter θ∗), CLUCB is guaranteed to satisfy performance constraint (3). Proposition 1 indicates that this happens with probability at least 1 −δ. It is worth noting that satisfying constraint (3) implies that CLUCB is at least as good as the baseline policy at all rounds. In this vein, Proposition 1 guarantees that, with probability at least 1 −δ, CLUCB performs no worse than the baseline policy at all rounds. 3.2 Regret Analysis of CLUCB In this section, we prove a regret bound for the proposed CLUCB algorithm. Let ∆t bt = rt a∗ t −rt bt be the baseline gap at round t, i.e., the difference between the expected rewards of the optimal and baseline actions at round t. This quantity shows how sub-optimal the action suggested by the baseline policy is at round t. We make the following assumption on the performance of the baseline policy πb. Assumption 3 There exist 0 ≤∆l ≤∆h and 0 < rl such that, at each round t, ∆l ≤∆t bt ≤∆h and rl ≤rt bt. (6) An obvious candidate for both ∆h and rh is 1, as all the mean rewards are confined in [0, 1]. The reward lower-bound rl ensures that the baseline policy maintains a minimum level of performance at each round. Finally, ∆l = 0 is a reasonable candidate for the lower-bound of the baseline gap. The following proposition shows that the regret of CLUCB can be decomposed into the regret of a linear UCB (LUCB) algorithm (e.g., Abbasi-Yadkori et al. 2011) and a regret caused by being conservative in order to satisfy the performance constraint (3). Proposition 2 The regret of CLUCB can be decomposed into two terms as follows: RT (CLUCB) ≤RST (LUCB) + nT ∆h, (7) where RST (LUCB) is the cumulative (pseudo)-regret of LUCB at rounds t ∈ST and nT = |Sc T | = T −mT is the number of rounds (in T rounds) at which CLUCB has played a conservative action. Proof: From the definition of regret (2), we have RT (CLUCB) = T X t=1 rt a∗ t − T X t=1 rt at = X t∈ST (rt a∗ t −rt at)+ X t∈Sc T ∆t bt z }| { (rt a∗ t −rt bt) ≤ X t∈ST (rt a∗ t −rt at)+nT ∆h. (8) The result follows from the fact that for t ∈ST , CLUCB plays the exact same actions as LUCB, and thus, the first term in (8) represents LUCB’s regret for these rounds. □ The regret bound of LUCB for the confidence set (5) can be derived from the results of AbbasiYadkori et al. [2011]. Let E be the event that θ∗∈Ct, ∀t ∈N, which according to Proposition 1 holds w.p. at least 1 −δ. The following proposition provides a bound on RST (LUCB). Since this proposition is a direct application of Thm. 3 in Abbasi-Yadkori et al. [2011], we omit its proof here. Proposition 3 On event E = {θ∗∈Ct, ∀t ∈N}, for any T ∈N, we have RST (LUCB) ≤4 s mT d log λ + mT D d × B √ λ + σ s 2 log(1 δ ) + d log 1 + mT D λd = O d log D λδ T √ T . (9) Now in order to bound the regret of CLUCB, we only need to find an upper-bound on nT , i.e., the number of times that CLUCB deviates from LUCB and selects the action suggested by the baseline policy. We prove an upper-bound on nT in Theorem 4, which is the main technical result of this section. Due to space constraint, we only provide a proof sketch for Theorem 4 in the paper and report its detailed proof in Appendix A. The proof requires several technical lemmas that have been proved in Appendix C. 5 Theorem 4 Let λ ≥max(1, D2). Then, on event E, for any horizon T ∈N, we have nT ≤1 + 114d2 (B √ λ + σ)2 αrl(∆l + αrl) " log 62d(B √ λ + σ) √ δ(∆l + αrl) !#2 . Proof Sketch: Let τ = max 1 ≤t ≤T | at ̸= a′ t be the last round that CLUCB takes an action suggested by the baseline policy. We first show that at round τ, the following holds: α τ X t=1 rt bt ≤−(mτ−1 + 1)∆l + 2βτ
φτ a′τ
V −1 τ + 2 X t∈Sτ−1 βt
φt at
V −1 t + 2βτ
φτ a′τ + X t∈Sτ−1 φt at
V −1 τ . Next, using Lemmas 7 and 8 (reported in Appendix C), and the Cauchy-Schwartz inequality, we deduce that α τ X t=1 rt bt ≤−(mτ−1 + 1)∆l + 8d(B √ λ + σ) log 2(mτ−1 + 1) δ p (mτ−1 + 1). Since rt bt ≥rl for all t, and τ = nτ−1 + mτ−1 + 1, it follows that αrlnτ−1 ≤−(mτ−1 + 1)(∆l + αrl) + 8d(B √ λ + σ) log 2(mτ−1 + 1) δ p (mτ−1 + 1). (10) Note that nτ−1 and mτ−1 appear on the LHS and RHS of (10), respectively. The key point is that the RHS is positive only for a finite number of integers mτ−1, and thus, it has a finite upper bound. Using Lemma 9 (reported and proved in Appendix C), we prove that αrlnτ−1 ≤114d2 (B √ λ + σ)2 ∆l + αrl × " log 62d(B √ λ + σ) √ δ(∆l + αrl) !#2 . Finally, the fact that nT = nτ = nτ−1 + 1 completes the proof. □ We now have all the necessary ingredients to derive a regret bound on the performance of the CLUCB algorithm. We report the regret bound of CLUCB in Theorem 5, whose proof is a direct consequence of the results of Propositions 2 and 3, and Theorem 4. Theorem 5 Let λ ≥max(1, D2). With probability at least 1 −δ, the CLUCB algorithm satisfies the performance constraint (3) for all t ∈N, and has the regret bound RT (CLUCB) = O d log DT λδ √ T + K∆h αrl , (11) where K is a constant that only depends on the parameters of the problem as K = 1 + 114d2 (B √ λ + σ)2 ∆l + αrl " log 62d(B √ λ + σ) √ δ(∆l + αrl) !#2 . Remark 2. The first term in the regret bound (11) is the regret of LUCB, which grows at the rate √ T log(T). The second term accounts for the loss incurred by being conservative in order to satisfy the performance constraint (3). Our results indicate that this loss does not grow with time (since CLUCB acts conservatively only in a finite number of rounds). This is a clear improvement over the regret bound reported in Wu et al. [2016] for the MAB setting, in which the regret of being conservative grows with time. Furthermore, the regret bound of Theorem 5 clearly indicates that CLUCB’s regret is larger for smaller values of α. This perfectly matches the intuition that the agent must be more conservative, and thus, suffers higher regret for smaller values of α. Theorem 5 also indicates that CLUCB’s regret is smaller for smaller values of ∆h, because when the baseline policy πb is close to optimal, the algorithm does not lose much by being conservative. 6 Algorithm 2 CLUCB2 Input: α, rl, B, F Initialize: n ←0, z ←0, w ←0, v ←0 and C1 ←B for t = 1, 2, 3, · · · do Let bt be the action suggested by πb at round t Find (a′ t, eθ) = arg max(a,θ)∈At×Ct ⟨θ, φt a⟩ Find Rt = maxθ∈Ct⟨θ, v + φt bt⟩& Lt = minθ∈Ct⟨θ, z + φt a′ t⟩+ α max minθ∈Ct⟨θ, w⟩, nrl if Lt ≥(1 −α)Rt then Play at = a′ t and observe yt defined by (1) Set z ←z + φt a′ t and v ←v + φt bt else Play at = bt and observe yt defined by (1) Set w = w + φt bt and n ←n + 1 end if Given at and yt, construct the confidence set Ct+1 according to (15) end for 4 Unknown Baseline Reward In this section, we consider the case where the expected rewards of the actions taken by the baseline policy, rt bt, are unknown at the beginning. We show how the CLUCB algorithm presented in Section 3 should be changed to handle this case, and present a new algorithm, called CLUCB2. We prove a regret bound for CLUCB2, which is at the same rate as that for CLUCB. This shows that the lack of knowledge about the reward function of the baseline policy does not hurt our algorithm in terms of the rate of the regret. The pseudocode of CLUCB2 is shown in Algorithm 2. The main difference with CLUCB is in the condition that should be checked at each round t to see whether we should play the optimistic action a′ t or the conservative action bt. This condition should be selected in a way that CLUCB2 satisfies constraint (3). We may rewrite (3) as X i∈St−1 ri ai + rt a′ t + α X i∈Sc t−1 ri bi ≥(1 −α) rt bt + X i∈St−1 ri bi . (12) If we lower-bound the LHS and upper-bound the RHS of (12), we obtain min θ∈Ct ⟨θ, X i∈St−1 φi ai + φt a′ t⟩+ α min θ∈Ct ⟨θ, X i∈Sc t−1 φi bi⟩≥(1 −α) max θ∈Ct ⟨θ, X i∈St−1 φi bi + φt bt⟩. (13) Since each confidence set Ct is built in a way to contain the true parameter θ∗with high probability, it is easy to see that (12) is satisfied whenever (13) is true. CLUCB2 uses both optimistic and conservative actions, and their corresponding rewards in building its confidence sets. Specifically for any t, we let Φt = [φ1 a1, φ2 a2, · · · , φt at], Yt = [y1, y2, · · · , yt]⊺, Vt = λI + Φ⊺ t Φt, and define the least-square estimate after round t as bθt = (ΦtΦ⊺ t + λI)−1 ΦtYt. (14) Given Vt and bθt, the confidence set for round t + 1 is constructed as Ct+1 = n θ ∈Ct : ∥θ −bθt∥Vt ≤βt+1 o , (15) where C1 = B and βt = σ r d log 1+tD2/λ δ + B √ λ. Similar to Proposition 1, we can easily prove that the confidence sets built by (15) contain the true parameter θ∗with high probability, i.e., P θ∗∈Ct, ∀t ∈N ≥1 −δ. Remark 3. Note that unlike the CLUCB algorithm, here we build nested confidence sets, i.e., · · · ⊆ Ct+1 ⊆Ct ⊆Ct−1 ⊆· · · , which is necessary for the proof of the algorithm. This can potentially increase the computational complexity of CLUCB2, but from a practical point of view, the confidence 7 Figure 1: Average per-step regret (over 1, 000 runs) of LUCB and CLUCB for different values of α. sets become nested automatically after sufficient data has been observed. Therefore, the nested constraint in building the confidence sets can be relaxed after sufficiently large number of rounds. The following theorem guarantees that CLUCB2 satisfies the safety constraint (3) with high probability, while its regret has the same rate as that of CLUCB and is worse than that of LUCB only up to an additive constant. Theorem 6 Let λ ≥max(1, D2) and δ ≤2/e. Then, with probability at least 1 −δ, CLUCB2 algorithm satisfies the performance constraint (3) for all t ∈N, and has the regret bound RT (CLUCB2) = O d log DT λδ √ T + K∆h α2r2 l , (16) where K is a constant that depends only on the parameters of the problem as K = 256d2(B √ λ + σ)2 " log 10d(B √ λ + σ) αrl(δ)1/4 !#2 + 1. We report the proof of Theorem 6 in Appendix B. The proof follows the same steps as that of Theorem 5, with additional non-trivial technicalities that have been highlighted there. 5 Simulation Results In this section, we provide simulation results to illustrate the performance of the proposed CLUCB algorithm. We considered a time independent action set of 100 arms each having a time independent feature vector living in R4 space. These feature vectors and the parameter θ∗are randomly drawn from N 0, I4 such that the mean reward associated to each arm is positive. The observation noise at each time step is also generated independently from N(0, 1), and the mean reward of the baseline policy at any time is taken to be the reward associated to the 10’th best action. We have taken λ = 1, δ = 0.001 and the results are averaged over 1,000 realizations. In Figure 1, we plot per-step regret (i.e., Rt t ) of LUCB and CLUCB for different values of α over a horizon T = 40, 000. Figure 1 shows that per-step regret of CLUCB remains constant at the beginning (the conservative phase). This is because during this phase, CLUCB follows the baseline policy to make sure that the performance constraint (3) is satisfied. As expected, the length of the conservative phase decreases as α is increased, since the performance constraint is relaxed for larger values of α, and hence, CLUCB starts playing optimistic actions more quickly. After this initial conservative phase, CLUCB has learned enough about the optimal action and its performance starts converging to that of LUCB. On the other hand, Figure 1 shows that per-step regret of CLUCB at the first few periods remains much lower than that of LUCB. This is because LUCB plays agnostic to the safety constraint, and thus, may select very poor actions in its initial exploration phase. In regard to this, Figure 2(a) plots the percentage of the rounds, in the first 1, 000 rounds, at which the safety constraint (3) is violated by LUCB and CLUCB for different values of α. According to this figure, 8 (a) (b) Figure 2: (a) Percentage of the rounds, in the first 1, 000 rounds, at which the safety constraint is violated by LUCB and CLUCB for different values of α, (b) Per-step regret of LUCB and CLUCB for different values of α, at round t = 40, 000. CLUCB satisfies the performance constraint for all values of α, while LUCB fails in a significant number of rounds, specially for small values of α (i.e., tight constraint). To better illustrate the effect of the performance constraint (3) on the regret of the algorithms, Figure 2(b) plots the per-step regret achieved by CLUCB at round t = 40, 000 for different values of α, as well as that for LUCB. As expected from our analysis and is shown in Figure 1, the performance of CLUCB converges to that of LUCB after an initial conservative phase. Figure 2(b) confirms that the convergence happens more quickly for larger values of α, where the constraint is more relaxed. 6 Conclusions In this paper, we studied the concept of safety in contextual linear bandits to address the challenges that arise in implementing such algorithms in practical situations such as personalized recommendation systems. Most of the existing linear bandit algorithms, such as LUCB [Abbasi-Yadkori et al., 2011], suffer from a large regret at their initial exploratory rounds. This unsafe behavior is not acceptable in many practical situations, where having a reasonable performance at any time is necessary for a learning algorithm to be considered reliable and to remain in production. To guarantee safe learning, we formulated a conservative linear bandit problem, where the performance of the learning algorithm (measured in terms of its cumulative rewards) at any time is constrained to be at least as good as a fraction of the performance of a baseline policy. We proposed a conservative version of LUCB algorithm, called CLUCB, to solve this constrained problem, and showed that it satisfies the safety constraint with high probability, while achieving a regret bound equivalent to that of LUCB up to an additive time-independent constant. We designed two versions of CLUCB that can be used depending on whether the reward function of the baseline policy is known or unknown, and showed that in each case, CLUCB acts conservatively (i.e., plays the action suggested by the baseline policy) only at a finite number of rounds, which depends on how suboptimal the baseline policy is. We reported simulation results that support our analysis and show the performance of the proposed CLUCB algorithm. 9 References Y. Abbasi-Yadkori, D. P´al, and C. Szepesv´ari. Improved algorithms for linear stochastic bandits. In Advances in Neural Information Processing Systems, pages 2312–2320, 2011. P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning Journal, 47:235–256, 2002. L. Bottou, J. Peters, J. Quinonero-Candela, D. Charles, D. Chickering, E. Portugaly, D. Ray, P. Simard, and E. Snelson. Counterfactual reasoning and learning systems: The example of computational advertising. Journal of Machine Learning Research, 14:3207–3260, 2013. W. Chu, L. Li, L. Reyzin, and R. Schapire. Contextual bandits with linear payoff functions. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pages 208–214, 2011. V. Dani, T. Hayes, and S. Kakade. Stochastic linear optimization under bandit feedback. In COLT, pages 355–366, 2008. M. Petrik, M. Ghavamzadeh, and Y. Chow. Safe policy improvement by minimizing robust baseline regret. In Advances in Neural Information Processing Systems, pages 2298–2306, 2016. P. Rusmevichientong and J. Tsitsiklis. Linearly parameterized bandits. Mathematics of Operations Research, 35(2):395–411, 2010. D. Russo and B. Van Roy. Learning to optimize via posterior sampling. Mathematics of Operations Research, 39(4):1221–1243, 2014. A. Swaminathan and T. Joachims. Batch learning from logged bandit feedback through counterfactual risk minimization. Journal of Machine Learning Research, 16:1731–1755, 2015. A. Swaminathan and T. Joachims. Counterfactual risk minimization: Learning from logged bandit feedback. In Proceedings of The 32nd International Conference on Machine Learning, 2015. P. Thomas, G. Theocharous, and M. Ghavamzadeh. High confidence off-policy evaluation. In Proceedings of the Twenty-Ninth Conference on Artificial Intelligence, 2015. P. Thomas, G. Theocharous, and M. Ghavamzadeh. High confidence policy improvement. In Proceedings of the Thirty-Second International Conference on Machine Learning, pages 2380– 2388, 2015. Y. Wu, R. Shariff, T. Lattimore, and C. Szepesv´ari. Conservative bandits. In Proceedings of The 33rd International Conference on Machine Learning, pages 1254–1262, 2016. 10 | 2017 | 490 |
6,997 | Regularized Modal Regression with Applications in Cognitive Impairment Prediction Xiaoqian Wang1, Hong Chen1, Weidong Cai2, Dinggang Shen3, Heng Huang1∗ 1 Department of Electrical and Computer Engineering, University of Pittsburgh, USA 2School of Information Technologies, University of Sydney, Australia 3 Department of Radiology and BRIC, University of North Carolina at Chapel Hill, USA xqwang1991@gmail.com,chenh@mail.hzau.edu.cn tom.cai@sydney.edu.au,dinggang_shen@med.unc.edu,heng.huang@pitt.edu Abstract Linear regression models have been successfully used to function estimation and model selection in high-dimensional data analysis. However, most existing methods are built on least squares with the mean square error (MSE) criterion, which are sensitive to outliers and their performance may be degraded for heavy-tailed noise. In this paper, we go beyond this criterion by investigating the regularized modal regression from a statistical learning viewpoint. A new regularized modal regression model is proposed for estimation and variable selection, which is robust to outliers, heavy-tailed noise, and skewed noise. On the theoretical side, we establish the approximation estimate for learning the conditional mode function, the sparsity analysis for variable selection, and the robustness characterization. On the application side, we applied our model to successfully improve the cognitive impairment prediction using the Alzheimer’s Disease Neuroimaging Initiative (ADNI) cohort data. 1 Introduction Modal regression [21, 5] has gained increasing attention recently due to its effectiveness on function estimation and robustness to outliers and heavy-tailed noise. Unlike the traditional least-square estimator pursuing the conditional mean, modal regression aims to estimate the conditional mode of output Y given the input X = x. It is well known that the conditional modes can reveal the structure of outputs and the trends of observation, which is missed by the conditional mean [29, 4]. Thus, modal regression often achieves better performance than the traditional least square regression in practical applications. There are some studies for modal regression with (semi-)parametric or nonparametric methods, such as [29, 28, 4, 6]. For parametric approaches, a parametric form is required for the global conditional mode function. Recent works in [29, 28] belong to this category, where the method in [28] is based on linear mode function assumption and the algorithm in [29] is associated with the local polynomial regression. For non-parametric approaches, the conditional mode is usually derived by maximizing a conditional density or a joint density. Typical work for this setting is established in [4], where a local modal regression is proposed based on kernel density estimation and theoretical analysis is provided to characterize asymptotic error bounds. Most of the above mentioned works consider the asymptotic theory on the conditional mode function estimation. Recently, several studies on variable selection under modal regression were also conducted in [30, 27]. These approaches addressed the problem from statistical theory viewpoint (e.g., ∗X. Wang and H. Chen made equal contributions to this paper. H. Huang is the corresponding author. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. asymptotic normality) and were implemented by modified EM algorithm. Although these studies provide us good understanding for modal regression, the following problems still remain unclear in theory and applications. Can we design new modal regression following the line of structural risk minimization? Can we provide its statistical guarantees and computing algorithm for designed model? This paper focuses on answering the above questions. To illustrate the effectiveness of our model, we looked into a practical problem, i.e., cognitive impairment prediction via neuroimaging data. As the most common cause of dementia, Alzheimer’s Disease (AD) imposes extensive and complex impact on human thinking and behavior. Accurate and automatic study of the relationship between brain structural changes and cognitive impairment plays a crucial role in early diagnosis of AD. In order to increase the diagnostic capabilities, neuroimaging provides an effective approach for clinical detection and treatment response monitoring of AD [13]. Several cognitive tests were presented to assess the individual’s cognitive level, such as Mini-Mental State Examination (MMSE) [8] and Trail Making Test (TMT) [1]. With the development of these techniques, a wide range of work employed regression models to study the correlations between neuroimaging data and cognitive measures [23, 16, 26, 25, 24]. However, existing methods use mean regression models based on the least-square estimator to predict the relationship between neuroimaging features and cognitive assessment, which may fail when the noise in the data is heavy-tailed or skewed. According to the complex data collection process [13], the assumption of symmetric noise may not be guaranteed in biomedical data. Under such a circumstance, modal regression model proves to be more appropriate due to its robustness to outliers, heavy-tailed noise, and skewed noise. We applied our method to the ADNI cohort for the association study between neuroimaging features and cognitive assessment. Experimental results illustrated the effectiveness of our model. Moreover, with sparse constraints, our model found several imaging features that have been reported to be crucial to the onset and progression of AD. The replication of these results further support the validity of our model. Our main works can be summarized as below: 1) Following the Tikhonov regularization and kernel density estimation, we develop a new Regularized Modal Regression (RMR) for estimating the conditional mode function and selecting informative variables, which can be considered as a natural extension of Lasso [22] and can be implemented efficiently by half-quadratic minimization methods. 2) Learning theory analysis is established for RMR from three aspects: approximation ability, sparsity, and robustness, which provide the theoretical foundations of the proposed approach. 3) By applying our RMR model to the ADNI cohort, we reveal interesting findings in cognitive impairment prediction of Alzheimer’s disease. 2 Regularized Modal Regression 2.1 Modal regression We consider learning problem with input space X ⊂Rp and output space Y ⊂R. Let pY |X=x be the conditional density of Y ∈Y for given X = x ∈X. In the prediction of cognitive assessment, we denote the neuroimaging data for the i-th sample as xi and the cognitive measure for the i-th sample as yi. Suppose that training samples z = {(xi, yi)}n i=1 ⊂X × Y are generated independently by: Y = f ∗(X) + ε, (1) where mode(ε|X = x) = arg max t pε|X(t|X = x) = 0 for any x ∈X. Here, pε|X, as the conditional density of ε conditioned on X, is well defined. Then, the target function of modal regression can be written as: f ∗(x) = mode(Y |X = x) = arg max t pY |X(t|X = x), ∀x ∈X. (2) To assure f ∗is well defined on X, we require that the existence and uniqueness of pY |X(t|X = x) for any given x ∈X. The relationship (2) means f ∗is the maximum of the conditional density pY |X, and also equals to maximize the joint density pX,Y [4, 29, 28]. Here, we formulate the modal regression following the dimension-insensitive statistical learning framework [7]. 2 For feasibility, we denote ρ on X × Y as the intrinsic distribution for data generated by (1), and denote ρX as the corresponding marginal distribution on X. It has been proved in Theorem 3 [6] that f ∗is the maximizer of R(f) = Z X pY |X(f(x)|X = x)dρX (x) (3) over all measurable function. Hence, we can adopt R(f) as the evaluation measure of modal regression estimator f : X →R. However, we can not get the estimator directly by maximizing this criterion since pY |X and ρX are unknown. Recently, Theorem 5.1 in [6] shows R(f) = pεf (0), where pεf is the density function of random variable εf = Y −f(X). Then, the problem of maximizing R(f) over some hypothesis spaces can be transformed to maximize the density of εf at 0. This density pεf can be estimated by nonparametric kernel density estimation. For a kernel Kσ : R × R →R+, we denote its representing function φ( u−u′ σ ) = Kσ(u, u′), which usually satisfies φ(u) = φ(−u), φ(u) ≤φ(0) for any u ∈R and R R φ(u)du = 1. Typical examples of kernel include Gaussian kernel, Epanechnikov kernel, quadratic kernel, triwight kernel, and sigmoid function. The empirical estimation of R(f) (also pϵf (0)) can be obtained by kernel density estimation, which is defined as: Rσ z(f) = 1 nσ n X i=1 Kσ(yi −f(xi), 0) = 1 nσ n X i=1 φ(yi −f(xi) σ ). Hence, the approximation of f ∗can be found by learning algorithms associated with Rσ z(f). In theory, for any f : X →R, the expectation version of Rσ z(f) is: Rσ(f) = 1 σ Z X×Y φ(y −f(x) σ )dρ(x, y). In particular, there holds R(f) −Rσ(f) →0 as σ →0 [6]. 2.2 Modal regression with coefficient-based regularization In this paper, we assume that f ∗(x) = mode(Y |X = x) = wT ∗x for some w∗∈Rp. Following the ideas of ridge regression and Lasso [22], we consider the robust linear estimator for learning the conditional mode function. Let F be a linear hypothesis space defined by: F = {f(x) = wT x : w = (w1, ..., wp) ∈Rp, x ∈X}. For any given positive tuning parameters {τj}p j=1, we denote: Ω(f) = inf n p X j=1 τj|wj|q : f(x) = wT x, q ∈[1, 2] o . Given training set z, the regularized modal regression (RMR) can be formulated as below: fz = arg max f∈F n Rσ z(f) −λΩ(f) o , (4) where regularization parameter λ > 0 is used to balance the modal regression measure and hypothesis space complexity. It is easy to deduce that fz(x) = wT z x with wz = arg max w∈Rp n 1 nσ n X i=1 φ(yi −wT xi σ ) −λ p X j=1 τj|wj|qo . (5) When τj ≡1 for 1 ≤j ≤p and q = 1, (5) can be considered as an natural extension of Lasso in [22] from learning the conditional mean function to estimating the conditional mode function. When τj ≡1 for 1 ≤j ≤p and q = 2, (5) also can be regarded as the corresponding version of ridge regression by replacing the MSE criterion with modal regression criterion. In particular, when Kσ is Gaussian kernel and τj ≡1 for 1 ≤j ≤p, (5) can be rewritten as: wz = arg max w∈Rp n 1 nσ n X i=1 exp n(yi −wT xi)2 σ2 o −λ∥w∥q q o , which is equivalent to correntropy regression under maximum correntropy criterion [19, 9, 7]. 3 2.3 Optimization algorithm We employ the half-quadratic (HQ) theory [18] in the optimization. For a convex problem min s u(s), it is equivalent to solve the following half-quadratic reformulation: min s,t Q(s, t) + v(t), where Q(s, t) is quadratic for any t ∈R and v : R →R satisfies: u(s) = min t Q(s, t) + v(t), ∀s ∈R. Such a dual potential function v can be determined via convex conjugacy as shown below. According to the convex optimization theory [20], for a closed convex function f(a), there exists a convex function g(b), such that: f(a) = max b (ab −g(b)), where g is the conjugate of f, i.e., g = f ⋆. Symmetrically, it is easy to prove f = g⋆. Theorem 1 For a closed convex function f(a) = max b (ab −g(b)), we have arg max b (ab −g(b)) = f ′(a) for any a ∈R. When Kσ is Gaussian kernel, the optimization steps can be found in [9]. Here we take Epanechnikov kernel (a.k.a., parabolic kernel) as an example to show the optimization of Problem (5) via HQ theory. The kernel-induced representing function of Epanechnikov kernel is φ(e) = 3 4(1 −e2)1[|e|≤1]. Define a closed convex function f as: f(a) = 3 4(1 −a), 0 ≤a ≤1 0, a ≥1. There exists a convex function g such that f(a) = max b (ab −g(b)) and φ(e) = f(e2) = max b (e2b − g(b)). Thus, when τj ≡1 for 1 ≤j ≤p, the optimization problem (5) can be rewritten as: max w∈Rp,b∈Rn n 1 nσ n X i=1 bi(yi −wT xi σ )2 −g(bi) −λ p X j=1 τj|wj|qo . (6) Problem (6) can be easily optimized via alternating optimization algorithm. Note that according to Theorem 1, when w is fixed, b can be updated as bi = f ′(( yi−wT xi σ )2) = −3 41[| yi−wT xi σ |≤1] for i = 1, 2, . . . , n. For the space limitation, we provide the proof of Theorem 1 and the optimization steps of RMR in the supplementary material. 3 Learning Theory Analysis This section presents the theoretical foundations of RMR from approximation ability, variable sparsity, and algorithmic robustness. Detail proofs of these results can be found in the supplementary material. 3.1 Approximation ability analysis Besides the linear requirement for the conditional mode function, we also need some basic conditions on the kernel-induced representing function φ [6, 28]. Assumption 1 The representing function φ satisfies the following conditions: 1) ∀u ∈R, φ(u) ≤ φ(0) < ∞, 2) φ is Lipschitz continuous with constant Lφ, 3) R R φ(u)du = 1 and R R u2φ(u)du < ∞. It is easy to verify that most of kernels used for density estimation satisfy the above conditions, e.g., Gaussian kernel, Epanechnikov kernel, quadratic kernel, etc. Since RMR is associated with Rσ z(f), we need to establish quantitative relationship between Rσ(f) and R(f). Recently, the modal regression calibration has been illustrated in Theorem 10 [6] under the following restrictions on the conditional density pε|X. 4 Assumption 2 The conditional density pε|X is second-order continuously differentiable and uniform bounded. Now, we present the approximation bound on R(f ∗) −R(fz). Theorem 2 Let ∥x∥ q q−1 ≤a for q ∈(1, 2] for any x ∈X and f ∗∈F. Under Assumptions 1-2, for q ∈(1, 2], by taking λ = σ2 = O(n− q 4q+3 ), we have: R(f ∗) −R(fz) ≤C log(4/δ)n− q 4q+3 with confidence at least 1 −δ. In particular, for q = 1 and ∥x∥∞≤a, choosing λ = σ2 = ( ln p n ) 1 7 , we have: R(f ∗) −R(fz) ≤C log(4/δ) ln p n 1 7 with confidence at least 1 −δ, Here C1, C2 is a constant independent of n, δ. Theorem 2 shows that the excess risk of R(f ∗) −R(fz) →0 with the polynomial decay and the estimation consistency is guaranteed as n →∞. Moreover, under Assumption 3 in [6], we can derive that fz tends to f ∗with approximation order O(n− q 4q+3 ) for q ∈(1, 2] and O( ln p n ) 1 7 ) for q = 1. Although approximation analysis has been provided for modal regression in [6, 28], both of them are limited to the empirical risk minimization. This is different from our result for regularized modal regression under structural risk minimization. 3.2 Sparsity analysis To characterize the variable selection ability of RMR, we first present the properties for nonzero component of wz. Theorem 3 Assume that φ is differentiable for any t ∈R. For j ∈{1, 2, ..., p} satisfying wzj ̸= 0, there holds: 1 nσ2 n X i=1 φ′(yi −fz(xi) σ )xij = pλτj|wzj|p−1 2 . Observe that the condition on φ holds true for Gaussian kernel, sigmoid function, and logistic function. Theorem 3 demonstrates the necessary condition for the non-zero wzj. Without loss of generality, we set S0 = {1, 2, ..., p0} as the index set of truly informative variables and denote Sz = {j : wzj ̸= 0} as the set of identified informative variables by RMR in (4). Theorem 4 Assume that ∥x∥∞≤a for any x ∈X and λτj ≥∥φ′∥∞σ for any j > p0. Then, for RMR (4) with q = 1, there holds Sz ⊂S0 for all z ∈(X × Y)n. Theorem 4 assures that RMR has the capacity to identify the truly informative variable in theory. Combining Theorem 4 and Theorem 2, we provide the asymptotic theory of RMR on estimation and model selection. 3.3 Robustness analysis To quantify the robustness of RMR, we calculate its finite sample breakdown point, which reflects the largest amount of contamination points that an estimator can tolerate before returning arbitrary values [11, 12]. Recently, this index has been used to investigate the robustness of modal linear regression [28] and kernel-based modal regression [6]. Recall that the derived weight wz defined in (5) is dependent on any given sampling set z = {(xi, yi)}n i=1. By adding m arbitrary points z′ = {(xn+j, yn+j)}m j=1 ⊂X × Y, we obtain the corrupted sample set z ∪z′. For given λ, σ, {τj}p j=1, we denote wz∪z′ be the maximizer of (5). Then, the finite sample breakdown point of wz is defined as: ϵ(wz) = min 1≤m≤n n m n + m : sup z′ ∥wz∪z′∥2 = ∞ o . 5 Theorem 5 Assume that φ(u) = φ(−u) and φ(t) →0 as t →∞. For given λ, σ, {τj}p j=1, we denote: M = 1 φ(0) n X i=1 φ( ˜yi −fz(xi)) σ ) −λσ(φ(0))−1Ω(fz). Then the finite sample breakdown point of wz in (5) is ϵ(wz) = m∗ n+m∗, where m∗≥⌈M⌉and ⌈M⌉ is the smallest integer not less than M. From Theorem 5, we know that the finite breakdown point of RMR depends on φ, σ, and the sample configuration, which is similar with re-descending M-estimator and recent analysis for modal linear regression in [28]. As illustrated in [11, 12], the finite sample breakdown point is high when the bandwidth σ only depends on the training samples. Hence, RMR can achieve satisfactory robustness when λ, τj are chosen properly and σ is determined by data-driven techniques. 4 Experimental Analysis In this section, we conduct experiments on both toy data, benchmark data as well as the ADNI cohort data to evaluate our RMR model. We compare several regression methods in the experiments, including: LSR (traditional mean regression based on the least square estimator), LSR-L2 (LSR with squared ℓ2-norm regularization, i.e., ridge regression) LSR-L1 (LSR with ℓ1-norm regularization), MedianR (median regression), HuberR (regression with huber loss), RMR-L2 (RMR with squared ℓ2-norm regularization), and RMR-L1 (RMR with ℓ1-norm regularization). For evaluation, we calculate root mean square error (RMSE) between the predicted value and ground truth in out-of-sample prediction. The RMSE value is normalized via Frobenius norm of the ground truth matrix. We employ 2-fold cross validation and report the average performance for each method. For each method, we set the hyper-parameter of the regularization term in the range of {10−4, 10−3.5, . . . , 104}. We tune the hyper-parameters via 2-fold cross validation on the training data and report the best parameter w.r.t. RMSE of each method. For RMR methods, we adopt the Epanechnikov kernel and set the bandwidth as σ = max(|y −wT x|). 4.1 Performance comparison on toy data Following the design in [28], we generate the toy data by sampling i.i.d. from the model: Y = −2 + 3X + τ(X)ϵ, where X ∼U(0, 1), σ(X) = 1 + 2X and ϵ ∼0.5N(−2, 32) + 0.5N(2, 12). We can derive that E(ϵ) = 0, Mode(ϵ) = 1.94 and Median(ϵ) = 1, hence the conditional mean regression function of the toy data is E(Y |X) = −2 + 3X, the conditional median function is Median(Y |X) = 1 + 5X, while the conditional mode is Mode(Y |X) = −0.06 + 6.88X. We consider three different number of samples: 100,200,500, and repeat the experiments 100 times for each setting. We present the RMSE in Table 1, which shows that RMR models get lower RMSE values than all comparing methods. It indicates that RMR models make better estimation of the output when the noise in data is skewed and relatively heavy-tailed. Moreover, we compare the coverage probabilities for prediction intervals centered around the predicted value from each method. We set the length of coverage intervals to be {0.1ν, 0.2ν, 0.3ν} respectively with ν = 3 being the approximate standard error of ϵ. From Table 2 we can find that RMR models provide larger coverage probabilities than the counterparts. 4.2 Performance comparison on benchmark data Here we present the comparison results on six benchmark datasets from UCI repository [15] and StatLib2, which include: slumptest, forestfire, bolts, cloud, kidney, and lupus. We summarize the results in Table 3. From the comparison we notice that RMR models tend to perform better on all datasets. Also, RMR-L1 obtains lower RMSE value since the RMR-L1 model is more robust with the ℓ1-norm regularization term. 2http://lib.stat.cmu.edu/datasets/ 6 Table 1: Average RMSE and standard deviation with different number (n) of toy samples. n=100 n=200 n=500 LSR 0.9687±0.0699 0.9477±0.0294 0.9495±0.0114 LSR-L2 0.9671±0.0685 0.9469±0.0284 0.9495±0.0114 LSR-L1 0.9672±0.0685 0.9473±0.0288 0.9495±0.0114 MedianR 0.9944±0.0806 0.9568±0.0350 0.9542±0.0120 HuberR 0.9725±0.0681 0.9485±0.0296 0.9502±0.0116 RMR-L2 0.9663±0.0683 0.9466±0.0282 0.9493±0.0114 RMR-L1 0.9662±0.0679 0.9465±0.0281 0.9492±0.0114 Table 2: Average coverage possibilities and standard deviation on toy data. n=100 n=200 n=500 0.1ν LSR 0.0730±0.0247 0.0702±0.0166 0.0702±0.0106 LSR-L2 0.0753±0.0247 0.0731±0.0155 0.0709±0.0108 LSR-L1 0.0747±0.0246 0.0719±0.0161 0.0706±0.0106 MedianR 0.0563±0.0255 0.0626±0.0124 0.0654±0.0097 HuberR 0.0710±0.0258 0.0698±0.0160 0.0694±0.0101 RMR-L2 0.0760±0.0254 0.0740±0.0161 0.0719±0.0111 RMR-L1 0.0760±0.0255 0.0742±0.0156 0.0720±0.0111 0.2ν LSR 0.1313±0.0338 0.1450±0.0255 0.1430±0.0193 LSR-L2 0.1337±0.0334 0.1461±0.0251 0.1429±0.0196 LSR-L1 0.1337±0.0337 0.1458±0.0258 0.1430±0.0193 MedianR 0.1087±0.0351 0.1331±0.0239 0.1377±0.0182 HuberR 0.1237±0.0347 0.1442±0.0257 0.1421±0.0188 RMR-L2 0.1340±0.0336 0.1477±0.0256 0.1441±0.0199 RMR-L1 0.1343±0.0340 0.1481±0.0247 0.1441±0.0198 0.3ν LSR 0.1923±0.0402 0.2142±0.0342 0.2150±0.0229 LSR-L2 0.1940±0.0415 0.2165±0.0331 0.2156±0.0222 LSR-L1 0.1940±0.0415 0.2153±0.0334 0.2153±0.0226 MedianR 0.1750±0.0414 0.2031±0.0299 0.2095±0.0233 HuberR 0.1873±0.0389 0.2132±0.0333 0.2144±0.0224 RMR-L2 0.1943±0.0420 0.2179±0.0327 0.2168±0.0220 RMR-L1 0.1950±0.0406 0.2177±0.0323 0.2167±0.0219 Table 3: Average RMSE and standard deviation on benchmark data. slumptest forestfire bolts cloud kidney lupus LSR 0.2689±0.0295 0.9986±0.0874 0.4865±0.0607 0.6178±0.0190 0.5077±0.0264 0.8646±0.3703 LSR-L2 0.2616±0.0266 0.9822±0.0064 0.4687±0.0137 0.5782±0.0029 0.5106±0.0219 0.8338±0.3282 LSR-L1 0.2571±0.0277 0.9822±0.0079 0.4713±0.0172 0.5802±0.0043 0.5196±0.0089 0.8408±0.3366 MedianR 0.2810±0.0024 0.9964±0.0050 0.4436±0.0232 0.6457±0.0301 0.5432±0.0160 1.2274±0.6979 HuberR 0.2669±0.0268 0.9874±0.0299 0.4841±0.0661 0.6178±0.0190 0.5447±0.0270 0.9198±0.4226 RMR-L2 0.2538±0.0185 0.9817±0.0093 0.4782±0.0107 0.5702±0.0131 0.4871±0.0578 0.8071±0.3053 RMR-L1 0.2517±0.0240 0.9802±0.0198 0.3298±0.1313 0.5663±0.0305 0.4989±0.0398 0.7885±0.2910 7 Table 4: Average RMSE and standard deviation on the ADNI data. Fluency ADAS TRAILS LSR 0.3856±0.0034 0.4397±0.0112 0.6798±0.0538 LSR-L2 0.3269±0.0069 0.4116±0.0208 0.5443±0.0127 LSR-L1 0.3295±0.0035 0.4121±0.0100 0.5476±0.0115 MedianR 0.4164±0.0291 0.4700±0.0151 0.6702±0.1184 HuberR 0.3856±0.0034 0.4383±0.0133 0.6621±0.0789 RMR-L2 0.3256±0.0049 0.4105±0.0216 0.5342±0.0186 RMR-L1 0.3269±0.0057 0.4029±0.0234 0.5423±0.0123 4.3 Performance comparison on the ADNI cohort data Now we look into a practical problem in Alzheimer’s disease, i.e., prediction of cognitive scores via neuroimaging features. Data used in this article were obtained from the ADNI database (adni. loni.usc.edu). We extract 93 regions of interest (ROIs) as neuroimaging features and use cognitive scores from three tests: Fluency Test, Alzheimer’s Disease Assessment Scale (ADAS) and Trail making test (TRAILS). 795 sample subjects were involved in our study, including 180 AD samples, 390 MCI samples and 225 normal control (NC) samples. Detailed data description can be found in the supplementary material. Our goal is to construct an appropriate model to predict cognitive performance given neuroimaging data. Meanwhile, we expect the model to illustrate the importance of different features in the prediction, which is fundamental to understanding the role of each imaging marker in the study of AD. From Table 4, we find that RMR models always perform equal or better than the comparing methods, which verifies that RMR is more appropriate to learn the association between neuroimaging markers and cognitive performance. We can notice that RMR-L2 always performs better than LSR-L2, and RMR-L1 outperforms LSR-L1. This is because the symmetric noise assumption in least square models may not be guaranteed on the ADNI cohort. Compared with HuberR, our RMR model is shown to be less sensitive to outliers. Moreover, from the comparison between MedianR and RMR models, we can infer that conditional mode is more suitable than conditional median for the prediction of cognitive scores. RMR-L1 imposes sparse constraints on the learnt weight matrix, which naturally achieves the goal of feature selection in the association study. Here we take TRAILS cognitive assessment as an example and look into the important neuroimaging features in the prediction. From the heat map and brain map in Fig. 1 and 2, we obtain several interesting findings. In the prediction, temporal lobe white matter has been picked out as a predominant feature. [10, 2] reported decreased fractional anisotropy (FA) and increased radial diffusivity (DR) in the white matter of the temporal lobe among AD and Mild Cognitive Impairment (MCI) subjects. [10] also revealed the correlation between temporal lobe FA and episodic memory, which may account for the influence of temporal lobe to TMT results. Besides, there is evidence in [17] supporting the association between left temporal lobe and the working memory component involving letters and numbers in TMT. Moreover, angular gyrus indicates high correlation with TRAILS scores in our analysis. Previous research has revealed that angular gyrus share many clinical features with AD. [14] presented structural MRI findings showing more left anular gyrus in MCI converters than non-converters, which pointed out the role of atrophy of structures like angular gyrus in the progression of dementia. [3] showed evidence for the role of angular gyrus in orienting spatial attention, which serves as a key factor in TMT results. The replication of these results supports the effectiveness of our model. 5 Conclusion This paper proposes a new regularized modal regression and establishes its theoretical foundations on approximation ability, sparsity, and robustness. These characterizations fill in the theoretical gaps for modal regression under Tikhonov regularization. Empirical results verify the competitive performance of the proposed approach on simulated data, benchmark data and real biomedical data. 8 Figure 1: Heatmap showing the weights of each neuroimaging feature via RMR-L1 model for the prediction of TRAILS cognitive measures. We draw two matrices, where the upper figure is for the left hemisphere and the lower figure for the right hemisphere. Imaging markers (columns) with larger weights indicate higher correlation with corresponding cognitive measure in the prediction. Figure 2: Cortical maps of ROIs identified in RMR-L1 model for the prediction of TRAILS cognitive measures. The brain maps show one slice of multi-view. The three maps correspond to three different cognitive measures in TRAILS cognitive test, respectively. With the sparsity property of our model, we identified several biological meaningful neuroimaging markers, showing the potential to enhance the understanding of onset and progression of AD. 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. Hong Chen was partially supported by National Natural Science Foundation of China (NSFC) 11671161. We are grateful to the anonymous NIPS reviewers for the insightful comments. 9 References [1] S. G. Armitage. An analysis of certain psychological tests used for the evaluation of brain injury. Psychol. Monogr., 60(1):1–48, 1946. [2] M. Bozzali, A. Falini, M. Franceschi, M. Cercignani, M. Zuffi, G. Scotti, G. Comi, and M. Filippi. White matter damage in alzheimer’s disease assessed in vivo using diffusion tensor magnetic resonance imaging. J. Neurol. Neurosurg. Psychiatry, 72(6):742–746, 2002. [3] C. D. Chambers, J. M. Payne, M. G. Stokes, and J. B. Mattingley. Fast and slow parietal pathways mediate spatial attention. Nat. Neurosci., 7(3):217–218, 2004. [4] Y.-C. Chen, C. R. Genovese, R. J. Tibshirani, and L. Wasserman. Nonparametric modal regression. Ann. Statist., 44(2):489–514, 2016. [5] G. Collomb, W. Härdle, and S. Hassani. A note on prediction via estimation of the conditional mode function. J. Stat. Plan. Infer., 15:227–236, 1987. [6] Y. Feng, J. Fan, and J. A. Suykens. A statistical learning approach to modal regression. arXiv:1702.05960, 2017. [7] Y. Feng, X. Huang, L. Shi, Y. Yang, and J. A. Suykens. Learning with the maximum correntropy criterion induced losses for regression. J. Mach. Learn. Res., 16:993–1034, 2015. [8] M. F. Folstein, S. E. Folstein, and P. R. McHugh. “mini-mental state”: a practical method for grading the cognitive state of patients for the clinician. J. Psychiatr. Res., 12(3):189–198, 1975. [9] R. He, W.-S. Zheng, and B.-G. Hu. Maximum correntropy criterion for robust face recognition. IEEE Trans. Pattern. Anal. Mach. Intell., 33(8):1561–1576, 2011. [10] J. Huang, R. Friedland, and A. Auchus. Diffusion tensor imaging of normal-appearing white matter in mild cognitive impairment and early alzheimer disease: preliminary evidence of axonal degeneration in the temporal lobe. AJNR Am. J. Neuroradiol., 28(10):1943–1948, 2007. [11] P. J. Huber. Robust statistics. John Wiley & Sons, 1981. [12] P. J. Huber. Finite sample breakdown of m-and p-estimators. Ann. Statist., 12(1):119–126, 1984. [13] C. R. Jack, M. A. Bernstein, N. C. Fox, P. Thompson, G. Alexander, D. Harvey, B. Borowski, P. J. Britson, J. L Whitwell, C. Ward, et al. The alzheimer’s disease neuroimaging initiative (adni): Mri methods. J. Magn. Reson. Imaging, 27(4):685–691, 2008. [14] G. Karas, J. Sluimer, R. Goekoop, W. Van Der Flier, S. Rombouts, H. Vrenken, P. Scheltens, N. Fox, and F. Barkhof. Amnestic mild cognitive impairment: structural mr imaging findings predictive of conversion to alzheimer disease. AJNR Am. J. Neuroradiol., 29(5):944–949, 2008. [15] M. Lichman. UCI machine learning repository, 2013. [16] E. Moradi, I. Hallikainen, T. Hänninen, J. Tohka, A. D. N. Initiative, et al. Rey’s auditory verbal learning test scores can be predicted from whole brainmri in alzheimer’s disease. Neuroimage Clin., 13:415–427, 2017. [17] J. Nickel, H. Jokeit, G. Wunderlich, A. Ebner, O. W. Witte, and R. J. Seitz. Gender-specific differences of hypometabolism in mtle: Implication for cognitive impairments. Epilepsia, 44(12):1551–1561, 2003. [18] M. Nikolova and M. K. Ng. Analysis of half-quadratic minimization methods for signal and image recovery. SIAM J. Sci. Comput., 27(3):937–966, 2005. [19] J. C. Principe. Information theoretic learning: Renyi’s entropy and kernel perspectives. Springer, New York, 2010. [20] R. T. Rockafellar. Convex Analysis. Princeton, NJ, USA: Princeton Univ. Press, 1970. 10 [21] T. W. Sager and R. A. Thisted. Maximum likelihood estimation of isotonic modal regression. Ann. Statist., 10(3):690–707, 1982. [22] R. Tibshirani. Regression shrinkage and selection via the lasso. J. Royal. Statist. Soc B., 58(1):267–288, 1996. [23] H. Wang, F. Nie, H. Huang, S. Risacher, C. Ding, A. J. Saykin, L. Shen, et al. Sparse multi-task regression and feature selection to identify brain imaging predictors for memory performance. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 557–562. IEEE, 2011. [24] H. Wang, F. Nie, H. Huang, S. Risacher, A. J. Saykin, and L. Shen. Joint classification and regression for identifying ad-sensitive and cognition-relevant imaging biomarkers. The 14th International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI 2011), pages 115–123. [25] H. Wang, F. Nie, H. Huang, J. Yan, S. Kim, S. Risacher, A. Saykin, and L. Shen. High-order multi-task feature learning to identify longitudinal phenotypic markers for alzheimer disease progression prediction. Neural Information Processing Systems Conference (NIPS 2012), pages 1286–1294. [26] X. Wang, D. Shen, and H. Huang. Prediction of memory impairment with mri data: A longitudinal study of alzheimer’s disease. 19th International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI 2016), pages 273–281. [27] H. Yang and J. Yang. A robust and efficient estimation and variable selection method for partially linear single-index models. J. Multivariate Anal., 129:227–242, 2014. [28] W. Yao and L. Li. A new regression model: modal linear regression. Scandinavian J. Statistics, 41(3):656–671, 2014. [29] W. Yao, B. G. Lindsay, and R. Li. Local modal regression. J. Nonparametric Stat., 24(3):647– 663, 2012. [30] W. Zhao, R. Zhang, J. Liu, and Y. Lv. Robust and efficient variable selection for semiparametric partially linear varying coefficient model based on modal regression. Ann. I. Stat. Math., 66(1):165–191, 2014. 11 | 2017 | 491 |
6,998 | Adversarial Ranking for Language Generation Kevin Lin∗ University of Washington kvlin@uw.edu Dianqi Li∗ University of Washington dianqili@uw.edu Xiaodong He Microsoft Research xiaohe@microsoft.com Zhengyou Zhang Microsoft Research zhang@microsoft.com Ming-Ting Sun University of Washington mts@uw.edu Abstract Generative adversarial networks (GANs) have great successes on synthesizing data. However, the existing GANs restrict the discriminator to be a binary classifier, and thus limit their learning capacity for tasks that need to synthesize output with rich structures such as natural language descriptions. In this paper, we propose a novel generative adversarial network, RankGAN, for generating high-quality language descriptions. Rather than training the discriminator to learn and assign absolute binary predicate for individual data sample, the proposed RankGAN is able to analyze and rank a collection of human-written and machine-written sentences by giving a reference group. By viewing a set of data samples collectively and evaluating their quality through relative ranking scores, the discriminator is able to make better assessment which in turn helps to learn a better generator. The proposed RankGAN is optimized through the policy gradient technique. Experimental results on multiple public datasets clearly demonstrate the effectiveness of the proposed approach. 1 Introduction Language generation plays an important role in natural language processing, which is essential to many applications such as machine translation [1], image captioning [6], and dialogue systems [26]. Recent studies [10, 11, 29, 33] show that the recurrent neural networks (RNNs) and the long shortterm memory networks (LSTMs) can achieve impressive performances for the task of language generation. Evaluation metrics such as BLEU [22], METEOR [2], and CIDEr [32] are reported in the literature. Generative adversarial networks (GANs) have drawn great attentions since Goodfellow et al. [8] introduced the framework for generating the synthetic data that is similar to the real one. The main idea behind GANs is to have two neural network models, the discriminator and the generator, competing against each other during learning. The discriminator aims to distinguish the synthetic from the real data, while the generator is trained to confuse the discriminator by generating high quality synthetic data. During learning, the gradient of the training loss from the discriminator is then used as the guidance for updating the parameters of the generator. Since then, GANs achieve great performance in computer vision tasks such as image synthesis [5, 14, 17, 24, 27]. Their successes are mainly attributed to training the discriminator to estimate the statistical properties of the continuous real-valued data (e.g., pixel values). ∗The authors contributed equally to this work. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. The adversarial learning framework provides a possible way to synthesize language descriptions in high quality. However, GANs have limited progress with natural language processing. Primarily, the GANs have difficulties in dealing with discrete data (e.g., text sequences [3]). In natural languages processing, the text sequences are evaluated as the discrete tokens whose values are non-differentiable. Therefore, the optimization of GANs is challenging. Secondly, most of the existing GANs assume the output of the discriminator to be a binary predicate indicating whether the given sentence is written by human or machine [4, 16, 18, 34, 35]. For a large variety of natural language expressions, this binary predication is too restrictive, since the diversity and richness inside the sentences are constrained by the degenerated distribution due to binary classification. In this paper, we propose a novel adversarial learning framework, RankGAN, for generating highquality language descriptions. RankGAN learns the model from the relative ranking information between the machine-written and the human-written sentences in an adversarial framework. In the proposed RankGAN, we relax the training of the discriminator to a learning-to-rank optimization problem. Specifically, the proposed new adversarial network consists of two neural network models, a generator and a ranker. As opposed to performing a binary classification task, we propose to train the ranker to rank the machine-written sentences lower than human-written sentences with respect to a reference sentence which is human-written. Accordingly, we train the generator to synthesize sentences which confuse the ranker so that machine-written sentences are ranked higher than human-written sentences in regard to the reference. During learning, we adopt the policy gradient technique [31] to overcome the non-differentiable problem. Consequently, by viewing a set of data samples collectively and evaluating their quality through relative ranking, the discriminator is able to make better assessment of the quality of the samples, which in turn helps the generator to learn better. Our method is suitable for language learning in comparison to conventional GANs. Experimental results clearly demonstrate that our proposed method outperforms the state-of-the-art methods. 2 Related works GANs: Recently, GANs [8] have been widely explored due to its nature of unsupervised deep learning. Though GANs achieve great successes on computer vision applications [5, 14, 17, 24, 27], there are only a few progresses in natural language processing because the discrete sequences are not differentiable. To tackle the non-differentiable problem, SeqGAN [35] addresses this issue by the policy gradient inspired from the reinforcement learning [31]. The approach considers each word selection in the sentence as an action, and computes the reward of the sequence with the Monte Carlo (MC) search. Their method back-propagates the reward from the discriminator, and encourages the generator to create human-like language sentences. Li et al. [18] apply GANs with the policy gradient method to dialogue generation. They train a Seq2Seq model as the generator, and build the discriminator using a hierarchical encoder followed by a 2-way softmax function. Dai et al. [4] show that it is possible to enhance the diversity of the generated image captions with conditional GANs. Yang et al. [34] further prove that training a convolutional neural network (CNN) as a discriminator yields better performance than that of the recurrent neural network (RNN) for the task of machine translation (MT). Among the works mentioned above, SeqGAN [35] is the most relevant study to our proposed method. The major difference between SeqGAN [35] and our proposed model is that we replace the regression based discriminator with a novel ranker, and we formulate a new learning objective function in the adversarial learning framework. In this condition, the rewards for training our model are not limited to binary regression, but encoded with relative ranking information. Learning to rank: Learning to rank plays an essential role in Information Retrieval (IR) [21]. The ranking technique has been proven effective for searching documents [12] and images [23]. Given a reference, the desired information (such as click-through logs [15]) is incorporated into the ranking function which aims to encourage the relevant documents to be returned as early as possible. While the goal of previous works is to retrieve relevant documents, our proposed model takes the ranking scores as the rewards to learn the language generator. Our proposed RankGAN is one of the first generative adversarial network which learns by relative ranking information. 2 Figure 1: An illustration of the proposed RankGAN. H denotes the sentence sampled from the human-written sentences. G is the sentence generated by the generator Gθ. The inputs of the ranker Rφ consist of one synthetic sequence and multiple human-written sentences. Given the reference sentence U which is written by human, we rank the input sentences according to the relative scores. In this figure, it is illustrated that the generator tries to fool the ranker and let the synthetic sentence to be ranked at the top with respect to the reference sentence. 3 Method 3.1 Overall architecture In conventional GANs [8], the discriminator with multilayer perceptrons outputs a binary probability distribution to suggest whether the unknown sequences come from the real data rather than the data synthesized by a generator. In contrast to conventional GANs, RankGAN consists of a sequence generator G and a ranker R, where the R can endow a relative rank among the sequences when given a reference. As illustrated in Figure 1, the learning objective of G is to produce a synthetic sentence that receives higher ranking score than those drawn from real data. However, the goal of R is to rank the synthetic sentence lower than human-written sentences. Thus, this can be treated as G and R play a minimax game with the objective function L: min θ max φ L(Gθ, Rφ) = E s∼Ph log Rφ(s|U, C−) + E s∼Gθ log(1 −Rφ(s|U, C+)) (1) where θ and φ are the variable parameters in G and R, respectively. The E is the expectation operator, and Ph is the real data from human-written sentences. s ∼Ph and s ∼Gθ denote that s is from human-written sentences and synthesized sentences, respectively. The U is the reference set used for estimating relative ranks, and C+, C−are the comparison set with regard to different input sentences s. When the input sentence s is the real data, C−is pre-sampled from generated data; If the input sentence s is the synthetic data, the C+ is pre-sampled from human-written data. The forms of Gθ and Rφ can be achieved in many ways. In this paper, we design the generative model with the long short-term memory networks (LSTMs) [11]. A LSTM iteratively takes the embedded features of the current token wt plus the information in the hidden state ht−1 and the cell state ct−1 from previous stages, and updates the current states ht and ct. Additionally, the subsequent word wt+1 is conditionally sampled subjects to the probability distribution p(wt+1|ht) which is determined by the value of the current hidden state ht. Benefiting from the capacity of LSTMs, our generative model can conserve long-term gradient information and produce more delicate word sequences s = (w0, w1, w2, ..., wT ), where T is the sequence length. Recent studies show that the convolutional neural network can achieve high performance for machine translation [7, 34] and text classification [36]. The proposed ranker R, which shares the similar convolutional architecture, first maps concatenated sequence matrices into the embedded feature vectors ys = F(s) through a series of nonlinear functions F. Then, the ranking score will be calculated for the sequence features ys with the reference feature yu which is extracted by R in advance. 3 3.2 Rank score More disparities between sentences can be observed by contrasts. Inspired by this, unlike the conventional GANs, our architecture possesses a novel comparison system that evaluates the relative ranking scores among sentences. Following the ranking steps commonly used in Web search [12], the relevance score of the input sequence s given a reference u is measured as: α(s|u) = cosine(ys, yu) = ys · yu ∥ys∥∥yu∥ (2) where the yu and ys are the embedded feature vectors of the reference and the input sequence, respectively. ∥·∥denotes the norm operator. Then, a softmax-like formula is used to compute the ranking score for a certain sequence s given a comparison set C: P(s|u, C) = exp(γα(s|u)) P s′∈C′ exp(γα(s ′|u)) (3) The parameter γ, whose value is set empirically during experiments, shares the similar idea with the Boltzmann exploration [30] method in reinforcement learning. Lower γ results in all sentences to be nearly equiprobable, while higher γ increases the biases toward the sentence with the greater score. The set C ′ = C ∪{s} denotes the set of input sentences to be ranked. The collective ranking score for an input sentence is an expectation of its scores given different references sampled across the reference space. During learning, we randomly sample a set of references from human-written sentences to construct the reference set U. Meanwhile, the comparison set C will be constructed according to the type of the input sentence s, i.e., C is sampled from the human-written set if s is a synthetic sentence produced by G, and vice versa. With the above setting, the expected log ranking score computed for the input sentence s can be derived by: log Rφ(s|U, C) = E u∈U log [P(s|u, C)] (4) Here, s is the input sentence. It is either human-written or produced by Gθ. Accordingly, the comparison set C is C+ if s is generated by machine, and vice versa. Given the reference set and the comparison set, we are able to compute the rank scores indicating the relative ranks for the complete sentences. The ranking scores will be used for the objective functions of generator Gθ and ranker Rφ. 3.3 Training In conventional settings, GANs are designed for generating real-valued image data and thus the generator Gθ consists of a series of differential functions with continuous parameters guided by the objective function from discriminator Dφ [8]. Unfortunately, the synthetic data in the text generation task is based on discrete symbols, which are hard to update through common back-propagation. To solve this issue, we adopt the Policy Gradient method [31], which has been widely used in reinforcement learning. Suppose the vocabulary set is V , at time step t, the previous tokens generated in the sequence are (w0, w1, ..., wt−1), where all tokens wi ∈V . When compared to the typical reinforcement learning algorithms, the existing sequence s1:t−1 = (w0, w1, ..., wt−1) is the current state, the next token wt that selected in the next step is an action sampling from the policy πθ(wt|s1:t−1). Since we use G to generate the next token, the policy πθ equals to p(wt|s1:t−1) which mentioned previously, and θ is the parameter set in generator G. Once the generator reaches the end of one sequence (i.e., s = s1:T ), it receives a ranking reward R(s|U, C) according to the comparison set C and its related reference set U. Note that in reinforcement learning, the current reward is compromised by the rewards from intermediate states and future states. However, in text generation, the generator Gθ obtains the reward if and only if one sequence has been completely generated, which means no intermediate reward is gained before the sequence hits the end symbol. To relieve this problem, we utilize the Monte Carlo rollouts 4 methods [4, 35] to simulate intermediate rewards when a sequence is incomplete. Then, the expected future reward V for partial sequences can be computed by: Vθ,φ(s1:t−1, U) = E sr∼Gθ log Rφ(sr|U, C+, s1:t−1) (5) Here, sr represents the complete sentence sampled by rollout methods with the given starter sequence s1:t−1. To be more specific, the beginning tokens (w0, w1, ..., wt−1) are fixed and the rest tokens are consecutively sampled by Gθ until the last token wT is generated. We denote this as the “path” generated by the current policy. We keep sampling n different paths with the corresponding ranking scores. Then, the average ranking score will be used to approximate the expected future reward for the current partial sequence. With the feasible intermediate rewards, we can finalize the objective function for complete sentences. Refer to the proof in [31], the gradient of the objective function for generator G can be formulated as: ∇θLθ(s0) = E s1:T ∼Gθ " T X t=1 X wt∈V ∇θπθ(wt|s1:t−1)Vθ,φ(s1:t, U) # (6) where ∇θ is the partial differential operator. The start state s0 is the first generated token w0. Es1:T ∼Gθ is the mean over all sampled complete sentences based on current generator’s parameter θ within one minibatch. Note that we only compute the partial derivatives for θ, as the Rφ is fixed during the training of generator. Importantly, different from the policy gradients methods in other works [4, 20, 35], our method replaces the simple binary outputs with a ranking system based on multiple sentences, which can better reflect the quality of the imitate sentences and facilitate effective training of the generator G. To train the ranker’s parameter set φ, we can fix the parameters in θ and maximize the objective equation (1). In practice, however, it has been found that the network model learns better by minimizing log(Rφ(s|U, C+)) instead of maximizing log(1 −Rφ(s|U, C+)), where s ∼Gθ. This is similar to the finding in [25]. Hence, during the training of Rφ, we maximize the following ranking objective function: Lφ = E s∼Ph log Rφ(s|U, C−) − E s∼Gθ log Rφ(s|U, C+) (7) It is worthwhile to note that when the evaluating data comes from the human-written sentences, the comparison set C−is sampled from the generated sentences through Gθ; In contrast, if the estimating data belongs to the synthetic sentences, C+ consists of human-written sentences. We found empirically that this gives more stable training. 3.4 Discussion Note that the proposed RankGAN has a Nash Equilibrium when the generator Gθ simulates the humanwritten sentences distribution Ph, and the ranker Rφ cannot correctly estimate rank between the synthetic sentences and the human-written sentences. However, as also discussed in the literature [8, 9], it is still an open problem how a non-Bernoulli GAN converges to such an equilibrium. In a sense, replacing the absolute binary predicates with the ranking scores based on multiple sentences can relieve the gradient vanishing problem and benefit the training process. In the following experiment section, we observe that the training converges on four different datasets, and leads to a better performance compared to previous state-of-the-arts. 4 Experimental results Following the evaluation protocol in [35], we first carry out experiments on the data and simulator proposed in [35]. Then, we compare the performance of RankGAN with other state-of-the-art methods on multiple public language datasets including Chinese poems [37], COCO captions [19], and Shakespear’s plays [28]. 5 Table 1: The performance comparison of different methods on the synthetic data [35] in terms of the negative log-likelihood (NLL) scores. Method MLE PG-BLEU SeqGAN RankGAN NLL 9.038 8.946 8.736 8.247 0 50 100 150 200 250 Epochs 8.25 8.50 8.75 9.00 9.25 9.50 9.75 10.00 10.25 Nll Loss Learning Curve RankGAN SeqGAN MLE PG-BLEU Figure 2: Learning curves of different methods on the simulation of synthetic data with respect to different training epochs. Note that the vertical dashed line indicates the end of the pre-training of PG-BLEU, SeqGAN and RankGAN. 4.1 Simulation on synthetic data We first conduct the test on the dataset proposed in [35]. The synthetic data2 is a set of sequential tokens which can be seen as the simulated data comparing to the real-word language data. We conduct this simulation to validate that the proposed method is able to capture the dependency of the sequential tokens. In the simulation, we firstly collect 10, 000 sequential data generated by the oracle model (or true model) as the training set. Note that the oracle model we used is a random initialized LSTM which is publicly available2. During learning, we randomly select one training sentence and one generated sentence from RankGAN to form the input set C ′. Then, given a reference sample which is also randomly selected from the training set, we compute the ranking score and optimize the proposed objective function. Note that the sentence length of the training data is fixed to 20 for simplicity. Following the evaluation protocol in [35], we evaluate the machine-written sentences by stimulating the Turing test. In the synthetic data experiment, the oracle model, which plays the role as the human, generates the “human-written” sentences following its intrinsic data distribution Po. We assume these sentences are the ground truth sentences used for training, thus each model should learn and imitate the sentences from Po. At the test stage, obviously, the generated sentences from each model will be evaluated by the original oracle model. Following this, we take the sentences generated by RankGAN as the input of the oracle model, and estimate the average negative log-likelihood (NLL) [13]. The lower the NLL score is, the higher probability the generated sentence will pass the Turing test. We compare our approach with the state-of-the-art methods including maximum likelihood estimation (MLE), policy gradient with BLEU (PG-BLEU), and SeqGAN [35]. The PG-BLEU computes the BLEU score to measure the similarity between the generated sentence and the human-written 2The synthetic data and the oracle model (LSTM model) are publicly available at https://github.com/LantaoYu/SeqGAN 6 Table 2: The performance comparison of different methods on the Chinese poem generation in terms of the BLEU scores and human evaluation scores. Method BLEU-2 MLE 0.667 SeqGAN 0.738 RankGAN 0.812 Method Human score SeqGAN 3.58 RankGAN 4.52 Human-written 6.69 sentences, then takes the BLEU score as the reward to update the generator with policy gradient. Because PG-BLEU also learns the similarity information during training, it can be seen as a baseline comparing to our approach. It’s noteworthy that while the PG-BLEU grasps the similarities depend on the n-grams matching from the token-level among sentences, RankGAN explores the ranking connections inside the embedded features of sentences. These two methods are fundamentally different. Table 1 shows the performance comparison of RankGAN and the other methods. It can be seen that the proposed RankGAN performs more favourably against the compared methods. Figure 2 shows the learning curves of different approaches with respect to different training epochs. While MLE, PG-BLEU and SeqGAN tend to converge after 200 training epochs, the proposed RankGAN consistently improves the language generator and achieves relatively lower NLL score. The results suggest that the proposed ranking objective, which relaxes the binary restriction of the discriminator, is able to learn effective language generator. It is worth noting that the proposed RankGAN achieves better performance than that of PG-BLEU. This indicates employing the ranking information as the reward is more informative than making use of the BLEU score that stands on token-level similarities. In our experiments, we noticed that the results are not sensitive to the size of comparison set and reference set. The learning curves converge to similar results with different reference sizes and comparison sizes. However, learning with the large reference size and comparison set could potentially increase the computational cost. Conventional GANs employ a binary classifier to distinguish the human-written and the machinecreated sentences. Though effective, it is also very restrictive for tasks like natural language generation, where rich structures and various language expressions need to be considered. For these tasks, usually a relative quality assessment is more suitable. The proposed RankGAN is able to perform quality assessment in a relative space, and therefore, rather than training the discriminator to assign the absolute 0 or 1 binary predicate to the synthesized or real data sample, we expect the discriminator to rank the synthetic data compared to the real data in the relative assessment space where better quality judgments of different data samples can be obtained. Given the rewards with the relative ranking information, the proposed RankGAN is possible to learn better language generator than the compared state-of-the-art methods. 4.2 Results on Chinese poems composition To evaluate the performance of our language generator, we compare our method with other approaches including MLE and SeqGAN [35] on the real-word language data. We conduct experiments on the Chinese poem dataset [37], which contains 13, 123 five-word quatrain poems. Each poem has 4 sentences, and each sentence contains 5 words resulting in a total of 20 words. After the standard pre-processing which replaces the non-frequently used words (appeared less than 5 times) with the special character UNK, we train our model on the dataset and generate the poem. To keep the proposed method general, our model does not take advantage of any prior knowledge such as phonology during learning. Following the evaluation protocol in [35, 37], we compute the BLEU-2 score and estimate the similarity between the human-written poem and the machine-created one. Table 2 summarizes the BLEU-2 score of different methods. It can be seen that the proposed RankGAN performs more favourably compared to the state-of-the-art methods in terms of BLEU-2 score. This indicates that the proposed objective is able to learn effective language generator with real-world data. We further conduct human study to evaluate the quality of the generated poem in human perspective. Specifically, we invite 57 participants who are native mandarin Chinese speakers to score the poems. During the evaluation, we randomly sample and show 15 poems written by different methods, 7 Table 3: The performance comparison of different methods on the COCO captions in terms of the BLEU scores and human evaluation scores. Method BLEU-2 BLEU-3 BLEU-4 MLE 0.781 0.624 0.589 SeqGAN 0.815 0.636 0.587 RankGAN 0.845 0.668 0.614 Method Human score SeqGAN 3.44 RankGAN 4.61 Human-written 6.42 Table 4: Example of the generated descriptions with different methods. Note that the language models are trained on COCO caption dataset without the images. Human-written Two men happily working on a plastic computer. The toilet in the bathroom is filled with a bunch of ice. A bottle of wine near stacks of dishes and food. A large airplane is taking off from a runway. Little girl wearing blue clothing carrying purple bag sitting outside cafe. SeqGAN (Baseline) A baked mother cake sits on a street with a rear of it. A tennis player who is in the ocean. A highly many fried scissors sits next to the older. A person that is sitting next to a desk. Child jumped next to each other. RankGAN (Ours) Three people standing in front of some kind of boats. A bedroom has silver photograph desk. The bears standing in front of a palm state park. This bathroom has brown bench. Three bus in a road in front of a ramp. including RankGAN, SeqGAN, and written by human. Then, we ask the subjects to evaluate the quality of the poem by grading the poem from 1 to 10 points. It can be seen in Table 2, human-written poems receive the highest score comparing to the machine-written one. RankGAN outperforms the compared method in terms of the human evaluation score. The results suggest that the ranking score is informative for the generator to create human-like sentences. 4.3 Results on COCO image captions We further evaluate our method on the large-scale dataset for the purpose of testing the stability of our model. We test our method on the image captions provided by the COCO dataset [19]. The captions are the narrative sentences written by human, and each sentence is at least 8 words and at most 20 words. We randomly select 80, 000 captions as the training set, and select 5, 000 captions to form the validation set. We replace the words appeared less than 5 times with UNK character. Since the proposed RankGAN focuses on unconditional GANs that do not consider any prior knowledge as input, we train our model on the captions of the training set without conditioning on specific images. In the experiment, we evaluate the performance of the language generator by averaging BLEU scores to measure the similarity between the generated sentences and the human-written sentences in the validation set. Table 3 shows the performance comparison of different methods. RankGAN achieves better performance than the other methods in terms of different BLEU scores. Some of the samples written by humans, and synthesized by the SeqGAN and the proposed model RankGAN are shown in Table 4. These examples show that our model is able to generate fluent, novel sentences that are 8 Table 5: The performance comparison of different methods on Shakespeare’s play Romeo and Juliet in terms of the BLEU scores. Method BLEU-2 BLEU-3 BLEU-4 MLE 0.796 0.695 0.635 SeqGAN 0.887 0.842 0.815 RankGAN 0.914 0.878 0.856 not existing in the training set. The results show that RankGAN is able to learn effective language generator in a large corpus. We also conduct human study to evaluate the quality of the generated sentences. We invite 28 participants who are native or proficient English speakers to grade the sentences. Similar to the setting in previous section, we randomly sample and show 15 sentences written by different methods, and ask the subjects to grade from 1 to 10 points. Table 3 shows the human evaluation scores. As can be seen, the human-written sentences get the highest score comparing to the language models. Among the GANs approaches, RankGAN receives better score than SeqGAN, which is consistent to the finding in the Chinese poem composition. The results demonstrate that the proposed learning objective is capable to increase the diversity of the wording making it realistic toward human-like language description. 4.4 Results on Shakespeare’s plays Finally, we investigate the possibility of learning Shakespeare’s lexical dependency, and make use of the rare phrases. In this experiment, we train our model on the Romeo and Juliet play [28] to further validate the proposed method. The script is splited into 2, 500 training sentences and 565 test sentences. To learn the rare words in the script, we adjust the threshold of UNK from 5 to 2. Table 5 shows the performance comparison of the proposed RankGAN and the other methods including MLE and SeqGAN. As can be seen, the proposed method achieves consistently higher BLEU score than the other methods in terms of the different n-grams criteria. The results indicate the proposed RankGAN is able to capture the transition pattern among the words, even if the training sentences are novel, delicate and complicated. 5 Conclusion We presented a new generative adversarial network, RankGAN, for generating high-quality natural language descriptions. Instead of training the discriminator to assign absolute binary predicate to real or synthesized data samples, we propose using a ranker to rank the human-written sentences higher than the machine-written sentences relatively. We then train the generator to synthesize natural language sentences that can be ranked higher than the human-written one. By relaxing the binary-classification restriction and conceiving a relative space with rich information for the discriminator in the adversarial learning framework, the proposed learning objective is favourable for synthesizing natural language sentences in high quality. Experimental results on multiple public datasets demonstrate that our method achieves significantly better performance than previous state-ofthe-art language generators. In the future, we plan to explore and extend our model in many other tasks, such as image synthesis and conditional GAN for image captioning. Acknowledgement We would like to thank the reviewers for their constructive comments. We thank NVIDIA Corporation for the donation of the GPU used for this research. We also thank Tianyi Zhou and Pengchuan Zhang for their helpful discussions. 9 References [1] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. [2] Satanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proc. ACL workshops, volume 29, pages 65–72, 2005. [3] Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. Proc. CoNLL, page 10, 2016. [4] Bo Dai, Dahua Lin, Raquel Urtasun, and Sanja Fidler. Towards diverse and natural image descriptions via a conditional gan. arXiv preprint arXiv:1703.06029, 2017. [5] Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In Proc. NIPS, pages 1486–1494, 2015. [6] Hao Fang, Saurabh Gupta, Forrest Iandola, Rupesh K Srivastava, Li Deng, Piotr Dollár, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C Platt, et al. From captions to visual concepts and back. In Proc. CVPR, pages 1473–1482, 2015. [7] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122, 2017. [8] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Proc. NIPS, pages 2672–2680, 2014. [9] Ian J Goodfellow. On distinguishability criteria for estimating generative models. arXiv preprint arXiv:1412.6515, 2014. [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] Po-Sen Huang, Xiaodong He, Jianfeng Gao, Li Deng, Alex Acero, and Larry Heck. Learning deep structured semantic models for web search using clickthrough data. In Proc. CIKM, pages 2333–2338, 2013. [13] Ferenc Huszár. How (not) to train your generative model: Scheduled sampling, likelihood, adversary? arXiv preprint arXiv:1511.05101, 2015. [14] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proc. CVPR, 2017. [15] Thorsten Joachims. Optimizing search engines using clickthrough data. In Proc. SIGKDD, pages 133–142, 2002. [16] Matt J Kusner and José Miguel Hernández-Lobato. Gans for sequences of discrete elements with the gumbel-softmax distribution. arXiv preprint arXiv:1611.04051, 2016. [17] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photo-realistic single image superresolution using a generative adversarial network. arXiv preprint arXiv:1609.04802, 2016. [18] Jiwei Li, Will Monroe, Tianlin Shi, Alan Ritter, and Dan Jurafsky. Adversarial learning for neural dialogue generation. arXiv preprint arXiv:1701.06547, 2017. [19] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Proc. ECCV, pages 740–755, 2014. [20] Siqi Liu, Zhenhai Zhu, Ning Ye, Sergio Guadarrama, and Kevin Murphy. Improved image captioning via policy gradient optimization of spider. [21] Tie-Yan Liu et al. Learning to rank for information retrieval. Foundations and Trends R⃝in Information Retrieval, 3(3):225–331, 2009. 10 [22] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proc. ACL, pages 311–318, 2002. [23] Devi Parikh and Kristen Grauman. Relative attributes. In Proc. ICCV, pages 503–510, 2011. [24] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [25] Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In Proc. NIPS, 2016. [26] Kevin Reschke, Adam Vogel, and Dan Jurafsky. Generating recommendation dialogs by extracting information from user reviews. In ACL, 2013. [27] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. arXiv preprint arXiv:1606.03498, 2016. [28] William Shakespeare. The complete works of William Shakespeare. Race Point Publishing, 2014. [29] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Proc. NIPS, pages 3104–3112, 2014. [30] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. [31] Richard S Sutton, David A McAllester, Satinder P Singh, Yishay Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pages 1057–1063, 1999. [32] Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In Proc. CVPR, pages 4566–4575, 2015. [33] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. [34] Zhen Yang, Wei Chen, Feng Wang, and Bo Xu. Improving neural machine translation with conditional sequence generative adversarial nets. arXiv preprint arXiv:1703.04887, 2017. [35] Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: sequence generative adversarial nets with policy gradient. In Proc. AAAI, 2017. [36] Xiang Zhang and Yann LeCun. Text understanding from scratch. arXiv preprint arXiv:1502.01710, 2015. [37] Xingxing Zhang and Mirella Lapata. Chinese poetry generation with recurrent neural networks. In Proc. EMNLP, 2014. 11 | 2017 | 492 |
6,999 | Diving into the shallows: a computational perspective on large-scale shallow learning Siyuan Ma Mikhail Belkin Department of Computer Science and Engineering The Ohio State University {masi, mbelkin}@cse.ohio-state.edu Abstract Remarkable recent success of deep neural networks has not been easy to analyze theoretically. It has been particularly hard to disentangle relative significance of architecture and optimization in achieving accurate classification on large datasets. On the flip side, shallow methods (such as kernel methods) have encountered obstacles in scaling to large data, despite excellent performance on smaller datasets, and extensive theoretical analysis. Practical methods, such as variants of gradient descent used so successfully in deep learning, seem to perform below par when applied to kernel methods. This difficulty has sometimes been attributed to the limitations of shallow architecture. In this paper we identify a basic limitation in gradient descent-based optimization methods when used in conjunctions with smooth kernels. Our analysis demonstrates that only a vanishingly small fraction of the function space is reachable after a polynomial number of gradient descent iterations. That drastically limits the approximating power of gradient descent leading to over-regularization. The issue is purely algorithmic, persisting even in the limit of infinite data. To address this shortcoming in practice, we introduce EigenPro iteration, a simple and direct preconditioning scheme using a small number of approximately computed eigenvectors. It can also be viewed as learning a kernel optimized for gradient descent. Injecting this small, computationally inexpensive and SGD-compatible, amount of approximate second-order information leads to major improvements in convergence. For large data, this leads to a significant performance boost over the state-of-the-art kernel methods. In particular, we are able to match or improve the results reported in the literature at a small fraction of their computational budget. For complete version of this paper see https://arxiv.org/abs/1703.10622. 1 Introduction In recent years we have witnessed remarkable advances in many areas of artificial intelligence. Much of this progress has been due to machine learning methods, notably deep neural networks, applied to very large datasets. These networks are typically trained using variants of stochastic gradient descent (SGD), allowing training on large data with modern GPU hardware. Despite intense recent research and significant progress on SGD and deep architectures, it has not been easy to understand the underlying causes of that success. Broadly speaking, it can be attributed to (a) the structure of the function space represented by the network or (b) the properties of the optimization algorithms used. While these two aspects of learning are intertwined, they are distinct and may be disentangled. As learning in deep neural networks is still largely resistant to theoretical analysis, progress can be made by exploring the limits of shallow methods on large datasets. Shallow methods, such as kernel methods, are a subject of an extensive and diverse literature, both theoretical and practical. In particular, kernel machines are universal learners, capable of learning nearly arbitrary functions given a sufficient number of examples [STC04, SC08]. Still, while kernel methods are easily implementable and show state-of-the-art performance on smaller datasets (see [CK11, HAS+14, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. DXH+14, LML+14, MGL+17] for some comparisons with DNN’s) there has been significantly less progress in applying these methods to large modern data. The goal of this work is to make a step toward understanding the subtle interplay between architecture and optimization and to take practical steps to improve performance of kernel methods on large data. The paper consists of two main parts. First, we identify a basic underlying limitation in using gradient descent-based methods in conjunction with smooth (infinitely differentiable) kernels typically used in machine learning, showing that only very smooth functions can be approximated after polynomially many steps of gradient descent. This phenomenon is a result of fast spectral decay of smooth kernels and can be readily understood in terms of the spectral structure of the gradient descent operator in the least square regression/classification setting, which is the focus of our discussion. Slow convergence leads to severe over-regularization (over-smoothing) and suboptimal approximation for less smooth functions, which are arguably very common in practice, at least in the classification setting, where we expect fast transitions near the class boundaries. This shortcoming of gradient descent is purely algorithmic and is not related to the sample complexity of the data. It is also not an intrinsic flaw of the kernel architecture, which is capable of approximating arbitrary functions but potentially requiring a very large number of gradient descent steps. The issue is particularly serious for large data, where direct second order methods cannot be used due to the computational constraints. While many approximate second-order methods are available, they rely on low-rank approximations and, as we discuss below, lead to over-regularization (approximation bias). In the second part of the paper we propose EigenPro iteration (see http://www.github.com/EigenPro for the code), a direct and simple method to alleviate slow convergence resulting from fast eigen-decay for kernel (and covariance) matrices. EigenPro is a preconditioning scheme based on approximately computing a small number of top eigenvectors to modify the spectrum of these matrices. It can also be viewed as constructing a new kernel, specifically optimized for gradient descent. While EigenPro uses approximate second-order information, it is only employed to modify first-order gradient descent, leading to the same mathematical solution as gradient descent (without introducing a bias). EigenPro is also fully compatible with SGD, using a low-rank preconditioner with a low overhead per iteration. We analyze the step size in the SGD setting and provide a range of experimental results for different kernels and parameter settings showing five to 30-fold acceleration over the standard methods, such as Pegasos [SSSSC11]. For large data, when the computational budget is limited, that acceleration translates into significantly improved accuracy. In particular, we are able to improve or match the state-of-the-art results reported for large datasets in the kernel literature with only a small fraction of their computational budget. 2 Gradient descent for shallow methods Shallow methods. In the context of this paper, shallow methods denote the family of algorithms consisting of a (linear or non-linear) feature map φ : RN →H to a (finite or infinite-dimensional) Hilbert space H followed by a linear regression/classification algorithm. This is a simple yet powerful setting amenable to theoretical analysis. In particular, it includes the class of kernel methods, where H is a Reproducing Kernel Hilbert Space (RKHS). Linear regression. Consider n labeled data points {(x1, y1), ..., (xn, yn) ∈H × R}. To simplify the notation let us assume that the feature map has already been applied to the data, i.e., xi = φ(zi). Least square linear regression aims to recover the parameter vector α∗that minimize the empirical loss such that α∗= arg minα∈H L(α) where L(α) def = 1 n Pn i=1(⟨α, xi⟩H −yi)2. When α∗is not uniquely defined, we can choose the smallest norm solution. Minimizing the empirical loss is related to solving a linear system of equations. Define the data matrix X def = (x1, ..., xn)T and the label vector y def = (y1, ..., yn)T , as well as the (non-centralized) covariance matrix/operator, H def = 1 n Pn i=1 xixT i . Rewrite the loss as L(α) = 1 n ∥Xα −y∥2 2. Since ∇L(α) |α=α∗= 0, minimizing L(α) is equivalent to solving the linear system Hα −b = 0 (1) with b = XT y. When d = dim(H) < ∞, the time complexity of solving the linear system in Eq. 1 directly (using Gaussian elimination or other methods typically employed in practice) is O(d3). For kernel methods we frequently have d = ∞. Instead of solving Eq. 1, one solves the dual n×n system Kα −y = 0 where K def = [k(zi, zj)]i,j=1,...,n is the kernel matrix . The solution can be written as Pn i=1 k(zi, ·)α(zi). A direct solution would require O(n3) operations. 2 Gradient descent (GD). While linear systems of equations can be solved by direct methods, such as Gaussian elimination, their computational demands make them impractical for large data. Gradient descent-type methods potentially require a small number of O(n2) matrix-vector multiplications, a much more manageable task. Moreover, these methods can typically be used in a stochastic setting, reducing computational requirements and allowing for efficient GPU implementations. These schemes are adopted in popular kernel methods implementations such as NORMA [KSW04], SDCA [HCL+08], Pegasos [SSSSC11], and DSGD [DXH+14]. For linear systems of equations gradient descent takes a simple form known as the Richardson iteration [Ric11]. It is given by α(t+1) = α(t) −η(Hα(t) −b) (2) It is easy to see that for convergence of αt to α∗as t →∞we need to ensure that ∥I −ηH∥< 1, and hence 0 < η < 2/λ1(H). The explicit formula is α(t+1) −α∗= (I −ηH)t(α(1) −α∗) (3) We can now describe the computational reach of gradient descent CRt, i.e. the set of vectors which can be ϵ-approximated by gradient descent after t steps, CRt(ϵ) def = {v ∈H, s.t.∥(I −ηH)tv∥< ϵ ∥v∥}. It is important to note that any α∗/∈CRt(ϵ) cannot be ϵ-approximated by gradient descent in less than t + 1 iterations. Note that we typically care about the quality of the solution ∥Hα(t) −b∥, rather than the error estimating the parameter vector ∥α(t) −α∗∥which is reflected in the definition. We will assume that the initialization α(1) = 0. Choosing a different starting point does not change the analysis unless second order information is incorporated in the initialization conditions. To get a better idea of the space CRt(ϵ) consider the eigendecomposition of H. Let λ1 ≥ λ2 ≥ . . . be its eigenvalues and e1, e2, . . . the corresponding eigenvectors/eigenfunctions. We have H = P λieieT i . Writing Eq. 3 in terms of eigendirection yields α(t+1) − α∗ = P (1 −ηλi)t⟨ei, α(1) −α∗⟩ei. Hence putting ai def = ⟨ei, v⟩gives CRt(ϵ) = {v, s.t. P (1 −ηλi)2ta2 i < ϵ2 ∥v∥2}. Recalling that η < 2/λ1 and using the fact that (1 −1/z)z ≈ 1/e, we see that a necessary condition for v ∈CRt is 1 3 P i,s.t.λi< λ1 2t a2 i < P i (1 −ηλi)2ta2 i < ϵ2 ∥v∥2. This is a convenient characterization, we will denote CR′t(ϵ) def = {v, s.t. P i,s.t.λi< λ1 2t a2 i < ϵ2 ∥v∥2} ⊃CRt(ϵ). Another convenient but less precise necessary condition for v ∈CRt is that (1 −2λi/λ1)t ⟨ei, v⟩ < ϵ ∥v∥. Noting that log(1 −x) < −x and assuming λ1 > 2λi, we have t > λ1(2λi)−1 log |⟨ei, v⟩|ϵ−1 ∥v∥−1 (4) The condition number. We are primarily interested in the case when d is infinite or very large and the corresponding operators/matrices are extremely ill-conditioned with infinite or approaching infinity condition number. In that case instead of a single condition number, one should consider the properties of eigenvalue decay. Gradient descent, smoothness and kernel methods. We now proceed to analyze the computational reach for kernel methods. We will start by discussing the case of infinite data (the population case). It is both easier to analyze and allows us to demonstrate the purely computational (non-statistical) nature of limitations of gradient descent. We will see that when the kernel is smooth, the reach of gradient descent is limited to very smooth, at least infinitely differentiable functions. Moreover, to approximate a function with less smoothness within some accuracy ϵ in the L2 norm one needs a super-polynomial (or even exponential) in 1/ϵ number of iterations of gradient descent. Let the data be sampled from a probability with a smooth density µ on a compact domain Ω⊂Rp. In the case of infinite data H becomes an integral operator corresponding to a positive definite kernel k(·, ·) such that Kf(x) def = R Ωk(x, z)f(z)dµz. This is a compact self-adjoint operator with an infinite positive spectrum λ1, λ2, . . ., limi→∞λi = 0. We have (see the full paper for discussion and references): Theorem 1. If k is an infinitely differentiable kernel, the rate of eigenvalue decay is super-polynomial, i.e. λi = O(i−P ) ∀P ∈N. Moreover, if k is the Gaussian kernel, there exist constants C, C′ > 0 such that for large enough i, λi < C′ exp −Ci1/p . The computational reach of kernel methods. Consider the eigenfunctions of K, Kei = λiei, which form an orthonormal basis for L2(Ω). We can write a function f ∈L2(Ω) as f = P∞ i=1 aiei. We have ∥f∥2 L2 = P∞ i=1 a2 i . We can now describe the reach of kernel methods with smooth kernel (in the infinite data setting). Specifically, functions which can be approximated in a polynomial number of iterations must have super-polynomial coefficient decay. 3 Theorem 2. Suppose f ∈L2(Ω) is such that it can be approximated within ϵ using a polynomial in 1/ϵ number of gradient descent iterations, i.e. ∀ϵ>0f ∈CRϵ−M (ϵ) for some M ∈N. Then any N ∈N and i large enough |ai| < i−N. Corollary 1. Any f ∈L2(Ω) which can be ϵ-approximated with polynomial in 1/ϵ number of steps of gradient descent is infinitely differentiable. In particular, f function must belong to the intersection of all Sobolev spaces on Ω. Gradient descent for periodic functions on R. Let us now consider a simple but important special case, where the reach can be analyzed very explicitly. Let Ωbe a circle with the uniform measure, or, equivalently, consider periodic functions on the interval [0, 2π]. Let ks(x, z) be the heat kernel on the circle [Ros97]. This kernel is very close to the Gaussian kernel ks(x, z) ≈ 1 √ 2πs exp −(x−z)2 4s . The eigenfunctions ej of the integral operator K corresponding to ks(x, z) are simply the Fourier harmonics sin jx and cos jx. The corresponding eigenvalues are {1, e−s, e−s, e−4s, e−4s, . . . , e−⌊j/2+1⌋2s, . . .}. Given a function f on [0, 2π], we can write its Fourier series f = P∞ j=0 ajej. A direct computation shows that for any f ∈CRt(ϵ), we have P i> √ 2 ln 2t s a2 i < 3ϵ2 ∥v∥2. We see that the space f ∈CRt(ϵ) is “frozen" as √ 2 ln 2ts grows extremely slowly as the number of iterations t increases. As a simple example consider the Heaviside step function f(x) (on a circle), taking 1 and −1 values for x ∈(0, π] and x ∈(π, 2π], respectively. The step function can be written as f(x) = 4 π P j=1,3,... 1 j sin(jx). From the analysis above, we need O(exp( s ϵ2 )) iterations of gradient descent to obtain an ϵ-approximation to the function. It is important to note that the Heaviside step function is a rather natural example, especially in the classification setting, where it represents the simplest two-class classification problem. The situation is not much better for functions with more smoothness unless they happen to be extremely smooth with super-exponential Fourier component decay. In contrast, a direct computation of inner products ⟨f, ei⟩yields exact function recovery for any function in L2([0, 2π]) using the amount of computation equivalent to just one step of gradient descent. Thus, we see that the gradient descent is an extremely inefficient way to recover Fourier series for a general periodic function. The situation is only mildly improved in dimension d, where the span of at most O∗ (log t)d/2 eigenfunctions of a Gaussian kernel or O t1/p eigenfunctions of an arbitrary p-differentiable kernel can be approximated in t iterations. The discussion above shows that the gradient descent with a smooth kernel can be viewed as a heavy regularization of the target function. It is essentially a band-limited approximation no more than O(ln t) Fourier harmonics. While regularization is often desirable from a generalization/finite sample point of view , especially when the number of data points is small, the bias resulting from the application of the gradient descent algorithm cannot be overcome in a realistic number of iterations unless target functions are extremely smooth or the kernel itself is not infinitely differentiable. Remark: Rate of convergence vs statistical fit. Note that we can improve convergence by changing the shape parameter of the kernel, i.e. making it more “peaked” (e.g., decreasing the bandwidth s in the definition of the Gaussian kernel) While that does not change the exponential nature of the asymptotics of the eigenvalues, it slows their decay. Unfortunately improved convergence comes at the price of overfitting. In particular, for finite data, using a very narrow Gaussian kernel results in an approximation to the 1-NN classifier, a suboptimal method which is up to a factor of two inferior to the Bayes optimal classifier in the binary classification case asymptotically. Finite sample effects, regularization and early stopping. It is well known (e.g., [B+05, RBV10]) that the top eigenvalues of kernel matrices approximate the eigenvalues of the underlying integral operators. Therefore computational obstructions encountered in the infinite case persist whenever the data set is large enough. Note that for a kernel method, t iterations of gradient descent for n data points require t · n2 operations. Thus, gradient descent is computationally pointless unless t ≪n. That would allow us to fit only about O(log t) eigenvectors. In practice we need t to be much smaller than n, say, t < 1000. At this point we should contrast our conclusions with the important analysis of early stopping for gradient descent provided in [YRC07] (see also [RWY14, CARR16]). The authors analyze gradient descent for kernel methods obtaining the optimal number of iterations of the form t = nθ, θ ∈(0, 1). That seems to contradict our conclusion that a very large, potentially exponential, number of iterations may be needed to guarantee convergence. The apparent contradiction stems from the assumption in [YRC07] that the regression function f ∗belongs to the range of some power of the kernel operator K. For an infinitely differentiable kernel, that implies super-polynomial spectral decay (ai = O(λN i ) for any N > 0). In particular, it implies that f ∗belongs to any Sobolev space. We do not typically expect such high degree of smoothness in practice, particularly in classification problems, where the Heaviside step function seems to be a reasonable model. In particular, we expect 4 sharp transitions of label probabilities across class boundaries to be typical for many classifications datasets. These areas of near-discontinuity will necessarily result in slow decay of Fourier coefficients and require many iterations of gradient descent to approximate1. Dataset Metric Number of iterations 1 80 1280 10240 81920 MNIST-10k L2 loss train 4.07e-1 9.61e-2 2.60e-2 2.36e-3 2.17e-5 test 4.07e-1 9.74e-2 4.59e-2 3.64e-2 3.55e-2 c-error (test) 38.50% 7.60% 3.26% 2.39% 2.49% HINT-M-10k L2 loss train 8.25e-2 4.58e-2 3.08e-2 1.83e-2 4.21e-3 test 7.98e-2 4.24e-2 3.34e-2 3.14e-2 3.42e-2 To illustrate this point, we show (right table) the results of gradient descent for two datasets of 10000 points (see Section 6). The regression error on the training set is roughly inverse to the number of iterations, i.e. every extra bit of precision requires twice the number of iterations for the previous bit. For comparison, we see that the minimum regression (L2) error on both test sets is achieved at over 10000 iterations. This results is at least cubic computational complexity equivalent to that of a direct method. Regularization. Note that typical regularization, e.g., adding λ∥f∥, results in discarding information along the directions with small eigenvalues (below λ). While this improves the condition number it comes at a high cost in terms of over-regularization. In the Fourier analysis example this is similar to considering band-limited functions with ∼ p log(1/λ)/s Fourier components. Even for λ = 10−16 (limit of double precision) and s = 1 we can only fit about 10 Fourier components. We argue that there is little need for explicit regularization for most iterative methods in the big data regimes. 3 Extending the reach of gradient descent: EigenPro iteration We will now propose practical measures to alleviate the over-regularization of linear regression by gradient descent. As seen above, one of the key shortcomings of shallow learning methods based on smooth kernels (and their approximations, e.g., Fourier and RBF features) is their fast spectral decay. That suggests modifying the corresponding matrix H by decreasing its top eigenvalues, enabling the algorithm to approximate more target functions in the same number of iterations. Moreover, this can be done in a way compatible with stochastic gradient descent thus obviating the need to materialize full covariance/kernel matrices in memory. Accurate approximation of top eigenvectors can be obtained from a subsample of the data with modest computational expenditure. Combining these observations we propose EigenPro, a low overhead preconditioned Richardson iteration. Preconditioned (stochastic) gradient descent. We will modify the linear system in Eq. 1 with an invertible matrix P, called a left preconditioner. PHα −Pb = 0. Clearly, this modified system and the original system in Eq. 1 have the same solution. The Richardson iteration corresponding to the modified system (preconditioned Richardson iteration) is α(t+1) = α(t) −ηP(Hα(t) −b) (5) It is easy to see that as long as η∥PH∥< 1 it converges to α∗, the solution of the original linear system. Preconditioned SGD can be defined similarly by α ←α −ηP(Hmα −bm) (6) where we define Hm def = 1 mXT mXm and bm def = 1 mXT mym using sampled mini-batch (Xm, ym). Preconditioning as a linear feature map. It is easy to see that the preconditioned iteration is in fact equivalent to the standard Richardson iteration in Eq. 2 on a dataset transformed with the linear feature map, φP (x) def = P 1 2 x. This is a convenient point of view as the transformed data can be stored for future use. It also shows that preconditioning is compatible with most computational methods both in practice and, potentially, in terms of analysis. Linear EigenPro. We will now discuss properties desired to make preconditioned GD/SGD methods effective on large scale problems. Thus for the modified iteration in Eq. 5 we would like to choose P to meet the following targets: (Acceleration) The algorithm should provide high accuracy in a small number of iterations. (Initial cost) The preconditioning matrix P should be accurately computable, without materializing the full covariance matrix. (Cost per iteration) Preconditioning by P should be efficient per iteration in terms of computation and memory. The convergence of the preconditioned algorithm with the along the i-th eigendirection is dependent on the ratio of eigenvalues λi(PH)/λ1(PH). This leads us to choose the preconditioner P to maximize the ratio λi(PH)/λ1(PH) for each i. We see that modifying the top eigenvalues of H makes the most difference in convergence. For example, decreasing λ1 improves convergence along all directions, while decreasing any other eigenvalue only speeds up convergence in that 1Interestingly they can lead to lower sample complexity for optimal classifiers (cf. Tsybakov margin condition [Tsy04]). 5 direction. However, decreasing λ1 below λ2 does not help unless λ2 is decreased as well. Therefore it is natural to decrease the top k eigenvalues to the maximum amount, i.e. to λk+1, leading to Algorithm: EigenPro(X, y, k, m, η, τ, M) input training data (X, y), number of eigendirections k, mini-batch size m, step size η, damping factor τ, subsample size M output weight of the linear model α 1: [E, Λ, ˆλk+1] = RSVD(X, k + 1, M) 2: P def = I −E(I −τ ˆλk+1Λ−1)ET 3: Initialize α ←0 4: while stopping criteria is False do 5: (Xm, ym) ←m rows sampled from (X, y) without replacement 6: g ←1 m(XT m(Xmα) −XT mym) 7: α ←α −ηPg 8: end while P def = I − k X i=1 (1 −λk+1/λi)eieT i (7) We see that P-preconditioned iteration increases convergence by a factor λ1/λk. However, exact construction of P involves computing the eigendecomposition of the d × d matrix H, which is not feasible for large data. Instead we use subsampled randomized SVD [HMT11] to obtain an approximate preconditioner ˆPτ def = I − Pk i=1 (1 −τ ˆλk+1/ˆλi)ˆeiˆeT i . Here algorithm RSVD (detailed in the full paper ) computes the approximate top eigenvectors E ←(ˆe1, . . . , ˆek) and eigenvalues Λ ←diag(ˆλ1, . . . , ˆλk) and ˆλk+1 for subsample covariance matrix HM. We introduce the parameter τ to counter the effect of approximate top eigenvectors “spilling” into the span of the remaining eigensystem. Using τ < 1 is preferable to the obvious alternative of decreasing the step size η as it does not decrease the step size in the directions nearly orthogonal to the span of (ˆe1, . . . , ˆek). That allows the iteration to converge faster in those directions. In particular, when (ˆe1, . . . , ˆek) are computed exactly, the step size in other eigendirections will not be affected by the choice of τ. We call SGD with the preconditioner ˆPτ (Eq. 6) EigenPro iteration. See Algorithm EigenPro for details. Moreover, the key step size parameter η can be selected in a theoretically sound way discussed below. Kernel EigenPro. We will now discuss modifications needed to work directly in the RKHS (primal) setting. A positive definite kernel k(·, ·) : RN × RN →R implies a feature map from X to an RKHS space H. The feature map can be written as φ : x 7→k(x, ·), RN →H. This feature map leads to the learning problem f ∗= arg minf∈H 1 n Pn i=1 (⟨f, k(xi, ·)⟩H −yi)2. Using properties of RKHS, EigenPro iteration in H becomes f ←f −η P(K(f) −b) where b def = 1 n Pn i=1 yik(xi, ·) and covariance operator K = 1 n Pn i=1 k(xi, ·) ⊗k(xi, ·). The top eigensystem of K forms the preconditioner P def = I −Pk i=1 (1 −τλk+1(K)/λi(K)) ei(K) ⊗ei(K). By the Representer theorem [Aro50], f ∗admits a representation of the form Pn i=1 αi k(xi, ·). Parameterizing the above iteration accordingly and applying some linear algebra lead to the following iteration in a finitedimensional vector space, α ←α−ηP(Kα−y) where K def = [k(xi, xj)]i,j=1,...,n is the kernel matrix and EigenPro preconditioner P is defined using the top eigensystem of K (assume Kei = λiei), P def = I −Pk i=1 λi −1(1 −τλk+1/λi)eieT i . This differs from that for the linear case (Eq. 7) (with an extra factor of 1/λi) due to the difference between the parameter space of α and the RKHS space. EigenPro as kernel learning. Another way to view EigenPro is in terms of kernel learning. Assuming that the preconditioner is computed exactly, EigenPro is equivalent to computing the (distributiondependent) kernel, kEP (x, z) def = Pk i=1 λk+1ei(x)ei(z) + P∞ i=k+1 λiei(x)ei(z). Notice that the RKHS spaces corresponding to kEP and k contain the same functions but have different norms. The norm in kEP is a finite rank modification of the norm in the RKHS corresponding to k, a setting reminiscent of [SNB05] where unlabeled data was used to “warp” the norm for semi-supervised learning. However, in our paper the “warping" is purely for computational efficiency. Acceleration. EigenPro can obtain acceleration factor of up to λ1 λk+1 over the standard gradient descent. That factor assumes full gradient descent and exact computation of the preconditioner. See below for an acceleration analysis in the SGD setting. Initial cost. To construct the preconditioner P, we perform RSVD to compute the approximate top eigensystem of covariance H. RSVD has time complexity O(Md log k+(M +d)k2) (see [HMT11]). The subsample size M can be much smaller than the data size n while preserving the accuracy of estimation. In addition, extra kd memory is needed to store the eigenvectors. Cost per iteration. For standard SGD using d kernel centers (or random Fourier features) and mini-batch of size m, the computational cost per iteration is O(md). In comparison, EigenPro iteration using top-k eigen-directions costs O(md + kd). Specifically, applying preconditioner P in EigenPro requires left multiplication by a matrix of rank k. This involves k vector-vector dot products resulting in k · d additional operations per iteration. These can be implemented efficiently on a GPU. 6 4 Step Size Selection for EigenPro Preconditioned Methods We will now discuss the key issue of the step size selection for EigenPro iteration. For iteration involving covariance matrix H, λ1(H)−1 = ∥H∥−1 results in optimal (within a factor of 2) convergence. This suggests choosing the corresponding step size η = ∥PH∥−1 = λ−1 k+1. In practice this will lead to divergence due to (1) approximate computation of eigenvectors (2) the randomness inherent in SGD. One (costly) possibility is to compute ∥PHm∥at every step. As the mini-batch can be assumed to be chosen at random, we propose using a lower bound on ∥Hm∥−1 (with high probability) as the step size to guarantee convergence at each iteration. Linear EigenPro. Consider the EigenPro preconditioned SGD in Eq. 6. For this analysis assume that P is formed by the exact eigenvectors.Interpreting P 1 2 as a linear feature map as in Section 2, makes P 1 2 HmP 1 2 a random subsample on the dataset XP 1 2 . Using matrix Bernstein [Tro15] yields Theorem 3. If ∥x∥2 2 ≤κ for any x ∈X and λk+1 = λk+1(H), with probability at least 1 −δ, ∥PHm∥≤λk+1 + 2(λk+1 + κ)(3m)−1(ln 2dδ−1) + p 2λk+1κm−1(ln 2dδ−1). Kernel EigenPro. For EigenPro iteration in RKHS, we can bound ∥P ◦Km∥with a very similar result based on operator Bernstein [Min17]. Note that dimension d in Theorem 3 is replaced by the intrinsic dimension [Tro15]. See the arXiv version of this paper for details. Choice of the step size. In the spectral norm bounds λk+1 is the dominant term when the mini-batch size m is large. However, in most large-scale settings, m is small, and p 2λk+1κ/m becomes the dominant term. This suggests choosing step size η ∼1/ p λk+1 leading to acceleration on the order of λ1/ p λk+1 over the standard (unpreconditioned) SGD. That choice works well in practice. 5 EigenPro and Related Work Large scale machine learning imposes fairly specific limitations on optimization methods. The computational budget allocated to the problem must not exceed O(n2) operations, a small number of matrix-vector multiplications. That rules out most direct second order methods which require O(n3) operations. Approximate second order methods are far more efficient. However, they typically rely on low rank matrix approximation, a strategy which (similarly to regularization) in conjunction with smooth kernels discards information along important eigen-directions with small eigenvalues. On the other hand, first order methods can be slow to converge along eigenvectors with small eigenvalues. An effective method must thus be a hybrid approach using approximate second order information in a first order method. EigenPro is an example of such an approach as the second order information is used in conjunction with a first order method. The things that make EigenPro effective are as follows: 1. The second order information (eigenvalues and eigenvectors) is computed efficiently from a subsample of the data. Due to the quadratic loss function, that computation needs to be conducted only once. Moreover, the step size can be fixed throughout the iterations. 2. Preconditioning by a low rank modification of the identity matrix results in low overhead per iteration. The update is computed without materializing the full preconditioned covariance matrix. 3. EigenPro iteration converges (mathematically) to the same result even if the second order approximation is not accurate. That makes EigenPro relatively robust to errors in the second order preconditioning term P, in contrast to most approximate second order methods. Related work: First order optimization methods. Gradient based methods, such as gradient descent (GD), stochastic gradient descent (SGD), are classical methods [She94, DJS96, BV04, Bis06]. Recent success of neural networks had drawn significant attention to improving and accelerating these methods. Methods like SAGA [RSB12] and SVRG [JZ13] improve stochastic gradient by periodically evaluating full gradient to achieve variance reduction. Algorithms in [DHS11, TH12, KB14] compute adaptive step size for each gradient coordinate. Scalable kernel methods. There is a significant literature on scalable kernel methods including [KSW04, HCL+08, SSSSC11, TBRS13, DXH+14] Most of these are first order optimization methods. To avoid the O(n2) computation and memory requirement typically involved in constructing the kernel matrix, they often adopt approximations like RBF features [WS01, QB16, TRVR16] or random Fourier features [RR07, LSS13, DXH+14, TRVR16]. Second order/hybrid optimization methods. Second order methods use the inverse of the Hessian matrix or its approximation to accelerate convergence [SYG07, BBG09, MNJ16, BHNS16, ABH16]. These methods often need to compute the full gradient every iteration [LN89, EM15, ABH16] making less suitable for large data. [EM15] analyzed a hybrid first/second order method for general convex optimization with a rescaling term based on the top eigenvectors of the Hessian. That can be viewed as preconditioning the Hessian at every GD iteration. A related recent work [GOSS16] 7 analyses a hybrid method designed to accelerate SGD convergence for ridge regression. The data are preprocessed by rescaling points along the top singular vectors of the data matrix. Another second order method PCG [ACW16] accelerates the convergence of conjugate gradient for large kernel ridge regression using a preconditioner which is the inverse of an approximate covariance generated with random Fourier features. [TRVR16] achieves similar preconditioning effects by solving a linear system involving a subsampled kernel matrix every iteration. While not strictly a preconditioner Nyström with gradient descent(NYTRO) [CARR16] also improves the condition number. Compared to many of these methods EigenPro directly addresses the underlying issues of slow convergence without introducing a bias in directions with small eigenvalues. Additionally EigenPro incurs only a small overhead per iteration both in memory and computation. 6 Experimental Results Computing Resource/Data/Metrics. Experiments were run on a workstation with 128GB main memory, two Intel Xeon(R) E5-2620 CPUs, and one GTX Titan X (Maxwell) GPU. For multiclass datasets, we report classification error (c-error) for binary valued labels and mean squared error (mse) for real valued labels. See the arXiv version for details and more experimental results. Kernel methods/Hyperparameters. For smaller datasets direct solution of kernel regularized least squares (KRLS) is used to obtain the reference error. We compare with the primal method Pegasos [SSSSC11]. For even larger datasets, we use Random Fourier Features [RR07] (RF) with SGD as in [DXH+14, TRVR16]. The results of these methods are presented as baselines. For consistent comparison, all iterative methods use mini-batch of size m = 256. EigenPro preconditioner is constructed using the top k = 160 eigenvectors of a subsampled dataset of size M = 4800. For EigenPro-RF, we set the damping factor τ = 1/4. For primal EigenPro τ = 1. Dataset Size Gaussian Laplace Cauchy EigPro Pega EigPro Pega EigPro Pega MNIST 6 · 104 7 77 4 143 7 78 CIFAR-10 5 · 104 5 56 13 136 6 107 SVHN 7 · 104 8 54 14 297 17 191 HINT-S 5 · 104 19 164 15 308 13 126 Acceleration for different kernels. The table on the right presents the number of epochs needed by EigenPro and Pegasos to reach the error of the optimal kernel classifier. We see that EigenPro provides acceleration of 6 to 35 times in terms of the number of epochs required without any loss of accuracy. The actual acceleration is about 20% less due to the overhead of maintaining and applying a preconditioner. Comparisons on large datasets. Table below compares EigenPro to Pegasos/SGD-RF on several large datasets for 10 epochs. We see that EigenPro consistently outperforms Pegasos/SGD-RF within a fixed computational budget. Note that we adopt Gaussian kernel and 2 · 105 random features. Dataset Size Metric EigenPro Pegasos EigenPro-RF SGD-RF result GPU hours result GPU hours result GPU hours result GPU hours HINT-S 2 · 105 c-error 10.0% 0.1 11.7% 0.1 10.3% 0.2 11.5% 0.1 TIMIT 1 · 106 31.7% 3.2 33.0% 2.2 32.6% 1.5 33.3% 1.0 MNIST-8M 1 · 106 0.8% 3.0 1.1% 2.7 0.8% 0.8 1.0% 0.7 8 · 106 0.7% 7.2 0.8% 6.0 HINT-M 1 · 106 mse 2.3e-2 1.9 2.7e-2 1.5 2.4e-2 0.8 2.7e-2 0.6 7 · 106 2.1e-2 5.8 2.4e-2 4.1 Comparisons to state-of-the-art. In the below table, we provide a comparison to several large scale kernel results reported in the literature. EigenPro improves or matches performance on each dataset at a much lower computational budget. We note that [MGL+17] achieves error 30.9% on TIMIT using an AWS cluster. The method uses a novel supervised feature selection method, hence is not directly comparable. EigenPro can plausibly further improve the training error using this new feature set. Dataset Size EigenPro (use 1 GTX Titan X) Reported results error GPU hours epochs source error description MNIST 1 · 106 0.70% 4.8 16 [ACW16] 0.72% 1.1 hours/189 epochs/1344 AWS vCPUs 6.7 · 106 0.80%† 0.8 10 [LML+14] 0.85% less than 37.5 hours on 1 Tesla K20m TIMIT 2 · 106 31.7% (32.5%)‡ 3.2 10 [HAS+14] 33.5% 512 IBM BlueGene/Q cores [TRVR16] 33.5% 7.5 hours on 1024 AWS vCPUs SUSY 4 · 106 19.8% 0.1 0.6 [CAS16] ≈20% 0.6 hours on IBM POWER8 † The result is produced by EigenPro-RF using 1 × 106 data points. ‡ Our TIMIT training set (1 × 106 data points) was generated following a standard practice in the speech community [PGB+11] by taking 10ms frames and dropping the glottal stop ’q’ labeled frames in core test set (1.2% of total test set). [HAS+14] adopts 5ms frames, resulting in 2 × 106 data points, and keeping the glottal stop ’q’. In the worst case scenario EigenPro, if we mislabel all glottal stops, the corresponding frame-level error increases from 31.7% to 32.5%. Acknowledgements. We thank Adam Stiff, Eric Fosler-Lussier, Jitong Chen, and Deliang Wang for providing TIMIT and HINT datasets. This work is supported by NSF IIS-1550757 and NSF CCF-1422830. Part of this work was completed while the second author was at the Simons Institute at Berkeley. In particular, he thanks Suvrit Sra, Daniel Hsu, Peter Bartlett, and Stefanie Jegelka for many discussions and helpful suggestions. 8 References [ABH16] Naman Agarwal, Brian Bullins, and Elad Hazan. Second order stochastic optimization in linear time. arXiv preprint arXiv:1602.03943, 2016. [ACW16] H. Avron, K. Clarkson, and D. Woodruff. Faster kernel ridge regression using sketching and preconditioning. arXiv preprint arXiv:1611.03220, 2016. [Aro50] Nachman Aronszajn. Theory of reproducing kernels. Transactions of the American mathematical society, 68(3):337–404, 1950. [B+05] Mikio Ludwig Braun et al. Spectral properties of the kernel matrix and their relation to kernel methods in machine learning. PhD thesis, University of Bonn, 2005. [BBG09] Antoine Bordes, Léon Bottou, and Patrick Gallinari. SGD-QN: Careful quasi-newton stochastic gradient descent. JMLR, 10:1737–1754, 2009. [BHNS16] Richard H Byrd, SL Hansen, Jorge Nocedal, and Yoram Singer. A stochastic quasi-newton method for large-scale optimization. SIAM Journal on Optimization, 26(2):1008–1031, 2016. [Bis06] Christopher M Bishop. Pattern recognition. Machine Learning, 128, 2006. [BV04] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [CARR16] Raffaello Camoriano, Tomás Angles, Alessandro Rudi, and Lorenzo Rosasco. NYTRO: When subsampling meets early stopping. In AISTATS, pages 1403–1411, 2016. [CAS16] Jie Chen, Haim Avron, and Vikas Sindhwani. Hierarchically compositional kernels for scalable nonparametric learning. arXiv preprint arXiv:1608.00860, 2016. [CK11] Chih-Chieh Cheng and Brian Kingsbury. Arccosine kernels: Acoustic modeling with infinite neural networks. In ICASSP, pages 5200–5203. IEEE, 2011. [DHS11] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. JMLR, 12:2121–2159, 2011. [DJS96] John E Dennis Jr and Robert B Schnabel. Numerical methods for unconstrained optimization and nonlinear equations. SIAM, 1996. [DXH+14] B. Dai, B. Xie, N. He, Y. Liang, A. Raj, M. Balcan, and L. Song. Scalable kernel methods via doubly stochastic gradients. In NIPS, pages 3041–3049, 2014. [EM15] M. Erdogdu and A. Montanari. Convergence rates of sub-sampled newton methods. In NIPS, 2015. [GOSS16] Alon Gonen, Francesco Orabona, and Shai Shalev-Shwartz. Solving ridge regression using sketched preconditioned svrg. In ICML, pages 1397–1405, 2016. [HAS+14] Po-Sen Huang, Haim Avron, Tara N Sainath, Vikas Sindhwani, and Bhuvana Ramabhadran. Kernel methods match deep neural networks on timit. In ICASSP, pages 205–209. IEEE, 2014. [HCL+08] Cho-Jui Hsieh, Kai-Wei Chang, Chih-Jen Lin, S Sathiya Keerthi, and Sellamanickam Sundararajan. A dual coordinate descent method for large-scale linear svm. In Proceedings of the 25th international conference on Machine learning, pages 408–415. ACM, 2008. [HMT11] Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217– 288, 2011. [JZ13] Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS, pages 315–323, 2013. [KB14] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [KSW04] Jyrki Kivinen, Alexander J Smola, and Robert C Williamson. Online learning with kernels. Signal Processing, IEEE Transactions on, 52(8):2165–2176, 2004. [LML+14] Zhiyun Lu, Avner May, Kuan Liu, Alireza Bagheri Garakani, Dong Guo, Aurélien Bellet, Linxi Fan, Michael Collins, Brian Kingsbury, Michael Picheny, et al. How to scale up kernel methods to be as good as deep neural nets. arXiv preprint arXiv:1411.4000, 2014. [LN89] Dong C Liu and Jorge Nocedal. On the limited memory bfgs method for large scale optimization. Mathematical programming, 45(1-3):503–528, 1989. [LSS13] Quoc Le, Tamás Sarlós, and Alex Smola. Fastfood-approximating kernel expansions in loglinear time. In Proceedings of the international conference on machine learning, 2013. 9 [MGL+17] Avner May, Alireza Bagheri Garakani, Zhiyun Lu, Dong Guo, Kuan Liu, Aurélien Bellet, Linxi Fan, Michael Collins, Daniel Hsu, Brian Kingsbury, et al. Kernel approximation methods for speech recognition. arXiv preprint arXiv:1701.03577, 2017. [Min17] Stanislav Minsker. On some extensions of bernstein’s inequality for self-adjoint operators. Statistics & Probability Letters, 2017. [MNJ16] P. Moritz, R. Nishihara, and M. Jordan. A linearly-convergent stochastic l-bfgs algorithm. In AISTATS, 2016. [PGB+11] D. Povey, A. Ghoshal, G. Boulianne, L. Burget, O. Glembek, N. Goel, M. Hannemann, P. Motlicek, Y. Qian, P. Schwarz, et al. The kaldi speech recognition toolkit. In ASRU, 2011. [QB16] Qichao Que and Mikhail Belkin. Back to the future: Radial basis function networks revisited. In AISTATS, pages 1375–1383, 2016. [RBV10] Lorenzo Rosasco, Mikhail Belkin, and Ernesto De Vito. On learning with integral operators. Journal of Machine Learning Research, 11(Feb):905–934, 2010. [Ric11] Lewis Fry Richardson. The approximate arithmetical solution by finite differences of physical problems involving differential equations, with an application to the stresses in a masonry dam. Philosophical Transactions of the Royal Society of London. Series A, 210:307–357, 1911. [Ros97] Steven Rosenberg. The Laplacian on a Riemannian manifold: an introduction to analysis on manifolds. Number 31. Cambridge University Press, 1997. [RR07] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, pages 1177–1184, 2007. [RSB12] Nicolas L Roux, Mark Schmidt, and Francis R 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. [RWY14] G. Raskutti, M. Wainwright, and B. Yu. Early stopping and non-parametric regression: an optimal data-dependent stopping rule. JMLR, 15(1):335–366, 2014. [SC08] Ingo Steinwart and Andreas Christmann. Support vector machines. Springer Science & Business Media, 2008. [She94] Jonathan Richard Shewchuk. An introduction to the conjugate gradient method without the agonizing pain, 1994. [SNB05] Vikas Sindhwani, Partha Niyogi, and Mikhail Belkin. Beyond the point cloud: from transductive to semi-supervised learning. In Proceedings of the 22nd international conference on Machine learning, pages 824–831. ACM, 2005. [SSSSC11] Shai Shalev-Shwartz, Yoram Singer, Nathan Srebro, and Andrew Cotter. Pegasos: Primal estimated sub-gradient solver for SVM. Mathematical programming, 127(1):3–30, 2011. [STC04] John Shawe-Taylor and Nello Cristianini. Kernel methods for pattern analysis. Cambridge university press, 2004. [SYG07] Nicol N Schraudolph, Jin Yu, and Simon Günter. A stochastic quasi-newton method for online convex optimization. In AISTATS, pages 436–443, 2007. [TBRS13] Martin Takác, Avleen Singh Bijral, Peter Richtárik, and Nati Srebro. Mini-batch primal and dual methods for SVMs. In ICML (3), pages 1022–1030, 2013. [TH12] Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 4:2, 2012. [Tro15] Joel A Tropp. An introduction to matrix concentration inequalities. arXiv preprint arXiv:1501.01571, 2015. [TRVR16] S. Tu, R. Roelofs, S. Venkataraman, and B. Recht. Large scale kernel learning using block coordinate descent. arXiv preprint arXiv:1602.05310, 2016. [Tsy04] Alexandre B Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, pages 135–166, 2004. [WS01] Christopher Williams and Matthias Seeger. Using the Nyström method to speed up kernel machines. In NIPS, pages 682–688, 2001. [YRC07] Yuan Yao, Lorenzo Rosasco, and Andrea Caponnetto. On early stopping in gradient descent learning. Constructive Approximation, 26(2):289–315, 2007. 10 | 2017 | 493 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.