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
4,900
Estimation Bias in Multi-Armed Bandit Algorithms for Search Advertising Min Xu Machine Learning Department Carnegie Mellon University minx@cs.cmu.edu Tao Qin Microsoft Research Asia taoqin@microsoft.com Tie-Yan Liu Microsoft Research Asia tie-yan.liu@microsoft.com Abstract In search advertising, the search engine needs to select the most profitable advertisements to display, which can be formulated as an instance of online learning with partial feedback, also known as the stochastic multi-armed bandit (MAB) problem. In this paper, we show that the naive application of MAB algorithms to search advertising for advertisement selection will produce sample selection bias that harms the search engine by decreasing expected revenue and “estimation of the largest mean” (ELM) bias that harms the advertisers by increasing game-theoretic player-regret. We then propose simple bias-correction methods with benefits to both the search engine and the advertisers. 1 Introduction Search advertising, also known as sponsored search, has been formulated as a multi-armed bandit (MAB) problem [11], in which the search engine needs to choose one ad from a pool of candidate to maximize some objective (e.g., its revenue). To select the best ad from the pool, one needs to know the quality of each ad, which is usually measured by the probability that a random user will click on the ad. Stochastic MAB algorithms provide an attractive way to select the high quality ads, and the regret guarantee on MAB algorithms ensures that we do not display the low quality ads too many times. When applied to search advertising, a MAB algorithm needs to not only identify the best ad (suppose there is only one ad slot for simplicity) but also accurately learn the click probabilities of the top two ads, which will be used by the search engine to charge a fair fee to the winner advertiser according to the generalized second price auction mechanism [6]. If the probabilities are estimated poorly, the search engine may charge too low a payment to the advertisers and lose revenue, or it may charge too high a payment which would encourage the advertisers to engage in strategic behavior. However, most existing MAB algorithms only focus on the identification of the best arm; if naively applied to search advertising, there is no guarantee to get an accurate estimation for the click probabilities of the top two ads. Thus, search advertising, with its special model and goals, merits specialized algorithmic design and analysis while using MAB algorithms. Our work is a step in this direction. We show in particular that naive ways of combining click probability estimation and MAB algorithms lead to sample selection bias that harms the search engine’s revenue. We present a simple modification to MAB algorithms that eliminates such a bias and provably achieves almost the revenue as if an oracle gives us the actual click probabilities. We also analyze the game theoretic notion of incentive compatibility (IC) 1 and show that low regret MAB algorithms may have worse IC property than high regret uniform exploration algorithms and that a trade-off may be required. 2 Setting Each time an user visits a webpage, which we call an impression, the search engine runs a generalized second price (SP) auction [6] to determine which ads to show to the user and how much to charge advertisers if their ads are clicked. We will in this paper suppose that we have only one ad slot in which we can display one ad. The multiple slot setting is more realistic but also much more complicated to analyze; we leave the extension as future work. In the single slot case, generalized SP auction becomes simply the well known second price auction, which we describe below. Assume there are n ads. Let bk denote the bid of advertiser k (or the ad k), which is the maximum amount of money advertiser k is willing to pay for a click, and ρk denote the click-through-rate (CTR) of ad k, which is the probability a random user will click on it. SP auction ranks ads according to the products of the ad CTRs and bids. Assume that advertisers are numbered by the decreasing order of biρi: b1ρ1 > b2ρ2 > · · · > bnρn. Then advertiser 1 wins the ad slot, and he/she need to pay b2ρ2/ρ1 for each click on his/her ad. This payment formula is chosen to satisfy the game theoretic notion of incentive compatibility (see Chapter 9 of [10] for a good introduction). Therefore, the per-impress expected revenue of SP auction is b2ρ2. 2.1 A Two-Stage Framework Since the CTRs are unknown to both advertisers and the search engine, the search engine needs to estimate them through some learning process. We adopt the same two-stage framework as in [12, 2], which is composed by a CTR learning stage lasting for the first T impressions and followed by a SP auction stage lasting for the second Tend −T impressions. 1. Advertisers 1, ..., n submit bids b1, ..., bn. 2. CTR learning stage: For each impression t = 1, ..., T, display ad kt ∈{1, ..., n} using MAB algorithm M. Estimate bρi based on the click records from previous stage. 3. SP auction stage: For t = T + 1, ..., Tend, we run SP auction using estimators bρi: display ad that maximizes bkbρk and charge b(2)bρ(2) bρ(1) . Here we use (s) to indicate the ad with the s-th largest score bibρi. One can see that in this framework, the estimators bρi’s are computed at the end of the first stage and keep unchanged in the second stage. Recent works [2] suggested one could also run the MAB algorithm and keep updating the estimators until Tend. However, it is hard to compute a fair payment when we display ads based using a MAB algorithm rather than the SP auction, and a randomized payment is proposed in [2]. Their scheme, though theoretically interesting, is impractical because it is difficult for advertisers to accept a randomized payment rule. We thus adhere to the above framework and do not update bρi’s in the second stage. It is important to note that in search advertising, we measure the quality of CTR estimators not by mean-squared error but by criteria important to advertising. One criterion is to the per-impression expected revenue (defined below) in rounds T + 1, ..., Tend. Two types of estimation errors can harm the expected revenue: (1) the ranking may be incorrect, i.e. arg maxk bkbρk ̸= arg max bkρk, and (2) the estimators may be biased. Another criterion is incentive compatibility, which is a more complicated concept and we defer its definition and discussion to Section 4. We do not analyze the revenue and incentive compatibility properties of the first CTR learning stage because of its complexity and brief duration; we assume that Tend >> T. Definition 2.1. Let (1) := arg maxk bkbρk, (2) := arg maxk̸=(1) bkbρk. We define the perimpression empirical revenue as c rev := ρ(1) b(2)bρ(2) bρ(1) and the per-impression expected revenue as E[ c rev] where the expectation is taken over the CTR estimators. We define then the per-impression expected revenue loss as b2ρ2 −E[c rev], where b2ρ2 is the oracle revenue we obtain if we know the true click probabilities. 2 Choice of Estimator We will analyze the most straightforward estimator bρk = Ck Tk where Tk is the number of impression allocated to ad k in the CTR learning stage and Ck is the number of clicks received by ad k in the CTR learning stage. This estimator is in fact biased and we will later propose simple improvements. 2.2 Characterizing MAB Algorithms We analyze two general classes of MAB algorithms: uniform and adaptive. Because there are many specific algorithms for each class, we give our formal definitions by characterizing Tk, the number of impressions assigned to each advertiser k at the end of the CTR learning stage. Definition 2.2. We say that the learning algorithm M is uniform if, for some constant 0 < c < 1, for all k, all bid vector b, with probability at least 1 −O n T  : Tk ≥c nT. We next describe adaptive algorithm which has low regret because it stops allocating impressions to ad k if it is certain that bkρk < maxk′ bk′ρk′. Definition 2.3. Let b be a bid vector. We say that a MAB algorithm is adaptive with respect to b, if, with probability at least 1 −O n T  , we have that: T1 ≥cTmax and  c′ b2 k ∆2 k ln T  ≥Tk ≥min  cTmax, 4b2 k ∆2 k ln T  for all k ̸= 1 where ∆k = b1ρ1 −bkρk and c < 1, c′ are positive constants and Tmax = maxk Tk. For simplicity, we assume that c here is the same as c in Definition 2.2, we can take the minimum of the two if they are different. Both the uniform algorithms and the adaptive algorithms have been used in the search advertising auctions [5, 7, 12, 2, 8]. UCB (Uniform Confidence Bound) is a simple example of an adaptive algorithm. Example 2.1. UCB Algorithm. The UCB algorithm, at round t, allocate the impression to the ad with the largest score, which is defined as sk,t ≡bkbρk,t + γbk q 1 Tk(t) log T. where Tk(t) is the number of impressions ad k has received before round t and bρk,t is the number of clicks divided by Tk(t) in the history log before round t. γ is a tuning parameter that trades off exploration and exploitation; the larger γ is, the more UCB resembles uniform algorithms. Some version of UCB algorithm uses log t instead of log T in the score; this difference is unimportant and we use the latter form to simplify the proof. Under the UCB algorithm, it is well known that the Tk’s satisfy the upper bounds in Definition 2.3. That the Tk’s also satisfy the lower bounds is not obvious and has not been previously proved. Previous analyses of UCB, whose goal is to show low regret, do not need any lower bounds on Tk’s; our analysis does require a lower bound because we need to control the accuracy of the estimator bρk. The following theorem is, to the best of our knowledge, a novel result. Theorem 2.1. Suppose we run the UCB algorithm with γ ≥4, then the Tk’s satisfy the bounds described in Definition 2.3. The UCB algorithm in practice satisfy the lower bounds even with a smaller γ. We refer the readers to Theorem 5.1 and Theorem 5.2 of Section 5.1 of the appendix for the proof. As described in Section 2.1, we form estimators bρk by dividing the number of clicks by the number of impressions Tk. The estimator bρk is not an average of Tk i.i.d Bernoulli random variables because the size Tk is correlated with bρk. This is known as the sample selection bias. Definition 2.4. We define the sample selection bias as E[bρk] −ρk. We can still make the following concentration of measure statements about bρk, for which we give a standard proof in Section 5.1 of the appendix. 3 Lemma 2.1. For any MAB learning algorithm, with probability at least 1 −O( n T ), for all t = 1, ..., T, for all k = 1, ..., n, the confidence bound holds. ρk − p (1/Tk(t)) log T ≤bρk,t ≤ρk + p (1/Tk(t)) log T 2.3 Related Work As mentioned before, how to design incentive compatible payment rules when using MAB algorithms to select the best ads has been studied in [2] and [5]. However, their randomized payment scheme is very different from the current industry standard and is somewhat impractical. The idea of using MAB algorithms to simultaneously select ads and estimate click probabilities has proposed in [11], [8] and [13] . However, they either do not analyze estimation quality or do not analyze it beyond a concentration of measure deviation bound. Our work in contrast shows that it is in fact the estimation bias that is important in the game theoretic setting. [9] studies the effect of CTR learning on incentive compatibility from the perspective of an advertiser with imperfect information. This work is only the first step towards understanding the effect of estimation bias in MAB algorithms for search advertising auctions, and we only focus on a relative simplified setting with only a single ad slot and without budget constraints, which is already difficult to analyze. We leave the extensions to multiple ad slots and with budget constraints as future work. 3 Revenue and Sample Selection Bias In this section, we analyze the impact of a MAB algorithm on the search engine’s revenue. We show that the direct plug-in of the estimators from a MAB algorithm (either unform or adaptive) will cause the sample selection bias and damage the search engine’s revenue; we then propose a simple de-bias method which can ensure the revenue guarantee. Throughout the section, we fix a bid vector b. We define the notations (1), (2) as (1) := arg maxk bρkbk and (2) := arg maxk̸=(1) bρkbk. Before we present our main result, we pause to give some intuition about sample selection bias. Assume b1ρ1 ≥b2ρ2... ≥bnρn and suppose we use the UCB algorithm in the learning stage. If bρk > ρk, then the UCB algorithm will select k more often and thus acquire more click data to gradually correct the overestimation. If bρk < ρk however, the UCB algorithm will select k less often and the underestimation persists. Therefore, E[ρk] < ρk. 3.1 Revenue Analysis The following theorem is the main result of this section, which shows that the bias of the CTR estimators can critically affect the search engine’s revenue. Theorem 3.1. Let T0 := 4n ρ2 1 log T, T adpt min := 5c′ P k̸=1 max(b2 1,b2 k) ∆2 k  log T, and T unif min := 4 nb2 max c∆2 2 log T. Let c be the constant introduced in Definition 2.3 and 2.2. If T ≥T0, then, for either adaptive or uniform algorithms, b2ρ2 −E[c rev] ≤ b2ρ2 −b2E[bρ2] ρ1 E[bρ1]  −O r n T log T  −O  n T  . If we use adaptive algorithms and T ≥T adpt min or if we use uniform algorithms and T ≥T unif min , then b2ρ2 −E[c rev] ≤  (b2ρ2 −b2E[bρ2] ρ1 E[bρ1]) −O  n T  We leave the full proof to Section 5.2 of the appendix and provide a quick sketch here. In the first case where T is smaller than thresholds T adpt min or T unif min , the probability of incorrect ranking, that is, incorrectly identifying the best ad, is high and we can only use concentration of measure bounds to control the revenue loss. In the second case, we show that we can almost always identify the best ad and therefore, the p n T log T error term disappears. 4 The (b2ρ2−b2E[bρ2] ρ1 E[bρ1]) term in the theorem is in general positive because of sample selection bias. With bias, the best bound we can get on the expectation E[bρ2] is that |E[bρ2]−ρ2| ≤O q 1 T2 log T  , which is through the concentration inequality (Lemma 2.1). Remark 3.1. With adaptive learning, T1 is at least the order of O( n T ) and 1 T2 log T ≥ ∆2 2 c′b2 2 . Therefore, ρ1 E[bρ1] is at most on the order of 1 + p n T log T and b2ρ2 −b2E[bρ2] is on the order of O(∆). Combining these derivations, we get that b2ρ2 −E[c rev] ≤O(∆2) + O n T  . This bound suggests that the revenue loss does not converge to 0 as T increases. Simulations in Section 5 show that our bound is in fact tight: the expected revenue loss for adaptive learning, in presence of sample selection bias, can be large and persistent. For many common uniform learning algorithms (uniformly random selection for instance) sample selection bias does not exist and so the expected revenue loss is smaller. This seems to suggest that, because of sample selection bias, adaptive algorithms are, from a revenue optimization perspective, inferior. The picture is switched however if we use a debiasing technique such as the one we propose in section 3.2. When sample selection bias is 0, adaptive algorithms yield better revenue because it is able to correctly identify the best advertisement with fewer rounds. We make this discussion concrete with the following results in which we assume a post-learning unbiasedness condition. Definition 3.1. We say that the post-learning unbiasedness condition holds if for all k, E[bρk] = ρk. This condition does not hold in general, but we provide a simple debiasing procedure in Section 3.2 to ensure that it always does. The following Corollary follows immediately from Theorem 3.1 with an application of Jensen’s inequality. Corollary 3.1. Suppose the post-learning unbiasedness condition holds. Let T0 ≤T adpt min ≤T unif min be defined as in Theorem 3.1. If we use either adaptive or uniform algorithms and T ≥T0, then b2ρ2 −E[c rev] ≤O p n T log T  . If we use adaptive algorithm and T ≥T adpt min or if we use uniform algorithm and T ≥T unif min , then b2ρ2 −E[c rev] ≤O  n T  The revenue loss guarantee is much stronger with the unbiasedness, which we confirm in our simulations in Section 5. Corollary 3.1 also shows that the revenue loss drops sharply from p n T log T to n T once T is larger than some threshold. Intuitively, this behavior exists because the probability of incorrect ranking becomes negligibly small when T is larger than the threshold. Because the adaptive learning threshold T adpt min is always smaller and often much smaller than the uniform learning threshold T unif min , Corollary 3.1 shows that adaptive learning can guarantee much lower revenue loss when T is between T adpt min and T unif min . It is in fact the same adaptiveness that leads to low regret that also leads to the strong revenue loss guarantees for adaptive learning algorithms. 3.2 Sample Selection Debiasing Given a MAB algorithm, one simple meta-algorithm to produce an unbiased estimator where the Tk’s still satisfy Definition 2.3 and 2.2 is to maintain “held-out” click history logs. Instead of keeping one history log for each advertisement, we will keep two; if the original algorithm allocates one impression to advertiser k, we will actually allocate two impressions at a time and record the click result of one of the impressions in the first history log and the click result of the other in the heldout history log. When the MAB algorithm requires estimators bρk’s or click data to make an allocation, we will allow it access only to the first history log. The estimator learned from the first history log is biased by the selection procedure but the heldout history log, since it does not influence the ad selection, can be used to output an unbiased estimator of each advertisement’s click probability at the end of the exploration stage. Although this scheme doubles the learning length, sample selection debiasing can significantly improve the guarantee on expected revenue as shown in both theory and simulations. 5 4 Advertisers’ Utilities and ELM Bias In this section, we analyze the impact of a MAB algorithm on advertisers’ utilities. The key result of this section is the adaptive algorithms can exacerbate the “estimation of the largest mean” (ELM) bias, which arises because expectation of the maximum is larger than the maximum of the expectation. This ELM bias will damage advertisers’ utilities because of overcharging. We will assume that the reader is familiar with the concept of incentive compatbility and give only a brief review. We suppose that there exists a true value vi, which exactly measures how much a click is worth to advertiser i. The utility per impression of advertiser i in the auction is then ρi(vi −pi) if the ad i is displayed where pi is the per-click payment charged by the search engine charges. An auction mechanism is called incentive compatible if the advertisers maximize their own utility by truthfully bidding: bi = vi. For auctions that are close but not fully incentive compatible, we also define player-regret as the utility lost by advertiser i in truthfully bidding vi rather than a bid that optimizes utility. 4.1 Player-Regret Analysis We define v = (v1, ..., vn) to be the true per-click values of the advertisers. We will for simplicity assume that the post-learning unbiasedness condition (Definition 3.1) holds for all our results in this section. We introduce some formal definitions before we begin our analysis. For a fixed vector of competing bids b−k, we define the player utility as uk(bk) ≡ Ibkbρk(bk)≥bk′ bρk′(bk)∀k′  vkρk − maxk′̸=k bk′ bρk′(bk) bρk(bk) ρk  , where Ibkbρk(bk)≥bk′ bρk′(bk)∀k′ is a 0/1 function indicating whether the impression is allocated to ad k. We define the player-regret, with respect to a bid vector b, as the player’s optimal gain in utility through false bidding supb E[uk(bk)] − E[uk(vk)]. It is important to note that we are hiding uk(bk)’s and bρk(bk)’s dependency on the competing bids b−k in our notation. Without loss of generality, we consider the utility of player 1. We fix b−1 and we define k∗≡arg maxk̸=1 bkρk. We divide our analysis into cases, which cover the different possible settings of v1 and competing bid b−1. Theorem 4.1. The following holds for both uniform and adaptive algorithms. Suppose bk∗ρk∗−v1ρ1 ≥ω(p n T log T), then, supb1 E[u1(b1)] −E[u1(v1)] ≤O n T  . Suppose |v1ρ1 −bk∗ρk∗| ≤O(p n T log T) , then supb1 E[u1(b1)] −E[u1(v1)] ≤O p n T log T  . Theorem 4.1 shows that when v1ρ1 is not much larger than bk∗ρk∗, the player-regret is not too large. The next Theorem shows that when v1ρ1 is much larger than bk∗ρk∗however, the player-regret can be large. Theorem 4.2. Suppose v1ρ1 −bk∗ρk∗≥ω p n T log T  , then, for both uniform and adaptive algorithms: ∀b1, E[u1(b1, b−1)]−E[u1(v1, b−1)] ≤max  0, E[b(2)(v1)bρ(2)(v1)] −E[b(2)(b1)bρ(2)(b1)] + O  n T  We give the proofs of both Theorem 4.1 and 4.2 in Section 5.3 of the appendix. Both expectations E[b(2)(v1)bρ(2)(v1)] and E[b(2)(b1)bρ(2)(b1)] can be larger than b2ρ2 because the E[maxk̸=1 bkbρk(v1)] ≥maxk̸=1 bkE[bρk(v1)]. Remark 4.1. In the special case of only two advertisers, it must be that (2) = 2 and therefore E[b(2)(v1)bρ(2)(v1)] = b2ρ2 and E[b(2)(v1)bρ(2)(v1)] = b2ρ2. The player-regret is then very small: supb1 E[u1(b1, b2)] −E[u1(v1, b2)] ≤O n T  . The incentive can be much larger when there are more than 2 advertisers. Intuitively, this is because the bias E[b(2)(b1)bρ(2)(b1)] −b2ρ2 increases when T2(b1), ..., Tn(b1) are low–that is, it increases when the variance of bρk(b1)′s are high. An omniscient advertiser 1, with the belief that v1ρ1 >> b2ρ2, can thus increase his/her utility by underbidding to manipulate the learning algorithm to allocate more rounds to advertisers 2, .., n and reduce the variance of bρk(b1)′s. Such a strategy will give advertiser 1 negative utility in the learning CTR learning stage, but it will yield positive utility in the longer SP auction stage and thus give an overall increase to the player utility. 6 In the case of uniform learning, the advertiser’s manipulation is limited because the learning algorithm is not significantly affected by the bid. Corollary 4.1. Let the competing bid vector b−1 be fixed. Suppose that v1ρ1 −bk∗ρk∗ ≥ ω p n T log T  . If uniform learning is used in the first stage, we have that sup b1 E[u1(b1, b−1)] −E[u1(v1, b−1)] ≤O r n T log T  Nevertheless, by contrasting this with p n T log T bound with the n T bound we would get in the two advertiser case, we see the negative impact of ELM bias on incentive compatibility. The negative effect is even more pronounced in the case of adaptive learning. Advertiser 1 can increase its own utility by bidding some b1 smaller than v1 but still large enough to ensure that b1bρ1(b1) still be ranked the highest at the end of the learning stage. We explain this intuition with more details in the following example, which we also simulate in Section 5. Example 4.1. Suppose we have n advertisers and b2ρ2 = b3ρ3 = ...bnρn. Suppose that v1ρ1 >> b2ρ2 and we will show that advertiser 1 has the incentive to underbid. Let ∆k(b1) ≡b1ρ1 −bkρk, then ∆k(b1)’s are the same for all k and ∆k(v1) >> 0 by previous supposition. Suppose advertiser 1 bids b1 < v1 but where ∆k(b1) >> 0 still. We assume that Tk(b1) = Θ  log T ∆k(b1)2  for all k = 2, ..., n, which must hold for large T by definition of adaptive learning. From Lemma 5.4 in the appendix, we know that E[b(2)(b1)bρ(2)(b1)] −b2ρ2 ≤ s log(n −1) Tk ≤ s log(n −1) log T (b1ρ1 −bkρk) (4.1) The Eqn. (4.1) is an upper bound but numerical experiments easily show that E[b(2)(b1)bρ(2)(b1)] is in fact on the same order as the RHS of Eqn. (4.1). From Eqn. (4.1), we derive that, for any b1 such that b1ρ1 −b2ρ2 ≥ω p n T log T  : E[u1(b1, b−1)] −E[u1(v1, b−1)] ≤O s log(n −1) log T (v1ρ1 −bρ1) ! Thus, we cannot guarantee that the mechanism is approximately truthful. The bound decreases with T at a very slow logarithmic rate because with adaptive algorithm, a longer learning period T might not reduce the variances of many of the estimators bρk’s. We would like to at this point briefly compare our results with that of [9], which shows, under an imperfect information definition of utility, that advertisers have an incentive to overbid so that the their CTRs can be better learned by the search engine. Our results are not contradictory since we show that only the leading advertiser have an incentive to underbid. 4.2 Bias Reduction in Estimation of the Largest Mean The previous analysis shows that the incentive-incompatibility issue in the case of adaptive learning is caused by the fact that the estimator b(2)bρ(2) = maxk̸=1 b2bρ2 is upward biased. E[b(2)bρ(2)] is much larger than b2ρ2 in general even if the individual estimators bρk’s are unbiased. We can abstract out the game theoretic setting and distill a problem known in the statistics literature as “Estimation of the Largest Mean” (ELM): given N probabilities {ρk}k=1,...,N, find an estimator bρmax such that E[bρmax] = maxk ρk. Unfortunately, as proved by [4] and [3], unbiased estimator for the largest mean does not exist for many common distributions including the Gaussian, Binomial, and Beta; we thus survey some methods for reducing the bias. [3] studies techniques that explicitly estimate and then substract the bias. Their method, though interesting, is specific to the case of selecting the larger mean among only two distributions. [1] 7 proposes a different approach based on data-splitting. We randomly partition the data in the clickthrough history into two sets S, E and get two estimators bρS k , bρE k . We then use bρS k for selection and output a weighted average λbρS k + (1 −λ)bρE k . We cannot use only bρE k for estimating the value because, without conditioning on a specific selection, it is downwardly biased. We unfortunately know of no principled way to choose λ. We implement this scheme with λ = 0.5 and show in simulation studies in Section 5 that it is effective. 5 Simulations We simulate our two stage framework for various values of T. Figures 1a and 1b show the effect of sample selection debiasing (see Section 3, 3.2) on the expected revenue where one uses adaptive learning. (the UCB algorithm 2.1 in our experiment) One can see that selection bias harms the revenue but the debiasing method described in Section 3.2, even though it holds out half of the click data, significantly lowers the expected revenue loss, as theoretically shown in Corollary 3.1. We choose the tuning parameter γ = 1. Figure 1c shows that when there are a large number of poor quality ads, low regret adaptive algorithms indeed achieve better revenue in much fewer rounds of learning. Figure 1d show the effect of estimation-of-the-largest-mean (ELM) bias on the utility gain of the advertiser. We simulate the setting of Example 4.1 and we see that without ELM debiasing, the advertiser can noticeably increase utility by underbidding. We implement the ELM debiasing technique described in Section 4.2; it does not completely address the problem since it does not completely reduce the bias (such a task has been proven impossible), but it does ameliorate the problem–the increase in utility from underbidding has decreased. 0 5000 10000 15000 −0.05 0 0.05 0.1 Rounds of Exploration Expected Revenue Loss no selection debiasing with selection debiasing (a) n = 2, ρ1 = 0.09, ρ2 = 0.1, b1 = 2, b2 = 1 0 5000 10000 15000 −0.05 0 0.05 0.1 Rounds of Exploration Expected Revenue Loss no selection debiasing with selection debiasing (b) n = 2, ρ1 = .3, ρ2 = 0.1, b1 = 0.7, b2 = 1 0 0.5 1 1.5 2 2.5 x 10 4 0 0.1 0.2 0.3 0.4 0.5 Rounds of Exploration Expected Revenue Loss uniform adaptive with debiasing (c) n = 42, ρ1 = .2, ρ2 = 0.15, b1 = 0.8, b2 = 1. All other bk = 1, ρk = 0.01. 0.8 0.9 1 1.1 1.2 −0.1 −0.05 0 0.05 0.1 Bid price Player Utility Gain no ELM debiasing with ELM debiasing (d) n = 5, ⃗ρ = {0.15, 0.11, 0.1, 0.05, 01}, ⃗b−1 = {0.9, 1, 2, 1} Figure 1: Simulation studies demonstrating effect of sample selection debiasing and ELM debiasing. The revenue loss in figures a to c is relative and is measured by 1 −revenue b2ρ2 ; negative loss indicate revenue improvement over oracle SP. Figure d shows advertiser 1’s utility gain as a function of possible bids. The vertical dotted black line denote the advertiser’s true value at v = 1. Utility gain is relative and defined as utility(b) utility(v) −1; higher utility gain implies that advertiser 1 can benefit more from strategic bidding. The expected value is computed over 500 simulated trials. 8 References [1] K. Alam. A two-sample estimate of the largest mean. Annals of the Institute of Statistical Mathematics, 19(1):271–283, 1967. [2] M. Babaioff, R.D. Kleinberg, and A. Slivkins. Truthful mechanisms with implicit payment computation. arXiv preprint arXiv:1004.3630, 2010. [3] S. Blumenthal and A. Cohen. Estimation of the larger of two normal means. Journal of the American Statistical Association, pages 861–876, 1968. [4] Bhaeiyal Ishwaei D, D. Shabma, and K. Krishnamoorthy. Non-existence of unbiased estimators of ordered parameters. Statistics: A Journal of Theoretical and Applied Statistics, 16(1):89–95, 1985. [5] N.R. Devanur and S.M. Kakade. The price of truthfulness for pay-per-click auctions. In Proceedings of the tenth ACM conference on Electronic commerce, pages 99–106, 2009. [6] Benjamin Edelman, Michael Ostrovsky, and Michael Schwarz. Internet advertising and the generalized second price auction: Selling billions of dollars worth of keywords. Technical report, National Bureau of Economic Research, 2005. [7] N. Gatti, A. Lazaric, and F. Trov`o. A truthful learning mechanism for contextual multi-slot sponsored search auctions with externalities. In Proceedings of the 13th ACM Conference on Electronic Commerce, pages 605–622. ACM, 2012. [8] R. Gonen and E. Pavlov. An incentive-compatible multi-armed bandit mechanism. In Proceedings of the twenty-sixth annual ACM symposium on Principles of distributed computing, pages 362–363. ACM, 2007. [9] S.M. Li, M. Mahdian, and R. McAfee. Value of learning in sponsored search auctions. Internet and Network Economics, pages 294–305, 2010. [10] Noam Nisan, Tim Roughgarden, Eva Tardos, and Vijay V Vazirani. Algorithmic game theory. Cambridge University Press, 2007. [11] Sandeep Pandey and Christopher Olston. Handling advertisements of unknown quality in search advertising. Advances in Neural Information Processing Systems, 19:1065, 2007. [12] A.D. Sarma, S. Gujar, and Y. Narahari. Multi-armed bandit mechanisms for multi-slot sponsored search auctions. arXiv preprint arXiv:1001.1414, 2010. [13] J. Wortman, Y. Vorobeychik, L. Li, and J. Langford. Maintaining equilibria during exploration in sponsored search auctions. Internet and Network Economics, pages 119–130, 2007. 9
2013
172
4,901
Learning Efficient Random Maximum A-Posteriori Predictors with Non-Decomposable Loss Functions Tamir Hazan University of Haifa Subhransu Maji TTI Chicago Joseph Keshet Bar-Ilan university Tommi Jaakkola CSAIL, MIT Abstract In this work we develop efficient methods for learning random MAP predictors for structured label problems. In particular, we construct posterior distributions over perturbations that can be adjusted via stochastic gradient methods. We show that any smooth posterior distribution would suffice to define a smooth PAC-Bayesian risk bound suitable for gradient methods. In addition, we relate the posterior distributions to computational properties of the MAP predictors. We suggest multiplicative posteriors to learn super-modular potential functions that accompany specialized MAP predictors such as graph-cuts. We also describe label-augmented posterior models that can use efficient MAP approximations, such as those arising from linear program relaxations. 1 Introduction Learning and inference in complex models drives much of the research in machine learning applications ranging from computer vision, natural language processing, to computational biology [1, 18, 21]. The inference problem in such cases involves assessing the likelihood of possible structured-labels, whether they be objects, parsers, or molecular structures. Given a training dataset of instances and labels, the learning problem amounts to estimation of the parameters of the inference engine, so as to best describe the labels of observed instances. The goodness of fit is usually measured by a loss function. The structures of labels are specified by assignments of random variables, and the likelihood of the assignments are described by a potential function. Usually, it is feasible to only find the most likely or maximum a-posteriori (MAP) assignment, rather than sampling according to their likelihood. Indeed, substantial effort has gone into developing algorithms for recovering MAP assignments, either based on specific parametrized restrictions such as super-modularity [2] or by devising approximate methods based on linear programming relaxations [21]. Learning MAP predictors is usually done by structured-SVMs that compare a “loss adjusted” MAP prediction to its training label [25]. In practice, most loss functions used decompose in the same way as the potential function, so as to not increase the complexity of the MAP prediction task. Nevertheless, non-decomposable loss functions capture the structures in the data that we would like to learn. Bayesian approaches for expected loss minimization, or risk, effortlessly deal with nondecomposable loss functions. The inference procedure samples a structure according to its likelihood, and computes its loss given a training label. Recently [17, 23] constructed probability models through MAP predictions. These “perturb-max” models describe the robustness of the MAP prediction to random changes of its parameters. Therefore, one can draw unbiased samples from these distributions using MAP predictions. Interestingly, when incorporating perturbmax models to Bayesian loss minimization one would ultimately like to use the PAC-Bayesian risk [11, 19, 3, 20, 5, 10]. Our work explores the Bayesian aspects that emerge from PAC-Bayesian risk minimization. We focus on computational aspects when constructing posterior distributions, so that they could be used 1 to minimize the risk bound efficiently. We show that any smooth posterior distribution would suffice to define a smooth risk bound which can be minimized through gradient decent. In addition, we relate the posterior distributions to the computational properties of MAP predictors. We suggest multiplicative posterior models to learn super-modular potential functions, that come with specialized MAP predictors such as graph-cuts [2]. We also describe label-augmented posterior models that can use MAP approximations, such as those arising from linear program relaxations [21]. 2 Background Learning complex models typically involves reasoning about the states of discrete variables whose labels (assignments of values) specify the discrete structures of interest. The learning task which we consider in this work is to fit parameters w that produce to most accurate prediction y ∈Y to a given object x. Structures of labels are conveniently described by a discrete product space Y = Y1 × · · · × Yn. We describe the potential of relating a label y to an object x with respect to the parameters w by real valued functions θ(y; x, w). Our goal is to learn the parameters w that best describe the training data (x, y) ∈S. Within Bayesian perspectives, the distribution that one learns given the training data is composed from a distribution over the parameter space qw(γ) and over the labels space P[y|w, x] ∝exp θ(y; x, w). Using the Bayes rule we derive the predictive distribution over the structures P[y|x] = Z P[y|γ, x]qw(γ)dγ (1) Unfortunately, sampling algorithms over complex models are provably hard in theory and tend to be slow in many cases of practical interest [7]. This is in contrast to the maximum a-posteriori (MAP) prediction, which can be computed efficiently for many practical cases, even when sampling is provably hard. (MAP predictor) yw(x) = arg max y1,...,yn θ(y; x, w) (2) Recently, [17, 23] suggested to change of the Bayesian posterior probability models to utilize the MAP prediction in a deterministic manner. These perturb-max models allow to sample from the predictive distribution with a single MAP prediction: (Perturb-max models) P[y|x] def = Pγ∼qw  y = yγ(x)  (3) A potential function is decomposed along a graphical model if it has the form θ(y; x, w) = P i∈V θi(yi; x, w) + P i,j∈E θi,j(yi, yj; x, w). If the graph has no cycles, MAP prediction can be computed efficiently using the belief propagation algorithm. Nevertheless, there are cases where MAP prediction can be computed efficiently for graph with cycles. A potential function is called supermodular if it is defined over Y = {−1, 1}n and its pairwise interactions favor adjacent states to have the same label, i.e., θi,j(−1, −1; x, w)+θi,j(1, 1; x, w) ≥θi,j(−1, 1; x, w)+θi,j(1, −1; x, w). In such cases MAP prediction reduces to computing the min-cut (graph-cuts) algorithm. Recently, a sequence of works attempt to solve the MAP prediction task for non-supermodular potential function as well as general regions. These cases usually involve potentials function that are described by a family R of subsets of variables r ⊂{1, ..., n}, called regions. We denote by yr the set of labels that correspond to the region r, namely (yi)i∈r and consider the following potential functions θ(y; x, w) = P r∈R θr(yr; x, w). Thus, MAP prediction can be formulated as an integer linear program: b∗∈arg max br(yr) X r,yr br(yr)θr(yr; x, w) (4) s.t. br(yr) ∈{0, 1}, X yr br(yr) = 1, X ys\yr bs(ys) = br(yr) ∀r ⊂s The correspondence between MAP prediction and integer linear program solutions is (yw(x))i = arg maxyi b∗ i (yi). Although integer linear program solvers provide an alternative to MAP prediction, they may be restricted to problems of small size. This restriction can be relaxed when one replaces the integral constraints br(yr) ∈{0, 1} with nonnegative constraints br(yr) ≥0. These 2 linear program relaxations can be solved efficiently using different convex max-product solvers, and whenever these solvers produce an integral solution it is guaranteed to be the MAP prediction [21]. Given training data of object-label pairs, the learning objective is to estimate a predictive distribution over the structured-labels. The goodness of fit is measured by a loss function L(ˆy, y). As we focus on randomized MAP predictors our goal is to learn the parameters w that minimize the expected perturb-max prediction loss, or randomized risk. We define the randomized risk at a single instancelabel pair as R(w, x, y) = X ˆy∈Y Pγ∼qw  ˆy = yγ(x)  L(ˆy, y). Alternatively, the randomized risk takes the form R(w, x, y) = Eγ∼qw[L(yγ(x), y)]. The randomized risk originates within the PAC-Bayesian generalization bounds. Intuitively, if the training set is an independent sample, one would expect that best predictor on the training set to perform well on unlabeled objects at test time. 3 Minimizing PAC-Bayesian generalization bounds Our approach is based on the PAC-Bayesian risk analysis of random MAP predictors. In the following we state the PAC-Bayesian generalization bound for structured predictors and describe the gradients of these bounds for any smooth posterior distribution. The PAC-Bayesian generalization bound describes the expected loss, or randomized risk, when considering the true distributions over object-labels in the world R(w) = E(x,y)∼ρ [R(w, x, y)]. It upper bounds the randomized risk by the empirical randomized risk RS(w) = 1 |S| P (x,y)∈S R(w, x, y) and a penalty term which decreases proportionally to the training set size. Here we state the PACBayesian theorem, that holds uniformly for all posterior distributions over the predictions. Theorem 1. (Catoni [3], see also [5]). Let L(ˆy, y) ∈[0, 1] be a bounded loss function. Let p(γ) be any probability density function and let qw(γ) be a family of probability density functions parameterized by w. Let KL(qw||p) = R qw(γ) log(qw(γ)/p(γ)). Then, for any δ ∈(0, 1] and for any real number λ > 0, with probability at least 1−δ over the draw of the training set the following holds simultaneously for all w R(w) ≤ 1 1 −exp(−λ)  λRS(w) + KL(qw||p) + log(1/δ) |S|  For completeness we present a proof sketch for the theorem in the appendix. This proof follows Seeger’s PAC-Bayesian approach [19], and extended to the structured label case [13]. The proof technique replaces prior randomized risk, with the posterior randomized risk that holds uniformly for every w, while penalizing this change by their KL-divergence. This change-of-measure step is close in spirit to the one that is performed in importance sampling. The proof is then concluded by simple convex bound on the moment generating function of the empirical risk. To find the best posterior distribution that minimizes the randomized risk, one can minimize its empirical upper bound. We show that whenever the posterior distributions have smooth probability density functions qw(γ), the perturb-max probability model is smooth as a function of w. Thus the randomized risk bound can be minimized with gradient methods. Theorem 2. Assume qw(γ) is smooth as a function of its parameters, then the PAC-Bayesian bound is smooth as a function of w: ∇wRS(w) = 1 |S| X (x,y)∈S Eγ∼qw h ∇w[log qw(γ)]L(yγ(x), y) i Moreover, the KL-divergence is a smooth function of w and its gradient takes the form: ∇wKL(qw||p) = Eγ∼qw h ∇w[log qw(γ)] log(qw(γ)/p(γ)) + 1 i Proof: First we note that R(w, x, y) = R qw(γ)L(yγ(x), y)dγ. Since qw(γ) is a probability density function and L(ˆy, y) ∈[0, 1] we can differentiate under the integral (cf. [4] Theorem 2.27). ∇wR(w, x, y) = Z ∇wqw(γ)L(yγ(x), y)dγ 3 Using the identity ∇wqw(γ) = qw(γ)∇w log(qw(γ)) the first part of the proof follows. The second part of the proof follows in the same manner, while noting that ∇w(qw(γ) log qw(γ)) = (∇wqw(γ))(log qw(γ) + 1). □ The gradient of the randomized empirical risk is governed by the gradient of the log-probability density function of its corresponding posterior model. For example, Gaussian model with mean w and identity covariance matrix has the probability density function qw(γ) ∝exp(−∥γ −w∥2/2), thus the gradient of its log-density is the linear moment γ, i.e., ∇w[log qw] = γ −w. Taking any smooth distribution qw(γ), we can find the parameters w by descending along the stochastic gradient of the PAC-Bayesian generalization bound. The gradient of the randomized empirical risk is formed by two expectations, over the sample points and over the posterior distribution. Computing these expectations is time consuming, thus we use a single sample ∇γ[log qw(γ)]L(yγ(x), y) as an unbiased estimator for the gradient. Similarly we estimate the gradient of the KL-divergence with an unbiased estimator which requires a single sample of ∇w[log qw(γ)](log(qw(γ)/p(γ)) + 1). This approach, called stochastic approximation or online gradient descent, amounts to use the stochastic gradient update rule w ←w −η · λ∇w[log qw(γ)]  L(yγ(x), y) + log(qw(γ)/p(γ)) + 1  where η is the learning rate. Next, we explore different posterior distributions from computational perspectives. Specifically, we show how to learn the posterior model so to ensure the computational efficiency of its MAP predictor. 4 Learning posterior distributions efficiently The ability to efficiently apply MAP predictors is key to the success of the learning process. Although MAP predictions are NP-hard in general, there are posterior models for which they can be computed efficiently. For example, whenever the potential function corresponds to a graphical model with no cycles, MAP prediction can be efficiently computed for any learned parameters w. Learning unconstrained parameters with random MAP predictors provides some freedom in choosing the posterior distribution. In fact, Theorem 2 suggests that one can learn any posterior distribution by performing gradient descent on its risk bound, as long as its probability density function is smooth. We show that for unconstrained parameters, additive posterior distributions simplify the learning problem, and the complexity of the bound (i.e., its KL-divergence) mostly depends on its prior distribution. Corollary 1. Let q0(γ) be a smooth probability density function with zero mean and set the posterior distribution using additive shifts qw(γ) = q0(γ −w). Let H(q) = −Eγ∼q[log q(γ)] be the entropy function. Then KL(qw||p) = −H(q0) −Eγ∼q0[log p(γ + w)] In particular, if p(γ) ∝exp(−∥γ∥2) is Gaussian then ∇wKL(qw||p) = w Proof: KL(qw||p) = −H(qw) −Eγ∼qw[log p(γ)]. By a linear change of variable, ˆγ = γ −w it follows that H(qw) = H(q0) thus ∇wH(qw) = 0. Similarly Eγ∼qw[log p(γ)] = Eγ∼q0[log p(γ + w)]. Finally, if p(γ) is Gaussian then Eγ∼q0[log p(γ + w)] = −w2 −Eγ∼q0[γ2]. □ This result implies that every additively-shifted smooth posterior distribution may consider the KLdivergence penalty as the square regularization when using a Gaussian prior p(γ) ∝exp(−∥γ∥2). This generalizes the standard claim on Gaussian posterior distributions [11], for which q0(γ) are Gaussians. Thus one can use different posterior distributions to better fit the randomized empirical risk, without increasing the computational complexity over Gaussian processes. Learning unconstrained parameters can be efficiently applied to tree structured graphical models. This, however, is restrictive. Many practical problems require more complex models, with many cycles. For some of these models linear program solvers give efficient, although sometimes approximate, MAP predictions. For supermodular models there are specific solvers, such as graph-cuts, that produce fast and accurate MAP predictions. In the following we show how to define posterior distributions that guarantee efficient predictions, thus allowing efficient sampling and learning. 4 4.1 Learning constrained posterior models MAP predictions can be computed efficiently in important practical cases, e.g., supermodular potential functions satisfying θi,j(−1, −1; x, w)+θi,j(1, 1; x, w) ≥θi,j(−1, 1; x, w)+θi,j(1, −1; x, w). Whenever we restrict ourselves to symmetric potential function θi,j(yi, yj; x, w) = wi,jyiyj, supermodularity translates to nonnegative constraint on the parameters wi,j ≥0. In order to model posterior distributions that allow efficient sampling we define models over the constrained parameter space. Unfortunately, the additive posterior models qw(γ) = q0(γ −w) are inappropriate for this purpose, as they have a positive probability for negative γ values and would generate nonsupermodular models. To learn constrained parameters one requires posterior distributions that respect these constraints. For nonnegative parameters we apply posterior distributions that are defined on the nonnegative real numbers. We suggest to incorporate the parameters of the posterior distribution in a multiplicative manner into a distribution over the nonnegative real numbers. For any distribution qα(γ) we determine a posterior distribution with parameters w as qw(γ) = qα(γ/w)/w. We show that multiplicative posterior models naturally provide log-barrier functions over the constrained set of nonnegative numbers. This property is important to the computational efficiency of the bound minimization algorithm. Corollary 2. For any probability distribution qα(γ), let qα,w(γ) = qα(γ/w)/w be the parametrized posterior distribution. Then KL(qα,w||p) = −H(qα) −log w −Eγ∼qα[log p(wγ)] Define the Gamma function Γ(α) = R ∞ 0 γα−1 exp(−γ). If p(γ) = qα(γ) = γα−1 exp(−γ)/Γ(α) have the Gamma distribution with parameter α, then Eγ∼qα[log p(wγ)] = (α −1) log w −αw. Alternatively, if p(γ) are truncated Gaussians then Eγ∼qα[log p(wγ)] = −α 2 w2 + log p π/2. Proof: The entropy of multiplicative posterior models naturally implies the log-barrier function: −H(qα,w) ˆγ=γ/w = Z qα(ˆγ)  log qα(ˆγ) −log w  dˆγ = −H(qα) −log w. Similarly, Eγ∼qα,w[log p(γ)] = Eγ∼qα[log p(wγ)]. The special cases for the Gamma and the truncated normal distribution follow by a direct computation. □ The multiplicative posterior distribution would provide the barrier function −log w as part of its KLdivergence. Thus the multiplicative posterior effortlessly enforces the constraints of its parameters. This property suggests that using multiplicative rules are computationally favorable. Interestingly, using a prior model with Gamma distribution adds to the barrier function a linear regularization term ∥w∥1 that encourages sparsity. On the other hand, a prior model with a truncated Gaussian adds a square regularization term which drifts the nonnegative parameters away from zero. A computational disadvantage of the Gaussian prior is that its barrier function cannot be controlled by a parameter α. 4.2 Learning posterior models with approximate MAP predictions MAP prediction can be phrased as an integer linear program, stated in Equation (4). The computational burden of integer linear programs can be relaxed when one replaces the integral constraints with nonnegative constraints. This approach produces approximate MAP predictions. An important learning challenge is to extend the predictive distribution of perturb-max models to incorporate approximate MAP solutions. Approximate MAP predictions are are described by the feasible set of their linear program relaxations, that is usually called the local polytope: L(R) = n br(yr) : br(yr) ≥0, X yr br(yr) = 1, ∀r ⊂s X ys\yr bs(ys) = br(yr) o Linear programs solutions are usually the extreme points of their feasible polytope. The local polytope is defined by a finite set of equalities and inequalities, thus it has a finite number of extreme points. The perturb-max model that is defined in Equation (3) can be effortlessly extended to the finite set of the local polytope extreme points [15]. This approach has two flaws. First, linear program solutions might not be extreme points, and decoding such a point usually requires additional 5 computational effort. Second, without describing the linear program solutions one cannot incorporate loss functions that take the structural properties of approximate MAP predictions into account when computing the the randomized risk. Theorem 3. Consider approximate MAP predictions that arise from relaxation of the MAP prediction problem in Equation (4). arg max br(yr) X r,yr br(yr)θr(yr; x, w) s.t. b ∈L(R) Then any optimal solution b∗is described by a vector ˜yw(x) in the finite power sets over the regions, ˜Y ⊂×r2Yr: ˜yw(x) = (˜yw,r(x))r∈R where ˜yw,r(x) = {yr : b∗ r(yr) > 0} Moreover, if there is a unique optimal solution b∗then it corresponds to an extreme point in the local polytope. Proof: The program is convex over a compact set, thus strong duality holds. Fixing the Lagrange multipliers λr→s(yr) that correspond to the marginal constraints P ys\yr bs(ys) = br(yr), and considering the probability constraints as the domain of the primal program, we derive the dual program X r max yr n θr(yr; x, w) + X c:c⊂r λc→r(yc) − X p:p⊃r λr→p(yr) o Lagrange optimality constraints (or equivalently, Danskin Theorem) determine the primal optimal solutions b∗ r(yr) to be probability distributions over the set arg maxyr{θr(yr; x, w) + P c:c⊂r λ∗ c→r(yc) −P p:p⊃r λ∗ r→p(yr)} that satisfy the marginalization constraints. Thus ˜yw,r(x) is the information that identifies the primal optimal solutions, i.e., any other primal feasible solution that has the same ˜yw,r(x) is also a primal optimal solution. □ This theorem extends Proposition 3 in [6] to non-binary and non-pairwise graphical models. The theorem describes the discrete structures of approximate MAP predictions. Thus we are able to define posterior distributions that use efficient, although approximate, predictions while taking into account their structures. To integrate these posterior distributions to randomized risk we extend the loss function to L(˜yw(x), y). One can verify that the results in Section 3 follow through, e.g., by considering loss functions L : ˜Y × ˜Y →[0, 1] while the training examples labels belong to the subset Y ⊂˜Y . 5 Empirical evaluation We perform experiments on an interactive image segmentation. We use the Grabcut dataset proposed by Blake et al. [1] which consists of 50 images of objects on cluttered backgrounds and the goal is to obtain the pixel accurate segmentations of the object given an initial “trimap” (see Figure 1). A trimap is an approximate segmentation of the image into regions that are well inside, well outside and the boundary of the object, something a user can easily specify in an interactive application. A popular approach for segmentation is the GrabCut approach [2, 1]. We learn parameters for the “Gaussian Mixture Markov Random Field” (GMMRF) formulation of [1] using a potential function over foreground/background segmentations Y = {−1, 1}n: θ(y; x, w) = P l∈V θi(yi; x, w) + P i,j∈E θi,j(yi, yj; x, w). The local potentials are θi(yi; x, w) = wyi log P(yi|x), where wyi are parameters to be learned while P(yi|x) are obtained from a Gaussian mixture model learned on the background and foreground pixels for an image x in the initial trimap. The pairwise potentials are θi,j(yi, yj; x, w) = wa exp(−(xi −xj)2)yiyj, where xi denotes the intensity of image x at pixel i, and wa are the parameters to be learned for the angles a ∈{0, 90, 45, −45}◦. These potential functions are supermodular as long as the parameters wa are nonnegative, thus MAP prediction can be computed efficiently with the graph-cuts algorithm. For these parameters we use multiplicative posterior model with the Gamma distribution. The dataset does not come with a standard training/test split so we use the odd set of images for training and even set of images for testing. We use stochastic gradient descent with the step parameter decaying as ηt = η to+t for 250 iterations. 6 Method Grabcut loss PASCAL loss Our method 7.77% 5.29% Structured SVM (hamming loss) 9.74% 6.66% Structured SVM (all-zero loss) 7.87% 5.63% GMMRF (Blake et al. [1]) 7.88% 5.85% Perturb-and-MAP ([17]) 8.19% 5.76% Table 1: Learning the Grabcut segmentations using two different loss functions. Our learned parameters outperform structured SVM approaches and Perturb-and-MAP moment matching Figure 1: Two examples of image (left), input “trimap” (middle) and the final segmentation (right) produced using our learned parameters. We use two different loss functions for training/testing for our approach to illustrate the flexibility of our approach for learning using various task specific loss functions. The “GrabCut loss” measures the fraction of incorrect pixels labels in the region specified as the boundary in the trimap. The “PASCAL loss”, which is commonly used in several image segmentation benchmarks, measures the ratio of the intersection and union of the foregrounds of ground truth segmentation and the solution. As a comparison we also trained parameters using moment matching of MAP perturbations [17] and structured SVM. We use a stochastic gradient approach with a decaying step size for 1000 iterations. Using structured SVM, solving loss-augmented inference maxˆy∈Y {L(y, ˆy) + θ(y; x, w)} with the hamming loss can be efficiently done using graph-cuts. We also consider learning parameters with all-zero loss function, i.e., L(y, ˆy) ≡0. To ensure that the weights remain non-negative we project the weights into the non-negative side after each iteration. Table 1 shows the results of learning using various methods. For the GrabCut loss, our method obtains comparable results to the GMMRF framework of [1], which used hand-tuned parameters. Our results are significantly better when PASCAL loss is used. Our method also outperforms the parameters learned using structured SVM and Perturb-and-MAP approaches. In our experiments the structured SVM with the hamming loss did not perform well – the loss augmented inference tended to focus on maximum violations instead of good solutions which causes the parameters to change even though the MAP solution has a low loss (a similar phenomenon was observed in [22]). Using the all-zero loss tends to produce better results in practice as seen in Table 1. Figure 1 shows some examples images, the input trimap, and the segmentations obtained using our approach. 6 Related work Recent years have introduced many optimization techniques that lend efficient MAP predictors for complex models. These MAP predictors can be integrated to learn complex models using structuredSVM [25]. Structured-SVM has a drawback, as its MAP prediction is adjusted by the loss function, therefore it has an augmented complexity. Recently, there has been an effort to efficiently integrate non-decomposable loss function into structured-SVMs [24]. However this approach does not hold for any loss function. Bayesian approaches to loss minimization treat separately the prediction process and the loss incurred, [12]. However, the Bayesian approach depends on the efficiency of its sampling procedure, but unfortunately, sampling in complex models is harder that the MAP prediction task [7]. The recent works [17, 23, 8, 9, 16] integrate efficient MAP predictors into Bayesian modeling. [23] describes the Bayesian perspectives, while [17, 8] describe their relations to the Gibbs distribution and moment matching. [9] provide unbiased samples form the Gibbs distribution using MAP predictors and [16] present their measure concentration properties. Other strategies for producing 7 (pseudo) samples efficiently include Herding [26]. However, these approaches do not consider risk minimization. The perturb-max models in Equation (3) play a key role in PAC-Bayesian theory [14, 11, 19, 3, 20, 5, 10]. The PAC-Bayesian approaches focus on generalization bounds to the object-label distribution. However, the posterior models in the PAC-Bayesian approaches were not extensively studied in the past. In most cases the posterior model remained undefined. [10] investigate linear predictors with Gaussian posterior models to have a structured-SVM like bound. This bound holds uniformly for every λ and its derivation is quite involved. In contrast we use Catoni’s PAC-Bayesian bound that is not uniform over λ but does not require the log |S| term [3, 5]. The simplicity of Catoni’s bound (see Appendix) makes it amenable to different extensions. In our work, we extend these results to smooth posterior distributions, while maintaining the quadratic regularization form. We also describe posterior distributions for non-linear models. In different perspective, [3, 5] describe the optimal posterior, but unfortunately there is no efficient sampling procedure for this posterior model. In contrast, our work explores posterior models which allow efficient sampling. We investigate two posterior models: the multiplicative models, for constrained MAP solvers such as graph-cuts, and posterior models for approximate MAP solutions. 7 Discussion Learning complex models requires one to consider non-decomposable loss functions that take into account the desirable structures. We suggest to use the Bayesian perspectives to efficiently sample and learn such models using random MAP predictions. We show that any smooth posterior distribution would suffice to define a smooth PAC-Bayesian risk bound which can be minimized using gradient decent. In addition, we relate the posterior distributions to the computational properties of the MAP predictors. We suggest multiplicative posterior models to learn supermodular potential functions that come with specialized MAP predictors such as graph-cuts algorithm. We also describe label-augmented posterior models that can use efficient MAP approximations, such as those arising from linear program relaxations. We did not evaluate the performance of these posterior models and further explorations of such models is required. The results here focus on posterior models that would allow for efficient sampling using MAP predictions. There are other cases for which specific posterior distributions might be handy, e.g., learning posterior distributions of Gaussian mixture models. In these cases, the parameters include the covariance matrix, thus would require to sample over the family of positive definite matrices. A Proof sketch for Theorem 1 Theorem 2.1 in [5]: For any distribution D over object-labels pairs, for any w-parametrized distribution qw, for any prior distribution p, for any δ ∈(0, 1], and for any convex function D : [0, 1] × [0, 1] →R, with probability at least 1 −δ over the draw of the training set the divergence D(Eγ∼qwRS(γ), Eγ∼qwR(γ)) is upper bounded simultaneously for all w by 1 |S| h KL(qw||p) + log 1 δ Eγ∼pES∼Dm exp mD(RS(γ), R(γ)) i For D(RS(γ), R(γ)) = F(R(γ)) −λRS(γ), the bound reduces to a simple convex bound on the moment generating function of the empirical risk: ES∼Dm exp mD(RS(γ, x, y), R(γ, x, y))  = exp(mF(R(γ)))ES∼Dm exp(−mλRS(γ)) Since the exponent function is a convex function of RS(γ) = RS(γ) · 1 + (1 −RS(γ)) · 0, the moment generating function bound is exp(−λRS(γ)) ≤ RS(γ) exp(−λ) + (1 −RS(γ)). Since ESRS(γ) = R(γ), the right term in the risk bound in can be made 1 when choosing F(R(γ)) to be the inverse of the moment generating function bound. This is Catoni’s bound [3, 5] for the structured labels case. To derive Theorem 1 we apply exp(−x) ≤1 −x to derive the lower bound (1 −exp(−λ))Eγ∼qwR(γ) −λEγ∼qwRS(γ) ≤ D(Eγ∼qwRS(γ), Eγ∼qwR(γ)). 8 References [1] Andrew Blake, Carsten Rother, Matthew Brown, Patrick Perez, and Philip Torr. Interactive image segmentation using an adaptive gmmrf model. In ECCV 2004, pages 428–441. 2004. [2] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. PAMI, 2001. [3] O. Catoni. Pac-bayesian supervised classification: the thermodynamics of statistical learning. arXiv preprint arXiv:0712.0248, 2007. [4] G.B. Folland. Real analysis: Modern techniques and their applications, john wiley & sons. New York, 1999. [5] P. Germain, A. Lacasse, F. Laviolette, and M. Marchand. Pac-bayesian learning of linear classifiers. In ICML, pages 353–360. ACM, 2009. [6] A. Globerson and T. S. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LP-relaxations. Advances in Neural Information Processing Systems, 21, 2007. [7] L.A. Goldberg and M. Jerrum. The complexity of ferromagnetic ising with local fields. Combinatorics Probability and Computing, 16(1):43, 2007. [8] T. Hazan and T. Jaakkola. On the partition function and random maximum a-posteriori perturbations. In Proceedings of the 29th International Conference on Machine Learning, 2012. [9] T. Hazan, S. Maji, and T. Jaakkola. On sampling from the gibbs distribution with random maximum a-posteriori perturbations. Advances in Neural Information Processing Systems, 2013. [10] J. Keshet, D. McAllester, and T. Hazan. Pac-bayesian approach for minimization of phoneme error rate. In ICASSP, 2011. [11] John Langford and John Shawe-Taylor. Pac-bayes & margins. Advances in neural information processing systems, 15:423–430, 2002. [12] Erich Leo Lehmann and George Casella. Theory of point estimation, volume 31. 1998. [13] Andreas Maurer. A note on the pac bayesian theorem. arXiv preprint cs/0411099, 2004. [14] D. McAllester. Simplified pac-bayesian margin bounds. Learning Theory and Kernel Machines, pages 203–215, 2003. [15] D. McAllester, T. Hazan, and J. Keshet. Direct loss minimization for structured prediction. Advances in Neural Information Processing Systems, 23:1594–1602, 2010. [16] Francesco Orabona, Tamir Hazan, Anand D Sarwate, and Tommi. Jaakkola. On measure concentration of random maximum a-posteriori perturbations. arXiv:1310.4227, 2013. [17] G. Papandreou and A. Yuille. Perturb-and-map random fields: Using discrete optimization to learn and sample from energy models. In ICCV, Barcelona, Spain, November 2011. [18] A.M. Rush and M. Collins. A tutorial on dual decomposition and lagrangian relaxation for inference in natural language processing. [19] Matthias Seeger. Pac-bayesian generalisation error bounds for gaussian process classification. The Journal of Machine Learning Research, 3:233–269, 2003. [20] Yevgeny Seldin. A PAC-Bayesian Approach to Structure Learning. PhD thesis, 2009. [21] D. Sontag, T. Meltzer, A. Globerson, T. Jaakkola, and Y. Weiss. Tightening LP relaxations for MAP using message passing. In Conf. Uncertainty in Artificial Intelligence (UAI), 2008. [22] Martin Szummer, Pushmeet Kohli, and Derek Hoiem. Learning crfs using graph cuts. In Computer Vision–ECCV 2008, pages 582–595. Springer, 2008. [23] D. Tarlow, R.P. Adams, and R.S. Zemel. Randomized optimum models for structured prediction. In AISTATS, pages 21–23, 2012. [24] Daniel Tarlow and Richard S Zemel. Structured output learning with high order loss functions. In International Conference on Artificial Intelligence and Statistics, pages 1212–1220, 2012. [25] B. Taskar, C. Guestrin, and D. Koller. Max-margin Markov networks. Advances in neural information processing systems, 16:51, 2004. [26] Max Welling. Herding dynamical weights to learn. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 1121–1128. ACM, 2009. 9
2013
173
4,902
q-OCSVM: A q-Quantile Estimator for High-Dimensional Distributions Assaf Glazer Michael Lindenbaum Shaul Markovitch Department of Computer Science, Technion - Israel Institute of Technology {assafgr,mic,shaulm}@cs.technion.ac.il Abstract In this paper we introduce a novel method that can efficiently estimate a family of hierarchical dense sets in high-dimensional distributions. Our method can be regarded as a natural extension of the one-class SVM (OCSVM) algorithm that finds multiple parallel separating hyperplanes in a reproducing kernel Hilbert space. We call our method q-OCSVM, as it can be used to estimate q quantiles of a highdimensional distribution. For this purpose, we introduce a new global convex optimization program that finds all estimated sets at once and show that it can be solved efficiently. We prove the correctness of our method and present empirical results that demonstrate its superiority over existing methods. 1 Introduction One-class SVM (OCSVM) [14] is a kernel-based learning algorithm that is often considered to be the method of choice for set estimation in high-dimensional data due to its generalization power, efficiency, and nonparametric nature. Let X be a training set of examples sampled i.i.d. from a continuous distribution F with Lebesgue density f in Rd. The OCSVM algorithm takes X and a parameter 0 < ν < 1, and returns a subset of the input space with a small volume while bounding a ν portion of examples in X outside the subset. Asymptotically, the probability mass of the returned subset converges to α = 1−ν. Furthermore, when a Gaussian kernel with a zero tending bandwidth is used, the solution also converges to the minimum-volume set (MV-set) at level α [19], which is a subset of the input space with the smallest volume and probability mass of at least α. In light of the above properties, the popularity of the OCSVM algorithm is not surprising. It appears, however, that in some applications we are not actually interested in estimating a single MV-set but in estimating multiple hierarchical MV-sets, which reveal more information about the distribution. For instance, in cluster analysis [5], we are interested in learning hierarchical MV-sets to construct a cluster tree of the distribution. In outlier detection [6], hierarchical MV-sets can be used to classify examples as outliers at different levels of significance. In statistical tests, hierarchical MV-sets are used for generalizing univariate tests to high-dimensional data [12, 4]. We are thus interested in a method that generalizes the OCSVM algorithm for approximating hierarchical MV-sets. By doing so we would leverage the advantages of the OCSVM algorithm in high-dimensional data and take it a step forward by extending its solution for a broader range of applications. Unfortunately, a straightforward approach of training a set of OCSVMs, one for each MV-set, would not necessarily satisfy the hierarchy requirement. Let q be the number of hierarchical MV-sets we would like to approximate. A naive approach would be to train q OCSVMs independently and enforce hierarchy by intersection operations on the resulting sets. However, we find two major drawbacks in this approach: (1) The ν-property of the OCSVM algorithm, which provides us with bounds on the number of examples in X lying outside or on the boundary of each set, is no longer guaranteed due to the intersection operator; (2) MV-sets of a distribution, which are also level sets of the distribution’s density f (under sufficient regularity conditions), are hierarchical by definition. Hence, 1 by learning q OCSVMs independently, we ignore an important property of the correct solution, and thus are less likely reach a generalized global solution. In this paper we introduce a generalized version of the OCSVM algorithm for approximating hierarchical MV-sets in high-dimensional distributions. As in the naive approach, approximated MV-sets in our method are represented as dense sets captured by separating hyperplanes in a reproducing kernel Hilbert space. However, our method does not suffer from the two drawbacks mentioned above. To preserve the ν-property of the solution while fulfilling the hierarchy constraint, we require the resulting hyperplanes to be parallel to one another. To provide a generalized global solution, we introduce a new convex optimization program that finds all approximated MV-sets at once. Furthermore, we expect our method to have better generalization ability due to the parallelism constraint imposed on the hyperplanes, which also acts as a regularization term on the solution. 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Q=4,N=100 Figure 1: An approximation of 4 hierarchical MV-sets We call our method q-OCSVM, as it can be used by statisticians to generalize q-quantiles to highdimensional distributions. Figure 1 shows an example of 4-quantiles estimated for two-dimensional data. We show that our method can be solved efficiently, and provide theoretical results showing that it preserves both the density assumption for each approximated set in the same sense suggested by [14]. In addition, we empirically compare our method to existing methods on a variety of real high-dimensional data and show its advantages in the examined domains. 2 Background In one-dimensional settings, q-quantiles, which are points dividing a cumulative distribution function (CDF) into equal-sized subsets, are widely used to understand the distribution of values. These points are well defined as the inverse of the CDF, that is, the quantile function. It would be useful to have the same representation of q-quantiles in high-dimensional settings. However, it appears that generalizing quantile functions beyond one dimension is hard since the number of ways to define them grows exponentially with the dimensions [3]. Furthermore, while various quantile regression methods [7, 16, 9] can be to used to estimate a single quantile of a high-dimensional distribution, extensions of those to estimate q-quantiles is mostly non-trivial. Let us first understand the exponential complexity involved in estimating a generalized quantile function in high-dimensional data. Let 0 < α1 < α2, . . . , < αq < 1 be a sequence of equallyspaced q quantiles. When d = 1, the quantile transforms F −1(αj) are uniquely defined as the points xj ∈R satisfying F(X ≤xj) ≤αj, where X is a random variable drawn from F. Equivalently, F −1(αj) can be identified with the unique hierarchical intervals [−∞, xj]. However, when d > 1, intervals are replaced by sets C1 ⊂C2 . . . ⊂, Cq that satisfy F(Cj) = αj but are not uniquely defined. Assume for a moment that these sets are defined only by imposing directions on d −1 dimensions (the direction of the first dimension can be chosen arbitrarily). Hence, we are left with 2d−1 possible ways of defining a generalized quantile function for the data. Hypothetically, any arbitrary hierarchical sets satisfying F(Cj) = αj can be used to define a valid generalized quantile function. Nevertheless, we would like the distribution to be dense in these sets so that the estimation will be informative enough. Motivated in this direction, Polonik [12] suggested using hierarchical MV-sets to generalize quantile functions. Let C(α) be the MV-set at level α with respect to F and the Lebesgue density f. Let Lf(c) = {x : f(x) ≥c} be the level set 2 of f at level c. Polonik observed that, under sufficient regularity conditions on f, Lf(c) is an MV-set of F at level α = F(Lf(c)). He thus suggested that level sets can be used as approximations of the MV-sets of a distribution. Since level sets are hierarchical by nature, a density estimator over X would be sufficient to construct a generalized quantile function. Polonik’s work was largely theoretical. In high-dimensional data, not only is the density estimation hard, but extracting level sets of the estimated density is also not always feasible. Furthermore, in high-dimensional settings, even attempting to estimate q hierarchical MV-sets of a distribution might be too optimistic an objective due to the exponential growth in the search space, which may lead to overfitted estimates, especially when the sample is relatively small. Consequently, various methods were proposed for estimating q-quantiles in multivariate settings without an intermediate density estimation step [3, 21, 2, 20]. However, these methods were usually efficient only up to a few dimensions. For a detailed discussion about generalized quantile functions, see Serfling [15]. One prominent method that uses a variant of the OCSVM algorithm for approximating level sets of a distribution was proposed by Lee and Scott [8]. Their method is called nested OCSVM (NOC-SVM) and it is based on a new quadratic program that simultaneously finds a global solution of multiple nested half-space decision functions. An efficient decomposition method is introduced to solve this program for large-scale problems. This program uses the C-SVM formulation of the OCSVM algorithm [18], where ν is replaced by a different parameter, C ≥0, and incorporates nesting constraints into the dual quadratic program of each approximated function. However, due to these difference formulations, our method converges to predefined q-quantiles of a distribution while theirs converges to approximated sets with unpredicted probability masses. The probability masses in their solution are even less trackable because the constraints imposed by the NOC-SVM program on the dual variables changes the geometric interpretation of the primal variables in a non-intuitive way. An improved quantile regression variant of the OCSVM algorithm that also uses “non-crossing” constraints to estimate “non-crossing” quantiles of a distribution was proposed by Takeuchi et al. [17]. However, similar to the NOC-SVM method, after enforcing these constraints, the ν-property of the solution is no longer guaranteed. Recently, a greedy hierarchical MV-set estimator (HMVE) that uses OCSVMs as a basic component was introduced by Glazer et al. [4]. This method approximates the MV-sets iteratively by training a sequence of OCSVMs, from the largest to the smallest sets. The superiority of HMVE was shown over a density-based estimation method and over a different hierarchical MV-set estimator that was also introduced in that paper and is based on the one-class neighbor machine (OCNM) algorithm [11]. However, as we shall see in experiments, it appears that approximations in this greedy approach tend to become less accurate as the required number of MV-sets increases, especially for approximated MV-sets with small α in the last iterations. In contrast to the naive approach of training q OCSVMs independently 1, our q-OCSVM estimator preserves the ν-property of the solution and converges to a generalized global solution. In contrast to the NOC-SVM algorithm, q-OCSVM converges to predefined q-quantiles of a distribution. In contrast to the HMVE estimator, q-OCSVM provides global and stable solutions. As will be seen, we support these advantages of our method in theoretical and empirical analysis. 3 The q-OCSVM Estimator In the following we introduce our q-OCSVM method, which generalizes the OCSVM algorithm so that its advantages can be applied to a broader range of applications. q stands for the number of MV-sets we would like our method to approximate. Let X = {x1, . . . , xn} be a set of feature vectors sampled i.i.d. with respect to F. Consider a function Φ : Rd →F mapping the feature vectors in X to a hypersphere in an infinite Hilbert space F. Let H be a hypothesis space of half-space decision functions fC(x) = sgn ((w · Φ(x)) −ρ) such that fC(x) = +1 if x ∈C, and −1 otherwise. The OCSVM algorithm returns a function fC ∈H that maximizes the margin between the half-space decision boundary and the origin in F, while bounding a portion of examples in X satisfying fC(x) = −1. This bound is predefined by a parameter 0 < ν < 1, and it is also called the ν-property of the OCSVM algorithm. This function is 1In the following we call this method I-OCSVM (independent one-class SVMs). 3 specified by the solution of this quadratic program: min w∈F,ξ∈Rn,ρ∈R 1 2||w||2 −ρ + 1 νn X i ξi, s.t. (w · Φ (xi)) ≥ρ −ξi, ξi ≥0, (1) where ξ is a vector of the slack variables. All training examples xi for which (w · Φ(x))−ρ ≤0 are called support vectors (SVs). Outliers are referred to as examples that strictly satisfy (w · Φ(x)) − ρ < 0. By solving the program for ν = 1 −α, we can use the OCSVM to approximate C(α). Let 0 < α1 < α2, . . . , < αq < 1 be a sequence of q quantiles. Our goal is to generalize the OCSVM algorithm for approximating a set of MV-sets {C1, . . . , Cq} such that a hierarchy constraint Ci ⊆Cj is satisfied for i < j. Given X, our q-OCSVM algorithm solves this primal program: min w,ξj,ρj q 2||w||2 − q X j=1 ρj + q X j=1 1 νjn X i ξj,i s.t. (w · Φ (xi)) ≥ρj −ξj,i, ξj,i ≥0, j ∈[q], i ∈[n], (2) where νj = 1 −αj. This program generalizes Equation (1) to the case of finding multiple, parallel half-space decision functions by searching for a global minimum over their sum of objective functions: the coupling between q half-spaces is done by summing q OCSVM programs, while enforcing these programs to share the same w. As a result, the q half-spaces in the solution of Equation (2) are different only by their bias terms, and thus parallel to each other. This program is convex, and thus a global minimum can be found in polynomial time. It is important to note that even with an ideal, unbounded number of examples, this program does not necessarily converge to the exact MV-sets but to approximated MV-sets of a distribution. As we shall see in Section 4, all decision functions returned by this program preserve the ν-property. We argue that the stability of these approximated MV-sets benefits from the parallelism constraint imposed on the half-spaces in H, which acts as a regularizer. In the following we show that our program can be solved efficiently in its dual form. Using multipliers ηj,i ≥0, βj,i ≥0, the Lagrangian of this program is L (w, ξq, ρ1, . . . , ρq, η, β) = q 2||w||2 − q X j=1 ρj + q X j=1 1 νjn X i ξj,i − q X j=1 X i ηj,i ((Φ (xi) · wj) −ρj + ξj,i) − q X j=1 X i βj,iξj,i. (3) Setting the derivatives to be equal to zero with respect to the primal variables w, ρj, ξj yields w = 1 q X j,i ηj,iΦ(xi), X i ηj,i = 1, 0 ≤ηji ≤ 1 nνj , i ∈[n], j ∈[q]. (4) Substituting Equation (4) into Equation (3), and replacing the dot product (Φ(xi) · Φ(xs))F with a kernel function k (xi, xs) 2, we obtain the dual program min η 1 2q X j,p∈[q] X i,s∈[n] ηj,iηp,sk (xi, xs), s.t. X i ηj,i = 1, 0 ≤ηji ≤ 1 nνj , i ∈[n], j ∈[q]. (5) Similar to the formulation of the dual objective function in the original OCSVM algorithm, our dual program depends only on the η multipliers, and hence can be solved more efficiently than the primal one. The resulting decision function for j’th estimate is fCj(x) = sgn 1 q X i η∗ i k (xi, x) −ρj ! , (6) 2A Gaussian kernel function k(xi, xs) = e−γ||xi−xs||2 was used in the following. 4 where η∗ i = Pq j=1 ηj,i. This efficient formulation of the decision function, which derives from the fact that parallel half-spaces share the same w, allows us to compute the outputs of all the q decision functions simultaneously. As in the OCSVM algorithm, ρj are recovered by identifying points Φ (xj,i) lying strictly on the j’th decision boundary. These points are identified using the condition 0 < ηj,i < 1 nνj . Therefore, ρj can be recovered from a point sv satisfying this condition by ρj = (w · Φ (sv)) = 1 q X i η∗ i k (xi, sv). (7) Figure 1 shows the resulting estimates of our q-OCSVM method for 4 hierarchical MV-sets with α = 0.2, 0.4, 0.6, 0.8 3. 100 train examples drawn i.i.d. from a bimodal distribution are marked with black dots. It can be seen that the number of bounded SVs (outliers) at each level is no higher than 100(1 −αj), as expected according to the properties of our q-OCSVM estimator, which will be proven in the following section. 4 Properties of the q-OCSVM Estimator In this section we provide theoretical results for the q-OCSVM estimator. The program we solve is different from the one in Equation (1). Hence, we can not rely on the properties of OCSVM to prove the properties of our method. We provide instead similar proofs, in the spirit of Sch¨olkopf et al. [14] and Glazer et al. [4], with some additional required extensions. Definition 1. A set X = {x1, . . . , xn} is separable if there exists some w such that (Φ(xi) · w) > 0 for all i ∈{1, . . . , n}. Note that if a Gaussian kernel is used (implies k(xi, xs) > 0), as in our case, then X is separable. Theorem 1. If X is separable, then a feasible solution exists for Equation (2) with ρj > 0 for all j ∈{1, . . . , q}. Proof. Define M as the convex hull of Φ(x1), · · · , Φ(xn). Note that since X is separable, M does not contain the origin. Then, by the supporting hyperplane theorem [10], there exists a hyperplane (Φ(xi) · w)−ρ that contains M on one side of it and does not contain the origin. Hence, −→0 · w  − ρ < 0, which leads to ρ > 0. Note that the solution ρj = ρ for all j ∈[q] is a feasible solution for Equation (2). The following theorem shows that the regions specified by the decision functions fC1, . . . , fCq are (a) approximations for the MV-sets in the same sense suggested by Sch¨olkopf et al., and (b) hierarchically nested. Theorem 2. Let fC1, . . . , fCq be the decision functions returned by the q-OCSVM estimator with parameters {α1, . . . , αq}, X, k (·, ·). Assume X is separable. Let SVoj be the set of SVs lying strictly outside Cj, and SVbj be the set of SVs lying exactly on the boundary of Cj. Then, the following statements hold:(1) Cj ⊆Ck for αj < αk. (2) |SVoj | |X| ≤1 −αj ≤ |SVbj |+|SVoj | |X| . (3) Suppose X is i.i.d. drawn from a distribution F which does not contain discrete components, and k (·, ·) is analytic and non-constant. Then, |SVoj | |X| is asymptotically equal to 1 −αj. Proof. Cj and Ck are associated with two parallel half-spaces in H with the same w. Therefore, statement (1) can be proven by showing that ρj ≥ρk. αj < αk leads to ρj ≥ρk since otherwise the optimality of Equation (2) would be contradicted. Assume by negation that νj = 1 −αj > |SVbj |+|SVoj | |X| for some j ∈[q] in the optimal solution of Equation (2). Note that when parallelshifting the optimal hyperplane by slightly increasing ρj, the term P i ξj,i in the equation will change proportionally to |SVbj| + |SVoj|. However, since |SVbj |+|SVoj | |X|νj < 1, a slight increase in ρj will 3Detailed setup parameters are discussed in Section 5. 5 result in a decrease in the objective function, which contradicts the optimality of the hyperplane. The same goes for the other direction: Assume by negation that |SVoj | |X| > 1 −αj for some j ∈[q] in the optimal solution of Equation (2). Then, a slight decrease in ρj will result in a decrease in the objective function, which contradicts the optimality of the hyperplane. We are now left to prove statement (3): The covering number of the class of fCj functions (which are induced by k) is wellbehaved. Hence, asymptotically, the probability of points lying exactly on the hyperplanes converges to zero (cf. 13). 5 Empirical Results We extensively evaluated the effectiveness of our q-OCSVM method on a variety of real highdimensional data from the UCI repository and the 20-Newsgroup document corpus, and compared its performance to competing methods. 5.1 Experiments on the UCI Repository We first evaluated our method on datasets taken from the UCI repository 4. From each examined dataset, a random set of 100 examples from the most frequent label was used as the training set X. The remaining examples from the same label were used as the test set. We used all UCI datasets with more than 50 test examples — a total of 61 data sets. The average number of features for a dataset is 113 5. We compared the performance of our q-OCSVM method to three alternative methods that generalize the OCSVM algorithm: HMVE (hierarchical minimum-volume estimator) [4], I-OCSVM (independent one-class SVMs), and NOC-SVM (nested one-class SVM) [8]. For the NOC-SVM method, we used the implementation provided by the authors 6. The LibSVM package [1] was used to implement the HMVE and I-OCSVM methods. An implementation of our q-OCSVM estimator is available from: http://www.cs.technion.ac.il/˜assafgr/articles/q-ocsvm.html. All experiments were carried out with a Gaussian kernel (γ = 1 2σ2 = 2.5 #features). For each data set, we trained the reference methods to approximate hierarchical MV-sets at levels α1 = 0.05, α2 = 0.1 . . . , α19 = 0.95 (19-quantiles) 7. Then, we evaluated the estimated q-quantiles with the test set. Since the correct MV-sets are not known for the data, the quality of the approximated MV-sets was evaluated by the coverage ratio (CR): Let α′ be the empirical proportion of the approximated MV-sets that was measured with the test data. The expected proportion of examples that lie within the MV-set C(α) is α. The coverage ratio is defined as α′ α . A perfect MV-set approximation method would yield a coverage ratio of 1.0 for all approximated MV-sets 8. An advantage of choosing this measure for evaluation is that it gives more weight for differences between α and α′ in small quantiles associated with regions of high probability mass. Results on test data for each approximated MV-set are shown in Figure 2. The left graph displays in bars the empirical proportion of test examples in the approximated MV-sets (α′) as a function of the expected proportion (α) averaged over all 61 data sets. The right graph displays the coverage ratio of test examples as a function of α averaged over all 61 data sets. It can be seen that our q-OCSVM method dominates the others with the best average α′ and average coverage ratio behaviors. In each quantile separately, we tested the significance of the advantage of q-OCSVM over the competitors using the Wilcoxon statistical test over the absolute difference between the expected and empirical coverage ratios (|1.0−CR|). The superiority of our method against the three competitors was found significant, with P < 0.01, for each of the 19 quantiles separately. The I-OCSVM method shows inferior performance to that of q-OCSVM. We ascribe this behavior to the fact that it trains q OCSVMs independently, and thus reaches a local solution. Furthermore, we 4archive.ics.uci.edu/ml/datasets.html 5Nominal features were transformed into numeric ones using binary encoding; missing values were replaced by their features’ average values. 6http://web.eecs.umich.edu/˜cscott 7The equivalent C (λ) parameters of the NOC-SVM were initialized as suggested by the authors. 8In outlier detection, this measure reflects the ratio between expected and empirical false alarm rates. 6 believe that by ignoring the fundamental hierarchical structure of MV-sets, the I-OCSVM method is more likely than ours to reach an overfitted solution. The HMVE method shows a decrease in performance from the largest to the smallest α. We assume this is due to the greedy nature of this method. HMVE approximates the MV-sets iteratively by training a sequence of OCSVMs, from the largest to the smallest α . OCSVMs trained later in the sequence are thus more constrained in their approximations by solutions from previous iterations, so that the error in approximations accumulates over time. This is in contrast to q-OCSVM, which converges to a global minimum, and hence is more scalable than HMVE with respect to the number of approximated MV-sets (q). The NOC-SVM method performs poorly in comparison to the other methods. This is not surprising, since, unlike the other methods, we cannot set the parameters of NOC-SVM to converge to predefined q-quantiles. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 α α′ UCI−test: Q=19 q−OCSVM HMVE I−OCSVM NOC−SVM 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 α coverage ratio (CR) 20News−test: Q=19,N=824.7213 q−OCSVM HMVE I−OCSVM NOC−SVM Figure 2: The q-OCSVM, HMVE, I-OCSVM, and NOC-SVM methods were trained to estimate 19-quantiles for the distribution of the most frequent label on the 61 UCI datasets. Left: α′ as a function of α averaged over all datasets. Right: The coverage ratio as a function of α averaged over all datasets. Interestingly, the solutions produced by the HMVE and I-OCSVM methods for the largest approximated MV-set (associated with α19 = 0.95) are equal to the solution of a single OCSVM algorithm trained with ν = 1 −α19 = 0.05. This equality derives from the definition of the HMVE and I-OCSVM methods. Therefore, in this setup, we claim that q-OCSVM also outperforms the OCSVM algorithm in the approximation of a single MV-set, and it does so with an average coverage ratio of 0.871 versus 0.821. We believe this improved performance is due to the parallelism constraint imposed by the q-OCSVM method on the hyperplanes, which acts as a regularization term on the solution. This observation is an interesting research direction to address in our future studies. In terms of runtime complexity, our q-OCSVM method has higher computational complexity than HMVE and I-OCSVM, because we solve a global optimization problem rather than a series of smaller localized subproblems. However, with regard to the runtime complexity on test samples, our method is more efficient than HMVE and I-OCSVM by a factor of q, since the distances from each half-space only differ by their bias terms (ρj). With regard to the choice of the Gaussian kernel width, parameter tuning for one-class classifiers, in particular for OCSVMs, is an ongoing research area. Unlike binary classification tasks, negative examples are not available to estimate the optimality of the solution. Consequently, we employed a common practice [1] of using a fixed width, divided by the number of features. However, in future studies, it would be interesting to consider alternative optimization criteria to allow tuning parameters with a cross-validation. For instance, using the average coverage ratio over all quantiles as an optimality criterion. 5.2 Experiments on Text Data We evaluated our method on an additional setup of high-dimensional text data. We used the 20Newsgroup document corpus 9. 500 words with the highest frequency count were picked to generate 9The 20-Newsgroup corpus is at http://people.csail.mit.edu/jrennie/20Newsgroups. 7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 α α′ 20Newsgroups−test: Q=19 q−OCSVM HMVE I−OCSVM 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 α coverage ratio (CR) 20News−test: Q=19,N=842.3 q−OCSVM HMVE I−OCSVM Figure 3: The q-OCSVM, HMVE, and I-OCSVM methods were trained to estimate 19 quantiles for the distribution of the 20 categories in the 20-Newsgroup document corpus. Left: α′ as a function of α averaged over all 20 categories. Right: The coverage ratio as a function of α averaged over all 20 categories. 500 bag-of-words features. We use the sorted-by-date version of the corpus with 18846 documents associated with 20 news categories. From this series of documents, the first 100 documents from each category were used as the training set X. The subsequent documents from the same category were used as the test set. We trained the reference methods with X to estimate 19-quantiles of a distribution, and evaluated the estimated q-quantiles with the test set. Results on test data for each approximated MV-set are shown in Figure 3 in the same manner as in Figure 2 10. Unlike the experiments on the UCI repository, results in these experiments are not so close to the optimum, but still can provide useful information about the distributions. Again, our qOCSVM method dominates the others with the best average α′ and average coverage ratio behaviors. According to the Wilcoxon statistical test with P < 0.01, our method performs significantly better than the other competitors for each of the 19 quantiles separately. It can be seen that the differences in coverage ratios between q-OCSVM and I-OCSVM in the largest quantile (associated with α19 = 0.95) are relatively high, where the average coverage ratio for q-OCSVM is 0.555, and 0.452 for I-OCSVM. Recall that the solution of I-OCSVM in the largest quantile is equal to the solution of a single OCSVM algorithm trained with ν = 0.05. These results are aligned with our conclusions from the UCI repository experiments, that the parallelism constraint, which acts as a regularizer, may lead to improved performance even for the approximation of a single MV-set. 6 Summary The q-OCSVM method introduced in this paper can be regarded as a generalized OCSVM, as it finds multiple parallel separating hyperplanes in a reproducing kernel Hilbert space. Theoretical properties of our methods are analyzed, showing that it can be used to approximate a family of hierarchical MV-sets while preserving the guaranteed separation properties (ν-property), in the same sense suggested by Sch¨olkopf et al.. Our q-OCSVM method is empirically evaluated on a variety of high-dimensional data from the UCI repository and the 20-Newsgroup document corpus, and its advantage is verified in this setup. We believe that our method will benefit practitioners whose goal is to model distributions by q-quantiles in complex settings, where density estimation is hard to apply. An interesting direction for future research would be to evaluate our method on problems in specific domains that utilize q-quantiles for distribution representation. These domains include cluster analysis, outlier detection, and statistical tests. 10Results for NOC-SVM were omitted from the graphs due to the limitation of the method in q-quantile estimation, which results in inferior performance also in this setup. 8 References [1] Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a library for support vector machines, 2001. [2] Yixin Chen, Xin Dang, Hanxiang Peng, and Henry L. Bart. Outlier detection with the kernelized spatial depth function. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(2):288–305, 2009. [3] G. Fasano and A. Franceschini. A multidimensional version of the Kolmogorov-Smirnov test. Monthly Notices of the Royal Astronomical Society, 225:155–170, 1987. [4] A. Glazer, M. Lindenbaum, and S. Markovitch. Learning high-density regions for a generalized Kolmogorov-Smirnov test in high-dimensional data. In NIPS, pages 737–745, 2012. [5] John A Hartigan. Clustering Algorithms. John Wiley & Sons, Inc., 1975. [6] V. Hodge and J. Austin. A survey of outlier detection methodologies. Artificial Intelligence Review, 22(2):85–126, 2004. [7] Roger Koenker. Quantile regression. Cambridge university press, 2005. [8] Gyemin Lee and Clayton Scott. Nested support vector machines. Signal Processing, IEEE Transactions on, 58(3):1648–1660, 2010. [9] Youjuan Li, Yufeng Liu, and Ji Zhu. Quantile regression in reproducing kernel hilbert spaces. Journal of the American Statistical Association, 102(477):255–268, 2007. [10] D.G. Luenberger and Y. Ye. Linear and Nonlinear Programming. Springer, 3rd edition, 2008. [11] A. Munoz and J.M. Moguerza. Estimation of high-density regions using one-class neighbor machines. In PAMI, pages 476–480, 2006. [12] W. Polonik. Concentration and goodness-of-fit in higher dimensions:(asymptotically) distribution-free methods. The Annals of Statistics, 27(4):1210–1229, 1999. [13] B. Sch¨olkopf, A.J. Smola, R.C. Williamson, and P.L. Bartlett. New support vector algorithms. Neural Computation, 12(5):1207–1245, 2000. [14] Bernhard Sch¨olkopf, John C. Platt, John C. Shawe-Taylor, Alex J. Smola, and Robert C. Williamson. Estimating the support of a high-dimensional distribution. Neural Computation, 13(7):1443–1471, 2001. [15] R. Serfling. Quantile functions for multivariate analysis: approaches and applications. Statistica Neerlandica, 56(2):214–232, 2002. [16] Ingo Steinwart, Don R Hush, and Clint Scovel. A classification framework for anomaly detection. In JMLR, pages 211–232, 2005. [17] Ichiro Takeuchi, Quoc V Le, Timothy D Sears, and Alexander J Smola. Nonparametric quantile estimation. JMLR, 7:1231–1264, 2006. [18] Vladimir N. Vapnik. The Nature of Statistical Learning Theory. Springer-Verlag, New York, 2nd edition, 1998. [19] R. Vert and J.P. Vert. Consistency and convergence rates of one-class svms and related algorithms. The Journal of Machine Learning Research, 7:817–854, 2006. [20] W. Zhang, X. Lin, M.A. Cheema, Y. Zhang, and W. Wang. Quantile-based knn over multivalued objects. In ICDE, pages 16–27. IEEE, 2010. [21] Yijun Zuo and Robert Serfling. General notions of statistical depth function. The Annals of Statistics, 28(2):461–482, 2000. 9
2013
174
4,903
Fantope Projection and Selection: A near-optimal convex relaxation of sparse PCA Vincent Q. Vu The Ohio State University vqv@stat.osu.edu Juhee Cho University of Wisconsin, Madison chojuhee@stat.wisc.edu Jing Lei Carnegie Mellon University leij09@gmail.com Karl Rohe University of Wisconsin, Madison karlrohe@stat.wisc.edu Abstract We propose a novel convex relaxation of sparse principal subspace estimation based on the convex hull of rank-d projection matrices (the Fantope). The convex problem can be solved efficiently using alternating direction method of multipliers (ADMM). We establish a near-optimal convergence rate, in terms of the sparsity, ambient dimension, and sample size, for estimation of the principal subspace of a general covariance matrix without assuming the spiked covariance model. In the special case of d = 1, our result implies the near-optimality of DSPCA (d’Aspremont et al. [1]) even when the solution is not rank 1. We also provide a general theoretical framework for analyzing the statistical properties of the method for arbitrary input matrices that extends the applicability and provable guarantees to a wide array of settings. We demonstrate this with an application to Kendall’s tau correlation matrices and transelliptical component analysis. 1 Introduction Principal components analysis (PCA) is a popular technique for unsupervised dimension reduction that has a wide range of application—science, engineering, and any place where multivariate data is abundant. PCA uses the eigenvectors of the sample covariance matrix to compute the linear combinations of variables with the largest variance. These principal directions of variation explain the covariation of the variables and can be exploited for dimension reduction. In contemporary applications where variables are plentiful (large p) but samples are relatively scarce (small n), PCA suffers from two major weaknesses : 1) the interpretability and subsequent use of the principal directions is hindered by their dependence on all of the variables; 2) it is generally inconsistent in high-dimensions, i.e. the estimated principal directions can be noisy and unreliable [see 2, and the references therein]. Over the past decade, there has been a fever of activity to address the drawbacks of PCA with a class of techniques called sparse PCA that combine the essence of PCA with the assumption that the phenomena of interest depend mostly on a few variables. Examples include algorithmic [e.g., 1, 3–10] and theoretical [e.g., 11–14] developments. However, much of this work has focused on the first principal component. One rationale behind this focus is by analogy with ordinary PCA: additional components can be found by iteratively deflating the input matrix to account for variation uncovered by previous components. However, the use of deflation with sparse PCA entails complications of non-orthogonality, sub-optimality, and multiple tuning parameters [15]. Identifiability and consistency present more subtle issues. The principal directions of variation correspond to eigenvectors of some population matrix Σ. There is no reason to assume a priori that the d largest eigenvalues 1 of Σ are distinct. Even if the eigenvalues are distinct, estimates of individual eigenvectors can be unreliable if the gap between their eigenvalues is small. So it seems reasonable, if not necessary, to de-emphasize eigenvectors and to instead focus on their span, i.e. the principal subspace of variation. There has been relatively little work on the problem of estimating the principal subspace or even multiple eigenvectors simultaneously. Most works that do are limited to iterative deflation schemes or optimization problems whose global solution is intractable to compute. Sole exceptions are the diagonal thresholding method [2], which is just ordinary PCA applied to the subset of variables with largest marginal sample variance, or refinements such as iterative thresholding [16], which use diagonal thresholding as an initial estimate. These works are limited, because they cannot be used when the variables have equal variances (e.g., correlation matrices). Theoretical results are equally limited in their applicability. Although the optimal minimax rates for the sparse principal subspace problem are known in both the spiked [17] and general [18] covariance models, existing statistical guarantees only hold under the restrictive spiked covariance model, which essentially guarantees that diagonal thresholding has good properties, or for estimators that are computationally intractable. In this paper, we propose a novel convex optimization problem to estimate the d-dimensional principal subspace of a population matrix Σ based on a noisy input matrix S. We show that if S is a sample covariance matrix and the projection Π of the d-dimensional principal subspace of Σ depends only on s variables, then with a suitable choice of regularization parameter, the Frobenius norm of the error of our estimator ! X is bounded with high probability ||| ! X −Π|||2 = O " (λ1/δ)s # log p/n $ where λ1 is the largest eigenvalue of Σ and δ the gap between the dth and (d + 1)th largest eigenvalues of Σ. This rate turns out to be nearly minimax optimal (Corollary 3.3), and under additional assumptions on signal strength, it also allows us to recover the support of the principal subspace (Theorem 3.2). Moreover, we provide easy to verify conditions (Theorem 3.3) that yield nearoptimal statistical guarantees for other choices of input matrix, such as Pearson’s correlation and Kendall’s tau correlation matrices (Corollary 3.4). Our estimator turns out to be a semidefinite program (SDP) that generalizes the DSPCA approach of [1] to d ≥1 dimensions. It is based on a convex body, called the Fantope, that provides a tight relaxation for simultaneous rank and orthogonality constraints on the positive semidefinite cone. Solving the SDP is non-trivial. We find that an alternating direction method of multipliers (ADMM) algorithm [e.g., 19] can efficiently compute its global optimum (Section 4). In summary, the main contributions of this paper are as follows. 1. We formulate the sparse principal subspace problem as a novel semidefinite program with a Fantope constraint (Section 2). 2. We show that the proposed estimator achieves a near optimal rate of convergence in subspace estimation without assumptions on the rank of the solution or restrictive spiked covariance models. This is a first for both d = 1 and d > 1 (Section 3). 3. We provide a general theoretical framework that accommodates other matrices, in addition to sample covariance, such as Pearson’s correlation and Kendall’s tau. 4. We develop an efficient ADMM algorithm to solve the SDP (Section 4), and provide numerical examples that demonstrate the superiority of our approach over deflation methods in both computational and statistical efficiency (Section 5). The remainder of the paper explains each of these contributions in detail, but we defer all proofs to Appendix A. Related work Existing work most closely related to ours is the DSPCA approach for single component sparse PCA that was first proposed in [1]. Subsequently, there has been theoretical analysis under a spiked covariance model and restrictions on the entries of the eigenvectors [11], and algorithmic developments including block coordinate ascent [9] and ADMM [20]. The crucial difference with our work is that this previous work only considered d = 1. The d > 1 case requires invention and novel techniques to deal with a convex body, the Fantope, that has never before been used in sparse PCA. 2 Notation For matrices A, B of compatible dimension ⟨A, B⟩:= tr(AT B) is the Frobenius inner product, and |||A|||2 2 := ⟨A, A⟩is the squared Frobenius norm. ∥x∥q is the usual ℓq norm with ∥x∥0 defined as the number of nonzero entries of x. ∥A∥a,b is the (a, b)-norm defined to be the ℓb norm of the vector of rowwise ℓa norms of A, e.g. ∥A∥1,∞is the maximum absolute row sum. For a symmetric matrix A, we define λ1(A) ≥λ2(A) ≥· · · to be the eigenvalues of A with multiplicity. When the context is obvious we write λj := λj(A) as shorthand. For two subspaces M1 and M2, sin Θ(M1, M2) is defined to be the matrix whose diagonals are the sines of the canonical angles between the two subspaces [see 21, §VII]. 2 Sparse subspace estimation Given a symmetric input matrix S, we propose a sparse principal subspace estimator ! X that is defined to be a solution of the semidefinite program maximize ⟨S, X⟩−λ∥X∥1,1 subject to X ∈Fd, (1) in the variable X, where Fd := % X : 0 ≼X ≼I and tr(X) = d & is a convex body called the Fantope [22, §2.3.2], and λ ≥0 is a regularization parameter that encourages sparsity. When d = 1, the spectral norm bound in Fd is redundant and (1) reduces to the DSPCA approach of [1]. The motivation behind (1) is based on two key insights. The first insight is a variational characterization of the principal subspace of a symmetric matrix. The sum of the d largest eigenvalues of a symmetric matrix A can be expressed as d ' i=1 λi(A) (a) = max V T V =Id ⟨A, V V T ⟩ (b) = max X∈Fd⟨A, X⟩. (2) Identity (a) is an extremal property known as Ky Fan’s maximum principle [23]; (b) is based on the less well known observation that Fd = conv({V V T : V T V = Id}) , i.e. the extremal points of Fd are the rank-d projection matrices. See [24] for proofs of both. The second insight is a connection between the (1, 1)-norm and a notion of subspace sparsity introduced by [18]. Any X ≽0 can be factorized (non-uniquely) as X = V V T . Lemma 2.1. If X = V V T , then ∥X∥1,1 ≤∥V ∥2 2,1 ≤∥V ∥2 2,0 tr(X). Consequently, any X ∈Fd that has at most s non-zero rows necessarily has ∥X∥1,1 ≤s2d. Thus, ∥X∥1,1 is a convex relaxation of what [18] call row sparsity for subspaces. These two insights reveal that (1) is a semidefinite relaxation of the non-convex problem maximize ⟨S, V V T ⟩−λ∥V ∥2 2,0d subject to V T V = Id . [18] proposed solving an equivalent form of the above optimization problem and showed that the estimator corresponding to its global solution is minimax rate optimal under a general statistical model for S. Their estimator requires solving an NP-hard problem. The advantage of (1) is that it is computationally tractable. Subspace estimation The constraint ! X ∈Fd guarantees that its rank is ≥d. However ! X need not be an extremal point of Fd, i.e. a rank-d projection matrix. In order to obtain a proper d-dimensional subspace estimate, we can extract the d leading eigenvectors of ! X, say !V , and form the projection matrix !Π = !V !V T . The projection is unique, but the choice of basis is arbitrary. We can follow the convention of standard PCA by choosing an orthogonal matrix O so that (!V O)T S(!V O) is diagonal, and take !V O as the orthonormal basis for the subspace estimate. 3 3 Theory In this section we describe our theoretical framework for studying the statistical properties of ! X given by (1) with arbitrary input matrices that satisfy the following assumptions. Assumption 1 (Symmetry). S and Σ are p × p symmetric matrices. Assumption 2 (Identifiability). δ = δ(Σ) = λd(Σ) −λd+1(Σ) > 0. Assumption 3 (Sparsity). The projection Π onto the subspace spanned by the eigenvectors of Σ corresponding to its d largest eigenvalues satisfies ∥Π∥2,0 ≤s, or equivalently, ∥diag(Π)∥0 ≤s. The key result (Theorem 3.1 below) implies that the statistical properties of the error of the estimator ∆:= ! X −Π , can be derived, in many cases, by routine analysis of the entrywise errors of the input matrix W := S −Σ . There are two main ideas in our analysis of ! X. The first is relating the difference in the values of the objective function in (1) at Π and ! X to ∆. The second is exploiting the decomposability of the regularizer. Conceptually, this is the same approach taken by [25] in analyzing the statistical properties of regularized M-estimators. It is worth noting that the curvature result in our problem comes from the geometry of the constraint set in (1). It is different from the “restricted strong convexity” in [25], a notion of curvature tailored for regularization in the form of penalizing an unconstrained convex objective. 3.1 Variational analysis on the Fantope The first step of our analysis is to establish a bound on the curvature of the objective function along the Fantope and away from the truth. Lemma 3.1 (Curvature). Let A be a symmetric matrix and E be the projection onto the subspace spanned by the eigenvectors of A corresponding to its d largest eigenvalues λ1 ≥λ2 ≥· · · . If δA = λd −λd+1 > 0, then δA 2 |||E −F|||2 2 ≤⟨A, E −F⟩ for all F satisfying 0 ≼F ≼I and tr(F) = d. A version of Lemma 3.1 first appeared in [18] with the additional restriction that F is a projection matrix. Our proof of the above extension is a minor modification of their proof. The following is an immediate corollary of Lemma 3.1 and the Ky Fan maximal principle. Corollary 3.1 (A sin Θ theorem [18]). Let A,B be symmetric matrices and MA, MB be their respective d-dimensional principal subspaces. If δA,B = [λd+1(A)−λd(A)]∨[λd+1(B)−λd(B)], then |||sin Θ(MA, MB)|||2 ≤ √ 2 δA,B |||A −B|||2 . The advantage of Corollary 3.1 over the Davis-Kahan Theorem [see, e.g., 21, §VII.3] is that it does not require a bound on the differences between eigenvalues of A and eigenvalues of B. This means that typical applications of the Davis-Kahan Theorem require the additional invocation of Weyl’s Theorem. Our primary use of this result is to show that even if rank( ! X) ̸= d, its principal subspace will be close to that of Π if ∆is small. Corollary 3.2 (Subspace error bound). If M is the principal d-dimensional subspace of Σ and ( M is the principal d-dimensional subspace of ! X, then |||sin Θ(M, ( M)|||2 ≤ √ 2|||∆|||2 . 4 3.2 Deterministic error With Lemma 3.1, it is straightforward to prove the following theorem. Theorem 3.1 (Deterministic error bound). If λ ≥∥W∥∞,∞and s ≥∥Π∥2,0 then |||∆|||2 ≤4sλ/δ . Theorem 3.1 holds for any global optimizer ! X of (1). It does not assume that the solution is rank-d as in [11]. The next theorem gives a sufficient condition for support recovery by diagonal thresholding ! X. Theorem 3.2 (Support recovery). For all t > 0 )){j : Πjj = 0, ! Xjj ≥t} )) + )){j : Πjj ≥2t, ! Xjj < t} )) ≤|||∆|||2 2 t2 . As a consequence, the variable selection procedure !J(t) := % j : ! Xjj ≥t & succeeds if minj:Πjj̸=0 Πjj ≥2t > 2|||∆|||2. 3.3 Statistical properties In this section we use Theorem 3.1 to derive the statistical properties of ! X in a generic setting where the entries of W uniformly obey a restricted sub-Gaussian deviation inequality. This is not the most general result possible, but it allows us to illustrate the statistical properties of ! X for two different types of input matrices: sample covariance and Kendall’s tau correlation. The former is the standard input for PCA; the latter has recently been shown to be a useful robust and nonparametric tool for high-dimensional graphical models [26]. Theorem 3.3 (General statistical error bound). If there exists σ > 0 and n > 0 such that Σ and S satisfy max ij P " |Sij −Σij| ≥t $ ≤2 exp " −4nt2/σ2$ (3) for all t ≤σ and λ = σ # log p/n ≤σ , (4) then ||| ! X −Π|||2 ≤4σ δ s # log p/n with probability at least 1 −2/p2. Sample covariance Consider the setting where the input matrix is the sample covariance matrix of a random sample of size n > 1 from a sub-Gaussian distribution. A random vector Y with Σ = Var(Y ) has sub-Gaussian distribution if there exists a constant L > 0 such that P " |⟨Y −EY, u⟩| ≥t $ ≤exp " −Lt2/∥Σ1/2u∥2 2 $ (5) for all u and t ≥0. Under this condition we have the following corollary of Theorem 3.3. Corollary 3.3. Let S be the sample covariance matrix of an i.i.d. sample of size n > 1 from a sub-Gaussian distribution (5) with population covariance matrix Σ. If λ is chosen to satisfy (4) with σ = cλ1, then ||| ! X −Π|||2 ≤C λ1 δ s # log p/n with probablity at least 1 −2/p2, where c, C are constants depending only on L. Comparing with the minimax lower bounds derived in [17, 18], we see that the rate in Corollary 3.3 is roughly larger than the optimal minimax rate by a factor of # λ1/λd+1 · # s/d The first term only becomes important in the near-degenerate case where λd+1 ≪λ1. It is possible with much more technical work to get sharp dependence on the eigenvalues, but we prefer to retain brevity and clarity in our proof of the version here. The second term is likely to be unimprovable without additional conditions on S and Σ such as a spiked covariance model. Very recently, [14] showed in a testing framework with similar assumptions as ours when d = 1 that the extra factor √s is necessary for any polynomial time procedure if the planted clique problem cannot be solved in randomized polynomial time. 5 Kendall’s tau Kendall’s tau correlation provides a robust and nonparametric alternative to ordinary (Pearson) correlation. Given an n × p matrix whose rows are i.i.d. p-variate random vectors, the theoretical and empirical versions of Kendall’s tau correlation matrix are τij := Cor " sign(Y1i −Y2i) , sign(Y1j −Y2j) $ ˆτij := 2 n(n −1) ' s<t sign(Ysi −Yti) sign(Ysj −Ytj) . A key feature of Kendall’s tau is that it is invariant under strictly monotone transformations, i.e. sign(Ysi −Yti) sign(Ysj −Ytj)) = sign(fi(Ysi) −fi(Yti)) sign(fj(Ysj) −fj(Ytj)) , where fi, fj are strictly monotone transformations. When Y is multivariate Gaussian, there is also a one-to-one correspondence between τij and ρij = Cor(Y1i, Y1j) [27] : τij = 2 π arcsin(ρij) . (6) These two observations led [26] to propose using !Tij = *sin " π 2 ˆτij $ if i ̸= j 1 if i = j . (7) as an input matrix to Gaussian graphical model estimators in order to extend the applicability of those procedures to the wider class of nonparanormal distributions [28]. This same idea was extended to sparse PCA by [29]; they proposed and analyzed using !T as an input matrix to the non-convex sparse PCA procedure of [13]. A shortcoming of that approach is that their theoretical guarantees only hold for the global solution of an NP-hard optimization problem. The following corollary of Theorem 3.3 rectifies the situation by showing that ! X with Kendall’s tau is nearly optimal. Corollary 3.4. Let S = !T as defined in (7) for an i.i.d. sample of size n > 1 and let Σ = T be the analogous quantity with τij in place of ˆτij. If λ is chosen to satisfy (4) with σ = √ 8π, then ||| ! X −Π|||2 ≤8 √ 2π δ s # log p/n with probablity at least 1 −2/p2. Note that Corollary 3.4 only requires that ˆτ be computed from an i.i.d. sample. It does not specify the marginal distribution of the observations. So Σ = T is not necessarily positive semidefinite and may be difficult to interpret. However, under additional conditions, the following lemma gives meaning to T by extending (6) to a wide class of distributions, called transelliptical by [29], that includes the nonparanormal. See [29, 30] for further information. Lemma ([29, 30]). If (Y11, . . . , Y1p) has continuous distribution and there exist monotone transformations f1, . . . , fp such that " f1(Y11), . . . , fp(Y1p) $ has elliptical distribution with scatter matrix ˜Σ, then Tij = ˜Σij/ + ˜Σii ˜Σjj . Moreover, if fj(Y1j), j = 1, . . . , p have finite variance, then Tij = Cor " fi(Y1i), fj(Y1j) $ . This lemma together with Corollary 3.4 shows that Kendall’s tau can be used in place of the sample correlation matrix for a wide class of distributions without much loss of efficiency. 4 An ADMM algorithm The chief difficulty in directly solving (1) is the interaction between the penalty and the Fantope constraint. Without either of these features, the optimization problem would be much easier. ADMM can exploit this fact if we first rewrite (1) as the equivalent equality constrained problem minimize ∞· 1Fd(X) −⟨S, X⟩+ λ∥Y ∥1,1 subject to X −Y = 0 , (8) 6 Algorithm 1 Fantope Projection and Selection (FPS) Require: S = ST , d ≥1, λ ≥0, ρ > 0, ϵ > 0 Y (0) ←0, U (0) ←0 ◃Initialization repeat t = 0, 1, 2, 3, . . . X(t+1) ←PFd " Y (t) −U (t) + S/ρ $ ◃Fantope projection Y (t+1) ←Sλ/ρ " X(t+1) + U (t)$ ◃Elementwise soft thresholding U (t+1) ←U (t) + X(t+1) −Y (t+1) ◃Dual variable update until max(|||X(t) −Y (t)|||2 2 , ρ2|||Y (t) −Y (t−1)|||2 2) ≤dϵ2 ◃Stopping criterion return Y (t) in the variables X and Y , where 1Fd is the 0-1 indicator function for Fd and we adopt the convention ∞· 0 = 0. The augmented Lagrangian associated with (8) has the form Lρ(X, Y, U) := ∞· 1Fd(X) −⟨S, X⟩+ λ∥Y ∥1,1 + ρ 2 , |||X −Y + U|||2 2 −|||U|||2 2 , (9) where U = (1/ρ)Z is the scaled ADMM dual variable and ρ is the ADMM penalty parameter [see 19, §3.1]. ADMM consists of iteratively minimizing Lρ with respect to X, minimizing Lρ with respect to Y , and then updating the dual variable. Algorithm 1 summarizes the main steps. In light of the separation of X and Y in (9) and some algebraic manipulation, the X and Y updates reduce to computing the proximal operators PFd " Y −U + S/ρ $ := arg min X∈Fd 1 2|||X −(Y −U + S/ρ)|||2 2 Sλ/ρ(X + U) := arg min Y λ ρ ∥Y ∥1,1 + 1 2|||(X + U) −Y |||2 2 . Sλ/ρ is the elementwise soft thresholding operator [e.g., 19, §4.4.3] defined as Sλ/ρ(x) = sign(x) max(|x| −λ/ρ, 0) . PFd is the Euclidean projection onto Fd and is given in closed form in the following lemma. Lemma 4.1 (Fantope projection). If X = . i γiuiuT i is a spectral decomposition of X, then PFd(X) = . i γ+ i (θ)uiuT i , where γ+ i (θ) = min(max(γi −θ, 0), 1) and θ satisfies the equation . i γ+ i (θ) = d. Thus, PFd(X) involves computing an eigendecomposition of Y , and then modifying the eigenvalues by solving a monotone, piecewise linear equation. Rather than fix the ADMM penalty parameter ρ in Algorithm 1 at some constant value, we recommend using the varying penalty scheme described in [19, §3.4.1] that dynamically updates ρ after each iteration of the ADMM to keep the primal and dual residual norms (the two sum of squares in the stopping criterion of Algorithm 1) within a constant factor of each other. This eliminates an additional tuning parameter, and in our experience, yields faster convergence. 5 Simulation results We conducted a simulation study to compare the effectiveness of FPS against three deflation-based methods: DSPCA (which is just FPS with d = 1), GPowerℓ1 [7], and SPC [5, 6]. These methods obtain multiple component estimates by taking the kth component estimate ˆvk from input matrix Sk, and then re-running the method with the deflated input matrix: Sk+1 = (I −ˆvkˆvT k )Sk(I −ˆvkˆvT k ). The resulting d-dimensional principal subspace estimate is the span of ˆv1, . . . , ˆvd. Tuning parameter selection can be much more complicated for these iterative deflation methods. In our simulations, we simply fixed the regularization parameter to be the same for all d components. We generated input matrices by sampling n = 100, i.i.d. observations from a Np(0, Σ), p = 200 distribution and taking S to be the usual sample covariance matrix. We considered two different types of sparse Π = V V T of rank d = 5: those with disjoint support for the nonzero entries of the 7 s:10, noise:1 s:10, noise:10 s:25, noise:1 s:25, noise:10 −3 −2 −1 0 1 −1 0 1 support:disjoint support:shared 5 10 20 30 5 10 20 30 5 10 20 30 5 10 20 30 (2,1)−norm of estimate log(MSE) Figure 1: Mean squared error of FPS ( ), DSPCA with deflation ( ), GPowerℓ1 ( ), and SPC ( ) across 100 replicates each of a variety of simulation designs with n = 100, p = 200, d = 5, s ∈{10, 25}, noise σ2 ∈{1, 10}. columns of V and those with shared support. We generated V by sampling its nonzero entries from a standard Gaussian distribution and then orthnormalizing V while retaining the desired sparsity pattern. In both cases, the number of nonzero rows of V is equal to s ∈{10, 25}. We then embedded Π inside the population covariance matrix Σ = αΠ + (I −Π)Σ0(I −Π), where Σ0 is a Wishart matrix with p degrees of freedom and α > 0 is chosen so that the effective noise level (in the optimal minimax rate [18]), σ2 = # λ1λd+1/(λd −λd+1) ∈{1, 10}. Figure 1 summarizes the resulting mean squared error |||!Π −Π|||2 2 across 100 replicates for each of the different combinations of simulation parameters. Each method’s regularization parameter varies over a range and the x-axis shows the (2, 1)-norm of the corresponding estimate. At the right extreme, all methods essentially correspond to standard PCA. It is clear that regularization is beneficial, because all the methods have significantly smaller MSE than standard PCA when they are sufficiently sparse. Comparing between methods, we see that FPS dominates in all cases, but the competition is much closer in the disjoint support case. Finally, all methods degrade when the number of active variables or noise level increases. 6 Discussion Estimating sparse principal subspaces in high-dimensions poses both computational and statistical challenges. The contribution of this paper—a novel SDP based estimator, an efficient algorithm, and strong statistical guarantees for a wide array of input matrices—is a significant leap forward on both fronts. Yet, there are newly open problems and many possible extensions related to this work. For instance, it would be interesting to investigate the performance of FPS a under weak, rather than exact, sparsity assumption on Π (e.g., ℓq, 0 < q ≤sparsity). The optimization problem (1) and ADMM algorithm can easily be modified handle other types of penalties. In some cases, extensions of Theorem 3.1 would require minimal modifications to its proof. Finally, the choices of dimension d and regularization parameter λ are of great practical interest. Techniques like cross-validation need to be carefully formulated and studied in the context of principal subspace estimation. Acknowledgments This research was supported in part by NSF grants DMS-0903120, DMS-1309998, BCS-0941518, and NIH grant MH057881. 8 References [1] A. d’Aspremont et al. “A direct formulation of sparse PCA using semidefinite programming ”. In: SIAM Review 49.3 (2007). [2] I. M. Johnstone and A. Y. Lu. “On consistency and sparsity for principal components analysis in high dimensions ”. In: JASA 104.486 (2009), pp. 682–693. [3] I. T. Jolliffe, N. T. Trendafilov, and M. Uddin. “A modified principal component technique based on the Lasso ”. In: JCGS 12 (2003), pp. 531–547. [4] H. Zou, T. Hastie, and R. Tibshirani. “Sparse principal component analysis ”. In: JCGS 15.2 (2006), pp. 265–286. [5] H. Shen and J. Z. Huang. “Sparse principal component analysis via regularized low rank matrix approximation ”. In: Journal of Multivariate Analysis 99 (2008), pp. 1015–1034. [6] D. M. Witten, R. Tibshirani, and T. Hastie. “A penalized matrix decomposition, with applications to sparse principal components and canonical correlation analysis ”. In: Biostatistics 10 (2009), pp. 515– 534. [7] M. Journee et al. “Generalized power method for sparse principal component analysis ”. In: JMLR 11 (2010), pp. 517–553. [8] B. K. Sriperumbudur, D. A. Torres, and G. R. G. Lanckriet. “A majorization-minimization approach to the sparse generalized eigenvalue problem ”. In: Machine Learning 85.1–2 (2011), pp. 3–39. [9] Y. Zhang and L. E. Ghaoui. “Large-scale sparse principal component analysis with application to text data ”. In: NIPS 24. Ed. by J. Shawe-Taylor et al. 2011, pp. 532–539. [10] X. Yuan and T. Zhang. “Truncated power method for sparse eigenvalue problems ”. In: JMLR 14 (2013), pp. 899–925. [11] A. A. Amini and M. J. Wainwright. “High-dimensional analysis of semidefinite relaxations for sparse principal components ”. In: Ann. Statis. 37.5B (2009), pp. 2877–2921. [12] A. Birnbaum et al. “Minimax bounds for sparse pca with noisy high-dimensional data ”. In: Ann. Statis. 41.3 (2013), pp. 1055–1084. [13] V. Q. Vu and J. Lei. “Minimax rates of estimation for sparse PCA in high dimensions ”. In: AISTATS 15. Ed. by N. Lawrence and M. Girolami. Vol. 22. JMLR W&CP. 2012, pp. 1278–1286. [14] Q. Berthet and P. Rigollet. “Computational lower bounds for sparse PCA ”. In: (2013). arXiv: 1304. 0828. [15] L. Mackey. “Deflation methods for sparse PCA ”. In: NIPS 21. Ed. by D. Koller et al. 2009, pp. 1017– 1024. [16] Z. Ma. “Sparse principal component analysis and iterative thresholding ”. In: Ann. Statis. 41.2 (2013). [17] T. T. Cai, Z. Ma, and Y. Wu. “Sparse PCA: optimal rates and adaptive estimation ”. In: Ann. Statis. (2013). to appear. arXiv: 1211.1309. [18] V. Q. Vu and J. Lei. “Minimax sparse principal subspace estimation in high dimensions ”. In: Ann. Statis. (2013). to appear. arXiv: 1211.0373. [19] S. Boyd et al. “Distributed optimization and statistical learning via the alternating direction method of multipliers ”. In: Foundations and Trends in Machine Learning 3.1 (2010), pp. 1–122. [20] S. Ma. “Alternating direction method of multipliers for sparse principal component analysis ”. In: (2011). arXiv: 1111.6703. [21] R. Bhatia. Matrix analysis. Springer-Verlag, 1997. [22] J. Dattorro. Convex optimization & euclidean distance geometry. Meboo Publishing USA, 2005. [23] K. Fan. “On a theorem of Weyl concerning eigenvalues of linear transformations I ”. In: Proceedings of the National Academy of Sciences 35.11 (1949), pp. 652–655. [24] M. Overton and R. Womersley. “On the sum of the largest eigenvalues of a symmetric matrix ”. In: SIAM Journal on Matrix Analysis and Applications 13.1 (1992), pp. 41–45. [25] S. N. Negahban et al. “A unified framework for the high-dimensional analysis of M-estimators with decomposable regularizers ”. In: Statistical Science 27.4 (2012), pp. 538–557. [26] H. Liu et al. “High-dimensional semiparametric gaussian copula graphical models ”. In: Ann. Statis. 40.4 (2012), pp. 2293–2326. [27] W. H. Kruskal. “Ordinal measures of association ”. In: JASA 53.284 (1958), pp. 814–861. [28] H. Liu, J. Lafferty, and L. Wasserman. “The nonparanormal: semiparametric estimation of high dimensional undirected graphs ”. In: JMLR 10 (2009), pp. 2295–2328. [29] F. Han and H. Liu. “Transelliptical component analysis ”. In: NIPS 25. Ed. by P. Bartlett et al. 2012, pp. 368–376. [30] F. Lindskog, A. McNeil, and U. Schmock. “Kendall’s tau for elliptical distributions ”. In: Credit Risk. Ed. by G. Bol et al. Contributions to Economics. Physica-Verlag HD, 2003, pp. 149–156. 9
2013
175
4,904
Fast Template Evaluation with Vector Quantization Mohammad Amin Sadeghi Department of Computer Science University of Illinois at Urbana-Champaign msadegh2@illinois.edu David Forsyth Department of Computer Science University of Illinois at Urbana-Champaign daf@illinois.edu Abstract Applying linear templates is an integral part of many object detection systems and accounts for a significant portion of computation time. We describe a method that achieves a substantial end-to-end speedup over the best current methods, without loss of accuracy. Our method is a combination of approximating scores by vector quantizing feature windows and a number of speedup techniques including cascade. Our procedure allows speed and accuracy to be traded off in two ways: by choosing the number of Vector Quantization levels, and by choosing to rescore windows or not. Our method can be directly plugged into any recognition system that relies on linear templates. We demonstrate our method to speed up the original Exemplar SVM detector [1] by an order of magnitude and Deformable Part models [2] by two orders of magnitude with no loss of accuracy. 1 Introduction One core operation in computer vision involves evaluating a bank of templates at a set of sample locations in an image. These sample locations are usually determined by sliding a window over the image. This is by far the most computationally demanding task in current popular object detection algorithms including canonical pedestrian [3] and face detection [4] methods (modern practice uses a linear SVM); the deformable part models [2]; and exemplar SVMs [1]. The accuracy and flexibility of these algorithms has turned them into the building blocks of many modern computer vision systems that would all benefit from a fast template evaluation algorithm. There is a vast literature of models that are variants of these methods, but they mostly evaluate banks of templates at a set of sample locations in images. Because this operation is important, there is now a range of methods to speed up this process, either by pruning locations to evaluate a template [7, 8] or by using fast convolution techniques. The method we describe in this paper is significantly faster than any previous method, at little or no loss of accuracy in comparison to the best performing reference implementations. Our method does not require retraining (it can be applied to legacy models). Our method rests on the idea that it is sufficient to compute an accurate, fixed-precision approximation to the value the original template would produce. We use Vector Quantization speedups, together with a variety of evaluation techniques and a cascade to exclude unpromising sample locations, to produce this approximation quickly. Our implementation is available online1 in the form of a MATLAB/C++ library. This library provides simple interfaces for evaluating templates in dense or sparse grids of locations. We used this library to implement a deformable part model algorithm that runs nearly two orders of magnitude faster than the original implementation [2]. This library is also used to obtain an order of magnitude speed-up for the exemplar SVM detectors of [1]. Our library could also be used to speed up various convolution-based techniques such as convolutional neural networks. 1http://vision.cs.uiuc.edu/ftvq 1 As we discuss in section 4, speed comparisons in the existing literature are somewhat confusing. Computation costs break into two major terms: per image terms, like computing HOG features; and per (image×category) terms, where the cost scales with the number of categories as well as the number of images. The existing literature, entirely properly, focuses on minimizing the per (image × category) terms, and as a result, various practical overhead costs are sometimes omitted. We feel that for practical systems, all costs should be accounted for, and we do so. 1.1 Prior Work At heart, evaluating a deformable part model involves evaluating a bank of templates at a set of locations in a scaled feature pyramid. There are a variety of strategies to speed up evaluation. Cascades speed up evaluation by using cheap tests to identify sample points that do not require further evaluation. Cascades have been very successful in face detection algorithms (eg. [5, 6]) For example, Felzenszwalb et al. [7] evaluate root models, and then evaluate the part scores iteratively only in high-chance locations. At each iteration it evaluates the corresponding template only if the current score of the object is higher than a certain threshold (trained in advance), resulting in an order of magnitude speed-up without significant loss of accuracy. Pedersoli et al. [8] follow a similar approach but estimate the score of a location using a lower resolution version of the templates. Transform methods evaluate templates at all locations simultaneously by exploiting properties of the Fast Fourier Transform. These methods, pioneered by Dubout et al. [9], result in a several fold speed-up while being exact; however, there is the per image overhead of computing an FFT at the start, and a per (image × category) overhead of computing an inverse FFT at the end. Furthermore, the approach computes the scores of all locations at once, and so is not random-access; it cannot be efficiently combined with a cascade detection process. In contrast, our template evaluation algorithm does not require batching template evaluations. As a result, we can combine our evaluation speedups with the cascade framework of [7]. We show that using our method in a cascade framework leads to two orders of magnitude speed-up comparing to the original deformable part model implementation. Extreme category scaling methods exploit locality sensitive hashing to get a system that can detect 100,000 object categories in a matter of tens of seconds [10]. This strategy appears effective — one can’t tell precisely, because there is no ground truth data for that number of categories, nor are their baselines — and achieves a good speedup with very large numbers of categories. However, the method cannot speedup detection of the 20 VOC challenge objects without significant loss of accuracy. In contrast, because our method relies on evaluation speedups, it can speed up evaluation of even a single template. Kernel approximation methods: Maji and Berg showed how to evaluate a histogram intersection kernel quickly [13]. Vedaldi et al. [12] propose a kernel approximation technique and use a new set of sparse features that are naturally faster to evaluate. This method provides a few folds speed-up with manageable loss of accuracy. Vector Quantization offers speedups in situations where arithmetic accuracy is not crucial (eg. [12, 14, 15, 16]). Jegou et al. [15] use Vector Quantization as a technique for approximate nearest neighbour search. They represent a vector by a short code composed of a number of subspace quantization indices. They efficiently estimate the euclidean distance between two vectors from their codes. This work has been very successful as it offers two orders of magnitude speedup with a reasonable accuracy. Kokkinos [14] describes a similar approach to speed up dot-product. This method can efficiently estimate the score of a template at a certain location by looking-up a number of tables. Vector Quantization is our core speedup technique. Feature quantization vs. Model quantization: Our method is similar to [12] as we both use Vector Quantization to speed up template evaluation. However, there is a critical difference in the way we quantize space. [12] quantizes the feature space and trains a new model using a high-dimensional sparse feature representation. In contrast, our method uses legacy models (that were trained on a low-dimensional dense feature space) and quantizes the space only at the level of evaluating the scores. Our approach is simpler because it does not need to retrain a model; it also leads to higher accuracy as shown in Table 2. 2 (a) Input Image (b) Original HOG (c) 256 clusters (d) 16 clusters Figure 1: Visualization of Vector Quantized HOG features. (a) is the original image, (b) is the HOG visualization, (c) is the visualization of Vector Quantized HOG feature into c = 256 clusters, (d) is the visualization of Vector Quantized HOG feature into c = 16 clusters. HOG visualizations are produced using the inverse HOG algorithm from [19]. Vector Quantized HOG features into c = 256 clusters can often preserve most of the visual information. 2 Fast Approximate Scoring with Vector Quantization The vast majority of modern object detectors work as follows: • In a preprocessing stage, an image pyramid and a set of underlying features for each layer of the pyramid are computed. • For each location in each layer of the pyramid, a fixed size window of the image features spanning the location is extracted. A set of linear functions of each such window is computed. The linear functions are then assembled into a score for each category at that location. • A post processing stage rejects scores that are either not local extrema or under threshold. Precisely how the score is computed from linear functions varies from detector to detector. For example, exemplar SVMs directly use the score; deformable part models summarize a score from several linear functions in nearby windows; and so on. The threshold for the post-processing stage is chosen using application loss criteria. Typically, detectors are evaluated by marking true windows in test data; establishing an overlap criterion to distinguish between false and true detects; plotting precision as a function of recall; and then computing the average precision (AP; the integral of this plot). A detector that gets a good AP does so by assigning high values of the score to windows that strongly overlap the right answer. Notice that what matters here is the ranking of windows, rather than the actual value of the score; some inaccuracy in score computation might not affect the AP. In all cases, the underlying features are the HOG features, originally described by Dalal and Triggs [3]. HOG features for a window consist of a grid of cells, where each cell contains a ddimensional vector (typically d = 32) that corresponds to a small region of the image (typically 8 × 8 pixels). The linear template is usually thought of as an m × n table of vectors. Each entry of the table corresponds to a grid element, and contains a d dimensional vector w. The score at location (x, y) is given by: S(x, y) = m X ∆y=1 n X ∆x=1 w(∆x, ∆y) · h(x + ∆x −1, y + ∆y −1) where w is a weight vector and h is the feature vector at a certain cell (both d-dimensional vectors). We wish to compute an approximation to this score where (a) the accuracy of the approximation is 3 0 0.2 0.4 0.6 0.8 0.02 0.04 0.06 0.08 0.1 16 64 256 1024 4096 1 2 3 4 5 6 7 8 9 10 Computation Time (µs) Estimation Error Computation Time vs. Estimation Error PCA VQ Principal Component Analysis, D = 2 True Score Estimated Score −3 −2.6 −2.2 −1.8 −1.4 −1 −1 −1.4 −1.8 −2.2 −2.6 −3 Vector Quantization, C = 4096 True Score Estimated Score −3 −2.6 −2.2 −1.8 −1.4 −1 −1 −1.4 −1.8 −2.2 −2.6 −3 Figure 2: The plot on the left side illustrates the trade-off between computation time and estimation error |S(x, y) −S′(x, y)| using two approaches: Principal Component Analysis and Vector Quantization. The time reported here is the average time required for estimating the score of a 12 × 12 template. The number of PCA dimensions and the number of clusters are indicated on the working points. The two scatter-plots illustrate template score estimations using 107 sample points. The working points D = 2 for PCA and c = 4096 for VQ are comparable in terms of running time. relatively easily manipulated, so we can trade-off speed and performance and (b) the approximation is extremely fast. To do so, we quantize the feature vectors in each cell h(x, y) into c clusters using a basic k-means procedure and encode each quantized cell q(x, y) using its cluster ID (which can range from 1 to c). Figure 1 visualizes original and our quantized HOG features. We pre-compute the partial dot product of each template cell w(∆x, ∆y) with all 1 ≤i ≤c possible centroids and store them in a lookup table T(∆x, ∆y, i). We then approximate the dot product by looking up the table: S′(x, y) = m X ∆y=1 n X ∆x=1 T(∆x, ∆y, q(x + ∆x −1, y + ∆y −1)). This reduces per template computation complexity of exhaustive search from Θ(mnd) to Θ(mn). In practice 32 multiplications and 32 additions are replaced by one lookup and one addition. This can potentially speed up the process by a factor of 32. Table lookup is often slower than multiplication, therefore gaining the full speed-up requires certain implementation techniques that we will explain in the next section. The cost of this approximation is that S′(x, y) ̸= S(x, y), and tight bounds on the difference are unavailable. However, as c gets large, we expect the approximation to improve. As figure 2 demonstrates, the approximation is good in practice, and improves quickly with larger c. A natural alternative, offered by Felzenszwalb et al. [7] is to use PCA to compress the cell vectors. This approximation should work well if high scoring vectors lie close to a low-dimensional affine space; the approximation can be improved by taking more principal components. However, the approximation will work poorly if the cell vectors have a “blobby” distribution, which appears to be the case here. Our experimental analysis shows Vector Quantization is generally more effective than principal component analysis for speeding-up dot product estimation. Figure 2 compares the time-accuracy trade-offs posed by both techniques. It should be obvious that this VQ approximation technique is compatible with a cascade. As results below show, this approximate estimate of S(x, y) is in practice extremely fast, particularly when implemented with a cascade. The value of c determines the trade-off between speed and accuracy. While the loss of accuracy is small, it can be mitigated. Most object detection algorithms evaluate for a small fraction of the scores that are higher than a certain threshold. Very low scores contribute little recall, and do not change AP significantly either (because the contribution to the integral is tiny). A further speed-accuracy tradeoff involves re-scoring the top scoring windows using the exact evaluation of S(x, y). Our experimental results show that the described Vector Quantized convolution coupled with a re-estimation step would significantly speed up detection process without any loss of accuracy. 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 Spatial Padding Sapp Sdef S Figure 3: Left: A single template can be zero-padded spatially to generate multiple larger templates. We pack the spatially padded templates to evaluate several locations in one pass. Right: visualization of Sapp, Sdef and S. to estimate the maximum score we start from center and move to the highest scoring neighbour until we reach a local maximum. In this example, we take three iterations to reach global maximum. In this example we compute the template on 17 locations in three steps (right most image). 3 Fast Score Estimation Techniques Implementing a Vector Quantization score estimation is straightforward, and is the primary source of our speedup. However, a straightforward implementation cannot leverage the full speed-up potential available with Vector Quantization. In this section we describe a few important techniques we used to obtain further speed. Exploiting Cascades: It should be obvious that our VQ approximation technique is compatible with a cascade. We incorporated our Vector Quantization technique into the cascade detection algorithm of [7], resulting in a few folds speed-up with no loss of accuracy. The cascade algorithm estimates the root score and the part scores iteratively (based on a pre-trained order). At each iteration it prunes out the locations lower than a certain score threshold. This process is done in two passes; the first pass uses a fast score estimation technique while the second pass uses the original template evaluation. Felzenswalb et al. [7] use PCA for the fast approximation stage. We instead use Vector Quantization to estimate the scores. In the case of deformable part models this procedure limits the process for both convolution and distance transform together. Furthermore, we use more aggressive pruning thresholds because our estimation is more accurate. Fast deformation estimates: To find the best deformation for a part template, Felzenswalb et al. [7] perform an exhaustive search over a 9 × 9 grid of locations and find the deformation (∆x, ∆y) that maximizes: max ∆x,∆y S(∆x, ∆y) = Sapp(∆x, ∆y) + Sdef(∆x, ∆y) −4 ≤∆x, ∆y ≤4 where Sapp is the appearance score and Sdef is the deformation score. We observed that since Sdef is convex and significantly influences the score, searching for a local minima would be a reasonable approximation. In a hill-climbing process we start from S(0, 0) and iteratively move to any neighbouring location that has the highest score among all neighbours. We stop when S(∆x, ∆y) is larger than all its 8 neighbouring cells (Figure 3). This process considerably limits the number of locations to be processed and further speeds up the process without any loss in accuracy. Packed Lookup Tables: Depending on the detailed structure of memory, a table lookup instruction could be a couple of folds slower than a multiplication instruction. When there are multiple templates to be evaluated at a certain location we pack their corresponding lookup tables and index them all in one memory access, thereby reducing the number of individual memory references. This allow using SIMD instructions to run multiple additions in one CPU instruction. Padding Templates: Packing lookup tables appears unhelpful when there is only one template to evaluate. However, we can obtain multiple templates in this case by zero-padding the original template (to represent various translates of that template; Figure 3). This allows packing the lookup tables to obtain the score of multiple locations in one pass. 5 HOG features per image per (image×category) per category Original DPM [2] 40ms 0ms 665ms 0ms DPM Cascade [7] 40ms 6ms 84ms 3ms FFLD [9] 40ms 7ms 91ms 43ms Our+rescoring 40ms 76ms 21ms 6ms Our-rescoring 40ms 76ms 9ms 6ms Table 1: Average running time of the state-of-the-art detection algorithms on PASCAL VOC 2007 dataset. The running time is braked into four major terms. Feature computation, per image preprocess, per (image×category) process and per category preprocess. The running times refer to a parallel implementation using 6 threads on a XEON E5-1650 Processor. Sparse lookup tables: Depending on the design of features and the clustering approach lookup tables can be sparse in some applications. Packing p dense lookup tables would require a dense c × p table. However, if the lookup tables are sparse each row of the table could be stored in a sparse data structure. Thus, when indexing the table with a certain index, we just need to update the scores of a small fraction of templates. This would both limit the memory complexity and the time complexity for evaluating the templates. Fixed point arithmetic: The most popular data type for linear classification systems is 32-bit single precision floating point. In this architecture 24 bits are specified for mantissa and sign. Since the template evaluation process in this paper does not involve multiplication, the power datum would stay in about the same range so one could keep the data in fixed-point format as it requires simpler addition arithmetic. Our experiments have shown that using 16-bit fixed point precision speeds up evaluation without sacrificing the accuracy. 4 Computation Cost Model In order to assess detection speed we need to understand the underlying computation cost. The current literature is confusing because there is no established speed evaluation measure. Dean et al. [10] report a running time for all 20 PASCAL VOC categories that include all the preprocessing. Dubout et al. [9] only report convolution time and distance transform time. Felzenszwalb et al. [7] compare single-core running time while others report multi-core running times. Computation costs break into two major terms: per image terms, where the cost scales with the number of images and per (image×category) terms, where the cost scales with the number of categories as well as the number of images. The total time taken is the sum of four costs: • Computing HOG features is a mandatory, per image step, shared by all HOG-based detection algorithms. • per image preprocessing is any process on image data-structure except HOG feature extraction. Examples include applying an FFT, or vector quantizing the HOG features. • per category preprocessing establishes the required detector data-structure. This is not usually a significant bottle-neck as there are often more images than categories. • per (image×category) processes include convolution, distance transform and any postprocess that depends both on the image and the category. Table 1 compares the performance of our approach with four major state-of-the-art algorithms. The algorithms described are evaluated on various scales of the image with various root templates. We compared algorithms based on parallel implementation. Reference codes published by the authors (except [7]) were all implemented to use multiple cores. We parallelized [7] and the HOG feature extraction function for fair comparison. We evaluate all running times on a XEON E5-1650 Processor (6 Cores, 12MB Cache, 3.20 GHz). 6 Method mAP time HSC [20] 0.343 180s* WTA [10] 0.240 26s* DPM V5 [22] 0.330 13.3s DPM V4 [21] 0.301 13.2s DPM V3 [2] 0.268 11.6s Rigid templates [23] 0.31 10s* Method mAP time Vedaldi [12] 0.277 7s* DPM V4 -parts 0.214 2.8s FFLD [9] 0.323 1.8s DPM Cascade [7] 0.331 1.7s Our+rescoring 0.331 0.53s Our-rescoring 0.298 0.29s Table 2: Comparison of various different object detection methods on PASCAL VOC 2007 dataset. The reported time here is the time to complete the detection of 20 categories starting from raw image. The reference implementations of the marked (*) algorithms were not accessible so we used published time statistics. These four works were published after 2012 and their baseline computers are comparable to ours in terms of speed. 5 Experimental Results We tested our template evaluation library for two well known detections methods. (a) Deformable part models and (b) exemplar SVM detectors. We used PASCAL VOC 2007 dataset that is a established benchmark for object detection algorithms. We also used legacy models from [1, 22] trained on this dataset. We use the state-of-the-art baselines published in [1, 22]. We compare our algorithm using the 20 standard VOC objects. We report our average precision on all categories and compare them to the baselines. We also report mean average precision (mAP) and running time by averaging over categories (Table 3). We run all of our experiments with c = 256 clusters. We perform an exhaustive search to find the nearest cluster for all HOG pyramid cells that takes on average 76ms for one image. The computation of our exhaustive nearest neighbour search linearly depends on the number of clusters. In our experiments c = 256 is shown to be enough for preserving detection accuracy. However, for more general applications one might need to consider a different c. 5.1 Deformable Part Models Deformable part models algorithm is the standard object detection baseline. Although there is significant difference between the latest version [22] and the earlier versions [2] various authors still compare to the old versions. Table 2 compares our implementation to ten prominent methods including the original deformable part models versions 3, 4 and 5. In this paper we compare the average running time of the algorithms together with mean average precision of 20 categories. Detailed per category average precisions are published in the reference papers. The original DPM package comes with a number of implementations for convolution (that is the dominant process). We compare to the fastest version that uses both CPU SIMD instructions and multi-threading. All baseline algorithms are also multi-threaded. We present two versions of our cascade method. The first version (FTVQ+rescoring) selects a pool of candidate locations by quickly estimating scores. It then evaluates the original templates on the candidates to fine tune the scores. The second version (FTVQ-rescoring) purely relies on Vector Quantization to estimate scores and does not rescore templates. The second algorithm runs twice as fast with about 3% drop in mean average precision. 5.2 Exemplar Detectors Exemplar SVMs are important benchmarks as they deal with a large set of independent templates that must be evaluated throughout the images. We first estimate template scores using our Vector Quantization based library. For the convolution we get roughly 25 fold speedup comparing to the baseline implementation. Both our library and the baseline convolution make use of SIMD operations and multi-threading. We re-estimate the score of the top 1% of locations for each category and we are virtually able to reproduce the original average precisions (Table 3). Including MATLAB implementation overhead, our version of exemplar SVM is roughly 8-fold faster than the baseline without any loss in accuracy. 7 Method aero bicycle bird boat bottle bus car cat chair cow dining table dog horse motor bike person potted plant sheep sofa train tv mAP time DPM V5 [22] .33 .59 .10 .18 .25 .51 .53 .19 .21 .24 .28 .12 .57 .48 .43 .14 .22 .36 .47 .39 0.330 665ms Ours+rescoring .33 .59 .10 .16 .27 .51 .54 .22 .20 .24 .27 .13 .57 .49 .43 .14 .21 .36 .45 .42 0.331 21ms Ours-rescoring .26 .58 .10 .11 .22 .45 .53 .20 .17 .19 .21 .11 .53 .44 .41 .11 .19 .32 .43 .41 0.298 9ms Exemplar [1] .19 .47 .03 .11 .09 .39 .40 .02 .06 .15 .07 .02 .44 .38 .13 .05 .20 .12 .36 .28 0.198 13.7ms Ours .18 .47 .03 .11 .09 .39 .40 .02 .06 .15 .07 .02 .44 .38 .13 .05 .20 .12 .36 .28 0.197 1.7ms Table 3: Comparison of our method with two baselines on PASCAL VOC 2007. The top three rows refer to DPM implementation while the last two rows refer to exemplar SVMs. We test our algorithm both with and without accurate rescoring. The two bottom rows compare the performance of our exemplar SVM implementation with the baseline. For the top three rows running time refers to per (image×category) time. For the two bottom rows running time refers to per (image×exemplar) time that includes MATLAB overhead. 6 Discussion In this paper we present a method to speed-up object detection by two orders of magnitude with little or no loss of accuracy. The main contribution of this paper lies in the right selection of techniques that are compatible and together lead to a major speedup in template evaluation. The implementation of this work is available online to facilitate future research. This library is of special interest in largescale and real-time object detection tasks. While our method is focussed on fast evaluation, it has implications for training. HOG features require 32 × 4 = 128 bytes to store the information in each cell (more than 60GB for the entire PASCAL VOC 2007 training set). This is why current detector training algorithms need to reload images and recompute their feature vectors every time they are being used. Batching is not compatible with the random-access nature of most training algorithms. In contrast, Vector Quantized HOG features into 256 clusters would need 1 Byte per cell. This makes storing the feature vectors of the whole PASCAL VOC 2007 training images in random access memory entirely feasible (it would require about 1GB of memory). Doing so allows a SVM solver to access points in the training set quickly. Our application specific implementation of PEGASOS [24] solves a SVM classifier for a 12 × 12 template with 108 training examples (uniformly distributed in the training set) in a matter of one minute. Being able to access the whole training set plus faster template evaluation could make hard negative mining either faster or unnecessary. There are more opportunities for speedup. Notice that we pay a per image penalty computing the Vector Quantization of the HOG features, on top of the cost of computing those features. We expect that this could be sped up considerably, because we believe that estimating the Vector Quantized center to which an image patch goes should be much faster than evaluating the HOG features, then matching. Acknowledgement This work was supported in part by NSF Expeditions award IIS-1029035 and in part by ONR MURI award N000141010934. References [1] T. Malisiewicz and A. Gupta and A. Efros. Ensemble of Exemplar-SVMs for Object Detection and Beyond. In International Conference on Computer Vision, 2011. 8 [2] P. F. Felzenszwalb and R. B. Girshick and D. McAllester and D. Ramanan. Object Detection with Discriminatively Trained Part Based Models. In IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010. [3] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2005. [4] H. Rowley and S. Baluja and T. Kanade. Neural Network-Based Face Detection. In IEEE Transactions On Pattern Analysis and Machine intelligence, 1998. [5] P. Viola, M. Jones. Rapid object detection using a boosted cascade of simple features in Conference on Computer Vision and Pattern Recognition, 2001 [6] R. Sznitman, C. Becker, F. Fleuret, and P. Fua. Fast Object Detection with Entropy-Driven Evaluation. in Conference on Computer Vision and Pattern Recognition, 2013 [7] P. F. Felzenszwalb and R. B. Girshick and D. McAllester. Cascade Object Detection with Deformable Part Models. In IEEE Conference on Computer Vision and Pattern Recognition, 2010. [8] M. Pedersoli and J. Gonzalez and A. Bagdanov and and JJ. Villanueva. Recursive Coarse-toFine Localization for fast Object Detection. In European Conference on Computer Vision, 2010. [9] C. Dubout and F. Fleuret. Exact Acceleration of Linear Object Detectors. In European Conference on Computer Vision, 2012. [10] T. Dean and M. Ruzon and M. Segal and J. Shlens and S. Vijayanarasimhan and J. Yagnik. Fast, Accurate Detection of 100,000 Object Classes on a Single Machine. In IEEE Conference on Computer Vision and Pattern Recognition, 2013. [11] P. Indyk and R. Motwani. Approximate nearest neighbours: Towards removing the curse of dimensionality. In ACM Symposium on Theory of Computing, 1998. [12] A. Vedaldi and A. Zisserman. Sparse Kernel Approximations for Efficient Classification and Detection In IEEE Conference on Computer Vision and Pattern Recognition, 2012. [13] S. Maji and A. Berg, J. Malik. Efficient Classification for Additive Kernel SVMs. In IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013. [14] I. Kokkinos. Bounding Part Scores for Rapid Detection with Deformable Part Models In 2nd Parts and Attributes Workshop, in conjunction with ECCV, 2012. [15] Herv Jgou and Matthijs Douze and Cordelia Schmid. Product quantization for nearest neighbour search. In IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010. [16] R. M. Gray and D. L. Neuhoff. Quantization. In IEEE Transactions on Information Theory, 1998. [17] S. Singh, and A. Gupta and A. Efros. Unsupervised Discovery of Mid-level Discriminative Patches. In European Conference on Computer Vision, 2012. [18] I. Endres and K. Shih and J. Jiaa and D. Hoiem. Learning Collections of Part Models for Object Recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2013. [19] C. Vondrick and A. Khosla and T. Malisiewicz and A. Torralba. Inverting and Visualizing Features for Object Detection. In arXiv preprint arXiv:1212.2278, 2012. [20] X. Ren and D. Ramanan. Histograms of Sparse Codes for Object Detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2013. [21] P. Felzenszwalb and R. Girshick and D. McAllester. Discriminatively Trained Deformable Part Models, Release 4. In http://people.cs.uchicago.edu/ pff/latent-release4/. [22] R. Girshick and P. Felzenszwalb and D. McAllester. Discriminatively Trained Deformable Part Models, Release 5. In http://people.cs.uchicago.edu/ rbg/latent-release5/. [23] S. Divvala and A. Efros and M. Hebert. How important are ‘Deformable Parts’ in the Deformable Parts Model? In European Conference on Computer Vision, Parts and Attributes Workshop, 2012 [24] S. Shalev-Shwartz and Y. Singer and N. Srebro. Pegasos: Primal Estimated sub-GrAdient SOlver for SVM in Proceedings of the 24th international conference on Machine learning, 2007 9
2013
176
4,905
Sparse Additive Text Models with Low Rank Background Lei Shi Baidu.com, Inc. P.R. China shilei06@baidu.om Abstract The sparse additive model for text modeling involves the sum-of-exp computing, whose cost is consuming for large scales. Moreover, the assumption of equal background across all classes/topics may be too strong. This paper extends to propose sparse additive model with low rank background (SAM-LRB) and obtains simple yet efficient estimation. Particularly, employing a double majorization bound, we approximate log-likelihood into a quadratic lower-bound without the log-sumexp terms. The constraints of low rank and sparsity are then simply embodied by nuclear norm and ℓ1-norm regularizers. Interestingly, we find that the optimization task of SAM-LRB can be transformed into the same form as in Robust PCA. Consequently, parameters of supervised SAM-LRB can be efficiently learned using an existing algorithm for Robust PCA based on accelerated proximal gradient. Besides the supervised case, we extend SAM-LRB to favor unsupervised and multifaceted scenarios. Experiments on three real data demonstrate the effectiveness and efficiency of SAM-LRB, compared with a few state-of-the-art models. 1 Introduction Generative models of text have gained large popularity in analyzing a large collection of documents [3, 4, 17]. This type of models overwhelmingly rely on the Dirichlet-Multinomial conjugate pair, perhaps mainly because its formulation and estimation is straightforward and efficient. However, the ease of parameter estimation may come at a cost: unnecessarily over-complicated latent structures and lack of robustness to limited training data. Several efforts emerged to seek alternative formulations, taking the correlated topic models [13, 19] for instance. Recently in [10], the authors listed three main problems with Dirichlet-Multinomial generative models, namely inference cost, overparameterization, and lack of sparsity. Motivated by them, a Sparse Additive GEnerative model (SAGE) was proposed in [10] as an alternative choice of generative model. Its core idea is that the lexical distribution in log-space comes by adding the background distribution with sparse deviation vectors. Successfully applying SAGE, effort [14] discovers geographical topics in the twitter stream, and paper [25] detects communities in computational linguistics. However, SAGE still suffers from two problems. First, the likelihood and estimation involve the sum-of-exponential computing due to the soft-max generative nature, and it would be time consuming for large scales. Second, SAGE assumes one single background vector across all classes/topics, or equivalently, there is one background vector for each class/topic but all background vectors are constrained to be equal. This assumption might be too strong in some applications, e.g., when lots of synonyms vary their distributions across different classes/topics. Motivated to solve the second problem, we are propose to use a low rank constrained background. However, directly assigning the low rank assumption to the log-space is difficult. We turn to approximate the data log-likelihood of sparse additive model by a quadratic lower-bound based on the 1 double majorization bound in [6], so that the costly log-sum-exponential computation, i.e., the first problem of SAGE, is avoided. We then formulate and derive learning algorithm to the proposed SAM-LRB model. Main contributions of this paper can be summarized into four-fold as below: • Propose to use low rank background to extend the equally constrained setting in SAGE. • Approximate the data log-likelihood of sparse additive model by a quadratic lower-bound based on the double majorization bound in [6], so that the costly log-sum-exponential computation is avoided. • Formulate the constrained optimization problem into Lagrangian relaxations, leading to a form exactly the same as in Robust PCA [28]. Consequently, SAM-LRB can be efficiently learned by employing the accelerated proximal gradient algorithm for Robust PCA [20]. • Extend SAM-LRB to favor supervised classification, unsupervised topic model and multifaceted model; conduct experimental comparisons on real data to validate SAM-LRB. 2 Supervised Sparse Additive Model with Low Rank Background 2.1 Supervised Sparse Additive Model Same as in SAGE [10], the core idea of our model is that the lexical distribution in log-space comes from adding the background distribution with additional vectors. Particularly, we are given documents D documents over M words. For each document d ∈[1, D], let yd ∈[1, K] represent the class label in the current supervised scenario, cd ∈RM + denote the vector of term counts, and Cd = P w cdw be the total term count. We assume each class k ∈[1, K] has two vectors bk, sk ∈RM, denoting the background and additive distributions in log-space, respectively. Then the generative distribution for each word w in a document d with label yd is a soft-max form: p(w|yd) = p(w|yd, byd, syd) = exp(bydw + sydw) PM i=1 exp(bydi + sydi) . (1) Given Θ = {B, S} with B = [b1, . . . , bK] and S = [s1, . . . , sK], the log-likelihood of data X is: L = log p(X|Θ) = K X k=1 X d:yd=k L(d, k), L(d, k) = c⊤ d (bk + sk) −Cd log M X i=1 exp(bki + ski). (2) Similarly, a testing document d is classified into class ˆy(d) according to ˆy(d) = arg maxk L(d, k). In SAGE [10], the authors further assumed that the background vectors across all classes are the same, i.e., bk = b for ∀k, and each additive vector sk is sparse. Although intuitive, the background equality assumption may be too strong for real applications. For instance, to express a same/similar meaning, different classes of documents may choose to use different terms from a tuple of synonyms. In this case, SAGE would tend to include these terms as the sparse additive part, instead of as the background. Taking Fig. 1 as an illustrative example, the log-space distribution (left) is the sum of the low-rank background B (middle) and the sparse S (right). Applying SAGE to this type of data, the equality constrained background B would fail to capture the low-rank structure, and/or the additive part S would be not sparse, so that there may be risks of over-fitting or under-fitting. Moreover, since there exists sum-of-exponential terms in Eq. (2) and thus also in its derivatives, the computing cost becomes huge when the vocabulary size M is large. As a result, although performing well in [10, 14, 25], SAGE might still suffer from problems of over-constrain and inefficiency. Figure 1: Low rank background. Left to right illustrates the logspace distr., background B, and sparse S, resp. Rows index terms, and columns for classes. Figure 2: Lower-bound’s optimization. Left to right shows the trajectory of lower-bound, α, and ξ, resp. 2 2.2 Supervised Sparse Additive Model with Low Rank Background Motivated to avoid the inefficient computing due to sum-of-exp, we adopt the double majorization lower-bound of L [6], so that it is well approximated and quadratic w.r.t. B and S. Further based on this lower-bound, we proceed to assume the background B across classes is low-rank, in contrast to the equality constraint in SAGE. An optimization algorithm is proposed based on proximal gradient. 2.2.1 Double Majorization Quadratic Lower Bound In the literature, there have been several existing efforts on efficient computing the sum-of-exp term involved in soft-max [5, 15, 6]. For instance, based on the convexity of logarithm, one can obtain a bound −log P i exp(xi) ≥−φ P i exp(xi) + log φ + 1 for any φ ∈R+, namely the lb-log-cvx bound. Moreover, via upper-bounding the Hessian matrix, one can obtain the following local quadratic approximation for any ∀ξi ∈R, shortly named as lb-quad-loc: −log M X i=1 exp(xi) ≥1 M ( X i xi− X i ξi)2− X i (xi−ξi)2− P i(xi −ξi) exp(ξi) P i exp(ξi) −log X i exp(ξi). In [6], Bouchard proposed the following quadratic lower-bound by double majorization (lb-quad-dm) and demonstrated its better approximation compared with the previous two: −log M X i=1 exp(xi) ≥−α −1 2 M X i=1  xi −α −ξi + f(ξi)[(xi −α)2 −ξ2 i ] + 2 log[exp(ξi) + 1] , (3) with α ∈R and ξ ∈RM + being auxiliary (variational) variables, and f(ξ) = 1 2ξ · exp(ξ)−1 exp(ξ)+1. This bound is closely related to the bound proposed by Jaakkola and Jordan [6]. Employing Eq. (3), we obtain a lower-bound Llb ≤L to the data log-likelihood in Eq. (2): Llb = K X k=1  −(bk + sk)⊤Ak(bk + sk) −β⊤ k (bk + sk) −γk  , with γk = ˜Ck ( αk −1 2 M X i=1  αk + ξki + f(ξki)(α2 k −ξ2 ki) + 2 log(exp(ξki) + 1)  ) , Ak = ˜Ckdiag [f(ξk)] , βk = ˜Ck(1 2 −αkf(ξk)) − X d:yd=k cd, ˜Ck = X d:yd=k Cd. (4) For each class k, the two variational variables, αk ∈R and ξk ∈RM + , can be updated iteratively as below for a better approximated lower-bound. Therein, abs(·) denotes the absolute value operator. αk = 1 PM i=1 f(ξki) " M 2 −1 + M X i=1 (bki + ski)f(ξki) # , ξk = abs(bk + sk −αk). (5) One example of the trajectories during optimizing this lower-bound is illustrated in Fig. 2. Particularly, the left shows the lower-bound converges quickly to ground truth, usually within 5 rounds in our experiences. The values of the three lower-bounds with randomly sampled the variational variables are also sorted and plotted. One can find that lb-quad-dm approximates better or comparably well even with a random initialization. Please see [6] for more comparisons. 2.2.2 Supervised SAM-LRB Model and Optimization by Proximal Gradient Rather than optimizing the data log-likelihood in Eq. (2) like in SAGE, we turn to optimize its lower-bound in Eq. (4), which is convenient for further assigning the low-rank constraint on B and the sparsity constraint on S. Concretely, our target is formulated as a constrained optimization task: max B,S Llb, with Llb specified in Eq. (4), s.t. B = [b1, . . . , bK] is low rank, S = [s1, . . . , sK] is sparse. (6) Concerning the two constraints, we call the above as supervised Sparse Additive Model with LowRank Background, or supervised SAM-LRB for short. Although both of the two assumptions can 3 be tackled via formulating a fully generative model, assigning appropriate priors, and delivering inference in a Bayesian manner similar to [8], we determine to choose the constrained optimization form for not only a clearer expression but also a simpler and efficient algorithm. In the literature, there have been several efforts considering both low rank and sparse constraints similar to Eq. (6), most of which take the use of proximal gradient [2, 7]. Papers [20, 28] studied the problems under the name of Robust Principal Component Analysis (RPCA), aiming to decouple an observed matrix as the sum of a low rank matrix and a sparse matrix. Closely related to RPCA, our scenario in Eq. (6) can be regarded as a weighted RPCA formulation, and the weights are controlled by variational variables. In [24], the authors proposed an efficient algorithm for problems that constrain a matrix to be both low rank and sparse simultaneously. Following these existing works, we adopt the nuclear norm to implement the low rank constraint, and ℓ1-norm for the sparsity constraint, respectively. Letting the partial derivative w.r.t. λk = (bk + sk) of Llb equal to zero, the maximum of Llb can be achieved at λ∗ k = −1 2A−1 k βk. Since Ak is positive definite and diagonal, the optimal solution λ∗ k is well-posed and can be efficiently computed. Simultaneously considering the equality λk = (bk + sk), the low rank on B and the sparsity on S, one can rewritten Eq. (6) into the following Lagrangian form: min B,S 1 2 ||Λ∗−B −S||2 F + µ(||B||∗+ ν|S|1), with Λ∗= [λ∗ 1, . . . , λ∗ K], (7) where ||·||F , ||·||∗and | · |1 denote the Frobenius norm, nuclear norm and ℓ1-norm, respectively. The Frobenius norm term concerns the accuracy of decoupling from Λ∗into B and S. Lagrange multipliers µ and ν control the strengths of low rank constraint and sparsity constraint, respectively. Interestingly, Eq. (7) is exactly the same as the objective of RPCA [20, 28]. Paper [20] proposed an algorithm for RPCA based on accelerated proximal gradient (APG-RPCA), showing its advantages of efficiency and stability over (plain) proximal gradient. We choose it, i.e., Algorithm 2 in [20], for seeking solutions to Eq. (7). The computations involved in APG-RPCA include SVD decomposition and absolute value thresholding, and interested readers are referred to [20] for more details. The augmented Lagrangian and alternating direction methods [9, 29] could be considered as alternatives. Data: Term counts and labels {cd, Cd, yd}D d=1 of D docs and K classes, sparse thres. ν ≈0.05 Result: Log-space distributions: low-rank B and sparse S Initialization: randomly initialize parameters {B, S}, and variational variables {αk, ξk}k; while not converge do if optimize variational variables then iteratively update {αk, ξk}k according to Eq. (5); for k = 1, . . . , K do calculate Ak and βk by Eq. (4), and λ∗ k = −1 2A−1 k βk ; B, S ←−APG-RPCA(Λ∗, ν) by Algorithm 2 in [20], with Λ∗= [λ∗ 1, . . . , λ∗ K]; end Algorithm 1: Supervised SAM-LRB learning algorithm Consequently, the supervised SAM-LRB algorithm is specified in Algorithm 1. Therein, one can choose to either fix or update the variational variables {αk, ξk}k. If they are fixed, Algorithm 1 has only one outer iteration with no need to check the convergence. Compared with the supervised SAGE learning algorithm in Sec. 3 of [10], our supervised SAM-LRB algorithm not only does not need to compute the sum of exponentials so that computing cost is saved, but also is optimized simply and efficiently by proximal gradient instead of using Newton updating as in SAGE. Moreover, adding Laplacian-Exponential prior on S for sparseness, SAGE updates the conjugate posteriors and needs to employ a “warm start” technique to avoid being trapped in early stages with inappropriate initializations, while in contrast SAM-LRB does not have this risk. Additionally, since the evolution from SAGE to SAM-LRB is two folded, i.e., the low rank background assumption and the convex relaxation, we find that adopting the convex relaxation also helps SAGE during optimization. 3 Extensions Analogous to [10], our SAM-LRB formulation can be also extended to unsupervised topic modeling scenario with latent variables, and the scenario with multifaceted class labels. 4 3.1 Extension 1: Unsupervised Latent Variable Model We consider how to incorporate SAM-LRB in a latent variable model of unsupervised text modelling. Following topic models, there is one latent vector of topic proportions per document and one latent discrete variable per term. That is, each document d is endowed with a vector of topic proportions θd ∼Dirichlet(ρ), and each term w in this document is associated with a latent topic label z(d) w ∼Multinomial(θd). Then the probability distribution for w is p(w|z(d) w , B, S) ∝exp  bz(d) w w + sz(d) w w  , (8) which only replaces the known class label yd in Eq. (1) with the unknown topic label z(d) w . We can combine the mean field variational inference for latent Dirichlet allocation (LDA) [4] with the lower-bound treatment in Eq. (4), leading to the following unsupervised lower-bound Llb = K X k=1  −(bk + sk)⊤Ak(bk + sk) −β⊤ k (bk + sk) −γk  + X d [⟨log p(θd|ρ)⟩−⟨log Q(θd)⟩] + X d X w h ⟨log p(z(d) w |θd)⟩−⟨log Q(z(d) w )⟩ i , with γk = ˜Ck ( αk −1 2 M X i=1  αk + ξki + f(ξki)(α2 k −ξ2 ki) + 2 log(exp(ξki) + 1)  ) , Ak = ˜Ckdiag [f(ξk)] , βk = ˜Ck(1 2 −αkf(ξk)) −˜ck, (9) where each w-th item in ˜ck is ˜ckw = P d Q(k|d, w)cdw, i.e. the expected count of term w in topic k, and ˜Ck = P w ˜ckw is the topic’s expected total count throughout all words. This unsupervised SAM-LRB model formulates a topic model with low rank background and sparse deviation, which is learned via EM iterations. The E-step to update posteriors Q(θd) and Q(z(d) w ) is identical to the standard LDA. Once {Ak, βk} are computed as above, the M-step to update {B, S} and variational variables {αk, ξk}k remains the same as the supervised case in Algorithm 1. 3.2 Extension 2: Multifaceted Modelling We consider how SAM-LRB can be used to combine multiple facets (multi-dimensional class labels), i.e, combining per-word latent topics and document labels and pursuing a structural view of labels and topics. In the literature, multifaceted generative models have been studied in [1, 21, 23], and they incorporated latent switching variables that determine whether each term is generated from a topic or from a document label. Topic-label interactions can also be included to capture the distributions of words at the intersections. However in this kind of models, the number of parameters becomes very large for large vocabulary size, many topics, many labels. In [10], SAGE needs no switching variables and shows advantageous of model sparsity on multifaceted modeling. More recently, paper [14] employs SAGE and discovers meaningful geographical topics in the twitter streams. Applying SAM-LRB to the multifaceted scenario, we still assume the multifaceted variations are composed of low rank background and sparse deviation. Particularly, for each topic k ∈[1, K], we have the topic background b(T ) k and sparse deviation s(T ) k ; for each label j ∈[1, J], we have label background b(L) j and sparse deviation s(L) j ; for each topic-label interaction pair (k, j), we have only the sparse deviation s(I) kj . Again, background distributions B(T ) = [b(T ) 1 , . . . , b(T ) K ] and B(L) = [b(L) 1 , . . . , b(L) J ] are assumed of low ranks to capture single view’s distribution similarity. Then for a single term w given the latent topic z(d) w and the class label yd, its generative probability is obtained by summing the background and sparse components together: p(w|z(d) w , yd, Θ) ∝exp  b(T ) z(d) w w + s(T ) z(d) w w + b(L) ydw + s(L) ydw + s(I) z(d) w ydw  , (10) 5 with parameters Θ = {B(T ), S(T ), B(L), S(L), S(I)}. The log-likelihood’s lower-bound involves the sum through all topic-label pairs: Llb = K X k=1 J X j=1  −λ⊤ kjAkjλkj −β⊤ kjλkj −γkj  + X d [⟨log p(θd|ρ)⟩−⟨log Q(θd)⟩] + X d X w h ⟨log p(z(d) w |θd)⟩−⟨log Q(z(d) w )⟩ i , with λkj ≜b(T ) k + s(T ) k + b(L) j + s(L) j + s(I) kj . (11) In the quadratic form, the values of Akj, βkj and γkj are trivial combination of Eq. (4) and Eq. (9), i.e., weighted by both the observed labels and posteriors of latent topics. Details are omitted here due to space limit. The second row remains the same as in Eq. (9) and standard LDA. During the iterative estimation, every iteration includes the following steps: • Estimate the posteriors Q(z(d) w ) and Q(θd); • With (B(T ), S(T ), S(I)) fixed, solve a quadratic program over Λ∗(L), which approximates the sum of B(L) and S(L). Put Λ∗(L) into Algorithm 1 to update B(L) and S(L); • With (B(L), S(L), S(I)) fixed, solve a quadratic program over Λ∗(T ), which approximates the sum of B(T ) and S(T ). Put Λ∗(T ) into Algorithm 1 to update B(T ) and S(T ); • With (B(T ), S(T ), B(L), S(L)) fixed, update S(I) by proximal gradient. 4 Experimental Results In order to test SAM-LRB in different scenarios, this section considers experiments under three tasks, namely supervised document classification, unsupervised topic modeling, and multi-faceted modeling and classification, respectively. 4.1 Document Classification We first test our SAM-LRB model in the supervised document modeling scenario and evaluate the classification accuracy. Particularly, the supervised SAM-LRB is compared with the DirichletMultinomial model and SAGE. The precision of the Dirichlet prior in Dirichlet-Multinomial model is updated by the Newton optimization [22]. Nonparametric Jeffreys prior [12] is adopted in SAGE as a parameter-free sparse prior. Concerning the variational variables {αi, ξi}i in the quadratic lower-bound of SAM-LRB, both cases of fixing them and updating them are considered. We consider the benchmark 20Newsgroups data1, and aim to classify unlabelled newsgroup postings into 20 newsgroups. No stopword filtering is performed, and we randomly pick a vocabulary of 55,000 terms. In order to test the robustness, we vary the proportion of training data. After 5 independent runs by each algorithm, the classification accuracies on testing data are plotted in Fig. 3 in terms of box-plots, where the lateral axis varies the training data proportion. Figure 3: Classification accuracy on 20Newsgroups data. The proportion of training data varies in {10%, 30%, 50%}. 1Following [10], we use the training/testing sets from http://people.csail.mit.edu/jrennie/20Newsgroups/ 6 One can find that, SAGE outperforms Dirichlet-Multinomial model especially in case of limited training data, which is consistent to the observations in [10]. Moreover, with random and fixed variational variables, the SAM-LRB model performs further better or at least comparably well. If the variational variables are updated to tighten the lower-bound, the performance of SAM-LRB is substantially the best, with a 10%∼20% relative improvement over SAGE. Table 1 also reports the average computing time of SAGE and SAM-LRB. We can see that, by avoiding the log-sum-exp calculation, SAM-LRB (fixed) performs more than 7 times faster than SAGE, while SAM-LRB (optimized) pays for updating the variational variables. Table 1: Comparison on average time costs per iteration (in minutes). method SAGE SAM-LRB (fixed) SAM-LRB (optimized) time cost (minutes) 3.8 0.6 3.3 4.2 Unsupervised Topic Modeling We now apply our unsupervised SAM-LRB model to the benchmark NIPS data2. Following the same preprocessing and evaluation as in [10, 26], we have a training set of 1986 documents with 237,691 terms, and a testing set of 498 documents with 57,427 terms. For consistency, SAM-LRB is still compared with Dirichlet-Multinomial model (variational LDA model with symmetric Dirichlet prior) and SAGE. For all these unsupervised models, the number of latent topics is varied from 10 to 25 and then to 50. After unsupervised training, the performance is evaluated by perplexity, the smaller the better. The performances of 5 independent runs by each method are illustrated in Fig. 4, again in terms of box-plots. Figure 4: Perplexity results on NIPS data. As shown, SAGE performs worse than LDA when there are few number of topics, perhaps mainly due to its strong equality assumption on background. Whereas, SAM-LRB performs better than both LDA and SAGE in most cases. With one exception happens when the topic number equals 50, SAM-LRB (fixed) performs slightly worse than SAGE, mainly caused by inappropriate fixed values of variational variables. If updated instead, SAM-LRB (optimized) performs promisingly the best. 4.3 Multifaceted Modeling We then proceed to test the multifaceted modeling by SAM-LRB. Same as [10], we choose a publicly-available dataset of political blogs describing the 2008 U.S. presidential election3 [11]. Out of the total 6 political blogs, three are from the right and three are from left. There are 20,827 documents and a vocabulary size of 8284. Using four blogs for training, our task is to predict the ideological perspective of two unlabeled blogs. On this task, Ahmed and Xing in [1] used multiview LDA model to achieve accuracy within 65.0% ∼69.1% depending on different topic number settings. Also, support vector machine provides a comparable accuracy of 69%, while supervised LDA [3] performs undesirably on this task. In [10], SAGE is repeated 5 times for each of multiple topic numbers, and achieves its best median 2http://www.cs.nyu.edu/∼roweis/data.html 3http://sailing.cs.cmu.edu/socialmedia/blog2008.html 7 result 69.6% at K = 30. Using SAM-LRB (optimized), the median results out of 5 runs for each topic number are shown in Table 2. Interestingly, SAM-LRB provides a similarly state-of-the-art result, while achieving it at K = 20. The different preferences on topic numbers between SAGE and SAM-LRB may mainly come from their different assumptions on background lexical distributions. Table 2: Classification accuracy on political blogs data by SAM-LRB (optimized). # topic (K) 10 20 30 40 50 accuracy (%) median out of 5 runs 67.3 69.8 69.1 68.3 68.1 5 Concluding Remarks This paper studies the sparse additive model for document modeling. By employing the double majorization technique, we approximate the log-sum-exponential term involved in data log-likelihood into a quadratic lower-bound. With the help of this lower-bound, we are able to conveniently relax the equality constraint on background log-space distribution of SAGE [10], into a low-rank constraint, leading to our SAM-LRB model. Then, after the constrained optimization is transformed into the form of RPCA’s objective function, an algorithm based on accelerated proximal gradient is adopted during learning SAM-LRB. The model specification and learning algorithm are somewhat simple yet effective. Besides the supervised version, extensions of SAM-LRB to unsupervised and multifaceted scenarios are investigated. Experimental results demonstrate the effectiveness and efficiency of SAM-LRB compared with Dirichlet-Multinomial and SAGE. Several perspectives may deserve investigations in future. First, the accelerated proximal gradient updating needs to compute SVD decompositions, which are probably consuming for very large scale data. In this case, more efficient optimization considering nuclear norm and ℓ1-norm are expected, with the semidefinite relaxation technique in [16] being one possible choice. Second, this paper uses a constrained optimization formulation, while Bayesian tackling via adding conjugate priors to complete the generative model similar to [8] is an alternative choice. Moreover, we may also adopt nonconjugate priors and employ nonconjugate variational inference in [27]. Last but not the least, discriminative learning with large margins [18, 30] might be also equipped for robust classification. Since nonzero elements of sparse S in SAM-LRB can be also regarded as selected feature, one may design to include them into the discriminative features, rather than only topical distributions [3]. Additionally, the augmented Lagrangian and alternating direction methods [9, 29] could be also considered as alternatives to the proximal gradient optimization. References [1] A. Ahmed and E. P. Xing. Staying informed: supervised and semi-supervised multi-view topical analysis of ideological pespective. In Proc. EMNLP, pages 1140–1150, 2010. [2] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [3] D. Blei and J. McAuliffe. Supervised topic models. In Advances in NIPS, pages 121–128. 2008. [4] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. JMLR, 3:993–1022, 2003. [5] D. Bohning. Multinomial logistic regression algorithm. Annals of Inst. of Stat. Math., 44:197– 200, 1992. [6] G. Bouchard. Efficient bounds for the softmax function, applications to inference in hybrid models. In Workshop for Approximate Bayesian Inference in Continuous/Hybrid Systems at NIPS’07, 2007. [7] X. Chen, Q. Lin, S. Kim, J. G. Carbonell, and E. P. Xing. Smoothing proximal gradient method for general structured sparse regression. The Annals of Applied Statistics, 6(2):719–752, 2012. [8] X. Ding, L. He, and L. Carin. Bayesian robust principal component analysis. IEEE Trans. Image Processing, 20(12):3419–3430, 2011. 8 [9] J. Eckstein. Augmented Lagrangian and alternating direction methods for convex optimization: A tutorial and some illustrative computational results. Technical report, RUTCOR Research Report RRR 32-2012, 2012. [10] J. Eisenstein, A. Ahmed, and E. P. Xing. Sparse additive generative models of text. In Proc. ICML, 2011. [11] J. Eisenstein and E. P. Xing. The CMU 2008 political blog corpus. Technical report, Carnegie Mellon University, School of Computer Science, Machine Learning Department, 2010. [12] M. A. T. Figueiredo. Adaptive sparseness using Jeffreys prior. In Advances in NIPS, pages 679–704. 2002. [13] M. R. Gormley, M. Dredze, B. Van Durme, and J. Eisner. Shared components topic models. In Proc. NAACL-HLT, pages 783–792, 2012. [14] L. Hong, A. Ahmed, S. Gurumurthy, A. J. Smola, and K. Tsioutsiouliklis. Discovering geographical topics in the twitter stream. In Proc. 12th WWW, pages 769–778, 2012. [15] T. Jaakkola and M. I. Jordan. A variational approach to Bayesian logistic regression problems and their extensions. In Proc. AISTATS, 1996. [16] M. Jaggi and M. Sulovsk`y. A simple algorithm for nuclear norm regularized problems. In Proc. ICML, pages 471–478, 2010. [17] Y. Jiang and A. Saxena. Discovering different types of topics: Factored topics models. In Proc. IJCAI, 2013. [18] A. Joulin, F. Bach, and J. Ponce. Efficient optimization for discriminative latent class models. In Advances in NIPS, pages 1045–1053. 2010. [19] J. D. Lafferty and M. D. Blei. Correlated topic models. In Advances in NIPS, pages 147–155, 2006. [20] Z. Lin, A. Ganesh, J. Wright, L. Wu, M. Chen, and Y. Ma. Fast convex optimization algorithms for exact recovery of a corrupted low-rank matrix. Technical report, UIUC Technical Report UILU-ENG-09-2214, August 2009. [21] Q. Mei, X. Ling, M. Wondra, H. Su, and C. X. Zhai. Topic sentiment mixture: modeling facets and opinions in webblogs. In Proc. WWW, 2007. [22] T. P. Minka. Estimating a dirichlet distribution. Technical report, Massachusetts Institute of Technology, 2003. [23] M. Paul and R. Girju. A two-dimensional topic-aspect model for discovering multi-faceted topics. In Proc. AAAI, 2010. [24] E. Richard, P.-A. Savalle, and N. Vayatis. Estimation of simultaneously sparse and low rank matrices. In Proc. ICML, pages 1351–1358, 2012. [25] Y. S. N. A. Smith and D. A. Smith. Discovering factions in the computational linguistics community. In ACL Workshop on Rediscovering 50 Years of Discoveries, 2012. [26] C. Wang and D. Blei. Decoupling sparsity and smoothness in the discrete hierarchical dirichlet process. In Advances in NIPS, pages 1982–1989. 2009. [27] C. Wang and D. M. Blei. Variational inference in nonconjugate models. To appear in JMLR. [28] J. Wright, A. Ganesh, S. Rao, Y. Peng, and Y. Ma. Robust principal component analysis: Exact recovery of corrupted low-rank matrices via convex optimization. In Advances in NIPS, pages 2080–2088. 2009. [29] J. Yang and X. Yuan. Linearized augmented Lagrangian and alternating direction methods for nuclear norm minimization. Math. Comp., 82:301–329, 2013. [30] J. Zhu, A. Ahmed, and E. P. Xing. MedLDA: maximum margin supervised topic models. JMLR, 13:2237–2278, 2012. 9
2013
177
4,906
Correlated random features for fast semi-supervised learning Brian McWilliams ETH Z¨urich, Switzerland brian.mcwilliams@inf.ethz.ch David Balduzzi ETH Z¨urich, Switzerland david.balduzzi@inf.ethz.ch Joachim M. Buhmann ETH Z¨urich, Switzerland jbuhmann@inf.ethz.ch Abstract This paper presents Correlated Nystr¨om Views (XNV), a fast semi-supervised algorithm for regression and classification. The algorithm draws on two main ideas. First, it generates two views consisting of computationally inexpensive random features. Second, multiview regression, using Canonical Correlation Analysis (CCA) on unlabeled data, biases the regression towards useful features. It has been shown that CCA regression can substantially reduce variance with a minimal increase in bias if the views contains accurate estimators. Recent theoretical and empirical work shows that regression with random features closely approximates kernel regression, implying that the accuracy requirement holds for random views. We show that XNV consistently outperforms a state-of-the-art algorithm for semi-supervised learning: substantially improving predictive performance and reducing the variability of performance on a wide variety of real-world datasets, whilst also reducing runtime by orders of magnitude. 1 Introduction As the volume of data collected in the social and natural sciences increases, the computational cost of learning from large datasets has become an important consideration. For learning non-linear relationships, kernel methods achieve excellent performance but na¨ıvely require operations cubic in the number of training points. Randomization has recently been considered as an alternative to optimization that, surprisingly, can yield comparable generalization performance at a fraction of the computational cost [1, 2]. Random features have been introduced to approximate kernel machines when the number of training examples is very large, rendering exact kernel computation intractable. Among several different approaches, the Nystr¨om method for low-rank kernel approximation [1] exhibits good theoretical properties and empirical performance [3–5]. A second problem arising with large datasets concerns obtaining labels, which often requires a domain expert to manually assign a label to each instance which can be very expensive – requiring significant investments of both time and money – as the size of the dataset increases. Semi-supervised learning aims to improve prediction by extracting useful structure from the unlabeled data points and using this in conjunction with a function learned on a small number of labeled points. Contribution. This paper proposes a new semi-supervised algorithm for regression and classification, Correlated Nystr¨om Views (XNV), that addresses both problems simultaneously. The method 1 consists in essentially two steps. First, we construct two “views” using random features. We investigate two ways of doing so: one based on the Nystr¨om method and another based on random Fourier features (so-called kitchen sinks) [2,6]. It turns out that the Nystr¨om method almost always outperforms Fourier features by a quite large margin, so we only report these results in the main text. The second step, following [7], uses Canonical Correlation Analysis (CCA, [8,9]) to bias the optimization procedure towards features that are correlated across the views. Intuitively, if both views contain accurate estimators, then penalizing uncorrelated features reduces variance without increasing the bias by much. Recent theoretical work by Bach [5] shows that Nystr¨om views can be expected to contain accurate estimators. We perform an extensive evaluation of XNV on 18 real-world datasets, comparing against a modified version of the SSSL (simple semi-supervised learning) algorithm introduced in [10]. We find that XNV outperforms SSSL by around 10-15% on average, depending on the number of labeled points available, see §3. We also find that the performance of XNV exhibits dramatically less variability than SSSL, with a typical reduction of 30%. We chose SSSL since it was shown in [10] to outperform a state of the art algorithm, Laplacian Regularized Least Squares [11]. However, since SSSL does not scale up to large sets of unlabeled data, we modify SSSL by introducing a Nystr¨om approximation to improve runtime performance. This reduces runtime by a factor of ⇥1000 on N = 10, 000 points, with further improvements as N increases. Our approximate version of SSSL outperforms kernel ridge regression (KRR) by > 50% on the 18 datasets on average, in line with the results reported in [10], suggesting that we lose little by replacing the exact SSSL with our approximate implementation. Related work. Multiple view learning was first introduced in the co-training method of [12] and has also recently been extended to unsupervised settings [13,14]. Our algorithm builds on an elegant proposal for multi-view regression introduced in [7]. Surprisingly, despite guaranteeing improved prediction performance under a relatively weak assumption on the views, CCA regression has not been widely used since its proposal – to the best of our knowledge this is first empirical evaluation of multi-view regression’s performance. A possible reason for this is the difficulty in obtaining naturally occurring data equipped with multiple views that can be shown to satisfy the multi-view assumption. We overcome this problem by constructing random views that satisfy the assumption by design. 2 Method This section introduces XNV, our semi-supervised learning method. The method builds on two main ideas. First, given two equally useful but sufficiently different views on a dataset, penalizing regression using the canonical norm (computed via CCA), can substantially improve performance [7]. The second is the Nystr¨om method for constructing random features [1], which we use to construct the views. 2.1 Multi-view regression Suppose we have data T = ! (x1, y1), . . . , (xn, yn) " for xi 2 RD and yi 2 R, sampled according to joint distribution P(x, y). Further suppose we have two views on the data z(⌫) : RD −! H(⌫) = RM : x 7! z(⌫)(x) =: z(⌫) for ⌫2 {1, 2}. We make the following assumption about linear regressors which can be learned on these views. Assumption 1 (Multi-view assumption [7]). Define mean-squared error loss function `(g, x, y) = (g(x) −y)2 and let loss(g) := EP `(g(x), y). Further let L(Z) denote the space of linear maps from a linear space Z to the reals, and define: f (⌫) := argmin g2L(H(⌫)) loss(g) for ⌫2 {1, 2} and f := argmin g2L(H(1)⊕H(2)) loss(g). The multi-view assumption is that loss ⇣ f (⌫)⌘ −loss(f) ✏ for ⌫2 {1, 2}. (1) 2 In short, the best predictor in each view is within ✏of the best overall predictor. Canonical correlation analysis. Canonical correlation analysis [8, 9] extends principal component analysis (PCA) from one to two sets of variables. CCA finds bases for the two sets of variables such that the correlation between projections onto the bases are maximized. The first pair of canonical basis vectors, ⇣ b(1) 1 , b(2) 1 ⌘ is found by solving: argmax b(1),b(2)2RM corr ⇣ b(1)>z(1), b(2)>z(2)⌘ . (2) Subsequent pairs are found by maximizing correlations subject to being orthogonal to previously found pairs. The result of performing CCA is two sets of bases, B(⌫) = h b(⌫) 1 , . . . , b(⌫) M i for ⌫2 {1, 2}, such that the projection of z(⌫) onto B(⌫) which we denote ¯z(⌫) satisfies 1. Orthogonality: ET ⇥¯z(⌫)> j ¯z(⌫) k ] = δjk, where δjk is the Kronecker delta, and 2. Correlation: ET ⇥¯z(1)> j ¯z(2) k ⇤ = λj · δjk where w.l.o.g. we assume 1 ≥λ1 ≥λ2 ≥· · · ≥0. λj is referred to as the jth canonical correlation coefficient. Definition 1 (canonical norm). Given vector ¯z(⌫) in the canonical basis, define its canonical norm as k¯z(⌫)kCCA := v u u t D X j=1 1 −λj λj ⇣ ¯z(⌫) j ⌘2 . Canonical ridge regression. Assume we observe n pairs of views coupled with real valued labels n z(1) i , z(2) i , yi on i=1, canonical ridge regression finds coefficients bβ (⌫) = h bβ(⌫) 1 , . . . , bβ(⌫) M i> such that bβ (⌫) := argmin β 1 n n X i=1 ⇣ yi −β(⌫) >¯z(⌫) i ⌘2 + kβ(⌫)k2 CCA. (3) The resulting estimator, referred to as the canonical shrinkage estimator, is bβ(⌫) j = λj n n X i=1 ¯z(⌫) i,j yi. (4) Penalizing with the canonical norm biases the optimization towards features that are highly correlated across the views. Good regressors exist in both views by Assumption 1. Thus, intuitively, penalizing uncorrelated features significantly reduces variance, without increasing the bias by much. More formally: Theorem 1 (canonical ridge regression, [7]). Assume E[y2|x] 1 and that Assumption 1 holds. Let f (⌫) bβ denote the estimator constructed with the canonical shrinkage estimator, Eq. (4), on training set T, and let f denote the best linear predictor across both views. For ⌫2 {1, 2} we have ET [loss(f (⌫) bβ )] −loss(f) 5✏+ PM j=1 λ2 j n where the expectation is with respect to training sets T sampled from P(x, y). The first term, 5✏, bounds the bias of the canonical estimator, whereas the second, 1 n P λ2 j bounds the variance. The P λ2 j can be thought of as a measure of the “intrinsic dimensionality” of the unlabeled data, which controls the rate of convergence. If the canonical correlation coefficients decay sufficiently rapidly, then the increase in bias is more than made up for by the decrease in variance. 3 2.2 Constructing random views We construct two views satisfying Assumption 1 in expectation, see Theorem 3 below. To ensure our method scales to large sets of unlabeled data, we use random features generated using the Nystr¨om method [1]. Suppose we have data {xi}N i=1. When N is very large, constructing and manipulating the N ⇥N Gram matrix [K]ii0 = hφ(xi), φ(xi0)i = (xi, xi0) is computationally expensive. Where here, φ(x) defines a mapping from RD to a high dimensional feature space and (·, ·) is a positive semi-definite kernel function. The idea behind random features is to instead define a lower-dimensional mapping, z(xi) : RD ! RM through a random sampling scheme such that [K]ii0 ⇡z(xi)>z(xi0) [6, 15]. Thus, using random features, non-linear functions in x can be learned as linear functions in z(x) leading to significant computational speed-ups. Here we give a brief overview of the Nystr¨om method, which uses random subsampling to approximate the Gram matrix. The Nystr¨om method. Fix an M ⌧N and randomly (uniformly) sample a subset M = {ˆxi}M i=1 of M points from the data {xi}N i=1. Let bK denote the Gram matrix [ bK]ii0 where i, i0 2 M. The Nystr¨om method [1,3] constructs a low-rank approximation to the Gram matrix as K ⇡˜K := N X i=1 N X i0=1 [(xi, ˆx1), . . . , (xi, ˆxM)] bK† [(xi0, ˆx1), . . . , (xi0, ˆxM)]> , (5) where bK† 2 RM⇥M is the pseudo-inverse of bK. Vectors of random features can be constructed as z(xi) = bD−1/2 bV> [(xi, ˆx1), . . . , (xi, ˆxM)]> , where the columns of bV are the eigenvectors of bK with bD the diagonal matrix whose entries are the corresponding eigenvalues. Constructing features in this way reduces the time complexity of learning a non-linear prediction function from O(N 3) to O(N) [15]. An alternative perspective on the Nystr¨om approximation, that will be useful below, is as follows. Consider integral operators LN[f](·) := 1 N N X i=1 (xi, ·)f(xi) and LM[f](·) := 1 M M X i=1 (xi, ·)f(xi), (6) and introduce Hilbert space ˆH = span { ˆ'1, . . . , ˆ'r} where r is the rank of bK and the ˆ'i are the first r eigenfunctions of LM. Then the following proposition shows that using the Nystr¨om approximation is equivalent to performing linear regression in the feature space (“view”) z : X ! ˆH spanned by the eigenfunctions of linear operator LM in Eq. (6): Proposition 2 (random Nystr¨om view, [3]). Solving min w2Rr 1 N N X i=1 `(w>z(xi), yi) + γ 2 kwk2 2 (7) is equivalent to solving min f2 ˆ H 1 N N X i=1 `(f(xi), yi) + γ 2 kfk2 H. (8) 2.3 The proposed algorithm: Correlated Nystr¨om Views (XNV) Algorithm 1 details our approach to semi-supervised learning based on generating two views consisting of Nystr¨om random features and penalizing features which are weakly correlated across views. The setting is that we have labeled data {xi, yi}n i=1 and a large amount of unlabeled data {xi}N i=n+1. Step 1 generates a set of random features. The next two steps implement multi-view regression using the randomly generated views z(1)(x) and z(2)(x). Eq. (9) yields a solution for which unimportant 4 Algorithm 1 Correlated Nystr¨om Views (XNV). Input: Labeled data: {xi, yi}n i=1 and unlabeled data: {xi}N i=n+1 1: Generate features. Sample ˆx1, . . . , ˆx2M uniformly from the dataset, compute the eigendecompositions of the sub-sampled kernel matrices ˆK(1) and ˆK(2) which are constructed from the samples 1, . . . , M and M + 1, . . . , 2M respectively, and featurize the input: z(⌫)(xi) ˆD(⌫),−1/2 ˆV(⌫)> [(xi, ˆx1), . . . , (xi, ˆxM)]> for ⌫2 {1, 2}. 2: Unlabeled data. Compute CCA bases B(1), B(2) and canonical correlations λ1, . . . , λM for the two views and set ¯zi B(1)z(1)(xi). 3: Labeled data. Solve bβ = argmin β 1 n n X i=1 ` ⇣ β>¯zi, yi ⌘ + kβk2 CCA + γkβk2 2 . (9) Output: bβ features are heavily downweighted in the CCA basis without introducing an additional tuning parameter. The further penalty on the `2 norm (in the CCA basis) is introduced as a practical measure to control the variance of the estimator bβ which can become large if there are many highly correlated features (i.e. the ratio 1−λj λj ⇡0 for large j). In practice most of the shrinkage is due to the CCA norm: cross-validation obtains optimal values of γ in the range [0.00001, 0.1]. Computational complexity. XNV is extremely fast. Nystr¨om sampling, step 1, reduces the O(N 3) operations required for kernel learning to O(N). Computing the CCA basis, step 2, using standard algorithms is in O(NM 2). However, we reduce the runtime to O(NM) by applying a recently proposed randomized CCA algorithm of [16]. Finally, step 3 is a computationally cheap linear program on n samples and M features. Performance guarantees. The quality of the kernel approximation in (5) has been the subject of detailed study in recent years leading to a number of strong empirical and theoretical results [3–5, 15]. Recent work of Bach [5] provides theoretical guarantees on the quality of Nystr¨om estimates in the fixed design setting that are relevant to our approach.1 Theorem 3 (Nystr¨om generalization bound, [5]). Let ⇠2 RN be a random vector with finite variance and zero mean, y = [y1, . . . , yN]>, and define smoothed estimate ˆykernel := (K + NγI)−1K(y + ⇠) and smoothed Nystr¨om estimate ˆyNystr¨om := ( ˜K + NγI)−1 ˜K(y + ⇠), both computed by minimizing the MSE with ridge penalty γ. Let ⌘2 (0, 1). For sufficiently large M (depending on ⌘, see [5]), we have EME⇠ ⇥ ky −ˆyNystr¨omk2 2 ⇤ (1 + 4⌘) · E⇠ ⇥ ky −ˆykernelk2 2 ⇤ where EM refers to the expectation over subsampled columns used to construct ˜K. In short, the best smoothed estimators in the Nystr¨om views are close to the optimal smoothed estimator. Since the kernel estimate is consistent, loss(f) ! 0 as n ! 1. Thus, Assumption 1 holds in expectation and the generalization performance of XNV is controlled by Theorem 1. Random Fourier Features. An alternative approach to constructing random views is to use Fourier features instead of Nystr¨om features in Step 1. We refer to this approach as Correlated Kitchen Sinks (XKS) after [2]. It turns out that the performance of XKS is consistently worse than XNV, in line with the detailed comparison presented in [3]. We therefore do not discuss Fourier features in the main text, see §SI.3 for details on implementation and experimental results. 1Extending to a random design requires techniques from [17]. 5 Table 1: Datasets used for evaluation. Set Name Task N D Set Name Task N D 1 abalone2 C 2, 089 6 10 elevators4 R 8, 752 18 2 adult2 C 32, 561 14 11 HIVa3 C 21, 339 1, 617 3 ailerons4 R 7, 154 40 12 house4 R 11, 392 16 4 bank84 C 4, 096 8 13 ibn Sina3 C 10, 361 92 5 bank324 C 4, 096 32 14 orange3 C 25, 000 230 6 cal housing4 R 10, 320 8 15 sarcos 15 R 44, 484 21 7 census2 R 18, 186 119 16 sarcos 55 R 44, 484 21 8 CPU2 R 6, 554 21 17 sarcos 75 R 44, 484 21 9 CT2 R 30, 000 385 18 sylva3 C 72, 626 216 2.4 A fast approximation to SSSL The SSSL (simple semi-supervised learning) algorithm proposed in [10] finds the first s eigenfunctions φi of the integral operator LN in Eq. (6) and then solves argmin w2Rs n X i=1 0 @ s X j=1 wjφk(xi) −yi 1 A 2 , (10) where s is set by the user. SSSL outperforms Laplacian Regularized Least Squares [11], a state of the art semi-supervised learning method, see [10]. It also has good generalization guarantees under reasonable assumptions on the distribution of eigenvalues of LN. However, since SSSL requires computing the full N ⇥N Gram matrix, it is extremely computationally intensive for large N. Moreover, tuning s is difficult since it is discrete. We therefore propose SSSLM, an approximation to SSSL. First, instead of constructing the full Gram matrix, we construct a Nystr¨om approximation by sampling M points from the labeled and unlabeled training set. Second, instead of thresholding eigenfunctions, we use the easier to tune ridge penalty which penalizes directions proportional to the inverse square of their eigenvalues [18]. As justification, note that Proposition 2 states that the Nystr¨om approximation to kernel regression actually solves a ridge regression problem in the span of the eigenfunctions of ˆLM. As M increases, the span of ˆLM tends towards that of LN [15]. We will also refer to the Nystr¨om approximation to SSSL using 2M features as SSSL2M. See experiments below for further discussion of the quality of the approximation. 3 Experiments Setup. We evaluate the performance of XNV on 18 real-world datasets, see Table 1. The datasets cover a variety of regression (denoted by R) and two-class classification (C) problems. The sarcos dataset involves predicting the joint position of a robot arm; following convention we report results on the 1st, 5th and 7th joint positions. The SSSL algorithm was shown to exhibit state-of-the-art performance over fully and semisupervised methods in scenarios where few labeled training examples are available [10]. However, as discussed in §2.2, due to its computational cost we compare the performance of XNV to the Nystr¨om approximations SSSLM and SSSL2M. We used a Gaussian kernel for all datasets. We set the kernel width, σ and the `2 regularisation strength, γ, for each method using 5-fold cross validation with 1000 labeled training examples. We trained all methods using a squared error loss function, `(f(xi), yi) = (f(xi)−yi)2, with M = 200 random features, and n = 100, 150, 200, . . . , 1000 randomly selected training examples. 2Taken from the UCI repository http://archive.ics.uci.edu/ml/datasets.html 3Taken from http://www.causality.inf.ethz.ch/activelearning.php 4Taken from http://www.dcc.fc.up.pt/˜ltorgo/Regression/DataSets.html 5Taken from http://www.gaussianprocess.org/gpml/data/ 6 Runtime performance. The SSSL algorithm of [10] is not computationally feasible on large datasets, since it has time complexity O(N 3). For illustrative purposes, we report run times6 in seconds of the SSSL algorithm against SSSLM and XNV on three datasets of different sizes. runtimes bank8 cal housing sylva SSSL 72s 2300s SSSL2M 0.3s 0.6s 24s XNV 0.9s 1.3s 26s For the cal housing dataset, XNV exhibits an almost 1800⇥speed up over SSSL. For the largest dataset, sylva, exact SSSL is computationally intractable. Importantly, the computational overhead of XNV over SSSL2M is small. Generalization performance. We report on the prediction performance averaged over 100 experiments. For regression tasks we report on the mean squared error (MSE) on the testing set normalized by the variance of the test output. For classification tasks we report the percentage of the test set that was misclassified. The table below shows the improvement in performance of XNV over SSSLM and SSSL2M (taking whichever performs better out of M or 2M on each dataset), averaged over all 18 datasets. Observe that XNV is considerably more accurate and more robust than SSSLM. XNV vs SSSLM/2M n = 100 n = 200 n = 300 n = 400 n = 500 Avg reduction in error 11% 16% 15% 12% 9% Avg reduction in std err 15% 30% 31% 33% 30% The reduced variability is to be expected from Theorem 1. 100 200 300 400 500 600 700 800 900 1000 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 prediction error number of labeled training points SSSLM SSSL2M XNV (a) adult 100 200 300 400 500 600 700 800 900 1000 0.4 0.5 0.6 0.7 0.8 0.9 1 prediction error number of labeled training points SSSLM SSSL2M XNV (b) cal housing 100 200 300 400 500 600 700 800 900 1000 0 0.01 0.02 0.03 0.04 0.05 0.06 prediction error number of labeled training points SSSLM SSSL2M XNV (c) census 100 200 300 400 500 600 700 800 900 1000 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 prediction error number of labeled training points SSSLM SSSL2M XNV (d) elevators 100 200 300 400 500 600 700 800 900 1000 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 prediction error number of labeled training points SSSLM SSSL2M XNV (e) ibn Sina 100 200 300 400 500 600 700 800 900 1000 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 prediction error number of labeled training points SSSLM SSSL2M XNV (f) sarcos 5 Figure 1: Comparison of mean prediction error and standard deviation on a selection of datasets. Table 2 presents more detailed comparison of performance for individual datasets when n = 200, 400. The plots in Figure 1 shows a representative comparison of mean prediction errors for several datasets when n = 100, . . . , 1000. Error bars represent one standard deviation. Observe that XNV almost always improves prediction accuracy and reduces variance compared with SSSLM and SSSL2M when the labeled training set contains between 100 and 500 labeled points. A complete set of results is provided in §SI.1. Discussion of SSSLM. Our experiments show that going from M to 2M does not improve generalization performance in practice. This suggests that when there are few labeled points, obtaining a 6Computed in Matlab 7.14 on a Core i5 with 4GB memory. 7 more accurate estimate of the eigenfunctions of the kernel does not necessarily improve predictive performance. Indeed, when more random features are added, stronger regularization is required to reduce the influence of uninformative features, this also has the effect of downweighting informative features. This suggests that the low rank approximation SSSLM to SSSL suffices. Finally, §SI.2 compares the performance of SSSLM and XNV to fully supervised kernel ridge regression (KRR). We observe dramatic improvements, between 48% and 63%, consistent with the results observed in [10] for the exact SSSL algorithm. Random Fourier features. Nystr¨om features significantly outperform Fourier features, in line with observations in [3]. The table below shows the relative improvement of XNV over XKS: XNV vs XKS n = 100 n = 200 n = 300 n = 400 n = 500 Avg reduction in error 30% 28% 26% 25% 24% Avg reduction in std err 36% 44% 34% 37% 36% Further results and discussion for XKS are included in the supplementary material. Table 2: Performance (normalized MSE/classification error rate). Standard errors in parentheses. set SSSLM SSSL2M XNV set SSSLM SSSL2M XNV n = 200 1 0.054 (0.005) 0.055 (0.006) 0.053 (0.004) 10 0.309 (0.059) 0.358 (0.077) 0.226 (0.020) 2 0.198 (0.014) 0.184 (0.010) 0.175 (0.010) 11 0.146 (0.048) 0.072 (0.024) 0.036 (0.001) 3 0.218 (0.016) 0.231 (0.020) 0.213 (0.016) 12 0.761 (0.075) 0.787 (0.091) 0.792 (0.100) 4 0.558 (0.027) 0.567 (0.029) 0.561 (0.030) 13 0.109 (0.017) 0.109 (0.017) 0.068 (0.010) 5 0.058 (0.004) 0.060 (0.005) 0.055 (0.003) 14 0.019 (0.001) 0.019 (0.001) 0.019 (0.000) 6 0.567 (0.081) 0.634 (0.103) 0.459 (0.045) 15 0.076 (0.008) 0.078 (0.009) 0.071 (0.006) 7 0.020 (0.012) 0.022 (0.014) 0.019 (0.005) 16 0.172 (0.032) 0.192 (0.036) 0.119 (0.014) 8 0.395 (0.395) 0.463 (0.414) 0.263 (0.352) 17 0.041 (0.004) 0.043 (0.005) 0.040 (0.004) 9 0.437 (0.096) 0.367 (0.060) 0.222 (0.015) 18 0.036 (0.007) 0.039 (0.007) 0.028 (0.009) n = 400 1 0.051 (0.003) 0.052 (0.003) 0.050 (0.002) 10 0.218 (0.022) 0.233 (0.027) 0.192 (0.010) 2 0.177 (0.008) 0.172 (0.006) 0.167 (0.005) 11 0.051 (0.009) 0.122 (0.031) 0.036 (0.001) 3 0.199 (0.011) 0.209 (0.013) 0.193 (0.010) 12 0.691 (0.040) 0.701 (0.051) 0.709 (0.058) 4 0.517 (0.018) 0.527 (0.019) 0.510 (0.016) 13 0.070 (0.009) 0.072 (0.008) 0.054 (0.004) 5 0.050 (0.003) 0.051 (0.003) 0.050 (0.002) 14 0.019 (0.001) 0.019 (0.001) 0.019 (0.000) 6 0.513 (0.055) 0.555 (0.063) 0.432 (0.036) 15 0.059 (0.004) 0.060 (0.005) 0.057 (0.003) 7 0.019 (0.010) 0.021 (0.012) 0.014 (0.003) 16 0.105 (0.014) 0.106 (0.014) 0.090 (0.007) 8 0.209 (0.171) 0.286 (0.248) 0.110 (0.107) 17 0.032 (0.002) 0.033 (0.003) 0.032 (0.002) 9 0.249 (0.024) 0.304 (0.037) 0.201 (0.013) 18 0.029 (0.006) 0.032 (0.005) 0.023 (0.006) 4 Conclusion We have introduced the XNV algorithm for semi-supervised learning. By combining two randomly generated views of Nystr¨om features via an efficient implementation of CCA, XNV outperforms the prior state-of-the-art, SSSL, by 10-15% (depending on the number of labeled points) on average over 18 datasets. Furthermore, XNV is over 3 orders of magnitude faster than SSSL on medium sized datasets (N = 10, 000) with further gains as N increases. An interesting research direction is to investigate using the recently developed deep CCA algorithm, which extracts higher order correlations between views [19], as a preprocessing step. In this work we use a uniform sampling scheme for the Nystr¨om method for computational reasons since it has been shown to perform well empirically relative to more expensive schemes [20]. Since CCA gives us a criterion by which to measure the important of random features, in the future we aim to investigate active sampling schemes based on canonical correlations which may yield better performance by selecting the most informative indices to sample. Acknowledgements. We thank Haim Avron for help with implementing randomized CCA and Patrick Pletscher for drawing our attention to the Nystr¨om method. 8 References [1] Williams C, Seeger M: Using the Nystr¨om method to speed up kernel machines. In NIPS 2001. [2] Rahimi A, Recht B: Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Adv in Neural Information Processing Systems (NIPS) 2008. [3] Yang T, Li YF, Mahdavi M, Jin R, Zhou ZH: Nystr¨om Method vs Random Fourier Features: A Theoretical and Empirical Comparison. In NIPS 2012. [4] Gittens A, Mahoney MW: Revisiting the Nystr¨om method for improved large-scale machine learning. In ICML 2013. [5] Bach F: Sharp analysis of low-rank kernel approximations. In COLT 2013. [6] Rahimi A, Recht B: Random Features for Large-Scale Kernel Machines. In Adv in Neural Information Processing Systems 2007. [7] Kakade S, Foster DP: Multi-view Regression Via Canonical Correlation Analysis. In Computational Learning Theory (COLT) 2007. [8] Hotelling H: Relations between two sets of variates. Biometrika 1936, 28:312–377. [9] Hardoon DR, Szedmak S, Shawe-Taylor J: Canonical Correlation Analysis: An Overview with Application to Learning Methods. Neural Comp 2004, 16(12):2639–2664. [10] Ji M, Yang T, Lin B, Jin R, Han J: A Simple Algorithm for Semi-supervised Learning with Improved Generalization Error Bound. In ICML 2012. [11] Belkin M, Niyogi P, Sindhwani V: Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. JMLR 2006, 7:2399–2434. [12] Blum A, Mitchell T: Combining labeled and unlabeled data with co-training. In COLT 1998. [13] Chaudhuri K, Kakade SM, Livescu K, Sridharan K: Multiview clustering via Canonical Correlation Analysis. In ICML 2009. [14] McWilliams B, Montana G: Multi-view predictive partitioning in high dimensions. Statistical Analysis and Data Mining 2012, 5:304–321. [15] Drineas P, Mahoney MW: On the Nystr¨om Method for Approximating a Gram Matrix for Improved Kernel-Based Learning. JMLR 2005, 6:2153–2175. [16] Avron H, Boutsidis C, Toledo S, Zouzias A: Efficient Dimensionality Reduction for Canonical Correlation Analysis. In ICML 2013. [17] Hsu D, Kakade S, Zhang T: An Analysis of Random Design Linear Regression. In COLT 2012. [18] Dhillon PS, Foster DP, Kakade SM, Ungar LH: A Risk Comparison of Ordinary Least Squares vs Ridge Regression. Journal of Machine Learning Research 2013, 14:1505–1511. [19] Andrew G, Arora R, Bilmes J, Livescu K: Deep Canonical Correlation Analysis. In ICML 2013. [20] Kumar S, Mohri M, Talwalkar A: Sampling methods for the Nystr¨om method. JMLR 2012, 13:981– 1006. 9
2013
178
4,907
Variational Planning for Graph-based MDPs Qiang Cheng† Qiang Liu‡ Feng Chen† Alexander Ihler‡ †Department of Automation, Tsinghua University ‡Department of Computer Science, University of California, Irvine †{cheng-q09@mails., chenfeng@mail.}tsinghua.edu.cn ‡{qliu1@,ihler@ics.}uci.edu Abstract Markov Decision Processes (MDPs) are extremely useful for modeling and solving sequential decision making problems. Graph-based MDPs provide a compact representation for MDPs with large numbers of random variables. However, the complexity of exactly solving a graph-based MDP usually grows exponentially in the number of variables, which limits their application. We present a new variational framework to describe and solve the planning problem of MDPs, and derive both exact and approximate planning algorithms. In particular, by exploiting the graph structure of graph-based MDPs, we propose a factored variational value iteration algorithm in which the value function is first approximated by the multiplication of local-scope value functions, then solved by minimizing a Kullback-Leibler (KL) divergence. The KL divergence is optimized using the belief propagation algorithm, with complexity exponential in only the cluster size of the graph. Experimental comparison on different models shows that our algorithm outperforms existing approximation algorithms at finding good policies. 1 Introduction Markov Decision Processes (MDPs) have been widely used to model and solve sequential decision making problems under uncertainty, in fields including artificial intelligence, control, finance and management (Puterman, 2009, Barber, 2011). However, standard MDPs are described by explicitly enumerating all possible states of variables, and are thus not well suited to solve large problems. Graph-based MDPs (Guestrin et al., 2003, Forsell and Sabbadin, 2006) provide a compact representation for large and structured MDPs, where the transition model is explicitly represented by a dynamic Bayesian network. In graph-based MDPs, the state is described by a collection of random variables, and the transition and reward functions are represented by a set of smaller (local-scope) functions. This is particularly useful for spatial systems or networks with many “local” decisions, each affecting small sub-systems that are coupled together and interdependent (Nath and Domingos, 2010, Sabbadin et al., 2012). The graph-based MDP representation gives a compact way to describe a structured MDP, but the complexity of exactly solving such MDPs typically still grows exponentially in the number of state variables. Consequently, graph-based MDPs are often approximately solved by enforcing contextspecific independence or function-specific independence constraints (Sigaud et al., 2010). To take advantage of context-specific independence, a graph-based MDP can be represented using decision trees or algebraic decision diagrams (Bahar et al., 1993), and then solved by applying structured value iteration (Hoey et al., 1999) or structured policy iteration (Boutilier et al., 2000). However, in the worst case, the size of the diagram still increases exponentially with the number of variables. Alternatively, methods based on function-specific independence approximate the value function by a linear combination of basis functions (Koller and Parr, 2000, Guestrin et al., 2003). Exploiting function-specific independence, a graph-based MDP can be solved using approximate linear programming (Guestrin et al., 2003, 2001, Forsell and Sabbadin, 2006), approximate policy itera1 tion (Sabbadin et al., 2012, Peyrard and Sabbadin, 2006) and approximate value iteration (Guestrin et al., 2003). Among these, the approximate linear programming algorithm in Guestrin et al. (2003, 2001) has an exponential number of constraints (in the treewidth), and thus cannot be applied to general MDPs with many variables. The approximate policy iteration algorithm in Sabbadin et al. (2012), Peyrard and Sabbadin (2006) exploits a mean field approximation to compute and update the local policies; unfortunately this can give loose approximations. In this paper, we propose a variational framework for the MDP planning problem. This framework provides a new perspective to describe and solve graph-based MDPs where both the state and decision spaces are structured. We first derive a variational value iteration algorithm as an exact planning algorithm, which is equivalent to the classical value iteration algorithm. We then design an approximate version of this algorithm by taking advantage of the factored representation of the reward and transition functions, and propose a factored variational value iteration algorithm. This algorithm treats the value function as a unnormalized distribution and approximates it using a product of localscope value functions. At each step, this algorithm computes the value function by minimizing a Kullback-Leibler divergence, which can be done using a belief propagation algorithm for influence diagram problems (Liu and Ihler, 2012) . In comparison with the approximate linear programming algorithm (Guestrin et al., 2003) and the approximate policy iteration algorithm (Sabbadin et al., 2012) on various graph-based MDPs, we show that our factored variational value iteration algorithm generates better policies. The remainder of this paper is organized as follows. The background and some notation for graphbased MDPs are introduced in Section 2. Section 3 describes a variational view of planning for finite horizon MDPs, followed by a framework for infinite MDPs in Section 4. In Section 5, we derive an approximate algorithm for solving infinite MDPs based on the variational perspective. We show experiments to demonstrate the effectiveness of our algorithm in Section 6. 2 Markov Decision Processes and Graph-based MDPs 2.1 Markov Decision Processes A Markov Decision Process (MDP) is a discrete time stochastic control process, where the system chooses the decisions at each step to maximize the overall reward. An MDP can be characterized by a four tuple (X, D, R, T), where X represents the set of all possible states; D is the set of all possible decisions; R : X × D →R is the reward function of the system, and R (x, d) is the reward of the system after choosing decision d in state x; T : X × D × X →[0, 1] is the transition function, and T (y|x, d) is the probability that the system arrives at state y, given that it starts from x upon executing decision d. A policy of the system is a mapping from the states to the decisions π (x) : X →D so that π (x) tells the decision chosen by the system in state x. The graphical representation of an MDP is shown in Figure 1(a). We consider the case of an MDP with infinite horizon, in which the future rewards are discounted exponentially with a discount factor γ ∈[0, 1]. The task of the MDP is to choose the best stationary policy π∗(x) that maximizes the expected discounted reward on the infinite horizon. The value function v∗(x) of the best policy π∗(x) then satisfies the following Bellman equation: v∗(x) = max π(x) X y∈X T (y|x, π (x)) (R (x, π (x)) + γv∗(y)), (1) where v∗(x) = v∗(y) , ∀x = y. The Bellman equation can be solved using stochastic dynamic programming algorithms such as value iteration and policy iteration, or linear programming algorithms (Puterman, 2009). 2.2 Graph-based MDPs We assume that the full state x can be represented as a collection of state variables xi, so that X is a Cartesian product of the domains of the xi: X = X1 × X2 × · · · × XN, and similarly for d: D = D1 × D2 × · · · × DN. We consider the following particular factored form for MDPs: for each variable i, there exist neighborhood sets Γi (including i) such that the value of xt+1 i depends only on the variable i’s neighborhood, xt [Γi], and the ith decision dt i. Then, we can write the transition function in a factored form: T (y|x, d) = N Y i=1 Ti (yi|x[Γi], di), (2) 2 r r x y x d d  x  x   , R x d   , R x d   | , T y x d   | , T y x d r r r x y x x d d d  x  x  x   , R x d   , R x d   , R x d   | , T y x d   | , T y x d   | , T y x d 1x 2x 3x 1d 2 d 3 d 1r 2r 3r 1d 2 d 3 d 1r 2r 3r 1y 2y 3y 1x 2x 3x   1 1 , R x d   2 2 , R x d   3 3 , R x d   1 1 2 1 | , , T y x x d   2 1 2 3 2 | , , , T y x x x d   3 2 3 3 | , , T y x x d (a) r r x y x d d  x  x   , R x d   , R x d   | , T y x d   | , T y x d r r r x y x x d d d  x  x  x   , R x d   , R x d   , R x d   | , T y x d   | , T y x d   | , T y x d 1x 2x 3x 1d 2 d 3 d 1r 2r 3r 1d 2 d 3 d 1r 2r 3r 1y 2y 3y 1x 2x 3x   1 1 , R x d   2 2 , R x d   3 3 , R x d   1 1 2 1 | , , T y x x d   2 1 2 3 2 | , , , T y x x x d   3 2 3 3 | , , T y x x d   1x    2x    3x  (b) Figure 1: (a) A Markov decision process; (b) A graph-based Markov decision process. where each factor is a local-scope function Ti : X [Γi] × Di × Xi →[0, 1] , ∀i ∈{1, 2, . . . , N} . We also assume that the reward function is the sum of N local-scope rewards: R (x, d) = N X i=1 Ri (xi, di), (3) with local-scope functions Ri : Xi × Di →R, ∀i ∈{1, 2, . . . , N}. To summarize, a graph-based Markov decision process is characterized by the following parameters: ({Xi : 1 ≤i ≤N} ; {Di : 1 ≤i ≤N} ; {Ri : 1 ≤i ≤N} ; {Γi : 1 ≤i ≤N} ; {Ti : 1 ≤i ≤N}) . Figure 1(b) gives an example of a graph-based MDP. These assumptions for graph-based MDPs can be easily generalized, for example to include Ti and Ri that depend on arbitrary sets of variables and decisions, using some additional notation. The optimal policy π (x) cannot be explicitly represented for large graph-based MDPs, since the number of states grows exponentially with the number of variables. To reduce complexity, we consider a particular class of local policies: a policy π (x) : X →D is said to be local if decision di is made using only the neighborhood Γi, so that π (x) = (π1 (x [Γ1]) , π2 (x [Γ2]) , . . . , πN (x [ΓN])) where πi (x [Γi]) : X [Γi] →Di. The main advantage of local policies is that they can be concisely expressed when the neighborhood sizes |Γi| are small. 3 Variational Planning for Finite Horizon MDPs In this section, we introduce a variational planning viewpoint of finite MDPs. A finite MDP can be viewed as an influence diagram; we can then directly relate planning to the variational decisionmaking framework of Liu and Ihler (2012). Influence diagrams (Shachter, 2007) make use of Bayesian networks to represent structured decision problems under uncertainty. The shaded part in Figure 1(a) shows a simple example influence diagram, with random variables {x, y}, decision variable d and reward functions {R (x, d) , v (y)}. The goal is then to choose a policy that maximizes the expected reward. The best policy πt (x) for a finite MDP can be computed using backward induction (Barber, 2011): vt−1 (x) = max π(x) X y∈X T (y|x, π (x)) R (x, π (x)) + γvt (y)  , (4) Let pt (x, y, d) = T (y|x, π (x)) (R (x, π (x)) + γvt (y)) be an augmented distribution (see, e.g., Liu and Ihler (2012)). Applying a variational framework for influence diagrams (Liu and Ihler, 2012, Theorem 3.1), the optimal policy can be equivalently solved from the dual form of Eq. (4): Φ θt = max τ∈M  θ∆;t, τ + H (x, y, d; τ) −H (d|x; τ) , (5) where θ∆;t (x, y, d) = log pt (x, y, d) = log T (y|x, d) + log (R (x, d) + γvt (y)), and τ is a vector of moments in the marginal polytope M (Wainwright and Jordan, 2008). In a mild abuse of notation, we will use τ to refer both to the vector of moments and to the maximum entropy 3 distribution τ(x, y, d) consistent with those moments; H(·; τ) refers to the entropy or conditional entropy of this distribution. See also Wainwright and Jordan (2008), Liu and Ihler (2012) for details. Let τ t (x, y, d) be the optimal solution of Eq. (5); then from Liu and Ihler (2012), the optimal policy πt (x) is simply arg maxd τ t (d|x). Moreover, the optimal value function vt−1 (x) can be obtained from Eq. (5). This result is summarized in the following lemma. Lemma 1. For finite MDPs with non-stationary policy, the best policy πt (x) and the value function vt−1 (x) can be obtained by solving Eq. (5). Let τ t (x, y, d) be the optimal solution of Eq. (5). (a) The optimal policy can be obtained from τ t (x, y, d), as πt (x) = arg maxd τ t (d|x). (b) The value function w.r.t. πt (x) can be obtained as vt−1 (x) = exp (Φ (θt)) τ t (x). Proof. (a) follows directly from Theorem 3.1 of Liu and Ihler (2012). (b) Note that T (y|x, πt (x)) (R (x, πt (x)) + γvt (y)) = exp (Φ (θt)) τ t (x, y, d). Making use of Eq. (4), summing over y and maximizing over d on exp (Φ (θt)) τ t (x, y, d), we obtain vt−1 (x) = exp (Φ (θt)) τ t (x). 4 Variational Planning for Infinite Horizon MDPs Given the variational form of finite MDPs, we now construct a variational framework for infinite MDPs. Compared to the primal form (i.e., Eq. (4)) of finite MDPs, the Bellman equation of an infinite MDP, Eq. (1), has the additional constraint that vt−1 (x) = vt (y) when x = y. For an infinite MDP, we can simply consider a two-stage finite MDP with the variational form in Eq. (5), but with this additional constraint. The main result is given by the following theorem. Theorem 2. Assume τ and Φ are the solution of the following optimization problem, max τ∈M,Φ∈R Φ, subject to Φ = θ∆, τ + H (x, y, d; τ) −H (d|x; τ), (6) θ∆= log T (y|x, d) + log (R (x, d) + γ exp (Φ) τx (y)) , (7) where τx denotes the marginal distribution on x. With τ ∗being the optimal solution, we have (a) The optimal policy of the infinite MDP can be decoded as π∗(x) = arg maxd τ ∗(d|x). (b) The value function w.r.t. π∗(x) is v∗(x) = exp (Φ) τ ∗(x). Proof. The Bellman equation is equivalent to the backward induction in Eq. (4), subject to an extra constraint that vt = vt−1. The result follows by replacing Eq. (4) with its variational dual (5). Like the Bellman equation (4), its dual form (6) also has no closed-form solution. Analogously to the value iteration algorithm for the Bellman equation, Eq. (6) can be solved by alternately fixing τx (x), Φ in θ∆and solving Eq. (6) with only the first constraint using some convex optimization technique. However, each step of solving for τ and Φ is equivalent to one step of value iteration; if τ(x, y, d) is represented explicitly, it seems to offer no advantage over simply applying the elimination operators as in (4). The usefulness of this form is mainly in opening the door to design new approximations. 5 Approximate Variational Algorithms for Graph-based MDPs The framework in the previous section gives a new perspective on the MDP planning problem, but does not by itself simplify the problem or provide new solution methods. For graph-based MDPs, the sizes of the full state and decision spaces are exponential in the number of variables. Thus, the complexity of exact algorithms is exponentially large. In this section, we present an approximate algorithm for solving Eq. (6), by exploiting the factorization structure of the transition function (2), the reward function (3) and the value function v (x). Standard variational approximations take advantage of the multiplicative factorization of a distribution to define their approximations. While our (unnormalized) distribution p (x, y, d) = exp[θ∆(x, y, d)] is structured, some of its important structure comes from additive factors, such as the local-scope reward functions Ri (xi, di) in Eq. (3), and the discounted value function γv (x) in Eq. (1). Computing the sum of these additive factors directly would create a large factor over an unmanageably large variable domain, and destroy most of the useful structure of p (x, y, d). 4 To avoid this effect, we convert the presence of additive factors into multiplicative factors by augmenting the model with a latent “selector” variable, which is similar to that used for the “complete likelihood” in mixture models (Liu and Ihler, 2012). For example, consider the sum of two factors: f(x) = f12 (x1, x2) + f23 (x2, x3) = X a∈{0,1} (f12)a · (f23)(1−a) = X a∈{0,1} ¯f12(a, x1, x2) · ¯f23(a, x2, x3). Introducing the auxilliary variable a converts f into a product of factors, where marginalizing over a yields the original function f. Using this augmenting approach, the additive elements of the graph-based MDP are converted to multiplicative factors, that is Ri (xi, di) →˜Ri (xi, di, a), and γv (x) →˜vγ (x, a). In this way, the parameter θ∆of a graph-based MDP can be represented as θ∆(x, y, d, a) = N X i=1 log Ti (yi|x[Γi], di) + N X i=1 log ˜Ri (xi, di, a) + log ˜vγ (y, a) . Now, p (x, y, d, a) = exp[θ∆(x, y, d, a)] has a representation in terms of a product of factors. Let θ (x, y, d, a) = N X i=1 log Ti (yi|x[Γi], di) + N X i=1 log ˜Ri (xi, di, a). Before designing the algorithms, we first construct a cluster graph (G; C; S) for the distribution exp[θ (x, y, d, a)], where C denotes the set of clusters and S is the set of separators. (See Liu and Ihler (2012, 2011), Wainwright and Jordan (2008) for more details on cluster graphs.) We assign each decision node di to one cluster that contains di and its parents pa(i); clusters so assigned are called decision clusters A, while other clusters are called normal clusters R, so that C = {R, A}. Using the structure of the cluster graph, θ can be decomposed into θ (x, y, d, a) = X k∈C θck (xck, yck, dck, a), (8) and the distribution τ is approximated as τ (x, y, d, a) = Q k∈C τck (zck) Q (kl)∈S τskl (zskl), (9) where zck = {xck, yck, dck, a}. Therefore, instead of optimizing the full distribution τ, we can optimize the collection of marginal distributions τ = {τck, τsk}, with far lower computational cost. These marginals should belong to the local consistency polytope L, which enforces that marginals are consistent on their overlapping sets of variables (Wainwright and Jordan, 2008). We now construct a reduced cluster graph over x from the full cluster graph, to serve as the approximating structure of the marginal τ(x). We assume a factored representation for τ(x): τ (x) = Q k∈C τck (xck) Q (kl)∈S τskl (xskl), (10) where the τck(xck) is the marginal distribution of τck(zck) on xck. Note that Eq. (10) also dictates a factored approximation of the value function v (x), because v (x) ≈exp (Φ) τ (x). Assume vγ (x) factors into vγ (x) = Q k vck(xck). Then, the constraint (7) reduces to a set of simpler constraints on the cliques of the cluster graph, θ∆ ck (xck, yck, dck, a) = θck (xck, yck, dck, a) + log vck,x (yck, a) , k ∈C. (11) Correspondingly, the constraint (6) can be approximated by Φ = X k∈C ⟨θ∆ ck, τck⟩+ X k∈R Hck + X k∈D H′ ck − X (kl)∈S Hskl, (12) where Hck is the entropy of variables in cluster ck, Hck = H (xck, yck, dck, a; τ) and H′ ck = H (xck, yck, dck, a; τ) −H (dck|xck; τ). With these approximations, we solve the optimization in Theorem 2 using “mixed” belief propagation (Liu and Ihler, 2012) for fixed {θ∆ ck}; we then update {θ∆ ck} using the fixed point condition (11). This gives the double loop algorithm in Algorithm 1. 5 Algorithm 1 Factored Variational Value Iteration Algorithm Input: A graph-based MDP with ({Xi} ; {Di} ; {Ri} ; {Γi} ; {Ti}), the cluster graph (G; C; S), and the initial  τ t=0 ck (xck) , ∀ck ∈C . Iterate until convergence (for both the outer loop and the inner loop). 1: Outer loop: Update θ∆;t ck using Eq. (11). 2: Inner loop: Maximize the right side of Eq. (12) with fixed θ∆;t ck and compute τ t+1 ck (xck) using the belief propagation algorithm proposed in Liu and Ihler (2012): mk→l(zck) ∝ψskl(zskl) X zck\skl σ  ψck(zck)m∼k(zck)  ml→k(zck) , where ψck(zck) = exp[θ∆ ck(zck)], and σ[τck(zck)] = τck(zck) ck ∈R τck(zck)τck(dck|xck) ck ∈A, with τck(zck) = ψck(zck)m∼k(zck) and τck(xck) = max dck X yck ,a τck(zck) Output: The local policies {τ (di|x (Γi))}, and the value function ˆv (x) = exp (Φ) τ (x). 6 Experiments We perform experiments in two domains, disease management in crop fields and viral marketing, to evaluate the performance of our factored variational value iteration algorithm (FVI). For comparison, we use approximate policy iteration algorithm (API) (Sabbadin et al., 2012), (a mean-field based policy iteration approach), and the approximate linear programming algorithm (ALP) (Guestrin et al., 2001). To evaluate each algorithm’s performance, we obtain its approximate local policy, then compute the expected value of the policy using either exact evaluation (if feasible) or a sample-based estimate (if not). We then compare the expected reward U alg (x) = 1 |X| P x valg (x) of each algorithm’s policy. 6.1 Disease Management in Crop Fields A graph-based MDP for disease management in crop fields was introduced in (Sabbadin et al., 2012). Suppose we have a set of crop fields in an agricultural area, where each field is susceptible to contamination by a pathogen. When a field is contaminated, it can infect its neighbors and the yield will decrease. However, if a field is left fallow, it has a probability (denoted by q) of recovering from infection. The decisions of each year include two options (Di = {1, 2}) for each field: cultivate normally (di = 1) or leave fallow (di = 2). The problem is then to choose the optimal stationary policy to maximize the expected discounted yield. The topology of the fields is represented by an undirected graph, where each node represents one crop field. An edge is drawn between two nodes if the fields share a common border (and can thus pass an infection). Each crop field can be in one of three states: xi = 1 if it is uninfected and xi = 2 to xi = 3 for increasing degrees of infection. The probability that a field moves from state xi to state xi + 1 with di = 1 is set to be P = P (ε, p, ni) = ε + (1 −ε) (1 −(1 −p)ni), where ε and p are parameters and ni is the number of the neighbors of i that are infected. The transition function is summarized in Table 1. The reward function depends on each field’s state and local decision. The maximal yield r > 1 is achieved by an uninfected, cultivated field; otherwise, the yield decreases linearly with the level of infection, from maximal reward r to minimal reward 1 + r/10. A field left fallow produces reward 1. Table 1: Local transition probabilities p x′ i|xN(i), ai  , for the disease management problem. di = 1 di = 2 xi = 1 xi = 2 xi = 3 xi = 1 xi = 2 xi = 3 x′ i = 1 1 −P 0 0 1 q q/2 x′ i = 2 P 1 −P 0 0 1 −q q/2 x′ i = 3 0 P 1 0 0 1 −q 6.2 Viral Marketing Viral marketing (Nath and Domingos, 2010, Richardson and Domingos, 2002) uses the natural premise that members of a social network influence each other’s purchasing decisions or comments; then, the goal is to select the best set of people to target for marketing such that overall profit is 6 maximized. Viral marketing has been previously framed as a one-shot influence diagram problem (Nath and Domingos, 2010). Here, we frame the viral marketing task as an MDP planning problem, where we optimize the stationary policy to maximize long-term reward. The topology of the social network is represented by a directed graph, capturing directional social influence. We assume there are three states for each person in the social network: xi = 1 if i is making positive comments, xi = 2 if not commenting, and xi = 3 for negative comments. There is a binary decision corresponding to each person i: market to this person (di = 1) or not (di = 2). We also define a local reward function: if a person gives good comments when di = 2, then the reward is r; otherwise, the reward is less, decreasing linearly to minimum value 1 + r/10. For marketed individuals (di = 1), the reward is 1. The local transition p x′ i|xN(i), di  is set as in Table 1. 6.3 Experimental Results We evaluate both problems above on two topologies of model, each of three sizes (6, 10, and 20 nodes). Our first topology type are random, regular graphs with three neighbors per node. Our second are “chain-like” graphs, in which we order the nodes, then connect each node at random to four of its six nearest nodes in the ordering. This ensures that the resulting graph has low tree-width (≤6), enabling comparison of the ALP algorithm. We set parameters r = 10 and ε = 0.1, and test the results on different choices of p and q. Tables 2– 4 show the expected rewards found by each algorithm for several settings. The best performance (highest rewards) are labeled in bold. For models with 6 nodes, we also compute the expected reward under the optimal global policy π∗(x) for comparison. Note that this value overestimates the best possible local policy {π∗ i (Γi(x))} being sought by the algorithms; the best local policy is usually much more difficult to compute due to imperfect recall. Since the complexity of the approximate linear programming (ALP) algorithm is exponential in the treewidth of graph defined by the neighborhoods Γi, we were unable to compute results for models beyond treewidth 6. The tables show that our factored variational value iteration (FVI) algorithm gives policies with higher expected rewards than those of approximate policy iteration (API) on the majority of models (156/196), over all sets of models and different p and q. Compared to approximate linear programming, in addition to being far more scalable, our algorithm performed comparably, giving better policies on just over half of the models (53/96) that ALP could be run on. However, when we restrict to low-treewidth “chain” models, we find that the ALP algorithm appears to perform better on larger models; it outperforms our FVI algorithm on only 4/32 models of size 6, but this increases to 14/32 at size 10, and 25/32 at size 20. It may be that ALP better takes advantage of the structure of x on these cases, and more careful choice of the cluster graph could similarly improve FVI. The average results across all settings are shown in Table 5, along with the relative improvements of our factored variational value iteration algorithm to approximate policy iteration and approximate linear programming. Table 5 shows that our FVI algorithm, compared to approximate policy iteration, gives the best policies on regular models across sizes, and gives better policies than those of the approximate linear programming on chain-like models with small size (6 and 10 nodes). Although on average the approximate linear programming algorithm may provide better policies for “chain” models with large size, its exponential number of constraints makes it infeasible for general large-scale graph-based MDPs. 7 Conclusions In this paper, we have proposed a variational planning framework for Markov decision processes. We used this framework to develop a factored variational value iteration algorithm that exploits the structure of the graph-based MDP to give efficient and accurate approximations, scales easily to large systems, and produces better policies than existing approaches. Potential future directions include studying methods for the choice of cluster graphs, and improved solutions for the dual approximation (12), such as developing single-loop message passing algorithms to directly optimize (12). Acknowledgments This work was supported in part by National Science Foundation grants IIS-1065618 and IIS1254071, a Microsoft Research Fellowship, National Natural Science Foundation of China (#61071131 and #61271388), Beijing Natural Science Foundation (#4122040), Research Project of Tsinghua University (#2012Z01011), and Doctoral Fund of the Ministry of Education of China (#20120002110036). 7 Table 2: The expected rewards of different algorithms on regular models with 6 nodes. Disease Management Viral Marketing (p, q) Exact FVI API ALP Exact FVI API ALP (0.2, 0.2) 202.4 202.4 164.7 148.3 259.3 258.2 250.0 237.7 (0.4, 0.2) 169.2 169.2 139.0 123.3 212.2 195.3 192.6 183.4 (0.6, 0.2) 158.1 155.2 157.4 115.4 209.6 167.8 174.0 156.4 (0.8, 0.2) 154.1 152.7 153.2 106.0 209.5 152.7 172.2 144.7 (0.2, 0.4) 262.5 259.2 254.7 236.7 361.6 361.6 355.8 355.0 (0.4, 0.4) 220.1 219.1 177.0 181.3 300.2 285.8 285.1 267.3 (0.6, 0.4) 212.1 203.8 203.8 162.7 297.3 244.6 249.6 244.8 (0.8, 0.4) 211.7 198.2 198.2 136.1 297.3 225.2 296.8 273.5 (0.2, 0.6) 349.3 349.3 333.6 307.3 428.1 428.1 428.1 427.7 (0.4, 0.6) 290.7 276.7 276.7 200.0 361.8 351.7 303.3 350.0 (0.6, 0.6) 284.7 242.7 243.7 212.8 355.5 304.7 152.5 306.5 (0.8, 0.6) 284.0 236.1 236.1 194.7 355.5 282.9 355.0 271.3 (0.2, 0.8) 423.6 423.6 423.6 274.7 470.0 469.8 469.8 469.8 (0.4, 0.8) 362.2 351.0 344.3 264.5 411.6 402.0 402.0 403.7 (0.6, 0.8) 351.6 304.8 302.7 242.5 398.2 347.8 351.8 336.6 (0.8, 0.8) 350.5 284.2 284.9 207.9 398.0 320.8 398.0 294.0 Table 3: The expected rewards of different algorithms on “chain-like” models with 10 nodes. Disease Management Viral Marketing (p, q) FVI API ALP FVI API ALP (0.3, 0.3) 304.8 258.4 288.9 355.5 324.1 335.5 (0.5, 0.3) 273.4 228.7 292.7 308.1 291.5 323.8 (0.7, 0.3) 262.2 261.6 329.6 298.5 298.1 269.7 (0.3, 0.5) 420.2 395.4 456.5 550.1 523.9 543.9 (0.5, 0.5) 358.5 317.7 302.6 453.3 450.9 410.0 (0.7, 0.5) 343.8 344.9 394.3 386.1 418.6 436.9 (0.3, 0.7) 612.9 613.6 531.2 659.9 634.8 664.7 (0.5, 0.7) 498.2 491.8 538.6 542.7 523.9 518.2 (0.7, 0.7) 430.0 411.8 427.3 496.9 495.7 451.2 Table 4: The expected rewards (×102) of different algorithms on models with 20 nodes. Disease Manag. Viral Marketing Disease Manag. Viral Marketing (p, q) FVI API FVI API (p, q) FVI API FVI API (0.2, 0.2) 7.17 6.33 7.87 7.88 (0.4, 0.2) 5.93 5.19 6.53 5.65 (0.6, 0.2) 5.33 4.94 5.99 5.28 (0.8, 0.2) 5.12 5.20 5.76 5.62 (0.4, 0.4) 9.10 8.82 11.56 11.52 (0.4, 0.4) 7.70 6.23 9.23 8.83 (0.4, 0.4) 7.04 6.17 7.95 7.65 (0.4, 0.4) 6.72 6.72 7.45 7.14 (0.6, 0.6) 12.29 12.11 13.85 13.85 (0.6, 0.6) 9.97 10.06 11.74 11.72 (0.6, 0.6) 8.50 8.72 10.22 10.02 (0.6, 0.6) 8.01 7.69 9.23 8.88 (0.8, 0.8) 14.53 14.57 15.25 15.27 (0.8, 0.8) 12.57 12.43 13.47 13.22 (0.8, 0.8) 10.90 10.78 11.82 11.50 (0.8, 0.8) 9.92 9.56 10.77 10.64 Table 5: Comparison of average expected rewards on regular and “chain-like” models. Type n = 6 n = 10 n = 20 Regular FVI: 275.8 API: 271.4 Rel. Imprv. 1.6% FVI: 458.7 API: 452.3 Rel. Imprv. 1.4% FVI: 935.6 API: 905.1 Rel. Imprv. 3.37% Chain FVI: 275.8 API: 271.6 ALP: 244.9 Rel. Imprv. 1.6% 12.6% FVI: 415.7 API: 399.4 ALP: 414.7 Rel. Imprv. 4.1% 0.7% FVI: 821.9 API: 749.6 ALP: 872.2 Rel. Imprv. 9.7% −5.8% 8 References R Iris Bahar, Erica A Frohm, Charles M Gaona, Gary D Hachtel, Enrico Macii, Abelardo Pardo, and Fabio Somenzi. Algebraic decision diagrams and their applications. In IEEE/ACM International Conference on Computer-Aided Design, pages 188–191, 1993. David Barber. Bayesian reasoning and machine learning. Cambridge University Press, 2011. Craig Boutilier, Richard Dearden, and Mois´es Goldszmidt. Stochastic dynamic programming with factored representations. Artificial Intelligence, 121(1):49–107, 2000. Nicklas Forsell and R´egis Sabbadin. Approximate linear-programming algorithms for graph-based markov decision processes. Frontiers in Artificial Intelligence and Applications, 141:590, 2006. Carlos Guestrin, Daphne Koller, and Ronald Parr. Multiagent planning with factored MDPs. Advances in Neural Information Processing Systems, 14:1523–1530, 2001. Carlos Guestrin, Daphne Koller, Ronald Parr, and Shobha Venkataraman. Efficient solution algorithms for factored mdps. Journal of Artificial Intelligence Research, 19:399–468, 2003. Jesse Hoey, Robert St-Aubin, Alan Hu, and Craig Boutilier. SPUDD: Stochastic planning using decision diagrams. In Proceedings of the Fifteenth conference on Uncertainty in Artificial Intelligence, pages 279– 288, 1999. Daphne Koller and Ronald Parr. Policy iteration for factored mdps. In Proceedings of the Sixteenth Conference on Uncertainty in Artificial Intelligence, pages 326–334, 2000. Qiang Liu and Alexander Ihler. Variational algorithms for marginal MAP. In Uncertainty in Artificial Intelligence (UAI), 2011. Qiang Liu and Alexander Ihler. Belief propagation for structured decision making. In Uncertainty in Artificial Intelligence (UAI), pages 523–532, August 2012. A. Nath and P. Domingos. Efficient belief propagation for utility maximization and repeated inference. In The Proceeding of the Twenty-Fourth AAAI Conference on Artificial Intelligence, 2010. Nathalie Peyrard and R´egis Sabbadin. Mean field approximation of the policy iteration algorithm for graphbased markov decision processes. Frontiers in Artificial Intelligence and Applications, 141:595, 2006. Martin L Puterman. Markov decision processes: discrete stochastic dynamic programming. Wiley-Interscience, 2009. Matthew Richardson and Pedro Domingos. Mining knowledge-sharing sites for viral marketing. In Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 61– 70, 2002. R. Sabbadin, N. Peyrard, and N. Forsell. A framework and a mean-field algorithm for the local control of spatial processes. International Journal of Approximate Reasoning, 53(1):66 – 86, 2012. Ross D Shachter. Model building with belief networks and influence diagrams. Advances in decision analysis: from foundations to applications, pages 177–201, 2007. Olivier Sigaud, Olivier Buffet, et al. Markov decision processes in artificial intelligence. ISTE-Jonh Wiley & Sons, 2010. M.J. Wainwright and M.I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1-2):1–305, 2008. 9
2013
179
4,908
Graphical Models for Inference with Missing Data Karthika Mohan Judea Pearl Jin Tian Dept. of Computer Science Dept. of Computer Science Dept. of Computer Science Univ. of California, Los Angeles Univ. of California, Los Angeles Iowa State University Los Angeles, CA 90095 Los Angeles, CA 90095 Ames, IA 50011 karthika@cs.ucla.edu judea@cs.ucla.edu jtian@iastate.edu Abstract We address the problem of recoverability i.e. deciding whether there exists a consistent estimator of a given relation Q, when data are missing not at random. We employ a formal representation called ‘Missingness Graphs’ to explicitly portray the causal mechanisms responsible for missingness and to encode dependencies between these mechanisms and the variables being measured. Using this representation, we derive conditions that the graph should satisfy to ensure recoverability and devise algorithms to detect the presence of these conditions in the graph. 1 Introduction The “missing data” problem arises when values for one or more variables are missing from recorded observations. The extent of the problem is evidenced from the vast literature on missing data in such diverse fields as social science, epidemiology, statistics, biology and computer science. Missing data could be caused by varied factors such as high cost involved in measuring variables, failure of sensors, reluctance of respondents in answering certain questions or an ill-designed questionnaire. Missing data also plays a major role in survival data analysis and has been treated primarily using Kaplan-Meier estimation [30]. In machine learning, a typical example is the Recommender System [16] that automatically generates a list of products that are of potential interest to a given user from an incomplete dataset of user ratings. Online portals such as Amazon and eBay employ such systems. Other areas such as data mining [7], knowledge discovery [18] and network tomography [2] are also plagued by missing data problems. Missing data can have several harmful consequences [23, 26]. Firstly they can significantly bias the outcome of research studies. This is mainly because the response profiles of non-respondents and respondents can be significantly different from each other. Hence ignoring the former distorts the true proportion in the population. Secondly, performing the analysis using only complete cases and ignoring the cases with missing values can reduce the sample size thereby substantially reducing estimation efficiency. Finally, many of the algorithms and statistical techniques are generally tailored to draw inferences from complete datasets. It may be difficult or even inappropriate to apply these algorithms and statistical techniques on incomplete datasets. 1.1 Existing Methods for Handling Missing Data There are several methods for handling missing data, described in a rich literature of books, articles and software packages, which are briefly summarized here1. Of these, listwise deletion and pairwise deletion are used in approximately 96% of studies in the social and behavioral sciences [24]. Listwise deletion refers to a simple method in which cases with missing values are deleted [3]. Unless data are missing completely at random, listwise deletion can bias the outcome [31]. Pairwise 1For detailed discussions we direct the reader to the books- [1, 6, 13, 17]. 1 deletion (or “available case”) is a deletion method used for estimating pairwise relations among variables. For example, to compute the covariance of variables X and Y , all those cases or observations in which both X and Y are observed are used, regardless of whether other variables in the dataset have missing values. The expectation-maximization (EM) algorithm is a general technique for finding maximum likelihood (ML) estimates from incomplete data. It has been proven that likelihood-based inference while ignoring the missing data mechanism, leads to unbiased estimates under the assumption of missing at random (MAR) [13]. Most work in machine learning assumes MAR and proceeds with ML or Bayesian inference. Exceptions are recent works on collaborative filtering and recommender systems which develop probabilistic models that explicitly incorporate missing data mechanism [16, 14, 15]. ML is often used in conjunction with imputation methods, which in layman terms, substitutes a reasonable guess for each missing value [1]. A simple example is Mean Substitution, in which all missing observations of variable X are substituted with the mean of all observed values of X. Hot-deck imputation, cold-deck imputation [17] and Multiple Imputation [26, 27] are examples of popular imputation procedures. Although these techniques work well in practice, performance guarantees (eg: convergence and unbiasedness) are based primarily on simulation experiments. Missing data discussed so far is a special case of coarse data, namely data that contains observations made in the power set rather than the sample space of variables of interest [12]. The notion of coarsening at random (CAR) was introduced in [12] and identifies the condition under which coarsening mechanism can be ignored while drawing inferences on the distribution of variables of interest [10]. The notion of sequential CAR has been discussed in [9]. For a detailed discussion on coarsened data refer to [30]. Missing data literature leaves many unanswered questions with regard to theoretical guarantees for the resulting estimates, the nature of the assumptions that must be made prior to employing various procedures and whether the assumptions are testable. For a gentle introduction to the missing data problem and the issue of testability refer to [22, 19]. This paper aims to illuminate missing data problems using causal graphs [See Appendix 5.2 for justification]. The questions we pose are: Given a target relation Q to be estimated and a set of assumptions about the missingness process encoded in a graphical model, under what conditions does a consistent estimate exist and how can we elicit it from the data available? We answer these questions with the aid of Missingness Graphs (m-graphs in short) to be described in Section 2. Furthermore, we review the traditional taxonomy of missing data problems and cast it in graphical terms. In Section 3 we define the notion of recoverability - the existence of a consistent estimate - and present graphical conditions for detecting recoverability of a given probabilistic query Q. Conclusions are drawn in Section 4. 2 Graphical Representation of the Missingness Process 2.1 Missingness Graphs Y* Ry (a) X Y Y* Ry X Y (b) Y* * X Ry Rx (c) X Y Y* * X Ry Rx X Y (d) Figure 1: m-graphs for data that are: (a) MCAR, (b) MAR, (c) & (d) MNAR; Hollow and solid circles denote partially and fully observed variables respectively. Graphical models such as DAGs (Directed Acyclic Graphs) can be used for encoding as well as portraying conditional independencies and causal relations, and the graphical criterion called dseparation (refer Appendix-5.1, Definition-3) can be used to read them off the graph [21, 20]. Graphical Models have been used to analyze missing information in the form of missing cases (due to sample selection bias)[4]. Using causal graphs, [8]- analyzes missingness due to attrition (partially 2 observed outcome) and [29]- cautions against the indiscriminate use of auxiliary variables. In both papers missing values are associated with one variable and interactions among several missingness mechanisms remain unexplored. The need exists for a general approach capable of modeling an arbitrary data-generating process and deciding whether (and how) missingness can be outmaneuvered in every dataset generated by that process. Such a general approach should allow each variable to be governed by its own missingness mechanism, and each mechanism to be triggered by other (potentially) partially observed variables in the model. To achieve this flexibility we use a graphical model called “missingness graph” (mgraph, for short) which is a DAG (Directed Acyclic Graph) defined as follows. Let G(V, E) be the causal DAG where V = V ∪U ∪V ∗∪R. V is the set of observable nodes. Nodes in the graph correspond to variables in the data set. U is the set of unobserved nodes (also called latent variables). E is the set of edges in the DAG. Oftentimes we use bi-directed edges as a shorthand notation to denote the existence of a U variable as common parent of two variables in Vo ∪Vm ∪R. V is partitioned into Vo and Vm such that Vo ⊆V is the set of variables that are observed in all records in the population and Vm ⊆V is the set of variables that are missing in at least one record. Variable X is termed as fully observed if X ∈Vo and partially observed if X ∈Vm. Associated with every partially observed variable Vi ∈Vm are two other variables Rvi and V ∗ i , where V ∗ i is a proxy variable that is actually observed, and Rvi represents the status of the causal mechanism responsible for the missingness of V ∗ i ; formally, v∗ i = f(rvi, vi) =  vi if rvi = 0 m if rvi = 1 (1) Contrary to conventional use, Rvi is not treated merely as the missingness indicator but as a driver (or a switch) that enforces equality between Vi and V ∗ i . V ∗is a set of all proxy variables and R is the set of all causal mechanisms that are responsible for missingness. R variables may not be parents of variables in V ∪U. This graphical representation succinctly depicts both the causal relationships among variables in V and the process that accounts for missingness in some of the variables. We call this graphical representation Missingness Graph or m-graph for short. Since every d-separation in the graph implies conditional independence in the distribution [21], the mgraph provides an effective way of representing the statistical properties of the missingness process and, hence, the potential of recovering the statistics of variables in Vm from partially missing data. 2.2 Taxonomy of Missingness Mechanisms It is common to classify missing data mechanisms into three types [25, 13]: Missing Completely At Random (MCAR) : Data are MCAR if the probability that Vm is missing is independent of Vm or any other variable in the study, as would be the case when respondents decide to reveal their income levels based on coin-flips. Missing At Random (MAR) : Data are MAR if for all data cases Y , P(R|Yobs, Ymis) = P(R|Yobs) where Yobs denotes the observed component of Y and Ymis, the missing component. Example: Women in the population are more likely to not reveal their age. Missing Not At Random (MNAR) or “non-ignorable missing”: Data that are neither MAR nor MCAR are termed as MNAR. Example: Online shoppers rate an item with a high probability either if they love the item or if they loathe it. In other words, the probability that a shopper supplies a rating is dependent on the shopper’s underlying liking [16]. Because it invokes specific values of the observed and unobserved variables, (i.e., Yobs and Ymis), many authors find Rubin’s definition difficult to apply in practice and prefer to work with definitions expressed in terms of independencies among variables (see [28, 11, 6, 17]). In the graph-based interpretation used in this paper, MCAR is defined as total independence between R and Vo∪Vm∪U i.e. R⊥⊥(Vo ∪Vm ∪U), as depicted in Figure 1(a). MAR is defined as independence between R and Vm∪U given Vo i.e. R⊥⊥Vm∪U|Vo, as depicted in Figure 1(b). Finally if neither of these conditions hold, data are termed MNAR, as depicted in Figure 1(c) and (d). This graph-based interpretation uses slightly stronger assumptions than Rubin’s, with the advantage that the user can comprehend, encode and communicate the assumptions that determine the classification of the problem. Additionally, the conditional independencies that define each class are represented explicitly as separation conditions 3 in the corresponding m-graphs. We will use this taxonomy in the rest of the paper, and will label data MCAR, MAR and MNAR according to whether the defining conditions, R⊥⊥Vo ∪Vm ∪U (for MCAR), R⊥⊥Vm ∪U|Vo (for MAR) are satisfied in the corresponding m-graphs. 3 Recoverability In this section we will examine the conditions under which a bias-free estimate of a given probabilistic relation Q can be computed. We shall begin by defining the notion of recoverability. Definition 1 (Recoverability). Given a m-graph G, and a target relation Q defined on the variables in V , Q is said to be recoverable in G if there exists an algorithm that produces a consistent estimate of Q for every dataset D such that P(D) is (1) compatible with G and (2) strictly positive over complete cases i.e. P(Vo, Vm, R = 0) > 0.2 Here we assume that the observed distribution over complete cases P(Vo, Vm, R = 0) is strictly positive, thereby rendering recoverability a property that can be ascertained exclusively from the m-graph. Corollary 1. A relation Q is recoverable in G if and only if Q can be expressed in terms of the probability P(O) where O = {R, V ∗, Vo} is the set of observable variables in G. In other words, for any two models M1 and M2 inducing distributions P M1 and P M2 respectively, if P M1(O) = P M2(O) > 0 then QM1 = QM2. Proof: (sketch) The corollary merely rephrases the requirement of obtaining a consistent estimate to that of expressibility in terms of observables. Practically, what recoverability means is that if the data D are generated by any process compatible with G, a procedure exists that computes an estimator ˆQ(D) such that, in the limit of large samples, ˆQ(D) converges to Q. Such a procedure is called a “consistent estimator.” Thus, recoverability is the sole property of G and Q, not of the data available, or of any routine chosen to analyze or process the data. Recoverability when data are MCAR For MCAR data we have R⊥⊥(Vo ∪Vm). Therefore, we can write P(V ) = P(V |R) = P(Vo, V ∗|R = 0). Since both R and V ∗are observables, the joint probability P(V ) is consistently estimable (hence recoverable) by considering complete cases only (listwise deletion), as shown in the following example. Example 1. Let X be the treatment and Y be the outcome as depicted in the m-graph in Fig. 1 (a). Let it be the case that we accidentally deleted the values of Y for a handful of samples, hence Y ∈Vm. Can we recover P(X, Y )? From D, we can compute P(X, Y ∗, Ry). From the m-graph G, we know that Y ∗is a collider and hence by d-separation, (X ∪Y )⊥⊥Ry. Thus P(X, Y ) = P(X, Y |Ry). In particular, P(X, Y ) = P(X, Y |Ry = 0). When Ry = 0, by eq. (1), Y ∗= Y . Hence, P(X, Y ) = P(X, Y ∗|Ry = 0) (2) The RHS of Eq. 2 is consistently estimable from D; hence P(X, Y ) is recoverable. Recoverability when data are MAR When data are MAR, we have R⊥⊥Vm|Vo. Therefore P(V ) = P(Vm|Vo)P(Vo) = P(Vm|Vo, R = 0)P(Vo). Hence the joint distribution P(V ) is recoverable. Example 2. Let X be the treatment and Y be the outcome as depicted in the m-graph in Fig. 1 (b). Let it be the case that some patients who underwent treatment are not likely to report the outcome, hence the arrow X →Ry. Under the circumstances, can we recover P(X, Y )? From D, we can compute P(X, Y ∗, Ry). From the m-graph G, we see that Y ∗is a collider and X is a fork. Hence by d-separation, Y ⊥⊥Ry|X. Thus P(X, Y ) = P(Y |X)P(X) = P(Y |X, Ry)P(X). 2In many applications such as truncation by death, the problem forbids certain combinations of events from occurring, in which case the definition need be modified to accommodate such constraints as shown in Appendix-5.3. Though this modification complicates the definition of “recoverability”, it does not change the basic results derived in this paper. 4 In particular, P(X, Y ) = P(Y |X, Ry = 0)P(X). When Ry = 0, by eq. (1), Y ∗= Y . Hence, P(X, Y ) = P(Y ∗|X, Ry = 0)P(X) (3) and since X is fully observable, P(X, Y ) is recoverable. Note that eq. (2) permits P(X, Y ) to be recovered by listwise deletion, while eq. (3) does not; it requires that P(X) be estimated first over all samples, including those in which Y is missing. In this paper we focus on recoverability under large sample assumption and will not be dealing with the shrinking sample size issue. Recoverability when data are MNAR Data that are neither MAR nor MCAR are termed MNAR. Though it is generally believed that relations in MNAR datasets are not recoverable, the following example demonstrates otherwise. Example 3. Fig. 1 (d) depicts a study where (i) some units who underwent treatment (X = 1) did not report the outcome (Y ) and (ii) we accidentally deleted the values of treatment for a handful of cases. Thus we have missing values for both X and Y which renders the dataset MNAR. We shall show that P(X, Y ) is recoverable. From D, we can compute P(X∗, Y ∗, Rx, Ry). From the m-graph G, we see that X⊥⊥Rx and Y ⊥⊥(Rx ∪Ry)|X. Thus P(X, Y ) = P(Y |X)P(X) = P(Y |X, Ry = 0, Rx = 0)P(X|Rx = 0). When Ry = 0 and Rx = 0 we have (by Equation (1) ), Y ∗= Y and X∗= X. Hence, P(X, Y ) = P(Y ∗|X∗, Rx = 0, Ry = 0)P(X∗|Rx = 0) (4) Therefore, P(X, Y ) is recoverable. The estimand in eq. (4) also dictates how P(X, Y ) should be estimated from the dataset. In the first step, we delete all cases in which X is missing and create a new data set D′ from which we estimate P(X). Dataset D′ is further pruned to form dataset D′′ by removing all cases in which Y is missing. P(Y |X) is then computed from D′′. Note that order matters; had we deleted cases in the reverse order, Y and then X, the resulting estimate would be biased because the d-separations needed for establishing the validity of the estimand: P(X|Y )P(Y ), are not supported by G. We will call this sequence of deletions as deletion order. Several features are worth noting regarding this graph-based taxonomy of missingness mechanisms. First, although MCAR and MAR can be verified by inspecting the m-graph, they cannot, in general be verified from the data alone. Second, the assumption of MCAR allows an estimation procedure that amounts (asymptotically) to listwise deletion, while MAR dictates a procedure that amounts to listwise deletion in every stratum of Vo. Applying MAR procedure to MCAR problem is safe, because all conditional independencies required for recoverability under the MAR assumption also hold in an MCAR problem, i.e. R⊥⊥(Vo, Vm) ⇒R⊥⊥Vm|Vo. The converse, however, does not hold, as can be seen in Fig. 1 (b). Applying listwise deletion is likely to result in bias, because the necessary condition R⊥⊥(Vo, Vm) is violated in the graph. An interesting property which evolves from this discussion is that recoverability of certain relations does not require RVi⊥⊥Vi|Vo ; a subset of Vo would suffice as shown below. Property 1. P(Vi) is recoverable if ∃W ⊆Vo such that RVi⊥⊥V |W. Proof: P(Vi) may be decomposed as: P(Vi) = P w P(V ∗ i |Rvi = 0, W)P(W) since Vi⊥⊥RVi|W and W ⊆Vo. Hence P(Vi) is recoverable. It is important to note that the recoverability of P(X, Y ) in Fig. 1(d) was feasible despite the fact that the missingness model would not be considered Rubin’s MAR (as defined in [25]). In fact, an overwhelming majority of the data generated by each one of our MNAR examples would be outside Rubin’s MAR. For a brief discussion on these lines, refer to Appendix- 5.4. Our next question is: how can we determine if a given relation is recoverable? The following theorem provides a sufficient condition for recoverability. 3.1 Conditions for Recoverability Theorem 1. A query Q defined over variables in Vo ∪Vm is recoverable if it is decomposable into terms of the form Qj = P(Sj|Tj) such that Tj contains the missingness mechanism Rv = 0 of every partially observed variable V that appears in Qj. 5 Proof: If such a decomposition exists, every Qj is estimable from the data, hence the entire expression for Q is recoverable. Example 4. Equation (4) demonstrates a decomposition of Q = P(X, Y ) into a product of two terms Q1 = P(Y |X, Rx = 0, Ry = 0) and Q2 = P(X|Rx = 0) that satisfy the condition of Theorem 1. Hence Q is recoverable. Example 5. Consider the problem of recovering Q = P(X, Y ) from the m-graph of Fig. 3(b). Attempts to decompose Q by the chain rule, as was done in Eqs. (3) and (4) would not satisfy the conditions of Theorem 1. To witness we write P(X, Y ) = P(Y |X)P(X) and note that the graph does not permit us to augment any of the two terms with the necessary Rx or Ry terms; X is independent of Rx only if we condition on Y , which is partially observed, and Y is independent of Ry only if we condition on X which is also partially observed. This deadlock can be disentangled however using a non-conventional decomposition: Q = P(X, Y ) = P(X, Y )P(Rx, Ry|X, Y ) P(Rx, Ry|X, Y ) = P(Rx, Ry)P(X, Y |Rx, Ry) P(Rx|Y, Ry)P(Ry|X, Rx) (5) where the denominator was obtained using the independencies Rx⊥⊥(X, Ry)|Y and Ry⊥⊥(Y, Rx)|X shown in the graph. The final expression above satisfies Theorem 1 and renders P(X, Y ) recoverable. This example again shows that recovery is feasible even when data are MNAR. Theorem 2 operationalizes the decomposability requirement of Theorem 1. Theorem 2 (Recoverability of the Joint P(V )). Given a m-graph G with no edges between the R variables and no latent variables as parents of R variables, a necessary and sufficient condition for recovering the joint distribution P(V ) is that no variable X be a parent of its missingness mechanism RX. Moreover, when recoverable, P(V ) is given by P(v) = P(R = 0, v) Q i P(Ri = 0|paori, pam ri, RP am ri = 0), (6) where Pao ri ⊆Vo and Pam ri ⊆Vm are the parents of Ri. Proof. (sufficiency) The observed joint distribution may be decomposed according to G as P(R = 0, v) = X u P(v, u)P(R = 0|v, u) = P(v) Y i P(Ri = 0|pao ri, pam ri), (7) where we have used the facts that there are no edges between the R variables, and that there are no latent variables as parents of R variables. If Vi is not a parent of Ri (i.e. Vi ̸∈Pam ri), then we have Ri⊥⊥RP am ri |(Pao ri ∪Pam ri). Therefore, P(Ri = 0|pao ri, pam ri) = P(Ri = 0|pao ri, pam ri, RP am ri = 0). (8) Given strictly positive P(R = 0, Vm, Vo), we have that all probabilities P(Ri = 0|pao ri, pam ri, RP am ri = 0) are strictly positive. Using Equations (7) and (8) , we conclude that P(V ) is recoverable as given by Eq. (6). (necessity) If X is a parent of its missingness mechanism RX, then P(X) is not recoverable based on Lemmas 3 and 4 in Appendix 5.5. Therefore the joint P(V ) is not recoverable. The following theorem gives a sufficient condition for recovering the joint distribution in a Markovian model. Theorem 3. Given a m-graph with no latent variables (i.e., Markovian) the joint distribution P(V ) is recoverable if no missingness mechanism RX is a descendant of its corresponding variable X. Moreover, if recoverable, then P(V ) is given by P(v) = Y i,Vi∈Vo P(vi|pao i , pam i , RP am i = 0) Y j,Vj∈Vm P(vj|pao j, pam j , RVj = 0, RP am j = 0), (9) where Pao i ⊆Vo and Pam i ⊆Vm are the parents of Vi. 6 Proof: Refer Appendix-5.6 Definition 2 (Ordered factorization). An ordered factorization over a set O of ordered V variables Y1 < Y2 < . . . < Yk, denoted by f(O), is a product of conditional probabilities f(O) = Q i P(Yi|Xi) where Xi ⊆{Yi+1, . . . , Yn} is a minimal set such that Yi⊥⊥({Yi+1, . . . , Yn}\Xi)|Xi. Theorem 4. A sufficient condition for recoverability of a relation Q is that Q be decomposable into an ordered factorization, or a sum of such factorizations, such that every factor Qi = P(Yi|Xi) satisfies Yi⊥⊥(Ryi, Rxi)|Xi. A factorization that satisfies this condition will be called admissible. X1 X3 X2 X4 RX RY (b) (a) x 3 R RZ RY RX Z X Y (c) (d) RY RZ RX x 4 x 2 R R X Y X Y Z Figure 2: Graph in which (a) only P(X|Y ) is recoverable (b) P(X4) is recoverable only when conditioned on X1 as shown in Example 6 (c) P(X, Y, Z) is recoverable (d) P(X, Z) is recoverable. Proof. follows from Theorem-1 noting that ordered factorization is one specific form of decomposition. Theorem 4 will allow us to confirm recoverability of certain queries Q in models such as those in Fig. 2(a), (b) and (d), which do not satisfy the requirement in Theorem 2. For example, by applying Theorem 4 we can conclude that, (1) in Figure 2 (a), P(X|Y ) = P(X|Rx = 0, Ry = 0, Y ) is recoverable, (2) in Figure 2 (c), P(X, Y, Z) = P(Z|X, Y, Rz = 0, Rx = 0, Ry = 0)P(X|Y, Rx = 0, Ry = 0)P(Y |Ry = 0) is recoverable and (3) in Figure 2 (d), P(X, Z) = P(X, Z|Rx = 0, Rz = 0) is recoverable. Note that the condition of Theorem 4 differs from that of Theorem 1 in two ways. Firstly, the decomposition is limited to ordered factorizations i.e. Yi is a singleton and Xi a set. Secondly, both Yi and Xi are taken from Vo ∪Vm, thus excluding R variables. Example 6. Consider the query Q = P(X4) in Fig. 2(b). Q can be decomposed in a variety of ways, among them being the factorizations: (a) P(X4) = P x3 P(X4|X3)P(X3) for the order X4, X3 (b) P(X4) = P x2 P(X4|X2)P(X2) for the order X4, X2 (c) P(X4) = P x1 P(X4|X1)P(X1) for the order X4, X1 Although each of X1, X2 and X3 d-separate X4 from RX4, only (c) is admissible since each factor satisfies Theorem 4. Specifically, (c) can be written as P x1 P(X∗ 4|X1, RX4 = 0)P(X1) and can be estimated by the deletion schedule (X1, X4), i.e., in each stratum of X1, we delete samples for which RX4 = 1 and compute P(X∗ 4, Rx4 = 0, X1). In (a) and (b) however, Theorem-4 is not satisfied since the graph does not permit us to rewrite P(X3) as P(X3|Rx3 = 0) or P(X2) as P(X2|Rx2 = 0). 3.2 Heuristics for Finding Admissible Factorization Consider the task of estimating Q = P(X), where X is a set, by searching for an admissible factorization of P(X) (one that satisfies Theorem 4), possibly by resorting to additional variables, Z, residing outside of X that serve as separating sets. Since there are exponentially large number of ordered factorizations, it would be helpful to rule out classes of non-admissible ordering prior to their enumeration whenever non-admissibility can be detected in the graph. In this section, we provide lemmata that would aid in pruning process by harnessing information from the graph. Lemma 1. An ordered set O will not yield an admissible decomposition if there exists a partially observed variable Vi in the order O which is not marginally independent of RVi such that all minimal separators (refer Appendix-5.1, Definition-4) of Vi that d-separate it from Rvi appear before Vi. Proof: Refer Appendix-5.7 7 RC RA RE RB RD RY RX (a) (b) A C D E B F Y X Figure 3: demonstrates (a) pruning in Example-7 (b) P(X, Y ) is recoverable in Example-5 Applying lemma-1 requires a solution to a set of disjunctive constraints which can be represented by directed constraint graphs [5]. Example 7. Let Q = P(X) be the relation to be recovered from the graph in Fig. 3 (a). Let X = {A, B, C, D, E} and Z = F. The total number of ordered factorizations is 6! = 720. The independencies implied by minimal separators (as required by Lemma-1) are: A⊥⊥RA|B, B⊥⊥RB|φ, C⊥⊥RC|{D, E}, ( D⊥⊥RD|A or D⊥⊥RD|C or D⊥⊥RD|B ) and (E⊥⊥RE|{B, F} or E⊥⊥RE|{B, D} or E⊥⊥RE|C). To test whether (B,A,D,E,C,F) is potentially admissible we need not explicate all 6 variables; this order can be ruled out as soon as we note that A appears after B. Since B is the only minimal separator that d-separates A from RA and B precedes A, Lemma-1 is violated. Orders such as (C, D, E, A, B, F), (C, D, A, E, B, F) and (C, E, D, A, F, B) satisfy the condition stated in Lemma 1 and are potential candidates for admissibility. The following lemma presents a simple test to determine non-admissibility by specifying the condition under which a given order can be summarily removed from the set of candidate orders that are likely to yield admissible factorizations. Lemma 2. An ordered set O will not yield an admissible decomposition if it contains a partially observed variable Vi for which there exists no set S ⊆V that d-separates Vi from RVi. Proof: The factor P(Vi|Vi+1, . . . , Vn) corresponding to Vi can never satisfy the condition required by Theorem 4. An interesting consequence of Lemma 2 is the following corollary that gives a sufficient condition under which no ordered factorization can be labeled admissible. Corollary 2. For any disjoint sets X and Y , there exists no admissible factorization for recovering the relation P(Y |X) by Theorem 4 if Y contains a partially observed variable Vi for which there exists no set S ⊆V that d-separates Vi from RVi. 4 Conclusions We have demonstrated that causal graphical models depicting the data generating process can serve as a powerful tool for analyzing missing data problems and determining (1) if theoretical impediments exist to eliminating bias due to data missingness, (2) whether a given procedure produces consistent estimates, and (3) whether such a procedure can be found algorithmically. We formalized the notion of recoverability and showed that relations are always recoverable when data are missing at random (MCAR or MAR) and, more importantly, that in many commonly occurring problems, recoverability can be achieved even when data are missing not at random (MNAR). We further presented a sufficient condition to ensure recoverability of a given relation Q (Theorem 1) and operationalized Theorem 1 using graphical criteria (Theorems 2, 3 and 4). In summary, we demonstrated some of the insights and capabilities that can be gained by exploiting causal knowledge in missing data problems. Acknowledgment This research was supported in parts by grants from NSF #IIS-1249822 and #IIS-1302448 and ONR #N00014-13-1-0153 and #N00014-10-1-0933 References [1] P.D. Allison. Missing data series: Quantitative applications in the social sciences, 2002. 8 [2] T. Bu, N. Duffield, F.L. Presti, and D. Towsley. Network tomography on general topologies. In ACM SIGMETRICS Performance Evaluation Review, volume 30, pages 21–30. ACM, 2002. [3] E.R. Buhi, P. Goodson, and T.B. Neilands. Out of sight, not out of mind: strategies for handling missing data. American journal of health behavior, 32:83–92, 2008. [4] R.M. Daniel, M.G. Kenward, S.N. Cousens, and B.L. De Stavola. Using causal diagrams to guide analysis in missing data problems. Statistical Methods in Medical Research, 21(3):243–256, 2012. [5] R. Dechter, I. Meiri, and J. Pearl. Temporal constraint networks. Artificial intelligence, 1991. [6] C.K. Enders. Applied Missing Data Analysis. Guilford Press, 2010. [7] U.M. Fayyad. Data mining and knowledge discovery: Making sense out of data. IEEE expert, 11(5):20– 25, 1996. [8] F. M. Garcia. Definition and diagnosis of problematic attrition in randomized controlled experiments. Working paper, April 2013. Available at SSRN: http://ssrn.com/abstract=2267120. [9] R.D. Gill and J.M. Robins. Sequential models for coarsening and missingness. In Proceedings of the First Seattle Symposium in Biostatistics, pages 295–305. Springer, 1997. [10] R.D. Gill, M.J. Van Der Laan, and J.M. Robins. Coarsening at random: Characterizations, conjectures, counter-examples. In Proceedings of the First Seattle Symposium in Biostatistics, pages 255–294. Springer, 1997. [11] J.W Graham. Missing Data: Analysis and Design (Statistics for Social and Behavioral Sciences). Springer, 2012. [12] D.F. Heitjan and D.B. Rubin. Ignorability and coarse data. The Annals of Statistics, pages 2244–2253, 1991. [13] R.J.A. Little and D.B. Rubin. Statistical analysis with missing data. Wiley, 2002. [14] B.M. Marlin and R.S. Zemel. Collaborative prediction and ranking with non-random missing data. In Proceedings of the third ACM conference on Recommender systems, pages 5–12. ACM, 2009. [15] B.M. Marlin, R.S. Zemel, S. Roweis, and M. Slaney. Collaborative filtering and the missing at random assumption. In UAI, 2007. [16] B.M. Marlin, R.S. Zemel, S.T. Roweis, and M. Slaney. Recommender systems: missing data and statistical model estimation. In IJCAI, 2011. [17] P.E. McKnight, K.M. McKnight, S. Sidani, and A.J. Figueredo. Missing data: A gentle introduction. Guilford Press, 2007. [18] Harvey J Miller and Jiawei Han. Geographic data mining and knowledge discovery. CRC, 2009. [19] K. Mohan and J. Pearl. On the testability of models with missing data. To appear in the Proceedings of AISTAT-2014; Available at http://ftp.cs.ucla.edu/pub/stat ser/r415.pdf. [20] J. Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 1988. [21] J. Pearl. Causality: models, reasoning and inference. Cambridge Univ Press, New York, 2009. [22] J. Pearl and K. Mohan. Recoverability and testability of missing data: Introduction and summary of results. Technical Report R-417, UCLA, 2013. Available at http://ftp.cs.ucla.edu/pub/stat ser/r417.pdf. [23] C.Y.J. Peng, M. Harwell, S.M. Liou, and L.H. Ehman. Advances in missing data methods and implications for educational research. Real data analysis, pages 31–78, 2006. [24] J.L. Peugh and C.K. Enders. Missing data in educational research: A review of reporting practices and suggestions for improvement. Review of educational research, 74(4):525–556, 2004. [25] D.B. Rubin. Inference and missing data. Biometrika, 63:581–592, 1976. [26] D.B. Rubin. Multiple Imputation for Nonresponse in Surveys. Wiley Online Library, New York, NY, 1987. [27] D.B. Rubin. Multiple imputation after 18+ years. Journal of the American Statistical Association, 91(434):473–489, 1996. [28] J.L. Schafer and J.W. Graham. Missing data: our view of the state of the art. Psychological Methods, 7(2):147–177, 2002. [29] F. Thoemmes and N. Rose. Selection of auxiliary variables in missing data problems: Not all auxiliary variables are created equal. Technical Report Technical Report R-002, Cornell University, 2013. [30] M.J. Van der Laan and J.M. Robins. Unified methods for censored longitudinal data and causality. Springer Verlag, 2003. [31] W. Wothke. Longitudinal and multigroup modeling with missing data. Lawrence Erlbaum Associates Publishers, 2000. 9
2013
18
4,909
Adaptive Anonymity via b-Matching Krzysztof Choromanski Columbia University kmc2178@columbia.edu Tony Jebara Columbia University tj2008@columbia.edu Kui Tang Columbia University kt2384@columbia.edu Abstract The adaptive anonymity problem is formalized where each individual shares their data along with an integer value to indicate their personal level of desired privacy. This problem leads to a generalization of k-anonymity to the b-matching setting. Novel algorithms and theory are provided to implement this type of anonymity. The relaxation achieves better utility, admits theoretical privacy guarantees that are as strong, and, most importantly, accommodates a variable level of anonymity for each individual. Empirical results confirm improved utility on benchmark and social data-sets. 1 Introduction In many situations, individuals wish to share their personal data for machine learning applications and other exploration purposes. If the data contains sensitive information, it is necessary to protect it with privacy guarantees while maintaining some notion of data utility [18, 2, 24]. There are various definitions of privacy. These include k-anonymity [19], l-diversity [16], t-closeness [14] and differential1 privacy [3, 22]. All these privacy guarantees fundamentally treat each contributed datum about an individual equally. However, the acceptable anonymity and comfort-level of each individual in a population can vary widely. This article explores the adaptive anonymity setting and shows how to generalize the k-anonymity framework to handle it. Other related approaches have been previously explored [20, 21, 15, 5, 6, 23] yet herein we contribute novel efficient algorithms and formalize precise privacy guarantees. Note also that there are various definitions of utility. This article focuses on the use of suppression since it is well-formalized. Therein, we hide certain values in the data-set by replacing them with a ∗symbol (fewer ∗symbols indicate higher utility). The overall goal is to maximize utility while preserving each individual’s level of desired privacy. This article is organized as follows. § 2 formalizes the adaptive anonymity problem and shows how k-anonymity does not handle it. This leads to a relaxation of k-anonymity into symmetric and asymmetric bipartite regular compatibility graphs. § 3 provides algorithms for maximizing utility under these relaxed privacy criteria. § 4 provides theorems to ensure the privacy of these relaxed criteria for uniform anonymity as well as for adaptive anonymity. § 5 shows experiments on benchmark and social data-sets. Detailed proofs are provided in the Supplement. 2 Adaptive anonymity and necessary relaxations to k-anonymity The adaptive anonymity problem considers a data-set X ∈Zn×d consisting of n ∈N observations {x1, . . . , xn} each of which is a d-dimensional discrete vector, in other words, xi ∈Zd. Each user i contributes an observation vector xi which contains discrete attributes pertaining to that user2. Furthermore, each user i provides an adaptive anonymity parameter δi ∈N they desire to keep when the database is released. Given such a data-set and anonymity parameters, we wish to output an obfuscated data-set denoted by Y ∈{Z ∪∗}n×d which consists of vectors {y1, . . . , yn} where 1Differential privacy often requires specifying the data application (e.g. logistic regression) in advance [4]. 2For instance, a vector can contain a user’s gender, race, height, weight, age, income bracket and so on. 1 yi(k) ∈{xi(k), ∗}. The star symbol ∗indicates that the k’th attribute has been masked in the i’th user-record. We say that vector xi is compatible with vector yj if xi(k) = yj(k) for all elements of yj(k) ̸= ∗. The goal of this article is to create a Y which contains a minimal number of ∗symbols such that each entry yi of Y is compatible with at least δi entries of X and vice-versa. The most pervasive method for anonymity in the released data is the k-anonymity method [19, 1]. However, it is actually more constraining than the above desiderata. If all users have the same value δi = k, then k-anonymity suppresses data in the database such that, for each user’s data vector in the released (or anonymized) database, there are at least k −1 identical copies in the released database. The existence of copies is used by k-anonymity to justify some protection to attack. We will show that the idea of k −1 copies can be understood as forming a compatibility graph between the original database and the released database which is composed of several fully-connected k-cliques. However, rather than guaranteeing copies or cliques, the anonymity problem can be relaxed into a k-regular compatibility to achieve nearly identical resilience to attack. More interestingly, this relaxation will naturally allow users to select different δi anonymity values or degrees in the compatibility graph and allow them to achieve their desired personal protection level. Why can’t k-anonymity handle heterogeneous anonymity levels δi? Consider the case where the population contains many liberal users with very low anonymity levels yet one single paranoid user (user i) wants to have a maximal anonymity with δi = n. In the k-anonymity framework, that user will require n −1 identical copies of his data in the released database. Thus, a single paranoid user will destroy all the information of the database which will merely contain completely redundant vectors. We will propose a b-matching relaxation to k-anonymity which prevents this degeneracy since it does not merely handle compatibility queries by creating copies in the released data. While k-anonymity is not the only criterion for privacy, there are situations in which it is sufficient as illustrated by the following scenario. First assume the data-set X is associated with a set of identities (or usernames) and Y is associated with a set of keys. A key may be the user’s password or some secret information (such as their DNA sequence). Represent the usernames and keys using integers x1, . . . , xn and y1, . . . , yn, respectively. Username xi ∈Z is associated with entry xi and key yj ∈Z is associated with entry yj. Furthermore, assume that these usernames and keys are diverse, unique and independent of their corresponding attributes. These x and y values are known as the sensitive attributes and the entries of X and Y are the non-sensitive attributes [16]. We aim to release an obfuscated database Y and its keys with the possibility that an adversary may have access to all or a subset of X and the identities. The goal is to ensure that the success of an attack (using a username-key pair) is low. In other words, the attack succeeds with probability no larger than 1/δi for a user which specified δi ∈N. Thus, the attack we seek to protect against is the use of the data to match usernames to keys (rather than attacks in which additional non-sensitive attributes about a user are discovered). In the uniform δi setting, k-anonymity guarantees that a single one-time attack using a single username-key pair succeeds with probability at most 1/k. In the extreme case, it is easy to see that replacing all of Y with ∗symbols will result in an attack success probability of 1/n if the adversary attempts a single random attack-pair (username and key). Meanwhile, releasing a database Y = X with keys could allow the adversary to succeed with an initial attack with probability 1. We first assume that all degrees δi are constant and set to δ and discuss how the proposed b-matching privacy output subtly differs from standard k-anonymity [19]. First, define quasi-identifiers as sets of attributes like gender and age that can be linked with external data to uniquely identify an individual in the population. The k-anonymity criterion says that a data-set such as Y is protected against linking attacks that exploit quasi-identifiers if every element is indistinguishable from at least k −1 other elements with respect to every set of quasi-identifier attributes. We will instead use a compatibility graph G to more precisely characterize how elements are indistinguishable in the data-sets and which entries of Y are compatible with entries in the original data-set X. The graph places edges between entries of X which are compatible with entries of Y. Clearly, G is an undirected bipartite graph containing two equal-sized partitions (or color-classes) of nodes A and B each of cardinality n where A = {a1, . . . , an} and B = {b1, . . . , bn}. Each element of A is associated with an entry of X and each element of B is associated with an entry of Y. An edge e = (i, j) ∈G that is adjacent to a node in A and a node in B indicates that the entries xi and yj are compatible. The absence of an edge means nothing: entries are either compatible or not compatible. 2 For δi = δ, b-matching produces δ-regular bipartite graphs G while k-anonymity produces δ-regular clique-bipartite graphs3 defined as follows. Definition 2.1 Let G(A, B) be a bipartite graph with color classes: A, B where A = {a1, ..., an}, B = {b1, ..., bn}. We call a k-regular bipartite graph G(A, B) a clique-bipartite graph if it is a union of pairwise disjoint and nonadjacent complete k-regular bipartite graphs. Denote by Gn,δ b the family of δ-regular bipartite graphs with n nodes. Similarly, denote by Gn,δ k the family of δ-regular graphs clique-bipartite graphs. We will also denote by Gn,δ s the family of symmetric b-regular graphs using the following definition of symmetry. Definition 2.2 Let G(A, B) be a bipartite graph with color classes: A, B where A = {a1, ..., an}, B = {b1, ..., bn}. We say that G(A, B) is symmetric if the existence of an edge (ai, bj) in G(A, B) implies the existence of an edge (aj, bi), where 1 ≤i, j ≤n. For values of n that are not trivially small, it is easy to see that the graph families satisfy Gn,δ k ⊆Gn,δ s ⊆Gn,δ b . This holds since symmetric δ-regular graphs are δ-regular with the additional symmetry constraint. Clique-bipartite graphs are δ-regular graphs constrained to be clique-bipartite and the latter property automatically yields symmetry. This article introduces graph families Gn,δ b and Gn,δ s to enforce privacy since these are relaxations of the family Gn,b k as previously explored in k-anonymity research. These relaxations will achieve better utility in the released database. Furthermore, they will allow us to permit adaptive anonymity levels across the users in the database. We will drop the superscripts n and δ whenever the meaning is clear from the context. Additional properties of these graph families will be formalized in § 4 but we first informally illustrate how they are useful in achieving data privacy. username alice 1 0 0 0 bob 0 0 0 0 carol 0 0 1 1 dave 1 0 1 1 eve 1 1 0 0 fred 0 1 1 1 key * 0 0 0 ggacta * 0 0 0 tacaga * 0 1 1 ctagag * 0 1 1 tatgaa * 1 * * caacgc * 1 * * tgttga Figure 1: Traditional k-anonymity (in Gk) for n = 6, d = 4, δ = 2 achieves #(∗) = 10. Left to right: usernames with data (x, X), compatibility graph (G) and anonymized data with keys (Y, y). username alice 1 0 0 0 bob 0 0 0 0 carol 0 0 1 1 dave 1 0 1 1 eve 1 1 0 0 fred 0 1 1 1 key * 0 0 0 ggacta * * 0 0 tacaga * 0 1 1 ctagag * * 1 1 tatgaa 1 * 0 0 caacgc 0 * 1 1 tgttga Figure 2: The b-matching anonymity (in Gb) for n = 6, d = 4, δ = 2 achieves #(∗) = 8. Left to right: usernames with data (x, X), compatibility graph (G) and anonymized data with keys (Y, y). In figure 1, we see an example of k-anonymity with a graph from Gk. Here each entry of the anonymized data-set Y appears k = 2 times (or δ = 2). The compatibility graph shows 3 fully connected cliques since each of the k copies in Y has identical entries. By brute force exploration 3 Traditional k-anonymity releases an obfuscated database of n rows where there are k copies of each row. So, each copy has the same neighborhood. Similarly, the entries of the original database all have to be connected to the same k copies in the obfuscated database. This induces a so-called bipartite clique-connectivity. 3 we find that the minimum number of stars to achieve this type of anonymity is #(∗) = 10. Moreover, since this problem is NP-hard [17], efficient algorithms rarely achieve this best-possible utility (minimal number of stars). Next, consider figure 2 where we have achieved superior utility by only introducing #(∗) = 8 stars to form Y. The compatibility graph is at least δ = 2-regular. It was possible to find a smaller number of stars since δ-regular bipartite graphs are a relaxation of k-clique graphs as shown in figure 1. Another possibility (not shown in the figures) is a symmetric version of figure 2 where nodes on the left hand side and nodes on the right hand side have a symmetric connectivity. Such an intermediate solution (since Gk ⊂Gs ⊂Gb) should potentially achieve #(∗) between 8 and 10. It is easy to see why all graphs have to have a minimum degree of δ at least (i.e. must contain a δ-regular graph). If one of the nodes has a degree of 1, then the adversary will know the key (or the username) for that node with certainty. If each node has degree δ or larger, then the adversary will have probability at most 1/δ of choosing the correct key (or username) for any random victim. We next describe algorithms which accept X and integers δ1, . . . , δn and output Y such that each entry i in Y is compatible with at least δi entries in X and vice-versa. These algorithms operate by finding a graph in Gb or Gs and achieve similar protection as k-anonymity (which finds a graph in the most restrictive family Gk and therefore requires more stars). We provide a theoretical analysis of the topology of G in these two new families to show resilience to single and sustained attacks from an all-powerful adversary. 3 Approximation algorithms While the k-anonymity suppression problem is known to be NP-hard, a polynomial time method with an approximation guarantee is the forest algorithm [1] which has an approximation ratio of 3k− 3. In practice, though, the forest algorithm is slow and achieves poor utility compared to clustering methods [10]. We provide an algorithm for the b-matching anonymity problem with approximation ratio of δ and runtime of O(δm√n) where n is the number of users in the data, δ is the largest anonymity level in {δ1, . . . , δn} and m is the number of edges to explore (in the worst case with no prior knowledge, we have m = O(n2) edges between all possible users). One algorithm solves for minimum weight bipartite b-matchings which is easy to implement using linear programming, max-flow methods or belief propagation in the bipartite case [9, 11]. The other algorithm uses a general non-bipartite solver which involves Blossom structures and requires O(δmn log(n)) time[8, 9, 13]. Fortunately, minimum weight general matching has recently been shown to require only O(mϵ−1 log ϵ−1) time to achieve a (1 −ϵ) approximation [7]. First, we define two quantities of interest. Given a graph G with adjacency matrix G ∈Bn×n and a data-set X, the Hamming error is defined as h(G) = ! i ! j Gij ! k(Xik ̸= Xjk). The number of stars to achieve G is s(G) = nd −! i ! k " j (1 −Gij(Xik ̸= Xjk)) . Recall Gb is the family of regular bipartite graphs. Let minG∈Gb s(G) be the minimum number of stars (or suppressions) that one can place in Y while keeping the entries in Y compatible with at least δ entries in X and vice-versa. We propose the following polynomial time algorithm which, in its first iteration, minimizes h(G) over the family Gb and then iteratively minimizes a variational upper bound [12] on s(G) using a weighted version of the Hamming distance. Algorithm 1 variational bipartite b-matching Input X ∈Zn×d, δi ∈N for i ∈{1, . . . , n}, ε > 0 and initialize W ∈Rn×d to the all 1s matrix While not converged { Set ˆG = arg minG∈Bn×n ! ij Gij ! k Wik(Xik ̸= Xjk) s.t. ! j Gij = ! j Gji ≥δi For all i and k set Wik = exp #! j ˆGij(Xik ̸= Xjk) ln ε 1+ε $ } For all i and k set Yik = ∗if ˆGij = 1 and Xjk ̸= Xik for any j Choose random permutation M as matrix M ∈Bn×n and output Ypublic = MY We can further restrict the b-matching solver such that the graph G is symmetric with respect to both the original data X and the obfuscated data Y. To do so, we require that G is a symmetric matrix. This will produce a graph G ∈Gs. In such a situation, the value of ˆG is recovered by a general 4 unipartite b-matching algorithm rather than a bipartite b-matching program. Thus, the set of possible output solutions is strictly smaller (the bipartite formulation relaxes the symmetric one). Algorithm 2 variational symmetric b-matching Input X ∈Zn×d, δi ∈N for i ∈{1, . . . , n}, ε > 0 and initialize W ∈Rn×d to the all 1s matrix While not converged { Set ˆG = arg minG∈Bn×n ! ij Gij ! k Wik(Xik ̸= Xjk) s.t. ! j Gij ≥δi, Gij = Gji For all i and k set Wik = exp #! j ˆGij(Xik ̸= Xjk) ln ε 1+ε $ } For all i and k set Yik = ∗if ˆGij = 1 and Xjk ̸= Xik for any j Choose random permutation M as matrix M ∈Bn×n and output Ypublic = MY Theorem 1 For δi ≤δ, iteration #1 of algorithm 1 finds ˆG such that s( ˆG) ≤δ minG∈Gb s(G). Theorem 2 Each iteration of algorithm 1 monotonically decreases s( ˆG). Theorem 1 and 2 apply to both algorithms. Both algorithms4 manipulate a bipartite regular graph G(A, B) containing the true matching {(a1, b1), . . . , (an, bn)}. However, they ultimately release the data-set Ypublic after randomly shuffling Y according to some matching or permutation M which hides the true matching. The random permutation or matching M can be represented as a matrix M ∈Bn×n or as a function σ : {1, . . . , n} →{1, . . ., n}. We now discuss how an adversary can attack privacy by recovering this matching or parts of it. 4 Privacy guarantees We now characterize the anonymity provided by a compatibility graph G ∈Gb (or G ∈Gs) under several attack models. The goal of the adversary is to correctly match people to as many records as possible. In other words, the adversary wishes to find the random matching M used in the algorithms (or parts of M) to connect the entries of X to the entries of Ypublic (assuming the adversary has stolen X and Ypublic or portions of them). More precisely, we have a bipartite graph G(A, B) with color classes A, B, each of size n. Class A corresponds to n usernames and class B to n keys. Each username in A is matched to its key in B through some unknown matching M. We consider the model where the graph G(A, B) is δ-regular, where δ ∈N is a parameter chosen by the publisher. The latter is especially important if we are interested in guaranteeing different levels of privacy for different users and allowing δ to vary with the user’s index i. Sometimes it is the case that the adversary has some additional information and at the very beginning knows some complete records that belong to some people. In graph-theoretic terms, the adversary thus knows parts of the hidden matching M in advance. Alternatively, the adversary may have come across such additional information through sustained attack where previous attempts revealed the presence or absence of an edge. We are interested in analyzing how this extra knowledge can help him further reveal other edges of the matching. We aim to show that, for some range of the parameters of the bipartite graphs, this additional knowledge does not help him much. We will compare the resilience to attack relative to the resilience of k-anonymity. We say that a person v is k-anonymous if his or her real data record can be confused with at least k −1 records from different people. We first discuss the case of single attacks and then discuss sustained attacks. 4.1 One-Time Attack Guarantees Assume first that the adversary has no extra information about the matching and performs a one-time attack. Then, lemma 4.1 holds which is a direct implication of lemma 4.2. Lemma 4.1 If G(A, B) is an arbitrary δ-regular graph and the adversary does not know any edges of the matching he is looking for then every person is δ-anonymous. 4It is straightforward to put a different weight on certain suppressions over others if the utility of the data is not uniform for each entry or bit. This done by using an n × d weight matrix in the optimization. It is also straightforward to handle missing data by allowing initial stars in X before anonymizing. 5 Lemma 4.2 Let G(A, B) be a δ-regular bipartite graph. Then for every edge e of G(A, B) there exists a perfect matching in G(A, B) that uses e. The result does not assume any structure in the graph beyond its δ-regularity. Thus, for a single attack, b-matching anonymity (symmetric or asymmetric) is equivalent to k-anonymity when b = k. Corollary 4.1 Assume the bipartite graph G(A, B) is either δ-regular, symmetric δ-regular or clique-bipartite and δ-regular. An adversary attacking G once succeeds with probability ≤1/δ. 4.2 Sustained Attack on k-Cliques Now consider the situation of sustained attacks or attacks with prior information. Here, the adversary may know c ∈N edges in M a priori by whatever means (previous attacks or through side information). We begin by analyzing the resilience of k-anonymity where G is a cliques-structured graph. In the clique-bipartite graph, even if the adversary knows some edges of the matching (but not too many) then there still is hope of good anonymity for all people. The anonymity of every person decreases from δ to at least (δ −c). So, for example, if the adversary knows in advance δ 2 edges of the matching then we get the same type of anonymity for every person as for the model with two times smaller degree in which the adversary has no extra knowledge. So we will be able to show the following: Lemma 4.3 If G(A, B) is clique-bipartite δ-regular graph and the adversary knows in advance c edges of the matching then every person is (δ −c)-anonymous. The above is simply a consequence of the following lemma. Lemma 4.4 Assume that G(A, B) is clique-bipartite δ-regular graph. Denote by M some perfect matching in G(A, B). Let C be some subset of the edges of M and let c = |C|. Fix some vertex v ∈A not matched in C. Then there are at least (δ −c) edges adjacent to v such that, for each of these edges e, there exists some perfect matching M e in G(A, B) that uses both e and C. Corollary 4.2 Assume graph G(A, B) is a clique-bipartite and δ-regular. Assume that the adversary knows in advance c edges of the matching. The adversary selects uniformly at random a vertex the privacy of which he wants to break from the set of vertices he does not know in advance. Then he succeeds with probability at most 1 δ−c. We next show that b-matchings achieve comparable resilience under sustained attack. 4.3 Sustained attack on asymmetric bipartite b-matching We now consider the case where we do not have a graph G(A, B) which is clique-bipartite but rather is only δ-regular and potentially asymmetric (as returned by algorithm 1). Theorem 4.1 Let G(A,B) be a δ-regular bipartite graph with color classes: A and B. Assume that |A| = |B| = n. Denote by M some perfect matching M in G(A, B). Let C be some subset of the edges of M and let c = |C|. Take some ξ ≥c. Denote n′ = n −c. Fix any function φ : N →R satisfying ∀δ(ξ % 2δ + 1 4 < φ(δ) < δ). Then for all but at most η = 2cδ2n′ξ(1+ φ(δ)+√ φ2(δ)−2ξ2δ 2ξδ ) φ3(δ)(1+ r 1−2ξ2δ φ2(δ) )( 1 ξ − c φ(δ) + δ(1−c ξ ) φ(δ) ) + cδ φ(δ) vertices v ∈A not matched in C the following holds: The size of the set of edges e adjacent to v and having the additional property that there exists some perfect matching M v in G(A, B) that uses e and edges from C is: at least (δ −c −φ(δ)). Essentially, theorem 4.1 says that all but at most a small number η of people are (δ −c −φ(δ))anonymous for every φ satisfying: c % 2δ + 1 4 < φ(δ) < δ if the adversary knows in advance c edges of the matching. For example, take φ(δ) := θδ for θ ∈(0, 1). Fix ξ = c and assume that the adversary knows in advance at most δ 1 4 edges of the matching. Then, using the formula from 6 theorem 4.1, we obtain that (for n large enough) all but at most 4n′ δ 1 4 θ3 + δ 1 4 θ people from those that the adversary does not know in advance are ((1 −θ)δ −δ 1 4 )-anonymous. So if δ is large enough then all but approximately a small fraction 4 δ 1 4 θ3 of all people not known in advance are almost (1 −θ)δ-anonymous. Again take φ(δ) := θδ where θ ∈(0, 1). Take ξ = 2c. Next assume that 1 ≤c ≤min( δ 4, δ(1 − θ −θ2)). Assume that the adversary selects uniformly at random a person to attack. Our goal is to find an upper bound on the probability he succeeds. Then, using theorem 4.1, we can conclude that all but at most Fn′ people whose records are not known in advance are ((1 −θ)δ −c)-anonymous for F = 33c2 θ2δ . The probability of success is at most: F + (1 −F) 1 (1−θ)δ−c. Using the expression on F that we have and our assumptions, we can conclude that the probability we are looking for is at most 34c2 θ2δ . Therefore we have: Theorem 4.2 Assume graph G(A, B) is δ-regular and the adversary knows in advance c edges of the matching, where c satisfies: 1 ≤c ≤min( δ 4, δ(1 −θ −θ2)). The adversary selects uniformly at random a vertex the privacy of which he wants to break from those that he does not know in advance. Then he succeeds with probability at most 34c2 θ2δ . 4.4 Sustained attack on symmetric b-matching with adaptive anonymity We now consider the case where the graph is not only δ-regular but also symmetric as defined in definition 2.2 and as recovered by algorithm 2. Furthermore, we consider the case where we have varying values of δi for each node since some users want higher privacy than others. It turns out that if the corresponding bipartite graph is symmetric (we define this term below) we can conclude that each user is (δi −c)-anonymous, where δi is the degree of a vertex associated with the user of the bipartite matching graph. So we get results completely analogous to those for the much simpler models described before. We will use a slightly more elaborate definition of symmetric5, however, since this graph has one if its partitions permuted by a random matching (the last step in both algorithms before releasing the data). Definition 4.1 Let G(A, B) be a bipartite graph with color classes: A, B and matching M = {(a1, b1), ...(an, bn)}, where A = {a1, ..., an}, B = {b1, ..., bn}. We say that G(A, B) is symmetric with respect to M if the existence of an edge (ai, bj) in G(A, B) implies the existence of an edge (aj, bi), where 1 ≤i, j ≤n. From now on, the matching M with respect to which G(A, B) is symmetric is a canonical matching of G(A, B). Assume that G(A, B) is symmetric with respect to its canonical matching M (it does not need to be a clique-bipartite graph). In such a case, we will prove that, if the adversary knows in advance c edges of the matching, then every person from the class A of degree δi is (δi −c)anonymous. So we obtain the same type of anonymity as in a clique-bipartite graph (see: lemma 4.3). Lemma 4.5 Assume that G(A, B) is a bipartite graph, symmetric with respect to its canonical matching M. Assume furthermore that the adversary knows in advance c edges of the matching. Then every person that he does not know in advance is (δi −c)-anonymous, where δi is a degree of the related vertex of the bipartite graph. As a corollary, we obtain the same privacy guarantees in the symmetric case as the k-cliques case. Corollary 4.3 Assume bipartite graph G(A, B) is symmetric with respect to its canonical matchings M. Assume that the adversary knows in advance c edges of the matching. The adversary selects uniformly at random a vertex the privacy of which he wants to break from the set of vertices he does not know in advance. Then he succeeds with probability at most 1 δi−c, where δi is a degree of a vertex of the matching graph associated with the user. 5A symmetric graph G(A, B) may not remain symmetric according to definition 2.2 if nodes in B are shuffled by a permutation M. However, it will still be symmetric with respect to M according to definition 4.1. 7 In summary, the symmetric case is as resilient to sustained attack as the cliques-bipartite case, the usual one underlying k-anonymity if we set δi = δ = k everywhere. The adversary succeeds with probability at most 1/(δi−c). However, the asymmetric case is potentially weaker and the adversary can succeed with probability at most 34c2 θ2δ . Interestingly, in the symmetric case with variable δi degrees, however, we can provide guarantees that are just as good without forcing all individuals to agree on a common level of anonymity. 0 5 10 15 20 0.4 0.5 0.6 0.7 0.8 0.9 1 anonymity utility b−matching b−symmetric k−anonymity 0 5 10 15 20 0.2 0.4 0.6 0.8 1 anonymity utility b−matching b−symmetric k−anonymity 0 5 10 15 20 0.2 0.4 0.6 0.8 1 anonymity utility b−matching b−symmetric k−anonymity 0 5 10 15 20 0.7 0.75 0.8 0.85 0.9 0.95 1 anonymity utility b−matching b−symmetric k−anonymity 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 anonymity utility b−matching b−symmetric k−anonymity 0 5 10 15 20 0.4 0.5 0.6 0.7 0.8 0.9 1 anonymity utility b−matching b−symmetric k−anonymity 5 10 15 20 25 30 0.7 0.75 0.8 0.85 0.9 0.95 anonymity utility b−matching b−symmetric k−anonymity 5 10 15 20 25 30 0.75 0.8 0.85 0.9 0.95 anonymity utility b−matching b−symmetric k−anonymity (a) (b) Figure 3: Utility (1 −#(∗) nd ) versus anonymity on (a) Bupa (n = 344, d = 7), Wine (n = 178, d = 14), Heart (n = 186, d = 23), Ecoli (n = 336, d = 8), and Hepatitis (n = 154, d = 20) and Forest Fires (n = 517, d = 44) data-sets and (b) CalTech University Facebook (n = 768, d = 101) and Reed University Facebook (n = 962, d = 101) data-sets. 5 Experiments We compared algorithms 1 and 2 against an agglomerative clustering competitor (optimized to minimize stars) which is known to outperform the forest method [10]. Agglomerative clustering starts with singleton clusters and keeps unifying the two closest clusters with smallest increase in stars until clusters grow to a size at least k. Both algorithms release data with suppressions to achieve a desired constant anonymity level δ. For our algorithms, we swept values of ε in {2−1, 2−2, . . . , 2−10} from largest to smallest and chose the solution that produced the least number of stars. Furthermore, we warm-started the symmetric algorithm with the star-pattern solution of the asymmetric algorithm to make it converge more quickly. We first explored six standard data-sets from UCI http://archive.ics.uci.edu/ml/ in the uniform anonymity setting. Figure 3(a) summarizes the results where utility is plotted against δ. Fewer stars imply greater utility and larger δ implies higher anonymity. We discretized each numerical dimension in a data-set into a binary attribute by finding all elements above and below the median and mapped categorical values in the data-sets into a binary code (potentially increasing the dimensionality). Algorithms 1 achieved significantly better utility for any given fixed constant anonymity level δ while algorithm 2 achieved a slight improvement. We next explored Facebook social data experiments where each user has a different level of desired anonymity and has 7 discrete profile attributes which were binarized into d = 101 dimensions. We used the number of friends fi a user has to compute their desired anonymity level (which decreases as the number of friends increases). We set F = maxi=1,...n ⌊log fi⌋and, for each value of δ in the plot, we set user i’s privacy level to δi = δ −(F −⌊log fi⌋). Figure 3(b) summarizes the results where utility is plotted against δ. Since the k-anonymity agglomerative clustering method requires a constant δ for all users, we set k = maxi δi in order to have a privacy guarantee. Algorithms 1 and 2 consistently achieved significantly better utility in the adaptive anonymity setting while also achieving the desired level of privacy protection. 6 Discussion We described the adaptive anonymity problem where data is obfuscated to respect each individual user’s privacy settings. We proposed a relaxation of k-anonymity which is straightforward to implement algorithmically. It yields similar privacy protection while offering greater utility and the ability to handle heterogeneous anonymity levels for each user. 8 References [1] G. Aggarwal, T. Feder, K. Kenthapadi, R. Motwani, R. Panigrahy, D. Thomas, and A. Zhu. Approximation algorithms for k-anonymity. Journal of Privacy Technology, 2005. [2] M. Allman and V. Paxson. Issues and etiquette concerning use of shared measurement data. In Proceedings of the 7th ACM SIGCOMM conference on Internet measurement, 2007. [3] M. Bugliesi, B. Preneel, V. Sassone, I Wegener, and C. Dwork. Lecture Notes in Computer Science - Automata, Languages and Programming, chapter Differential Privacy. Springer Berlin / Heidelberg, 2006. [4] K. Chaudhuri, C. Monteleone, and A.D. Sarwate. Differentially private empirical risk minimization. Journal of Machine Learning Research, (12):1069–1109, 2011. [5] G. Cormode, D. Srivastava, S. Bhagat, and B. Krishnamurthy. Class-based graph anonymization for social network data. In PVLDB, volume 2, pages 766–777, 2009. [6] G. Cormode, D. Srivastava, T. Yu, and Q. Zhang. Anonymizing bipartite graph data using safe groupings. VLDB J., 19(1):115–139, 2010. [7] R. Duan and S. Pettie. Approximating maximum weight matching in near-linear time. In Proceedings 51st Symposium on Foundations of Computer Science, 2010. [8] J. Edmonds. Paths, trees and flowers. Canadian Journal of Mathematics, 17, 1965. [9] H.N. Gabow. An efficient reduction technique for degree-constrained subgraph and bidirected network flow problems. In Proceedings of the fifteenth annual ACM symposium on Theory of computing, 1983. [10] A. Gionis, A. Mazza, and T. Tassa. k-anonymization revisited. In ICDE, 2008. [11] B. Huang and T. Jebara. Fast b-matching via sufficient selection belief propagation. In Artificial Intelligence and Statistics, 2011. [12] M.I. Jordan, Z. Ghahramani, T. Jaakkola, and L.K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, 1999. [13] V.N. Kolmogorov. Blossom V: A new implementation of a minimum cost perfect matching algorithm. Mathematical Programming Computation, 1(1):43–67, 2009. [14] N. Li, T. Li, and S. Venkatasubramanian. t-closeness: Privacy beyond k-anonymity and ldiversity. In ICDE, 2007. [15] S. Lodha and D. Thomas. Probabilistic anonymity. In PinKDD, 2007. [16] A. Machanavajjhala, D. Kifer, J. Gehrke, and M. Venkitasubramaniam. L-diversity: Privacy beyond k-anonymity. ACM Transactions on Knowledge Discovery from Data (TKDD), 1, 2007. [17] A. Meyerson and R. Williams. On the complexity of optimal k-anonymity. In PODS, 2004. [18] P. Samarati and L. Sweeney. Generalizing data to provide anonymity when disclosing information. In PODS, 1998. [19] L. Sweeney. Achieving k-anonymity privacy protection using generalization and suppression. International Journal on Uncertainty, Fuzziness and Knowledge-based Systems, 10(5):571– 588, 2002. [20] Y. Tao and X. Xiao. Personalized privacy preservation. In SIGMOD Conference, 2006. [21] Y. Tao and X. Xiao. Personalized privacy preservation. In Privacy-Preserving Data Mining, 2008. [22] O. Williams and F. McSherry. Probabilistic inference and differential privacy. In NIPS, 2010. [23] M. Xue, P. Karras, C. Rassi, J. Vaidya, and K.-L. Tan. Anonymizing set-valued data by nonreciprocal recoding. In KDD, 2012. [24] E. Zheleva and L. Getoor. Preserving the privacy of sensitive relationships in graph data. In KDD, 2007. 9
2013
180
4,910
Statistical Active Learning Algorithms Maria Florina Balcan Georgia Institute of Technology ninamf@cc.gatech.edu Vitaly Feldman IBM Research - Almaden vitaly@post.harvard.edu Abstract We describe a framework for designing efficient active learning algorithms that are tolerant to random classification noise and differentially-private. The framework is based on active learning algorithms that are statistical in the sense that they rely on estimates of expectations of functions of filtered random examples. It builds on the powerful statistical query framework of Kearns [30]. We show that any efficient active statistical learning algorithm can be automatically converted to an efficient active learning algorithm which is tolerant to random classification noise as well as other forms of “uncorrelated” noise. We show that commonly studied concept classes including thresholds, rectangles, and linear separators can be efficiently actively learned in our framework. These results combined with our generic conversion lead to the first computationally-efficient algorithms for actively learning some of these concept classes in the presence of random classification noise that provide exponential improvement in the dependence on the error ϵ over their passive counterparts. In addition, we show that our algorithms can be automatically converted to efficient active differentially-private algorithms. This leads to the first differentially-private active learning algorithms with exponential label savings over the passive case. 1 Introduction Most classic machine learning methods depend on the assumption that humans can annotate all the data available for training. However, many modern machine learning applications have massive amounts of unannotated or unlabeled data. As a consequence, there has been tremendous interest both in machine learning and its application areas in designing algorithms that most efficiently utilize the available data, while minimizing the need for human intervention. An extensively used and studied technique is active learning, where the algorithm is presented with a large pool of unlabeled examples and can interactively ask for the labels of examples of its own choosing from the pool, with the goal to drastically reduce labeling effort. This has been a major area of machine learning research in the past decade [19], with several exciting developments on understanding its underlying statistical principles [27, 18, 4, 3, 29, 21, 15, 7, 31, 10, 34, 6]. In particular, several general characterizations have been developed for describing when active learning can in principle have an advantage over the classic passive supervised learning paradigm, and by how much. However, these efforts were primarily focused on sample size bounds rather than computation, and as a result many of the proposed algorithms are not computationally efficient. The situation is even worse in the presence of noise where active learning appears to be particularly hard. In particular, prior to this work, there were no known efficient active algorithms for concept classes of super-constant VC-dimension that are provably robust to random and independent noise while giving improvements over the passive case. Our Results: We propose a framework for designing efficient (polynomial time) active learning algorithms which is based on restricting the way in which examples (both labeled and unlabeled) are accessed by the algorithm. These restricted algorithms can be easily simulated using active sampling and, in addition, possess a number of other useful properties. The main property we will consider is 1 tolerance to random classification noise of rate η (each label is flipped randomly and independently with probability η [1]). Further, as we will show, the algorithms are tolerant to other forms of noise and can be simulated in a differentially-private way. In our restriction, instead of access to random examples from some distribution P over X × Y the learning algorithm only gets “active” estimates of the statistical properties of P in the following sense. The algorithm can choose any filter function χ(x) : X →[0, 1] and a query function φ : X × Y →[−1, 1] for any χ and φ. For simplicity we can think of χ as an indicator function of some set χS ⊆X of “informative” points and of φ as some useful property of the target function. For this pair of functions the learning algorithm can get an estimate of E(x,y)∼P [φ(x, y) | x ∈χS]. For τ and τ0 chosen by the algorithm the estimate is provided to within tolerance τ as long as E(x,y)∼P [x ∈χS] ≥τ0 (nothing is guaranteed otherwise). Here the inverse of τ corresponds to the label complexity of the algorithm and the inverse of τ0 corresponds to its unlabeled sample complexity. Such a query is referred to as active statistical query (SQ) and algorithms using active SQs are referred to as active statistical algorithms. Our framework builds on the classic statistical query (SQ) learning framework of Kearns [30] defined in the context of PAC learning model [35]. The SQ model is based on estimates of expectations of functions of examples (but without the additional filter function) and was defined in order to design efficient noise tolerant algorithms in the PAC model. Despite the restrictive form, most of the learning algorithms in the PAC model and other standard techniques in machine learning and statistics used for problems over distributions have SQ analogues [30, 12, 11, ?]1. Further, statistical algorithms enjoy additional properties: they can be simulated in a differentially-private way [11], automatically parallelized on multi-core architectures [17] and have known information-theoretic characterizations of query complexity [13, 26]. As we show, our framework inherits the strengths of the SQ model while, as we will argue, capturing the power of active learning. At a first glance being active and statistical appear to be incompatible requirements on the algorithm. Active algorithms typically make label query decisions on the basis of examining individual samples (for example as in binary search for learning a threshold or the algorithms in [27, 21, 22]). At the same time statistical algorithms can only examine properties of the underlying distribution. But there also exist a number of active learning algorithms that can be seen as applying passive learning techniques to batches of examples that are obtained from querying labels of samples that satisfy the same filter. These include the general A2 algorithm [4] and, for example, algorithms in [3, 20, 9, 8]. As we show, we can build on these techniques to provide algorithms that fit our framework. We start by presenting a general reduction showing that any efficient active statistical learning algorithm can be automatically converted to an efficient active learning algorithm which is tolerant to random classification noise as well as other forms of “uncorrelated” noise. We then demonstrate the generality of our framework by showing that the most commonly studied concept classes including thresholds, balanced rectangles, and homogenous linear separators can be efficiently actively learned via active statistical algorithms. For these concept classes, we design efficient active learning algorithms that are statistical and provide the same exponential improvements in the dependence on the error ϵ over passive learning as their non-statistical counterparts. The primary problem we consider is active learning of homogeneous halfspaces, a problem that has attracted a lot of interest in the theory of active learning [27, 18, 3, 9, 22, 16, 23, 8, 28]. We describe two algorithms for the problem. First, building on insights from margin based analysis [3, 8], we give an active statistical learning algorithm for homogeneous halfspaces over all isotropic logconcave distributions, a wide class of distributions that includes many well-studied density functions and has played an important role in several areas including sampling, optimization, and learning [32]. Our algorithm for this setting proceeds in rounds; in round t we build a better approximation wt to the target function by using a passive SQ learning algorithm (e.g., the one of [24]) over a distribution Dt that is a mixture of distributions in which each component is the original distribution conditioned on being within a certain distance from the hyperplane defined by previous approximations wi. To perform passive statistical queries relative to Dt we use active SQs with a corresponding real valued filter. This algorithm is computationally efficient and uses only poly(d, log(1/ϵ)) active statistical queries of tolerance inverse-polynomial in the dimension d and log(1/ϵ). 1The sample complexity of the SQ analogues might increase sometimes though. 2 For the special case of the uniform distribution over the unit ball we give a new, simpler and substantially more efficient active statistical learning algorithm. Our algorithm is based on measuring the error of a halfspace conditioned on being within some margin of that halfspace. We show that such measurements performed on the perturbations of the current hypothesis along the d basis vectors can be combined to derive a better hypothesis. This approach differs substantially from the previous algorithms for this problem [3, 22]. The algorithm is computationally efficient and uses d log(1/ϵ) active SQs with tolerance of Ω(1/ √ d) and filter tolerance of Ω(1/ϵ). These results, combined with our generic simulation of active statistical algorithms in the presence of random classification noise (RCN) lead to the first known computationally efficient algorithms for actively learning halfspaces which are RCN tolerant and give provable label savings over the passive case. For the uniform distribution case this leads to an algorithm with sample complexity of O((1 −2η)−2 · d2 log(1/ϵ) log(d log(1/ϵ))) and for the general isotropic log-concave case we get sample complexity of poly(d, log(1/ϵ), 1/(1 −2η)). This is worse than the sample complexity in the noiseless case which is just O((d + log log(1/ϵ)) log(1/ϵ)) [8]. However, compared to passive learning in the presence of RCN, our algorithms have exponentially better dependence on ϵ and essentially the same dependence on d and 1/(1 −2η). One issue with the generic simulation is that it requires knowledge of η (or an almost precise estimate). Standard approach to dealing with this issue does not always work in the active setting and for our log-concave and the uniform distribution algorithms we give a specialized argument that preserves the exponential improvement in the dependence on ϵ. Differentially-private active learning: In many application of machine learning such as medical and financial record analysis, data is both sensitive and expensive to label. However, to the best of our knowledge, there are no formal results addressing both of these constraints. We address the problem by defining a natural model of differentially-private active learning. In our model we assume that a learner has full access to unlabeled portion of some database of n examples S ⊆ X × Y which correspond to records of individual participants in the database. In addition, for every element of the database S the learner can request the label of that element. As usual, the goal is to minimize the number of label requests (such setup is referred to as pool-based active learning [33]). In addition, we would like to preserve the differential privacy of the participants in the database, a now-standard notion of privacy introduced in [25]. Informally speaking, an algorithm is differentially private if adding any record to S (or removing a record from S) does not affect the probability that any specific hypothesis will be output by the algorithm significantly. As first shown by [11], SQ algorithms can be automatically translated into differentially-private algorithms. Using a similar approach, we show that active SQ learning algorithms can be automatically transformed into differentially-private active learning algorithms. Using our active statistical algorithms for halfspaces we obtain the first algorithms that are both differentially-private and give exponential improvements in the dependence of label complexity on the accuracy parameter ϵ. Additional related work: As we have mentioned, most prior theoretical work on active learning focuses on either sample complexity bounds (without regard for efficiency) or the noiseless case. For random classification noise in particular, [6] provides a sample complexity analysis based on the splitting index that is optimal up to polylog factors and works for general concept classes and distributions, but it is not computationally efficient. In addition, several works give active learning algorithms with empirical evidence of robustness to certain types of noise [9, 28]; In [16, 23] online learning algorithms in the selective sampling framework are presented, where labels must be actively queried before they are revealed. Under the assumption that the label conditional distribution is a linear function determined by a fixed target vector, they provide bounds on the regret of the algorithm and on the number of labels it queries when faced with an adaptive adversarial strategy of generating the instances. As pointed out in [23], these results can also be converted to a distributional PAC setting where instances xt are drawn i.i.d. In this setting they obtain exponential improvement in label complexity over passive learning. These interesting results and techniques are not directly comparable to ours. Our framework is not restricted to halfspaces. Another important difference is that (as pointed out in [28]) the exponential improvement they give is not possible in the noiseless version of their setting. In other words, the addition of linear noise defined by the target makes the problem easier for active sampling. By contrast RCN can only make the classification task harder than in the realizable case. 3 Due to space constraint details of most proofs and further discussion appear in the full version of this paper [5]. 2 Active Statistical Algorithms Let X be a domain and P be a distribution over labeled examples on X. We represent such a distribution by a pair (D, ψ) where D is the marginal distribution of P on X and ψ : X →[−1, 1] is a function defined as ψ(z) = E(x,ℓ)∼P [ℓ| x = z]. We will be primarily considering learning in the PAC model (realizable case) where ψ is a boolean function, possibly corrupted by random noise. When learning with respect to a distribution P = (D, ψ), an active statistical learner has access to active statistical queries. A query of this type is a pair of functions (χ, φ), where χ : X →[0, 1] is the filter function which for a point x, specifies the probability with which the label of x should be queried. The function φ : X × {−1, 1} →[−1, 1] is the query function and depends on both point and the label. The filter function χ defines the distribution D conditioned on χ as follows: for each x the density function D|χ(x) is defined as D|χ(x) = D(x)χ(x)/ED[χ(x)]. Note that if χ is an indicator function of some set S then D|χ is exactly D conditioned on x being in S. Let P|χ denote the conditioned distribution (D|χ, ψ). In addition, a query has two tolerance parameters: filter tolerance τ0 and query tolerance τ. In response to such a query the algorithm obtains a value µ such that if ED[χ(x)] ≥τ0 then µ −EP|χ[φ(x, ℓ)] ≤τ (and nothing is guaranteed when ED[χ(x)] < τ0). An active statistical learning algorithm can also ask target-independent queries with tolerance τ which are just queries over unlabeled samples. That is for a query ϕ : X →[−1, 1] the algorithm obtains a value µ, such that |µ −ED[ϕ(x)]| ≤τ. Such queries are not necessary when D is known to the learner. Also for the purposes of obtaining noise tolerant algorithms one can relax the requirements of model and give the learning algorithm access to unlabelled samples. Our definition generalizes the statistical query framework of Kearns [30] which does not include filtering function, in other words a query is just a function φ : X × {−1, 1} →[−1, 1] and it has a single tolerance parameter τ. By definition, an active SQ (χ, φ) with tolerance τ relative to P is the same as a passive statistical query φ with tolerance τ relative to the distribution P|χ. In particular, a (passive) SQ is equivalent to an active SQ with filter χ ≡1 and filter tolerance 1. We note that from the definition of active SQ we can see that EP|χ[φ(x, ℓ)] = EP [φ(x, ℓ) · χ(x)]/EP [χ(x)]. This implies that an active statistical query can be estimated using two passive statistical queries. However to estimate EP|χ[φ(x, ℓ)] with tolerance τ one needs to estimate EP [φ(x, ℓ) · χ(x)] with tolerance τ · EP [χ(x)] which can be much lower than τ. Tolerance of a SQ directly corresponds to the number of examples needed to evaluate it and therefore simulating active SQs passively might require many more labeled examples. 2.1 Simulating Active Statistical Queries We first note that a valid response to a target-independent query with tolerance τ can be obtained, with probability at least 1 −δ, using O(τ −2 log (1/δ)) unlabeled samples. A natural way of simulating an active SQ is by filtering points drawn randomly from D: draw a random point x, let B be drawn from Bernoulli distribution with probability of success χ(x); ask for the label of x when B = 1. The points for which we ask for a label are distributed according to D|χ. This implies that the empirical average of φ(x, ℓ) on O(τ −2 log (1/δ)) labeled examples will then give µ. Formally we get the following theorem. Theorem 2.1. Let P = (D, ψ) be a distribution over X × {−1, 1}. There exists an active sampling algorithm that given functions χ : X →[0, 1], φ : X × {−1, 1} →[−1, 1], values τ0 > 0, τ > 0, δ > 0, and access to samples from P, with probability at least 1 −δ, outputs a valid response to active statistical query (χ, φ) with tolerance parameters (τ0, τ). The algorithm uses O(τ −2 log (1/δ)) labeled examples from P and O(τ −1 0 τ −2 log (1/δ)) unlabeled samples from D. 4 A direct way to simulate all the queries of an active SQ algorithm is to estimate the response to each query using fresh samples and use the union bound to ensure that, with probability at least 1 −δ, all queries are answered correctly. Such direct simulation of an algorithm that uses at most q queries can be done using O(qτ −2 log(q/δ)) labeled examples and O(qτ −1 0 τ −2 log (q/δ)) unlabeled samples. However in many cases a more careful analysis can be used to reduce the sample complexity of simulation. Labeled examples can be shared to simulate queries that use the same filter χ and do not depend on each other. This implies that the sample size sufficient for simulating q non-adaptive queries with the same filter scales logarithmically with q. More generally, given a set of q query functions (possibly chosen adaptively) which belong to some set Q of low complexity (such as VC dimension) one can reduce the sample complexity of estimating the answers to all q queries (with the same filter) by invoking the standard bounds based on uniform convergence (e.g. [14]). 2.2 Noise tolerance An important property of the simulation described in Theorem 2.1 is that it can be easily adapted to the case when the labels are corrupted by random classification noise [1]. For a distribution P = (D, ψ) let P η denote the distribution P with the label flipped with probability η randomly and independently of an example. It is easy to see that P η = (D, (1 −2η)ψ). We now show that, as in the SQ model [30], active statistical queries can be simulated given examples from P η. Theorem 2.2. Let P = (D, ψ) be a distribution over examples and let η ∈[0, 1/2) be a noise rate. There exists an active sampling algorithm that given functions χ : X →[0, 1], φ : X × {−1, 1} →[−1, 1], values η, τ0 > 0, τ > 0, δ > 0, and access to samples from P η, with probability at least 1 −δ, outputs a valid response to active statistical query (χ, φ) with tolerance parameters (τ0, τ). The algorithm uses O(τ −2(1−2η)−2 log (1/δ)) labeled examples from P η and O(τ −1 0 τ −2(1 −2η)−2 log (1/δ)) unlabeled samples from D. Note that the sample complexity of the resulting active sampling algorithm has informationtheoretically optimal quadratic dependence on 1/(1 −2η), where η is the noise rate. Remark 2.3. This simulation assumes that η is given to the algorithm exactly. It is easy to see from the proof, that any value η′ such that 1−2η 1−2η′ ∈[1 −τ/4, 1 + τ/4] can be used in place of η (with the tolerance of estimating EP η |χ[ 1 2(φ(x, 1) −φ(x, −1)) · ℓ] set to (1 −2η)τ/4). In some learning scenarios even an approximate value of η is not known but it is known that η ≤η0 < 1/2. To address this issue one can construct a sequence η1, . . . , ηk of guesses of η, run the learning algorithm with each of those guesses in place of the true η and let h1, . . . , hk be the resulting hypotheses [30]. One can then return the hypothesis hi among those that has the best agreement with a suitably large sample. It is not hard to see that k = O(τ −1 ·log(1/(1−2η0))) guesses will suffice for this strategy to work [2]. Passive hypothesis testing requires Ω(1/ϵ) labeled examples and might be too expensive to be used with active learning algorithms. It is unclear if there exists a general approach for dealing with unknown η in the active learning setting that does not increase substantially the labelled example complexity. However, as we will demonstrate, in the context of specific active learning algorithms variants of this approach can be used to solve the problem. We now show that more general types of noise can be tolerated as long as they are “uncorrelated” with the queries and the target function. Namely, we represent label noise using a function Λ : X → [0, 1], where Λ(x) gives the probability that the label of x is flipped. The rate of Λ when learning with respect to marginal distribution D over X is ED[Λ(x)]. For a distribution P = (D, ψ) over examples, we denote by P Λ the distribution P corrupted by label noise Λ. It is easy to see that P Λ = (D, ψ · (1 −2Λ)). Intuitively, Λ is “uncorrelated” with a query if the way that Λ deviates from its rate is almost orthogonal to the query on the target distribution. Definition 2.4. Let P = (D, ψ) be a distribution over examples and τ ′ > 0. For functions χ : X →[0, 1], φ : X × {−1, 1} →[−1, 1], we say that a noise function Λ : X →[0, 1] is (η, τ ′)uncorrelated with φ and χ over P if, ED|χ φ(x, 1) −φ(x, −1) 2 ψ(x) · (1 −2(Λ(x) −η))  ≤τ ′ . 5 In this definition (1−2(Λ(x)−η)) is the expectation of {−1, 1} coin that is flipped with probability Λ(x)−η, whereas (φ(x, 1)−φ(x, −1))ψ(x) is the part of the query which measures the correlation with the label. We now give an analogue of Theorem 2.2 for this more general setting. Theorem 2.5. Let P = (D, ψ) be a distribution over examples, χ : X →[0, 1], φ : X ×{−1, 1} → [−1, 1] be a query and a filter functions, η ∈[0, 1/2), τ > 0 and Λ be a noise function that is (η, (1 −2η)τ/4)-uncorrelated with φ and χ over P. There exists an active sampling algorithm that given functions χ and φ, values η, τ0 > 0, τ > 0, δ > 0, and access to samples from P Λ, with probability at least 1 −δ, outputs a valid response to active statistical query (χ, φ) with tolerance parameters (τ0, τ). The algorithm uses O(τ −2(1−2η)−2 log (1/δ)) labeled examples from P Λ and O(τ −1 0 τ −2(1 −2η)−2 log (1/δ)) unlabeled samples from D. An immediate implication of Theorem 2.5 is that one can simulate an active SQ algorithm A using examples corrupted by noise Λ as long as Λ is (η, (1 −2η)τ/4)-uncorrelated with all A’s queries of tolerance τ for some fixed η. 2.3 Simple examples Thresholds: We show that a classic example of active learning a threshold function on an interval can be easily expressed using active SQs. For simplicity and without loss of generality we can assume that the interval is [0, 1] and the distribution is uniform over it (as usual, we can bring the distribution to be close enough to this form using unlabeled samples or target-independent queries). Assume that we know that the threshold θ belongs to the interval [a, b] ⊆[0, 1]. We ask a query φ(x, ℓ) = (ℓ+1)/2 with filter χ(x) which is the indicator function of the interval [a, b] with tolerance 1/4 and filter tolerance b −a. Let v be the response to the query. By definition, E[χ(x)] = b −a and therefore we have that |v −E[φ(x, ℓ) | x ∈[a, b]]| ≤1/4. Note that, E[φ(x, ℓ) | x ∈[a, b]] = (b −θ)/(b −a) . We can therefore conclude that (b −θ)/(b −a) ∈[v −1/4, v + 1/4] which means that θ ∈ [b −(v + 1/4)(b −a), b −(v −1/4)(b −a)] ∩[a, b]. Note that the length of this interval is at most (b −a)/2. This means that after at most log2(1/ϵ) + 1 iterations we will reach an interval [a, b] of length at most ϵ. In each iteration only constant 1/4 tolerance is necessary and filter tolerance is never below ϵ. A direct simulation of this algorithm can be done using log(1/ϵ) · log(log(1/ϵ)/δ) labeled examples and ˜O(1/ϵ) · log(1/δ) unlabeled samples. Learning of thresholds can also be easily used to obtain a simple algorithm for learning axis-aligned rectangles whose weight under the target distribution is not too small. A2 : We now note that the general and well-studied A2 algorithm of [4] falls naturally into our framework. At a high level, the A2 algorithm is an iterative, disagreement-based active learning algorithm. It maintains a set of surviving classifiers Ci ⊆C, and in each round the algorithm asks for the labels of a few random points that fall in the current region of disagreement of the surviving classifiers. Formally, the region of disagreement DIS(Ci) of a set of classifiers Ci is the of set of instances x such that for each x ∈DIS(Ci) there exist two classifiers f, g ∈Ci that disagree about the label of x. Based on the queried labels, the algorithm then eliminates hypotheses that were still under consideration, but only if it is statistically confident (given the labels queried in the last round) that they are suboptimal. In essence, in each round A2 only needs to estimate the error rates (of hypotheses still under consideration) under the conditional distribution of being in the region of disagreement. This can be easily done via active statistical queries. Note that while the number of active statistical queries needed to do this could be large, the number of labeled examples needed to simulate these queries is essentially the same as the number of labeled examples needed by the known A2 analyses [29]. While in general the required computation of the disagreement region and manipulations of the hypothesis space cannot be done efficiently, efficient implementation is possible in a number of simple cases such as when the VC dimension of the concept class is a constant. It is not hard to see that in these cases the implementation can also be done using a statistical algorithm. 6 3 Learning of halfspaces In this section we outline our reduction from active learning to passive learning of homogeneous linear separators based on the analysis of Balcan and Long [8]. Combining it with the SQ learning algorithm for halfspaces by Dunagan and Vempala [24], we obtain the first efficient noise-tolerant active learning of homogeneous halfspaces for any isotropic log-concave distribution. One of the key point of this result is that it is relatively easy to harness the involved results developed for SQ framework to obtain new active statistical algorithms. Let Hd denote the concept class of all homogeneous halfspaces. Recall that a distribution over Rd is log-concave if log f(·) is concave, where f is its associated density function. It is isotropic if its mean is the origin and its covariance matrix is the identity. Log-concave distributions form a broad class of distributions: for example, the Gaussian, Logistic, Exponential, and uniform distribution over any convex set are log-concave distributions. Using results in [24] and properties of log-concave distributions, we can show: Theorem 3.1. There exists a SQ algorithm LearnHS that learns Hd to accuracy 1 −ϵ over any distribution D|χ, where D is an isotropic log-concave distribution and χ : Rd →[0, 1] is a filter function. Further LearnHS outputs a homogeneous halfspace, runs in time polynomial in d,1/ϵ and log(1/λ) and uses SQs of tolerance ≥1/poly(d, 1/ϵ, log(1/λ)), where λ = ED[χ(x)]. We now state the properties of our new algorithm formally. Theorem 3.2. There exists an active SQ algorithm ActiveLearnHS-LogC (Algorithm 1) that for any isotropic log-concave distribution D on Rd, learns Hd over D to accuracy 1 −ϵ in time poly(d, log(1/ϵ)) and using active SQs of tolerance ≥1/poly(d, log(1/ϵ)) and filter tolerance Ω(ϵ). Algorithm 1 ActiveLearnHS-LogC: Active SQ learning of homogeneous halfspaces over isotropic log-concave densities 1: %% Constants c, C1, C2 and C3 are determined by the analysis. 2: Run LearnHS with error C2 to obtain w0. 3: for k = 1 to s = ⌈log2(1/(cϵ))⌉do 4: Let bk−1 = C1/2k−1 5: Let µk equal the indicator function of being within margin bk−1 of wk−1 6: Let χk = (P i≤k µi)/k 7: Run LearnHS over Dk = D|χk with error C2/k by using active queries with filter χk and filter tolerance C3ϵ to obtain wk 8: end for 9: return ws We remark that, as usual, we can first bring the distribution to an isotropic position by using target independent queries to estimate the mean and the covariance matrix of the distribution. Therefore our algorithm can be used to learn halfspaces over general log-concave densities as long as the target halfspace passes through the mean of the density. We can now apply Theorem 2.2 (or more generally Theorem 2.5) to obtain an efficient active learning algorithm for homogeneous halfspaces over log-concave densities in the presence of random classification noise of known rate. Further since our algorithm relies on LearnHS which can also be simulated when the noise rate is unknown (see Remark 2.3) we obtain an active algorithm which does not require the knowledge of the noise rate. Corollary 3.3. There exists a polynomial-time active learning algorithm that for any η ∈[0, 1/2), learns Hd over any log-concave distributions with random classification noise of rate η to error ϵ using poly(d, log(1/ϵ), 1/(1 −2η)) labeled examples and a polynomial number of unlabeled samples. For the special case of the uniform distribution on the unit sphere (or, equivalently for our purposes, unit ball) we give a substantially simpler and more efficient algorithm in terms of both sample and computational complexity. This setting was previously studied in [3, 22]. The detailed presentation of the technical ideas appears in the full version of the paper [5]. 7 Theorem 3.4. There exists an active SQ algorithm ActiveLearnHS-U that learns Hd over the uniform distribution on the (d −1)-dimensional unit sphere to accuracy 1 −ϵ, uses (d + 1) log(1/ϵ) active SQs with tolerance of Ω(1/ √ d) and filter tolerance of Ω(1/ϵ) and runs in time d · poly(log (d/ϵ)). 4 Differentially-private active learning In this section we show that active SQ learning algorithms can also be used to obtain differentially private active learning algorithms. Formally, for some domain X × Y , we will call S ⊆X × Y a database. Databases S, S′ ⊂X×Y are adjacent if one can be obtained from the other by modifying a single element. Here we will always have Y = {−1, 1}. In the following, A is an algorithm that takes as input a database D and outputs an element of some finite set R. Definition 4.1 (Differential privacy [25]). A (randomized) algorithm A : 2X×Y →R is αdifferentially private if for all r ∈R and every pair of adjacent databases S, S′, we have Pr[A(S) = r] ≤eϵ Pr[A(S′) = r]. Here we consider algorithms that operate on S in an active way. That is the learning algorithm receives the unlabeled part of each point in S as an input and can only obtain the label of a point upon request. The total number of requests is the label complexity of the algorithm. Theorem 4.2. Let A be an algorithm that learns a class of functions H to accuracy 1 −ϵ over distribution D using M1 active SQs of tolerance τ and filter tolerance τ0 and M2 target-independent queries of tolerance τu. There exists a learning algorithm A′ that given α > 0, δ > 0 and active access to database S ⊆X × {−1, 1} is α-differentially private and uses at most O([ M1 ατ + M1 τ 2 ] log(M1/δ)) labels. Further, for some n = O([ M1 ατ0τ + M1 τ0τ 2 + M2 ατu + M2 τ 2 u ] log((M1 + M2)/δ)), if S consists of at least n examples drawn randomly from D then with, probability at least 1 −δ, A′ outputs a hypothesis with accuracy ≥1 −ϵ (relative to distribution D). The running time of A′ is the same as the running time of A plus O(n). An immediate consequence of Theorem 4.2 is that for learning of homogeneous halfspaces over uniform or log-concave distributions we can obtain differential privacy while essentially preserving the label complexity. For example, by combining Theorems 4.2 and 3.4, we can efficiently and differentially-privately learn homogeneous halfspaces under the uniform distribution with privacy parameter α and error parameter ϵ by using only O(d √ d log(1/ϵ))/α + d2 log(1/ϵ)) labels. However, it is known that any passive learning algorithm, even ignoring privacy considerations and noise requires Ω d ϵ + 1 ϵ log 1 δ  labeled examples. So for α ≥1/ √ d and small enough ϵ we get better label complexity. 5 Discussion Our work suggests that, as in passive learning, active statistical algorithms might be essentially as powerful as example-based efficient active learning algorithms. It would be interesting to find more general evidence supporting this claim or, alternatively, a counterexample. A nice aspect of (passive) statistical learning algorithms is that it is possible to prove unconditional lower bounds on such algorithms using SQ dimension [13] and its extensions. It would be interesting to develop an active analogue of these techniques and give meaningful lower bounds based on them. Acknowledgments We thank Avrim Blum and Santosh Vempala for useful discussions. This work was supported in part by NSF grants CCF-0953192 and CCF-1101215, AFOSR grant FA9550-091-0538, ONR grant N00014-09-1-0751, and a Microsoft Research Faculty Fellowship. References [1] D. Angluin and P. Laird. Learning from noisy examples. Machine Learning, 2:343–370, 1988. [2] J. Aslam and S. Decatur. Specification and simulation of statistical query algorithms for efficiency and noise tolerance. JCSS, 56:191–208, 1998. [3] M. Balcan, A. Broder, and T. Zhang. Margin based active learning. In COLT, pages 35–50, 2007. 8 [4] M. F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. In ICML, 2006. [5] M. F. Balcan and V. Feldman. Statistical active learning algorithms, 2013. ArXiv:1307.3102. [6] M.-F. Balcan and S. Hanneke. Robust interactive learning. In COLT, 2012. [7] M.-F. Balcan, S. Hanneke, and J. Wortman. The true sample complexity of active learning. In COLT, 2008. [8] M.-F. Balcan and P. M. Long. Active and passive learning of linear separators under log-concave distributions. JMLR - COLT proceedings (to appear), 2013. [9] A. Beygelzimer, S. Dasgupta, and J. Langford. Importance weighted active learning. In ICML, pages 49–56, 2009. [10] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Agnostic active learning without constraints. In NIPS, 2010. [11] A. Blum, C. Dwork, F. McSherry, and K. Nissim. Practical privacy: the SuLQ framework. In Proceedings of PODS, pages 128–138, 2005. [12] A. Blum, A. Frieze, R. Kannan, and S. Vempala. A polynomial time algorithm for learning noisy linear threshold functions. Algorithmica, 22(1/2):35–52, 1997. [13] A. Blum, M. Furst, J. Jackson, M. Kearns, Y. Mansour, and S. Rudich. Weakly learning DNF and characterizing statistical query learning using Fourier analysis. In STOC, pages 253–262, 1994. [14] A. Blumer, A. Ehrenfeucht, D. Haussler, and M. Warmuth. Learnability and the Vapnik-Chervonenkis dimension. Journal of the ACM, 36(4):929–965, 1989. [15] R. Castro and R. Nowak. Minimax bounds for active learning. In COLT, 2007. [16] N. Cesa-Bianchi, C. Gentile, and L. Zaniboni. Learning noisy linear classifiers via adaptive and selective sampling. Machine Learning, 2010. [17] C. Chu, S. Kim, Y. Lin, Y. Yu, G. Bradski, A. Ng, and K. Olukotun. Map-reduce for machine learning on multicore. In Proceedings of NIPS, pages 281–288, 2006. [18] S. Dasgupta. Coarse sample complexity bounds for active learning. In NIPS, volume 18, 2005. [19] S. Dasgupta. Active learning. Encyclopedia of Machine Learning, 2011. [20] S. Dasgupta and D. Hsu. Hierarchical sampling for active learning. In ICML, pages 208–215, 2008. [21] S. Dasgupta, D.J. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. NIPS, 20, 2007. [22] S. Dasgupta, A. Tauman Kalai, and C. Monteleoni. Analysis of perceptron-based active learning. Journal of Machine Learning Research, 10:281–299, 2009. [23] O. Dekel, C. Gentile, and K. Sridharan. Selective sampling and active learning from single and multiple teachers. JMLR, 2012. [24] J. Dunagan and S. Vempala. A simple polynomial-time rescaling algorithm for solving linear programs. In STOC, pages 315–320, 2004. [25] C. Dwork, F. McSherry, K. Nissim, and A. Smith. Calibrating noise to sensitivity in private data analysis. In TCC, pages 265–284, 2006. [26] V. Feldman. A complete characterization of statistical query learning with applications to evolvability. Journal of Computer System Sciences, 78(5):1444–1459, 2012. [27] Y. Freund, H.S. Seung, E. Shamir, and N. Tishby. Selective sampling using the query by committee algorithm. Machine Learning, 28(2-3):133–168, 1997. [28] A. Gonen, S. Sabato, and S. Shalev-Shwartz. Efficient pool-based active learning of halfspaces. In ICML, 2013. [29] S. Hanneke. A bound on the label complexity of agnostic active learning. In ICML, 2007. [30] M. Kearns. Efficient noise-tolerant learning from statistical queries. JACM, 45(6):983–1006, 1998. [31] V. Koltchinskii. Rademacher complexities and bounding the excess risk in active learning. JMLR, 11:2457–2485, 2010. [32] L. Lov´asz and S. Vempala. The geometry of logconcave functions and sampling algorithms. Random Struct. Algorithms, 30(3):307–358, 2007. [33] A. McCallum and K. Nigam. Employing EM in pool-based active learning for text classification. In ICML, pages 350–358, 1998. [34] M. Raginsky and A. Rakhlin. Lower bounds for passive and active learning. In NIPS, pages 1026–1034, 2011. [35] L. G. Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. 9
2013
181
4,911
The Power of Asymmetry in Binary Hashing Behnam Neyshabur Payman Yadollahpour Yury Makarychev Toyota Technological Institute at Chicago [btavakoli,pyadolla,yury]@ttic.edu Ruslan Salakhutdinov Departments of Statistics and Computer Science University of Toronto rsalakhu@cs.toronto.edu Nathan Srebro Toyota Technological Institute at Chicago and Technion, Haifa, Israel nati@ttic.edu Abstract When approximating binary similarity using the hamming distance between short binary hashes, we show that even if the similarity is symmetric, we can have shorter and more accurate hashes by using two distinct code maps. I.e. by approximating the similarity between x and x′ as the hamming distance between f(x) and g(x′), for two distinct binary codes f, g, rather than as the hamming distance between f(x) and f(x′). 1 Introduction Encoding high-dimensional objects using short binary hashes can be useful for fast approximate similarity computations and nearest neighbor searches. Calculating the hamming distance between two short binary strings is an extremely cheap computational operation, and the communication cost of sending such hash strings for lookup on a server (e.g. sending hashes of all features or patches in an image taken on a mobile device) is low. Furthermore, it is also possible to quickly look up nearby hash strings in populated hash tables. Indeed, it only takes a fraction of a second to retrieve a shortlist of similar items from a corpus containing billions of data points, which is important in image, video, audio, and document retrieval tasks [11, 9, 10, 13]. Moreover, compact binary codes are remarkably storage efficient, and allow one to store massive datasets in memory. It is therefore desirable to find short binary hashes that correspond well to some target notion of similarity. Pioneering work on Locality Sensitive Hashing used random linear thresholds for obtaining bits of the hash [1]. Later work suggested learning hash functions attuned to the distribution of the data [15, 11, 5, 7, 3]. More recent work focuses on learning hash functions so as to optimize agreement with the target similarity measure on specific datasets [14, 8, 9, 6] . It is important to obtain accurate and short hashes—the computational and communication costs scale linearly with the length of the hash, and more importantly, the memory cost of the hash table can scale exponentially with the length. In all the above-mentioned approaches, similarity S(x, x′) between two objects is approximated by the hamming distance between the outputs of the same hash function, i.e. between f(x) and f(x′), for some f ∈{±1}k. The emphasis here is that the same hash function is applied to both x and x′ (in methods like LSH multiple hashes might be used to boost accuracy, but the comparison is still between outputs of the same function). The only exception we are aware of is where a single mapping of objects to fractional vectors ˜f(x) ∈[−1, 1]k is used, its thresholding f(x) = sign ˜f(x) ∈{±1}k is used in the database, and similarity between x and x′ is approximated using D f(x), ˜f(x′) E . This has become known as “asymmetric hashing” [2, 4], but even with such a-symmetry, both mappings are based on the 1 same fractional mapping ˜f(·). That is, the asymmetry is in that one side of the comparison gets thresholded while the other is fractional, but not in the actual mapping. In this paper, we propose using two distinct mappings f(x), g(x) ∈{±1}k and approximating the similarity S(x, x′) by the hamming distance between f(x) and g(x′). We refer to such hashing schemes as “asymmetric”. Our main result is that even if the target similarity function is symmetric and “well behaved” (e.g., even if it is based on Euclidean distances between objects), using asymmetric binary hashes can be much more powerful, and allow better approximation of the target similarity with shorter code lengths. In particular, we show extreme examples of collections of points in Euclidean space, where the neighborhood similarity S(x, x′) can be realized using an asymmetric binary hash (based on a pair of distinct functions) of length O(r) bits, but where a symmetric hash (based on a single function) would require at least Ω(2r) bits. Although actual data is not as extreme, our experimental results on real data sets demonstrate significant benefits from using asymmetric binary hashes. Asymmetric hashes can be used in almost all places where symmetric hashes are typically used, usually without any additional storage or computational cost. Consider the typical application of storing hash vectors for all objects in a database, and then calculating similarities to queries by computing the hash of the query and its hamming distance to the stored database hashes. Using an asymmetric hash means using different hash functions for the database and for the query. This neither increases the size of the database representation, nor the computational or communication cost of populating the database or performing a query, as the exact same operations are required. In fact, when hashing the entire database, asymmetric hashes provide even more opportunity for improvement. We argue that using two different hash functions to encode database objects and queries allows for much more flexibility in choosing the database hash. Unlike the query hash, which has to be stored compactly and efficiently evaluated on queries as they appear, if the database is fixed, an arbitrary mapping of database objects to bit strings may be used. We demonstrate that this can indeed increase similarity accuracy while reducing the bit length required. 2 Minimum Code Lengths and the Power of Asymmetry Let S : X × X →{±1} be a binary similarity function over a set of objects X, where we can interpret S(x, x′) to mean that x and x′ are “similar” or “dissimilar”, or to indicate whether they are “neighbors”. A symmetric binary coding of X is a mapping f : X →{±1}k, where k is the bitlength of the code. We are interested in constructing codes such that the hamming distance between f(x) and f(x′) corresponds to the similarity S(x, x′). That is, for some threshold θ ∈R, S(x, x′) ≈ sign(⟨f(x), f(x′)⟩−θ). Although discussing the hamming distance, it is more convenient for us to work with the inner product ⟨u, v⟩, which is equivalent to the hamming distance dh(u, v) since ⟨u, v⟩= (k −2dh(u, v)) for u, v ∈{±1}k. In this section, we will consider the problem of capturing a given similarity using an arbitrary binary code. That is, we are given the entire similarity mapping S, e.g. as a matrix S ∈{±1}n×n over a finite domain X = {x1, . . . , xn} of n objects, with Sij = S(xi, xj). We ask for an encoding ui = f(xi) ∈{±1}k of each object xi ∈X, and a threshold θ, such that Sij = sign(⟨ui, uj⟩−θ), or at least such that equality holds for as many pairs (i, j) as possible. It is important to emphasize that the goal here is purely to approximate the given matrix S using a short binary code—there is no out-of-sample generalization (yet). We now ask: Can allowing an asymmetric coding enable approximating a symmetric similarity matrix S with a shorter code length? Denoting U ∈{±1}n×k for the matrix whose columns contain the codewords ui, the minimal binary code length that allows exactly representing S is then given by the following matrix factorization problem: ks(S) = min k,U,θ k s.t U ∈{±1}k×n θ ∈R Y ≜U ⊤U −θ1n ∀ij SijYij > 0 (1) where 1n is an n × n matrix of ones. 2 We begin demonstrating the power of asymmetry by considering an asymmetric variant of the above problem. That is, even if S is symmetric, we allow associating with each object xi two distinct binary codewords, ui ∈{±1}k and vi ∈{±1}k (we can think of this as having two arbitrary mappings ui = f(xi) and vi = g(xi)), such that Sij = sign(⟨ui, vj⟩−θ). The minimal asymmetric binary code length is then given by: ka(S) = min k,U,V,θ k s.t U, V ∈{±1}k×n θ ∈R Y ≜U ⊤V −θ1n ∀ij SijYij > 0 (2) Writing the binary coding problems as matrix factorization problems is useful for understanding the power we can get by asymmetry: even if S is symmetric, and even if we seek a symmetric Y , insisting on writing Y as a square of a binary matrix might be a tough constraint. This is captured in the following Theorem, which establishes that there could be an exponential gap between the minimal asymmetry binary code length and the minimal symmetric code length, even if the matrix S is symmetric and very well behaved: Theorem 1. For any r, there exists a set of n = 2r points in Euclidean space, with similarity matrix Sij = 1 if ∥xi −xj∥≤1 −1 if ∥xi −xj∥> 1, such that ka(S) ≤2r but ks(S) ≥2r/2 Proof. Let I1 = {1, . . . , n/2} and I2 = {n/2 + 1, . . . , n}. Consider the matrix G defined by Gii = 1/2, Gij = −1/(2n) if i, j ∈I1 or i, j ∈I2, and Gij = 1/(2n) otherwise. Matrix G is diagonally dominant. By the Gershgorin circle theorem, G is positive definite. Therefore, there exist vectors x1, . . . , xn such that ⟨xi, xj⟩= Gij (for every i and j). Define Sij = 1 if ∥xi −xj∥≤1 −1 if ∥xi −xj∥> 1 . Note that if i = j then Sij = 1; if i ̸= j and (i, j) ∈I1 × I1 ∪I2 × I2 then ∥xi −xj∥2 = Gii+Gjj−2Gij = 1+1/n > 1 and therefore Sij = −1. Finally, if i ̸= j and (i, j) ∈I1×I2∪I2×I1 then ∥xi −xj∥2 = Gii + Gjj −2Gij = 1 + 1/n < 1 and therefore Sij = 1. We show that ka(S) ≤2r. Let B be an r × n matrix whose column vectors are the vertices of the cube {±1}r (in any order); let C be an r × n matrix defined by Cij = 1 if j ∈I1 and Cij = −1 if j ∈I2. Let U =  B C  and V =  B −C  . For Y = U ⊤V −θ1n where threshold θ = −1 , we have that Yij ≥1 if Sij = 1 and Yij ≤−1 if Sij = −1. Therefore, ka(S) ≤2r. Now we show that ks = ks(S) ≥n/2. Consider Y , U and θ as in (1). Let Y ′ = (U ⊤U). Note that Y ′ ij ∈[−ks, ks] and thus θ ∈[−ks + 1, ks −1]. Let q = [1, . . . , 1, −1, . . . , −1]⊤(n/2 ones followed by n/2 minus ones). We have, 0 ≤q⊤Y ′q = n X i=1 Y ′ ii + X i,j:Sij=−1 Y ′ ij − X i,j:Sij=1,i̸=j Y ′ ij ≤ n X i=1 ks + X i,j:Sij=−1 (θ −1) − X i,j:Sij=1,i̸=j (θ + 1) = nks + (0.5n2 −n)(θ −1) −0.5n2(θ + 1) = nks −n2 −n(θ −1) ≤2nks −n2. We conclude that ks ≥n/2. The construction of Theorem 1 shows that there exists data sets for which an asymmetric binary hash might be much shorter then a symmetric hash. This is an important observation as it demonstrates that asymmetric hashes could be much more powerful, and should prompt us to consider them instead of symmetric hashes. The precise construction of Theorem 1 is of course rather extreme (in fact, the most extreme construction possible) and we would not expect actual data sets to have this exact structure, but we will show later significant gaps also on real data sets. 3 0.7 0.75 0.8 0.85 0.9 0.95 0 5 10 15 20 25 30 35 Average Precision bits Symmetric Asymmetric 0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0 10 20 30 40 50 60 70 Average Precision bits Symmetric Asymmetric 10-D Uniform LabelMe Figure 1: Number of bits required for approximating two similarity matrices (as a function of average precision). Left: uniform data in the 10-dimensional hypercube, similarity represents a thresholded Euclidean distance, set such that 30% of the similarities are positive. Right: Semantic similarity of a subset of LabelMe images, thresholded such that 5% of the similarities are positive. 3 Approximate Binary Codes As we turn to real data sets, we also need to depart from seeking a binary coding that exactly captures the similarity matrix. Rather, we are usually satisfied with merely approximating S, and for any fixed code length k seek the (symmetric or asymmetric) k-bit code that “best captures” the similarity matrix S. This is captured by the following optimization problem: min U,V,θ L(Y ; S) ≜β X i,j:Sij=1 ℓ(Yij) + (1 −β) X i,j:Sij=−1 ℓ(−Yij) s.t. U, V ∈{±1}k×n θ ∈R Y ≜U ⊤V −θ1n (3) where ℓ(z) = 1z≤0 is the zero-one-error and β is a parameter that allows us to weight positive and negative errors differently. Such weighting can compensate for Sij being imbalanced (typically many more pairs of points are non-similar rather then similar), and allows us to obtain different balances between precision and recall. The optimization problem (3) is a discrete, discontinuous and highly non-convex problem. In our experiments, we replace the zero-one loss ℓ(·) with a continuous loss and perform local search by greedily updating single bits so as to improve this objective. Although the resulting objective (let alone the discrete optimization problem) is still not convex even if ℓ(z) is convex, we found it beneficial to use a loss function that is not flat on z < 0, so as to encourage moving towards the correct sign. In our experiments, we used the square root of the logistic loss, ℓ(z) = log1/2(1+e−z). Before moving on to out-of-sample generalizations, we briefly report on the number of bits needed empirically to find good approximations of actual similarity matrices with symmetric and asymmetric codes. We experimented with several data sets, attempting to fit them with both symmetric and asymmetric codes, and then calculating average precision by varying the threshold θ (while keeping U and V fixed). Results for two similarity matrices, one based on Euclidean distances between points uniformly distributed in a hypoercube, and the other based on semantic similarity between images, are shown in Figure 1. 4 Out of Sample Generalization: Learning a Mapping So far we focused on learning binary codes over a fixed set of objects by associating an arbitrary code word with each object and completely ignoring the input representation of the objects xi. We discussed only how well binary hashing can approximate the similarity, but did not consider generalizing to additional new objects. However, in most applications, we would like to be able to have such an out-of-sample generalization. That is, we would like to learn a mapping f : X → {±1}k over an infinite domain X using only a finite training set of objects, and then apply the mapping to obtain binary codes f(x) for future objects to be encountered, such that S(x, x′) ≈ sign(⟨f(x), f(x′)⟩−θ). Thus, the mapping f : X →{±1}k is usually limited to some constrained parametric class, both so we could represent and evaluate it efficiently on new objects, and to ensure good generalization. For example, when X = Rd, we can consider linear threshold mappings fW (x) = sign(Wx), where W ∈Rk×d and sign(·) operates elementwise, as in Minimal Loss Hashing [8]. Or, we could also consider more complex classes, such as multilayer networks [11, 9]. We already saw that asymmetric binary codes can allow for better approximations using shorter codes, so it is natural to seek asymmetric codes here as well. That is, instead of learning a single 4 parametric map f(x) we can learn a pair of maps f : X →{±1}k and g : X →{±1}k, both constrained to some parametric class, and a threshold θ, such that S(x, x′) ≈sign(⟨f(x), g(x′)⟩− θ). This has the potential of allowing for better approximating the similarity, and thus better overall accuracy with shorter codes (despite possibly slightly harder generalization due to the increase in the number of parameters). In fact, in a typical application where a database of objects is hashed for similarity search over future queries, asymmetry allows us to go even further. Consider the following setup: We are given n objects x1, . . . , xn ∈X from some infinite domain X and the similarities S(xi, xj) between these objects. Our goal is to hash these objects using short binary codes which would allow us to quickly compute approximate similarities between these objects (the “database”) and future objects x (the “query”). That is, we would like to generate and store compact binary codes for objects in a database. Then, given a new query object, we would like to efficiently compute a compact binary code for a given query and retrieve similar items in the database very fast by finding binary codes in the database that are within small hamming distance from the query binary code. Recall that it is important to ensure that the bit length of the hashes are small, as short codes allow for very fast hamming distance calculations and low communication costs if the codes need to be sent remotely. More importantly, if we would like to store the database in a hash table allowing immediate lookup, the size of the hash table is exponential in the code length. The symmetric binary hashing approach (e.g. [8]), would be to find a single parametric mapping f : X →{±1}k such that S(x, xi) ≈sign(⟨f(x), f(xi)⟩−θ) for future queries x and database objects xi, calculate f(xi) for all database objects xi, and store these hashes (perhaps in a hash table allowing for fast retrieval of codes within a short hamming distance). The asymmetric approach described above would be to find two parametric mappings f : X →{±1}k and g : X →{±1}k such that S(x, xi) ≈sign(⟨f(x), g(xi)⟩−θ), and then calculate and store g(xi). But if the database is fixed, we can go further. There is actually no need for g(·) to be in a constrained parametric class, as we do not need to generalize g(·) to future objects, nor do we have to efficiently calculate it on-the-fly nor communicate g(x) to the database. Hence, we can consider allowing the database hash function g(·) to be an arbitrary mapping. That is, we aim to find a simple parametric mapping f : X →{±1}k and n arbitrary codewords v1, . . . , vn ∈{±1}k for each x1, . . . , xn in the database, such that S(x, xi) ≈sign(⟨f(x), vi⟩−θ) for future queries x and for the objects xi, . . . , xn in the database. This form of asymmetry can allow us for greater approximation power, and thus better accuracy with shorter codes, at no additional computational or storage cost. In Section 6 we evaluate empirically both of the above asymmetric strategies and demonstrate their benefits. But before doing so, in the next Section, we discuss a local-search approach for finding the mappings f, g, or the mapping f and the codes v1, . . . , vn. 5 Optimization We focus on x ∈X ⊂Rd and linear threshold hash maps of the form f(x) = sign(Wx), where W ∈Rk×d. Given training points x1, . . . , xn, we consider the two models discussed above: LIN:LIN We learn two linear threshold functions f(x) = sign(Wqx) and g(x) = sign(Wdx). I.e. we need to find the parameters Wq, Wd ∈Rk×d. LIN:V We learn a single linear threshold function f(x) = sign(Wqx) and n codewords v1, . . . , vn ∈Rk. I.e. we need to find Wq ∈Rk×d, as well as V ∈Rk×n (where vi are the columns of V ). In either case we denote ui = f(xi), and in LIN:LIN also vi = g(xi), and learn by attempting to minimizing the objective in (3), where ℓ(·) is again a continuous loss function such as the square root of the logistic. That is, we learn by optimizing the problem (3) with the additional constraint U = sign(WqX), and possibly also V = sign(WdX) (for LIN:LIN), where X = [x1 . . . xn] ∈ Rd×n. We optimize these problems by alternatively updating rows of Wq and either rows of Wd (for LIN:LIN ) or of V (for LIN:V ). To understand these updates, let us first return to (3) (with un5 constrained U, V ), and consider updating a row u(t) ∈Rn of U. Denote Y (t) = U ⊤V −θ1n −u(t)⊤v(t), the prediction matrix with component t subtracted away. It is easy to verify that we can write: L(U ⊤V −θ1n; S) = C −u(t)Mv(t)⊤ (4) where C = 1 2(L(Y (t)+1n; S)+L(Y (t)−1n; S)) does not depend on u(t) and v(t), and M ∈Rn×n also does not depend on u(t), v(t) and is given by: Mij = βij 2  ℓ(Sij(Y (t) ij −1)) −ℓ(Sij(Y (t) ij + 1))  , with βij = β or βij = (1 −β) depending on Sij. This implies that we can optimize over the entire row u(t) concurrently by maximizing u(t)Mv(t)⊤, and so the optimum (conditioned on θ, V and all other rows of U) is given by u(t) = sign(Mv(t)). (5) Symmetrically, we can optimize over the row v(t) conditioned on θ, U and the rest of V , or in the case of LIN:V , conditioned on θ, Wq and the rest of V . Similarly, optimizing over a row w(t) of Wq amount to optimizing: arg max w(t)∈Rd sign(w(t)X)Mv(t)⊤= arg max w(t)∈Rd X i D Mi, v(t)E sign( D w(t), xi E ). (6) This is a weighted zero-one-loss binary classification problem, with targets sign( Mi, v(t) ) and weights Mi, v(t) . We approximate it as a weighted logistic regression problem, and at each update iteration attempt to improve the objective using a small number (e.g. 10) epochs of stochastic gradient descent on the logistic loss. For LIN:LIN , we also symmetrically update rows of Wd. When optimizing the model for some bit-length k, we initialize to the optimal k −1-length model. We initialize the new bit either randomly, or by thresholding the rank-one projection of M (for unconstrained U, V ) or the rank-one projection after projecting the columns of M (for LIN:V ) or both rows and columns of M (for LIN:LIN ) to the column space of X. We take the initialization (random, or rank-one based) that yields a lower objective value. 6 Empirical Evaluation In order to empirically evaluate the benefits of asymmetry in hashing, we replicate the experiments of [8], which were in turn based on [5], on six datasets using learned (symmetric) linear threshold codes. These datasets include: LabelMe and Peekaboom are collections of images, represented as 512D GIST features [13], Photo-tourism is a database of image patches, represented as 128 SIFT features [12], MNIST is a collection of 785D greyscale handwritten images, and Nursery contains 8D features. Similar to [8, 5], we also constructed a synthetic 10D Uniform dataset, containing uniformly sampled 4000 points for a 10D hypercube. We used 1000 points for training and 3000 for testing. For each dataset, we find the Euclidean distance at which each point has, on average, 50 neighbours. This defines our ground-truth similarity in terms of neighbours and non-neighbours. So for each dataset, we are given a set of n points x1, . . . , xn, represented as vectors in X = Rd, and the binary similarities S(xi, xj) between the points, with +1 corresponding to xi and xj being neighbors and -1 otherwise. Based on these n training points, [8] present a sophisticated optimization approach for learning a thresholded linear hash function of the form f(x) = sign(Wx), where W ∈Rk×d. This hash function is then applied and f(x1), . . . , f(xn) are stored in the database. [8] evaluate the quality of the hash by considering an independent set of test points and comparing S(x, xi) to sign(⟨f(x), f(xi)⟩−θ) on the test points x and the database objects (i.e. training points) xi. In our experiments, we followed the same protocol, but with the two asymmetric variations LIN:LIN and LIN:V, using the optimization method discussed in Sec. 5. In order to obtain different balances between precision and recall, we should vary β in (3), obtaining different codes for each value of 6 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0.2 0.4 0.6 0.8 1 Number of Bits Average Precision LIN:V LIN:LIN MLH KSH BRE LSH 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0.2 0.4 0.6 0.8 1 Number of Bits Average Precision LIN:V LIN:LIN MLH KSH BRE LSH 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0.2 0.4 0.6 0.8 1 Number of Bits Average Precision LIN:V LIN:LIN MLH KSH BRE LSH 10-D Uniform LabelMe MNIST 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0.2 0.4 0.6 0.8 1 Number of Bits Average Precision LIN:V LIN:LIN MLH KSH BRE LSH 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0.2 0.4 0.6 0.8 1 Number of Bits Average Precision LIN:V LIN:LIN MLH KSH BRE LSH 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 0.2 0.4 0.6 0.8 1 Number of Bits Average Precision LIN:V LIN:LIN MLH KSH BRE LSH Peekaboom Photo-tourism Nursery Figure 2: Average Precision (AP) of points retrieved using Hamming distance as a function of code length for six datasets. Five curves represent: LSH, BRE, KSH, MLH, and two variants of our method: Asymmetric LIN-LIN and Asymmetric LIN-V. (Best viewed in color.) 0.55 0.6 0.65 0.7 0.75 0.8 0 5 10 15 20 25 30 35 40 45 50 Average Precision Bits Required LIN:V LIN:LIN MLH KSH 0.55 0.6 0.65 0.7 0.75 0.8 0 5 10 15 20 25 30 35 40 45 50 Average Precision Bits Required LIN:V LIN:LIN MLH KSH 0.55 0.6 0.65 0.7 0.75 0.8 0 5 10 15 20 25 30 35 40 45 50 Average Precision Bits Required LIN:V LIN:LIN MLH KSH LabelMe MNIST Peekaboom Figure 3: Code length required as a function of Average Precision (AP) for three datasets. β. However, as in the experiments of [8], we actually learn a code (i.e. mappings f(·) and g(·), or a mapping f(·) and matrix V ) using a fixed value of β = 0.7, and then only vary the threshold θ to obtain the precision-recall curve. In all of our experiments, in addition to Minimal Loss Hashing (MLH), we also compare our approach to three other widely used methods: Kernel-Based Supervised Hashing (KSH) of [6], Binary Reconstructive Embedding (BRE) of [5], and Locality-Sensitive Hashing (LSH) of [1]. 1 In our first set of experiments, we test performance of the asymmetric hash codes as a function of the bit length. Figure 2 displays Average Precision (AP) of data points retrieved using Hamming distance as a function of code length. These results are similar to ones reported by [8], where MLH yields higher precision compared to BRE and LSH. Observe that for all six datasets both variants of our method, asymmetric LIN:LIN and asymmetric LIN:V , consistently outperform all other methods for different binary code length. The gap is particularly large for short codes. For example, for the LabelMe dataset, MLH and KSH with 16 bits achieve AP of 0.52 and 0.54 respectively, whereas LIN:V already achieves AP of 0.54 with only 8 bits. Figure 3 shows similar performance gains appear for a number of other datasets. We also note across all datasets LIN:V improves upon LIN:LIN for short-sized codes. These results clearly show that an asymmetric binary hash can be much more compact than a symmetric hash. 1We used the BRE, KSH and MLH implementations available from the original authors. For each method, we followed the instructions provided by the authors. More specifically, we set the number of points for each hash function in BRE to 50 and the number of anchors in KSH to 300 (the default values). For MLH, we learn the threshold and shrinkage parameters by cross-validation and other parameters are initialized to the suggested values in the package. 7 0.2 0.4 0.6 0.8 1 Recall Precision LIN:V LIN:LIN MLH KSH BRE LSH 0.2 0.4 0.6 0.8 1 Recall Precision LIN:V LIN:LIN MLH KSH BRE LSH 0.2 0.4 0.6 0.8 1 Recall Precision LIN:V LIN:LIN MLH KSH BRE LSH 0.2 0.4 0.6 0.8 1 Recall Precision LIN:V LIN:LIN MLH KSH BRE LSH 16 bits 64 bits 16 bits 64bits LabelMe MNIST Figure 4: Precision-Recall curves for LabelMe and MNIST datasets using 16 and 64 binary codes. (Best viewed in color.) 0.2 0.4 0.6 0.8 1 0.1 0.2 0.3 Recall Precision LIN:V MLH KSH 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 0.2 0.4 0.6 0.8 Number Retrieved Recall LIN:V MLH KSH Figure 5: Left: Precision-Recall curves for the Semantic 22K LabelMe dataset Right: Percentage of 50 ground-truth neighbours as a function of retrieved images. (Best viewed in color.) Next, we show, in Figure 4, the full Precision-Recall curves for two datasets, LabelMe and MNIST, and for two specific code lengths: 16 and 64 bits. The performance of LIN:LIN and LIN:V is almost uniformly superior to that of MLH, KSH and BRE methods. We observed similar behavior also for the four other datasets across various different code lengths. Results on previous 6 datasets show that asymmetric binary codes can significantly outperform other state-of-the-art methods on relatively small scale datasets. We now consider a much larger LabelMe dataset [13], called Semantic 22K LabelMe. It contains 20,019 training images and 2,000 test images, where each image is represented by a 512D GIST descriptor. The dataset also provides a semantic similarity S(x, x′) between two images based on semantic content (object labels overlap in two images). As argued by [8], hash functions learned using semantic labels should be more useful for content-based image retrieval compared to Euclidean distances. Figure 5 shows that LIN:V with 64 bits substantially outperforms MLH and KSH with 64 bits. 7 Summary The main point we would like to make is that when considering binary hashes in order to approximate similarity, even if the similarity measure is entirely symmetric and “well behaved”, much power can be gained by considering asymmetric codes. We substantiate this claim by both a theoretical analysis of the possible power of asymmetric codes, and by showing, in a fairly direct experimental replication, that asymmetric codes outperform state-of-the-art results obtained for symmetric codes. The optimization approach we use is very crude. However, even using this crude approach, we could find asymmetric codes that outperformed well-optimized symmetric codes. It should certainly be possible to develop much better, and more well-founded, training and optimization procedures. Although we demonstrated our results in a specific setting using linear threshold codes, we believe the power of asymmetry is far more widely applicable in binary hashing, and view the experiments here as merely a demonstration of this power. Using asymmetric codes instead of symmetric codes could be much more powerful, and allow for shorter and more accurate codes, and is usually straightforward and does not require any additional computational, communication or significant additional memory resources when using the code. We would therefore encourage the use of such asymmetric codes (with two distinct hash mappings) wherever binary hashing is used to approximate similarity. Acknowledgments This research was partially supported by NSF CAREER award CCF-1150062 and NSF grant IIS1302662. 8 References [1] M. Datar, N. Immorlica, P. Indyk, and V.S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the twentieth annual symposium on Computational geometry, pages 253–262. ACM, 2004. [2] W. Dong and M. Charikar. Asymmetric distance estimation with sketches for similarity search in high-dimensional spaces. SIGIR, 2008. [3] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval. TPAMI, 2012. [4] A. Gordo and F. Perronnin. Asymmetric distances for binary embeddings. CVPR, 2011. [5] B. Kulis and T. Darrell. Learning to hash with binary reconstructive embeddings. NIPS, 2009. [6] W. Liu, R. Ji J. Wang, Y.-G. Jiang, and S.-F. Chang. Supervised hashing with kernels. CVPR, 2012. [7] W. Liu, J. Wang, S. Kumar, and S.-F. Chang. Hashing with graphs. ICML, 2011. [8] M. Norouzi and D. J. Fleet. Minimal loss hashing for compact binary codes. ICML, 2011. [9] M. Norouzi, D. J. Fleet, and R. Salakhutdinov. Hamming distance metric learning. NIPS, 2012. [10] M. Raginsky and S. Lazebnik. Locality-sensitive binary codes from shift-invariant kernels. NIPS, 2009. [11] R. Salakhutdinov and G. Hinton. Semantic hashing. International Journal of Approximate Reasoning, 2009. [12] N. Snavely, S. M. Seitz, and R.Szeliski. Photo tourism: Exploring photo collections in 3d. In Proc. SIGGRAPH, 2006. [13] A. Torralba, R. Fergus, and Y. Weiss. Small codes and large image databases for recognition. CVPR, 2008. [14] J. Wang, S. Kumar, and S. Chang. Sequential projection learning for hashing with compact codes. ICML, 2010. [15] Y. Weiss, A. Torralba, and R. Fergus. Spectral hashing. NIPS, 2008. 9
2013
182
4,912
Bayesian Mixture Modeling and Inference based Thompson Sampling in Monte-Carlo Tree Search Aijun Bai Univ. of Sci. & Tech. of China baj@mail.ustc.edu.cn Feng Wu University of Southampton fw6e11@ecs.soton.ac.uk Xiaoping Chen Univ. of Sci. & Tech. of China xpchen@ustc.edu.cn Abstract Monte-Carlo tree search (MCTS) has been drawing great interest in recent years for planning and learning under uncertainty. One of the key challenges is the trade-off between exploration and exploitation. To address this, we present a novel approach for MCTS using Bayesian mixture modeling and inference based Thompson sampling and apply it to the problem of online planning in MDPs. Our algorithm, named Dirichlet-NormalGamma MCTS (DNG-MCTS), models the uncertainty of the accumulated reward for actions in the search tree as a mixture of Normal distributions. We perform inferences on the mixture in Bayesian settings by choosing conjugate priors in the form of combinations of Dirichlet and NormalGamma distributions and select the best action at each decision node using Thompson sampling. Experimental results confirm that our algorithm advances the state-of-the-art UCT approach with better values on several benchmark problems. 1 Introduction Markov decision processes (MDPs) provide a general framework for planning and learning under uncertainty. We consider the problem of online planning in MDPs without prior knowledge on the underlying transition probabilities. Monte-Carlo tree search (MCTS) can find near-optimal policies in our domains by combining tree search methods with sampling techniques. The key idea is to iteratively evaluate each state in a best-first search tree by the mean outcome of simulation samples. It is model-free and requires only a black-box simulator (generative model) of the underlying problems. To date, great success has been achieved by MCTS in variety of domains, such as game play [1, 2], planning under uncertainty [3, 4, 5], and Bayesian reinforcement learning [6, 7]. When applying MCTS, one of the fundamental challenges is the so-called exploration versus exploitation dilemma: an agent must not only exploit by selecting the best action based on the current information, but should also keep exploring other actions for possible higher future payoffs. Thompson sampling is one of the earliest heuristics to address this dilemma in multi-armed bandit problems (MABs) according to the principle of randomized probability matching [8]. The basic idea is to select actions stochastically, based on the probabilities of being optimal. It has recently been shown to perform very well in MABs both empirically [9] and theoretically [10]. It has been proved that Thompson sampling algorithm achieves logarithmic expected regret which is asymptotically optimal for MABs. Comparing to the UCB1 heuristic [3], the main advantage of Thompson sampling is that it allows more robust convergence under a wide range of problem settings. In this paper, we borrow the idea of Thompson sampling and propose the Dirichlet-NormalGamma MCTS (DNG-MCTS) algorithm — a novel Bayesian mixture modeling and inference based Thompson sampling approach for online planning in MDPs. In this algorithm, we use a mixture of Normal distributions to model the unknown distribution of the accumulated reward of performing a particular action in the MCTS search tree. In the present of online planning for MDPs, a conjugate prior 1 exists in the form of a combination of Dirichlet and NormalGamma distributions. By choosing the conjugate prior, it is then relatively simple to compute the posterior distribution after each accumulated reward is observed by simulation in the search tree. Thompson sampling is then used to select the action to be performed by simulation at each decision node. We have tested our DNG-MCTS algorithm and compared it with the popular UCT algorithm in several benchmark problems. Experimental results show that our proposed algorithm has outperformed the state-of-the-art for online planning in general MDPs. Furthermore, we show the convergence of our algorithm, confirming its technical soundness. The reminder of this paper is organized as follows. In Section 2, we briefly introduce the necessary background. Section 3 presents our main results — the DNG-MCTS algorithm. We show experimental results on several benchmark problems in Section 4. Finally in Section 5 the paper is concluded with a summary of our contributions and future work. 2 Background In this section, we briefly review the MDP model, the MAB problem, the MCTS framework, and the UCT algorithm as the basis of our algorithm. Some related work is also presented. 2.1 MDPs and MABs Formally, an MDP is defined as a tuple ⟨S, A, T, R⟩, where S is the state space, A is the action space, T(s′|s, a) is the probability of reaching state s′ if action a is applied in state s, and R(s, a) is the reward received by the agent. A policy is a decision rule mapping from states to actions and specifying which action should be taken in each state. The aim of solving an MDP is to find the optimal policy π that maximizes the expected reward defined as Vπ(s) = E[PH t=0 γtR(st, π(st))], where H is the planing horizon, γ ∈(0, 1] is the discount factor, st is the state in time step t and π(st) is the action selected by policy π in state st. Intuitively, an MAB can be seen as an MDP with only one state s and a stochastic reward function R(s, a) := Xa, where Xa is a random variable following an unknown distribution fXa(x). At each time step t, one action at must be chosen and executed. A stochastic reward Xat is then received accordingly. The goal is to find a sequence of actions that minimizes the cumulative regret defined as RT = E[PT t=1(Xa∗−Xat)], where a∗is the true best action. 2.2 MCTS and UCT To solve MDPs, MCTS iteratively evaluates a state by: (1) selecting an action based on a given action selection strategy; (2) performing the selected action by Monte-Carlo simulation; (3) recursively evaluating the resulted state if it is already in the search tree, or inserting it into the search tree and running a rollout policy by simulations. This process is applied to descend through the search tree until some terminate conditions are reached. The simulation result is then back-propagated through the selected nodes to update their statistics. The UCT algorithm is a popular approach based on MCTS for planning under uncertainty [3]. It treats each state of the search tree as an MAB, and selects the action that maximizes the UCB1 heuristic ¯Q(s, a) + c p log N(s)/N(s, a), where ¯Q(s, a) is the mean return of action a in state s from all previous simulations, N(s, a) is the visitation count of action a in state s, N(s) is the overall count N(s) = P a∈A N(s, a), and c is the exploration constant that determines the relative ratio of exploration to exploitation. It is proved that with an appropriate choice of c the probability of selecting the optimal action converges to 1 as the number of samples grows to infinity. 2.3 Related Work The fundamental assumption of our algorithm is modeling unknown distribution of the accumulated reward for each state-action pair in the search tree as a mixture of Normal distributions. A similar assumption has been made in [11], where they assumed a Normal distribution over the rewards. Comparing to their approach, as we will show in Section 3, our assumption on Normal mixture is more realistic for our problems. Tesauro et al.[12] developed a Bayesian UCT approach to MCTS 2 using Gaussian approximation. Specifically, their method propagates probability distributions of rewards from leaf nodes up to the root node by applying MAX (or MIN) extremum distribution operator for the interior nodes. Then, it uses modified UCB1 heuristics to select actions on the basis of the interior distributions. However, extremum distribution operation on decision nodes is very time-consuming because it must consider over all the child nodes. In contrast, we treat each decision node in the search tree as an MAB, maintain a posterior distribution over the accumulated reward for each applicable actions separately, and then select the best action using Thompson sampling. 3 The DNG-MCTS Algorithm This section presents our main results — a Bayesian mixture modeling and inference based Thompson sampling approach for MCTS (DNG-MCTS). 3.1 The Assumptions For a given MDP policy π, let Xs,π be a random variable that denotes the accumulated reward of following policy π starting from state s, and Xs,a,π denotes the accumulated reward of first performing action a in state s and then following policy π thereafter. Our assumptions are: (1) Xs,π is sampled from a Normal distribution, and (2) Xs,a,π can be modeled as a mixture of Normal distributions. These are realistic approximations for our problems with the following reasons. Given policy π, an MDP reduces to a Markov chain {st} with finite state space S and the transition function T(s′|s, π(s)). Suppose that the resulting chain {st} is ergodic. That is, it is possible to go from every state to every other state (not necessarily in one move). Let w denote the stationary distribution of {st}. According to the central limit theorem on Markov chains [13, 14], for any bounded function f on the state space S, we have: 1 √n( n X t=0 f(st) −nµ) →N(0, σ2) as n →∞, (1) where µ = Ew[f] and σ is a constant depending only on f and w. This indicates that the sum of f(st) follows N(nµ, nσ2) as n grows to infinity. It is then natural to approximate the distribution of Pn t=0 f(st) as a Normal distribution if n is sufficiently large. Considering finite-horizon MDPs with horizon H, if γ = 1, Xs0,π = PH t=0 R(st, π(st)) is a sum of f(st) = R(st, π(st)). Thus, Xs0,π is approximately normally distributed for each s0 ∈S if H is sufficiently large. On the other hand, if γ ̸= 1, Xs0,π = PH t=0 γtR(st, π(st)) can be rewritten as a linear combination of Pn t=0 f(st) for n = 0 to H as follow: Xs0,π = (1 −γ) H−1 X n=0 γn n X t=0 f(st) + γH H X t=0 f(st) (2) Notice that a linear combination of independent or correlated normally distributed random variables is still normally distributed. If H is sufficiently large and γ is close to 1, it is reasonable to approximate Xs0,π as a Normal distribution. Therefore, we assume that Xs,π is normally distributed in both cases. If the policy π is not fixed and may change over time (e.g., the derived policy of an online algorithm before it converges), the real distribution of Xs,π is actually unknown and could be very complex. However, if the algorithm is guaranteed to converge in the limit (as explained in Section 3.5, this holds for our DNG-MCTS algorithm), it is convenient and reasonable to approximate Xs,π as a Normal distribution. Now consider the accumulated reward of first performing action a in s and following policy π thereafter. By definition, Xs,a,π = R(s, a)+γXs′,π, where s′ is the next state distributed according to T(s′|s, a). Let Ys,a,π be a random variable defined as Ys,a,π = (Xs,a,π −R(s, a))/γ. We can see that the pdf of Ys,a,π is a convex combination of the pdfs of Xs′,π for each s′ ∈S. Specifically, we have fYs,a,π(y) = P s′∈S T(s′|s, a)fXs′,π(y). Hence it is straightforward to model the distribution of Ys,a,π as a mixture of Normal distributions if Xs′,π is assumed to be normally distributed for each s′ ∈S. Since Xs,a,π is a linear function of Ys,a,π, Xs,a,π is also a mixture of Normal distributions under our assumptions. 3 3.2 The Modeling and Inference Methods In Bayesian settings, the unknown distribution of a random variable X can be modeled as a parametric likelihood function L(x|θ) depending on the parameters θ. Given a prior distribution P(θ), and a set of past observations Z = {x1, x2, . . . }, the posterior distribution of θ can then be obtained using Bayes’ rules: P(θ|Z) ∝Q i L(xi|θ)P(θ). Assumption (1) implies that it suffices to model the distribution of Xs,π as a Normal likelihood N(µs, 1/τs) with unknown mean µs and precision τs. The precision is defined as the reciprocal of the variance, τ = 1/σ2. This is chosen for mathematical convenience of introducing the NomralGamma distribution as a conjugate prior. A NormalGamma distribution is defined by the hyper-parameters ⟨µ0, λ, α, β⟩with λ > 0, α ≥1 and β ≥0. It is said that (µ, τ) follows a NormalGamma distribution NormalGamma(µ0, λ, α, β) if the pdf of (µ, τ) has the form f(µ, τ|µ0, λ, α, β) = βα√ λ Γ(α) √ 2π τ α−1 2 e−βτ e−λτ(µ−µ0)2 2 . (3) By definition, the marginal distribution over τ is a Gamma distribution, τ ∼Gamma(α, β), and the conditional distribution over µ given τ is a Normal distribution, µ ∼N(µ0, 1/(λτ)). Let us briefly recall the posterior of (µ, τ). Suppose X is normally distributed with unknown mean µ and precision τ, x ∼N(µ, 1/τ), and that the prior distribution of (µ, τ) has a NormalGamma distribution, (µ, τ) ∼NormalGamma(µ0, λ0, α0, β0). After observing n independent samples of X, denoted {x1, x2, . . . , xn}, according to the Bayes’ theorem, the posterior distribution of (µ, τ) is also a NormalGamma distribution, (µ, τ) ∼NormalGamma(µn, λn, αn, βn), where µn = (λ0µ0+n¯x)/(λ0+n), λn = λ0+n, αn = α0+n/2 and βn = β0+(ns+λ0n(¯x−µ0)2/(λ0+n))/2, where ¯x = Pn i=1 xi/n is the sample mean and s = Pn i=1(xi −¯x)2/n is the sample variance. Based on Assumption 2, the distribution of Ys,a,π can be modeled as a mixture of Normal distributions Ys,a,π = (Xs,a,π −R(s, a))/γ ∼P s′∈S ws,a,s′N(µs′, 1/τs′), where ws,a,s′ = T(s′|s, a) are the mixture weights such that ws,a,s′ ≥0 and P s′∈S ws,a,s′ = 1, which are previously unknown in Monte-Carlo settings. A natural representation on these unknown weights is via Dirichlet distributions, since Dirichlet distribution is the conjugate prior of a general discrete probability distribution. For state s and action a, a Dirichlet distribution, denoted Dir(ρs,a) where ρs,a = (ρs,a,s1, ρs,a,s2, · · · ), gives the posterior distribution of T(s′|s, a) for each s′ ∈S if the transition to s′ has been observed ρs,a,s′ −1 times. After observing a transition (s, a) →s′, the posterior distribution is also Dirichlet and can simply be updated as ρs,a,s′ ←ρs,a,s′ + 1. Therefore, to model the distribution of Xs,π and Xs,a,π we only need to maintain a set of hyperparameters ⟨µs,0, λs, αs, βs⟩and ρs,a for each state s and action a encountered in the MCTS search tree and update them by using Bayes’ rules. Now we turn to the question of how to choose the priors by initializing hyper-parameters. While the impact of the prior tends to be negligible in the limit, its choice is important especially when only a small amount of data has been observed. In general, priors should reflect available knowledge of the hidden model. In the absence of any knowledge, uninformative priors may be preferred. According to the principle of indifference, uninformative priors assign equal probabilities to all possibilities. For NormalGamma priors, we hope that the sampled distribution of µ given τ, i.e., N(µ0, 1/(λτ)), is as flat as possible. This implies an infinite variance 1/(λτ) →∞, so that λτ →0. Recall that τ follows a Gamma distribution Gamma(α, β) with expectation E[τ] = α/β, so we have in expectation λα/β →0. Considering the parameter space (λ > 0, α ≥1, β ≥0), we can choose λ small enough, α = 1 and β sufficiently large to approximate this condition. Second, we hope the sampled distribution is in the middle of axis, so µ0 = 0 seems to be a good selection. It is worth noting that intuitively β should not be set too large, or the convergence process may be very slow. For Dirichlet priors, it is common to set ρs,a,s′ = δ where δ is a small enough positive for each s ∈S, a ∈A and s′ ∈S encountered in the search tree to have uninformative priors. On the other hand, if some prior knowledge is available, informative priors may be preferred. By exploiting domain knowledge, a state node can be initialized with informative priors indicating its priority over other states. In DNG-MCTS, this is done by setting the hyper-parameters based 4 on subjective estimation for states. According to the interpretation of hyper-parameters of NormalGamma distribution in terms of pseudo-observations, if one has a prior mean of µ0 from λ samples and a prior precision of α/β from 2α samples, the prior distribution over µ and τ is NormalGamma(µ0, λ, α, β), providing a straightforward way to initialize the hyper-parameters if some prior knowledge (such as historical data of past observations) is available. Specifying detailed priors based on prior knowledge for particular domains is beyond the scope of this paper. The ability to include prior information provides important flexibility and can be considered an advantage of the approach. 3.3 The Action Selection Strategy In DNG-MCTS, action selection strategy is derived using Thompson sampling. Specifically, in general Bayesian settings, action a is chosen with probability: P(a) = Z 1  a = argmax a′ E [Xa′|θa′]  Y a′ Pa′(θa′|Z) dθ (4) where 1 is the indicator function, θa is the hidden parameter prescribing the underlying distribution of reward by applying a, E[Xa|θa] = R xLa(x|θa) dx is the expectation of Xa given θa, and θ = (θa1, θa2, . . . ) is the vector of parameters for all actions. Fortunately, this can efficiently be approached by sampling method. To this end, a set of parameters θa is sampled according to the posterior distributions Pa(θa|Z) for each a ∈A, and the action a∗= argmaxa E[Xa|θa] with highest expectation is selected. In our implementation, at each decision node s of the search tree, we sample the mean µs′ and mixture weights ws,a,s′ according to NormalGamma(µs′,0, λs′, αs′, βs′) and Dir(ρs,a) respectively for each possible next state s′ ∈S. The expectation of Xs,a,π is then computed as R(s, a) + γ P s′∈S ws,a,s′µs′. The action with highest expectation is then selected to be performed in simulation. 3.4 The Main Algorithm The main process of DNG-MCTS is outlined in Figure 1. It is worth noting that the function ThompsonSampling has a boolean parameter sampling. If sampling is true, Thompson sampling method is used to select the best action as explained in Section 3.3, otherwise a greedy action is returned with respect to the current expected transition probabilities and accumulated rewards of next states, which are E[ws,a,s′] = ρs,a,s′/ P x∈S ρs,a,x and E[Xs,π] = µs,0 respectively. At each iteration, the function DNG-MCTS uses Thompson sampling to recursively select actions to be executed by simulation from the root node to leaf nodes through the existing search tree T. It inserts each newly visited node into the tree, plays a default rollout policy from the new node, and propagates the simulated outcome to update the hyper-parameters for visited states and actions. Noting that the rollout policy is only played once for each new node at each iteration, the set of past observations Z in the algorithm has size n = 1. The function OnlinePlanning is the overall procedure interacting with the real environment. It is called with current state s, search tree T initially empty and the maximal horizon H. It repeatedly calls the function DNG-MCTS until some resource budgets are reached (e.g., the computation is timeout or the maximal number of iterations is reached), by when a greedy action to be performed in the environment is returned to the agent. 3.5 The Convergency Property For Thompson sampling in stationary MABs (i.e., the underlying reward function will not change), it is proved that: (1) the probability of selecting any suboptimal action a at the current step is bounded by a linear function of the probability of selecting the optimal action; (2) the coefficient in this linear function decreases exponentially fast with the increase in the number of selection of optimal action [15]. Thus, the probability of selecting the optimal action in an MAB is guaranteed to converge to 1 in the limit using Thompson sampling. 5 OnlinePlanning(s : state, T : tree, H : max horizon) Initialize (µs,0, λs, αs, βs) for each s ∈S Initialize ρs,a for each s ∈S and a ∈A repeat DNG-MCTS(s, T, H) until resource budgets reached return ThompsonSampling(s, H, False) DNG-MCTS(s : state, T : tree, h : horizon) if h = 0 or s is terminal then return 0 else if node ⟨s, h⟩is not in tree T then Add node ⟨s, h⟩to T Play rollout policy by simulation for h steps Observe the outcome r return r else a ←ThompsonSampling(s, h, True) Execute a by simulation Observe next state s′ and reward R(s, a) r ←R(s, a) + γDNG-MCTS(s′, T, h −1) αs ←αs + 0.5 βs ←βs + (λs(r −µs,0)2/(λs + 1))/2 µs,0 ←(λsµs,0 + r)/(λs + 1) λs ←λs + 1 ρs,a,s′ ←ρs,a,s′ + 1 return r ThompsonSampling(s : state, h : horizon, sampling : boolean) foreach a ∈A do qa ←QValue(s, a, h, sampling) return argmaxa qa QValue(s : state, a : action, h : horizon, sampling : boolean) r ←0 foreach s′ ∈S do if sampling = True then Sample ws′ according to Dir(ρs,a) else ws′ ←ρs,a,s′/ P n∈S ρs,a,n r ←r + ws′Value(s′, h −1, sampling) return R(s, a) + γr Value(s : state, h : horizon, sampling : boolean) if h = 0 or s is terminal then return 0 else if sampling = True then Sample (µ, τ) according to NormalGamma(µs,0, λs, αs, βs) return µ else return µs,0 Figure 1: Dirichlet-NormalGamma based Monte-Carlo Tree Search The distribution of Xs,π is determined by the transition function and the Q values given the policy π. When the Q values converge, the distribution of Xs,π becomes stationary with the optimal policy. For the leaf nodes (level H) of the search tree, Thompson sampling will converge to the optimal actions with probability 1 in the limit since the MABs are stationary. When all the leaf nodes converge, the distributions of return values from them will not change. So the MABs of the nodes in level H −1 become stationary as well. Thus, Thompson sampling will also converge to the optimal actions for nodes in level H −1. Recursively, this holds for all the upper-level nodes. Therefore, we conclude that DNG-MCTS can find the optimal policy for the root node if unbounded computational resources are given. 4 Experiments We have tested our DNG-MCTS algorithm and compared the results with UCT in three common MDP benchmark domains, namely Canadian traveler problem, racetrack and sailing. These problems are modeled as cost-based MDPs. That is, a cost function c(s, a) is used instead of the reward function R(s, a), and the min operator is used in the Bellman equation instead of the max operator. Similarly, the objective of solving a cost-based MDPs is to find an optimal policy that minimizes the expected accumulated cost for each state. Notice that algorithms developed for reward-based MDPs can be straightforwardly transformed and applied to cost-based MDPs by simply using the min operator instead of max in the Bellman update routines. Accordingly, the min operator is used in the function ThompsonSampling of our transformed DNG-MCTS algorithm. We implemented our codes and conducted the experiments on the basis of MDP-engine, which is an open source software package with a collection of problem instances and base algorithms for MDPs.1 1MDP-engine can be publicly accessed via https://code.google.com/p/mdp-engine/ 6 Table 1: CTP problems with 20 nodes. The second column indicates the belief size of the transformed MDP for each problem instance. UCTB and UCTO are the two domain-specific UCT implementations [18]. DNG-MCTS and UCT run for 10,000 iterations. Boldface fonts are best in whole table; gray cells show best among domain-independent implementations for each group. The data of UCTB, UCTO and UCT are taken form [16]. domain-specific UCT random rollout policy optimistic rollout policy prob. belief UCTB UCTO UCT DNG UCT DNG 20-1 20 × 349 210.7±7 169.0±6 216.4±3 223.9±4 180.7±3 177.1±3 20-2 20 × 349 176.4±4 148.9±3 178.5±2 178.1±2 160.8±2 155.2±2 20-3 20 × 351 150.7±7 132.5±6 169.7±4 159.5±4 144.3±3 140.1±3 20-4 20 × 349 264.8±9 235.2±7 264.1±4 266.8±4 238.3±3 242.7±4 20-5 20 × 352 123.2±7 111.3±5 139.8±4 133.4±4 123.9±3 122.1±3 20-6 20 × 349 165.4±6 133.1±3 178.0±3 169.8±3 167.8±2 141.9±2 20-7 20 × 350 191.6±6 148.2±4 211.8±3 214.9±4 174.1±2 166.1±3 20-8 20 × 351 160.1±7 134.5±5 218.5±4 202.3±4 152.3±3 151.4±3 20-9 20 × 350 235.2±6 173.9±4 251.9±3 246.0±3 185.2±2 180.4±2 20-10 20 × 349 180.8±7 167.0±5 185.7±3 188.9±4 178.5±3 170.5±3 total 1858.9 1553.6 2014.4 1983.68 1705.9 1647.4 In each benchmark problem, we (1) ran the transformed algorithms for a number of iterations from the current state, (2) applied the best action based on the resulted action-values, (3) repeated the loop until terminating conditions (e.g., a goal state is satisfied or the maximal number of running steps is reached), and (4) reported the total discounted cost. The performance of algorithms is evaluated by the average value of total discounted costs over 1,000 independent runs. In all experiments, (µs,0, λs, αs, βs) is initialized to (0, 0.01, 1, 100), and ρs,a,s′ is initialized to 0.01 for all s ∈S, a ∈A and s′ ∈S. For fair comparison, we also use the same settings as in [16]: for each decision node, (1) only applicable actions are selected, (2) applicable actions are forced to be selected once before any of them are selected twice or more, and 3) the exploration constant for the UCT algorithm is set to be the current mean action-values Q(s, a, d). The Canadian traveler problem (CTP) is a path finding problem with imperfect information over a graph whose edges may be blocked with given prior probabilities [17]. A CTP can be modeled as a deterministic POMDP, i.e., the only source of uncertainty is the initial belief. When transformed to an MDP, the size of the belief space is n × 3m, where n is the number of nodes and m is the number of edges. This problem has a discount factor γ = 1. The aim is to navigate to the goal state as quickly as possible. It has recently been addressed by an anytime variation of AO*, named AOT [16], and two domain-specific implementations of UCT which take advantage of the specific MDP structure of the CTP and use a more informed base policy, named UCTB and UCTO [18]. In this experiment, we used the same 10 problem instances with 20 nodes as done in their papers. When running DNG-MCTS and UCT in those CTP instances, the number of iterations for each decision-making was set to be 10,000, which is identical to [16]. Two types of default rollout policy were tested: the random policy that selects actions with equal probabilities and the optimistic policy that assumes traversability for unknown edges and selects actions according to estimated cost. The results are shown in Table 1. Similar to [16], we included the results of UCTB and UCTO as a reference. From the table, we can see that DNG-MCTS outperformed the domain-independent version of UCT with random rollout policy in several instances, and particularly performed much better than UCT with optimistic rollout policy. Although DNG-MCTS is not as good as domainspecific UCTO, it is competitive comparing to the general UCT algorithm in this domain. The racetrack problem simulates a car race [19], where a car starts in a set of initial states and moves towards the goal. At each time step, the car can choose to accelerate to one of the eight directions. When moving, the car has a possibility of 0.9 to succeed and 0.1 to fail on its acceleration. We tested DNG-MCTS and UCT with random rollout policy and horizon H = 100 in the instance of barto-big, which has a state space with size |S| = 22534. The discount factor is γ = 0.95 and the optimal cost produced is known to be 21.38. We reported the curve of the average cost as a function of the number of iterations in Figure 2a. Each data point in the figure was averaged over 1,000 7 20 30 40 50 60 70 80 90 100 1 10 100 1000 10000 100000 avg. accumulated cost number of iterations UCT DNG-MCTS (a) Racetrack-barto-big with random policy 25 30 35 40 45 50 55 60 1 10 100 1000 10000 100000 avg. accumulated cost number of iterations UCT DNG-MCTS (b) Sailing-100 × 100 with random policy Figure 2: Performance curves for Racetrack and Sailing runs, each of which was allowed for running at most 100 steps. It can be seen from the figure that DNG-MCTS converged faster than UCT in terms of sample complexity in this domain. The sailing domain is adopted from [3]. In this domain, a sailboat navigates to a destination on an 8-connected grid. The direction of the wind changes over time according to prior transition probabilities. The goal is to reach the destination as quickly as possible, by choosing at each grid location a neighbour location to move to. The discount factor in this domain is γ = 0.95 and the maximum horizon is set to be H = 100. We ran DNG-MCTS and UCT with random rollout policy in a 100 × 100 instance of this domain. This instance has 80000 states and the optimal cost is 26.08. The performance curve is shown in Figure 2b. A trend similar to the racetrack problem can be observed in the graph: DNG-MCTS converged faster than UCT in terms of sample complexity. Regarding computational complexity, although the total computation time of our algorithm is linear with the total sample size, which is at most width × depth (width is the number of iterations and depth is the maximal horizon), our approach does require more computation than simple UCT methods. Specifically, we observed that most of the computation time of DNG-MCTS is due to the sampling from distributions in Thompson sampling. Thus, DNG-MCTS usually consumes more time than UCT in a single iteration. Based on our experimental results on the benchmark problems, DNG-MCTS typically needs about 2 to 4 times (depending on problems and the iterating stage of the algorithms) of computational time more than UCT algorithm for a single iteration. However, if the simulations are expensive (e.g., computational physics in 3D environment where the cost of executing the simulation steps greatly exceeds the time needed by action-selection steps in MCTS), DNG-MCTS can obtain much better performance than UCT in terms of computational complexity because DNG-MCTS is expected to have lower sample complexity. 5 Conclusion In this paper, we proposed our DNG-MCTS algorithm — a novel Bayesian modeling and inference based Thompson sampling approach using MCTS for MDP online planning. The basic assumption of DNG-MCTS is modeling the uncertainty of the accumulated reward for each state-action pair as a mixture of Normal distributions. We presented the overall Bayesian framework for representing, updating, decision-making and propagating of probability distributions over rewards in the MCTS search tree. Our experimental results confirmed that, comparing to the general UCT algorithm, DNG-MCTS produced competitive results in the CTP domain, and converged faster in the domains of racetrack and sailing with respect to sample complexity. In the future, we plan to extend our basic assumption to using more complex distributions and test our algorithm on real-world applications. 8 Acknowledgements This work is supported in part by the National Hi-Tech Project of China under grant 2008AA01Z150 and the Natural Science Foundation of China under grant 60745002 and 61175057. Feng Wu is supported in part by the ORCHID project (http://www.orchid.ac.uk). We are grateful to the anonymous reviewers for their constructive comments and suggestions. References [1] S. Gelly and D. Silver. Monte-carlo tree search and rapid action value estimation in computer go. Artificial Intelligence, 175(11):1856–1875, 2011. [2] Mark HM Winands, Yngvi Bjornsson, and J Saito. Monte carlo tree search in lines of action. IEEE Transactions on Computational Intelligence and AI in Games, 2(4):239–250, 2010. [3] L. Kocsis and C. Szepesv´ari. Bandit based monte-carlo planning. In European Conference on Machine Learning, pages 282–293, 2006. [4] D. Silver and J. Veness. Monte-carlo planning in large pomdps. In Advances in Neural Information Processing Systems, pages 2164–2172, 2010. [5] Feng Wu, Shlomo Zilberstein, and Xiaoping Chen. Online planning for ad hoc autonomous agent teams. In International Joint Conference on Artificial Intelligence, pages 439–445, 2011. [6] Arthur Guez, David Silver, and Peter Dayan. Efficient bayes-adaptive reinforcement learning using sample-based search. In Advances in Neural Information Processing Systems, pages 1034–1042, 2012. [7] John Asmuth and Michael L. Littman. Learning is planning: near bayes-optimal reinforcement learning via monte-carlo tree search. In Uncertainty in Artificial Intelligence, pages 19–26, 2011. [8] William R. Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25:285–294, 1933. [9] Olivier Chapelle and Lihong Li. An empirical evaluation of thompson sampling. In Advances Neural Information Processing Systems, pages 2249–2257, 2011. [10] Emilie Kaufmann, Nathaniel Korda, and R´emi Munos. Thompson sampling: An optimal finite time analysis. In Algorithmic Learning Theory, pages 199–213, 2012. [11] Richard Dearden, Nir Friedman, and Stuart Russell. Bayesian q-learning. In AAAI Conference on Artificial Intelligence, pages 761–768, 1998. [12] Gerald Tesauro, V. T. Rajan, and Richard Segal. Bayesian inference in monte-carlo tree search. In Uncertainty in Artificial Intelligence, pages 580–588, 2010. [13] Galin L Jones. On the markov chain central limit theorem. Probability surveys, 1:299–320, 2004. [14] Anirban DasGupta. Asymptotic theory of statistics and probability. Springer, 2008. [15] Shipra Agrawal and Navin Goyal. Further optimal regret bounds for thompson sampling. In Artificial Intelligence and Statistics, pages 99–107, 2013. [16] Blai Bonet and Hector Geffner. Action selection for mdps: Anytime ao* vs. uct. In AAAI Conference on Artificial Intelligence, pages 1749–1755, 2012. [17] Christos H Papadimitriou and Mihalis Yannakakis. Shortest paths without a map. Theoretical Computer Science, 84(1):127–150, 1991. [18] Patrick Eyerich, Thomas Keller, and Malte Helmert. High-quality policies for the canadian traveler’s problem. In AAAI Conference on Artificial Intelligence, pages 51–58, 2010. [19] A.G. Barto, S.J. Bradtke, and S.P. Singh. Learning to act using real-time dynamic programming. Artificial Intelligence, 72(1-2):81–138, 1995. 9
2013
183
4,913
Distributed Submodular Maximization: Identifying Representative Elements in Massive Data Baharan Mirzasoleiman ETH Zurich Amin Karbasi ETH Zurich Rik Sarkar University of Edinburgh Andreas Krause ETH Zurich Abstract Many large-scale machine learning problems (such as clustering, non-parametric learning, kernel machines, etc.) require selecting, out of a massive data set, a manageable yet representative subset. Such problems can often be reduced to maximizing a submodular set function subject to cardinality constraints. Classical approaches require centralized access to the full data set; but for truly large-scale problems, rendering the data centrally is often impractical. In this paper, we consider the problem of submodular function maximization in a distributed fashion. We develop a simple, two-stage protocol GREEDI, that is easily implemented using MapReduce style computations. We theoretically analyze our approach, and show, that under certain natural conditions, performance close to the (impractical) centralized approach can be achieved. In our extensive experiments, we demonstrate the effectiveness of our approach on several applications, including sparse Gaussian process inference and exemplar-based clustering, on tens of millions of data points using Hadoop. 1 Introduction Numerous machine learning algorithms require selecting representative subsets of manageable size out of large data sets. Applications range from exemplar-based clustering [1], to active set selection for large-scale kernel machines [2], to corpus subset selection for the purpose of training complex prediction models [3]. Many such problems can be reduced to the problem of maximizing a submodular set function subject to cardinality constraints [4, 5]. Submodularity is a property of set functions with deep theoretical and practical consequences. Submodular maximization generalizes many well-known problems, e.g., maximum weighted matching, max coverage, and finds numerous applications in machine learning and social networks, such as influence maximization [6], information gathering [7], document summarization [3] and active learning [8, 9]. A seminal result of Nemhauser et al. [10] states that a simple greedy algorithm produces solutions competitive with the optimal (intractable) solution. In fact, if assuming nothing but submodularity, no efficient algorithm produces better solutions in general [11, 12]. Data volumes are increasing faster than the ability of individual computers to process them. Distributed and parallel processing is therefore necessary to keep up with modern massive datasets. The greedy algorithms that work well for centralized submodular optimization, however, are unfortunately sequential in nature; therefore they are poorly suited for parallel architectures. This mismatch makes it inefficient to apply classical algorithms directly to distributed setups. 1 In this paper, we develop a simple, parallel protocol called GREEDI for distributed submodular maximization. It requires minimal communication, and can be easily implemented in MapReduce style parallel computation models [13]. We theoretically characterize its performance, and show that under some natural conditions, for large data sets the quality of the obtained solution is competitive with the best centralized solution. Our experimental results demonstrate the effectiveness of our approach on a variety of submodular maximization problems. We show that for problems such as exemplar-based clustering and active set selection, our approach leads to parallel solutions that are very competitive with those obtained via centralized methods (98% in exemplar based clustering and 97% in active set selection). We implement our approach in Hadoop, and show how it enables sparse Gaussian process inference and exemplar-based clustering on data sets containing tens of millions of points. 2 Background and Related Work Due to the rapid increase in data set sizes, and the relatively slow advances in sequential processing capabilities of modern CPUs, parallel computing paradigms have received much interest. Inhabiting a sweet spot of resiliency, expressivity and programming ease, the MapReduce style computing model [13] has emerged as prominent foundation for large scale machine learning and data mining algorithms [14, 15]. MapReduce works by distributing the data to independent machines, where it is processed in parallel by map tasks that produce key-value pairs. The output is shuffled, and combined by reduce tasks. Hereby, each reduce task processes inputs that share the same key. Their output either comprises the ultimate result, or forms the input to another MapReduce computation. The problem of centralized maximization of submodular functions has received much interest, starting with the seminal work of [10]. Recent work has focused on providing approximation guarantees for more complex constraints. See [5] for a recent survey. The work in [16] considers an algorithm for online distributed submodular maximization with an application to sensor selection. However, their approach requires k stages of communication, which is unrealistic for large k in a MapReduce style model. The authors in [4] consider the problem of submodular maximization in a streaming model; however, their approach is not applicable to the general distributed setting. There has also been new improvements in the running time of the greedy solution for solving SET-COVER when the data is large and disk resident [17]. However, this approach is not parallelizable by nature. Recently, specific instances of distributed submodular maximization have been studied. Such scenarios often occur in large-scale graph mining problems where the data itself is too large to be stored on one machine. Chierichetti et al. [18] address the MAX-COVER problem and provide a (1−1/e−ϵ) approximation to the centralized algorithm, however at the cost of passing over the data set many times. Their result is further improved by Blelloch et al. [19]. Lattanzi et al. [20] address more general graph problems by introducing the idea of filtering, namely, reducing the size of the input in a distributed fashion so that the resulting, much smaller, problem instance can be solved on a single machine. This idea is, in spirit, similar to our distributed method GREEDI. In contrast, we provide a more general framework, and analyze in which settings performance competitive with the centralized setting can be obtained. 3 The Distributed Submodular Maximization Problem We consider the problem of selecting subsets out of a large data set, indexed by V (called ground set). Our goal is to maximize a non-negative set function f : 2V →R+, where, for S ⊆V , f(S) quantifies the utility of set S, capturing, e.g., how well S represents V according to some objective. We will discuss concrete instances of functions f in Section 3.1. A set function f is naturally associated with a discrete derivative △f(e|S) .= f(S ∪{e}) −f(S), (1) where S ⊆V and e ∈V , which quantifies the increase in utility obtained when adding e to set S. f is called monotone iff for all e and S it holds that △f(e|S) ≥0. Further, f is submodular iff for all A ⊆B ⊆V and e ∈V \ B the following diminishing returns condition holds: △f(e|A) ≥△f(e|B). (2) 2 Throughout this paper, we focus on such monotone submodular functions. For now, we adopt the common assumption that f is given in terms of a value oracle (a black box) that computes f(S) for any S ⊆V . In Section 4.5, we will discuss the setting where f(S) itself depends on the entire data set V , and not just the selected subset S. Submodular functions contain a large class of functions that naturally arise in machine learning applications (c.f., [5, 4]). The simplest example of such functions are modular functions for which the inequality (2) holds with equality. The focus of this paper is on maximizing a monotone submodular function (subject to some constraint) in a distributed manner. Arguably, the simplest form of constraints are cardinality constraints. More precisely, we are interested in the following optimization problem: max S⊆V f(S) s.t. |S| ≤k. (3) We will denote by Ac[k] the subset of size at most k that achieves the above maximization, i.e., the best centralized solution. Unfortunately, problem (3) is NP-hard, for many classes of submodular functions [12]. However, a seminal result by Nemhauser et al. [10] shows that a simple greedy algorithm provides a (1 −1/e) approximation to (3). This greedy algorithm starts with the empty set S0, and at each iteration i, it chooses an element e ∈V that maximizes (1), i.e., Si = Si−1 ∪{arg maxe∈V △f(e|Si−1)}. Let Agc[k] denote this greedy-centralized solution of size at most k. For several classes of monotone submodular functions, it is known that (1 −1/e) is the best approximation guarantee that one can hope for [11, 12, 21]. Moreover, the greedy algorithm can be accelerated using lazy evaluations [22]. In many machine learning applications where the ground set |V | is large (e.g., cannot be stored on a single computer), running a standard greedy algorithm or its variants (e.g., lazy evaluation) in a centralized manner is infeasible. Hence, in those applications we seek a distributed solution, e.g., one that can be implemented using MapReduce-style computations (see Section 5). From the algorithmic point of view, however, the above greedy method is in general difficult to parallelize, since at each step, only the object with the highest marginal gain is chosen and every subsequent step depends on the preceding ones. More precisely, the problem we are facing in this paper is the following. Let the ground set V be partitioned into V1, V2, . . . , Vm, i.e., V = V1 ∪V2, · · · ∪Vm and Vi ∩Vj = ∅for i ̸= j. We can think of Vi as a subset of elements (e.g., images) on machine i. The questions we are trying to answer in this paper are: how to distribute V among m machines, which algorithm should run on each machine, and how to merge the resulting solutions. 3.1 Example Applications Suitable for Distributed Submodular Maximization In this part, we discuss two concrete problem instances, with their corresponding submodular objective functions f, where the size of the datasets often requires a distributed solution for the underlying submodular maximization. Active Set Selection in Sparse Gaussian Processes (GPs): Formally a GP is a joint probability distribution over a (possibly infinite) set of random variables XV , indexed by our ground set V , such that every (finite) subset XS for S = {e1, . . . , es} is distributed according to a multivariate normal distribution, i.e., P(XS = xS) = N(xS; µS, ΣS,S), where µS = (µe1, . . . , µes) and ΣS,S = [Kei,ej](1 ≤i, j ≤k) are the prior mean vector and prior covariance matrix, respectively. The covariance matrix is parametrized via a (positive definite kernel) function K. For example, a commonly used kernel function in practice where elements of the ground set V are embedded in a Euclidean space is the squared exponential kernel Kei,ej = exp(−|ei −ej|2 2/h2). In GP regression, each data point e ∈V is considered a random variable. Upon observations yA = xA + nA (where nA is a vector of independent Gaussian noise with variance σ2), the predictive distribution of a new data point e ∈V is a normal distribution P(Xe | yA) = N(µe|A, Σ2 e|A), where µe|A = µe + Σe,A(ΣA,A + σ2I)−1(xA −µA), σ2 e|A = σ2 e −Σe,A(ΣA,A + σ2I)−1ΣA,e. (4) Note that evaluating (4) is computationally expensive as it requires a matrix inversion. Instead, most efficient approaches for making predictions in GPs rely on choosing a small – so called active – set of data points. For instance, in the Informative Vector Machine (IVM) one seeks a set S such that the information gain, f(S) = I(YS; XV ) = H(XV ) −H(XV |YS) = 1 2 log det(I + σ−2ΣS,S) is maximized. It can be shown that this choice of f is monotone submodular [21]. For medium-scale problems, the standard greedy algorithms provide good solutions. In Section 5, we will show how GREEDI can choose near-optimal subsets out of a data set of 45 million vectors. 3 Exemplar Based Clustering: Suppose we wish to select a set of exemplars, that best represent a massive data set. One approach for finding such exemplars is solving the k-medoid problem [23], which aims to minimize the sum of pairwise dissimilarities between exemplars and elements of the dataset. More precisely, let us assume that for the data set V we are given a distance function d : V × V →R (not necessarily assumed symmetric, nor obeying the triangle inequality) such that d(·, ·) encodes dissimilarity between elements of the underlying set V . Then, the loss function for k-medoid can be defined as follows: L(S) = 1 |V | P e∈V minυ∈S d(e, υ). By introducing an auxiliary element e0 (e.g., = 0) we can turn L into a monotone submodular function: f(S) = L({e0})−L(S ∪{e0}). In words, f measures the decrease in the loss associated with the set S versus the loss associated with just the auxiliary element. It is easy to see that for suitable choice of e0, maximizing f is equivalent to minimizing L. Hence, the standard greedy algorithm provides a very good solution. But again, the problem becomes computationally challenging when we have a large data set and we wish to extract a small set of exemplars. Our distributed solution GREEDI addresses this challenge. 3.2 Naive Approaches Towards Distributed Submodular Maximization One way of implementing the greedy algorithm in parallel would be the following. We proceed in rounds. In each round, all machines – in parallel – compute the marginal gains of all elements in their sets Vi. They then communicate their candidate to a central processor, who identifies the globally best element, which is in turn communicated to the m machines. This element is then taken into account when selecting the next element and so on. Unfortunately, this approach requires synchronization after each of the k rounds. In many applications, k is quite large (e.g., tens of thousands or more), rendering this approach impractical for MapReduce style computations. An alternative approach for large k would be to – on each machine – greedily select k/m elements independently (without synchronization), and then merge them to obtain a solution of size k. This approach is much more communication efficient, and can be easily implemented, e.g., using a single MapReduce stage. Unfortunately, many machines may select redundant elements, and the merged solution may suffer from diminishing returns. In Section 4, we introduce an alternative protocol GREEDI, which requires little communication, while at the same time yielding a solution competitive with the centralized one, under certain natural additional assumptions. 4 The GREEDI Approach for Distributed Submodular Maximization In this section we present our main results. We first provide our distributed solution GREEDI for maximizing submodular functions under cardinality constraints. We then show how we can make use of the geometry of data inherent in many practical settings in order to obtain strong datadependent bounds on the performance of our distributed algorithm. 4.1 An Intractable, yet Communication Efficient Approach Before we introduce GREEDI, we first consider an intractable, but communication–efficient parallel protocol to illustrate the ideas. This approach, shown in Alg. 1, first distributes the ground set V to m machines. Each machine then finds the optimal solution, i.e., a set of cardinality at most k, that maximizes the value of f in each partition. These solutions are then merged, and the optimal subset of cardinality k is found in the combined set. We call this solution f(Ad[m, k]). As the optimum centralized solution Ac[k] achieves the maximum value of the submodular function, it is clear that f(Ac[k]) ≥f(Ad[m, k]). Further, for the special case of selecting a single element k = 1, we have Ac[1] = Ad[m, 1]. In general, however, there is a gap between the distributed and the centralized solution. Nonetheless, as the following theorem shows, this gap cannot be more than 1/ min(m, k). Furthermore, this is the best result one can hope for under our two-round model. Theorem 4.1. Let f be a monotone submodular function and let k > 0. Then, f(Ad[m, k])) ≥ 1 min(m,k)f(Ac[k]). In contrast, for any value of m, and k, there is a data partition and a monotone submodular function f such that f(Ac[k]) = min(m, k) · f(Ad[m, k]). 4 Algorithm 1 Exact Distrib. Submodular Max. Input: Set V , #of partitions m, constraints k. Output: Set Ad[m, k]. 1: Partition V into m sets V1, V2, . . . , Vm. 2: In each partition Vi find the optimum set Ac i[k] of cardinality k. 3: Merge the resulting sets: B = ∪m i=1Ac i[k]. 4: Find the optimum set of cardinality k in B. Output this solution Ad[m, k]. Algorithm 2 Greedy Dist. Subm. Max. (GREEDI) Input: Set V , #of partitions m, constraints l, κ. Output: Set Agd[m, κ, l]. 1: Partition V into m sets V1, V2, . . . , Vm. 2: Run the standard greedy algorithm on each set Vi. Find a solution Agc i [κ]. 3: Merge the resulting sets: B = ∪m i=1Agc i [κ]. 4: Run the standard greedy algorithm on B until l elements are selected. Return Agd[m, κ, l]. The proof of all the theorems can be found in the supplement. The above theorem fully characterizes the performance of two-round distributed algorithms in terms of the best centralized solution. A similar result in fact also holds for non-negative (not necessarily monotone) functions. Due to space limitation, the result is reported in the appendix. In practice, we cannot run Alg. 1. In particular, there is no efficient way to identify the optimum subset Ac i[k] in set Vi, unless P=NP. In the following, we introduce our efficient approximation GREEDI. 4.2 Our GREEDI Approximation Our main efficient distributed method GREEDI is shown in Algorithm 2. It parallels the intractable Algorithm 1, but replaces the selection of optimal subsets by a greedy algorithm. Due to the approximate nature of the greedy algorithm, we allow the algorithms to pick sets slightly larger than k. In particular, GREEDI is a two-round algorithm that takes the ground set V , the number of partitions m, and the cardinality constraints l (final solution) and κ (intermediate outputs). It first distributes the ground set over m machines. Then each machine separately runs the standard greedy algorithm, namely, it sequentially finds an element e ∈Vi that maximizes the discrete derivative shown in (1). Each machine i – in parallel – continues adding elements to the set Agc i [·] until it reaches κ elements. Then the solutions are merged: B = ∪m i=1Agc i [κ], and another round of greedy selection is performed over B, which this time selects l elements. We denote this solution by Agd[m, κ, l]: the greedy solution for parameters m, κ and l. The following result parallels Theorem 4.1. Theorem 4.2. Let f be a monotone submodular function and let l, κ, k > 0. Then f(Agd[m, κ, l])) ≥(1 −e−κ/k)(1 −e−l/κ) min(m, k) f(Ac[k]). For the special case of κ = l = k the result of 4.2 simplifies to f(Agd[m, κ, k]) ≥(1−1/e)2 min(m,k)f(Ac[k]). From Theorem 4.1, it is clear that in general one cannot hope to eliminate the dependency of the distributed solution on min(k, m). However, as we show below, in many practical settings, the ground set V and f exhibit rich geometrical structure that can be used to prove stronger results. 4.3 Performance on Datasets with Geometric Structure In practice, we can hope to do much better than the worst case bounds shown above by exploiting underlying structures often present in real data and important set functions. In this part, we assume that a metric d exists on the data elements, and analyze performance of the algorithm on functions that change gracefully with change in the input. We refer to these as Lipschitz functions. More formally, a function f : 2V →R is λ-Lipschitz, if for equal sized sets S = {e1, e2, . . . , ek} and S′ = {e′ 1, e′ 2, . . . , e′ k} and for any matching of elements: M = {(e1, e′ 1), (e2, e′ 2) . . . , (ek, e′ k)}, the difference between f(S) and f(S′) is bounded by the total of distances between respective elements: |f(S) −f(S′)| ≤λ X i d(ei, e′ i). It is easy to see that the objective functions from both examples in Section 3.1 are λ-Lipschitz for suitable kernels/distance functions. Two sets S and S′ are ε-close with respect to f, if |f(S) −f(S′)| ≤ε. Sets that are close with respect to f can be thought of as good candidates to approximate the value of f over each-other; thus one such set is a good representative of the other. Our goal is to find sets that are suitably close to Ac[k]. At an element v ∈V , let us define its α-neighborhood to be the set of elements within a distance α from 5 v (i.e., α-close to v): Nα(v) = {w : d(v, w) ≤α}. We can in general consider α-neighborhoods of points of the metric space. Our algorithm GREEDI partitions V into sets V1, V2, . . . Vm for parallel processing. In this subsection, we assume that GREEDI performs the partition by assigning elements uniformly randomly to the machines. The following theorem says that if the α-neighborhoods are sufficiently dense and f is a λ-lipschitz function, then this method can produce a solution close to the centralized solution: Theorem 4.3. If for each ei ∈Ac[k], |Nα(ei)| ≥km log(k/δ1/m), and algorithm GREEDI assigns elements uniformly randomly to m processors , then with probability at least (1 −δ), f(Agd[m, κ, l]) ≥(1 −e−κ/k)(1 −e−l/κ)(f(Ac[k]) −λαk). 4.4 Performance Guarantees for Very Large Data Sets Suppose that our data set is a finite sample drawn from an underlying infinite set, according to some unknown probability distribution. Let Ac[k] be an optimal solution in the infinite set such that around each ei ∈Ac[k], there is a neighborhood of radius at least α∗, where the probability density is at least β at all points, for some constants α∗and β. This implies that the solution consists of elements coming from reasonably dense and therefore representative regions of the data set. Let us consider g : R →R, the growth function of the metric. g(α) is defined to be the volume of a ball of radius α centered at a point in the metric space. This means, for ei ∈Ac[k] the probability of a random element being in Nα(ei) is at least βg(α) and the expected number of α neighbors of ei is at least E[|Nα(ei)|] = nβg(α). As a concrete example, Euclidean metrics of dimension D have g(α) = O(αD). Note that for simplicity we are assuming the metric to be homogeneous, so that the growth function is the same at every point. For heterogeneous spaces, we require g to be a uniform lower bound on the growth function at every point. In these circumstances, the following theorem guarantees that if the data set V is sufficiently large and f is a λ-lipschitz function, then GREEDI produces a solution close to the centralized solution. Theorem 4.4. For n ≥8km log(k/δ1/m) βg( ε λk) , where ε λk ≤α∗, if the algorithm GREEDI assigns elements uniformly randomly to m processors , then with probability at least (1 −δ), f(Agd[m, κ, l]) ≥(1 −e−κ/k)(1 −e−l/κ)(f(Ac[k]) −ε). 4.5 Handling Decomposable Functions So far, we have assumed that the objective function f is given to us as a black box, which we can evaluate for any given set S independently of the data set V . In many settings, however, the objective f depends itself on the entire data set. In such a setting, we cannot use GREEDI as presented above, since we cannot evaluate f on the individual machines without access to the full set V . Fortunately, many such functions have a simple structure which we call decomposable. More precisely, we call a monotone submodular function f decomposable if it can be written as a sum of (non-negative) monotone submodular functions as follows: f(S) = 1 |V | P i∈V fi(S). In other words, there is separate monotone submodular function associated with every data point i ∈V . We require that each fi can be evaluated without access to the full set V . Note that the exemplar based clustering application we discussed in Section 3.1 is an instance of this framework, among many others. Let us define the evaluation of f restricted to D ⊆V as follows: fD(S) = 1 |D| P i∈D fi(S). Then, in the remaining of this section, our goal is to show that assigning each element of the data set randomly to a machine and running GREEDI will provide a solution that is with high probability close to the optimum solution. For this, let us assume the fi’s are bounded, and without loss of generality 0 ≤fi(S) ≤1 for 1 ≤i ≤|V |, S ⊆V . Similar to Section 4.3 we assume that GREEDI performs the partition by assigning elements uniformly randomly to the machines. These machines then each greedily optimize fVi. The second stage of GREEDI optimizes fU, where U ⊆V is chosen uniformly at random, of size ⌈n/m⌉. Then, we can show the following result. 6 Theorem 4.5. Let m, k, δ > 0, ϵ < 1/4 and let n0 be an integer such that for n ≥n0 we have ln(n)/n ≤ϵ2/(mk). For n ≥max(n0, m log(δ/4m)/ϵ2), and under the assumptions of Theorem 4.4, we have, with probability at least 1 −δ, f(Agd[m, κ, l]) ≥(1 −e−κ/k)(1 −e−l/κ)(f(Ac[k]) −2ε). The above result demonstrates why GREEDI performs well on decomposable submodular functions with massive data even when they are evaluated locally on each machine. We will report our experimental results on exemplar-based clustering in the next section. 5 Experiments In our experimental evaluation we wish to address the following questions: 1) how well does GREEDI perform compared to a centralized solution, 2) how good is the performance of GREEDI when using decomposable objective functions (see Section 4.5), and finally 3) how well does GREEDI scale on massive data sets. To this end, we run GREEDI on two scenarios: exemplar based clustering and active set selection in GPs. Further experiments are reported in the supplement. We compare the performance of our GREEDI method (using different values of α = κ/k) to the following naive approaches: a) random/random: in the first round each machine simply outputs k randomly chosen elements from its local data points and in the second round k out of the merged mk elements, are again randomly chosen as the final output. b) random/greedy: each machine outputs k randomly chosen elements from its local data points, then the standard greedy algorithm is run over mk elements to find a solution of size k. c) greedy/merge: in the first round k/m elements are chosen greedily from each machine and in the second round they are merged to output a solution of size k. d) greedy/max: in the first round each machine greedily finds a solution of size k and in the second round the solution with the maximum value is reported. For data sets where we are able to find the centralized solution, we report the ratio of f(Adist[k])/f(Agc[k]), where Adist[k] is the distributed solution (in particular Agd[m, αk, k] = Adist[k] for GREEDI). Exemplar based clustering. Our exemplar based clustering experiment involves GREEDI applied to the clustering utility f(S) (see Sec. 3.1) with d(x, x′) = ∥x−x′∥2. We performed our experiments on a set of 10,000 Tiny Images [24]. Each 32 by 32 RGB pixel image was represented by a 3,072 dimensional vector. We subtracted from each vector the mean value, normalized it to unit norm, and used the origin as the auxiliary exemplar. Fig. 1a compares the performance of our approach to the benchmarks with the number of exemplars set to k = 50, and varying number of partitions m. It can be seen that GREEDI significantly outperforms the benchmarks and provides a solution that is very close to the centralized one. Interestingly, even for very small α = κ/k < 1, GREEDI performs very well. Since the exemplar based clustering utility function is decomposable, we repeated the experiment for the more realistic case where the function evaluation in each machine was restricted to the local elements of the dataset in that particular machine (rather than the entire dataset). Fig 1b shows similar qualitative behavior for decomposable objective functions. Large scale experiments with Hadoop. As our first large scale experiment, we applied GREEDI to the whole dataset of 80,000,000 Tiny Images [24] in order to select a set of 64 exemplars. Our experimental infrastructure was a cluster of 10 quad-core machines running Hadoop with the number of reducers set to m = 8000. Hereby, each machine carried out a set of reduce tasks in sequence. We first partitioned the images uniformly at random to reducers. Each reducer separately performed the lazy greedy algorithm on its own set of 10,000 images (≈123MB) to extract 64 images with the highest marginal gains w.r.t. the local elements of the dataset in that particular partition. We then merged the results and performed another round of lazy greedy selection on the merged results to extract the final 64 exemplars. Function evaluation in the second stage was performed w.r.t a randomly selected subset of 10,000 images from the entire dataset. The maximum running time per reduce task was 2.5 hours. As Fig. 1c shows, GREEDI highly outperforms the other distributed benchmarks and can scale well to very large datasets. Fig. 1d shows a set of cluster exemplars discovered by GREEDI where each column in Fig. 1h shows 8 nearest images to exemplars 9 and 16 (shown with red borders) in Fig. 1d. Active set selection. Our active set selection experiment involves GREEDI applied to the information gain f(S) (see Sec. 3.1) with Gaussian kernel, h = 0.75 and σ = 1. We used the Parkinsons Telemonitoring dataset [25] consisting of 5,875 bio-medical voice measurements with 22 attributes 7 2 4 6 8 10 0.8 0.85 0.9 0.95 1 m Distributed/Centralized Greedy/ Max Greedy/ Merge Random/ Random Random/ Greedy α=2/m GreeDI (α=1) α=4/m (a) Tiny Images 10K 2 4 6 8 10 0.8 0.85 0.9 0.95 1 m Distributed/Centralized GreeDI (α=1) α=4/m Greedy/ Merge Greedy/ Max α=2/m Random/ Random Random/ Greedy (b) Tiny Images 10K 10 20 30 40 50 60 1.75 1.8 1.85 1.9 1.95 2 2.05 2.1 2.15 2.2x 10 4 k Distributed Random/ Greedy α=4/m α=2/m Greedy/ Max Greedy/ Merge Random/ random GreeDI (α=1) (c) Tiny Images 80M (d) 2 4 6 8 10 0.5 0.6 0.7 0.8 0.9 1 m Distributed/Centralized GreeDI (α=1) Greedy/ Max Random/ Random Random/ Greedy α=4/m α=2/m Greedy/ Merge (e) Parkinsons Telemonitoring 20 40 60 80 100 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 k Distributed/Centralized GreeDI (α=1) α=4/m α=2/m Greedy/ Merge Random/ Greedy Greedy/ Max Random/ Random (f) Parkinsons Telemonitoring 20 40 60 80 100 120 0 5 10 15 20 25 30 35 k Distributed α=2/m α=4/m Random/ Greedy Random/ random Greedy/ Merge Greedy/ Max GreeDI (α=1) (g) Yahoo! front page (h) Figure 1: Performance of GREEDI compared to the other benchmarks. a) and b) show the mean and standard deviation of the ratio of distributed vs. centralized solution for global and local objective functions with budget k = 50 and varying the number m of partitions, for a set of 10,000 Tiny Images. c) shows the distributed solution with m = 8000 and varying k for local objective functions on the whole dataset of 80,000,000 Tiny Images. e) shows the ratio of distributed vs. centralized solution with m = 10 and varying k for Parkinsons Telemonitoring. f) shows the same ratio with k = 50 and varying m on the same dataset, and g) shows the distributed solution for m = 32 with varying budget k on Yahoo! Webscope data. d) shows a set of cluster exemplars discovered by GREEDI, and each column in h) shows 8 images nearest to exemplars 9 and 16 in d). from people with early-stage Parkinson’s disease. We normalized the vectors to zero mean and unit norm. Fig. 1f compares the performance GREEDI to the benchmarks with fixed k = 50 and varying number of partitions m. Similarly, Fig 1e shows the results for fixed m = 10 and varying k. We find that GREEDI significantly outperforms the benchmarks. Large scale experiments with Hadoop. Our second large scale experiment consists of 45,811,883 user visits from the Featured Tab of the Today Module on Yahoo! Front Page [26]. For each visit, both the user and each of the candidate articles are associated with a feature vector of dimension 6. Here, we used the normalized user features. Our experimental setup was a cluster of 5 quad-core machines running Hadoop with the number of reducers set to m = 32. Each reducer performed the lazy greedy algorithm on its own set of 1,431,621 vectors (≈34MB) in order to extract 128 elements with the highest marginal gains w.r.t the local elements of the dataset in that particular partition. We then merged the results and performed another round of lazy greedy selection on the merged results to extract the final active set of size 128. The maximum running time per reduce task was 2.5 hours. Fig. 1g shows the performance of GREEDI compared to the benchmarks. We note again that GREEDI significantly outperforms the other distributed benchmarks and can scale well to very large datasets. 6 Conclusion We have developed an efficient distributed protocol GREEDI, for maximizing a submodular function subject to cardinality constraints. We have theoretically analyzed the performance of our method and showed under certain natural conditions it performs very close to the centralized (albeit impractical in massive data sets) greedy solution. We have also demonstrated the effectiveness of our approach through extensive large scale experiments using Hadoop. We believe our results provide an important step towards solving submodular optimization problems in very large scale, real applications. Acknowledgments. This research was supported by SNF 200021-137971, DARPA MSEE FA8650-11-1-7156, ERC StG 307036, a Microsoft Faculty Fellowship, an ETH Fellowship, Scottish Informatics and Computer Science Alliance. 8 References [1] Delbert Dueck and Brendan J. Frey. Non-metric affinity propagation for unsupervised image categorization. In ICCV, 2007. [2] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning). 2006. [3] Hui Lin and Jeff Bilmes. A class of submodular functions for document summarization. In North American chapter of the Assoc. for Comp. Linguistics/Human Lang. Tech., 2011. [4] Ryan Gomes and Andreas Krause. Budgeted nonparametric learning from data streams. In Proc. International Conference on Machine Learning (ICML), 2010. [5] Andreas Krause and Daniel Golovin. Submodular function maximization. In Tractability: Practical Approaches to Hard Problems. Cambridge University Press, 2013. [6] David Kempe, Jon Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In Proceedings of the ninth ACM SIGKDD, 2003. [7] Andreas Krause and Carlos Guestrin. Submodularity and its applications in optimized information gathering. ACM Transactions on Intelligent Systems and Technology, 2011. [8] Andrew Guillory and Jeff Bilmes. Active semi-supervised learning using submodular functions. In Uncertainty in Artificial Intelligence (UAI), Barcelona, Spain, July 2011. AUAI. [9] Daniel Golovin and Andreas Krause. Adaptive submodularity: Theory and applications in active learning and stochastic optimization. Journal of Artificial Intelligence Research, 2011. [10] George L. Nemhauser, Laurence A. Wolsey, and Marshall L. Fisher. An analysis of approximations for maximizing submodular set functions - I. Mathematical Programming, 1978. [11] G. L. Nemhauser and L. A. Wolsey. Best algorithms for approximating the maximum of a submodular set function. Math. Oper. Research, 1978. [12] Uriel Feige. A threshold of ln n for approximating set cover. Journal of the ACM, 1998. [13] Jeffrey Dean and Sanjay Ghemawat. Mapreduce: Simplified data processing on large clusters. In OSDI, 2004. [14] Cheng-Tao Chu, Sang Kyun Kim, Yi-An Lin, YuanYuan Yu, Gary Bradski, and Andrew Y. Ng. Mapreduce for machine learning on multicore. In NIPS, 2006. [15] Jaliya Ekanayake, Shrideep Pallickara, and Geoffrey Fox. Mapreduce for data intensive scientific analyses. In Proc. of the 4th IEEE Inter. Conf. on eScience. [16] Daniel Golovin, Matthew Faulkner, and Andreas Krause. Online distributed sensor selection. In IPSN, 2010. [17] Graham Cormode, Howard Karloff, and Anthony Wirth. Set cover algorithms for very large datasets. In Proc. of the 19th ACM intern. conf. on Inf. knowl. manag. [18] Flavio Chierichetti, Ravi Kumar, and Andrew Tomkins. Max-cover in map-reduce. In Proceedings of the 19th international conference on World wide web, 2010. [19] Guy E. Blelloch, Richard Peng, and Kanat Tangwongsan. Linear-work greedy parallel approximate set cover and variants. In SPAA, 2011. [20] Silvio Lattanzi, Benjamin Moseley, Siddharth Suri, and Sergei Vassilvitskii. Filtering: a method for solving graph problems in mapreduce. In SPAA, 2011. [21] A. Krause and C. Guestrin. Near-optimal nonmyopic value of information in graphical models. In Proc. of Uncertainty in Artificial Intelligence (UAI), 2005. [22] M. Minoux. Accelerated greedy algorithms for maximizing submodular set functions. Optimization Techniques, LNCS, pages 234–243, 1978. [23] Leonard Kaufman and Peter J Rousseeuw. Finding groups in data: an introduction to cluster analysis, volume 344. Wiley-Interscience, 2009. [24] Antonio Torralba, Rob Fergus, and William T Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE Trans. Pattern Anal. Mach. Intell., 2008. [25] Athanasios Tsanas, Max A Little, Patrick E McSharry, and Lorraine O Ramig. Enhanced classical dysphonia measures and sparse regression for telemonitoring of parkinson’s disease progression. In IEEE Int. Conf. Acoust. Speech Signal Process., 2010. [26] Yahoo! academic relations. r6a, yahoo! front page today module user click log dataset, version 1.0, 2012. [27] Tore Opsahl and Pietro Panzarasa. Clustering in weighted networks. Social networks, 2009. 9
2013
184
4,914
Analyzing the Harmonic Structure in Graph-Based Learning Xiao-Ming Wu1, Zhenguo Li3, and Shih-Fu Chang1,2 1Department of Electrical Engineering, Columbia University 2Department of Computer Science, Columbia University 3Huawei Noah’s Ark Lab, Hong Kong {xmwu, sfchang}@ee.columbia.edu, li.zhenguo@huawei.com Abstract We find that various well-known graph-based models exhibit a common important harmonic structure in its target function – the value of a vertex is approximately the weighted average of the values of its adjacent neighbors. Understanding of such structure and analysis of the loss defined over such structure help reveal important properties of the target function over a graph. In this paper, we show that the variation of the target function across a cut can be upper and lower bounded by the ratio of its harmonic loss and the cut cost. We use this to develop an analytical tool and analyze five popular graph-based models: absorbing random walks, partially absorbing random walks, hitting times, pseudo-inverse of the graph Laplacian, and eigenvectors of the Laplacian matrices. Our analysis sheds new insights into several open questions related to these models, and provides theoretical justifications and guidelines for their practical use. Simulations on synthetic and real datasets confirm the potential of the proposed theory and tool. 1 Introduction Various graph-based models, regardless of application, aim to learn a target function on graphs that well respects the graph topology. This has been done under different motivations such as Laplacian regularization [4, 5, 6, 14, 24, 25, 26], random walks [17, 19, 23, 26], hitting and commute times [10], p-resistance distances [1], pseudo-inverse of the graph Laplacian [10], eigenvectors of the Laplacian matrices [18, 20], diffusion maps [8], to name a few. Whether these models can capture the graph structure faithfully, or whether their target functions possess desirable properties over the graph, remain unclear. Understanding of such issues can be of great value in practice and has attracted much attention recently [16, 22, 23]. Several important observations about learning on graphs have been reported. Nadler et al. [16] showed that the target functions of Laplacian regularized methods become flat as the number of unlabeled points increases, but they also observed that a good classification can still be obtained if an appropriate threshold is used. An explanation to this would be interesting. Von Luxburg et al. [22] proved that commute and hitting times are dominated by the local structures in large graphs, ignoring the global patterns. Does this mean these metrics are flawed? Interestingly, despite this finding, the pseudo-inverse of graph Laplacian, known as the kernel matrix of commute times, consistently performs superior in collaborative filtering [10]. In spectral clustering, the eigenvectors of the normalized graph Laplacian are more desired than those of the un-normalized one [20, 21]. Also for the recently proposed partially absorbing random walks [23], certain setting of absorption rates seems better than others. While these issues arise from seemingly unrelated contexts, we will show in this paper that they can be addressed in a single framework. 1 Our starting point is the discovery of a common structure hidden in the target functions of various graph models. That is, the value of a vertex is approximately the weighted average of the values of its adjacent neighbors. We call this structure the harmonic structure for its resemblance to the harmonic function [9, 26]. It naturally arises from the first step analysis of random walk models, and, as will be shown in this paper, implicitly exists in other methods such as pseudo-inverse of the graph Laplacian and eigenvectors of the Laplacian matrices. The target functions of these models are characterized by their harmonic loss, a quantitative notion introduced in this paper to measure the discrepancy of a target function f on cuts of graphs. The variations of f across cuts can then be upper and lower bounded by the ratio of its harmonic loss and the cut cost. As long as the harmonic loss varies slowly, the graph conductance dominates the variations of f – it will remain smooth in a dense area but vary sharply otherwise. Models possessing such properties successfully capture the cluster structures, and as shown in Sec. 4, lead to superior performance in practical applications including classification and retrieval. This novel perspective allows us to give a unified treatment of graph-based models. We use this tool to study five popular models: absorbing random walks, partially absorbing random walks, hitting times, pseudo-inverse of the graph Laplacian, and eigenvectors of the Laplacian matrices. Our analysis provides new theoretical understandings into these models, answers related open questions, and helps to correct and justify their practical use. The key message conveyed in our results is that various existing models enjoying the harmonic structure are actually capable of capturing the global graph topology, and understanding of this structure can guide us in applying them properly. 2 Analysis Let us first define some notations. In this paper, we consider graphs which are connected, undirected, weighted, and without self-loops. Denote by G = (V, W) a graph with n vertices V and a symmetric non-negative affinity matrix W = [wij] ∈Rn×n (wii = 0). Denote by di = P j wij the degree of vertex i, by D = diag(d1, d2, . . . , dn) the degree matrix, and by L = D −W the graph Laplacian [7]. The conductance of a subset S ⊂V of vertices is defined as Φ(S) = w(S, ¯ S) min(d(S),d( ¯S)), where w(S, ¯S) = P i∈S,j∈¯ S wij is the cut cost between S and its complement ¯S, and d(S) = P i∈S di is the volume of S. For any i /∈S, denote by i ∼S if there is an edge between vertex i and the set S. Definition 2.1 (Harmonic loss). The harmonic loss of f : V →R on any S ⊆V is defined as: Lf(S) := X i∈S di  f(i) − X j∼i wij di f(j)  = X i∈S  dif(i) − X j∼i wijf(j)  . (1) Note that Lf(S) = P i∈S(Lf)(i). By definition, the harmonic loss can be negative. However, as we shall see below, it is always non-negative on superlevel sets. The following lemma shows that the harmonic loss couples the cut cost and the discrepancy of the function across the cut. This observation will serve as the foundation of our analysis in this paper. Lemma 2.2. Lf(S) = P i∈S,j∈¯ S wij(f(i) −f(j)). In particular, Lf(V) = 0. In practice, to examine the variation of f on a graph, one does not necessarily examine on every subset of vertices, which will be exponential in the number of vertices. Instead, it suffices to consider its variation on the superlevel sets defined as follows. Definition 2.3 (Superlevel set). For any function f : V →R on a graph and a scalar c ∈R, the set {i | f(i) ≥c} is called a superlevel set of f with level c. W.l.o.g., we assume the vertices are sorted such that f(1) ≥f(2) ≥· · · ≥f(n −1) ≥f(n). The subset Si := {1, . . . , i} is the superlevel set with level f(i) if f(i) > f(i + 1). For convenience, we still call Si a superlevel set of f even if f(i) = f(i + 1). In this paper, we will mainly examine the variation of f on its n superlevel sets S1, . . . , Sn. Our first observation is that the harmonic loss on each superlevel set is non-negative, stated as follows. Lemma 2.4. Lf(Si) ≥0, i = 1, . . . , n. 2 Based on the notion of superlevel sets, it becomes legitimate to talk about the continuity of a function on graphs, which we formally define as follows. Definition 2.5 (Continuity). For any function f : V →R, we call it left-continuous if i ∼Si−1, i = 2, . . . , n; we call it right-continuous if i ∼¯Si, i = 1, . . . , n −1; we call it continuous if i ∼Si−1 and i ∼¯Si, i = 2, . . . , n −1. Particularly, f is called left-continuous, right-continuous, or continuous at vertex i if i ∼Si−1, i ∼¯Si, or i ∼Si−1 and i ∼¯Si, respectively. Proposition 2.6. For any function f : V →R and any vertex 1 < i < n, 1) if Lf(i) < 0, then i ∼Si−1, i.e., f is left-continuous at i; 2) if Lf(i) > 0, then i ∼¯Si, i.e., f is right-continuous at i; 3) if Lf(i) = 0 and f(i −1) > f(i) > f(i + 1), then i ∼Si−1 and i ∼¯Si, i.e., f is continuous at i. The variation of f can be characterized by the following upper and lower bounds. Theorem 2.7 (Dropping upper bound). For i = 1, . . . , n −1, f(i) −f(i + 1) ≤ Lf(Si) w(Si, ¯Si) = Lf(Si) Φ(Si) min(d(Si), d( ¯Si)). (2) Theorem 2.8 (Dropping lower bound). For i = 1, . . . , n −1, f(u) −f(v) ≥ Lf(Si) w(Si, ¯Si) = Lf(Si) Φ(Si) min(d(Si), d( ¯Si)), (3) where u := arg max j∈Si,j∼¯ Si f(j) and v := arg min j∈¯ Si,j∼Si f(j). The key observations are two-fold. First, for any function f on a graph, as long as its harmonic loss Lf(Si) varies slowly on the superlevel sets, i.e., f is harmonic almost everywhere, the graph conductance Φ(Si) will dominate the variation of f. In particular, by Theorem 2.7, f(i + 1) drops little if Φ(Si) is large, whereas by Theorem 2.8, a big gap exists across the cut if Φ(Si) is small (see Sec. 3.1 for illustration). Second, the continuity (either left, right, or both) of f ensures that its variations conform with the graph connectivity, i.e., points with similar values on f tend to be connected. It is a desired property because a “discontinuous” function that changes alternatively among different clusters can hardly describe the graph. These observations can guide us in identifying “good” functions that encode the global structure of graphs, as will be shown in the next section. 3 Examples With the tool developed in Sec. 2, in this section, we study five popular graph models arising from different contexts including SSL, retrieval, recommendation, and clustering. For each model, we show its target function in harmonic forms, quantify its harmonic loss, analyze its dropping bounds, and provide corrections or justifications for its use. 3.1 Absorbing Random Walks The first model we examine is the seminal Laplacian regularization method [26] proposed for SSL. While it has a nice interpretation in terms of absorbing random walks, with the labeled points being absorbing states, it was argued in [16] that this method might be ill-posed for large unlabeled data in high dimension (≥2) because the target function is extremely flat and thus seems problematic for classification. [1] further connected this argument with the resistance distance on graphs, pointing out that the classification biases to the labeled points with larger degrees. Here we show that Laplacian regularization can actually capture the global graph structure and a simple normalization scheme would resolve the raised issue. For simplicity, we consider the binary classification setting with one label in each class. Denote by f : V →R the absorption probability vector from every point to the positive labeled point. Assume the vertices are sorted such that 1 = f(1) > f(2) ≥· · · ≥f(n−1) > f(n) = 0 (vertex 1 is labeled positive and vertex n is labeled negative). By the first step analysis of the random walk, f(i) = X k∼i wik di f(k), for i = 2, . . . , n −1. (4) Our first observation is that the harmonic loss of f is constant w.r.t. Si, as shown below. 3 1 4 2 3 6 5 (2) 0.97 f = (3) 0.94 f = (4) 0.06 f = (5) 0.03 f = (6) 0 f = (1) 1 f = 1 1 1 1 1 1 0.1 S3 S2 Figure 1: Absorbing random walks on a 6-point graph. Corollary 3.1. Lf(Si) = P k∼1 w1k(1 −f(k)), i = 1, . . . , n −1. The following statement shows that f changes continuously on graphs under general condition. Corollary 3.2. Suppose f is mutually different on unlabeled data. Then f is continuous. Since the harmonic loss of f is a constant on the superlevel sets Si (Corollary 3.1), by Theorems 2.7 and 2.8, the variation of f depends solely on the cut value w(Si, ¯Si), which indicates that it will drop slowly when the cut is dense but drastically when the cut is sparse. Also by Corollary 3.2, f is continuous. Therefore, we conclude that f is a good function on graphs. This can be illustrated by a toy example in Fig. 1, where the graph consists of 6 points in 2 classes denoted by different colors, with 3 points in each. The edge weights are all 1 except for the edge between the two cluster, which is 0.1. Vertices 1 and 6 (black edged) are labeled. The absorption probabilities from all the vertices to vertex 1 are computed and shown. We can see that since the cut w(S2, ¯S2) = 2 is quite dense, the drop between f(2) and f(3) is upper bounded by a small number (Theorem 2.7), so f(3) must be very close to f(2), as observed. In contrast, since the cut w(S3, ¯S3) = 0.1 is very weak, Theorem 2.8 guarantees that there will be a huge gap between f(3) and f(4), as also verified. The bound in Theorem 2.8 is now tight as there is only 1 edge in the cut. Now let f1 and f2 denote the absorption probability vectors to the two labeled points respectively. To classify an unlabeled point i, the usual way is to compare f1(i) and f2(i), which is equivalent to setting the threshold as 0 in f0 = f1 −f2. It was observed in [16] that although f0 can be extremely flat in the presence of large unlabeled data in high dimension, setting the “right” threshold can produce sensible results. Our analysis explains this – it is because both f1 and f2 are informative of the cluster structures. Our key argument is that Laplacian regularization actually carries sufficient information about the graph structure, but how to exploit it can really make a difference. −2 −1 0 1 2 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 0 300 600 0 0.5 1 −2 −1 0 1 2 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 0 300 600 2 4 6x 10 −3 −2 −1 0 1 2 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 (a) (b) (c) (d) (e) Figure 2: (a) Two 20-dimensional Gaussians with the first two dimensions plotted. The magenta triangle and the green circle denote labeled data. The blue cross denotes a starting vertex indexed by i for later use. (b) Absorption probabilities to the two labeled points. (c) Classification by comparing the absorption probabilities. (d) Normalized absorption probabilities. (e) Classification by comparing the normalized absorption probabilities. We illustrate this point by using a mixture of two 20-dimensional Gaussians of 600 points, with one label in each Gaussian (Fig. 2(a)). The absorption probabilities to both labeled points are shown in Fig. 2(b), in magenta and green respectively. The green vector is well above the the magenta vector, indicating that every unlabeled point has larger absorption probability to the green labeled point. Comparing them classifies all the unlabeled points to the green Gaussian (Fig. 2(c)). Since the green labeled point has larger degree than the magenta one1, this result is expected from the analysis in [1]. However, the probability vectors are informative, with a clear gap between the clusters in each 1The degrees are 1.4405 and 0.1435. We use a weighted 20-NN graph (see Supplement). 4 vector. To use the information, we propose to normalize each vector by its probability mass, i.e., f ′(i) = f(i)/ P j f(j) (Fig. 2(d)). Comparing them leads to a perfect classification (Fig. 2(e)). This idea is based on two observations from our analysis: 1) the variance of the probabilities within each cluster is small; 2) there is a gap between the clusters. The small variance indicates that comparing the probabilities is essentially the same as comparing their means within clusters. The gap between the clusters ensures that the normalization makes the vectors align well (this point is made precise in Supplement). Our above analysis applies to multi-class problems and allows more than one labeled points in one class. In this general case, the classification rule is as follows: 1) compute the absorption probability vector fi : U →R for each labeled point i by taking all other labeled points as negative, where U denotes the set of unlabeled points; 2) normalize fi by its mass, denoted by f ′ i; 3) assign each unlabeled point j to the class of j∗:= arg maxi{f ′ i(j)}. We denote this algorithm as ARW-N-1NN. 3.2 Partially Absorbing Random Walks Here we revisit the recently proposed partially absorbing random walks (PARW) [23], which generalizes absorbing random walks by allowing partial absorption at each state. The absorption rate pii at state i is defined as pii = αλi αλi+di , where α > 0, λi > 0 are regularization parameters. Given current state i, a PARW in the next step will get absorbed at i with probability pii and with probability (1 −pii) × wij di moves to state j. Let aij be the probability that a PARW starting from state i gets absorbed at state j within finite steps, and denote by A = [aij] ∈Rn×n the absorption probability matrix. Then A = (αΛ + L)−1αΛ, where Λ = diag(λ1, . . . , λn) is the regularization matrix. PARW is a unified framework with several popular SSL methods and PageRank [17] as its special cases, corresponding to different Λ. Particularly, the case Λ = I has been justified in capturing the cluster structures [23]. In what follows, we extend this result to show that the columns of A obtained by PARW with almost arbitrary Λ (not just Λ = I) actually exhibit strong harmonic structures and should be expected to work equally well. Our first observation is that while A is not symmetric for arbitrary Λ, AΛ−1 = (αΛ + L)−1α is. Lemma 3.3. aij = λj λi aji. Lemma 3.4. aii is the only largest entry in the i-th column of A, i = 1, . . . , n. Our second observation is that the harmonic structure exists in the probabilities of PARW from every vertex getting absorbed at a particular vertex, i.e., in the columns of A. W.l.o.g., consider the first column of A and denote it by p. Assume that the vertices are sorted such that p(1) > p(2) ≥· · · ≥ p(n −1) ≥p(n), where p(1) > p(2) is due to Lemma 3.4. By the first step analysis of PARW, we can write p in a recursive form: p(1) = αλ1 d1 + αλ1 + X k∼1 w1k d1 + αλ1 p(k), p(i) = X k∼i wik di + αλi p(k), i = 2, . . . , n, (5) which is equivalent to the following harmonic form: p(1) = αλ1 d1 (1 −p(1)) + X k∼1 w1k d1 p(k), p(i) = −αλi di p(i) + X k∼i wik di p(k), i = 2, . . . , n. (6) The harmonic loss of p can be computed from Eq. (6). Corollary 3.5. Lp(Si) = αλ1(1 −P k∈Si a1k) = αλ1 P k∈¯ Si a1k, i = 1, . . . , n −1. Corollary 3.6. p is left-continuous. Now we are ready to examine the variation of p. Note that P k a1k = 1 and a1k →λk/ P i λi as α →0 [23]. By Theorem 2.7, the drop of p(i) is upper bounded by αλ1/w(Si, ¯Si), which is small when the cut w(Si, ¯Si) is dense and α is small. Now let k be the largest number such that d(Sk) ≤1 2d(V), and assume P i∈¯ Sk λi ≥1 2 P i λi. By Theorem 2.8, for 1 ≤i ≤k, the drop of p(i) across the cut {Si, ¯Si} is lower bounded by 1 3αλ1/w(Si, ¯Si), if α is sufficiently small. This shows that p(i) will drop a lot when the cut w(Si, ¯Si) is weak. The comparison between the corresponding row and column of A is shown in Figs. 3(a–b)2, which confirms our analysis. 2λi’s are sampled from the uniform distribution on the interval [0, 1] and α = 1e −6, as used in Sec. 4. 5 0 300 600 0 2 4x 10 −3 0 300 600 3.416 3.417 3.418x 10 −3 0 300 600 −0.5 0 0.5 1 0 300 600 0 1 2x 10 4 0 300 600 1200 1300 1400 1500 (a) (b) (c) (d) (e) 0 300 600 −0.2 −0.1 0 0.1 0.2 0 300 600 −1 −0.5 0 0.5 0 300 600 −0.1 0 0.1 0.2 0.3 0 300 600 −0.1 −0.05 0 0.05 0.1 0 300 600 −0.2 −0.1 0 0.1 0.2 (f) λu = 0.0144 (g) λu = 0.0172 (h) λ = 0.0304 (i) λv = 0.0304 (j) λv = 0.3845 Figure 3: (a) Absorption probabilities that a PAWR gets absorbed at other points when starting from i (see Fig. 2). (b) Absorption probabilities that PAWR gets absorbed at i when starting from other points. (c) The i-th row of L†. (d) Hitting times from i to hit other points. (e) Hitting times from other points to hit i. (f) and (g) Eigenvectors of L (mini{di} = 0.0173). (h) An eigenvector of Lsym. (i) and (j) Eigenvectors of Lrw. The values in (f–j) denote eigenvalues. It is worth mentioning that our analysis substantially extends the results in [23] by showing that the setting of Λ is not really necessary – a random Λ can perform equally well if using the columns instead of the rows of A. In addition, our result includes the seminal local clustering model [2] as a special case, which corresponds to Λ = D in our analysis. 3.3 Pseudo-inverse of the Graph Laplacian The pseudo-inverse L† of the graph Laplacian is a valid kernel corresponding to commute times [10, 12]. While commute times may fail to capture the global topology in large graphs [22], L†, if used directly as a similarity measure, gives superior performance in practice [10]. Here we provide a formal analysis and justification for L† by revealing the strong harmonic structure hidden in it. Lemma 3.7. (L†L)ij = −1 n, i ̸= j; and (L†L)ii = 1 −1 n. Note that L† is symmetric since L is symmetric. W.l.o.g., we consider the first row of L† and denote it by ℓ. The following lemma shows the harmonic form of ℓ. Lemma 3.8. ℓhas the following harmonic form: ℓ(1) = 1 −1 n d1 + X k∼1 w1k d1 ℓ(k), ℓ(i) = − 1 n di + X k∼i wik di ℓ(k), i = 2, . . . , n. (7) W.l.o.g., assume the vertices have been sorted such that ℓ(1) > ℓ(2) ≥· · · ≥ℓ(n −1) ≥ℓ(n)3. Then the harmonic loss of ℓon the set Si admits a very simple form, as shown below. Corollary 3.9. Lℓ(Si) = | ¯ Si| n , i = 1, . . . , n −1. Corollary 3.10. ℓis left-continuous. By Corollary 3.9, Lℓ(Si) < 1 and decreases very slowly in large graphs since Lℓ(Si)−Lℓ(Si+1) = 1 n for any i. From the analysis in Sec. 2, we can immediately conclude that the variation of ℓ(i) is dominated by the cut cost on the superlevel set Si. Fig. 3(c) illustrates this argument. 3.4 Hitting Times The hitting time hij from vertex i to j is the expected number of steps it takes a random walk starting from i to reach j for the first time. While it was proven in [22] that hitting times are dominated by the local structure of the target, we show below that the hitting times from other points to the same target admit a harmonic structure, and thus are still able to capture the global structure of graphs. Our result is complementary to the analysis in [22], and provides a justification of using hitting times in information retrieval where the query is taken as the target to be hit by others [15]. 3ℓ(1) > ℓ(2) since one can show that any diagonal entry in L† is the only largest in the corresponding row. 6 Let h : V →R be the hitting times from every vertex to a particular vertex. W.l.o.g., assume the vertices have been sorted such that h(1) ≥h(2) ≥· · · ≥h(n −1) > h(n) = 0, where vertex n is the target vertex. Applying the first step analysis, we obtain the harmonic form of h: h(i) = 1 + X k∼i wik di h(k), for i = 1, . . . , n −1. (8) The harmonic loss on the set Si turns out to be the volume of the set, as stated below. Corollary 3.11. Lh(Si) = X 1≤k≤i dk, i = 1, . . . , n −1. Corollary 3.12. h is right-continuous. Now let us examine the variation of h across any cut {Si, ¯Si}. Note that Lh(Si) w(Si, ¯Si) = αi Φ(Si), where αi = d(Si) min(d(Si), d( ¯Si)). (9) First, by Theorem 2.8, there could be a significant gap between the target and its neighbors, since αn−1 = d(V) dn −1 could be quite large. As i decreases from d(Si) > 1 2d(V), the variation of αi becomes slower and slower (αi = 1 when d(Si) ≤1 2d(V)), so the variation of h will depend on the variation of the conductance of Si, i.e., Φ(Si), according to Theorems 2.7 and 2.8. Fig. 3(e) shows that h is flat within the clusters, but there is a large gap presented between them. In contrast, there are no gaps exhibited in the hitting times from the target to other vertices (Fig. 3(d)). 3.5 Eigenvectors of the Laplacian Matrices The eigenvectors of the Laplacian matrices play a key role in graph partitioning [20]. In practice, the eigenvectors with smaller (positive) eigenvalues are more desired than those with larger eigenvalues, and the ones from a normalized Laplacian are preferred than those from the un-normalized one. These choices are usually justified from the relaxation of the normalized cuts [18] and ratio cuts [11]. However, it has been known that these relaxations can be arbitrarily loose [20]. It seems more interesting if one can draw conclusions by analyzing the eigenvectors directly. Here we address these issues by examining the harmonic structures in these eigenvectors. We follow the notations in [20] to denote two normalized graph Laplacians: Lrw := D−1L and Lsym := D−1 2 LD−1 2 . Denote by u and v two eigenvectors of L and Lrw with eigenvalues λu > 0 and λv > 0, respectively, i.e., Lu = λuu and Lrwv = λvv. Then we have u(i) = X k∼i wik di −λu u(k), v(i) = X k∼i wik di(1 −λv)v(k), for i = 1, . . . , n. (10) We can see that the smaller λu and λv, the stronger the harmonic structures of u and v. This explains why in practice the eigenvector with the second4 smallest eigenvalues gives superior performance. As long as λu ≪mini{di}, we are safe to say that u will have a significant harmonic structure, and thus will be informative for clustering. However, if λu is close to mini{di}, no matter how small λu is, the harmonic structure of u will be weaker, and thus u is less useful. In contrast, from Eq. (10), v will always enjoy a significant harmonic structure as long as λv is much smaller than 1. This explains why eigenvectors of Lrw are preferred than those of L for clustering. These arguments are validated in Figs. 3(f–j), where we also include an eigenvector of Lsym for comparison. 4 Experiments In the first experiment5, we test absorbing random walks (ARW) for SSL, with the class mass normalization suggested in [26] (ARW-CMN), our proposed normalization (ARW-N-1NN, Sec. 3.1), and without any normalization (ARW-1NN) – where each unlabeled instance is assigned the class of the labeled instance at which it most likely gets absorbed. We also compare with the local and global 4Note that the smallest one is zero in either L or Lrw. 5Please see Supplement for parameter settings, data description, graph construction, and experimental setup. 7 Table 1: Classification accuracy on 9 datasets. USPS YaleB satimage imageseg ionosphere iris protein spiral soybean ARW-N-1NN .879 .892 .777 .673 .771 .918 .589 .830 .916 ARW-1NN .445 .733 .650 .595 .699 .902 .440 .754 .889 ARW-CMN .775 .847 .741 .624 .724 .894 .511 .726 .856 LGC .821 .884 .725 .638 .731 .903 .477 .729 .816 PARW (Λ = I) .880 .906 .781 .665 .752 .928 .572 .835 .905 consistency (LGC) method [24] and the PARW with Λ = I in [23]. The results are summarized in Table 1. We can see that ARW-N-1NN and PARW (Λ = I) consistently perform the best, which verifies our analysis in Sec. 3. The results of ARW-1NN are unsatisfactory due to its bias to the labeled instance with the largest degree [1]. Although ARW-CMN does improve over ARW-1NN in many cases, it does not perform as well as ARW-N-1NN, mainly because of the artifacts induced by estimating the class proportion from limited labeled data. The results of LGC are not comparable to ARW-N-1NN and PARW (Λ = I), which is probably due to the lack of a harmonic structure. Table 2: Ranking results (MAP) on USPS. Digits 0 1 2 3 4 5 6 7 8 9 All Λ = R (column) .981 .988 .875 .892 .647 .780 .941 .918 .746 .731 .850 Λ = R (row) .169 .143 .114 .096 .092 .076 .093 .093 .075 .086 .103 Λ = I .981 .988 .876 .893 .646 .778 .940 .919 .746 .730 .850 In the second experiment, we test PARW on a retrieval task on USPS (see Supplement). We compare the cases with Λ = I and Λ = R, where R is a random diagonal matrix with positive diagonal entries. For Λ = R, we also compare the uses of columns and rows for retrieval. The results are shown in Table 2. We observe that the columns in Λ = R give significantly better results compared with rows, implying that the harmonic structure is vital to the performance. Λ = R (column) and Λ = I perform very similarly. This suggests that it is not the special setting of absorbing rates but the harmonic structure that determines the overall performance. Table 3: Classification accuracy on USPS. k-NN unweighted graphs 10 20 50 100 200 500 HT(L →U) .8514 .8361 .7822 .7500 .7071 .6429 HT(U →L) .1518 .1454 .1372 .1209 .1131 .1113 L† .8512 .8359 .7816 .7493 .7062 .6426 In the third experiment, we test hitting times and pseudo-inverse of the graph Laplacian for SSL on USPS. We compare two different uses of hitting times, the case of starting from the labeled data L to hit the unlabeled data U (HT(L →U)), and the case of the opposite direction (HT(U →L)). Each unlabeled instance j is assigned the class of labeled instance j∗, where j∗= arg mini∈L{hij} in HT(L →U), j∗= arg mini∈L{hji} in (HT(U →L)), and j∗= arg maxi∈L{ℓji} in L† = (ℓij). The results averaged over 100 trials are shown in Table 3, where we see that HT(L →U) performs much better than HT(U →L), which is expected as the former admits a desired harmonic structure. Note that HT(L →U) is not lost as the number of neighbors increases (i.e., the graph becomes more connected). The slight performance drop is due to the inclusion of more noisy edges. In contrast, HT(U →L) is completely lost [20]. We also observe that L† produces very competitive performance, which again supports our analysis. 5 Conclusion In this paper, we explore the harmonic structure that widely exists in graph models. Different from previous research [3, 13] of harmonic analysis on graphs, where the selection of canonical basis on graphs and the asymptotic convergence on manifolds are studied, here we examine how functions on graphs deviate from being harmonic and develop bounds to analyze their theoretical behavior. The proposed harmonic loss quantifies the discrepancy of a function across cuts, allows a unified treatment of various models from different contexts, and makes them easy to analyze. Due to its resemblance with standard mathematical concepts such as divergence and total variation, an interesting line of future work is to make their connections clear. Other future works include deriving more rigorous bounds for certain functions and extending our analysis to more graph models. 8 References [1] M. Alamgir and U. von Luxburg. Phase transition in the family of p-resistances. In NIPS. 2011. [2] R. Andersen, F. Chung, and K. Lang. Local graph partitioning using pagerank vectors. In FOCS, pages 475–486, 2006. [3] M. Belkin. Problems of Learning on Manifolds. PhD thesis, The University of Chicago, 2003. [4] M. Belkin, I. Matveeva, and P. Niyogi. Regularization and semi-supervised learning on large graphs. In COLT, pages 624–638, 2004. [5] M. Belkin, Q. Que, Y. Wang, and X. Zhou. Toward understanding complex spaces: Graph laplacians on manifolds with singularities and boundaries. In COLT, 2012. [6] O. Bousquet, O. Chapelle, and M. Hein. Measure based regularization. In NIPS, 2003. [7] F. Chung. Spectral Graph Theory. American Mathematical Society, 1997. [8] R. Coifman and S. Lafon. Diffusion maps. Applied and Computational Harmonic Analysis, 21(1):5–30, 2006. [9] P. G. Doyle and J. L. Snell. Random walks and electric networks. Mathematical Association of America, 1984. [10] F. Fouss, A. Pirotte, J.-M. Renders, and M. Saerens. Random-walk computation of similarities between nodes of a graph with application to collaborative recommendation. IEEE Transactions on Knowledge and Data Engineering, 19(3):355–369, 2007. [11] L. Hagen and A. B. Kahng. New spectral methods for ratio cut partitioning and clustering. IEEE transactions on Computer-aided design of integrated circuits and systems, 11(9):1074– 1085, 1992. [12] D. J. Klein and M. Randi´c. Resistance distance. Journal of Mathematical Chemistry, 12(1):81– 95, 1993. [13] S. S. Lafon. Diffusion maps and geometric harmonics. PhD thesis, Yale University, 2004. [14] M. H. G. Lever and M. Herbster. Predicting the labelling of a graph via minimum p-seminorm interpolation. In COLT, 2009. [15] Q. Mei, D. Zhou, and K. Church. Query suggestion using hitting time. In CIKM, pages 469– 478, 2008. [16] B. Nadler, N. Srebro, and X. Zhou. Statistical analysis of semi-supervised learning: The limit of infinite unlabelled data. In NIPS, pages 1330–1338, 2009. [17] L. Page, S. Brin, R. Motwani, and T. Winograd. The pagerank citation ranking: Bringing order to the web. 1999. [18] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Trans. PAMI, 22(8):888– 905, 2000. [19] M. Szummer and T. Jaakkola. Partially labeled classification with Markov random walks. In NIPS, pages 945–952, 2002. [20] U. Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007. [21] U. Von Luxburg, M. Belkin, and O. Bousquet. Consistency of spectral clustering. The Annals of Statistics, pages 555–586, 2008. [22] U. Von Luxburg, A. Radl, and M. Hein. Hitting and commute times in large graphs are often misleading. Arxiv preprint arXiv:1003.1266, 2010. [23] X.-M. Wu, Z. Li, A. M.-C. So, J. Wright, and S.-F. Chang. Learning with partially absorbing random walks. In NIPS, 2012. [24] D. Zhou, O. Bousquet, T. Lal, J. Weston, and B. Sch¨olkopf. Learning with local and global consistency. In NIPS, 2004. [25] X. Zhou and M. Belkin. Semi-supervised learning by higher order regularization. In AISTATS, 2011. [26] X. Zhu, Z. Ghahramani, and J. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In ICML, 2003. 9
2013
185
4,915
Near-optimal Anomaly Detection in Graphs using Lov´asz Extended Scan Statistic James Sharpnack Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 jsharpna@gmail.com Akshay Krishnamurthy Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 akshaykr@cs.cmu.edu Aarti Singh Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 aarti@cs.cmu.edu Abstract The detection of anomalous activity in graphs is a statistical problem that arises in many applications, such as network surveillance, disease outbreak detection, and activity monitoring in social networks. Beyond its wide applicability, graph structured anomaly detection serves as a case study in the difficulty of balancing computational complexity with statistical power. In this work, we develop from first principles the generalized likelihood ratio test for determining if there is a well connected region of activation over the vertices in the graph in Gaussian noise. Because this test is computationally infeasible, we provide a relaxation, called the Lov´asz extended scan statistic (LESS) that uses submodularity to approximate the intractable generalized likelihood ratio. We demonstrate a connection between LESS and maximum a-posteriori inference in Markov random fields, which provides us with a poly-time algorithm for LESS. Using electrical network theory, we are able to control type 1 error for LESS and prove conditions under which LESS is risk consistent. Finally, we consider specific graph models, the torus, knearest neighbor graphs, and ǫ-random graphs. We show that on these graphs our results provide near-optimal performance by matching our results to known lower bounds. 1 Introduction Detecting anomalous activity refers to determining if we are observing merely noise (business as usual) or if there is some signal in the noise (anomalous activity). Classically, anomaly detection focused on identifying rare behaviors and aberrant bursts in activity over a single data source or channel. With the advent of large surveillance projects, social networks, and mobile computing, data sources often are high-dimensional and have a network structure. With this in mind, statistics needs to comprehensively address the detection of anomalous activity in graphs. In this paper, we will study the detection of elevated activity in a graph with Gaussian noise. In reality, very little is known about the detection of activity in graphs, despite a variety of real-world applications such as activity detection in social networks, network surveillance, disease outbreak detection, biomedical imaging, sensor network detection, gene network analysis, environmental monitoring and malware detection. Sensor networks might be deployed for detecting nuclear substances, water contaminants, or activity in video surveillance. By exploiting the sensor network structure 1 (based on proximity), one can detect activity in networks when the activity is very faint. Recent theoretical contributions in the statistical literature[1, 2] have detailed the inherent difficulty of such a testing problem but have positive results only under restrictive conditions on the graph topology. By combining knowledge from high-dimensional statistics, graph theory and mathematical programming, the characterization of detection algorithms over any graph topology by their statistical properties is possible. Aside from the statistical challenges, the computational complexity of any proposed algorithms must be addressed. Due to the combinatorial nature of graph based methods, problems can easily shift from having polynomial-time algorithms to having running times exponential in the size of the graph. The applications of graph structured inference require that any method be scalable to large graphs. As we will see, the ideal statistical procedure will be intractable, suggesting that approximation algorithms and relaxations are necessary. 1.1 Problem Setup Consider a connected, possibly weighted, directed graph G defined by a set of vertices V (|V | = p) and directed edges E (|E| = m) which are ordered pairs of vertices. Furthermore, the edges may be assigned weights, {We}e∈E, that determine the relative strength of the interactions of the adjacent vertices. For each vertex, i ∈V , we assume that there is an observation yi that has a Normal distribution with mean xi and variance 1. This is called the graph-structured normal means problem, and we observe one realization of the random vector y = x + ξ, (1) where x ∈Rp, ξ ∼N(0, Ip×p). The signal x will reflect the assumption that there is an active cluster (C ⊆V ) in the graph, by making xi > 0 if i ∈C and xi = 0 otherwise. Furthermore, the allowable clusters, C, must have a small boundary in the graph. Specifically, we assume that there are parameters ρ, µ (possibly dependent on p such that the class of graph-structured activation patterns x is given as follows. X = ( x : x = µ p |C| 1C, C ∈C ) , C = {C ⊆V : out(C) ≤ρ} Here out(C) = P (u,v)∈E Wu,vI{u ∈C, v ∈¯C} is the total weight of edges leaving the cluster C. In other words, the set of activated vertices C have a small cut size in the graph G. While we assume that the noise variance is 1 in (1), this is equivalent to the more general model in which Eξ2 i = σ2 with σ known. If we wanted to consider known σ2 then we would apply all our algorithms to y/σ and replace µ with µ/σ in all of our statements. For this reason, we call µ the signal-to-noise ratio (SNR), and proceed with σ = 1. In graph-structured activation detection we are concerned with statistically testing the null against the alternative hypotheses, H0 : y ∼N(0, I) H1 : y ∼N(x, I), x ∈X (2) H0 represents business as usual (such as sensors returning only noise) while H1 encompasses all of the foreseeable anomalous activity (an elevated group of noisy sensor observations). Let a test be a mapping T(y) ∈{0, 1}, where 1 indicates that we reject the null. It is imperative that we control both the probability of false alarm, and the false acceptance of the null. To this end, we define our measure of risk to be R(T) = E0[T] + sup x∈X Ex[1 −T] where Ex denote the expectation with respect to y ∼N(x, I). These terms are also known as the probability of type 1 and type 2 error respectively. This setting should not be confused with the Bayesian testing setup (e.g. as considered in [2, 3]) where the patterns, x, are drawn at random. We will say that H0 and H1 are asymptotically distinguished by a test, T, if in the setting of large graphs, limp→∞R(T) = 0. If such a test exists then H0 and H1 are asymptotically distinguishable, otherwise they are asymptotically indistinguishable (which occurs whenever the risk does not tend to 0). We will be characterizing regimes for µ in which our test asymptotically distinguishes H0 from H1. 2 Throughout the study, let the edge-incidence matrix of G be ∇∈Rm×p such that for e = (v, w) ∈ E, ∇e,v = −We, ∇e,w = We and is 0 elsewhere. For directed graphs, vertex degrees refer to dv = out({v}). Let ∥.∥denote the ℓ2 norm, ∥.∥1 be the ℓ1 norm, and (x)+ be the positive components of the vector x. Let [p] = {1, . . . , p}, and we will be using the o notation, namely if non-negative sequences satisfy an/bn →0 then an = o(bn) and bn = ω(an). 1.2 Contributions Section 3 highlights what is known about the hypothesis testing problem 2, particularly we provide a regime for µ in which H0 and H1 are asymptotically indistinguishable. In section 4.1, we derive the graph scan statistic from the generalized likelihood ratio principle which we show to be a computationally intractable procedure. In section 4.2, we provide a relaxation of the graph scan statistic (GSS), the Lov´asz extended scan statistic (LESS), and we show that it can be computed with successive minimum s −t cut programs (a graph cut that separates a source vertex from a sink vertex). In section 5, we give our main result, Theorem 5, that provides a type 1 error control for both test statistics, relating their performance to electrical network theory. In section 6, we show that GSS and LESS can asymptotically distinguish H0 and H1 in signal-to-noise ratios close to the lowest possible for some important graph models. All proofs are in the Appendix. 2 Related Work Graph structured signal processing. There have been several approaches to signal processing over graphs. Markov random fields (MRF) provide a succinct framework in which the underlying signal is modeled as a draw from an Ising or Potts model [4, 5]. We will return to MRFs in a later section, as it will relate to our scan statistic. A similar line of research is the use of kernels over graphs. The study of kernels over graphs began with the development of diffusion kernels [6], and was extended through Green’s functions on graphs [7]. While these methods are used to estimate binary signals (where xi ∈{0, 1}) over graphs, little is known about their statistical properties and their use in signal detection. To the best of our knowledge, this paper is the first connection made between anomaly detection and MRFs. Normal means testing. Normal means testing in high-dimensions is a well established and fundamental problem in statistics. Much is known when H1 derives from a smooth function space such as Besov spaces or Sobolev spaces[8, 9]. Only recently have combinatorial structures such as graphs been proposed as the underlying structure of H1. A significant portion of the recent work in this area [10, 3, 1, 2] has focused on incorporating structural assumptions on the signal, as a way to mitigate the effect of high-dimensionality and also because many real-life problems can be represented as instances of the normal means problem with graph-structured signals (see, for an example, [11]). Graph scan statistics. In spatial statistics, it is common, when searching for anomalous activity to scan over regions in the spatial domain, testing for elevated activity[12, 13]. There have been scan statistics proposed for graphs, most notably the work of [14] in which the authors scan over neighborhoods of the graphs defined by the graph distance. Other work has been done on the theory and algorithms for scan statistics over specific graph models, but are not easily generalizable to arbitrary graphs [15, 1]. More recently, it has been found that scanning over all well connected regions of a graph can be computationally intractable, and so approximations to the intractable likelihood-based procedure have been studied [16, 17]. We follow in this line of work, with a relaxation to the intractable generalized likelihood ratio test. 3 A Lower Bound and Known Results In this section we highlight the previously known results about the hypothesis testing problem (2). This problem was studied in [17], in which the authors demonstrated the following lower bound, which derives from techniques developed in [3]. Theorem 1. [17] Hypotheses H0 and H1 defined in Eq. (2) are asymptotically indistinguishable if µ = o s min  ρ dmax log pd2max ρ2  , √p ! where dmax is the maximum degree of graph G. 3 Now that a regime of asymptotic indistinguishability has been established, it is instructive to consider test statistics that do not take the graph into account (viz. the statistics are unaffected by a change in the graph structure). Certainly, if we are in a situation where a naive procedure perform nearoptimally, then our study is not warranted. As it turns out, there is a gap between the performance of the natural unstructured tests and the lower bound in Theorem 1. Proposition 2. [17] (1) The thresholding test statistic, maxv∈[p] |yv|, asymptotically distinguishes H0 from H1 if µ = ω(|C| log(p/|C|)). (2) The sum test statistic, P v∈[p] yv, asymptotically distinguishes H0 from H1 if µ = ω(p/|C|). As opposed to these naive tests one can scan over all clusters in C performing individual likelihood ratio tests. This is called the scan statistic, and it is known to be a computationally intractable combinatorial optimization. Previously, two alternatives to the scan statistic have been developed: the spectral scan statistic [16], and one based on the uniform spanning tree wavelet basis [17]. The former is indeed a relaxation of the ideal, computationally intractable, scan statistic, but in many important graph topologies, such as the lattice, provides sub-optimal statistical performance. The uniform spanning tree wavelets in effect allows one to scan over a subclass of the class, C, but tends to provide worse performance (as we will see in section 6) than that presented in this work. The theoretical results in [17] are similar to ours, but they suffer additional log-factors. 4 Method As we have noted the fundamental difficulty of the hypothesis testing problem is the composite nature of the alternative hypothesis. Because the alternative is indexed by sets, C ∈C(ρ), with a low cut size, it is reasonable that the test statistic that we will derive results from a combinatorial optimization program. In fact, we will show we can express the generalized likelihood ratio (GLR) statistic in terms of a modular program with submodular constraints. This will turn out to be a possibly NP-hard program, as a special case of such programs is the well known knapsack problem [18]. With this in mind, we provide a convex relaxation, using the Lov´asz extension, to the ideal GLR statistic. This relaxation conveniently has a dual objective that can be evaluated with a binary Markov random field energy minimization, which is a well understood program. We will reserve the theoretical statistical analysis for the following section. Submodularity. Before we proceed, we will introduce the reader to submodularity and the Lov´asz extension. (A very nice introduction to submodularity can be found in [19].) For any set, which we may as well take to be the vertex set [p], we say that a function F : {0, 1}p →R is submodular if for any A, B ⊆[p], F(A) + F(B) ≥F(A ∩B) + F(A ∪B). (We will interchangeably use the bijection between 2[p] and {0, 1}p defined by C →1C.) In this way, a submodular function experiences diminishing returns, as additions to large sets tend to be less dramatic than additions to small sets. But while this diminishing returns phenomenon is akin to concave functions, for optimization purposes submodularity acts like convexity, as it admits efficient minimization procedures. Moreover, for every submodular function there is a Lov´asz extension f : [0, 1]p →R defined in the following way: for x ∈[0, 1]p let xji denote the ith largest element of x, then f(x) = xj1F({j1}) + p X i=2 (F({j1, . . . , ji}) −F({j1, . . . , ji−1}))xji Submodular functions as a class is similar to convex functions in that it is closed under addition and non-negative scalar multiplication. The following facts about Lov´asz extensions will be important. Proposition 3. [19] Let F be submodular and f be its Lov´asz extension. Then f is convex, f(x) = F(x) if x ∈{0, 1}p, and min{F(x) : x ∈{0, 1}p} = min{f(x) : x ∈[0, 1]p} We are now sufficiently prepared to develop the test statistics that will be the focus of this paper. 4.1 Graph Scan Statistic It is instructive, when faced with a class of probability distributions, indexed by subsets C ⊆2[p], to think about what techniques we would use if we knew the correct set C ∈C (which is often called oracle information). One would in this case be only testing the null hypothesis H0 : x = 0 4 against the simple alternative H1 : x ∝1C. In this situation, we would employ the likelihood ratio test because by the Neyman-Pearson lemma it is the uniformly most powerful test statistic. The maximum likelihood estimator for x is 1C1⊤ Cy/|C| (the MLE of µ is 1⊤ Cy/ p |C|) and the likelihood ratio turns out to be exp  −1 2∥y∥2  / exp ( −1 2 1C1⊤ Cy |C| −y 2) = exp (1⊤ Cy)2 2|C|  Hence, the log-likelihood ratio is proportional to (1⊤ Cy)2/|C| and thresholding this at z2 1−α/2 gives us a size α test. This reasoning has been subject to the assumption that we had oracle knowledge of C. A natural statistic, when C is unknown, is the generalized log-likelihood ratio (GLR) defined by max(1⊤ Cy)2/|C| s.t. C ∈C. We will work with the graph scan statistic (GSS), ˆs = max 1⊤ Cy p |C| s.t. C ∈C(ρ) = {C : out(C) ≤ρ} (3) which is nearly equivalent to the GLR. (We can in fact evaluate ˆs for y and −y, taking a maximum and obtain the GLR, but statistically this is nearly the same.) Notice that there is no guarantee that the program above is computationally feasible. In fact, it belongs to a class of programs, specifically modular programs with submodular constraints that is known to contain NP-hard instantiations, such as the ratio cut program and the knapsack program [18]. Hence, we are compelled to form a relaxation of the above program, that will with luck provide a feasible algorithm. 4.2 Lov´asz Extended Scan Statistic It is common, when faced with combinatorial optimization programs that are computationally infeasible, to relax the domain from the discrete {0, 1}p to a continuous domain, such as [0, 1]p. Generally, the hope is that optimizing the relaxation will approximate the combinatorial program well. First we require that we can relax the constraint out(C) ≤ρ to the hypercube [0, 1]p. This will be accomplished by replacing it with its Lov´asz extension ∥(∇x)+∥1 ≤ρ. We then form the relaxed program, which we will call the Lov´asz extended scan statistic (LESS), ˆl = max t∈[p] max x x⊤y √ t s.t. x ∈X(ρ, t) = {x ∈[0, 1]p : ∥(∇x)+∥1 ≤ρ, 1⊤x ≤t} (4) We will find that not only can this be solved with a convex program, but the dual objective is a minimum binary Markov random field energy program. To this end, we will briefly go over binary Markov random fields, which we will find can be used to solve our relaxation. Binary Markov Random Fields. Much of the previous work on graph structured statistical procedures assumes a Markov random field (MRF) model, in which there are discrete labels assigned to each vertex in [p], and the observed variables {yv}v∈[p] are conditionally independent given these labels. Furthermore, the prior distribution on the labels is drawn according to an Ising model (if the labels are binary) or a Potts model otherwise. The task is to then compute a Bayes rule from the posterior of the MRF. The majority of the previous work assumes that we are interested in the maximum a-posteriori (MAP) estimator, which is the Bayes rule for the 0/1-loss. This can generally be written in the form, min x∈{0,1}p X v∈[p] −lv(xv|yv) + X v̸=u∈[p] Wv,uI{xv ̸= xu} where lv is a data dependent log-likelihood. Such programs are called graph-representable in [20], and are known to be solvable in the binary case with s-t graph cuts. Thus, by the min-cut max-flow theorem the value of the MAP objective can be obtained by computing a maximum flow. More recently, a dual-decomposition algorithm has been developed in order to parallelize the computation of the MAP estimator for binary MRFs [21, 22]. We are now ready to state our result regarding the dual form of the LESS program, (4). Proposition 4. Let η0, η1 ≥0, and define the dual function of the LESS, g(η0, η1) = max x∈{0,1}p y⊤x −η01⊤x −η1∥∇x∥0 5 The LESS estimator is equal to the following minimum of convex optimizations ˆl = max t∈[p] 1 √ t min η0,η1≥0 g(η0, η1) + η0t + η1ρ g(η0, η1) is the objective of a MRF MAP problem, which is poly-time solvable with s-t graph cuts. 5 Theoretical Analysis So far we have developed a lower bound to the hypothesis testing problem, shown that some common detectors do not meet this guarantee, and developed the Lov´asz extended scan statistic from first principles. We will now provide a thorough statistical analysis of the performance of LESS. Previously, electrical network theory, specifically the effective resistances of edges in the graph, has been useful in describing the theoretical performance of a detector derived from uniform spanning tree wavelets [17]. As it turns out the performance of LESS is also dictated by the effective resistances of edges in the graph. Effective Resistance. Effective resistances have been extensively studied in electrical network theory [23]. We define the combinatorial Laplacian of G to be ∆= D −W (Dv,v = out({v}) is the diagonal degree matrix). A potential difference is any z ∈R|E| such that it satisfies Kirchoff’s potential law: the total potential difference around any cycle is 0. Algebraically, this means that ∃x ∈Rp such that ∇x = z. The Dirichlet principle states that any solution to the following program gives an absolute potential x that satisfies Kirchoff’s law: minxx⊤∆x s.t. xS = vS for source/sinks S ⊂[p] and some voltage constraints vS ∈R|S|. By Lagrangian calculus, the solution to the above program is given by x = ∆†v where v is 0 over SC and vS over S, and † indicates the Moore-Penrose pseudoinverse. The effective resistance between a source v ∈V and a sink w ∈V is the potential difference required to create a unit flow between them. Hence, the effective resistance between v and w is rv,w = (δv −δw)⊤∆†(δv −δw), where δv is the Dirac delta function. There is a close connection between effective resistances and random spanning trees. The uniform spanning tree (UST) is a random spanning tree, chosen uniformly at random from the set of all distinct spanning trees. The foundational Matrix-Tree theorem [24, 23] states that the probability of an edge, e, being included in the UST is equal to the edge weight times the effective resistance Were. The UST is an essential component of the proof of our main theorem, in that it provides a mechanism for unravelling the graph while still preserving the connectivity of the graph. We are now in a position to state the main theorem, which will allow us to control the type 1 error (the probability of false alarm) of both the GSS and its relaxation the LESS. Theorem 5. Let rC = max{P (u,v)∈E:u∈C Wu,vr(u,v) : C ∈C} be the maximum effective resistance of the boundary of a cluster C. The following statements hold under the null hypothesis H0 : x = 0: 1. The graph scan statistic, with probability at least 1 −α, is smaller than ˆs ≤ √rC + r 1 2 log p ! p 2 log(p −1) + p 2 log 2 + p 2 log(1/α) (5) 2. The Lov´asz extended scan statistic, with probability at least 1 −α is smaller than ˆl ≤ log(2p) + 1 r√rC + q 1 2 log p 2 log p + 2 v u u t √rC + r 1 2 log p !2 log p + p 2 log p + p 2 log(1/α) (6) The implication of Theorem 5 is that the size of the test may be controlled at level α by selecting thresholds given by (5) and (6) for GSS and LESS respectively. Notice that the control provided for the LESS is not significantly different from that of the GSS. This is highlighted by the following Corollary, which combines Theorem 5 with a type 2 error bound to produce an information theoretic guarantee for the asymptotic performance of the GSS and LESS. 6 Corollary 6. Both the GSS and the LESS asymptotically distinguish H0 from H1 if µ σ = ω  max{ p rC log p, log p}  To summarize we have established that the performance of the GSS and the LESS are dictated by the effective resistances of cuts in the graph. While the condition in Cor. 6 may seem mysterious, the guarantee in fact nearly matches the lower bound for many graph models as we now show. 6 Specific Graph Models Theorem 5 shows that the effective resistance of the boundary plays a critical role in characterizing the distinguishability region of both the the GSS and LESS. On specific graph families, we can compute the effective resistances precisely, leading to concrete detection guarantees that we will see nearly matches the lower bound in many cases. Throughout this section, we will only be working with undirected, unweighted graphs. Recall that Corollary 6 shows that an SNR of ω √rC log p  is sufficient while Theorem 1 shows that Ω p ρ/dmax log p  is necessary for detection. Thus if we can show that rC ≈ρ/dmax, we would establish the near-optimality of both the GSS and LESS. Foster’s theorem lends evidence to the fact that the effective resistances should be much smaller than the cut size: Theorem 7. (Foster’s Theorem [25, 26]) X e∈E re = p −1 Roughly speaking, the effective resistance of an edge selected uniformly at random is ≈(p−1)/m = d−1 ave so the effective resistance of a cut is ≈ρ/dave. This intuition can be formalized for specific models and this improvement by the average degree bring us much closer to the lower bound. 6.1 Edge Transitive Graphs An edge transitive graph, G, is one for which there is a graph automorphism mapping e0 to e1 for any pair of edges e0, e1. Examples include the l-dimensional torus, the cycle, and the complete graph Kp. The existence of these automorphisms implies that every edge has the same effective resistance, and by Foster’s theorem, we know that these resistances are exactly (p −1)/m. Moreover, since edge transitive graphs must be d-regular, we know that m = Θ(pd) so that re = Θ(1/d). Thus as a corollary to Theorem 5 we have that both the GSS and LESS are near-optimal (optimal modulo logarithmic factors whenever ρ/d ≤√p) on edge transitive graphs: Corollary 8. Let G be an edge-transitive graph with common degree d. Then both the GSS and LESS distinguish H0 from H1 provided that: µ = ω  max{ p ρ/d log p, log p}  6.2 Random Geometric Graphs Another popular family of graphs are those constructed from a set of points in RD drawn according to some density. These graphs have inherent randomness stemming from sampling of the density, and thus earn the name random geometric graphs. The two most popular such graphs are symmetric k-nearest neighbor graphs and ǫ-graphs. We characterize the distinguishability region for both. In both cases, a set of points z1, . . . , zp are drawn i.i.d. from a density f support over RD, or a subset of RD. Our results require mild regularity conditions on f, which, roughly speaking, require that supp(f) is topologically equivalent to the cube and has density bounded away from zero (See [27] for a precise definition). To form a k-nearest neighbor graph Gk, we associate each vertex i with a point zi and we connect vertices i, j if zi is amongst the k-nearest neighbors, in ℓ2, of zj or vice versa. In the the ǫ-graph, Gǫ we connect vertices i, j if ||zi, zj|| ≤ǫ for some metric τ. The relationship re ≈1/d, which we used for edge-transitive graphs, was derived in Corollaries 8 and 9 in [27] The precise concentration arguments, which have been done before [17], lead to the following corollary regarding the performance of the GSS and LESS on random geometric graphs: 7 Figure 1: A comparison of detection procedures: spectral scan statistic (SSS), UST wavelet detector (Wavelet), and LESS. The graphs used are the square 2D Torus, kNN graph (k ≈p1/4), and ǫ-graph (with ǫ ≈p−1/3); with µ = 4, 4, 3 respectively, p = 225, and |C| ≈p1/2. Corollary 9. Let Gk be a k-NN graph with k/p →0, k(k/p)2/D →∞and suppose the density f meets the regularity conditions in [27]. Then both the GSS and LESS distinguish H0 from H1 provided that: µ = ω  max{ p ρ/k log p, log p}  If Gǫ is an ǫ-graph with ǫ →0, nǫD+2 →∞then both distinguish H0 from H1 provided that: µ = ω  max r ρ pǫD log p, log p  The corollary follows immediately form Corollary 6 and the proofs in [17]. Since under the regularity conditions, the maximum degree is Θ(k) and Θ(pǫD) in k-NN and ǫ-graphs respectively, the corollary establishes the near optimality (again provided that ρ/d ≤√p) of both test statistics. We performed some experiments using the MRF based algorithm outlined in Prop. 4. Each experiment is made with graphs with 225 vertices, and we report the true positive rate versus the false positive rate as the threshold varies (also known as the ROC.) For each graph model, LESS provides gains over the spectral scan statistic[16] and the UST wavelet detector[17], each of the gains are significant except for the ǫ-graph which is more modest. 7 Conclusions To summarize, while Corollary 6 characterizes the performance of GSS and LESS in terms of effective resistances, in many specific graph models, this can be translated into near-optimal detection guarantees for these test statistics. We have demonstrated that the LESS provides guarantees similar to that of the computationally intractable generalized likelihood ratio test (GSS). Furthermore, the LESS can be solved through successive graph cuts by relating it to MAP estimation in an MRF. Future work includes using these concepts for localizing the activation, making the program robust to missing data, and extending the analysis to non-Gaussian error. Acknowledgments This research is supported in part by AFOSR under grant FA9550-10-1-0382 and NSF under grant IIS-1116458. AK is supported in part by a NSF Graduate Research Fellowship. We would like to thank Sivaraman Balakrishnan for his valuable input in the theoretical development of the paper. References [1] E. Arias-Castro, E.J. Candes, and A. Durand. Detection of an anomalous cluster in a network. The Annals of Statistics, 39(1):278–304, 2011. [2] L. Addario-Berry, N. Broutin, L. Devroye, and G. Lugosi. On combinatorial testing problems. The Annals of Statistics, 38(5):3063–3092, 2010. [3] E. Arias-Castro, E.J. Candes, H. Helgason, and O. Zeitouni. Searching for a trail of evidence in a maze. The Annals of Statistics, 36(4):1726–1757, 2008. [4] V. Cevher, C. Hegde, M.F. Duarte, and R.G. Baraniuk. Sparse signal recovery using markov random fields. Technical report, DTIC Document, 2009. 8 [5] P. Ravikumar and J.D. Lafferty. Quadratic programming relaxations for metric labeling and markov random field map estimation. 2006. [6] R.I. Kondor and J. Lafferty. Diffusion kernels on graphs and other discrete input spaces. In Proceedings of the Nineteenth International Conference on Machine Learning, pages 315–322. Citeseer, 2002. [7] A. Smola and R. Kondor. Kernels and regularization on graphs. Learning theory and kernel machines, pages 144–158, 2003. [8] Y.I. Ingster. Minimax testing of nonparametric hypotheses on a distribution density in the lp metrics. Theory of Probability and its Applications, 31:333, 1987. [9] Y.I. Ingster and I.A. Suslina. Nonparametric goodness-of-fit testing under Gaussian models, volume 169. Springer Verlag, 2003. [10] E. Arias-Castro, D. Donoho, and X. Huo. Near-optimal detection of geometric objects by fast multiscale methods. IEEE Trans. Inform. Theory, 51(7):2402–2425, 2005. [11] L. Jacob, P. Neuvial, and S. Dudoit. Gains in power from structured two-sample tests of means on graphs. Arxiv preprint arXiv:1009.5173, 2010. [12] Daniel B Neill and Andrew W Moore. Rapid detection of significant spatial clusters. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 256–265. ACM, 2004. [13] Deepak Agarwal, Andrew McGregor, Jeff M Phillips, Suresh Venkatasubramanian, and Zhengyuan Zhu. Spatial scan statistics: approximations and performance study. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 24–33. ACM, 2006. [14] Carey E Priebe, John M Conroy, David J Marchette, and Youngser Park. Scan statistics on enron graphs. Computational & Mathematical Organization Theory, 11(3):229–247, 2005. [15] Chih-Wei Yi. A unified analytic framework based on minimum scan statistics for wireless ad hoc and sensor networks. Parallel and Distributed Systems, IEEE Transactions on, 20(9):1233–1245, 2009. [16] J. Sharpnack, A. Rinaldo, and A. Singh. Changepoint detection over graphs with the spectral scan statistic. Arxiv preprint arXiv:1206.0773, 2012. [17] James Sharpnack, Akshay Krishnamurthy, and Aarti Singh. Detecting activations over graphs using spanning tree wavelet bases. arXiv preprint arXiv:1206.0937, 2012. [18] Christos H Papadimitriou and Kenneth Steiglitz. Combinatorial optimization: algorithms and complexity. Courier Dover Publications, 1998. [19] Francis Bach. Convex analysis and optimization with submodular functions: a tutorial. arXiv preprint arXiv:1010.4207, 2010. [20] Vladimir Kolmogorov and Ramin Zabin. What energy functions can be minimized via graph cuts? Pattern Analysis and Machine Intelligence, IEEE Transactions on, 26(2):147–159, 2004. [21] Petter Strandmark and Fredrik Kahl. Parallel and distributed graph cuts by dual decomposition. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2085–2092. IEEE, 2010. [22] David Sontag, Amir Globerson, and Tommi Jaakkola. Introduction to dual decomposition for inference. Optimization for Machine Learning, 1, 2011. [23] R. Lyons and Y. Peres. Probability on trees and networks. Book in preparation., 2000. [24] G. Kirchhoff. Ueber die aufl¨osung der gleichungen, auf welche man bei der untersuchung der linearen vertheilung galvanischer str¨ome gef¨uhrt wird. Annalen der Physik, 148(12):497–508, 1847. [25] R.M. Foster. The average impedance of an electrical network. Contributions to Applied Mechanics (Reissner Anniversary Volume), pages 333–340, 1949. [26] P. Tetali. Random walks and the effective resistance of networks. Journal of Theoretical Probability, 4(1):101–109, 1991. [27] Ulrike Von Luxburg, Agnes Radl, and Matthias Hein. Hitting and commute times in large graphs are often misleading. ReCALL, 2010. [28] R Tyrell Rockafellar. Convex analysis, volume 28. Princeton university press, 1997. [29] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2001. [30] Wai Shing Fung and Nicholas JA Harvey. Graph sparsification by edge-connectivity and random spanning trees. arXiv preprint arXiv:1005.0265, 2010. [31] Michel Ledoux. The concentration of measure phenomenon, volume 89. American Mathematical Soc., 2001. 9
2013
186
4,916
Bellman Error Based Feature Generation using Random Projections on Sparse Spaces Mahdi Milani Fard, Yuri Grinberg, Amir massoud Farahmand, Joelle Pineau, Doina Precup School of Computer Science McGill University Montreal, Canada {mmilan1,ygrinb,amirf,jpineau,dprecup}@cs.mcgill.ca Abstract This paper addresses the problem of automatic generation of features for value function approximation in reinforcement learning. Bellman Error Basis Functions (BEBFs) have been shown to improve policy evaluation, with a convergence rate similar to that of value iteration. We propose a simple, fast and robust algorithm based on random projections, which generates BEBFs for sparse feature spaces. We provide a finite sample analysis of the proposed method, and prove that projections logarithmic in the dimension of the original space guarantee a contraction in the error. Empirical results demonstrate the strength of this method in domains in which choosing a good state representation is challenging. 1 Introduction Policy evaluation, i.e. computing the expected return of a given policy, is at the core of many reinforcement learning (RL) algorithms. In large problems, it is necessary to use function approximation in order to perform this task; a standard choice is to hand-craft parametric function approximators, such as a tile coding, radial basis functions or neural networks. The accuracy of parametrized policy evaluation depends crucially on the quality of the features used in the function approximator, and thus often a lot of time and effort is spent on this step. The desire to make this process more automatic has led to a lot of recent work on feature generation and feature selection in RL (e.g. [1, 2, 3, 4, 5]). An approach that offers good theoretical guarantees is to generate features in the direction of the Bellman error of the current value estimates (Bellman Error Based features, or BEBF). Successively adding exact BEBFs has been shown to reduce the error of a linear value function estimator at a rate similar to value iteration, which is the best one could hope to achieve [6]. Unlike fitted value iteration [7], which works with a fixed feature set, iterative BEBF generation gradually increases the complexity of the hypothesis space by adding new features and thus does not diverge, as long as the error in the generation does not cancel out the contraction effect of the Bellman operator [6]. Several successful methods have been proposed for generating features related to the Bellman error [5, 1, 4, 6, 3]. In practice however, these methods can be computationally expensive when applied in high dimensional input spaces. With the emergence of more high-dimensional RL problems, it has become necessary to design and adapt BEBF-based methods to be more scalable and computationally efficient. In this paper, we present an algorithm that uses the idea of applying random projections specifically in very large and sparse feature spaces (e.g. 105 −106 dimensions). The idea is to iteratively project the original features into exponentially lower-dimensional spaces. Then, we apply linear regression in the smaller spaces, using temporal difference errors as targets, in order to approximate BEBFs. Random projections have been studied extensively in signal processing [8, 9] as well as machine learning [10, 11, 12, 13]. In reinforcement learning, Ghavamzadeh et al. [14] have used random projections in conjunction with LSTD and have shown that this can reduce the estimation error, 1 at the cost of a controlled bias. Instead of compressing the feature space for LSTD, we focus on the BEBF generation setting, which offers better scalability and more flexibility in practice. Our algorithm is well suited for sparse feature spaces, naturally occurring in domains with audio and video inputs [15], and also in tile-coded and discretized spaces. We carry out a finite sample analysis, which helps determine the sizes that should be used for the projections. Our analysis holds for both finite and continuous state spaces and is easy to apply with discretized or tile-coded features, which are popular in many RL applications. The proposed method compares favourably, from a computational point of view, to many other feature extraction methods in high dimensional spaces, as each iteration takes only poly-logarithmic time in the number of dimensions. The method provides guarantees on the reduction of the error, yet needs minimal domain knowledge, as we use agnostic random projections. Our empirical analysis indicates that the proposed method provides similar results to L2-regularized LSTD, but scales much better in time complexity as the observed sparsity decreases. It significantly outperforms L1-regularized methods both in performance and computation time. The algorithm seems robust to the choice of parameters and has small computational and memory complexity. 2 Notation and Background Throughout this paper, column vectors are represented by lower case bold letters, and matrices are represented by bold capital letters. |.| denotes the size of a set, and M(X) is the set of measures on X. ∥.∥0 is Donoho’s zero “norm” indicating the number of non-zero elements in a vector. ∥.∥ denotes the L2 norm for vectors and the operator norm for matrices: ∥M∥= supv ∥Mv∥/∥v∥. The Frobenius norm of a matrix is then defined as: ∥M∥F = qP i,j M2 i,j. Also, we denote the MoorePenrose pseudo-inverse of a matrix M with M†. The weighted L2 norm of a function is defined as ∥f(x)∥ρ(x) = qR |f(x)|2 dρ(x). We focus on spaces that are large, bounded and k-sparse. Our state is represented by a vector x ∈X of D features, having ∥x∥≤1. We assume that x is k-sparse in some known or unknown basis Ψ: X ≜{Ψz, s.t. ∥z∥0 ≤k and ∥z∥≤1}. Such spaces occur both naturally (e.g. image, audio and video signals [15]) as well as from most discretization-based methods (e.g., tile-coding). 2.1 Markov Decision Process A Markov Decision Process (MDP) M = (S, A, T, R) is defined by a (possibly infinite) set of states S, a set of actions A, a transition kernel T : S × A →M(S), where T(.|s, a) defines the distribution of next state given that action a is taken in state s, and a (possibly stochastic) bounded reward function R : S × A →M([0, Rmax]). We assume discounted-reward MDPs, with the discount factor denoted by γ ∈[0, 1). At each discrete time step, the RL agent chooses an action and receives a reward. The environment then changes to a new state, according to the transition kernel. A policy is a (possibly stochastic) function from states to actions. The value of a state s for policy π, denoted by V π(s), is the expected value of the discounted sum of rewards (P t γtrt) if the agent starts in state s and acts according to policy π. Let R(s, π(s)) be the expected reward at state s under policy π. The value function satisfies: V π(s) = R(s, π(s)) + γ Z V π(s′)T(ds′|s, π(s)). (1) Many methods have been developed for finding the value of a policy (policy evaluation) when the transition and reward functions are known. Dynamic programming methods apply iteratively the Bellman operator T to an initial guess of the value function [16]: T V (s) = R(s, π(s)) + γ Z V (s′)T(ds′|s, π(s)), (2) When the transition and reward models are not known, one can use a finite sample set of transitions to learn an approximate value function. When the state space is very large or continuous, the value function is also approximated using a feature vector xs, which is a function of the state s. Often, this approximation is linear: V (s) ≈wT xs. To simplify the derivations, we use V (x) to directly refer to the value estimate of a state with feature vector x. 2 Least-squares temporal difference learning (LSTD) and its variations [17, 18, 19] are among methods that learn a value function based on a finite sample, especially when function approximation is needed. LSTD-type methods are efficient in their use of data, but can be computationally expensive, as they rely on inverting a large matrix. Using LSTD in spaces induced by random projections is a way of dealing with this problem [14]. As we show in our experiments, if the observation space is sparse, we can also use conjugate gradient descent methods to solve the regularized LSTD problem. Stochastic gradient descent methods are alternatives to LSTD in high-dimensional state spaces, as their memory and computational complexity per time step are linear in the number of state features, while providing convergence guarantees [20]. However, online gradient-type methods typically have slow convergence rates and do not make efficient use of the data. 2.2 Bellman Error Based Feature Generation In high-dimensional state spaces, direct estimation of the value function fails to provide good results when using a small number of sampled transitions. Feature selection/extraction methods have thus been used to build better approximation spaces for the value functions [1, 2, 3, 4, 5]. Among these, we focus on methods that aim to generate features in the direction of the Bellman error defined as: eV (.) = T V (.) −V (.). (3) Let Sn = ((xt, rt)n t=1) be a random sample of size n, collected on an MDP with a fixed policy. Given an estimate V of the value function, temporal difference (TD) errors are defined to be: δt = rt + γV (xt+1) −V (xt). (4) It is easy to show that the expectation of the temporal difference at xt equals the Bellman error at that point [16]. TD-errors are thus proxies to estimating the Bellman error. Using temporal differences, Menache et al. [21] introduced two algorithms to construct basis functions for linear function approximation. Keller et al. [3] applied neighbourhood component analysis as a dimensionality reduction technique to construct a low dimensional state space based on the TDerror. In their work, they iteratively add features that would help predict the Bellman error. Parr et al. [6] later showed that any BEBF extraction method with small angular error will provably tighten the approximation error of the value function estimate. Online BEBF extraction methods have also been studied in the RL literature. The incremental Feature Dependency Discovery (iFDD) is a fast online algorithm to extract non-linear binary features for linear function approximation [5]. We note that these algorithms, although theoretically interesting, are difficult to apply to very large state spaces or need specific domain knowledge to generate good features. The problem lies in the large estimation error when predicting BEBFs in high-dimensional state spaces. Our proposed solution leverages the use of simple random projections to alleviate this problem. 2.3 Random Projections and Inner Product Random projections have been introduced in signal processing, as an efficient method for compressing very high-dimensional signals (such as images or video). It is well known that random projections of appropriate sizes preserve enough information to exactly reconstruct the original signal with high probability [22, 9]. This is because random projections are norm and distance-preserving in many classes of feature spaces. There are several types of random projection matrices that can be used. In this work, we assume that each entry in the projection matrix ΦD×d is an i.i.d. sample from a Gaussian distribution: φi,j ∼N(0, 1/d). (5) Recently, it has been shown that random projections of appropriate sizes preserve linearity of a target function on sparse feature spaces. A bound introduced in [11] and later tightened by [23] shows that if a function is linear in a sparse space, it is almost linear in an exponentially smaller projected space. An immediate lemma based on Theorem 2 of [23] bounds the bias induced by random projections: Lemma 1. Let X be a D-dimensional k-sparse space and ΦD×d be a random projection according to Eqn 5. Fix w ∈RD and 1 > ξ0 > 0. Then, for ϵ(ξ0) prj = q 48k d log 4D ξ0 , with probability > 1 −ξ0 : ∀x ∈X : (ΦT w)T (ΦT x) −wT x ≤ϵ(ξ0) prj ∥w∥∥x∥, (6) 3 Hence, projections of size ˜O(k log D) preserve the linearity up to an arbitrary constant. Along with the analysis of the variance of the estimators, this helps bound the prediction error of the linear fit in the compressed space. 3 Compressed Linear BEBFs In this work, we propose a new method to generate BEBFs using linear regression in a small space induced by random projections. We first project the state features into a much smaller space and then regress a hyperplane to the TD-errors. For simplicity, we assume that regardless of the current estimate of the value function, the Bellman error is always linearly representable in the original feature space. This seems like a strong assumption, but is true, for example, in virtually any discretized space, and is also likely to hold in very high dimensional feature spaces1. Linear function approximators can be used to estimate the value of a given state. Let Vm be an estimated value function described in a linear space defined by a feature set Ψ = {ψ1, . . . ψm}. Parr et al. [6] show that if we add a new BEBF ψm+1 = eVm to the feature set, (with mild assumptions) the approximation error on the new linear space shrinks by a factor of γ. They also show that if we can estimate the Bellman error within a constant angular error, cos−1(γ), the error will still shrink. Estimating the Bellman error by regressing to temporal differences in high-dimensional sparse spaces can result in large prediction error. This is due to the large estimation error of regression in high dimensional spaces (over-fitting). However, as discussed in Lemma 1, random projections were shown to exponentially reduce the dimension of a sparse feature space, only at the cost of a controlled constant bias. A variance analysis along with proper mixing conditions can also bound the estimation error due to the variance in MDP returns. The computational cost of the estimation is also much smaller when the regression is applied in the compressed space. 3.1 General CBEBF Algorithm In light of these results, we propose the Compressed Bellman Error Based Feature Generation algorithm (CBEBF). The algorithm iteratively constructs new features using compressed linear regression to the TD-errors, and uses these features with a policy evaluation algorithm to update the estimate of the value function. Algorithm 1 Compressed Bellman Error Based Feature Generation (CBEBF) Input: Sample trajectory Sn = ((xt, rt)n t=1), where xt is the observation received at time t, and rt is the observed reward; Number of BEBFs: m; Projection size schedule: d1, d2, . . . , dm Output: V (.): estimate of the value function Initialize V (.) to be 0 for all x. Initialize the set of BEBFs linear weights Ψ ←∅. for i ←1 to m do Generate projection ΦD×di according to Eqn 5. Calculate TD-errors: δt = rt + γV (xt+1) −V (xt). Apply compressed regression: Let udi×1 be the result of OLS regression in the compressed space, using ΦT xt as inputs and δt as outputs. Add Φu to Ψ. Apply policy evaluation with features {ˆev(x) = xT v | v ∈Ψ} to update V (.). end for The optimal number of BEBFs and the schedule of projection sizes need to be determined and are subjects of future work. But we show in the next section that logarithmic size projections should be enough to guarantee the reduction of error in value function prediction at each step. This makes the algorithm very attractive when it comes to computational and memory complexity, as the regression at each step is only on a small projected feature space. As we discuss in our empirical analysis, the algorithm is fast and robust with respect to the selection of parameters. 1For the more general case, the analysis can be done with respect to the projected Bellman error [6]. We assume linearity of the Bellman error to simplify the derivations. 4 3.2 Simplified CBEBF as Regularized Value Iteration Note that in CBEBF, we can use any type of value function approximation to estimate the value function in each iteration. To simplify the bias–variance analysis and avoid multiple levels of regression, we present here a simplified version of the CBEBF algorithm (SCBEBF). In the simplified version, instead of storing the features in each iteration, new features are added to the value function approximator with constant weight 1. Therefore, the value estimate is simply the sum of all generated BEBFs. As compared to the general CBEBF, the simplified version trivially has lower computational complexity per iteration, as it avoids an extra level of regression based on the features. It also avoids storing the features by simply keeping the sum of all previously generated coefficients. It is important to note that once we use linear value function approximation, the entire BEBF generation process can be viewed as a regularized value iteration algorithm. Each iteration of the algorithm is a regularized Bellman backup which is linear in the features. The coefficients of this linear backup are confined to a lower-dimensional random subspace implicitly induced by the random projection used in each iteration. 3.3 Finite Sample Analysis of Simplified CBEBF This section provides a finite sample analysis of the simplified CBEBF algorithm. In order to provide such analysis, we need to have an assumption on the range of observed TD-errors. This is usually possible by assuming that the current estimate of the value function is bounded, which is easy to enforce by truncating any estimate of the value function between 0 and Vmax = Rmax/(1 −γ). The following theorem shows how well we can estimate the Bellman error by regression to the TDerrors in a compressed space. It highlights the bias–variance trade-off with respect to the choice of the projection size. Theorem 2. Let ΦD×d be a random projection according to Eqn 5. Let Sn = ((xt, rt)n t=1) be a sample trajectory collected on an MDP with a fixed policy with stationary distribution ρ, in a D-dimensional k-sparse feature space, with D > d ≥10. Let τ be the forgetting time of the chain (defined in the appendix). Fix any estimate V of the value function, and the corresponding TD-errors δt’s bounded by ±δmax. Assume that the Bellman error is linear in the features with parameter w. With compressed OLS regression we have w(Φ) ols = (XΦ)†δ, where X is the matrix containing xt’s and δ is the vector of TD-errors. Assume that X is of rank larger than d. For any fixed 0 < ξ < 1/4, with probability no less than 1 −ξ, the prediction error xT Φw(Φ) ols −eV (x) ρ(x) is bounded by: 12 αϵ(ξ/4) prj ∥w∥∥x∥ρ r 1 dν + 4αϵ(ξ/4) prj ∥w∥ s dτ nν log d ξ + 2αδmax ∥x∥ρ s κd nν log d ξ (7) where ϵ(ξ/4) prj is according to Lemma 1, κ and ν are the condition number and the smallest positive eigenvalue of the empirical gram matrix 1 nΦT XT XΦ, and we define maximum norm scaling factor α = max(1, maxz∈X zT Φ / ∥z∥). A detailed proof is included in the appendix. The sketch of the proof is as follows: Lemma 1 suggests that if the Bellman error is linear in the original features, the bias due to the projection can be bounded within a controlled constant error with logarithmic size projections. If the Markov chain uniformly quickly forgets its past, one can also bound the on-measure variance part of the error. The variance terms, of course, go to 0 as the number of sampled transitions n goes to infinity. Theorem 2 can be further simplified by using concentration bounds on random projections as defined in Eqn 5. The norm of Φ can be bounded using the bounds discussed in Cand`es and Tao [8]; we have with probability 1 −δΦ: ∥Φ∥≤ p D/d + p (2 log(2/δΦ))/d + 1 and ∥Φ†∥≤ hp D/d − p (2 log(2/δΦ))/d −1 i−1 . Similarly, when n > d, we expect the smallest and biggest singular values of XΦ to be of order of ˜O( p n/d). Thus we have κ = O(1) and ν = O(1/d). Projections are norm-preserving and thus 5 α ≃1. Assuming that n = ˜O(d2), we can rewrite the bound on the error up to logarithmic terms as: ˜O  ∥w∥∥x∥ρ(x) p k log D/d  + ˜O d/√n  . (8) The first term is a part of the bias due to the projection (excess approximation error). The rest is the combined variance terms that shrink with larger training sets (estimation error). We clearly observe the trade-off with respect to the compressed dimension d. With the assumptions discussed above, we can see that projection of size d = ˜O(k log D) should be enough to guarantee arbitrarily small bias, as long as ∥w∥∥x∥ρ(x) is small. Thus, the bound is tight enough to prove reduction in the error as new BEBFs are added to the feature set. Note that this bound matches that of Ghavamzadeh et al. [14]. The variance term is of order p d/nν. Thus, the dependence on the smallest eigenvalue of the gram matrix makes the variance term order d/√n rather than the expected p d/n. We expect the use of ridge regression instead of OLS in the inner loop of the algorithm to remove this dependence and help with the convergence rate (see appendix). As mentioned before, our simplified version of the algorithm does not store the generated BEBFs (such that it could later apply value function approximation over them). It adds up all the features with weight 1 to approximate the value function. Therefore our analysis is different from that of Parr et al. [6]. The following lemma (simplification of results in Parr et al. [6]) provides a sufficient condition for the shrinkage of the error in the value function prediction: Lemma 3. Let V π be the value function of a policy π imposing stationary measure ρ, and let eV be the Bellman error under policy π for an estimate V . Given a BEBF ψ satisfying: ∥ψ(x) −eV (x)∥ρ(x) ≤ϵ ∥eV (x)∥ρ(x) , (9) we have that: ∥V π(x) −(V (x) + ψ(x))∥ρ(x) ≤(γ + ϵ + ϵγ) ∥V π(x) −V (x)∥ρ(x) . (10) Theorem 2 (simplified in Equation (8)) does not state the error in terms of ∥eV (x)∥ρ = wT x ρ, as needed by this lemma, but rather does it in terms of ∥w∥∥x∥ρ. Therefore, if there is a large gap between these terms, we cannot expect to see shrinkage in the error (we can only show that the error can be shrunk to a bounded uncontrolled constant). Ghavamzadeh et al. [14] and Maillard and Munos [10, 12] provide some discussion on the cases were wT x ρ and ∥w∥∥x∥ρ are expected to be close. These cases include when the features are rescaled orthonormal basis functions and also with specific classes of wavelet functions. The dependence on the norm of w is conjectured to be tight by the compressed sensing literature [24], making this bound asymptotically the best one can hope for. This dependence also points out an interesting link between our method and L2-regularized LSTD. We expect ridge regression to be favourable in cases where the norm of the weight vector is small. The upper bound on the error of compressed regression is also smaller when the norm of w is small. Lemma 4. Assume the conditions of Theorem 2. Further assume for some constants c1, c2, c3 ≥1: ∥w∥≤c1 wT x ρ and ∥x∥ρ ≤c2 wT x ρ and 1/ν ≤c3d, (11) There exist universal constants c4 and c5, such that for any γ < γ0 < 1 and 0 < ξ < 1/4, if: d ≥α2c2 1c2 2c3c4  1 + γ γ0 −γ 2 k log D ξ and n ≥(τ + α2c2 2c3δ2 maxκ)c5  1 + γ γ0 −γ 2 d2 log d ξ , then with the addition of the estimated BEBF, we have that with probability 1 −ξ: ∥V π(x) −(V (x) + ψ(x))∥ρ(x) ≤γ0 ∥V π(x) −V (x)∥ρ(x) . (12) The proof is included in the appendix. Lemma 4 shows that with enough sampled transitions, using random projections of size d = ˜O  ( 1+γ γ0−γ )2k log D  guarantees contraction in the error by a factor of γ0. Using union bound over m iterations of the algorithm, we prove that projections of size d = ˜O  ( 1+γ γ0−γ )2k log(mD)  and a sample of transitions of size n = ˜O  ( 1+γ γ0−γ )2d2 log(md)  suffices to shrink the error by a factor of γm 0 after m iterations. 6 4 Empirical Analysis We conduct a series of experiments to evaluate the performance of our algorithm and compare it against viable alternatives. Experiments are performed using a simulator that models an autonomous helicopter in the flight regime close to hover [25]. Our goal is to evaluate the value function associated with the manually tuned policy provided with the simulator. We let the helicopter free fall for 5 time-steps before the policy takes control. We then collect 100 transitions while the helicopter hovers. We run this process multiple times to collect more trajectories on the policy. The original state space of the helicopter domain consists of 12 continuous features. 6 of these features corresponding to the velocities and position, capture most of the data needed for policy evaluation. We use tile-coding on these 6 features as follows: 8 randomly positioned grids of size 16 × 16 × 16 are placed over forward, sideways and downward velocity. 8 grids of similar structure are placed on features corresponding to the hovering coordinates. The constructed feature space is thus of size 65536. Note that our choice of tile-coding for this domain is for demonstration purposes. Since the true value function is not known in our case, we evaluate the performance of the algorithm by measuring the normalized return prediction error (NRPE) on a large test set. Let U(xi) be the empirical return observed for xi in a testing trajectory, and ¯U be its average over the testing measure µ(x). We define NRPE(V ) = ∥U(x) −V (x)∥µ(x)/∥U(x) −¯U∥µ(x). Note that the best constant predictor has NRPE = 1. We start by an experiment to observe the behaviour of the prediction error in SCBEBF as we run more iterations of the algorithm. We collect 3000 sample transitions for training. We experiment with 3 schedules for the projection size: (1) Fix d = 300 for 300 steps. (2) Fix d = 30 for 300 steps. (3) Let d decrease with each iteration i: d = ⌊300e−i/30⌋. Figure 1 (left) shows the error averaged over 5 runs. When d is fixed to a large number, the prediction error drops rapidly, but then rises due to over-fitting. This problem can be mitigated by using a smaller fixed projection size at the cost of slower convergence. In our experiments, we find a gradual decreasing schedule to provide fast and robust convergence with minimal over-fitting effects. 0 50 100 150 200 250 300 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 Iteration NRPE d=30 d=300 d=300 exp(−i/30) 1000 2000 3000 4000 5000 6000 0.44 0.46 0.48 0.5 0.52 0.54 0.56 0.58 0.6 Sample Size NRPE L2−LSTD L1−LSTD CLSTD SCBEBF Figure 1: Left: NRPE of SCBEBF for different number of projections, under different choices of d, averaged over 5 runs. Right: Comparison of the prediction error of different methods for varying sample sizes. 95% confidence intervals are tight (less than 0.005 in width) and are not shown. We next compare SCBEBF against other alternatives. There are only a few methods that can be compared against our algorithm due to the high dimensional feature space. We compare against Compressed LSTD (CLSTD) [14], L2-Regularized LSTD using a Biconjugate gradient solver (L2LSTD), and L1-Regularized LSTD using LARS-TD [2] with a Biconjugate gradient solver in the inner loop (L1-LSTD). These conjugate gradient solvers exploit the sparsity of the feature space to converge faster to the solution of linear equations [26]. We avoided online and stochastic gradient type methods as they are not very efficient in sample complexity. We compare the described methods while increasing the size of the training set. The projection schedule for SCBEBF is set to d = ⌊500e−i/300⌋for all sample sizes. The regularization parameter of L2-LSTD was chosen among a small set of values using 1/5 of the training data as validation set. Due to memory and time constraints, the optimal choice of parameters could not be set for CLSTD and L1-LSTD. The maximum size of projection for CLSTD and the maximum number of non-zero coefficients for L1-LSTD was set to 3000. CLSTD would run out of memory and L1-LSTD would take multiple hours if we increase these limits. 7 The results, averaged over 5 runs, are shown in Figure 1 (right). We see that L2-LSTD outperforms other methods, closely followed by SCBEBF. Not surprisingly, L1-LSTD and CLSTD are not competitive here as they are suboptimal with the mentioned constraints. This is a consequence of the fact that these algorithms scale worse with respect to memory and time complexity. We conjecture that L2-LSTD is benefiting from the sparsity of the features space, not only in running time (due to the use of conjugate gradient solvers), but also in sample complexity. This makes L2LSTD an attractive choice when the features are observed in the sparse basis. However, if the features are sparse in some unknown basis (observation is not sparse), then the time complexity of any linear solver in the observation basis can be prohibitive. SCBEBF, however, scales much better in such cases as the main computation is done in the compressed space. 0 100 200 300 400 0 50 100 150 200 250 Number of non−zero features CPU Time (Seconds) L2−LSTD SCBEBF Figure 2: Runtime of L2-LSTD and SCBEBF with varying observation sparsity. To highlight this effect, we construct an experiment in which we gradually increase the number of non-zero features using a change of basis. The error of both L2-LSTD and SCBEBF remain mostly unchanged as predicted by the theory. We thus only compare the running times as we change the observation sparsity. Figure 2 shows the CPU time used by each methods with sample size of 3000, averaged over 5 runs (using Matlab on a 3.2GHz Quad-Core Intel Xeon processor). We run 100 iterations of SCBEBF with d = ⌊300e−i/30⌋(as in the first experiment), and set the regularization parameter of L2-LSTD to the optimal value. We can see that the running time L2-LSTD quickly becomes prohibitive with the decreased observation sparsity, whereas the running time of SCBEBF grows very slowly (and linearly). 5 Discussion We provided a simple, fast and robust feature extraction algorithm for policy evaluation in sparse and high dimensional state spaces. Using recent results on the properties of random projections, we proved that in sparse spaces, random projections of sizes logarithmic in the original dimension are sufficient to preserve linearity. Therefore, BEBFs can be generated on compressed spaces induced by small random projections. Our finite sample analysis provides guarantees on the reduction in prediction error after the addition of such BEBFs. Our assumption of the linearity of the Bellman error in the original feature space might be too strong for some problems. We introduced this assumption to simplify the analysis. However, most of the discussion can be rephrased in terms of the projected Bellman error, and we expect this approach to carry through and provide more general results (e.g. see Parr et al. [6]). Compared to other regularization approaches to RL [2, 27, 28], our random projection method does not require complex optimization, and thus is faster and more scalable. If features are observed in the sparse basis, then conjugate gradient solvers can be used for regularized value function approximation. However, CBEBF seems to have better performance with smaller sample sizes and provably works under any observation basis. Finding the optimal choice of the projection size schedule and the number of iterations is an interesting subject of future research. We expect the use of cross-validation to suffice for the selection of the optimal parameters, due to the robustness that we observed in the results of the algorithm. A tighter theoretical bound might also help provide an analytical, closed-form answer to how parameters should be selected. One would expect a slow reduction in the projection size to be favourable. Acknowledgements: Financial support for this work was provided by Natural Sciences and Engineering Research Council Canada, through their Discovery Grants Program. 8 References [1] D. Di Castro and S. Mannor. Adaptive bases for reinforcement learning. Machine Learning and Knowledge Discovery in Databases, pages 312–327, 2010. [2] J.Z. Kolter and A.Y. Ng. Regularization and feature selection in least-squares temporal difference learning. In International Conference on Machine Learning, 2009. [3] P.W. Keller, S. Mannor, and D. Precup. Automatic basis function construction for approximate dynamic programming and reinforcement learning. In International Conference on Machine Learning, 2006. [4] P. Manoonpong, F. W¨org¨otter, and J. Morimoto. Extraction of reward-related feature space using correlation-based and reward-based learning methods. Neural Information Processing. Theory and Algorithms, pages 414–421, 2010. [5] A. Geramifard, F. Doshi, J. Redding, N. Roy, and J.P. How. Online discovery of feature dependencies. In International Conference on Machine Learning, 2011. [6] R. Parr, C. Painter-Wakefield, L. Li, and M. Littman. Analyzing feature generation for value-function approximation. In International Conference on Machine Learning, 2007. [7] J. Boyan and A.W. Moore. Generalization in reinforcement learning: Safely approximating the value function. In Advances in Neural Information Processing Systems, 1995. [8] E.J. Cand`es and T. Tao. Near-optimal signal recovery from random projections: Universal encoding strategies. Information Theory, IEEE Transactions on, 52(12):5406–5425, 2006. [9] E.J. Cand`es and M.B. Wakin. An introduction to compressive sampling. Signal Processing Magazine, IEEE, 25(2):21–30, 2008. [10] O.A. Maillard and R. Munos. Linear regression with random projections. Journal of Machine Learning Research, 13:2735–2772, 2012. [11] M.M. Fard, Y. Grinberg, J. Pineau, and D. Precup. Compressed least-squares regression on sparse spaces. In AAAI, 2012. [12] O.A. Maillard and R. Munos. Compressed least-squares regression. In Advances in Neural Information Processing Systems, 2009. [13] S. Zhou, J. Lafferty, and L. Wasserman. Compressed regression. In Proceedings of Advances in neural information processing systems, 2007. [14] M. Ghavamzadeh, A. Lazaric, O.A. Maillard, and R. Munos. LSTD with random projections. In Advances in Neural Information Processing Systems, 2010. [15] B.A. Olshausen, P. Sallee, and M.S. Lewicki. Learning sparse image codes using a wavelet pyramid architecture. In Advances in neural information processing systems, 2001. [16] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. [17] S.J. Bradtke and A.G. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22(1):33–57, 1996. [18] J.A. Boyan. Technical update: Least-squares temporal difference learning. Machine Learning, 49(2): 233–246, 2002. [19] M.G. Lagoudakis and R. Parr. Least-squares policy iteration. Journal of Machine Learning Research, 4: 1107–1149, 2003. ISSN 1532-4435. [20] H.R. Maei and R.S. Sutton. GQ (λ): A general gradient algorithm for temporal-difference prediction learning with eligibility traces. In Third Conference on Artificial General Intelligence, 2010. [21] I. Menache, S. Mannor, and N. Shimkin. Basis function adaptation in temporal difference reinforcement learning. Annals of Operations Research, 134(1):215–238, 2005. [22] M.A. Davenport, M.B. Wakin, and R.G. Baraniuk. Detection and estimation with compressive measurements. Dept. of ECE, Rice University, Tech. Rep, 2006. [23] M.M. Fard, Y. Grinberg, J. Pineau, and D. Precup. Random projections preserve linearity in sparse spaces. School of Computer Science, Mcgill University, Tech. Rep, 2012. [24] M.A. Davenport, P.T. Boufounos, M.B. Wakin, and R.G. Baraniuk. Signal processing with compressive measurements. Selected Topics in Signal Processing, IEEE Journal of, 4(2):445–460, 2010. [25] Andrew Y Ng, Adam Coates, Mark Diel, Varun Ganapathi, Jamie Schulte, Ben Tse, Eric Berger, and Eric Liang. Autonomous inverted helicopter flight via reinforcement learning. In Experimental Robotics IX, pages 363–372. Springer, 2006. [26] Richard Barrett, Michael Berry, Tony F Chan, James Demmel, June Donato, Jack Dongarra, Victor Eijkhout, Roldan Pozo, Charles Romine, and Henk Van der Vorst. Templates for the solution of linear systems: building blocks for iterative methods. Number 43. Society for Industrial and Applied Mathematics, 1987. [27] A.M. Farahmand, M. Ghavamzadeh, and C. Szepesv´ari. Regularized policy iteration. In Advances in Neural Information Processing Systems, 2010. [28] J. Johns, C. Painter-Wakefield, and R. Parr. Linear complementarity for regularized policy evaluation and improvement. In Advances in Neural Information Processing Systems, 2010. 9
2013
187
4,917
Similarity Component Analysis Soravit Changpinyo∗ Dept. of Computer Science U. of Southern California Los Angeles, CA 90089 schangpi@usc.edu Kuan Liu∗ Dept. of Computer Science U. of Southern California Los Angeles, CA 90089 kuanl@usc.edu Fei Sha Dept. of Computer Science U. of Southern California Los Angeles, CA 90089 feisha@usc.edu Abstract Measuring similarity is crucial to many learning tasks. To this end, metric learning has been the dominant paradigm. However, similarity is a richer and broader notion than what metrics entail. For example, similarity can arise from the process of aggregating the decisions of multiple latent components, where each latent component compares data in its own way by focusing on a different subset of features. In this paper, we propose Similarity Component Analysis (SCA), a probabilistic graphical model that discovers those latent components from data. In SCA, a latent component generates a local similarity value, computed with its own metric, independently of other components. The final similarity measure is then obtained by combining the local similarity values with a (noisy-)OR gate. We derive an EM-based algorithm for fitting the model parameters with similarity-annotated data from pairwise comparisons. We validate the SCA model on synthetic datasets where SCA discovers the ground-truth about the latent components. We also apply SCA to a multiway classification task and a link prediction task. For both tasks, SCA attains significantly better prediction accuracies than competing methods. Moreover, we show how SCA can be instrumental in exploratory analysis of data, where we gain insights about the data by examining patterns hidden in its latent components’ local similarity values. 1 Introduction Learning how to measure similarity (or dissimilarity) is a fundamental problem in machine learning. Arguably, if we have the right measure, we would be able to achieve a perfect classification or clustering of data. If we parameterize the desired dissimilarity measure in the form of a metric function, the resulting learning problem is often referred to as metric learning. In the last few years, researchers have invented a plethora of such algorithms [18, 5, 11, 13, 17, 9]. Those algorithms have been successfully applied to a wide range of application domains. However, the notion of (dis)similarity is much richer than what metric is able to capture. Consider the classical example of CENTAUR, MAN and HORSE. MAN is similar to CENTAUR and CENTAUR is similar to HORSE. Metric learning algorithms that model the two similarities well would need to assign small distances among those two pairs. On the other hand, the algorithms will also need to strenuously battle against assigning a small distance between MAN and HORSE due to the triangle inequality, so as to avoid the fallacy that MAN is similar to HORSE too! This example (and others [12]) thus illustrates the important properties, such as non-transitiveness and non-triangular inequality, of (dis)similarity that metric learning has not adequately addressed. Representing objects as points in high-dimensional feature spaces, most metric learning learning algorithms assume that the same set of features contribute indistinguishably to assessing similarity. In ∗Equal contributions 1 k Θ m x n x k S S N N × K K 12 S 32 S 31 S 91 .0 )1 ( = = s p 9.0 1 = p 1 S 2 S 1x 2 x 2 x 3 x 1x 3 x 1 S 2 S 1 S 2 S 91 .0 )1 ( = = s p 19 .0 )1 ( = = s p 1.0 2 = p 1.0 1 = p 9.0 2 = p 1.0 1 = p 1.0 2 = p Figure 1: Similarity Component Analysis and its application to the example of CENTAUR, MAN and HORSE. SCA has K latent components which give rise to local similarity values sk conditioned on a pair of data xm and xn. The model’s output s is a combination of all local values through an OR model (straightforward to extend to a noisy-OR model). Θk is the parameter vector for p(sk|xm, xn). See texts for details. particular, the popular Mahalanobis metric weights each feature (and their interactions) additively when calculating distances. In contrast, similarity can arise from a complex aggregation of comparing data instances on multiple subsets of features, to which we refer as latent components. For instance, there are multiple reasons for us to rate two songs being similar: being written by the same composers, being performed by the same band, or of the same genre. For an arbitrary pair of songs, we can rate the similarity between them based on one of the many components or an arbitrary subset of components, while ignoring the rest. Note that, in the learning setting, we observe only the aggregated results of those comparisons — which components are used is latent. Multi-component based similarity exists also in other types of data. Consider a social network where the network structure (i.e., links) is a supposition of multiple networks where people are connected for various organizational reasons: school, profession, or hobby. It is thus unrealistic to assume that the links exist due to a single cause. More appropriately, social networks are “multiplex” [6, 15]. In this paper, we propose Similarity Component Analysis (SCA) to model the richer similarity relationships beyond what current metric learning algorithms can offer. SCA is a Bayesian network, illustrated in Fig. 1. The similarity (node s) is modeled as a probabilistic combination of multiple latent components. Each latent component (sk) assigns a local similarity value to whether or not two objects are similar, inferring from only a subset (but unknown) of features. The (local) similarity values of those latent components are aggregated with a (noisy-) OR model. Intuitively, two objects are likely to be similar if they are considered to be similar by at least one component. Two objects are likely to be dissimilar if none of the components voices up. We derive an EM-based algorithm for fitting the model with data annotated with similarity relationships. The algorithm infers the intermediate similarity values of latent components and identifies the parameters for the (noisy-)OR model, as well as each latent component’s conditional distribution, by maximizing the likelihood of the training data. We validate SCA on several learning tasks. On synthetic data where ground-truth is available, we confirm SCA’s ability in discovering latent components and their corresponding subsets of features. On a multiway classification task, we contrast SCA to state-of-the-art metric learning algorithms and demonstrate SCA’s superior performance in classifying data samples. Finally, we use SCA to model the network link structures among research articles published at NIPS proceedings. We show that SCA achieves the best link prediction accuracy among competitive algorithms. We also conduct extensive analysis on how learned latent components effectively represent link structures. In section 2, we describe the SCA model and inference and learning algorithms. We report our empirical findings in section 3. We discuss related work in section 4 and conclude in section 5. 2 Approach We start by describing in detail Similarity Component Analysis (SCA), a Bayesian network for modeling similarity between two objects. We then describe the inference procedure and learning algorithm for fitting the model parameters with similarity-annotated data. 2 2.1 Probabilistic model of similarity In what follows, let (u, v, s) denote a pair of D-dimensional data points u, v ∈RD and their associated value of similarity s ∈{DISSIMILAR, SIMILAR} or {0, 1} accordingly. We are interested in modeling the process of assigning s to these two data points. To this end, we propose Similarity Component Analysis (SCA) to model the conditional distribution p(s|u, v), illustrated in Fig. 1. In SCA, we assume that p(s|u, v) is a mixture of multiple latent components’s local similarity values. Each latent component evaluates its similarity value independently, using only a subset of the D features. Intuitively, there are multiple reasons of annotating whether or not two data instances are similar and each reason focuses locally on one aspect of the data, by restricting itself to examining only a different subset of features. Latent components Formally, let u[k] denote the subset of features from u corresponding to the k-th latent component where [k] ⊂{1, 2, . . . , D}. The similarity assessment sk of this component alone is determined by the distance between u[k] and v[k] dk = (u −v)TMk(u −v) (1) where Mk ⪰0 is a D × D positive semidefinite matrix, used to measure the distance more flexibly than the standard Euclidean metric. We restrict Mk to be sparse, in particular, only the corresponding [k]-th rows and columns are non-zeroes. Note that in principle [k] needs to be inferred from data, which is generally hard. Nonetheless, we have found that empirically even without explicitly constraining Mk, we often obtain a sparse solution. The distance dk is transformed to the probability for the Bernoulli variable sk according to P(sk = 1|u, v) = (1 + e−bk)[1 −σ(dk −bk)] (2) where σ(·) is the sigmoid function σ(t) = (1 + e−t)−1 and bk is a bias term. Intuitively, when the (biased) distance (dk −bk) is large, sk is less probable to be 1 and the two data points are regarded less similar. Note that the constraint Mk being positive semidefinite is important as this will constrain the probability to be bounded above by 1. Combining local similarities Assume that there are K latent components. How can we combine all the local similarity assessments? In this work, we use an OR-gate. Namely, P(s = 1|s1, s2, · · · , sK) = 1 − K Y k=1 I[sk = 0] (3) Thus, the two data points are similar (s = 1) if at least one of the aspects deems so, corresponding to sk = 1 for a particular k. The OR-model can be extended to the noisy-OR model [14]. To this end, we model the non-deterministic effect of each component on the final similarity value, P(s = 1|sk = 1) = τk = 1 −θk, P(s = 1|sk = 0) = 0 (4) In essence, the uncertainty comes from our probability of failure θk (false negative) to identify the similarity if we are only allowed to consider one component at a time. If we can consider all components at the same time, this failure probability would be reduced. The noisy-OR model captures precisely this notion: P(s = 1|s1, s2, · · · , sK) = 1 − K Y k=1 θI[sk=1] k (5) where the more sk = 1, the less the false-negative rate is after combination. Note that the noisy-OR model reduces to the OR-model eq. (3) when θk = 0 for all k. Similarity model Our desired model for the conditional probability p(s|u, v) is obtained by marginalizing all possible configurations of the latent components s = {s1, s2, · · · , sK} P(s = 0|u, v) = X s P(s = 0|s) Y k P(sk|u, v) = X s Y k θI[sk=1] k P(sk|u, v) = Y k [θkpk + 1 −pk] = Y k [1 −τkpk] (6) where pk = p(sk = 1|u, v) is a shorthand for eq. (2). Note that despite the exponential number of configurations for s, the marginalized probability is tractable. For the OR-model where θk = 0, the conditional probability simplifies to P(s = 0|u, v) = Q k[1 −pk]. 3 2.2 Inference and learning Given an annotated training dataset D = {(xm, xn, smn)}, we learn the parameters, which include all the positive semidefinite matrices Mk, the biases bk and the false negative rates θk (if noisy-OR is used), by maximizing the likelihood of D. Note that we will assume that K is known throughout this work. We develop an EM-style algorithm to find the local optimum of the likelihood. Posterior The posteriors over the hidden variables are computationally tractable: qk = P(sk = 1|u, v, s = 0) = pkθk Q l̸=k [1 −τlpl] P(s = 0|u, v) rk = P(sk = 1|u, v, s = 1) = pk  1 −θk Q l̸=k [1 −τlpl]  P(s = 1|u, v) (7) For OR-model eq. (3), these posteriors can be further simplified as all θk = 0. Note that, these posteriors are sufficient to learn the parameters Mk and bk. To learn the parameters θk, however, we need to compute the expected likelihood with respect to the posterior P(s|u, v, s). While this posterior is tractable, the expectation of the likelihood is not and variational inference is needed [10]. We omit the derivation for brevity. In what follows, we focus on learning Mk and bk. For the k-th component, the relevant terms in the expected log-likelihood, given the posteriors, from a single similarity assessment s on (u, v), is Jk = q1−s k rs k log P(sk = 1|u, v) + (1 −q1−s k rs k) log(1 −P(sk = 1|u, v)) (8) Learning the parameters Note that Jk is not jointly convex in bk and Mk. Thus, we optimize them alternatively. Concretely, fixing Mk, we grid search and optimize over bk. Fixing bk, maximizing Jk with respect to Mk is convex optimization as Jk is a concave function in Mk given the linear dependency of the distance eq. (1) on this parameter. We use the method of projected gradient ascent. Essentially, we take a gradient ascent step to update Mk iteratively. If the update violates the positive semidefinite constraint, we project back to the feasible region by setting all negative eigenvalues of Mk to zeroes. Alternatively, we have found that reparameterizing Jk in the following form Mk = LT kLk is more computationally advantageous, as Lk is unconstrained. We use L-BFGS to optimize with respect to Lk and obtain faster convergence and better objective function values. (While this procedure only guarantees local optima, we observe no significant detrimental effect of arriving at those solutions.) We give the exact form of gradients with respect to Mk and Lk in the Suppl. Material. 2.3 Extensions Variants to local similarity models The choice of using logistic-like functions eq. (2) for modeling local similarity of the latent components is orthogonal to how those similarities are combined in eq. (3) or eq. (5). Thus, it is relatively straightforward to replace eq. (2) with a more suitable one. For instance, in some of our empirical studies, we have constrained Mk to be a diagonal matrix with nonnegative diagonal elements. This is especially useful when the feature dimensionality is extremely high. We view this flexibility as a modeling advantage. Disjoint components We could also explicitly express our desiderata that latent components focus on non-overlapping features. To this end, we penalize the likelihood of the data with the following regularizer to promote disjoint components R({Mk}) = X k,k′ diag(Mk)Tdiag(Mk′) (9) where diag(·) extracts the diagonal elements of the matrix. As the metrics are constrained to be positive semidefinite, the inner product attains its minimum of zero when the diagonal elements, which are nonnegative, are orthogonal to each other. This will introduce zero elements on the diagonals of the metrics, which will in turn deselect the corresponding feature dimensions, because the corresponding rows and columns of those elements are necessarily zero due to the positive semidefinite constraints. Thus, metrics that have orthogonal diagonal vectors will use non-overlapping subsets of features. 4 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 true metrics 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 recovered metrics 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 (a) Disjoint ground-truth metrics 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 true metrics 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 recovered metrics 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 10 20 30 5 10 15 20 25 30 (b) Overlapping ground-truth metrics Figure 2: On synthetic datasets, SCA successfully identifies the sparse structures and (non)overlapping patterns of ground-truth metrics. See texts for details. Best viewed in color. 3 Experimental results We validate the effectiveness of SCA in modeling similarity relationships on three tasks. In section 3.1, we apply SCA to synthetic datasets where the ground-truth is available to confirm SCA’s ability in identifying correctly underlying parameters. In section 3.2, we apply SCA to a multiway classification task to recognize images of handwritten digits where similarity is equated to having the same class label. SCA attains superior classification accuracy to state-of-the-art metric learning algorithms. In section 3.3, we apply SCA to a link prediction problem for a network of scientific articles. On this task, SCA outperforms competing methods significantly, too. Our baseline algorithms for modeling similarity are information-theoretic metric learning (ITML) [5] and large margin nearest neighbor (LMNN) [18]. Both methods are discriminative approaches where a metric is optimized to reduce the distances between data points from the same label class (or similar data instances) and increase the distances between data points from different classes (or dissimilar data instances). When possible, we also contrast to multiple metric LMNN (MM-LMNN) [18], a variant to LMNN where multiple metrics are learned from data. 3.1 Synthetic data Data We generate a synthetic dataset according to the graphical model in Fig. 1. Specifically, our feature dimensionality is D = 30 and the number of latent components is K = 5. For each component k, the corresponding metric Mk is a D × D sparse positive semidefinite matrix where only elements in a 6 × 6 matrix block on the diagonal are nonzero. Moreover, for different k, these block matrices do not overlap in rows and columns indices. In short, these metrics mimic the setup where each component focuses on its own 1/K-th of total features that are disjoint from each other. The first row of Fig. 2(a) illustrates these 5 matrices while the black background color indicates zero elements. The values of nonzero elements are randomly generated as long as they maintain the positive semidefiniteness of the metrics. We set the bias term bk to zeroes for all components. We sample N = 500 data points randomly from RD. We select a random pair and compute their similarity according to eq. (6) and threshold at 0.5 to yield a binary label s ∈{0, 1}. We select randomly 74850 pairs for training, 24950 for development, 24950 for testing. Method We use the OR-model eq. (3) to combine latent components. We evaluate the results of SCA on two aspects: how well we can recover the ground-truth metrics (and biases) and how well we can use the parameters to predict similarities on the test set. Results The second row of Fig. 2(a) contrasts the learned metrics to the ground-truth (the first row). Clearly, these two sets of metrics have almost identical shapes and sparse structures. Note that for this experiment, we did not use the disjoint regularizer (described in section 2.3) to promote sparsity and disjointness in the learned metrics. Yet, the SCA model is still able to identify those structures. For the biases, SCA identifies them as being close to zero (details are omitted for brevity). 5 Table 1: Similarity prediction accuracies and standard errors (%) on the synthetic dataset BASELINES SCA ITML LMNN K = 1 K = 3 K = 5 K = 7 K = 10 K = 20 72.7±0.0 71.3±0.2 72.8±0.0 82.1±0.1 91.5±0.1 91.7±0.1 91.8±0.1 90.2±0.4 Table 2: Misclassification rates (%) on the MNIST recognition task BASELINES SCA D EUC. ITML LMNN MM-LMNN K = 1 K = 5 K = 10 25 21.6 15.1 20.6 20.2 17.7 ± 0.9 16.0 ± 1.5 14.5 ± 0.6 50 18.7 13.35 16.5 13.6 13.8 ± 0.3 12.0 ± 1.1 11.4 ± 0.6 100 18.1 11.85 13.4 9.9 12.1 ± 0.1 10.8 ± 0.6 11.1 ± 0.3 Table 1 contrasts the prediction accuracies by SCA to competing methods. Note that ITML, LMNN and SCA with K = 1 perform similarly. However, when the number of latent components increases, SCA outperforms other approaches by a large margin. Also note that when the number of latent components exceeds the ground-truth K = 5, SCA reaches a plateau until overfitting. In real-world data, “true metrics” may overlap, that is, it is possible that different components of similarity rely on overlapping set of features. To examine SCA’s effectiveness in this scenario, we create another synthetic data where true metrics heavily overlap, illustrated in the first row of Fig. 2(b). Nonetheless, SCA is able to identify the metrics correctly, as seen in the second row. 3.2 Multiway classification For this task, we use the MNIST dataset, which consists of 10 classes of hand-written digit images. We use PCA to reduce the original dimension from 784 to D = 25, 50 and 100, respectively. We use 4200 examples for training, 1800 for development and 2000 for testing. The data is in the format of (xn, yn) where yn is the class label. We convert them into the format (xm, xn, smn) that SCA expects. Specifically, for every training data point, we select its 15 nearest neighbors among samples in the same class and formulate 15 similar relationships. For dissimilar relationships, we select its 80 nearest neighbors among samples from the rest classes. For testing, the label y of x is determined by y = arg maxc sc = arg maxc X x′∈Bc(x) P(s = 1|x, x′) (10) where sc is the similarity score to the c-th class, computed as the sum of 5 largest similarity values Bc to samples in that class. In Table 2, we show classification error rates for different values of D. For K > 1, SCA clearly outperforms single-metric based baselines. In addition, SCA performs well compared to MM-LMNN, achieving far better accuracy for small D. 3.3 Link prediction We evaluate SCA on the task of link prediction in a “social” network of scientific articles. We aim to demonstrate SCA’s power to model similarity/dissimilarity in “multiplex” real-world network data. In particular, we are interested in not only link prediction accuracies, but also the insights about data that we gain from analyzing the identified latent components. Setup We use the NIPS 0-12 dataset [1] to construct the aforementioned network. The dataset contains papers from the NIPS conferences between 1987 and 1999. The papers are organized into 9 sections (topics) (cf. Suppl. Material). We sample randomly 80 papers per section and use them to construct the network. Each paper is a vertex and two papers are connected with an edge and deemed as similar if both of them belong to the same section. We experiment three representations for the papers: (1) Bag-of-words (BoW) uses normalized occurrences (frequencies) of words in the documents. As a preprocessing step, we remove “rare” words that appear less than 75 times and appear more than 240. Those words are either too specialized (thus generalize poorly) or just functional words. After the removal, we obtain 1067 words. (2) Topic (ToP) uses the documents’ topic vectors (mixture weights of topics) after fitting the corpus 6 Table 3: Link prediction accuracies and their standard errors (%) on a network of scientific papers Feature BASELINES SCA-DIAG SCA type SVM ITML LMNN K = 1 K∗ K = 1 K∗ BoW 73.3±0.0 64.8 ± 0.1 87.0 ± 1.2 ToW 75.3±0.0 67.0 ± 0.0 88.1 ± 1.4 ToP 71.2±0.0 81.1±0.1 80.7±0.1 62.6 ± 0.0 81.0 ± 0.8 81.0 ± 0.0 87.6 ± 1.0 to a 50-topic LDA [4]. (3) Topic-words (ToW) is essentially BoW except that we retain only 1036 frequent words used by the topics of the LDA model (top 40 words per topic). Methods We compare the proposed SCA extensively to several competing methods for link prediction. For BoW and ToW represented data, we compare SCA with diagonal metrics (SCA-DIAG, cf. section 2.3) to Support Vector Machines (SVM) and logistic regression (LOGIT) to avoid high computational costs associated with learning high-dimensional matrices (the feature dimensionality D ≈1000). To apply SVM/LOGIT, we treat the link prediction as a binary classification problem where the input is the absolute difference in feature values between the two data points. For 50-dimensional ToP represented data, we compare SCA (SCA) and SCA-DIAG to SVM/LOGIT, information-theoretical metric learning (ITML), and large margin nearest neighbor (LMNN). Note that while LMNN was originally designed for nearest-neighbor based classification, it can be adapted to use similarity information to learn a global metric to compute the distance between any pair of data points. We learn such a metric and threshold on the distance to render a decision on whether two data points are similar or not (i.e., whether there is a link between them). On the other end, multiple-metric LMNN, while often having better classification performance, cannot be used for similarity and link prediction as it does not provide a principled way of computing distances between two arbitrary data points when there are multiple (local) metrics. Link or not? In Table 3, we report link prediction accuracies, which are averaged over several runs of randomly generated 70/30 splits of the data. SVM and LOGIT perform nearly identically so we report only SVM. For both SCA and SCA-DIAG, we report results when a single component is used as well as when the optimal number of components are used (under columns K∗). Both SCA-DIAG and SCA outperform the rest methods by a significant margin, especially when the number of latent components is greater than 1 (K∗ranges from 3 to 13, depending on the methods and the feature types). The only exception is SCA-DIAG with one component (K = 1), which is an overly restrictive model as the diagonal metrics constrain features to be combined additively. This restriction is overcome by using a larger number of components. Edge component analysis Why does learning latent components in SCA achieve superior link prediction accuracies? The (noisy-)OR model used by SCA is naturally inclined to favoring “positive” opinions — a pair of samples are regarded as being similar as long as there is one latent component strongly believing so. This implies that a latent component can be tuned to a specific group of samples if those samples rely on common feature characteristics to be similar. Fig. 3(a) confirms our intuition. The plot displays in relative strength —darker being stronger — how much each latent component believes a pair of articles from the same section should be similar. Concretely, after fitting a 9-component SCA (from documents in ToP features), we consider edges connecting articles in the same section and compute the average local similarity values assigned by each component. We observe two interesting sparse patterns: for each section, there is a dominant latent component that strongly supports the fact that the articles from that section should be similar (e.g., for section 1, the dominant one is the 9-th component). Moreover, for each latent component, it often strongly “voices up” for one section – the exception is the second component which seems to support both section 3 and 4. Nonetheless, the general picture is that, each section has a signature in terms of how similarity values are distributed across latent components. This notion is further illustrated, with greater details, in Fig. 3(b). While Fig. 3(a) depicts averaged signature for each section, the scatterplot displays 2D embeddings computed with the t-SNE algorithm, on each individual edge’s signature — 9-dimensional similarity values inferred with the 9 latent components. The embeddings are very well organized in 9 clusters, colored with section IDs. 7 Metric ID Section ID 2 4 6 8 1 2 3 4 5 6 7 8 9 (a) Averaged componentwise similarity values of edges within each section 1 2 3 4 5 6 7 8 9 (b) Embedding of links, represented with component-wise similarity values 1 2 3 4 5 6 7 8 9 (c) Embedding of network nodes (documents), represented in LDA’s topics Figure 3: Edge component analysis. Representing network links with local similarity values reveals interesting structures, such as nearly one-to-one correspondence between latent components and sections, as well as clusters. However, representing articles in LDA’s topics does not reveal useful clustering structures such that links can be inferred. See texts for details. Best viewed in color. In contrast, embedding documents using their topic representations does not reveal clear clustering structures such that network links can be inferred. This is shown in Fig. 3(c) where each dot corresponds to a document and the low-dimensional coordinates are computed using t-SNE (symmetrized KL divergence between topics is used as a distance measure). We observe that while topics themselves do not reveal intrinsic (network) structures, latent components are able to achieve so by applying highly-specialized metrics to measure local similarities and yield characteristic signatures. We also study whether or not the lack of an edge between a pair of dissimilar documents from different sections, can give rise to characteristic signatures from the latent components. In summary, we do not observe those telltale signatures for those pairs. Detailed results are in the Suppl. Material. 4 Related Work Our model learns multiple metrics, one for each latent component. However, the similarity (or associated dissimilarity) from our model is definitely non-metric due to the complex combination. This stands in stark contrast to most metric learning algorithms [19, 8, 7, 18, 5, 11, 13, 17, 9]. [12] gives an information-theoretic definition of (non-metric) similarity as long as there is a probabilistic model for the data. Our approach of SCA focuses on the relationship between data but not data themselves. [16] proposes visualization techniques for non-metric similarity data. Our work is reminiscent of probabilistic modeling of overlapping communities in social networks, such as the mixed membership stochastic blockmodels [3]. The key difference is that those works model vertices with a mixture of latent components (communities) where we model the interactions between vertices with a mixture of latent components. [2] studies a social network whose edge set is the union of multiple edge sets in hidden similarity spaces. Our work explicitly models the probabilistic process of combining latent components with a (noisy-)OR gate. 5 Conclusion We propose Similarity Component Analysis (SCA) for probabilistic modeling of similarity relationship for pairwise data instances. The key ingredient of SCA is to model similarity as a complex combination of multiple latent components, each giving rise to a local similarity value. SCA attains significantly better accuracies than existing methods on both classification and link prediction tasks. Acknowledgements We thank reviewers for extensive discussion and references on the topics of similarity and learning similarity. We plan to include them as well as other suggested experimentations in a longer version of this paper. This research is supported by a USC Annenberg Graduate Fellowship (S.C.) and the IARPA via DoD/ARL contract # W911NF-12-C-0012. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. 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, DoD/ARL, or the U.S. Government. 8 References [1] NIPS0-12 dataset. http://www.stats.ox.ac.uk/˜teh/data.html. [2] I. Abraham, S. Chechik, D. Kempe, and A. Slivkins. Low-distortion Inference of Latent Similarities from a Multiplex Social Network. CoRR, abs/1202.0922, 2012. [3] E. M. Airoldi, D. M. Blei, S. E. Fienberg, and E. P. Xing. Mixed Membership Stochastic Blockmodels. Journal of Machine Learning Research, 9:1981–2014, June 2008. [4] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [5] J. V. Davis, B. Kulis, P. Jain, S. Sra, and I. S. Dhillon. Information-theoretic Metric Learning. In ICML, 2007. [6] S. E. Fienberg, M. M. Meyer, and S. S. Wasserman. Statistical Analysis of Multiple Sociometric Relations. Journal of the American Statistical Association, 80(389):51–67, March 1985. [7] A. Globerson and S. Roweis. Metric Learning by Collapsing Classes. In NIPS, 2005. [8] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood Components Analysis. In NIPS, 2004. [9] S. Hauberg, O. Freifeld, and M. Black. A Geometric take on Metric Learning. In NIPS, 2012. [10] T. S. Jaakkola and M. I. Jordan. Variational Probabilistic Inference and the QMR-DT Network. Journal of Artificial Intelligence Research, 10(1):291–322, May 1999. [11] P. Jain, B. Kulis, I. Dhillon, and K. Grauman. Online Metric Learning and Fast Similarity Search. In NIPS, 2008. [12] D. Lin. An Information-Theoretic Definition of Similarity. In ICML, 1998. [13] S. Parameswaran and K. Weinberger. Large Margin Multi-Task Metric Learning. In NIPS, 2010. [14] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1988. [15] M. Szell, R. Lambiotte, and S. Thurner. Multirelational Organization of Large-scale Social Networks in an Online World. Proceedings of the National Academy of Sciences, 2010. [16] L. van der Maaten and G. Hinton. Visualizing Non-Metric Similarities in Multiple Maps. Machine Learning, 33:33–55, 2012. [17] J. Wang, A. Woznica, and A. Kalousis. Parametric Local Metric Learning for Nearest Neighbor Classification. In NIPS, 2012. [18] K. Q. Weinberger and L. K. Saul. Distance Metric Learning for Large Margin Nearest Neighbor Classification. Journal of Machine Learning Research, 10:207–244, 2009. [19] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance Metric Learning, with Application to Clustering with Side-information. In NIPS, 2002. 9
2013
188
4,918
Matrix Completion From any Given Set of Observations Troy Lee Nanyang Technological University and Centre for Quantum Technologies troyjlee@gmail.com Adi Shraibman Department of Computer Science Tel Aviv-Yaffo Academic College adi.shribman@gmail.com Abstract In the matrix completion problem the aim is to recover an unknown real matrix from a subset of its entries. This problem comes up in many application areas, and has received a great deal of attention in the context of the netflix prize. A central approach to this problem is to output a matrix of lowest possible complexity (e.g. rank or trace norm) that agrees with the partially specified matrix. The performance of this approach under the assumption that the revealed entries are sampled randomly has received considerable attention (e.g. [1, 2, 3, 4, 5, 6, 7, 8]). In practice, often the set of revealed entries is not chosen at random and these results do not apply. We are therefore left with no guarantees on the performance of the algorithm we are using. We present a means to obtain performance guarantees with respect to any set of initial observations. The first step remains the same: find a matrix of lowest possible complexity that agrees with the partially specified matrix. We give a new way to interpret the output of this algorithm by next finding a probability distribution over the non-revealed entries with respect to which a bound on the generalization error can be proven. The more complex the set of revealed entries according to a certain measure, the better the bound on the generalization error. 1 Introduction In the matrix completion problem we observe a subset of the entries of a target matrix Y , and our aim is to retrieve the rest of the matrix. Obviously some restriction on the target matrix Y is unavoidable as otherwise it is impossible to retrieve even one missing entry; usually, it is assumed that Y is generated in a way so as to have low complexity according to a measure such as matrix rank. A common scheme for the matrix completion problem is to select a matrix X that minimizes some combination of the complexity of X and the distance between X and Y on the observed part. In particular, one can demand that X agrees with Y on the observed initial sample (i.e. the distance between X and Y on the observed part is zero). This general algorithm is described in Figure 1, and we refer to it as Alg1. It outputs a matrix with minimal complexity that agrees with Y on the initial sample S. The complexity measure can be rank, or a norm to serve as an efficiently computable proxy for the rank such as the trace norm or γ2 norm. When we wish to mention which complexity measure is used we write it explicitly, e.g. Alg1(γ2). Our framework is suitable using any norm satisfying few simple conditions described in the sequel. The performance of Alg1 under the assumption that the initial subset is picked at random is well understood [1, 2, 3, 4, 5, 6, 7, 8]. This line of research can be divided into two parts. One line of research [5, 6, 4] studies conditions under which Alg1(Tr) retrieves the matrix exactly 1. They 1There are other papers studying exact matrix completion, e.g. [7]. 1 define what they call an incoherence property which quantifies how spread the singular vectors of Y are. The exact definition of the incoherence property varies in different results. It is then proved that if there are enough samples relative to the rank of Y and its incoherence property, then Alg1(Tr) retrieves the matrix Y exactly with high probability, assuming the samples are chosen uniformly at random. Note that in this line of research the trace norm is used as the complexity measure in the algorithm. It is not clear how to prove similar results with the γ2 norm. Candes and Recht [5] observed that it is impossible to reconstruct a matrix that has only one entry equal to 1 and zeros everywhere else, unless most of its entries are observed. Thus, exact matrix completion must assume some special property of the target matrix Y . In a second line of research, general results are proved regarding the performance of Alg1. These results are weaker in that they do not prove exact recovery, but rather bounds on the distance between the output matrix X and Y . But these results apply for every matrix Y , they can be generalized for non-uniform probability distributions, and also apply when the complexity measure is the γ2 norm. These results take the following form: Theorem 1 ([2]) Let Y be an n × n real matrix, and P a probability distribution on pairs (i, j) ∈ [n]2. Choose a sample S of |S| > n log n entries according to P. Then, with probability at least 1 −2−n/2 over the sample selection, the following holds: X i,j Pij|Xij −Yij| ≤cγ2(X) r n |S|. Where X is the output of the algorithm with sample S, and c is a universal constant. In practice, the assumption that the sample is random is not always valid. Sometimes the subset we see reflects our partial knowledge which is not random at all. What can we say about the output of the algorithm in this case? The analysis of random samples does not help us here, because these proofs do not reveal the structure that makes generalization possible. In order to answer this question we need to understand what properties of a sample enable generalization. A first step in this direction was taken in [9] where the initial subset was chosen deterministically as the set of edges of a good expander (more generally, a good sparsifier). Deterministic guarantees were proved for the algorithm in this case, that resemble the guarantees proved for random sampling. For example: Theorem 2 [9] Let S be the set of edges of a d-regular graph with second eigenvalue 2 bound λ. For every n × n real matrix Y , if X is the output of Alg1 with initial subset S, then 1 n2 X i,j (Xij −Yij)2 ≤ cγ2(Y )2 λ d , where c is a small universal constant. Recall that d-regular graphs with λ = O( √ d) can be constructed in linear time using e.g. the well-known LPS Ramanujan graphs [10]. This theorem was also generalized to bound the error with respect to any probability distribution. Instead of expanders, sparsifiers were used to select the entries to observe for this result. Theorem 3 [9] Let P be a probability distribution on pairs (i, j) ∈[n]2, and d > 1. There is an efficiently constructible set S ⊂[n]2 of size at most dn, such that for every n × n real target matrix Y , if X is the output of our algorithm with initial subset S, then X i,j Pij(Xij −Yij)2 ≤ cγ2(Y )2 1 √ d . The results in [9] still do not answer the practical question of how to reconstruct a matrix from an arbitrary sample. In this paper we continue the work started in [9], and give a simple and general answer to this second question. We extend the results of [9] in several ways: 2The eigenvalues are eigenvalues of the adjacency matrix of the graph. 2 1. We upper bound the generalization error of Alg1 given any set of initial observations. This bound depends on properties of the set of observed entries. 2. We show there is a probability distribution outside of the observed entries such that the generalization error under this distribution is bounded in terms of the complexity of the observed entries, under a certain complexity measure. 3. The results hold not only for γ2 but also for the trace norm, and in fact any norm satisfying a few basic properties. 2 Preliminaries Here we introduce some of the matrix notation and norms that we will be using. For matrices A, B of the same size, let A ◦B denote the Hadamard or entrywise product of A and B. For a m-by-n matrix A with m ≥n let σ1(A) ≥· · · ≥σn(A) denote the singular values of A. The trace norm, denoted ∥A∥tr, is the ℓ1 norm of the vector of singular values, and the Frobenius norm, denoted ∥A∥F , is the ℓ2 norm of the vector of singular values. As the rank of a matrix is equal to the number of non-zero singular values, it follows from the Cauchy-Schwarz inequality that ∥A∥2 tr ∥A∥2 F ≤rk(A) . (1) This inequality motivates the use of the trace norm as a proxy for rank in rank minimization problems. A problem with the bound of (1) as a complexity measure is that it is not monotone—the bound can be larger on a submatrix of A than on A itself. As taking the Hadamard product of a matrix with a rank one matrix does not increase its rank, a way to fix this problem is to consider instead: max u,v ∥u∥=∥v∥=1 ∥A ◦vuT ∥2 tr ∥A ◦vuT ∥2 F ≤rk(A) . When A is a sign matrix, this bound simplifies nicely—for then, ∥A ◦vuT ∥F = ∥u∥∥v∥= 1, and we are left with max u,v ∥u∥=∥v∥=1 ∥A ◦vuT ∥2 tr ≤rk(A) . This motivates the definition of the γ2 norm. Definition 4 Let A be a n-by-n matrix. Then γ2(A) = max u,v ∥u∥=∥v∥=1 ∥A ◦vuT ∥tr . We will also make use of the dual norms of the trace and γ2 norms. Recall that in general for a norm Φ(A) the dual norm Φ∗is defined as Φ∗(A) = max B ⟨A, B⟩ Φ(B) Notice that this means that ⟨A, B⟩≤Φ∗(A)Φ(B) . (2) The dual of the trace norm is ∥· ∥the operator norm from ℓ2 to ℓ2, also known as the spectral norm. The dual of the γ2 norm looks as follows. Definition 5 γ∗ 2(A) = min X,Y XT Y =A 1 2 ∥X∥2 F + ∥Y ∥2 F  = min X,Y XT Y =A ∥X∥F ∥Y ∥F , where the min is taken over X, Y with orthogonal columns. 3 Finally, we will make use of the approximate γ2 norm. This is the minimum of the γ2 norm over all matrices which approximate the target matrix in some sense. The particular version we will need is denoted γ0,∞ 2 and is defined as follows. Definition 6 Let S ∈{0, 1}m×n be a boolean matrix. Let ¯S denote the complement of S, that is ¯S = J −S where J is the all ones matrix. Then γ0,∞ 2 (S) = min T {γ2(T) : T ◦S ≥S, T ◦¯S = 0} In words, γ0,∞ 2 (S) is the minimum γ2 norm of a matrix T which is 0 whenever S is zero, and at least 1 whenever S is 1. This can be thought of as a “one-sided error” version of the more familiar γ∞ 2 norm of a sign matrix, which is the minimum γ2 norm of a matrix which agrees in sign with the target matrix and has all entries of magnitude at least 1. The γ∞ 2 bound is also known to be equal to the margin complexity [11]. 3 The algorithm Let S ⊂[m] × [n] be a subset of entries, representing our partial knowledge. We can always run Alg1 and get an output matrix X. What we need in order to make intelligent use of X is a way to measure the distance between X and Y . Our first observation is that although Y is not known, it is possible to bound the distance between X and Y . This result is stated in the following theorem which generalizes Theorems (2) and (4) of [9] 3: Theorem 7 Fix a set of entries S ⊂[m] × [n]. Let P be a probability distribution on pairs (i, j) ∈ [m] × [n], such that there exists a real matrix Q satisfying 1. Qij = 0 when (i, j) ̸∈S. 2. γ∗ 2(P −Q) ≤Λ Then for every m × n real target matrix Y , if X is the output of our algorithm with initial subset S, it holds that X i,j Pij(Xij −Yij)2 ≤ 4Λγ2(Y )2 . Theorem 7 says that γ∗ 2(P −Q) determines, at least to some extent, the expected distance between X and Y with respect to P. This gives us a way to measure the quality of the output of Alg1 for any set S of initial observations. Namely, we can do the following: 1. Choose a probability distribution P on the entries of the matrix. 2. Find a real matrix Q such that Qij = 0 when (i, j) ̸∈S, and γ∗ 2(P −Q) is minimal. 3. Output the minimal value Λ. We then know, using Theorem 7, that the expected square distance between X and Y can be bounded in terms of Λ and the complexity of Y . Obviously, the choice of P makes a big difference. For example if the set of initial observations is contained in a submatrix we cannot expect X to be close to Y outside this submatrix. In such cases it makes sense to restrict P to the submatrix containing S. One approach to find a distribution for which we can expect to be close on the unseen entries is to optimize over probability distributions P such that Theorem 7 gives the best bound. Since γ∗ 2 can be expressed as the optimum of semidefinite program, we can find in polynomial time a probability distribution P and a weight function Q on S such that γ∗ 2(P −Q) is minimizd. Thus, instead of trying different parameters, we can find a probability distribution for which we can prove optimal 3Here we state the result for γ2. See Section 4 for the corresponding result for the trace norm as well. 4 1. Input: a subset S ⊂[n]2 and the value of Y on S. 2. Output: a matrix X of smallest possible CC(X) under the condition that Xij = Yij for all (i, j) ∈S. Figure 1: Algorithm Alg1(CC) guarantees using Theorem 7. The second algorithm we suggest does exactly that. We refer to this algorithm as Alg2, or Alg2(CC) if we wish to state the complexity measure that is used. For Alg2(γ2), we do the following: Minimize γ∗ 2(P −Q) over all m × n matrices Q and P such that: 1. Qij = 0 for (i, j) ̸∈S. 2. Pij = 0 for (i, j) ∈S. 3. P i,j Pij = 1. Globally, our algorithm for matrix completion therefore works in two phases. We first use Alg1 to get an output matrix X, and then use Alg2 in order to find optimal guarantees regarding the distance between X and Y . The generalization error bounds for this algorithm are proved in Section 4. 3.1 Using a general norm In our description of Alg2 above we have used the norm γ2. The same idea works for any norm Φ satisfying the property Φ(A ◦A) ≤Φ(A)2. Moreover, if the dual norm can be computed efficiently via a linear or semidefinite program, then the optimal distribution P for the bound can be found efficiently as well. For example for the trace norm the algorithm becomes: Given the sample S run Alg1(∥· ∥tr) and get an output matrix X. The second part of the algorithm is: Minimize ∥P −Q∥over all m × n matrices Q and P such that: 1. Qij = 0 for (i, j) ̸∈S. 2. Pij = 0 for (i, j) ∈S. 3. P i,j Pij = 1. Denote by Λ the optimal value of the above program, and by P the optimal probability distribution. Then analogously to Theorem 7, we have X i,j Pij(Xij −Yij)2 ≤ 4Λ∥Y ∥2 tr . Both of these results will follow from a more general theorem which we show in the next section. 4 Generalization bounds Here we show a more general theorem which will imply Theorem 7. Theorem 8 Let Φ be a norm and Φ∗its dual norm. Suppose that Φ(A◦A) ≤Φ(A)2 for any matrix A. Fix a set of indices S ⊂[m] × [n]. Let P be a probability distribution on pairs (i, j) ∈[m] × [n], such that there exists a real matrix Q satisfying 1. Qij = 0 when (i, j) ̸∈S. 2. Φ∗(P −Q) ≤Λ 5 Then for every m × n real target matrix Y , if X is the output of algorithm Alg1(Φ) with initial subset S, it holds that X i,j Pij(Xij −Yij)2 ≤ 4Φ(Y )2Λ. Proof Let R be the matrix where Rij = (Xij −Yij)2. By assumption Φ∗(P −Q) ≤Λ thus by (2) ⟨P −Q, R⟩≤ΛΦ(R) . Now let us focus on Φ(R). As R = (X −Y ) ◦(X −Y ) by the assumption on Φ we have Φ(R) ≤Φ(X −Y )2 ≤(Φ(X) + Φ(Y ))2 . Now by definition of Alg1(Φ) we have Φ(X) ≤Φ(Y ), thus Φ(R) ≤4Φ(Y )2. Also, by definition of the algorithm Rij = 0 for (i, j) ∈S, and Qij equals zero outside of S, which implies that P i,j QijRij = 0. We conclude that X i,j Pij(Xij −Yij)2 ≤4ΛΦ(Y )2. Both the trace norm and γ2 norm satisfy the condition of the theorem as they are multiplicative under tensor product. 5 Analyzing the error bound We now look more closely at the minimal value of the parameter Λ from Theorem 7. The optimal value of Λ depends only on the set of observed indices S. For a set of indices S ⊂[m] × [n] let ¯S be its complement. Given samples S we want to find P, Q so as to minimize γ∗ 2(P −Q) such that P is a probability distribution over ¯S and Q has support in S. We can express this as a semidefinite program Λ =minimize α,P,Q 1 2Tr(α) subject to α −( ˆP −ˆQ) ⪰0 P ≥0 ⟨P, ¯S⟩= 1 ⟨Q, S⟩= Q. Here ˆP =  0 P P T 0  is the “bipartite” version of P, and similarly for ˆQ. Taking the dual of this program we find 1/Λ =minimize A γ2(A) subject to A ≥¯S A ◦¯S = A In words, this says that that 1 Λ is equal to the minimum γ2 norm of a matrix that is zero on all entries in S and at least 1 on all entries in ¯S. Thus Λ = 1/γ0,∞ 2 ( ¯S) (recall Definition 6). This says that the more complex the set of unobserved entries ¯S according to the measure γ0,∞ 2 , the smaller the value of Λ. Note that in particular, if we consider the sign matrix ¯S−S then γ0,∞ 2 ( ¯S) ≥(γ∞ 2 ( ¯S−S)−1)/2 is lower bounded by the margin complexity of S −¯S. 6 References [1] N. Srebro, J. D. M. Rennie, and T. S. Jaakola. Maximum-margin matrix factorization. In Neural Information Processing Systems, 2005. [2] N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. In 18th Annual Conference on Computational Learning Theory (COLT), pages 545–560, 2005. [3] R. Foygel and N. Srebro. Concentration-based guarantees for low-rank matrix reconstruction. Technical report, arXiv, 2011. [4] E. J. Candes and T. Tao. The power of convex relaxation: near-optimal matrix completion. IEEE Transactions on Information Theory, 56(5):2053–2080, 2010. [5] E. J. Candes and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, 2009. [6] B. Recht. A simpler approach to matrix completion. Technical report, arXiv, 2009. [7] R. H. Keshavan, A. Montanari, and S. Oh. Matrix completion from noisy entries. Journal of Machine Learning Research, 11:2057–2078, 2010. [8] V. Koltchinskii, A. B. Tsybakov, and K. Lounici. Nuclear norm penalization and optimal rates for noisy low rank matrix completion. Technical report, arXiv, 2010. [9] E. Heiman, G. Schechtman, and A. Shraibman. Deterministic algorithms for matrix completion. Random Structures and Algorithms, 2013. [10] A. Lubotzky, R. Phillips, and P. Sarnak. Ramanujan graphs. Combinatorica, 8:261–277, 1988. [11] N. Linial, S. Mendelson, G. Schechtman, and A. Shraibman. Complexity measures of sign matrices. Combinatorica, 27(4):439–463, 2007. 7
2013
189
4,919
Convex Tensor Decomposition via Structured Schatten Norm Regularization Ryota Tomioka Toyota Technological Institute at Chicago Chicago, IL 60637 tomioka@ttic.edu Taiji Suzuki Department of Mathematical and Computing Sciences Tokyo Institute of Technology Tokyo 152-8552, Japan s-taiji@is.titech.ac.jp Abstract We study a new class of structured Schatten norms for tensors that includes two recently proposed norms (“overlapped” and “latent”) for convex-optimizationbased tensor decomposition. We analyze the performance of “latent” approach for tensor decomposition, which was empirically found to perform better than the “overlapped” approach in some settings. We show theoretically that this is indeed the case. In particular, when the unknown true tensor is low-rank in a specific unknown mode, this approach performs as well as knowing the mode with the smallest rank. Along the way, we show a novel duality result for structured Schatten norms, which is also interesting in the general context of structured sparsity. We confirm through numerical simulations that our theory can precisely predict the scaling behaviour of the mean squared error. 1 Introduction Decomposition of tensors [10, 14] (or multi-way arrays) into low-rank components arises naturally in many real world data analysis problems. For example, in neuroimaging, spatio-temporal patterns of neural activities that are related to certain experimental conditions or subjects can be found by computing the tensor decomposition of the data tensor, which can be of size channels × timepoints × subjects × conditions [18]. More generally, any multivariate spatio-temporal data (e.g., environmental monitoring) can be regarded as a tensor. If some of the observations are missing, lowrank modeling enables the imputation of missing values. Tensor modelling may also be valuable for collaborative filtering with temporal or contextual dimension. Conventionally, tensor decomposition has been tackled through non-convex optimization problems, using alternate least squares or higher-order orthogonal iteration [6]. Compared to its empirical success, little has been theoretically understood about the performance of tensor decomposition algorithms. De Lathauwer et al. [5] showed an approximation bound for a truncated higher-order SVD (also known as the Tucker decomposition). Nevertheless the generalization performance of these approaches has been widely open. Moreover, the model selection problem can be highly challenging, especially for the Tucker model [5, 27], because we need to specify the rank rk for each mode (here a mode refers to one dimensionality of a tensor); that is, we have K hyper-parameters to choose for a K-way tensor, which is challenging even for K = 3. Recently a convex-optimization-based approach for tensor decomposition has been proposed by several authors [9, 15, 23, 25], and its performance has been analyzed in [26]. 1 0 10 20 30 40 50 60 10 15 20 25 30 Rank of the first two modes Estimation error ||W−W*||F size=[50 50 20] Overlapped Schatten 1−norm Latent Schatten 1−norm 10 0 10 1 10 2 0 20 40 60 Regularization constant λ ||W−W*||F rank=[40 40 3] Figure 1: Estimation of a low-rank 50×50×20 tensor of rank r × r × 3 from noisy measurements. The noise standard deviation is σ = 0.1. The estimation errors of two convex optimization based methods are plotted against the rank r of the first two modes. The solid lines show the error at the fixed regularization constant λ, which is 0.89 for the overlapped approach and 3.79 for the latent approach (see also Figure 2). The dashed lines show the minimum error over candidates of the regularization constant λ from 0.1 to 100. In the inset, the errors of the two approaches are plotted against the regularization constant λ for rank r = 40 (marked with gray dashed vertical line in the outset). The two values (0.89 and 3.79) are marked with vertical dashed lines. Note that both approaches need no knowledge of the true rank; the rank is automatically learned. The basic idea behind their convex approach, which we call overlapped approach, is to unfold1 a tensor into matrices along different modes and penalize the unfolded matrices to be simultaneously low-rank based on the Schatten 1-norm, which is also known as the trace norm and nuclear norm [7, 22, 24]. This approach does not require the rank of the decomposition to be specified beforehand, and due to the low-rank inducing property of the Schatten 1-norm, the rank of the decomposition is automatically determined. However, it has been noticed that the above overlapped approach has a limitation that it performs poorly for a tensor that is only low-rank in a certain mode. The authors of [25] proposed an alternative approach, which we call latent approach, that decomposes a given tensor into a mixture of tensors that each are low-rank in a specific mode. Figure 1 demonstrates that the latent approach is preferable to the overlapped approach when the underlying tensor is almost full rank in all but one mode. However, so far no theoretical analysis has been presented to support such an empirical success. In this paper, we rigorously study the performance of the latent approach and show that the mean squared error of the latent approach scales no greater than the minimum mode-k rank of the underlying true tensor, which clearly explains why the latent approach performs better than the overlapped approach in Figure 1. Along the way, we show a novel duality between the two types of norms employed in the above two approaches, namely the overlapped Schatten norm and the latent Schatten norm. This result is closely related and generalize the results in structured sparsity literature [2, 13, 17, 21]. In fact, the (plain) overlapped group lasso constrains the weights to be simultaneously group sparse over overlapping groups. The latent group lasso predicts with a mixture of group sparse weights [see also 1, 3, 12]. These approaches clearly correspond to the two variations of tensor decomposition algorithms we discussed above. Finally we empirically compare the overlapped approach and latent approach and show that even when the unknown tensor is simultaneously low-rank, which is a favorable situation for the overlapped approach, the latent approach performs better in many cases. Thus we provide both theoretical and empirical evidence that for noisy tensor decomposition, the latent approach is preferable to the overlapped approach. Our result is complementary to the previous study [25, 26], which mainly focused on the noise-less tensor completion setting. 1For a K-way tensor, there are K ways to unfold a tensor into a matrix. See Section 2. 2 This paper is structured as follows. In Section 2, we provide basic definitions of the two variations of structured Schatten norms, namely the overlapped/latent Schatten norms, and discuss their properties, especially the duality between them. Section 3 presents our main theoretical contributions; we establish the consistency of the latent approach, and we analyze the denoising performance of the latent approach. In Section 4, we empirically confirm the scaling predicted by our theory. Finally, Section 5 concludes the paper. Most of the proofs are presented in the supplementary material. 2 Structured Schatten norms for tensors In this section, we define the overlapped Schatten norm and the latent Schatten norm and discuss their basic properties. First we need some basic definitions. Let W ∈Rn1×···nK be a K-way tensor. We denote the total number of entries in W by N = ∏K k=1 nk. The dot product between two tensors W and X is defined as ⟨W, X⟩= vec(W)⊤vec(X); i.e., the dot product as vectors in RN. The Frobenius norm of a tensor is defined as W F = √ ⟨W, W⟩. Each dimensionality of a tensor is called a mode. The mode k unfolding W (k) ∈ Rnk×N/nk is a matrix that is obtained by concatenating the mode-k fibers along columns; here a mode-k fiber is an nk dimensional vector obtained by fixing all the indices but the kth index of W. The mode-k rank rk of W is the rank of the mode-k unfolding W (k). We say that a tensor W has multilinear rank (r1, . . . , rK) if the mode-k rank is rk for k = 1, . . . , K [14]. The mode k folding is the inverse of the unfolding operation. 2.1 Overlapped Schatten norms The low-rank inducing norm studied in [9, 15, 23, 25], which we call overlapped Schatten 1-norm, can be written as follows: W S1/1 = ∑K k=1 ∥W (k)∥S1. (1) In this paper, we consider the following more general overlapped Sp/q-norm, which includes the Schatten 1-norm as the special case (p, q) = (1, 1). The overlapped Sp/q-norm is written as follows: W Sp/q = (∑K k=1 ∥W (k)∥q Sp )1/q , (2) where 1 ≤p, q ≤∞; here ∥W ∥Sp = (∑r j=1 σp j (W ) )1/p is the Schatten p-norm for matrices, where σj(W ) is the jth largest singular value of W . When used as a regularizer, the overlapped Schatten 1-norm penalizes all modes of W to be jointly low-rank. It is related to the overlapped group regularization [see 13, 16] in a sense that the same object W appears repeatedly in the norm. The following inequality relates the overlapped Schatten 1-norm with the Frobenius norm, which was a key step in the analysis of [26]: W S1/1 ≤ K ∑ k=1 √rk W F , (3) where rk is the mode-k rank of W. Now we are interested in the dual norm of the overlapped Sp/q-norm, because deriving the dual norm is a key step in solving the minimization problem that involves the norm (2) [see 16], as well as computing various complexity measures, such as, Rademacher complexity [8] and Gaussian width [4]. It turns out that the dual norm of the overlapped Sp/q-norm is the latent Sp∗/q∗-norm as shown in the following lemma (proof is presented in Appendix A). 3 Lemma 1. The dual norm of the overlapped Sp/q-norm is the latent Sp∗/q∗-norm, where 1/p + 1/p∗= 1 and 1/q + 1/q∗= 1, which is defined as follows: X Sp∗/q∗= inf (X (1)+···+X (K))=X (∑K k=1 ∥X(k) (k)∥q∗ Sp∗ )1/q∗ . (4) Here the infimum is taken over the K-tuple of tensors X (1), . . . , X (K) that sums to X. In the supplementary material, we show a slightly more general version of the above lemma that naturally generalizes the duality between overlapped/latent group sparsity norms [1, 12, 17, 21]; see Section A. Note that when the groups have no overlap, the overlapped/latent group sparsity norms become identical, and the duality is the ordinary duality between the group Sp/q-norms and the group Sp∗/q∗-norms. 2.2 Latent Schatten norms The latent approach for tensor decomposition [25] solves the following minimization problem minimize W(1),...,W(K) L(W(1) + · · · + W(K)) + λ K ∑ k=1 ∥W (k) (k)∥S1, (5) where L is a loss function, λ is a regularization constant, and W (k) (k) is the mode-k unfolding of W(k). Intuitively speaking, the latent approach for tensor decomposition predicts with a mixture of K tensors that each are regularized to be low-rank in a specific mode. Now, since the loss term in the minimization problem (5) only depends on the sum of the tensors W(1), . . . , W(K), minimization problem (5) is equivalent to the following minimization problem minimize W L(W) + λ W S1/1. In other words, we have identified the structured Schatten norm employed in the latent approach as the latent S1/1-norm (or latent Schatten 1-norm for short), which can be written as follows: W S1/1 = inf (W(1)+···+W(K))=W K ∑ k=1 ∥W (k) (k)∥S1. (6) According to Lemma 1, the dual norm of the latent S1/1-norm is the overlapped S∞/∞-norm X S∞/∞= max k ∥X(k)∥S∞, (7) where ∥· ∥S∞is the spectral norm. The following lemma is similar to inequality (3) and is a key in our analysis (proof is presented in Appendix B). Lemma 2. W S1/1 ≤ ( min k √rk ) W F , where rk is the mode-k rank of W. Compared to inequality (3), the latent Schatten 1-norm is bounded by the minimal square root of the ranks instead of the sum. This is the fundamental reason why the latent approach performs betters than the overlapped approach as in Figure 1. 3 Main theoretical results In this section, combining the duality we presented in the previous section with the techniques from Agarwal et al. [1], we study the generalization performance of the latent approach for tensor decomposition in the context of recovering an unknown tensor W∗from noisy measurements. This is the setting of the experiment in Figure 1. We first prove a generic consistency statement that does not take the low-rank-ness of the truth into account. Next we show that a tighter bound that takes the low-rank-ness into account can be obtained with some incoherence assumption. Finally, we discuss the difference between overlapped approach and latent approach and provide an explanation for the empirically observed superior performance of the latent approach in Figure 1. 4 3.1 Consistency Let W∗be the underlying true tensor and the noisy version Y is obtained as follows: Y = W∗+ E, where E ∈Rn1×···×nK is the noise tensor. A consistency statement can be obtained as follows (proof is presented in Appendix C): Theorem 1. Assume that the regularization constant λ satisfies λ ≥ E S∞/∞(overlapped S∞/∞ norm of the noise), then the estimator defined by ˆ W = argminW ( 1 2 Y −W 2 F + λ W S1/1 ) , satisfies the inequality ˆ W −W∗ F ≤2λ √ min k nk. (8) In particular when the noise goes to zero E →0, the right hand side of inequality (8) shrinks to zero. 3.2 Deterministic bound The consistency statement in the previous section only deals with the sum ˆ W = ∑K k=1 ˆ W(k) and the statement does not take into account the low-rank-ness of the truth. In this section, we establish a tighter statement that bounds the errors of individual terms ˆ W(k). To this end, we need some additional assumptions. First, we assume that the unknown tensor W∗is a mixture of K tensors that each are low-rank in a certain mode and we have a noisy observation Y as follows: Y = W∗+ E = ∑K k=1 W∗(k) + E, (9) where ¯rk = rank(W (k) (k)) is the mode-k rank of the kth component W∗(k); note that this does not equal the mode-k rank rk of W∗in general. Second, we assume that the spectral norm of the mode-k unfolding of the lth component is bounded by a constant α for all k ̸= l as follows: ∥W ∗(l) (k) ∥S∞≤α (∀l ̸= k, k, l = 1, . . . , K). (10) Note that such an additional incoherence assumption has also been used in [1, 3, 11]. We employ the following optimization problem to recover the unknown tensor W∗: ˆ W = argmin W ( 1 2 Y −W 2 F + λ W S1/1 s.t. W = K ∑ k=1 W(k), ∥W (l) (k)∥S∞≤α, ∀l ̸= k ) , (11) where λ > 0 is a regularization constant. Notice that we have introduced additional spectral norm constraints to control the correlation between the components; see also [1]. Our deterministic performance bound can be stated as follows (proof is presented in Appendix D): Theorem 2. Let ˆ W(k) be an optimal decomposition of ˆ W induced by the latent Schatten 1-norm (6). Assume that the regularization constant λ satisfies λ ≥2 E S∞/∞+ α(K −1). Then there is a universal constant c such that, any solution ˆ W of the minimization problem (11) satisfies the following deterministic bound: ∑K k=1 ˆ W(k) −W∗(k) 2 F ≤cλ2 ∑K k=1 rk. (12) Moreover, the overall error can be bounded in terms of the multilinear rank of W∗as follows: ˆ W −W∗ 2 F ≤cλ2 min k rk. (13) 5 Note that in order to get inequality (13), we exploit the arbitrariness of the decomposition W∗= ∑K k=1 W∗(k) to replace the sum over the ranks with the minimal mode-k rank. This is possible because a singleton decomposition, i.e., W∗(k) = W∗and W∗(k′) = 0 for k′ ̸= k, is allowed for any k. Comparing two inequalities (8) and (13), we see that there are two regimes. When the noise is small, (8) is tighter. On the other hand, when the noise is larger and/or mink rk ≪mink nk, (13) is tighter. 3.3 Gaussian noise When the elements of the noise tensor E are Gaussian, we obtain the following theorem. Theorem 3. Assume that the elements of the noise tensor E are independent zero-mean Gaussian random variables with variance σ2. In addition, assume without loss of generality that the dimensionalities of W∗are sorted in the descending order, i.e., n1 ≥· · · ≥nK. Then there is a universal constant c such that, with probability at least 1 −δ, any solution of the minimization problem (11) with regularization constant λ = 2σ( √ N/nK + √n1 + √ 2 log(K/δ)) + α(K −1) satisfies 1 N K ∑ k=1 ˆ W(k) −W∗(k) 2 F ≤cFσ2 ∑K k=1 ¯rk nK , (14) where F = (( 1 + √n1nK N ) + (√ 2 log(K/δ) + α(K−1) 2σ ) √nK N )2 is a factor that mildly depends on the dimensionalities and the constant α in (10). Note that the theoretically optimal choice of regularization constant λ is independent of the ranks of the truth W∗or its factors in (9), which are unknown in practice. Again we can obtain a bound corresponding to the minimum rank singleton decomposition as in inequality (13) as follows: 1 N ˆ W −W∗ 2 F ≤cFσ2 mink rk nK , (15) where F is the same factor as in Theorem 3. 3.4 Comparison with the overlapped approach Inequality (15) explains the superior performance of the latent approach for tensor decomposition in Figure 1. The inequality obtained in [26] for the overlapped approach that uses overlapped Schatten 1-norm (1) can be stated as follows: 1 N ˆ W −W∗ 2 F ≤c′σ2 ( 1 K K ∑ k=1 √ 1 nk )2( 1 K K ∑ k=1 √rk )2 . (16) Comparing inequalities (15) and (16), we notice that the complexity of the overlapped approach depends on the average (square root) of the mode-k ranks r1, . . . , rK, whereas that of the latent approach only grows linearly against the minimum mode-k rank. Interestingly, the latent approach performs as if it knows the mode with the minimum rank, although such information is not given. Recently, Mu et al. [19] proved a lower bound of the number of measurements for solving linear inverse problem via the overlapped approach. Although the setting is different, the lower bound depends on the minimum mode-k rank, which agrees with the complexity of the latent approach. 4 Numerical results In this section, we numerically confirm the theoretically obtained scaling behavior. The goal of this experiment is to recover the true low rank tensor W∗from a noisy observation Y. We randomly generated the true low rank tensors W∗of size 50 × 50 × 20 or 80 × 80 × 40 with various mode-k ranks (r1, r2, r3). A low-rank tensor is generated by first randomly drawing the 6 0 0.2 0.4 0.6 0.8 1 0 0.005 0.01 0.015 Tucker rank complexity Mean squared error (overlap) Overlapped approach size=[50 50 20] λ=0.43 size=[50 50 20] λ=0.89 size=[50 50 20] λ=3.79 size=[80 80 40] λ=0.62 size=[80 80 40] λ=1.27 size=[80 80 40] λ=5.46 0 0.2 0.4 0.6 0.8 1 0 0.005 0.01 0.015 Latent rank complexity Mean squared error (latent) Latent approach size=[50 50 20] λ=0.89 size=[50 50 20] λ=3.79 size=[50 50 20] λ=11.29 size=[80 80 40] λ=1.27 size=[80 80 40] λ=5.46 size=[80 80 40] λ=16.24 0 1 2 3 4 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 TR complexity/LR complexity MSE (overlap) / MSE (latent) Comparison Figure 2: Performance of the overlapped approach and latent approach for tensor decomposition are shown against their theoretically predicted complexity measures (see Eqs. (17) and (18)). The right panel shows the improvement of the latent approach from the overlapped approach against the ratio of their complexity measures. r1 × r2 × r3 core tensor from the standard normal distribution and multiplying an orthogonal factor matrix drawn uniformly to its each mode. The observation tensor Y is obtained by adding Gaussian noise with standard deviation σ = 0.1. There is no missing entries in this experiment. For each observation Y, we computed tensor decompositions using the overlapped approach and the latent approach (11). For the optimization, we used the algorithms2 based on alternating direction method of multipliers described in Tomioka et al. [25]. We computed the solutions for 20 candidate regularization constants ranging from 0.1 to 100 and report the results for three representative values for each method. We measured the quality of the solutions obtained by the two approaches by the mean squared error (MSE) ˆ W −W∗ 2 F /N. In order to make our theoretical predictions more concrete, we define the quantities in the right hand side of the bounds (16) and (14) as Tucker rank (TR) complexity and Latent rank (LR) complexity, respectively, as follows: TR complexity = ( 1 K ∑K k=1 √ 1 nk )2 ( 1 K ∑K k=1 √rk )2 , (17) LR complexity = ∑K k=1 ¯rk nK , (18) where without loss of generality we assume n1 ≥· · · ≥nK. We have ignored terms like √ nk/N because they are negligible for nk ≈50 and N ≈50, 000. The TR complexity is equivalent to the normalized rank in [26]. Note that the TR complexity (17) is defined in terms of the multilinear rank (r1, . . . , rK) of the truth W∗, whereas the LR complexity (18) is defined in terms of the ranks of the latent factors (r1, . . . , rK) in (9). In order to find a decomposition that minimizes the right hand side of (18), we ran the latent approach to the true tensor W∗without noise, and took the minimum of the sum of ranks found by the run and mink rk, i.e., the minimal mode-k rank (because a singleton solution is also allowed). The whole procedure is repeated 10 times and averaged. Figure 2 shows the results of the experiment. The left panel shows the MSE of the overlapped approach against the TR complexity (17). The middle panel shows the MSE of the latent approach against the LR complexity (18). The right panel shows the improvement (i.e., MSE of the overlap approach over that of the latent approach) against the ratio of the respective complexity measures. First, from the left panel, we can confirm that as predicted by [26], the MSE of the overlapped approach scales linearly against the TR complexity (17) for each value of the regularization constant. From the central panel, we can clearly see that the MSE of the latent approach scales linearly against the LR complexity (18) as predicted by Theorem 3. The series with △(λ = 3.79 for 50 × 50 × 20, 2The solver is available online: https://github.com/ryotat/tensor. 7 λ = 5.46 for 80 × 80 × 40) is mostly below other series, which means that the optimal choice of the regularization constant is independent of the rank of the true tensor and only depends on the size; this agrees with the condition on λ in Theorem 3. Since the blue series and red series with the same markers lie on top of each other (especially the series with △for which the optimal regularization constant is chosen), we can see that our theory predicts not only the scaling against the latent ranks but also that against the size of the tensor correctly. Note that the regularization constants are scaled by roughly 1.6 to account for the difference in the dimensionality. The right panel reveals that in many cases the latent approach performs better than the overlapped approach, i.e., MSE (overlap)/ MSE (latent) greater than one. Moreover, we can see that the success of the latent approach relative to the overlapped approach is correlated with high TR complexity to LR complexity ratio. Indeed, we found that an optimal decomposition of the true tensor W∗ was typically a singleton decomposition corresponding to the smallest tucker rank (see Section 3.2). Note that the two approaches perform almost identically when they are under-regularized (crosses). The improvements here are milder than that in Figure 1. This is because most of the randomly generated low-rank tensors were simultaneously low-rank to some degree. It is encouraging that the latent approach perform at least as well as the overlapped approach in such situations as well. 5 Conclusion In this paper, we have presented a framework for structured Schatten norms. The current framework includes both the overlapped Schatten 1-norm and latent Schatten 1-norm recently proposed in the context of convex-optimization-based tensor decomposition [9, 15, 23, 25], and connects these studies to the broader studies on structured sparsity [2, 13, 17, 21]. Moreover, we have shown a duality that holds between the two types of norms. Furthermore, we have rigorously studied the performance of the latent approach for tensor decomposition. We have shown the consistency of the latent Schatten 1-norm minimization. Next, we have analyzed the denoising performance of the latent approach and shown that the error of the latent approach is upper bounded by the minimal mode-k rank, which contrasts sharply against the average (square root) dependency of the overlapped approach analyzed in [26]. This explains the empirically observed superior performance of the latent approach compared to the overlapped approach. The most difficult case for the overlapped approach is when the unknown tensor is only low-rank in one mode as in Figure 1. We have also confirmed through numerical simulations that our analysis precisely predicts the scaling of the mean squared error as a function of the dimensionalities and the sum of ranks of the factors of the unknown tensor, which is dominated by the minimal mode-k rank. Unlike mode-k ranks, the ranks of the factors are not easy to compute. However, note that the theoretically optimal choice of the regularization constant does not depend on these quantities. Thus, we have theoretically and empirically shown that for noisy tensor decomposition, the latent approach is more likely to perform better than the overlapped approach. Analyzing the performance of the latent approach for tensor completion would be an important future work. The structured Schatten norms proposed in this paper include norms for tensors that are not employed in practice yet. Therefore, it would be interesting to explore various extensions, such as, using the overlapped S1/∞-norm instead of the S1/1-norm or a non-sparse tensor decomposition. Acknowledgment: This work was carried out while both authors were at The University of Tokyo. This work was partially supported by JSPS KAKENHI 25870192 and 25730013, and the Aihara Project, the FIRST program from JSPS, initiated by CSTP. References [1] A. Agarwal, S. Negahban, and M. J. Wainwright. Noisy matrix decomposition via convex relaxation: Optimal rates in high dimensions. The Annals of Statistics, 40(2):1171–1197, 2012. [2] F. Bach, R. Jenatton, J. Mairal, and G. Obozinski. Convex optimization with sparsity-inducing norms. In Optimization for Machine Learning. MIT Press, 2011. 8 [3] E. J. Candes, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? Technical report, arXiv:0912.3599, 2009. [4] V. Chandrasekaran, B. Recht, P. Parrilo, and A. Willsky. The convex geometry of linear inverse problems, prepint. Technical report, arXiv:1012.0621v2, 2010. [5] L. De Lathauwer, B. De Moor, and J. Vandewalle. A multilinear singular value decomposition. SIAM J. Matrix Anal. Appl., 21(4):1253–1278, 2000. [6] L. De Lathauwer, B. De Moor, and J. Vandewalle. On the best rank-1 and rank-(R1, R2, . . . , RN) approximation of higher-order tensors. SIAM J. Matrix Anal. Appl., 21(4):1324–1342, 2000. [7] M. Fazel, H. Hindi, and S. P. Boyd. A Rank Minimization Heuristic with Application to Minimum Order System Approximation. In Proc. of the American Control Conference, 2001. [8] R. Foygel and N. Srebro. Concentration-based guarantees for low-rank matrix reconstruction. Technical report, arXiv:1102.3923, 2011. [9] S. Gandy, B. Recht, and I. Yamada. Tensor completion and low-n-rank tensor recovery via convex optimization. Inverse Problems, 27:025010, 2011. [10] F. L. Hitchcock. The expression of a tensor or a polyadic as a sum of products. J. Math. Phys., 6(1): 164–189, 1927. [11] D. Hsu, S. M. Kakade, and T. Zhang. Robust matrix decomposition with sparse corruptions. Information Theory, IEEE Transactions on, 57(11):7221–7234, 2011. [12] A. Jalali, P. Ravikumar, S. Sanghavi, and C. Ruan. A dirty model for multi-task learning. In Advances in NIPS 23, pages 964–972. 2010. [13] R. Jenatton, J. Audibert, and F. Bach. Structured variable selection with sparsity-inducing norms. J. Mach. Learn. Res., 12:2777–2824, 2011. [14] T. G. Kolda and B. W. Bader. Tensor decompositions and applications. SIAM Review, 51(3):455–500, 2009. [15] J. Liu, P. Musialski, P. Wonka, and J. Ye. Tensor completion for estimating missing values in visual data. In Prof. ICCV, 2009. [16] J. Mairal, R. Jenatton, G. Obozinski, and F. Bach. Convex and network flow optimization for structured sparsity. J. Mach. Learn. Res., 12:2681–2720, 2011. [17] A. Maurer and M. Pontil. Structured sparsity and generalization. Technical report, arXiv:1108.3476, 2011. [18] M. Mørup. Applications of tensor (multiway array) factorizations and decompositions in data mining. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 1(1):24–40, 2011. [19] C. Mu, B. Huang, J. Wright, and D. Goldfarb. Square deal: Lower bounds and improved relaxations for tensor recovery. arXiv preprint arXiv:1307.5870, 2013. [20] S. Negahban, P. Ravikumar, M. Wainwright, and B. Yu. A unified framework for high-dimensional analysis of m-estimators with decomposable regularizers. In Advances in NIPS 22, pages 1348–1356. 2009. [21] G. Obozinski, L. Jacob, and J.-P. Vert. Group lasso with overlaps: the latent group lasso approach. Technical report, arXiv:1110.0413, 2011. [22] B. Recht, M. Fazel, and P. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM Review, 52(3):471–501, 2010. [23] M. Signoretto, L. De Lathauwer, and J. Suykens. Nuclear norms for tensors and their use for convex multilinear estimation. Technical Report 10-186, ESAT-SISTA, K.U.Leuven, 2010. [24] N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. In Proc. of the 18th Annual Conference on Learning Theory (COLT), pages 545–560. Springer, 2005. [25] R. Tomioka, K. Hayashi, and H. Kashima. Estimation of low-rank tensors via convex optimization. Technical report, arXiv:1010.0789, 2011. [26] R. Tomioka, T. Suzuki, K. Hayashi, and H. Kashima. Statistical performance of convex tensor decomposition. In Advances in NIPS 24, pages 972–980. 2011. [27] L. R. Tucker. Some mathematical notes on three-mode factor analysis. Psychometrika, 31(3):279–311, 1966. [28] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. Technical report, arXiv:1011.3027, 2010. 9
2013
19
4,920
A Deep Architecture for Matching Short Texts Zhengdong Lu Noah’s Ark Lab Huawei Technologies Co. Ltd. Sha Tin, Hong Kong Lu.Zhengdong@huawei.com Hang Li Noah’s Ark Lab Huawei Technologies Co. Ltd. Sha Tin, Hong Kong HangLi.HL@huawei.com Abstract Many machine learning problems can be interpreted as learning for matching two types of objects (e.g., images and captions, users and products, queries and documents, etc.). The matching level of two objects is usually measured as the inner product in a certain feature space, while the modeling effort focuses on mapping of objects from the original space to the feature space. This schema, although proven successful on a range of matching tasks, is insufficient for capturing the rich structure in the matching process of more complicated objects. In this paper, we propose a new deep architecture to more effectively model the complicated matching relations between two objects from heterogeneous domains. More specifically, we apply this model to matching tasks in natural language, e.g., finding sensible responses for a tweet, or relevant answers to a given question. This new architecture naturally combines the localness and hierarchy intrinsic to the natural language problems, and therefore greatly improves upon the state-of-the-art models. 1 Introduction Many machine learning problems can be interpreted as matching two objects, e.g., images and captions in automatic captioning [11, 14], users and products in recommender systems, queries and retrieved documents in information retrieval. It is different from the usual notion of similarity since it is usually defined between objects from two different domains (e.g., texts and images), and it is usually associated with a particular purpose. The degree of matching is typically modeled as an inner-product of two representing feature vectors for objects x and y in a Hilbert space H, match(x, y) =< ΦY(x), ΦX (y) >H (1) while the modeling effort boils down to finding the mapping from the original inputs to the feature vectors. Linear models of this direction include the Partial Least Square (PLS) [19, 20], Canonical Correlation Analysis (CCA) [7], and their large margin variants [1]. In addition, there is also limited effort on finding the nonlinear mappings for that [3, 18]. In this paper, we focus on a rather difficult task of matching a given short text and candidate responses. Examples include retrieving answers for a given question and automatically commenting on a given tweet. This inner-product based schema, although proven effective on tasks like information retrieval, are often incapable for modeling the matching between complicated objects. First, representing structured objects like text as compact and meaningful vectors can be difficult; Second, inner-product cannot sufficiently take into account the complicated interaction between components within the objects, often in a rather nonlinear manner. In this paper, we attack the problem of matching short texts from a brand new angle. Instead of representing the text objects in each domain as semantically meaningful vectors, we directly model object-object interactions with a deep architecture. This new architecture allows us to explicitly capture the natural nonlinearity and the hierarchical structure in matching two structured objects. 1 2 Model Overview Figure 1: Architecture for linear matching. We start with the bilinear model. Assume we can represent objects in domain X and Y with vectors x ∈RDx and y ∈RDy. The bilinear matching model decides the score for any pair (x, y) as match(x, y) = x⊤Ay = Dx X m=1 Dy X n=1 Anmxmyn, (2) with a pre-determined A. From a different angle, each element product xnym in the above sum can be viewed as a micro and local decision about the matching level of x and y. The outer-product matrix M = xy⊤specifies the space of element-wise interaction between objects x and y. The final decision is made considering all the local decisions, while in the bilinear case match(x, y) = P nm AnmMnm, it simply sums all the local decisions with a weight specified by A, as illustrated in Figure 1. 2.1 From Linear to Deep This simple summarization strategy can be extended to a deep architecture to explore the nonlinearity and hierarchy in matching short texts. Unlike tasks like text classification, we need to work on a pair of text objects to be matched, which we refer to as parallel texts, borrowed from machine translation. This new architecture is mainly based on the following two intuitions: Localness: there is a salient local structure in the semantic space of parallel text objects to be matched, which can be roughly captured via the co-occurrence pattern of words across the objects. This localness however should not prevent two “distant” components from correlating with each other on a higher level, hence calls for the hierarchical characteristic of our model; Hierarchy: the decision making for matching has different levels of abstraction. The local decisions, capturing the interaction between semantically close words, will be combined later layer-bylayer to form the final and global decision on matching. 2.2 Localness “image patch” “text patch” Figure 2: Image patches vs. parallel-text patches. The localness of the text matching problem can be best described using an analogy with the patches in images, as illustrated in Figure 2. Loosely speaking, a patch for parallel texts defines the set of interacting pairs of words from the two text objects. Like the coordinate of an image patch, we can use (Ωx,p, Ωy,p) to specify the range of the path, with Ωx,p and Ωy,p each specifying a subset of terms in X and Y respectively. Like the patches of images, the patches defined here are meant to capture the segments of rich inherent structure. But unlike the naturally formed rectangular patches of images, the patches defined here do not come with a pre-given spatial continuity. It is so since in texts, the nearness of words are not naturally given as location of pixels in images, but instead needs to be discovered from the co-occurrence patterns of the matched texts. As shown later in Section 3, we actually do that with a method resembling bilingual topic modeling, which nicely captures the cooccurrence of the words within-domain and cross-domain simultaneously. The basic intuitions here are, 1) when the words co-occur frequently across the domains (e.g., fever—antibiotics), they are likely to have strong interaction in determining the matching score, and 2) when the words cooccur frequently in the same domain (e.g., {Hawaii,vacation}), they are likely to collaborate in making the matching decision. For example, modeling the matching between the word “Hawaii” in question (likely to be a travel-related question) and the word “RAM” in answer (likely an answer to a computer-related question) is probably useless, judging from their co-occurrence pattern in Question-Answer pairs. In other words, our architecture models only “local” pairwise relations on 2 a low level with patches, while describing the interaction between semantically distant terms on higher levels in the hierarchy. 2.3 Hierarchy Once the local decisions on patches are made (most of them are NULL for a particular short text pair), they will be sent to the next layer, where the lower-level decisions are further combined to form more composite decisions, which in turn will be sent to still higher levels. This process runs until it reaches the final decision. Figure 3 gives an illustrative example on hierarchical decision making. As it shows, the local decision on patch “SIGHTSEEING IN PARIS” and “SIGHTSEEING IN BERLIN” can be combined to form a higher level decision on patch for “SIGHTSEEING”, which in turn can be combined with decisions on patches like “HOTEL” and “TRANSPORTATION” to form a even higher level decision on “TRAVEL”. Note that one lowlevel topic does not exclusively belong to a higher-level one. For example, the “WEATHER” patch may belong to higher level patches “TRAVEL” and “AGRICULTURE” at the same time. Figure 3: An example of decision hierarchy. Quite intuitively, this decision composition mechanism is also local and varies with the “locations”. For example, when combining “SIGHTSEEING IN PARIS” and “SIGHTSEEING IN BERLIN”, it is more like an OR logic since it only takes one of them to be positive. A more complicated strategy is often needed in, for example, a decision on “TRAVELING”, which often takes more than one element, like “SIGHTSEEING”, “HOTEL”, “TRANSPORTATION”, or “WEATHER”, but not necessarily all of them. The particular strategy taken by a local decision composition unit is fully encoded in the weights of the corresponding neuron through sp(x, y) = f w⊤ p Φp(x, y)  , (3) where f is the active function. As stated in [12], a simple nonlinear function (such as sigmoid) with proper weights is capable of realizing basic logics such as AND and OR. Here we decide the hierarchical architecture of the decision making, but leave the exact mechanism for decision combination (encoded in the weights) to the learning algorithm later. 3 The Construction of Deep Architecture The process for constructing the deep architecture for matching consists of two steps. First, we define parallel text patches with different resolutions using bilingual topic models. Second, we construct a layered directed acyclic graph (DAG) describing the hierarchy of the topics, based on which we further construct the topology of the deep neural network. 3.1 Topic Modeling for Parallel Texts This step is to discover parallel text segments for meaningful co-occurrence patterns of words in both domains. Although more sophisticated methods may exist for capturing this relationship, we take an approach similar to the multi-lingual pLSI proposed in [10], and simply put the words from parallel texts together to a joint document, while using a different virtual vocabulary for each domain to avoid any mixing up. For example, the word hotel appearing in domain X is treated as a different word as hotel in domain Y. For modeling tool, we use latent Dirichlet allocation (LDA) with Gibbs sampling [2] on all the training data. Notice that by using topic modeling, we allow the overlapping sets of words, which is advantageous over non-overlapping clustering of words, since we may expect some words (e.g., hotel and price) to appear in multiple segments. Table 1 gives two example parallel-topics learned from a traveling-related Question-Answer corpus (see Section 5 for more details). As we can see intuitively, in the same topic, a word in domain X co-occurs frequently not only with words in the same domain, but also with those in domain Y. We fit the same corpus with L topic models with decreasing resolutions1, with the series of learned topic sets denoted as H = {T1, · · · , Tℓ, · · · , TL}, with ℓindexing the topic resolution. 1Topic resolution is controlled mainly by the number of topics, i.e., a topic model with 100 topics is considered to be of lower resolution (or more general) than the one with 500 topics. 3 Topic Label Question Answer SPECIAL local delicacy, special product tofu, speciality, aroma, duck, sweet, game, cuisine PRODUCT snack food, quality, tasty, · · · sticky rice, dumpling, mushroom, traditional,· · · TRANSPORTATION route, arrangement, location distance, safety, spending, gateway, air ticket, pass arrive, train station, fare, · · · traffic control, highway, metroplis, tunnel, · · · Table 1: Examples of parallel topics. Originally in Chinese, translated into English by the authors. 3.2 Getting Matching Architecture With the set of topics H, the architecture of the deep matching model can then be obtained in the following three steps. First, we trim the words (in both domains X and Y) with the low probability for each topic in Tℓ∈H, and the remaining words in each topic specify a patch p. With a slight abuse of symbols, we still use H to denote the patch sets with different resolutions. Second, based on the patches specified in H, we construct a layered DAG G by assigning each patch with resolution ℓto a number of patches with resolution ℓ−1 based on the word overlapping between patches, as illustrated in Figure 4 (left panel). If a patch p in layer ℓ−1 is assigned to patch p′ in layer ℓ, we denote this relation as p ≺p′ 2. Third, based on G, we can construct the architecture of the patchinduced layers of the neural network. More specifically, each patch p in layer ℓwill be transformed into Kℓneurons in the (ℓ−1)th hidden layer in the neural network, and the Kℓneurons are connected to the neurons in the ℓth layer corresponding to patch p′ iff p ≺p′. In other words, we determine the sparsity-pattern of the weights, but leave the values of the weights to the later learning phase. Using the image analogy, the neurons corresponding to patch p are referred to as filters. Figure 4 illustrates the process of transforming patches in layer ℓ−1 (specific topics) and layer ℓ(general topics) into two layers in neural network with Kℓ= 2. patches neural network Figure 4: An illustration of constructing the deep architecture from hierarchical patches. The overall structure is illustrated in Figure 5. The input layer is a two-dimensional interaction space, which connects to the first patch-induced layer p-layerI followed by the second patchinduced layer p-layerII. The connections to p-layerI and p-layerII have pre-specified sparsity patterns. Following p-layerII is a committee layer (c-layer), with full connections from p-layerII. With an input (x, y), we first get the local matching decisions on p-layerI, associated with patches in the interaction space. Those local decisions will be sent to the corresponding neurons in p-layerII to get the first round of fusion. The outputs of p-layerII are then sent to c-layer for further decision composition. Finally the logistic regression unit in the output layer summarizes the decisions on c-layer to get the final matching score s(x, y). This architecture is referred to as DEEPMATCH in the remainder of the paper. Figure 5: An illustration of the deep architecture for matching decisions. 2In the assignment, we make sure each patch in layer ℓis assigned to at least mℓpatches in layer ℓ−1. 4 3.3 Sparsity The final constructed neural network has two types of sparsity. The first type of sparsity is enforced through architecture, since most of the connections between neurons in adjacent layers are turned off in construction. In our experiments, only about 2% of parameters are allowed to be nonzero. The second type of sparsity is from the characteristics of the texts. For most object pairs in our experiment, only a small percentage of neurons in the lower layers are active (see Section 5 for more details). This is mainly due to two factors, 1) the input parallel texts are very short (usually < 100 words), and 2) the patches are well designed to give a compact and sparse representation of each of the texts, as describe in Section 3.1. To understand the second type of sparsity, let us start with the following definition: Definition 3.1. An input pair (x, y) overlaps with patch p, iff x ∩px ̸= ∅and y ∩py ̸= ∅, where px and py are respectively the word indices of patch p in domain X and Y. We also define the following indicator function overlap((x, y), p) def = ∥px ∩x∥0 · ∥py ∩y∥0. The proposed architecture only allows neurons associated with patches overlapped with the input to have nonzero output. More specifically, the output of neurons associated with patch p is sp(x, y) = ap(x, y) · overlap((x, y), p) (4) to ensure that sp(x, y) ≥0 only when there is non-empty cross-talking of x and y within patch p, where ap(x, y) is the activation of neuron before this rule is enforced. It is not hard to understand, for any input (x, y), when we track any upwards path of decisions from input to a higher level, there is nonzero matching vote until we reach a patch that contains terms from both x and y. This view is particularly useful in parameter tuning with back-propagation: the supervision signal can only get down to a patch p when it overlaps with input (x, y). It is easy to show from the definition, once the supervision signal stops at one patch p, it will not get pass p and propagate to p’s children, even if those children have other ancestors. This indicates that when using stochastic gradient descent, the updating of weights usually only involves a very small number of neurons, and therefore can be very efficient. 3.4 Local Decision Models In the hidden layers p-layerI, p-layerII, and c-layer, we allow two types of neurons, corresponding to two active functions: 1) linear flin(t) = x, and 2) sigmoid fsig(t) = (1 + e−t)−1. In the first layer, each patch p for (x, y) takes the value of the interaction matrix Mp = xpy⊤ p , and the kth local decision on p is given by a(k) p (x, y) = f (k) p P n,m A(k) p,nmMp,nm + b(k) p  , with weight given by A(k) and the activation function f (k) p ∈{flin, fsig} . With low-rank constraint on A(k) to reduce the complexity, we essentially have a(k) p (x, y) = f (k) p  x⊤ p L(k) x,p(L(k) y,p)⊤yp + b(k) p  , k = 1, · · · , K1, (5) where L(k) x,p ∈R|px|×Dp, L(k) y,p ∈R|py|×Dp, with the latent dimension Dp. As indicated in Figure 5, the two-dimensional structure is lost after leaving the input layer, while the local structure is kept in the second patch-induced layer p-layerII. Basically, a neuron in layer p-layerII processes the low-level decisions assigned to it made in layer p-layerI a(k) p (x, y) = f (k) p w⊤ p,kΦp(x, y)  , k = 1, · · · , K2, (6) where Φp(x, y) lists all the lower-level decisions assigned to unit p: Φp(x, y) = [· · · , s(1) p′ (x, y), s(2) p′ (x, y), · · · , s(K1) p′ (x, y), · · · ], ∀p′ ≺p, p′ ∈T1 which contains all the decisions on patches in layer p-layerI subsumed by p. The local decision models in the committee layer c-layer are the same as in p-layerII, except that they are fully connected to neurons in the previous layer. 4 Learning We divide the parameters, denoted W, into three sets: 1) the low-rank bilinear model for mapping from input patches to p-layerI, namely L(k) x,p, L(k) y,p, and offset b(k) p for all p ∈P and filter index 1 ≤k ≤K1, 2) the parameters for connections between patch-induced neurons, i.e., the weights 5 between p-layerI and p-layerII, denoted (w(k) p , b(k) p ) for associated patch p and filter index 1 ≤k ≤K2, and 3) the weights for committee layer (c-layer) and after, denoted as wc. We employ a discriminative training strategy with a large margin objective. Suppose that we are given the following triples (x, y+, y−) from the oracle, with x (∈X) matched with y+ better than with y−(both ∈Y). We have the following ranking-based loss as objective: L(W, Dtrn) = X (xi,y+ i ,y− i )∈Dtrn eW(xi, y+ i , y− i ) + R(W), (7) where R(W) is the regularization term, and eW(xi, y+ i , y− i ) is the error for triple (xi, y+ i , y− i ), given by the following large margin form: ei = eW(xi, y+ i , y− i ) = max(0, m + s(xi, y− i ) −s(xi, y+ i )), with 0 < m < 1 controlling the margin in training. In the experiments, we use m = 0.1. 4.1 Back-Propagation All three sets of parameters are updated through back-propagation (BP). The updating of the weights from hidden layers are almost the same as that for conventional Multi-layer Perceptron (MLP), with two slight differences: 1) we have a different input model and two types of activation function, and 2) we could gain some efficiency by leveraging the sparsity pattern of the neural network, but the advantage diminishes quickly after the first two layers. This sparsity however greatly reduces the number of parameters for the first two layers, and hence the time on updating them. From Equation (4-6), the sub-gradient of L(k) x,p w.r.t. empirical error e is ∂e ∂L(k) x,p = X i  ∂ei ∂s(k) p (xi, y+ i ) ∂s(k) p (xi, y+ i ) ∂pot(k) p (xi, y+ i ) xi,p(y+ i,p)⊤L(k) y,p  · overlap (xi, y+ i ), p  − ∂ei ∂s(k) p (xi, y− i ) ∂s(k) p (xi, y− i ) ∂pot(k) p (xi, y− i ) xi,p(y− i,p)⊤L(k) y,p  · overlap (xi, y− i ), p  , (8) where i indices the training instances, and pot(k) p (x, y) = x⊤ p L(k) x,p(L(k) y,p)⊤yp + b(k) p stands for the potential value for s(k) p . The gradient for L(k) y,p is given in a slightly different way.For the weights between p-layerI and p-layerII, the gradient can also benefit from the sparsity in activation. We use stochastic sub-gradient descent with mini-batches [9], each of which consists of 50 randomly generated triples (x, y+, y−), where the (x, y+) is the original pair, and y−is a randomly selected response. With this type of optimization, most of the patches in p-layerI and p-layerII get zero inputs, and therefore remain inactive by definition during the prediction as well as updating process. On the tasks we have tried, only about 2% of parameters are allowed to be nonzero for weights among the patch-induced layers. Moreover, during stochastic gradient descent, only about 5% of neurons in p-layerI and p-layerII are active on average for each training instance, indicating that the designed architecture has greatly reduced the essential capacity of the model. 5 Experiments We compare our deep matching model to the inner-product based models, ranging from variants of bilinear models to nonlinear mappings for ΦX (·) and ΦY(·). For bilinear models, we consider only the low-rank models with ΦX (x) = P ⊤ x x and Φy(y) = P ⊤ x y, which gives match(x, y) =< P ⊤ x x, P ⊤ y y >= x⊤PxP ⊤ y y. With different kinds of constraints on Px and Py, we get different models. More specifically, with 1) orthnormality constraints P ⊤ x Py = Id×d, we get partial least square (PLS) [19], and with 2) ℓ2 and ℓ1 based constraints put on rows or columns, we get Regularized Mapping to Latent Space (RMLS) 6 [20]. For nonlinear models, we use a modified version of the Siamese architecture [3], which uses two different neural networks for mapping objects in the two domains to the same d-dimensional latent space, where inner product can be used as a measure of matching and is trained with a similar large margin objective. Different from the original model in [3], we allow different parameters for mapping to handle the domain heterogeneity. Please note here that we omit the nonlinear model for shared representation [13, 18, 17] since they are essentially also inner product based models (when used for matching) and not designed to deal with short texts with large vocabulary. 5.1 Data Sets We use the learned matching function for retrieving response texts y for a given query text x, which will be ranked purely based on the matching scores. We consider the following two data sets: Question-Answer: This data set contains around 20,000 traveling-related (Question, Answer) pairs collected from Baidu Zhidao (zhidao.baidu.com) and Soso Wenwen (wenwen.soso.com), two famous Chinese community QA Web sites. The vocabulary size is 52,315. Weibo-Comments: This data set contains half million (Weibo, comment) pairs collected from Sina Weibo (weibo.com), a Chinese Twitter-like microblog service. The task is to find the appropriate responses (e.g., comments) to given Weibo posts. This task is significantly harder than the QuestionAnswer task since the Weibo data are usually shorter, more informal, and harder to capture with bag-of-words. The vocabulary size for tweets and comments are both 48, 724. On both data sets, we generate (x, y+, y−) triples, with y−being randomly selected. The training data are randomly split into training data and testing data, and the parameters of all models (including the learned patches for DEEPMATCH) are learned on training data. The hyper parameters (e.g., the latent dimensions of low-rank models and the regularization coefficients) are tuned on a validation set (as part of the training set). We use NDCG@1 and NDCG@6 [8] on random pool with size 6 (one positive + five negative) to measure the performance of different matching models. 5.2 Performance Comparison The retrieval performances of all four models are reported in Table 2. Among the two data sets, the Question-Answer data set is relatively easy, with all four matching models improve upon random guesses. As another observation, we get significant gain of performance by introducing nonlinearity in the mapping function, but all the inner-product based matching models are outperformed by the proposed DEEPMATCH with large margin on this data set. The story is slightly different on the Weibo-Response data set, which is significantly more challenging than the Q-A task in that it relies more on the content of texts and is harder to be captured by bag-of-words. This difficulty can be hardly handled by inner-product based methods, even with nonlinear mappings of SIAMESE NETWORK. In contrast, DEEPMATCH still manages to perform significantly better than all other models. To further understand the performances of the different matching models, we also compare the generalization ability of two nonlinear models. We find that the SIAMESE NETWORK can achieve over 90% correct pairwise comparisons on training set with small regularization, but generalizes relatively poorly on the test set with all the configurations we tried. This is not surprising since SIAMESE NETWORK has the same level of parameters (varying with the number of hidden units) as DEEPMATCH. We argue that our model has better generalization property than the Siamese architecture with similar model complexity. Question-Answer Weibo-Response nDCG@1 nDCG@6 nDCG@1 nDCG@6 RANDOM GUESS 0.167 0.550 0.167 0.550 PLS 0.285 0.662 0.171 0.587 RMLS 0.282 0.659 0.165 0.553 SIAMESE NETWORK 0.357 0.735 0.175 0.574 DEEPMATCH 0.723 0.856 0.336 0.665 Table 2: The retrieval performance of matching models on the Q-A and Weibo data sets. 7 5.3 Model Selection We tested different variants of the current DEEPMATCH architecture, with results reported in Figure 6. There are two ways to increase the depth of the proposed method: adding patch-induced layers and committee layers. As shown in Figure 6 (left and middle panels), the performance of DEEPMATCH stops increasing in either way when the overall depth goes beyond 6, while the training gets significantly slower with each added hidden layer. The number of neurons associated with each patch (Figure 6, right panel) follows a similar story: the performance gets flat out after the number of neurons per patch reaches 3, again with training time and memory increased significantly. As another observation about the architecture, DEEPMATCH with both linear and sigmoid activation functions in hidden layers yields slightly but consistently better performance than that with only sigmoid function. Our conjecture is that linear neurons provide shortcuts for low-level matching decision to high level composition units, and therefore facilitate the informative low-level units in determining the final matching score. size of patch-induced layers size of committee layer(s) number of filters/patch Figure 6: Choices of architecture for DEEPMATCH. For the left and middle panels, the numbers in parentheses stand for number of neurons in each layer. 6 Related Work Our model is apparently a special case of the learning-to-match models, for which much effort is on designing a bilinear form [1, 19, 7]. As we discussed earlier, this kind of models cannot sufficiently model the rich and nonlinear structure of matching complicated objects. In order to introduce more modeling flexibility, there has been some works on replacing Φ(·) in Equation (1) with an nonlinear mapping, e.g., with neural networks [3] or implicitly through kernelization [6]. Another similar thread of work is the recent advances of deep learning models on multi-modal input [13, 17]. It essentially finds a joint representation of inputs in two different domains, and hence can be used to predict the other side. Those deep learning models however do not give a direct matching function, and cannot handle short texts with a large vocabulary. Our work is in a sense related to the sum-product network (SPN)[4, 5, 15], especially the work in [4] that learns the deep architecture from clustering in the feature space for the image completion task. However, it is difficult to determine a regular architecture like SPN for short texts, since the structure of the matching task for short texts is not as well-defined as that for images. We therefore adopt a more traditional MLP-like architecture in this paper. Our work is conceptually close to the dynamic pooling algorithm recently proposed by Socher et al [16] for paraphrase identification, which is essentially a special case of matching between two homogeneous domains. Similar to our model, their proposed model also constructs a neural network on the interaction space of two objects (sentences in their case), and outputs the measure of semantic similarity between them. The major differences are three-fold, 1) their model relies on a predefined compact vectorial representation of short text, and therefore the similarity metric is not much more than summing over the local decisions, 2) the nature of dynamic pooling allows no space for exploring more complicated structure in the interaction space, and 3) we do not exploit the syntactic structure in the current model, although the proposed architecture has the flexibility for that. 7 Conclusion and Future Work We proposed a novel deep architecture for matching problems, inspired partially by the long thread of work on deep learning. The proposed architecture can sufficiently explore the nonlinearity and hierarchy in the matching process, and has been empirically shown to be superior to various innerproduct based matching models on real-world data sets. 8 References [1] B. Bai, J. Weston, D. Grangier, R. Collobert, K. Sadamasa, Y. Qi, O. Chapelle, and K. Weinberger. Supervised semantic indexing. In CIKM’09, pages 187–196, 2009. [2] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [3] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In Proc. of Computer Vision and Pattern Recognition Conference. IEEE Press, 2005. [4] A. Dennis and D. Ventura. Learning the architecture of sum-product networks using clustering on variables. In Advances in Neural Information Processing Systems 25. [5] R. Gens and P. Domingos. Discriminative learning of sum-product networks. In NIPS, pages 3248–3256, 2012. [6] D. Grangier and S. Bengio. A discriminative kernel-based model to rank images from text queries. IEEE transactions on PAMI, 30(8):1371–1384, 2008. [7] D. Hardoon and J. Shawe-Taylor. Kcca for different level precision in content-based image retrieval. In Proceedings of Third International Workshop on Content-Based Multimedia Indexing, 2003. [8] K. J¨arvelin and J. Kek¨al¨ainen. Ir evaluation methods for retrieving highly relevant documents. In SIGIR, pages 41–48, 2000. [9] Y. LeCun, L. Bottou, G. Orr, and K. Muller. Efficient backprop. In G. Orr and M. K., editors, Neural Networks: Tricks of the trade. Springer, 1998. [10] M. Littman, S. Dumais, and T. Landauer. Automatic cross-language information retrieval using latent semantic indexing. In Cross-Language Information Retrieval, chapter 5, pages 51–62, 1998. [11] A. K. Menon and C. Elkan. Link prediction via matrix factorization. In Proceedings of the 2011 European conference on Machine learning and knowledge discovery in databases - Volume Part II, ECML PKDD’11, pages 437–452, 2011. [12] M. Minsky and S. Papert. Perceptrons - an introduction to computational geometry. MIT Press, 1987. [13] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A. Y. Ng. Multimodal deep learning. In International Conference on Machine Learning (ICML), Bellevue, USA, June 2011. [14] V. Ordonez, G. Kulkarni, and T. L. Berg. Im2text: Describing images using 1 million captioned photographs. In Neural Information Processing Systems (NIPS), 2011. [15] H. Poon and P. Domingos. Sum-product networks: A new deep architecture. In UAI, pages 337–346, 2011. [16] R. Socher and E. Huang and J. Pennington and A. Ng and C. Manning. Dynamic Pooling and Unfolding Recursive Autoencoders for Paraphrase Detection. In Advances in NIPS 24. 2011. [17] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep boltzmann machines. In NIPS, pages 2231–2239, 2012. [18] B. Wang, X. Wang, C. Sun, B. Liu, and L. Sun. Modeling semantic relevance for question-answer pairs in web social communities. In ACL, pages 1230–1238, 2010. [19] W. Wu, H. Li, and J. Xu. Learning query and document similarities from click-through bipartite graph with metadata. In Proceedings of the sixth ACM international conference on WSDM, pages 687–696, 2013. [20] W. Wu, Z. Lu, and H. Li. Regularized mapping to latent structures and its application to web search. Technical report. 9
2013
190
4,921
Sensor Selection in High-Dimensional Gaussian Trees with Nuisances Daniel Levine MIT LIDS dlevine@mit.edu Jonathan P. How MIT LIDS jhow@mit.edu Abstract We consider the sensor selection problem on multivariate Gaussian distributions where only a subset of latent variables is of inferential interest. For pairs of vertices connected by a unique path in the graph, we show that there exist decompositions of nonlocal mutual information into local information measures that can be computed efficiently from the output of message passing algorithms. We integrate these decompositions into a computationally efficient greedy selector where the computational expense of quantification can be distributed across nodes in the network. Experimental results demonstrate the comparative efficiency of our algorithms for sensor selection in high-dimensional distributions. We additionally derive an online-computable performance bound based on augmentations of the relevant latent variable set that, when such a valid augmentation exists, is applicable for any distribution with nuisances. 1 Introduction This paper addresses the problem of focused active inference: selecting a subset of observable random variables that is maximally informative with respect to a specified subset of latent random variables. The subset selection problem is motivated by the desire to reduce the overall cost of inference while providing greater inferential accuracy. For example, in the context of sensor networks, control of the data acquisition process can lead to lower energy expenses in terms of sensing, computation, and communication [1, 2]. In many inferential problems, the objective is to reduce uncertainty in only a subset of the unknown quantities, which are related to each other and to observations through a joint probability distribution that includes auxiliary variables called nuisances. On their own, nuisances are not of any extrinsic importance to the uncertainty reduction task and merely serve as intermediaries when describing statistical relationships, as encoded with the joint distribution, between variables. The structure in the joint can be represented parsimoniously with a probabilistic graphical model, often leading to efficient inference algorithms [3, 4, 5]. However, marginalization of nuisance variables is potentially expensive and can mar the very sparsity of the graphical model that permitted efficient inference. Therefore, we seek methods for selecting informative subsets of observations in graphical models that retain nuisance variables. Two primary issues arise from the inclusion of nuisance variables in the problem. Observation random variables and relevant latent variables may be nonadjacent in the graphical model due to the interposition of nuisances between them, requiring the development of information measures that extend beyond adjacency (alternatively, locality) in the graph. More generally, the absence of certain conditional independencies, particularly between observations conditioned on the relevant latent variable set, means that one cannot directly apply the performance bounds associated with submodularity [6, 7, 8]. 1 In an effort to pave the way for analyzing focused active inference on the class of general distributions, this paper specifically examines multivariate Gaussian distributions – which exhibit a number of properties amenable to analysis – and later specializes to Gaussian trees. This paper presents a decomposition of pairwise nonlocal mutual information (MI) measures on Gaussian graphs that permits efficient information valuation, e.g., to be used in a greedy selection. Both the valuation and subsequent selection may be distributed over nodes in the network, which can be of benefit for high-dimensional distributions and/or large-scale distributed sensor networks. It is also shown how an augmentation to the relevant set can lead to an online-computable performance bound for general distributions with nuisances. The nonlocal MI decomposition extensively exploits properties of Gaussian distributions, Markov random fields, and Gaussian belief propagation (GaBP), which are reviewed in Section 2. The formal problem statement of focused active inference is stated in Section 3, along with an example that contrasts focused and unfocused selection. Section 4 presents pairwise nonlocal MI decompositions for scalar and vectoral Gaussian Markov random fields. Section 5 shows how to integrate pairwise nonlocal MI into a distributed greedy selection algorithm for the focused active inference problem; this algorithm is benchmarked in Section 6. A performance bound applicable to any focused selector is presented in Section 7. 2 Preliminaries 2.1 Markov Random Fields (MRFs) Let G = (V, E) be a Markov random field (MRF) with vertex set V and edge set E. Let u and v be vertices of the graph G. A u-v path is a finite sequence of adjacent vertices, starting with vertex u and terminating at vertex v, that does not repeat any vertex. Let PG(u, v) denote the set of all paths between distinct u and v in G. If |PG(u, v)| > 0, then u and v are graph connected. If |PG(u, v)| = 1, then there is a unique path between u and v, and denote the sole element of PG(u, v) by ¯Pu:v. If |PG(u, v)| = 1 for all u, v ∈V, then G is a tree. If |PG(u, v)| ≤1 for all u, v ∈V, then G is a forest, i.e., a disjoint union of trees. A chain is a simple tree with diameter equal to the number of nodes. A chain is said to be embedded in graph G if the nodes in the chain comprise a unique path in G. For MRFs, the global Markov property relates connectivity in the graph to implied conditional independencies. If D ⊆V, then GD = (D, ED) is the subgraph induced by D, with ED = E ∩ (D × D). For disjoint subsets A, B, C ⊂V, let G\B be the subgraph induced by V \ B. The global Markov property holds that xA ⊥⊥xC | xB iff |PG\B(i, j)| = 0 for all i ∈A and j ∈C. 2.2 Gaussian Distributions in Information Form Consider a random vector x distributed according to a multivariate Gaussian distribution N(µ, Λ) with mean µ and (symmetric, positive definite) covariance Λ > 0. One could equivalently consider the information form x ∼N −1(h, J) with precision matrix J = Λ−1 > 0 and potential vector h = Jµ, for which px(x) ∝exp{−1 2xT Jx + hT x}. One can marginalize out or condition on a subset of random variables by considering a partition of x into two subvectors, x1 and x2, such that x =  x1 x2  ∼N −1  h1 h2  , J11 J12 JT 12 J22  . In the information form, the marginal distribution over x1 is px1(·) = N −1(·; h′ 1, J′ 1), where h′ 1 = h1 −J12J−1 22 h2 and J′ 1 = J11 −J12J−1 22 JT 12, the latter being the Schur complement of J22. Conditioning on a particular realization x2 of the random subvector x2 induces the conditional distribution px1|x2(x1|x2) = N −1(x1; h′ 1|2, J11), where h′ 1|2 = h1 −J12x2, and J11 is exactly the upper-left block submatrix of J. (Note that the conditional precision matrix is independent of the value of the realized x2.) 2 If x ∼N −1(h, J), where h ∈Rn and J ∈Rn×n, then the (differential) entropy of x is [9] H(x) = −1 2 log ((2πe)n · det(J)) . (1) Likewise, for nonempty A ⊆{1, . . . , n}, and (possibly empty) B ⊆{1, . . . , n} \ A, let J′ A|B be the precision matrix parameterizing pxA|xB. The conditional entropy of xA ∈Rd given xB is H(xA|xB) = −1 2 log((2πe)d · det(J′ A|B)). (2) The mutual information between xA and xB is I(xA; xB) = H(xA) + H(xB) −H(xA, xB) = 1 2 log det(J′ {A,B}) det(J′ A) det(J′ B) ! , (3) which generally requires O(n3) operations to compute via Schur complement. 2.3 Gaussian MRFs (GMRFs) If x ∼N −1(h, J), the conditional independence structure of px(·) can be represented with a Gaussian MRF (GMRF) G = (V, E), where E is determined by the sparsity pattern of J and the pairwise Markov property: {i, j} ∈E iff Jij ̸= 0. In a scalar GMRF, V indexes scalar components of x. In a vectoral GMRF, V indexes disjoint subvectors of x, each of potentially different dimension. The block submatrix Jii can be thought of as specifying the sparsity pattern of the scalar micro-network within the vectoral macro-node i ∈V. 2.4 Gaussian Belief Propagation (GaBP) If x can be partitioned into n subvectors of dimension at most d, and the resulting graph is treeshaped, then all marginal precision matrices J′ i, i ∈V can be computed by Gaussian belief propagation (GaBP) [10] in O(n · d3). For such trees, one can also compute all edge marginal precision matrices J′ {i,j}, {i, j} ∈E, with the same asymptotic complexity of O(n · d3). In light of (3), pairwise MI quantities between adjacent nodes i and j may be expressed as I(xi; xj) = H(xi) + H(xj) −H(xi, xj), = −1 2 ln det(J′ i) −1 2 ln det(J′ j) + 1 2 ln det(J′ {i,j}), {i, j} ∈E, (4) i.e., purely in terms of node and edge marginal precision matrices. Thus, GaBP provides a way of computing all local pairwise MI quantities in O(n · d3). Note that Gaussian trees comprise an important class of distributions that subsumes Gaussian hidden Markov models (HMMs), and GaBP on trees is a generalization of the Kalman filtering/smoothing algorithms that operate on HMMs. Moreover, the graphical inference community appears to best understand the convergence of message passing algorithms for continuous distributions on subclasses of multivariate Gaussians (e.g., tree-shaped [10], walk-summable [11], and feedback-separable [12] models, among others). 3 Problem Statement Let px(·) = N −1(·; h, J) be represented by GMRF G = (V, E), and consider a partition of V into the subsets of latent nodes U and observable nodes S, with R ⊆U denoting the subset of relevant latent variables (i.e., those to be inferred). Given a cost function c : 2S →R≥0 over subsets of observations, and a budget β ∈R≥0, the focused active inference problem is maximizeA⊆S I(xR; xA) s.t. c(A) ≤β. (5) 3 The focused active inference problem in (5) is distinguished from the unfocused active inference problem maximizeA⊆S I(xU; xA) s.t. c(A) ≤β, (6) which considers the entirety of the latent state U ⊇R to be of interest. Both problems are known to be NP-hard [13, 14]. By the chain rule and nonnegativity of MI, I(xU; xA) = I(xR; xA) + I(xU\R; xA | xR) ≥ I(xR; xA), for any A ⊆S. Therefore, maximizing unfocused MI does not imply maximizing focused MI. Focused active inference must be posed as a separate problem to avoid the situation where the observation selector becomes fixated on inferring nuisance variables as a result of I(xU\R; xA | xR) being included implicitly in the valuation. In fact, an unfocused selector can perform arbitrarily poorly with respect to a focused metric, as the following example illustrates. Example 1. Consider a scalar GMRF over a four-node chain (Figure 1a), whereby J13 = J14 = J24 = 0 by the pairwise Markov property, with R = {2}, S = {1, 4}, c(A) = |A| (i.e., unit-cost observations), and β = 1. The optimal unfocused decision rule A∗ (UF ) = argmaxa∈{1,4} I(x2, x3; xa) can be shown, by conditional independence and positive definiteness of J, to reduce to |J34| A∗ (UF )={4} ⋛ A∗ (UF )={1} |J12|, independent of J23, which parameterizes the edge potential between nodes 2 and 3. Conversely, the optimal focused decision rule A∗ (F ) = argmaxa∈{1,4} I(x2; xa) can be shown to be |J23| · 1{J2 34−J2 12J2 34−J2 12≥0} A∗ (F )={4} ⋛ A∗ (F )={1} s (1 −J2 34)J2 12 J2 34 , where 1{·} is the indicator function, which evaluates to 1 when its argument is true and 0 otherwise. The loss associated with optimizing the “wrong” information measure is demonstrated in Figure 1b. The reason for this loss is that as |J23| →0+, the information that node 3 can convey about node 2 also approaches zero, although the unfocused decision rule is oblivious to this fact. x1 x2 x3 x4 (a) Graphical model. 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 |J23| I(xR;xA) [nats] Score vs. |J23| (with J2 12 = 0.3, J2 34 = 0.5) Unfocused Policy Focused Policy (b) Policy comparison. Figure 1: (a) Graphical model for the four-node chain example. (b) Unfocused vs. focused policy comparison. There exists a range of values for |J23| such that the unfocused and focused policies coincide; however, as |J23| →0+, the unfocused policy approaches complete performance loss with respect to the focused measure. 4 1 2 ... k ˜G1 ˜G2 ˜Gk (a) Unique path with sidegraphs. (b) Vectoral graph with thin edges. Figure 2: (a) Example of a nontree graph G with a unique path ¯P1:k between nodes 1 and k. The “sidegraph” attached to each node i ∈¯P1:k is labeled as ˜Gi. (b) Example of a vectoral graph with thin edges, with internal (scalar) structure depicted. 4 Nonlocal MI Decomposition For GMRFs with n nodes indexing d-dimensional random subvectors, I(xR; xA) can be computed exactly in O((nd)3) via Schur complements/inversions on the precision matrix J. However, certain graph structures permit the computation via belief propagation of all local pairwise MI terms I(xi; xj), for adjacent nodes i, j ∈V in O(n · d3) – a substantial savings for large networks. This section describes a transformation of nonlocal MI between uniquely path-connected nodes that permits a decomposition into the sum of transformed local MI quantities, i.e., those relating adjacent nodes in the graph. Furthermore, the local MI terms can be transformed in constant time, yielding an O(n · d3) for computing any pairwise nonlocal MI quantity coinciding with a unique path. Definition 1 (Warped MI). For disjoint subsets A, B, C ⊆ V, the warped mutual information measure W : 2V × 2V × 2V → (−∞, 0] is defined such that W(A; B|C) ≜ 1 2 log (1 −exp {−2I(xA; xB|xC)}). For convenience, let W(i; j|C) ≜W({i}; {j}|C) for i, j ∈V. Remark 2. For i, j ∈V indexing scalar nodes, the warped MI of Definition 1 reduces to W(i; j) = log |ρij|, where ρij ∈[−1, 1] is the correlation coefficient between scalar r.v.s xi and xj. The measure log |ρij| has long been known to the graphical model learning community as an “additive tree distance” [15, 16], and our decomposition for vectoral graphs is a novel application for sensor selection problems. To the best of the authors’ knowledge, the only other distribution class with established additive distances are tree-shaped symmetric discrete distributions [16], which require a very limiting parameterization of the potentials functions defined over edges in the factorization of the joint distribution. Proposition 3 (Scalar Nonlocal MI Decomposition). For any GMRF G = (V, E) where V indexes scalar random variables, if |PG(u, v)| = 1 for distinct vertices u, v ∈V, then for any C ⊆V \ {u, v}, I(xu; xv|xC) can be decomposed as W(u; v|C) = X {i,j}∈¯Eu:v W(i; j|C), (7) where ¯Eu:v is the set of edges joining consecutive nodes of ¯Pu:v, the unique path between u and v and sole element of PG(u, v). (Proofs of this and subsequent propositions can be found in the supplementary material.) Remark 4. Proposition 3 requires only that the path between vertices u and v be unique. If G is a tree, this is obviously satisfied. However, the result holds on any graph for which: the subgraph induced by ¯Pu:v is a chain; and every i ∈¯Pu:v separates N(i) \ ¯Pu:v from ¯Pu:v \ {i}, where N(i) ≜{j : {i, j} ∈E} is the neighbor set of i. See Figure 2a for an example of a nontree graph with a unique path. Definition 5 (Thin Edges). An edge {i, j} ∈E of GMRF G = (V, E; J) is thin if the corresponding submatrix Jij has exactly one nonzero scalar component. (See Figure 2b.) For vectoral problems, each node may contain a subnetwork of arbitrarily connected scalar random variables (see Figure 2b). Under the assumption of thin edges (Definition 5), a unique path between nodes u and v must enter interstitial nodes through one scalar r.v. and leave through one scalar 5 r.v. Therefore, let ζi(u, v|C) ∈(−∞, 0] denote the warped MI between the enter and exit r.v.s of interstitial vectoral node i on ¯Pu:v, with conditioning set C ⊆V \ {u, v}.1 Note that ζi(u, v|C) can be computed online in O(d3) via local marginalization given J′ i|C, which is an output of GaBP. Proposition 6 (Vectoral Nonlocal MI Decomposition). For any GMRF G = (V, E) where V indexes random vectors of dimension at most d and the edges in E are thin, if |PG(u, v)| = 1 for distinct vertices u, v ∈V, then for any C ⊆V \ {u, v}, I(xu; xv|xC) can be decomposed as W(u; v|C) = X {i,j}∈¯Eu:v W(i; j|C) + X i∈¯ Pu:v\{u,v} ζi(u, v|C). (8) 5 (Distributed) Focused Greedy Selection The nonlocal MI decompositions of Section 4 can be used to efficiently solve the focused greedy selection problem, which at each iteration, given the subset A ⊂S of previously selected observable random variables, is argmax {y∈S\A : c(y)≤β−c(A)} I(xR; xy | xA). To proceed, first consider the singleton case R = {r} for r ∈U. Running GaBP on the graph G conditioned on A and subsequently computing all terms W(i; j|A), ∀{i, j} ∈E incurs a computational cost of O(n · d3). Once GaBP has converged, node r authors an “r-message” with the value 0. Each neighbor i ∈N(r) receives that message with value modified by W(r; i|A); there is no ζ term because there are no interstitial nodes between r and its neighbors. Subsequently, each i ∈N(r) messages its neighbors j ∈N(i) \ {r}, modifying the value of its r-message by W(i; j|A) + ζi(r, j|A), the latter term being computed online in O(d3) from J′ i|A, itself an output of GaBP.2 Then j messages N(j) \ {i}, and so on down to the leaves of the tree. Since there are at most n−1 edges in a forest, the total cost of dissemination is still O(n·d3), after which all nodes y in the same component as r will have received an r-message whose value on arrival is W(r; y|A), from which I(xr; xy|A) can be computed in constant time. Thus, for |R| = 1, all scores I(xR; xy|xA) for y ∈S \ A can collectively be computed at each iteration of the greedy algorithm in O(n · d3). Now consider |R| > 1. Let R = (r1, . . . , r|R|) be an ordering of the elements of R, and let Rk be the first k elements of R. Then, by the chain rule of mutual information, I(xR; xy | xA) = P|R| k=1 I(xrk; xy | xA∪Rk−1), y ∈S \ A, where each term in the sum is a pairwise (potentially nonlocal) MI evaluation. The implication is that one can run |R| separate instances of GaBP, each using a different conditioning set A ∪Rk−1, to compute “node and edge weights” (W and ζ terms) for the r-message passing scheme outlined above. The chain rule suggests one should then sum the unwarped r-scores of these |R| instances to yield the scores I(xR; xy|xA) for y ∈S \ A. The total cost of a greedy update is then O |R| · nd3 . One of the benefits of the focused greedy selection algorithm is its amenability to parallelization. All quantities needed to form the W and ζ terms are derived from GaBP, which is parallelizable and guaranteed to converge on trees in at most diam(G) iterations [10]. Parallelization reallocates the expense of quantification across networked computational resources, often leading to faster solution times and enabling larger problem instantiations than are otherwise permissible. However, full parallelization, wherein each node i ∈V is viewed as separate computing resource, incurs a multiplicative overhead of O(diam(G)) due to each i having to send |N(i)| messages diam(G) times, yielding local communication costs of O(diam(G)|N(i)|·d3) and overall complexity of O(diam(G)·|R|·nd3). This overhead can be alleviated by instead assigning to every computational resource a connected subgraph of G. 1As node i may have additional neighbors that are not on the u-v path, using the notation ζi(u, v|C) is a convenient way to implicitly specify the enter/exit scalar r.v.s associated with the path. Any unique path subsuming u-v, or any unique path subsumed in u-v for which i is interstitial, will have equivalent ζi terms. 2If i is in the conditioning set, its outgoing message can be set to be −∞, so that the nodes it blocks from reaching r see an apparent information score of 0. Alternatively, i could simply choose not to transmit r-messages to its neighbors. 6 It should also be noted that if the quantification is instead performed using serial BP – which can be conceptualized as choosing an arbitrary root, collecting messages from the leaves up to the root, and disseminating messages back down again – a factor of 2 savings can be achieved for R2, . . . , R|R| by noting that in moving between instances k and k + 1, only rk is added to the conditioning set. Therefore, by reassigning rk as the root for the BP instance associated with rk+1 (i.e., A ∪Rk as the conditioning set), only the second half of the message passing schedule (disseminating messages from the root to the leaves) is necessary. We subsequently refer to this trick as “caching.” 6 Experiments To benchmark the runtime performance of the algorithm in Section 5, we implemented its serial GaBP variant in Java, with and without the caching trick described above. We compare our algorithm with greedy selectors that use matrix inversion (with cubic complexity) to compute nonlocal mutual information measures. Let Sfeas := {y ∈S \ A : c(y) ≤β − c(A)}. At each iteration of the greedy selector, the blocked inversion-based quantifier computes first J′ R∪Sfeas|A (entailing a block marginalization of nuisances), from which J′ R|A and J′ R|A∪y, ∀y ∈ Sfeas, are computed. Then I(xR; xy | xA), ∀y ∈Sfeas, are computed via a variant of (3). The na¨ıve inversion-based quantifier computes I(xR; xy | xA), ∀y ∈Sfeas, “from scratch” by using separate Schur complements of J submatrices and not storing intermediate results. The inversion-based quantifiers were implemented in Java using the Colt sparse matrix libraries [17]. 0 200 400 600 800 1000 1200 1400 1600 1800 2000 10 1 10 2 10 3 10 4 10 5 10 6 n (Network Size) Mean Runtime [ms] Greedy Selection Total Runtimes for Quantification Algorithms BP−Quant−Cache BP−Quant−NoCache Inv−Quant−Block Inv−Quant−Naive Figure 3: Performance of GaBP-based and inversion-based quantifiers used in greedy selectors. For each n, the mean of the runtimes over 20 random scalar problem instances is displayed. Our BP-Quant algorithm of Section 5 empirically has approximately linear complexity; caching reduces the mean runtime by a factor of approximately 2. Figure 3 shows the comparative mean runtime performance of each of the quantifiers for scalar networks of size n, where the mean is taken over the 20 problem instances proposed for each value of n. Each problem instance consists of a randomly generated, symmetric, positive-definite, treeshaped precision matrix J, along with a randomly labeled S (such that, arbitrarily, |S| = 0.3|V|) and R (such that |R| = 5), as well as randomly selected budget and heterogeneous costs defined over S. Note that all selectors return the same greedy selection; we are concerned with how the decompositions proposed in this paper aid in the computational performance. In the figure, it is clear that the GaBP-based quantification algorithms of Section 5 vastly outperform both inversionbased methods; for relatively small n, the solution times for the inversion-based methods became prohibitively long. Conversely, the behavior of the BP-based quantifiers empirically confirms the asymptotic O(n) complexity of our method for scalar networks. 7 7 Performance Bounds Due to the presence of nuisances in the model, even if the subgraph induced by S is completely disconnected, it is not always the case that the nodes in S are conditionally independent when conditioned on only the relevant latent set R. Lack of conditional independence means one cannot guarantee submodularity of the information measure, as per [6]. Our approach will be to augment R such that submodularity is guaranteed and relate the performance bound to this augmented set. Let ˆR be any subset such that R ⊂ˆR ⊆U and such that nodes in S are conditionally independent conditioned on ˆR. Then, by Corollary 4 of [6], I(x ˆ R; xA) is submodular and nondecreasing on S. Additionally, for the case of unit-cost observations (i.e., c(A) = |A| for all A ⊆S), a greedily selected subset Ag β( ˆR) of cardinality β satisfies the performance bound I( ˆR; Ag β( ˆR)) ≥  1 −1 e  max {A⊆S:|A|≤β} I( ˆR; A) (9) =  1 −1 e  max {A⊆S:|A|≤β}[I(R; A) + I( ˆR \ R; A|R)] (10) ≥  1 −1 e  max {A⊆S:|A|≤β} I(R; A), (11) where (9) is due to [6], (10) to the chain rule of MI, and (11) to the nonnegativity of MI. The following proposition follows immediately from (11). Proposition 7. For any set ˆR such that R ⊂ˆR ⊆U and nodes in S are conditionally independent conditioned on ˆR, provided I( ˆR; Ag β( ˆR)) > 0, an online-computable performance bound for any ¯ A ⊆S in the original focused problem with relevant set R and unit-cost observations is I(R; ¯ A) ≥ " I(R; ¯ A) I( ˆR; Ag β( ˆR)) # 1 −1 e  | {z } ≜δR( ¯ A, ˆ R) max {A⊆S:|A|≤β}I(R; A). (12) Proposition 7 can be used at runtime to determine what percentage δR( ¯ A, ˆR) of the optimal objective is guaranteed, for any focused selector, despite the lack of conditional independence of S conditioned on R. In order to compute the bound, a greedy heuristic running on a separate, surrogate problem with ˆR as the relevant set is required. Finding an ˆR ⊃R providing the tightest bound is an area of future research. 8 Conclusion In this paper, we have considered the sensor selection problem on multivariate Gaussian distributions that, in order to preserve a parsimonious representation, contain nuisances. For pairs of nodes connected in the graph by a unique path, there exist decompositions of nonlocal mutual information into local MI measures that can be computed efficiently from the output of message passing algorithms. For tree-shaped models, we have presented a greedy selector where the computational expense of quantification can be distributed across nodes in the network. Despite deficiency in conditional independence of observations, we have derived an online-computable performance bound based on an augmentation of the relevant set. Future work will consider extensions of the MI decomposition to graphs with nonunique paths and/or non-Gaussian distributions, as well as extend the analysis of augmented relevant sets to derive tighter performance bounds. Acknowledgments The authors thank John W. Fisher III, Myung Jin Choi, and Matthew Johnson for helpful discussions during the preparation of this paper. This work was supported by DARPA Mathematics of Sensing, Exploitation and Execution (MSEE). 8 References [1] C. M. Kreucher, A. O. Hero, and K. D. Kastella. An information-based approach to sensor management in large dynamic networks. Proc. IEEE, Special Issue on Modeling, Identificiation, & Control of Large-Scale Dynamical Systems, 95(5):978–999, May 2007. [2] H.-L. Choi and J. P. How. Continuous trajectory planning of mobile sensors for informative forecasting. Automatica, 46(8):1266–1275, 2010. [3] V. Chandrasekaran, N. Srebro, and P. Harsha. Complexity of inference in graphical models. In Proc. Uncertainty in Artificial Intelligence, 2008. [4] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [5] F. R. Kschischang, B. J. Frey, and H.-A. Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on Information Theory, 47(2):498–519, Feb 2001. [6] A. Krause and C. Guestrin. Near-optimal nonmyopic value of information in graphical models. In Proc. Uncertainty in Artificial Intelligence (UAI), 2005. [7] G. Nemhauser, L. Wolsey, and M. Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 14:489–498, 1978. [8] J. L. Williams, J. W. Fisher III, and A. S. Willsky. Performance guarantees for information theoretic active inference. In M. Meila and X. Shen, editors, Proc. Eleventh Int. Conf. on Artificial Intelligence and Statistics, pages 616–623, 2007. [9] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley, 2nd ed. edition, 2006. [10] Y. Weiss and W. T. Freeman. Correctness of belief propagation in Gaussian graphical models of arbitrary topology. Neural Computation, 13(10):2173–2200, 2001. [11] 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. [12] Y. Liu, V. Chandrasekaran, A. Anandkumar, and A. S. Willsky. Feedback message passing for inference in gaussian graphical models. IEEE Transactions on Signal Processing, 60(8):4135– 4150, Aug 2012. [13] C. Ko, J. Lee, and M. Queyranne. An exact algorithm for maximum entropy sampling. Operations Research, 43:684–691, 1995. [14] A. Krause and C. Guestrin. Optimal value of information in graphical models. Journal of Artificial Intelligence Research, 35:557–591, 2009. [15] P. L. Erd˝os, M. A. Steel, L. A. Sz´ekely, and T. J. Warnow. A few logs suffice to build (almost) all trees: Part ii. Theoretical Computer Science, 221:77–118, 1999. [16] M. J. Choi, V. Y. F. Tan, A. Anandkumar, and A. S. Willsky. Learning latent tree graphical models. Journal of Machine Learning Research, 12:1771–1812, May 2011. [17] CERN - European Organization for Nuclear Research. Colt, 1999. 9
2013
191
4,922
The Total Variation on Hypergraphs - Learning on Hypergraphs Revisited Matthias Hein, Simon Setzer, Leonardo Jost and Syama Sundar Rangapuram Department of Computer Science Saarland University Abstract Hypergraphs allow one to encode higher-order relationships in data and are thus a very flexible modeling tool. Current learning methods are either based on approximations of the hypergraphs via graphs or on tensor methods which are only applicable under special conditions. In this paper, we present a new learning framework on hypergraphs which fully uses the hypergraph structure. The key element is a family of regularization functionals based on the total variation on hypergraphs. 1 Introduction Graph-based learning is by now well established in machine learning and is the standard way to deal with data that encode pairwise relationships. Hypergraphs are a natural extension of graphs which allow to model also higher-order relations in data. It has been recognized in several application areas such as computer vision [1, 2], bioinformatics [3, 4] and information retrieval [5, 6] that such higher-order relations are available and help to improve the learning performance. Current approaches in hypergraph-based learning can be divided into two categories. The first one uses tensor methods for clustering as the higher-order extension of matrix (spectral) methods for graphs [7, 8, 9]. While tensor methods are mathematically quite appealing, they are limited to socalled k-uniform hypergraphs, that is, each hyperedge contains exactly k vertices. Thus, they are not able to model mixed higher-order relationships. The second main approach can deal with arbitrary hypergraphs [10, 11]. The basic idea of this line of work is to approximate the hypergraph via a standard weighted graph. In a second step, one then uses methods developed for graph-based clustering and semi-supervised learning. The two main ways of approximating the hypergraph by a standard graph are the clique and the star expansion which were compared in [12]. One can summarize [12] by stating that no approximation fully encodes the hypergraph structure. Earlier, [13] have proven that an exact representation of the hypergraph via a graph retaining its cut properties is impossible. In this paper, we overcome the limitations of both existing approaches. For both clustering and semisupervised learning the key element, either explicitly or implicitly, is the cut functional. Our aim is to directly work with the cut defined on the hypergraph. We discuss in detail the differences of the hypergraph cut and the cut induced by the clique and star expansion in Section 2.1. Then, in Section 2.2, we introduce the total variation on a hypergraph as the Lovasz extension of the hypergraph cut. Based on this, we propose a family of regularization functionals which interpolate between the total variation and a regularization functional enforcing smoother functions on the hypergraph corresponding to Laplacian-type regularization on graphs. They are the key for the semi-supervised learning method introduced in Section 3. In Section 4, we show in line of recent research [14, 15, 16, 17] that there exists a tight relaxation of the normalized hypergraph cut. In both learning problems, convex optimization problems have to be solved for which we derive scalable methods in Section 5. The main ingredients of these algorithms are proximal mappings for which we provide a novel algorithm and analyze its complexity. In the experimental section 6, we show that fully incorporating hypergraph structure is beneficial. All proofs are moved to the supplementary material. 1 2 The Total Variation on Hypergraphs A large class of graph-based algorithms in semi-supervised learning and clustering is based either explicitly or implicitly on the cut. Thus, we discuss first in Section 2.1 the hypergraph cut and the corresponding approximations.In Section 2.2, we introduce in analogy to graphs, the total variation on hypergraphs as the Lovasz extension of the hypergraph cut. 2.1 Hypergraphs, Graphs and Cuts Hypergraphs allow modeling relations which are not only pairwise as in graphs but involve multiple vertices. In this paper, we consider weighted undirected hypergraphs H = (V, E, w) where V is the vertex set with |V | = n and E the set of hyperedges with |E| = m. Each hyperedge e ∈E corresponds to a subset of vertices, i.e., to an element of 2V . The vector w ∈Rm contains for each hyperedge e its non-negative weight we. In the following, we use the letter H also for the incidence matrix H ∈R|V |×|E| which is for i ∈V and e ∈E, Hi,e = 1 if i ∈e, 0 else. . The degree of a vertex i ∈V is defined as di = P e∈E weHi,e and the cardinality of an edge e can be written as |e| = P j∈V Hj,e. We would like to emphasize that we do not impose the restriction that the hypergraph is k-uniform, i.e., that each hyperedge contains exactly k vertices. The considered class of hypergraphs contains the set of undirected, weighted graphs which is equivalent to the set of 2-uniform hypergraphs. The motivation for the total variation on hypergraphs comes from the correspondence between the cut on a graph and the total variation functional. Thus, we recall the definition of the cut on weighted graphs G = (V, W) with weight matrix W. Let C = V \C denote the complement of C in V . Then, for a partition (C, C), the cut is defined as cutG(C, C) = X i,j : i∈C,j∈C wij. This standard definition of the cut carries over naturally to a hypergraph H cutH(C, C) = X e∈E: e∩C̸=∅, e∩C̸=∅ we. (1) Thus, the cut functional on a hypergraph is just the sum of the weights of the hyperedges which have vertices both in C and C. It is not biased towards a particular way the hyperedge is cut, that is, how many vertices of the hyperedge are in C resp. C. This emphasizes that the vertices in a hyperedge belong together and we penalize every cut of a hyperedge with the same value. In order to handle hypergraphs with existing methods developed for graphs, the focus in previous works [11, 12] has been on transforming the hypergraph into a graph. In [11], they suggest using the clique expansion (CE), i.e., every hyperedge e ∈H is replaced with a fully connected subgraph where every edge in this subgraph has weight we |e| . This leads to the cut functional cutCE, cutCE(C, C) := X e∈E: e∩C̸=∅, e∩C̸=∅ we |e| |e ∩C| |e ∩C|. (2) Note that in contrast to the hypergraph cut (1), the value of cutCE depends on the way each hyperedge is cut since the term |e∩C| |e∩C| makes the weights dependent on the partition. In particular, the smallest weight is attained if only a single vertex is split off, whereas the largest weight is attained if the partition of the hyperedge is most balanced. In comparison to the hypergraph cut, this leads to a bias towards cuts that favor splitting off single vertices from a hyperedge which in our point of view is an undesired property for most applications. We illustrate this with an example in Figure 1, where the minimum hypergraph cut (cutH) leads to a balanced partition, whereas the minimum clique expansion cut (cutCE) not only cuts an additional hyperedge but is also unbalanced. This is due to its bias towards splitting off single nodes of a hyperedge. Another argument against the clique expansion is computational complexity. For large hyperedges the clique expansion leads to (almost) fully connected graphs which makes computations slow and is prohibitive for large hypergraphs. We omit the discussion of the star graph approximation of hypergraphs discussed in [12] as it is shown there that the star graph expansion is very similar to the clique expansion. Instead, we want to recall the result of Ihler et al. [13] which states that in general there exists no graph with the same vertex set V which has for every partition (C, C) the same cut value as the hypergraph cut. 2 Figure 1: Minimum hypergraph cut cutH vs. minimum cut of the clique expansion cutCE: For edge weights w1 = w4 = 10, w2 = w5 = 0.1 and w3 = 0.6 the minimum hypergraph cut is (C1, C1) which is perfectly balanced. Although cutting one hyperedge more and being unbalanced, (C2, C2) is the optimal cut for the clique expansion approximation. Finally, note that for weighted 3-uniform hypergraphs it is always possible to find a corresponding graph such that any cut of the graph is equal to the corresponding cut of the hypergraph. Proposition 2.1. Suppose H = (V, E, w) is a weighted 3-uniform hypergraph. Then, W ∈ R|V |×|V | defined as W = 1 2Hdiag(w)HT defines the weight matrix of a graph G = (V, W) where each cut of G has the same value as the corresponding hypergraph cut of H. 2.2 The Total Variation on Hypergraphs In this section, we define the total variation on hypergraphs. The key technical element is the Lovasz extension which extends a set function, seen as a mapping on 2V , to a function on R|V |. Definition 2.1. Let ˆS : 2V →R be a set function with ˆS(∅) = 0. Let f ∈R|V |, let V be ordered such that f1 ≤f2 ≤. . . ≤fn and define Ci = {j ∈V | j > i}. Then, the Lovasz extension S : R|V | →R of ˆS is given by S(f) = n X i=1 fi  ˆS(Ci−1) −ˆS(Ci)  = n−1 X i=1 ˆS(Ci)(fi+1 −fi) + f1 ˆS(V ). Note that for the characteristic function of a set C ⊂V , we have S(1C) = ˆS(C). It is well-known that the Lovasz extension S is a convex function if and only if ˆS is submodular [18]. For graphs G = (V, W), the total variation on graphs is defined as the Lovasz extension of the graph cut [18] given as TVG : R|V | →R, TVG(f) = 1 2 Pn i,j=1 wij|fi −fj|. Proposition 2.2. The total variation TVH : R|V | →R on a hypergraph H = (V, E, w) defined as the Lovasz extension of the hypergraph cut, ˆS(C) = cutH(C, C), is a convex function given by TVH(f) = X e∈E we  max i∈e fi −min j∈e fj  = X e∈E we max i,j∈e |fi −fj|. Note that the total variation of a hypergraph cut reduces to the total variation on graphs if H is 2-uniform (standard graph). There is an interesting relation of the total variation on hypergraphs to sparsity inducing group norms. Namely, defining for each edge e ∈E the difference operator De : R|V | →R|V |×|V | by (Def)ij = fi −fj if i, j ∈e and 0 otherwise, TVH can be written as, TVH(f) = P e∈E we ∥Def∥∞, which can be seen as inducing group sparse structure on the gradient level. The groups are the hyperedges and thus are typically overlapping. This could lead potentially to extensions of the elastic net on graphs to hypergraphs. It is known that using the total variation on graphs as a regularization functional in semi-supervised learning (SSL) leads to very spiky solutions for small numbers of labeled points. Thus, one would like to have regularization functionals enforcing more smoothness of the solutions. For graphs this is achieved by using the family of regularization functionals ΩG,p : R|V | →R, ΩG,p(f) = 1 2 n X i,j=1 wij|fi −fj|p. 3 For p = 2 we get the regularization functional of the graph Laplacian which is the basis of a large class of methods on graphs. In analogy to graphs, we define a corresponding family on hypergraphs. Definition 2.2. The regularization functionals ΩH,p : R|V | →R for a hypergraph H = (V, E, w) are defined for p ≥1 as ΩH,p(f) = X e∈E we  max i∈e fi −min j∈e fj p . Lemma 2.1. The functionals ΩH,p : R|V | →R are convex. Note that ΩH,1(f) = TVH(f). If H is a graph and p ≥1, ΩH,p reduces to the Laplacian regularization ΩG,p. Note that for characteristic functions of sets, f = 1C, it holds ΩH,p(1C) = cutH(C, C). Thus, the difference between the hypergraph cut and its approximations such as clique and star expansion carries over to ΩH,p and ΩGCE,p, respectively. 3 Semi-supervised Learning With the regularization functionals derived in the last section, we can immediately write down a formulation for two-class semi-supervised learning on hypergraphs similar to the well-known approaches of [19, 20]. Given the label set L we construct the vector Y ∈Rn with Yi = 0 if i /∈L and Yi equal to the label in {−1, 1} if i ∈L. We propose solving f ∗= arg min f∈R|V | 1 2 ∥f −Y ∥2 2 + λ ΩH,p(f), (3) where λ > 0 is the regularization parameter. In Section 5, we discuss how this convex optimization problem can be solved efficiently for the case p = 1 and p = 2. Note, that other loss functions than the squared loss could be used. However, the regularizer aims at contracting the function and we use the label set {−1, 1} so that f ∗∈[−1, 1]|V |. Hence, on the interval [−1, 1] the squared loss behaves very similar to other margin-based loss functions. In general, we recommend using p = 2 as it corresponds to Laplacian-type regularization for graphs which is known to work well. For graphs p = 1 is known to produce spiky solutions for small numbers of labeled points. This is due to the effect that cutting “out” the labeled points leads to a much smaller cut than, e.g., producing a balanced partition. However, in the case where one has only a small number of hyperedges this effect is much smaller and we will see in the experiments that p = 1 also leads to reasonable solutions. 4 Balanced Hypergraph Cuts In Section 2.1, we discussed the difference between the hypergraph cut (1) and the graph cut of the clique expansion (2) of the hypergraph and gave a simple example in Figure 1 where these cuts yield quite different results. Clearly, this difference carries over to the famous normalized cut criterion introduced in [21, 22] for clustering of graphs with applications in image segmentation. For a hypergraph the ratio resp. normalized cut can be formulated as RCut(C, C) = cutH(C, C) |C||C| , NCut(C, C) = cutH(C, C) vol(C) vol(C), which incorporate different balancing criteria. Note, that in contrast to the normalized cut for graphs the normalized hypergraph cut allows no relaxation into a linear eigenproblem (spectral relaxation). Thus, we follow a recent line of research [14, 15, 16, 17] where it has been shown that the standard spectral relaxation of the normalized cut used in spectral clustering [22] is loose and that a tight, in fact exact, relaxation can be formulated in terms of a nonlinear eigenproblem. Although nonlinear eigenproblems are non-convex, one can compute nonlinear eigenvectors quite efficiently at the price of loosing global optimality. However, it has been shown that the potentially non-optimal solutions of the exact relaxation, outperform in practice the globally optimal solution of the loose relaxation, often by large margin. In this section, we extend their approach to hypergraphs and consider general balanced hypergraph cuts Bcut(C, C) of the form, Bcut(C, C) = cutH(C,C) ˆS(C) , where ˆS : 2V →R+ is a non-negative, symmetric set function (that is ˆS(C) = ˆS(C)). For the normalized cut one has 4 ˆS(C) = vol(C) vol(C) whereas for the Cheeger cut one has ˆS(C) = min{vol C, vol C}. Other examples of balancing functions can be found in [16]. Our following result shows that the balanced hypergraph cut also has an exact relaxation into a continuous nonlinear eigenproblem [14]. Theorem 4.1. Let H = (V, E, w) be a finite, weighted hypergraph and S : R|V | →R be the Lovasz extension of the symmetric, non-negative set function ˆS : 2V →R. Then, it holds that min f∈R|V | P e∈E we max i∈e fi −min j∈e fj  S(f) = min C⊂V cutH(C, C) ˆS(C) . Further, let f ∈R|V | and define Ct := {i ∈V | fi > t}. Then, min t∈R cutH(Ct, Ct) ˆS(Ct) ≤ P e∈E we max i∈e fi −min j∈e fj  S(f) . The last part of the theorem shows that “optimal thresholding” (turning f ∈RV into a partition) among all level sets of any f ∈R|V | can only lead to a better or equal balanced hypergraph cut. The question remains how to minimize the ratio Q(f) = TVH(f) S(f) . As discussed in [16], every Lovasz extension S can be written as a difference of convex positively 1-homogeneous functions1 S = S1 −S2. Moreover, as shown in Prop. 2.2 the total variation TVH is convex. Thus, we have to minimize a non-negative ratio of a convex and a difference of convex (d.c.) function. We employ the RatioDCA algorithm [16] shown in Algorithm 1. The main part is the convex inner problem. In Algorithm 1 RatioDCA – Minimization of a non-negative ratio of 1-homogeneous d.c. functions 1: Objective: Q(f) = R1(f)−R2(f) S1(f)−S2(f) . Initialization: f 0 = random with f 0 = 1, λ0 = Q(f 0) 2: repeat 3: s1(f k) ∈∂S1(f k), r2(f k) ∈∂R2(f k) 4: f k+1 = arg min ∥u∥2≤1  R1(u) − u, r2(f k) + λk S2(u) − u, s1(f k)  5: λk+1 = (R1(f k+1) −R2(f k+1))/(S1(f k+1) −S2(f k+1)) 6: until |λk+1−λk| λk < ϵ 7: Output: eigenvalue λk+1 and eigenvector f k+1. our case R1 = TVH, R2 = 0, and thus the inner problem reads min∥u∥2≤1{TVH(u) + λk S2(u) − u, s1(f k)  }. (4) For simplicity we restrict ourselves to submodular balancing functions, in which case S is convex and thus S2 = 0. For the general case, see [16]. Note that the balancing functions of ratio/normalized cut and Cheeger cut are submodular. It turns out that the inner problem is very similar to the semisupervised learning formulation (3). The efficient solution of both problems is discussed next. 5 Algorithms for the Total Variation on Hypergraphs The problem (3) we want to solve for semi-supervised learning and the inner problem (4) of RatioDCA have a common structure. They are the sum of two convex functions: one of them is the novel regularizer ΩH,p and the other is a data term denoted by G here, cf., Table 1. We propose solving these problems using a primal-dual algorithm, denoted by PDHG, which was proposed in [23, 24]. Its main idea is to iteratively solve for each convex term in the objective function a proximal problem. The proximal map proxg w.r.t. a mapping g : Rn →R is defined by proxg(˜x) = arg min x∈Rn {1 2∥x −˜x∥2 2 + g(x)}. 1A function f : Rd →R is positively 1-homogeneous if ∀α > 0, f(αx) = αf(x). 5 The key idea is that often proximal problems can be solved efficiently leading to fast convergence of the overall algorithm. We see in Table 1 that for both G the proximal problems have an explicit solution. However, note that smooth convex terms can also be directly exploited [25]. For ΩH,p, we distinguish two cases, p = 1 and p = 2. Detailed descriptions of the algorithms can be found in the supplementary material. G(f) = 1 2∥f −Y ∥2 2 G(f) = −⟨s1(f k), f⟩+ ι∥·∥2≤1(f) proxτG(f)(˜x) = 1 1+τ (˜x + τY ) proxτG(f)(˜x) = ˜x+τs1(f k) max{1,∥˜x+τs1(f k)∥2} Table 1: Data term and proximal map for SSL (3) (left) and the inner problem of RatioDCA (4) (right).The indicator function is defined as ι∥·∥2≤1(x) = 0, if ∥x∥2 ≤1 and +∞otherwise. PDHG algorithm for ΩH,1. Let me be the number of vertices in hyperedge e ∈E. We write λΩH,1(f) = F(Kf) := X e∈E (F(e,1)(Kef) + F(e,2)(Kef)), (5) where the rows of the matrices Ke ∈Rme,n are the i-th standard unit vectors for i ∈e and the functionals F(e,j) : Rme →R are defined as F(e,1)(α(e,1)) = λwe max(α(e,1)), F(e,2)(α(e,2)) = −λwe min(α(e,2)). In contrast to the function G, we need in the PDHG algorithm the proximal maps for the conjugate functions of F(e,j). They are given by F ∗ (e,1) = ιSλwe , F ∗ (e,2) = ι−Sλwe , where Sλwe = {x ∈Rme : Pme i=1 xi = λwe, xi ≥0} is the scaled simplex in Rme. The solutions of the proximal problem for F ∗ (e,1) and F ∗ (e,1) are the orthogonal projections onto the simplexes written here as PSe λwe and P−Se λwe , respectively. These projections can be done in linear time [26]. With the proximal maps we have presented so far, the PDHG algorithm has the following form. Algorithm 2 PDHG for ΩH,1 1: Initialization: f (0) = ¯f (0) = 0, θ ∈[0, 1], σ, τ > 0 with στ < 1/(2 maxi=1,...,n{ci}) 2: repeat 3: α(e,1)(k+1) = PSe λwe (α(e,1)(k) + σKe ¯f (k)), e ∈E 4: α(e,2)(k+1) = P−Se λwe (α(e,2)(k) + σKe ¯f (k)), e ∈E 5: f (k+1) = proxτG(f (k) −τ P e∈E KT e(α(e,1)(k+1) + α(e,2)(k+1))) 6: ¯f (k+1) = f (k+1) + θ(f (k+1) −f (k)) 7: until relative duality gap < ϵ 8: Output: f (k+1). The value ci = P e∈E Hi,e is the number of hyperedges the vertex i lies in. It is important to point out here that the algorithm decouples the problem in the sense that in every iteration we solve subproblems which treat the functionals G, F(e,1), F(e,2) separately and thus can be solved efficiently. PDHG algorithm for ΩH,2. We define the matrices Ke as above. Moreover, we introduce for every hyperedge e ∈E the functional Fe(αe) = λwe(max(αe) −min(αe))2. (6) Hence, we can write ΩH,2(f) = P e∈E Fe(Kef). As we show in the supplementary material, the conjugate functions F ∗ e are not indicator functions and we thus solve the corresponding proximal problems via proximal problems for Fe. More specifically, we exploit the fact that proxσF ∗ e (˜αe) = ˜αe −prox 1 σ Fe(˜αe), (7) and use the following novel result concerning the proximal problem on the right-hand side of (7). 6 Prop. \ Dataset Zoo Mushrooms Covertype (4,5) Covertype (6,7) 20Newsgroups Number of classes 7 2 2 2 4 |V | 101 8124 12240 37877 16242 |E| 42 112 104 123 100 P e∈E |e| 1717 170604 146880 454522 65451 |E| of Clique Exp. 10201 65999376 143008092 1348219153 53284642 Table 2: Datasets used for SSL and clustering. Note that the clique expansion leads for all datasets to a graph which is close to being fully connected as all datasets contain large hyperedges. For covertype (6,7) the weight matrix needs over 10GB of memory, the original hypergraph only 4MB. Proposition 5.1. For any σ > 0 and any ˜αe ∈Rme the proximal map prox 1 σ Fe(˜αe) = arg min αe∈Rme {1 2∥αe −˜αe∥2 2 + 1 σ λwe(max(αe) −min(αe))2} can be computed with O(me log me) arithmetic operations. A corresponding algorithm which is new to the best of our knowledge is provided in the supplementary material. We note here that the complexity is due to the fact that we sort the input vector ˜αe. The PDHG algorithm for p = 2 is provided in the supplementary material. It has the same structure as Algorithm 2 with the only difference that we now solve (7) for every hyperedge. 6 Experiments The method of Zhou et al [11] seems to be the standard algorithm for clustering and SSL on hypergraphs. We compare to them on a selection of UCI datasets summarized in Table 2. Zoo, Mushrooms and 20Newsgroups2 have been used also in [11] and contain only categorical features. As in [11], a hyperedge of weight one is created by all data points which have the same value of a categorical feature. For covertype we quantize the numerical features into 10 bins of equal size. Two datasets are created each with two classes (4,5 and 6,7) of the original dataset. Semi-supervised Learning (SSL). In [11], they suggest using a regularizer induced by the normalized Laplacian LCE arising from the clique expansion LCE = I −D −1 2 CEHW ′HT D −1 2 CE, where DCE is a diagonal matrix with entries dEC(i) = P e∈E Hi,e we |e| and W ′ ∈R|E|×|E| is a diagonal matrix with entries w′(e) = we/|e|. The SSL problem can then be formulated as λ > 0, arg minf∈R|V |{∥f −Y ∥2 2 + λ ⟨f, LCEf⟩}. The advantage of this formulation is that the solution can be found via a linear system. However, as Table 2 indicates the obvious downside is that LCE is a potentially very dense matrix and thus one needs in the worst case |V |2 memory and O(|V |3) computations. This is in contrast to our method which needs 2 P e∈E |e| + |V | memory. For the largest example (covertype 6,7), where the clique expansion fails due to memory problems, our method takes 30-100s (depending on λ). We stop our method for all experiments when we achieve a relative duality gap of 10−6. In the experiments we do 10 trials for different numbers of labeled points. The reg. parameter λ is chosen for both methods from the set 10−k, where k = {0, 1, 2, 3, 4, 5, 6} via 5-fold cross validation. The resulting errors and standard deviations can be found in the following table(first row lists the no. of labeled points). Our SSL methods based on ΩH,p, p = 1, 2 outperform consistently the clique expansion technique of Zhou et al [11] on all datasets except 20newsgroups3. However, 20newsgroups is a very difficult dataset as only 10,267 out of the 16,242 data points are different which leads to a minimum possible error of 9.6%. A method based on pairwise interaction such as the clique expansion can better deal 2This is a modified version by Sam Roweis of the original 20 newsgroups dataset available at http: //www.cs.nyu.edu/˜roweis/data/20news_w100.mat. 3Communications with the authors of [11] could not clarify the difference to their results on 20newsgroups 7 with such label noise as the large hyperedges for this dataset accumulate the label noise. On all other datasets we observe that incorporating hypergraph structure leads to much better results. As expected our squared TV functional (p = 2) outperforms slightly the total variation (p = 1) even though the difference is small. Thus, as ΩH,2 reduces to the standard regularization based on the graph Laplacian, which is known to work well, we recommend ΩH,2 for SSL on hypergraphs. Zoo 20 25 30 35 40 45 50 Zhou et al. 35.1±17.2 30.3 ± 7.9 40.7±14.2 29.7 ± 8.8 32.9±16.8 27.6±10.8 25.3±14.4 ΩH,1 2.9 ± 3.0 1.4 ± 2.2 2.2 ± 2.1 0.7 ± 1.0 0.7 ± 1.5 0.9 ± 1.4 1.9 ± 3.0 ΩH,2 2.3 ± 1.9 1.5 ± 2.4 2.9 ± 2.3 0.9 ± 1.4 0.8 ± 1.7 1.2 ± 1.8 1.6 ± 2.9 Mushr. 20 40 60 80 100 120 160 200 Zhou et al. 15.5 ± 12.8 10.9±4.4 9.5 ± 2.7 10.3±2.0 9.0 ± 4.5 8.8 ± 1.4 8.8 ± 2.3 9.3 ± 1.0 ΩH,1 19.5±10.5 10.8±3.7 7.4 ± 3.8 5.6 ± 1.9 5.7 ± 2.2 5.4 ± 2.4 4.9 ± 3.8 5.6 ± 3.8 ΩH,2 18.4 ± 7.4 9.8 ± 4.5 9.9 ± 5.5 6.4 ± 2.7 6.3 ± 2.5 4.5 ± 1.8 4.4 ± 2.1 3.0 ± 0.6 covert45 20 40 60 80 100 120 160 200 Zhou et al. 18.9 ± 4.6 18.3±5.2 17.2±6.7 16.6±6.4 17.6±5.2 18.4±5.1 19.2±4.0 20.4±2.9 ΩH,1 21.4 ± 0.9 17.6±2.6 12.6±4.3 7.6 ± 3.5 6.2 ± 3.8 4.5 ± 3.6 2.6 ± 1.6 1.5 ± 1.3 ΩH,2 20.7 ± 2.0 16.1 ± 4.1 10.9 ± 4.9 5.9 ± 3.7 4.6 ± 3.4 3.3 ± 3.1 2.2 ± 1.8 1.0 ± 1.1 covert67 20 40 60 80 100 120 160 200 ΩH,1 40.6 ± 8.9 6.4±10.4 3.6 ± 3.2 3.3 ± 2.5 1.8 ± 0.8 1.3 ± 0.9 0.9 ± 0.4 1.2 ± 0.9 ΩH,2 25.2 ± 18.3 4.3 ± 9.6 2.1 ± 2.0 2.2 ± 1.4 1.4 ± 1.1 1.0 ± 0.8 0.7 ± 0.4 1.1 ± 0.8 20news 20 40 60 80 100 120 160 200 Zhou et al. 45.5 ± 7.5 34.4 ± 3.1 31.5 ± 1.4 29.8 ± 4.0 27.0 ± 1.3 27.3 ± 1.5 25.7 ± 1.4 25.0 ± 1.3 ΩH,1 65.7 ± 6.1 61.4±6.1 53.2±5.7 46.2±3.7 42.4±3.3 40.9±3.2 36.1±1.5 34.7±3.6 ΩH,2 55.0 ± 4.8 48.0±6.0 45.0±5.9 40.3±3.0 38.3±2.7 38.1±2.6 35.0±2.8 34.1±2.0 Test error and standard deviation of the SSL methods over 10 runs for varying number of labeled points. Clustering. We use the normalized hypergraph cut as clustering objective. For more than two clusters we recursively partition the hypergraph until the desired number of clusters is reached. For comparison we use the normalized spectral clustering approach based on the Laplacian LCE [11](clique expansion). The first part (first 6 columns) of the following table shows the clustering errors (majority vote on each cluster) of both methods as well as the normalized cuts achieved by these methods on the hypergraph and on the graph resulting from the clique expansion. Moreover, we show results (last 4 columns) which are obtained based on a kNN graph (unit weights) which is built based on the Hamming distance (note that we have categorical features) in order to check if the hypergraph modeling of the problem is actually useful compared to a standard similarity based graph construction. The number k is chosen as the smallest number for which the graph becomes connected and we compare results of normalized 1-spectral clustering [14] and the standard spectral clustering [22]. Note that the employed hypergraph construction has no free parameter. Clustering Error % Hypergraph Ncut Graph(CE) Ncut Clustering Error % kNN-Graph Ncut Dataset Ours [11] Ours [11] Ours [11] [14] [22] [14] [22] Mushrooms 10.98 32.25 0.0011 0.0013 0.6991 0.7053 48.2 48.2 1e-4 1e-4 Zoo 16.83 15.84 0.6739 0.6784 5.1315 5.1703 5.94 5.94 1.636 1.636 20-newsgroup 47.77 33.20 0.0176 0.0303 2.3846 1.8492 66.38 66.38 0.1031 0.1034 covertype (4,5) 22.44 22.44 0.0018 0.0022 0.7400 0.6691 22.44 22.44 0.0152 0.02182 covertype (6,7) 8.16 8.18e-4 0.6882 45.85 45.85 0.0041 0.0041 First, we observe that our approach optimizing the normalized hypergraph cut yields better or similar results in terms of clustering errors compared to the clique expansion (except for 20-newsgroup for the same reason given in the previous paragraph). The improvement is significant in case of Mushrooms while for Zoo our clustering error is slightly higher. However, we always achieve smaller normalized hypergraph cuts. Moreover, our method sometimes has even smaller cuts on the graphs resulting from the clique expansion, although it does not directly optimize this objective in contrast to [11]. Again, we could not run the method of [11] on covertype (6,7) since the weight matrix is very dense. Second, the comparison to a standard graph-based approach where the similarity structure is obtained using the Hamming distance on the categorical features shows that using hypergraph structure is indeed useful. Nevertheless, we think that there is room for improvement regarding the construction of the hypergraph which is a topic for future research. Acknowledgments M.H. would like to acknowledge support by the ERC Starting Grant NOLEPRO and L.J. acknowledges support by the DFG SPP-1324. 8 References [1] Y. Huang, Q. Liu, and D. Metaxas. Video object segmentation by hypergraph cut. In CVPR, pages 1738 – 1745, 2009. [2] P. Ochs and T. Brox. Higher order motion models and spectral clustering. In CVPR, pages 614–621, 2012. [3] S. Klamt, U.-U. Haus, and F. Theis. Hypergraphs and cellular networks. PLoS Computational Biology, 5:e1000385, 2009. [4] Z. Tian, T. Hwang, and R. Kuang. A hypergraph-based learning algorithm for classifying gene expression and arraycgh data with prior knowledge. Bioinformatics, 25:2831–2838, 2009. [5] D. Gibson, J. Kleinberg, and P. Raghavan. Clustering categorical data: an approach based on dynamical systems. VLDB Journal, 8:222–236, 2000. [6] J. Bu, S. Tan, C. Chen, C. Wang, H. Wu, L. Zhang, and X. He. Music recommendation by unified hypergraph: Combining social media information and music content. In Proc. of the Int. Conf. on Multimedia (MM), pages 391–400, 2010. [7] A. Shashua, R. Zass, and T. Hazan. Multi-way clustering using super-symmetric non-negative tensor factorization. In ECCV, pages 595–608, 2006. [8] S. Rota Bulo and M. Pellilo. A game-theoretic approach to hypergraph clustering. In NIPS, pages 1571– 1579, 2009. [9] M. Leordeanu and C. Sminchisescu. Efficient hypergraph clustering. In AISTATS, pages 676–684, 2012. [10] S. Agarwal, J. Lim, L. Zelnik-Manor, P. Petrona, D. J. Kriegman, and S. Belongie. Beyond pairwise clustering. In CVPR, pages 838–845, 2005. [11] D. Zhou, J. Huang, and B. Sch¨olkopf. Learning with hypergraphs: Clustering, classification, and embedding. In NIPS, pages 1601–1608, 2006. [12] S. Agarwal, K. Branson, and S. Belongie. Higher order learning with graphs. In ICML, pages 17–24, 2006. [13] E. Ihler, D. Wagner, and F. Wagner. Modeling hypergraphs by graphs with the same mincut properties. Information Processing Letters, 45:171–175, 1993. [14] M. Hein and T. B¨uhler. An inverse power method for nonlinear eigenproblems with applications in 1spectral clustering and sparse PCA. In NIPS, pages 847–855, 2010. [15] A. Szlam and X. Bresson. Total variation and Cheeger cuts. In ICML, pages 1039–1046, 2010. [16] M. Hein and S. Setzer. Beyond spectral clustering - tight relaxations of balanced graph cuts. In NIPS, pages 2366–2374, 2011. [17] T. B¨uhler, S. Rangapuram, S. Setzer, and M. Hein. Constrained fractional set programs and their application in local clustering and community detection. In ICML, pages 624–632, 2013. [18] F. Bach. Learning with submodular functions: A convex optimization perspective. CoRR, abs/1111.6453, 2011. [19] M. Belkin and P. Niyogi. Semi-supervised learning on manifolds. Machine Learning, 56:209–239, 2004. [20] D. Zhou, O. Bousquet, T. N. Lal, J. Weston, and B. Sch¨olkopf. Learning with local and global consistency. In NIPS, volume 16, pages 321–328, 2004. [21] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Trans. Patt. Anal. Mach. Intell., 22(8):888–905, 2000. [22] U. von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17:395–416, 2007. [23] E. Esser, X. Zhang, and T. F. Chan. A general framework for a class of first order primal-dual algorithms for convex optimization in imaging science. SIAM Journal on Imaging Sciences, 3(4):1015–1046, 2010. [24] A. Chambolle and T. Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. J. of Math. Imaging and Vision, 40:120–145, 2011. [25] L. Condat. A primaldual splitting method for convex optimization involving lipschitzian, proximable and linear composite terms. J. Optimization Theory and Applications, 158(2):460–479, 2013. [26] K. Kiwiel. On Linear-Time algorithms for the continuous quadratic knapsack problem. J. Opt. Theory Appl., 134(3):549–554, 2007. 9
2013
192
4,923
Lasso Screening Rules via Dual Polytope Projection Jie Wang, Jiayu Zhou, Peter Wonka, Jieping Ye Computer Science and Engineering Arizona State University, Tempe, AZ 85287 {jie.wang.ustc, jiayu.zhou, peter.wonka, jieping.ye}@asu.edu Abstract Lasso is a widely used regression technique to find sparse representations. When the dimension of the feature space and the number of samples are extremely large, solving the Lasso problem remains challenging. To improve the efficiency of solving large-scale Lasso problems, El Ghaoui and his colleagues have proposed the SAFE rules which are able to quickly identify the inactive predictors, i.e., predictors that have 0 components in the solution vector. Then, the inactive predictors or features can be removed from the optimization problem to reduce its scale. By transforming the standard Lasso to its dual form, it can be shown that the inactive predictors include the set of inactive constraints on the optimal dual solution. In this paper, we propose an efficient and effective screening rule via Dual Polytope Projections (DPP), which is mainly based on the uniqueness and nonexpansiveness of the optimal dual solution due to the fact that the feasible set in the dual space is a convex and closed polytope. Moreover, we show that our screening rule can be extended to identify inactive groups in group Lasso. To the best of our knowledge, there is currently no “exact” screening rule for group Lasso. We have evaluated our screening rule using many real data sets. Results show that our rule is more effective in identifying inactive predictors than existing state-of-the-art screening rules for Lasso. 1 Introduction Data with various structures and scales comes from almost every aspect of daily life. To effectively extract patterns in the data and build interpretable models with high prediction accuracy is always desirable. One popular technique to identify important explanatory features is by sparse regularization. For instance, consider the widely used ℓ1-regularized least squares regression problem known as Lasso [20]. The most appealing property of Lasso is the sparsity of the solutions, which is equivalent to feature selection. Suppose we have N observations and p predictors. Let y denote the N dimensional response vector and X = [x1, x2, . . . , xp] be the N ×p feature matrix. Let λ ≥0 be the regularization parameter, the Lasso problem is formulated as the following optimization problem: inf β∈ℜp 1 2∥y −Xβ∥2 2 + λ∥β∥1. (1) Lasso has achieved great success in a wide range of applications [5, 4, 28, 3, 23] and in recent years many algorithms have been developed to efficiently solve the Lasso problem [7, 12, 18, 6, 10, 1, 11]. However, when the dimension of feature space and the number of samples are very large, solving the Lasso problem remains challenging because we may not even be able to load the data matrix into main memory. The idea of a screening test proposed by El Ghaoui et al. [8] is to first identify inactive predictors that have 0 components in the solution and then remove them from the optimization. Therefore, we can work on a reduced feature matrix to solve Lasso efficiently. In [8], the “SAFE” rule discards xi when |xT i y| < λ −∥xi∥2∥y∥2 λmax−λ λmax (2) where λmax = maxi |xT i y| is the largest parameter such that the solution is nontrivial. Tibshirani et al. [21] proposed a set of strong rules which were more effective in identifying inactive predictors. 1 The basic version discards xi if |xT i y| < 2λ −λmax. However, it should be noted that the proposed strong rules might mistakenly discard active predictors, i.e., predictors which have nonzero coefficients in the solution vector. Xiang et al. [26, 25] developed a set of screening tests based on the estimation of the optimal dual solution and they have shown that the SAFE rules are in fact a special case of the general sphere test. In this paper, we develop new efficient and effective screening rules for the Lasso problem; our screening rules are exact in the sense that no active predictors will be discarded. By transforming problem (1) to its dual form, our motivation is mainly based on three geometric observations in the dual space. First, the active predictors belong to a subset of the active constraints on the optimal dual solution, which is a direct consequence of the KKT conditions. Second, the optimal dual solution is in fact the projection of the scaled response vector onto the feasible set of the dual variables. Third, because the feasible set of the dual variables is closed and convex, the projection is nonexpansive with respect to λ [2], which results in an effective estimation of its variation. Moreover, based on the basic DPP rules, we propose the “Enhanced DPP” rules which are able to detect more inactive features than DPP. We evaluate our screening rules on real data sets from many different applications. The experimental results demonstrate that our rules are more effective in discarding inactive features than existing state-of-the-art screening rules. 2 Screening Rules for Lasso via Dual Polytope Projections In this section, we present the basics of the dual formulation of problem (1) including its geometric properties (Section 2.1). Based on the geometric properties of the dual optimal, we develop the fundamental principle in Section 2.2 (Theorem 2), which can be used to construct screening rules for Lasso. In section 2.3, we discuss the relation between dual optimal and LARS [7]. As a straightforward extension of DPP rules, we develop the sequential version of DPP (SDPP) in Section 2.4. Moreover, we present enhanced DPP rules in Section 2.5. 2.1 Basics Different from [26, 25], we do not assume y and all xi have unit length. We first transform problem (1) to its dual form (to make the paper self-contained, we provide the detailed derivation of the dual form in the supplemental materials): sup θ n 1 2∥y∥2 2 −λ2 2 ∥θ −y λ∥2 2 : |xT i θ| ≤1, i = 1, 2, . . . , p o (3) where θ is the dual variable. Since the feasible set, denoted by F, is the intersection of 2p halfspaces, it is a closed and convex polytope. From the objective function of the dual problem (3), it is easy to see that the optimal dual solution θ∗is a feasible θ which is closest to y λ. In other words, θ∗ is the projection of y λ onto the polytope F. Mathematically, for an arbitrary vector w and a convex set C, if we define the projection function as PC(w) = argmin u∈C ∥u −w∥2, (4) then θ∗= PF (y/λ) = argmin θ∈F θ −y λ 2. (5) We know that the optimal primal and dual solutions satisfy: y = Xβ∗+ λθ∗ (6) and the KKT conditions for the Lasso problem (1) are (θ∗)T xi ∈ sign([β∗]i) if [β∗]i ̸= 0 [−1, 1] if [β∗]i = 0 (7) where [·]k denotes the kth component. By the KKT conditions in Eq. (7), if the inner product (θ∗)T xi belongs to the open interval (−1, 1), then the corresponding component [β∗]i in the solution vector β∗(λ) has to be 0. As a result, xi is an inactive predictor and can be removed from the optimization. On the other hand, let ∂H(xi) = {z: zT xi = 1} and H(xi)−= {z: zT xi ≤1} be the hyperplane and half space determined by xi respectively. Consider the dual problem (3); constraints induced by each xi are equivalent to requiring each feasible θ to lie inside the intersection of H(xi)−and H(−xi)−. If |(θ∗)T xi| = 1, i.e., either θ∗∈∂H(xi)−or θ∗∈∂H(−xi)−, we say the constraints induced by xi are active on θ∗. 2 We define the “active” set on θ∗as Iθ∗= {i: |(θ∗)T xi| = 1, i ∈I} where I = {1, 2, . . . , p}. Otherwise, if θ∗lies between ∂H(xi) and ∂H(−xi), i.e., |(θ∗)T xi| < 1, we can safely remove xi from the problem because [β∗]i = 0 according to the KKT conditions in Eq. (7). Similarly, the “inactive” set on θ∗is defined as Iθ∗= I \ Iθ∗. Therefore, from a geometric perspective, if we know θ∗, i.e., the projection of y λ onto F, the predictors in the inactive set on θ∗can be discarded from the optimization. It is worthwhile to mention that inactive predictors, i.e., predictors that have 0 components in the solution, are not the same as predictors in the inactive set. In fact, by the KKT conditions, predictors in the inactive set must be inactive predictors since they are guaranteed to have 0 components in the solution, but the converse may not be true. 2.2 Fundamental Screening Rules via Dual Polytope Projections Motivated by the above geometric intuitions, we next show how to find the predictors in the inactive set on θ∗. To emphasize the dependence on λ, let us write θ∗(λ) and β∗(λ). If we know exactly where θ∗(λ) is, it will be trivial to find the predictors in the inactive set. Unfortunately, in most of the cases, we only have incomplete information about θ∗(λ) without actually solving problem (1) or (3). Suppose we know the exact θ∗(λ′) for a specific λ′. How can we estimate θ∗(λ′′) for another λ′′ and its inactive set? To answer this question, we start from Eq. (5); θ∗(λ) is nonexpansive because it is a projection operator. For convenience, we cite the projection theorem in [2] as follows. Theorem 1. Let C be a convex set, then the projection function defined in Eq. (4) is continuous and nonexpansive, i.e., ∥PC(w2) −PC(w1)∥2 ≤∥w2 −w1∥2, ∀w2, w1. (8) Given θ∗(λ′), the next theorem shows how to estimate θ∗(λ′′) and its inactive set for another parameter λ′′. Theorem 2. For the Lasso problem, assume we are given the solution of its dual problem θ∗(λ′) for a specific λ′. Let λ′′ be a nonnegative value different from λ′. Then [β∗(λ′′)]i = 0 if |xT i θ∗(λ′)| < 1 −∥xi∥2∥y∥2 1 λ′ − 1 λ′′ . (9) Proof. From the KKT conditions in Eq. (7), we know |xT i θ∗(λ′′)| < 1 ⇒[β∗(λ′′)]i = 0. By the dual problem (3), θ∗(λ) is the projection of y λ onto the feasible set F. According to the projection theorem [2], that is, Theorem 1, for closed convex sets, θ∗(λ) is continuous and nonexpansive, i.e., ∥θ∗(λ′′) −θ∗(λ′)∥2 ≤ y λ′′ −y λ′ 2 = ∥y∥2 1 λ′′ −1 λ′ (10) Then |xT i θ∗(λ′′)| ≤|xT i θ∗(λ′′) −xT i θ∗(λ′)| + |xT i θ∗(λ′)| (11) < ∥xi∥2∥(θ∗(λ′′) −θ∗(λ′))∥2 + 1 −∥xi∥2∥y∥2 1 λ′′ −1 λ′ ≤∥xi∥2∥y∥2 1 λ′′ −1 λ′ + 1 −∥xi∥2∥y∥2 1 λ′′ −1 λ′ = 1 which completes the proof. From theorem 2, it is easy to see our rule is quite flexible since every θ∗(λ′) would result in a new screening rule. And the smaller the gap between λ′ and λ′′, the more effective the screening rule is. By “more effective”, we mean a stronger capability of identifying inactive predictors. As an example, let us find out θ∗(λmax). Recall that λmax = maxi |xT i y|. It is easy to verify y λmax is itself feasible. Therefore the projection of y λmax onto F is itself, i.e., θ∗(λmax) = y λmax . Moreover, by noting that for ∀λ > λmax, we have |xT i y/λ| < 1, i ∈I, i.e., all predictors are in the inactive set at θ∗(λ), we conclude that the solution to problem (1) is 0. Combining all these together and plugging θ∗(λmax) = y λmax into Eq. (9), we obtain the following screening rule. Corollary 3. DPP: For the Lasso problem (1), let λmax = maxi |xT i y|. If λ ≥λmax, then [β∗]i = 0, ∀i ∈I. Otherwise, [β∗(λ)]i = 0 if xT i y λmax < 1 −∥xi∥2∥y∥2  1 λ − 1 λmax  . Clearly, DPP is most effective when λ is close to λmax. So how can we find a new θ∗(λ′) with λ′ < λmax? Note that Eq. (6) is in fact a natural bridge which relates the primal and dual optimal solutions. As long as we know β∗(λ′), it is easy to get θ∗(λ′) when λ is relatively small, e.g., LARS [7] and Homotopy [17] algorithms. 3 Table 1: Illustration of the running time for DPP screening and for solving the Lasso problem after screening. Ts: time for screening. Tl: time for solving the Lasso problem after screening. To: the total time. Entries of the response vector y are i.i.d. by a standard Gaussian. Columns of the data matrix X ∈ℜ1000×100000 are generated by xi = y + αz where α is a random number drawn uniformly from [0, 1]. Entries of z are i.i.d. by a standard Gaussian. λmax = 0.95 and λ/λmax=0.5. LASSO DPP DPP2 DPP5 DPP10 DPP20 Ts (S) — 0.035 0.073 0.152 0.321 0.648 Tl (S) — 10.250 9.634 8.399 1.369 0.121 To (S) 103.314 10.285 9.707 8.552 1.690 0.769 Remark: Xiang et al. [26] developed a general sphere test which says that if θ∗is estimated to be inside a ball ∥θ∗−q∥2 ≤r, then |xT i q| < (1 −r) ⇒[β∗]i = 0. Considering the DPP rules in Theorem 2, it is equivalent to setting q = θ∗(λ′) and r = | 1 λ′ − 1 λ′′ |. Therefore, different from the sphere test and Dome developed in [26, 25] with the radius r fixed at the beginning, the construction of our DPP rules is equivalent to an “r” decreasing process. Clearly, the smaller r is, the more effective the DPP rules will be. Remark: Notice that, DPP is not the same as ST1 [26] and SAFE [8], which discards the ith feature if |xT i y| < λ−∥xi∥2∥y∥2 λmax−λ λmax . From the perspective of the sphere test, the radius of ST1/SAFE and DPP are the same. But the centers of ST1 and DPP are y/λ and y/λmax respectively, which leads to different formulas, i.e., Eq. (2) and Corollary 3. 2.3 DPP Rules with LARS/Homotopy Algorithms It is well known that under mild conditions, the set {β∗(λ) : λ > 0} (also know as regularization path [15]) is continuous piecewise linear [17, 7, 15]. The output of LARS or Homotopy algorithms is in fact a sequence of values like (β∗(λ(0)), λ(0)), (β∗(λ(1)), λ(1)), . . ., where β∗(λ(i)) corresponds to the ith breakpoint of the regularization path {β∗(λ) : λ > 0} and λ(i)s are monotonically decreasing. By Eq. (6), once we get β∗(λ(i)), we can immediately compute θ∗(λ(i)). Then according to Theorem 2, we can construct a DPP rule based on θ∗(λ(i)) and λ(i). For convenience, if the DPP rule is built based on θ∗(λ(i)), we add the index i as suffix to DPP, e.g., DPP5 means it is developed based on θ∗(λ(5)). It should be noted that LARS or Homotopy algorithms are very efficient to find the first few breakpoints of the regularization path and the corresponding parameters. For the first few breakpoints, the computational cost is roughly O(Np), i.e., linear with the size of the data matrix X. In Table 1, we report both the time used for screening and the time needed to solve the Lasso problem after screening. The Lasso solver is from the SLEP [14] package. From Table 1, we can see that compared with the time saved by the screening rules, the time used for screening is negligible. The efficiency of the Lasso solver is improved by DPP20 more than 130 times. In practice, DPP rules built on the first few θ∗(λ(i))’s lead to more significant performance improvement than existing state-of-art screening tests. We will demonstrate the effectiveness of our DPP rules in the experiment section. As another useful property of LARS/Homotopy algorithms, it is worthwhile to mention that changes of the active set only happen at the breakpoints [17, 7, 15]. Consequently, given the parameters corresponding to a pair of adjacent breakpoints, e.g., λ(i) and λ(i+1), the active set for λ ∈(λ(i+1), λ(i)) is the same as λ = λ(i). Therefore, besides the sequence of breakpoints and the associated parameters (β∗(λ(0)), λ(0)), . . . (β∗(λ(k)), λ(k)) computed by LARS/Homotopy algorithms, we know the active set for ∀λ ≥λ(k). Hence we can remove the predictors in the inactive set from the optimization problem (1). This scheme has been embedded in DPP rules. Remark: Some works, e.g., [21], [8], solve several Lasso problems for different parameters to improve the screening performance. However, the DPP algorithms do not aim to solve a sequence of Lasso problems, but just to accelerate one. The LARS/Homotopy algorithms are used to find the first few breakpoints of the regularization path and the corresponding parameters, instead of solving general Lasso problems. Thus, different from [21], [8] who need to iteratively compute a screening step and a Lasso step, DPP algorithms only compute one screening step and one Lasso step. 2.4 Sequential Version of DPP Rules Motivated by the ideas of [21] and [8], we can develop a sequential version of DPP rules. In other words, if we are given a sequence of parameter values λ1 > λ2 > . . . > λm, we can first apply DPP to discard inactive predictors for the Lasso problem (1) with parameter being λ1. After solving 4 the reduced optimization problem for λ1, we obtain the exact solution β∗(λ1). Hence by Eq. (6), we can find θ∗(λ1). According to Theorem 2, once we know the optimal dual solution θ∗(λ1), we can construct a new screening rule to identify inactive predictors for problem (1) with λ = λ2. By repeating the above process, we obtain the sequential version of the DPP rule (SDPP). Corollary 4. SDPP: For the Lasso problem (1), suppose we are given a sequence of parameter values λmax = λ0 > λ1 > . . . > λm. Then for any integer 0 ≤k < m, we have [β∗(λk+1)]i = 0 if β∗(λk) is known and the following holds: xT i y−Xβ∗(λk) λk < 1 −∥xi∥2∥y∥2  1 λk+1 − 1 λk  . Remark: There are some other related works on screening rules, e.g., Wu et al. [24] built screening rules for ℓ1 penalized logistic regression based on the inner products between the response vector and each predictor; Tibshirani et al. [21] developed strong rules for a set of Lasso-type problems via the inner products between the residual and predictors; in [9], Fan and Lv studied screening rules for Lasso and related problems. But all of the above works may mistakenly discard predictors that have non-zero coefficients in the solution. Similar to [8, 26, 25], our DPP rules are exact in the sense that the predictors discarded by our rules are inactive predictors, i.e., predictors that have zero coefficients in the solution. 2.5 Enhanced DPP Rules In this section, we show how to further improve the DPP rules. From the inequality in (9), we can see that the larger the right hand side is, the more inactive features can be detected. From the proof of Theorem 2, we need to make the right hand side of the inequality in (10) as small as possible. By noting that θ∗(λ′) = PF ( y λ′ ) and θ∗(λ′′) = PF ( y λ′′ ) [please refer to Eq. (5)], the inequality in (10) is in fact a direct consequence of Theorem 1 by letting C := F, w1 := y λ′ and w2 := y λ′′ . On the other hand, suppose y λ′ /∈F, i.e., λ′ ∈(0, λmax). It is clear that y λ′ ̸= PF ( y λ′ ) = θ∗(λ′). Let θ(t) = θ∗(λ′) + t( y λ′ −θ∗(λ′)) for t ≥0, i.e., θ(t) is a point lying on the ray starting from θ∗(λ′) and pointing to the same direction as y λ′ −θ∗(λ′). We can observe that PF (θ(t)) = θ∗(λ′), i.e., the projection of θ(t) onto the set F is θ∗(λ′) as well (please refer to Lemma A in the supplement for details). By applying Theorem 1 again, we have ∥θ∗(λ′′)−θ∗(λ′)∥2 = ∥PF ( y λ′′ )−PF (θ(t))∥2 ≤∥y λ′′ −θ(t)∥2 = ∥t( y λ′ −θ∗(λ′))−( y λ′′ −θ∗(λ′))∥2. (12) Clearly, when t = 1, the inequality in (12) reduces to the one in (10). Because the inequality in (12) holds for all t ≥0, we may get a tighter bound by ∥θ∗(λ′′) −θ∗(λ′)∥2 ≤min t≥0 ∥tv1 −v2∥2, (13) where v1 = y λ′ −θ∗(λ′) and v2 = y λ′′ −θ∗(λ′). When λ′ = λmax, we can set v1 = sign(xT ∗y)x∗ where x∗:= argmaxxi|xT i y| (please refer to Lemma B in the supplement for details). The minimization problem on the right hand side of the inequality (13) can be easily solved as follows: min t≥0 ∥tv1 −v2∥2 = ϕ(λ′, λ′′) = (∥v2∥2, if ⟨v1, v2⟩< 0, v2 −⟨v1,v2⟩ ∥v1∥2 2 v1 2 , otherwise. (14) Similar to Theorem 2, we have the following result: Theorem 5. For the Lasso problem, assume we are given the solution of its dual problem θ∗(λ′) for a specific λ′. Let λ′′ be a nonnegative value different from λ′. Then [β∗(λ′′)]i = 0 if |xT i θ∗(λ′)| < 1 −∥xi∥2ϕ(λ′, λ′′). (15) As we explained above, the right hand side of the inequality (15) is no less than that of the inequality (9). Thus, the enhanced DPP is able to detect more inactive features than DPP. The analogues of Corollaries 3 and 4 can be easily derived as well. Corollary 6. DPP∗: For the Lasso problem (1), let λmax = maxi |xT i y|. If λ ≥λmax, then [β∗]i = 0, ∀i ∈I. Otherwise, [β∗(λ)]i = 0 if the following holds: xT i y λmax < 1 −∥xi∥2ϕ(λmax, λ). Corollary 7. SDPP∗: For the Lasso problem (1), suppose we are given a sequence of parameter values λmax = λ0 > λ1 > . . . > λm. Then for any integer 0 ≤k < m, we have [β∗(λk+1)]i = 0 5 if β∗(λk) is known and the following holds: xT i y−Xβ∗(λk) λk < 1 −∥xi∥2ϕ(λk, λk+1). To simplify notations, we denote the enhanced DPP and SDPP by DPP∗and SDPP∗respectively. 3 Extensions to Group Lasso To demonstrate the flexibility of DPP rules, we extend our idea to the group Lasso problem [27]: inf β∈ℜp 1 2∥y − XG g=1 Xgβg∥2 2 + λ XG g=1 √ng∥βg∥2, (16) where Xg ∈ℜN×ng is the data matrix for the gth group and p = PG g=1 ng. The corresponding dual problem of (16) is (see detailed derivation in the supplemental materials): sup θ n 1 2∥y∥2 2 −λ2 2 ∥θ −y λ∥2 2 : ∥XT g θ∥2 ≤√ng, g = 1, 2, . . . , G o (17) Similar to the Lasso problem, the primal and dual optimal solutions of the group Lasso satisfy: y = XG g=1 Xgβ∗ g + λθ∗ (18) and the KKT conditions are: (θ∗)T Xg ∈ (√ng β∗ g ∥β∗ g∥2 if β∗ g ̸= 0 √ngu, ∥u∥2 ≤1 if β∗ g = 0 (19) for g = 1, 2, . . . , G. Clearly, if ∥(θ∗)T Xg∥2 < √ng, we can conclude that β∗ g = 0. Consider problem (17). It is easy to see that the dual optimal θ∗is the projection of y λ onto the feasible set. For each g, the constraint ∥XT g θ∥2 ≤√ng confines θ to an ellipsoid which is closed and convex. Therefore, the feasible set of the dual problem (17) is the intersection of ellipsoids and thus closed and convex. Hence θ∗(λ) is also nonexpansive for the group lasso problem. Similar to Theorem 2, we can readily develop the following theorem for group Lasso. Theorem 8. For the group Lasso problem, assume we are given the solution of its dual problem θ∗(λ′) for a specific λ′. Let λ′′ be a nonnegative value different from λ′. Then β∗ g(λ′′) = 0 if ∥XT g θ∗(λ′)∥2 < √ng −∥Xg∥F ∥y∥2 1 λ′ − 1 λ′′ (20) Similar to the Lasso problem, let λmax = maxg ∥XT g y∥2/√ng, we can see that y λmax is itself feasible, and λmax is the largest parameter such that problem (16) has a nonzero solution. Clearly, θ∗(λmax) = y λmax . Similar to DPP and SDPP, we can construct GDPP and SGDPP for group Lasso. Corollary 9. GDPP: For the group Lasso problem (16), let λmax = maxg ∥XT g y∥2/√ng. If λ ≥λmax, β∗ g(λ) = 0, ∀g = 1, 2, . . . , G. Otherwise, we have β∗ g(λ) = 0 if the following holds: XT g y λmax 2 < √ng −∥Xg∥F ∥y∥2  1 λ − 1 λmax  . (21) Corollary 10. SGDPP: For the group Lasso problem (16), suppose we are given a sequence of parameter values λmax = λ0 > λ1 > . . . > λm. For any integer 0 ≤k < m, we have β∗ g(λk+1) = 0 if β∗(λk) is known and the following holds: XT g y−PG g=1 Xgβ∗ g(λk) λk 2 < √ng −∥Xg∥F ∥y∥2  1 λk+1 − 1 λk  . (22) Remark: Similar to DPP∗, we can develop the enhanced GDPP by simply replacing the term ∥y∥2(1/λ −1/λmax) on the right hand side of the inequality (21) with ϕ(λmax, λ). Notice that, to compute ϕ(λmax, λ), we set v1 = X∗(X∗)T y where X∗= argmaxXg∥XT g y∥2/√ng (please refer to Lemma C in the supplement for details). The analogs of SDPP∗, that is, SGDPP∗, can be obtained by replacing the term ∥y∥2(1/λk+1 −1/λk) on the right hand side of the inequality (22) with ϕ(λk, λk+1). 4 Experiments In section 4.1, we first evaluate the DPP and DPP∗rules on both real and synthetic data. We then compare the performance of DPP with Dome (see [25, 26]) which achieves state-of-art performance for the Lasso problem among exact screening rules [25]. We evaluate GDPP and SGDPP for the group Lasso problem on three synthetic data sets in section 4.2. We are not aware of any “exact” screening rules for the group Lasso problem at this point. 6 (a) MNIST-DPP2/DPP∗2 (b) MNIST-DPP5/DPP∗5 (c) COIL-DPP2/DPP∗2 (d) COIL-DPP5/DPP∗5 Figure 1: Comparison of DPP and DPP∗rules on the MNIST and COIL data sets. To measure the performance of our screening rules, we compute the rejection rate, i.e., the ratio between the number of predictors discarded by screening rules and the actual number of zero predictors in the ground truth. Because the DPP rules are exact, i.e., no active predictors will be mistakenly discarded, the rejection rate will be less than one. For SAFE and Dome, it is not straightforward to extend them to the group Lasso problem. Similarly to previous works [26], we do not report the computational time saved by screening because it can be easily computed from the rejection ratio. Specifically, if the Lasso solver is linear in terms of the size of the data matrix X, a K% rejection of the data can save K% computational time. The general experiment settings are as follows. For each data set, after we construct the data matrix X and the response y, we run the screening rules along a sequence of 100 values equally spaced on the λ/λmax scale from 0 to 1. We repeat the procedure 100 times and report the average performance at each of the 100 values of λ/λmax. All of the screening rules are implemented in Matlab. The experiments are carried out on a Intel(R) (i7-2600) 3.4Ghz processor. 4.1 DPPs and DPP∗s for the Lasso Problem In this experiment, we first compare the performance of the proposed DPP rules with the enhanced DPP rules (DPP∗) on (a) the MNIST handwritten digit data set [13]; (b) the COIL rotational image data set [16] in Section 4.1.1. We show that the DPP∗rules are more effective in identifying inactive features than the DPP rules. This demonstrate our theoretical results in Section 2.5. Then we evaluate the DPP∗/SDPP∗rules and Dome on (c) the ADNI data set; (d) the Olivetti Faces data set [19]; (e) Yahoo web pages data sets [22] and (f) a synthetic data set whose entries are i.i.d. by a standard Gaussian. 4.1.1 Comparison of DPP and DPP∗ As we explain in Section 2.5, all inactive feature detected by the DPP rules can also be detected by the DPP∗rules. But conversely, it is not necessarily true. To demonstrate the advantage of the DPP∗rules, we run DPP2, DPP∗2, DPP5 and DPP∗5 on the MNIST and COIL data sets. a) The MNIST data set contains grey images of scanned handwritten digits, including 60, 000 for training and 10, 000 for testing. The dimension of each image is 28×28. Each time, we first randomly select 100 images for each digit (and in total we have 1000 images) and get a data matrix X ∈ℜ784×1000. Then we randomly pick an image as the response y ∈ℜ784. b) The COIL data set includes 100 objects, each of which has 72 color images with 128×128 pixels. The images that belong to the same object are taken every 5 degree by rotating the object. We use the images of object 10. Each time, we randomly pick one of the images as the response vector y ∈ℜ49152 and use all the remaining ones to construct the data matrix X ∈ℜ49152×71. The average λmax for the so cultured MNIST and the COIL data sets are 0.837 and 0.986. Clearly, the predictors in the data sets are high correlated. From Figure 1, we observe that DPP∗2 significantly outperforms DPP2 for both data sets, especially when λ/λmax is small. We also observe the same pattern for DPP5 and DPP∗5, verifying the claims about DPP∗made in the paper. Thus, in the following experiments, we only report the performance of DPP∗and the competing algorithm Dome. 4.1.2 Comparison of DPP∗/SDPP∗and Dome In this experiment, we compare DPP∗/SDPP∗rules with Dome. We only report the performance of DPP∗5 and DPP∗10 among the family of DPP∗rules on the following four data sets. c) The Alzheimer’s disease neuroimaging initiative (ADNI; available at www.loni.ucla.edu/ADNI) studies the disease progression of Alzheimer’s. The ADNI data set includes 434 patients with 306 features extracted from their baseline MRI scans. Each time we randomly select 90% samples to construct the data matrix X ∈ℜ391×306. The response y is the patients’ MMSE cognitive scores [29]. d) The Olivetti faces data set includes 400 grey scale face images of size 64×64 for 40 people (10 for each). Each time, we randomly take one of the images as the response vector y ∈ℜ4096 7 (a) ADNI (b) Olivetti (c) Yahoo-Computers (d) Synthetic Figure 2: Comparison of DPP∗/SDPP∗rules and Dome on three real data sets, Yahoo computers data set, ADNI data set, Olivetti face data set and one synthetic data set. (a) 20 groups (b) 50 groups (c) 100 groups Figure 3: Performance of GDPP and SGDPP applied to three synthetic data sets. and the data matrix X ∈ℜ4096×399 is constructed by the left ones. e) The Yahoo data sets include 11 top-level categories such as Computers, Education, Health, Recreation, and Science etc. Each category is further divided into a set of subcategories. Each time, we construct a balanced binary classification data set from the topic of Computers. We choose samples from one subcategory as the positive class and randomly sample an equal number of samples from the rest of subcategories as the negative class. The size of the data matrix is 876 × 25259 and the response vector is the binary label of the samples. f) For the synthetic data set X ∈ℜ100×5000 and the response vector y ∈ℜ100, all of the entries are i.i.d. by a standard Gaussian. The average λmax of the above three data sets are 0.7273, 0.989, 0.914, and 0.371 respectively. The predictors in ADNI, Yahoo-Computers and Olivetti data sets are highly correlated as indicated by the average λmax. In contrast with the real data sets, the average λmax of the synthetic data is small. As noted in [26, 25], Dome is very effective in discarding inactive features when λmax is large. From Fig. 2, we observe that Dome performs much better on the real data sets compared to the synthetic data. However, the proposed rules are able to identify far more inactive features than Dome on both real and synthetic data, even for the cases in which λmax is small. 4.2 GDPPs for the Group Lasso Problem We apply GDPPs to three synthetic data sets. The entries of data matrix X ∈ℜ100×1000 and the response vector y are generated i.i.d. from the standard Gaussian distribution. For each of the cases, we randomly divided X into 20, 50, and 100 groups. We compare the performance of GDPP and SGDPP along a sequence of 100 parameter values equally spaced on the λ/λmax scale. We repeat the above procedure 100 times for each of the cases and report the average performance. The average λmax values are 0.136, 0.167, and 0.219 respectively. As shown in Fig. 3, it is expected that SGDPP significantly outperforms GDPP which only makes use of the information of the dual optimal solution at a single point. For more discussions, please refer to the supplement. 5 Conclusion In this paper, we develop new screening rules for the Lasso problem by making use of the nonexpansiveness of the projection operator with respect to a closed convex set. Our new methods, i.e., DPP rules, are able to effectively identify inactive predictors of the Lasso problem, thus greatly reducing the size of the optimization problem. Moreover, we further improve DPP rules and propose the enhanced DPP rules, that is, the DPP∗rules, which are even more effective in discarding inactive predictors than DPP rules. The idea of DPP and DPP∗rules can be easily generalized to screen the inactive groups of the group Lasso problem. Extensive experiments on both synthetic and real data demonstrate the effectiveness of the proposed rules. Moreover, DPP and DPP∗rules can be combined with any Lasso solver as a speedup tool. In the future, we plan to generalize our idea to other sparse formulations consisting of more general structured sparse penalties, e.g., tree/graph Lasso. Acknowledgments This work was supported in part by NIH (LM010730) and NSF (IIS-0953662, CCF-1025177). 8 References [1] S. R. Becker, E. Cand`es, and M. Grant. Templates for convex cone problems with applications to sparse signal recovery. Technical report, Standford University, 2010. [2] D. P. Bertsekas. Convex Analysis and Optimization. Athena Scientific, 2003. [3] A. Bruckstein, D. Donoho, and M. Elad. From sparse solutions of systems of equations to sparse modeling of signals and images. SIAM Review, 51:34–81, 2009. [4] E. Cand`es. Compressive sampling. In Proceedings of the International Congress of Mathematics, 2006. [5] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM Review, 43:129–159, 2001. [6] D. L. Donoho and Y. Tsaig. Fast solution of l-1 norm minimization problems when the solution may be sparse. IEEE Transactions on Information Theory, 54:4789–4812, 2008. [7] B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani. Least angle regression. Annals of Statistics, 32:407– 499, 2004. [8] L. El Ghaoui, V. Viallon, and T. Rabbani. Safe feature elimination in sparse supervised learning. Pacific Journal of Optimization, 8:667–698, 2012. [9] J. Fan and J. Lv. Sure independence screening for ultrahigh dimensional feature spaces. Journal of the Royal Statistical Society Series B, 70:849–911, 2008. [10] J. Friedman, T. Hastie, H. H¨efling, and R. Tibshirani. Pathwise coordinate optimization. Annals of Applied Statistics, 1:302–332, 2007. [11] J. Friedman, T. Hastie, and R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33:1–22, 2010. [12] S. J. Kim, K. Koh, M. Lustig, S. Boyd, and D. Gorinevsky. An interior-point method for large scale l1-regularized least squares. IEEE Journal of Selected Topics in Signal Processing, 1:606–617, 2007. [13] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, 1998. [14] J. Liu, S. Ji, and J. Ye. SLEP: Sparse Learning with Efficient Projections. Arizona State University, 2009. [15] J. Mairal and B. Yu. Complexity analysis of the lasso regularization path. In ICML, 2012. [16] S. A. Nene, S. K. Nayar, and H. Murase. Columbia object image library (coil). Technical report, No. CUCS-006-96, Dept. Comp. Science, Columbia University, 1996. [17] M. R. Osborne, B. Presnell, and B. A. Turlach. A new approach to variable selection in least squares problems. IMA Journal of Numerical Analysis, 20:389–404, 2000. [18] M. Y. Park and T. Hastie. L1-regularized path algorithm for generalized linear models. Journal of the Royal Statistical Society Series B, 69:659–677, 2007. [19] F. Samaria and A. Harter. Parameterisation of a stochastic model for human face identification. In Proceedings of 2nd IEEE Workshop on Applications of Computer Vision, 1994. [20] R. Tibshirani. Regression shringkage and selection via the lasso. Journal of the Royal Statistical Society Series B, 58:267–288, 1996. [21] R. Tibshirani, J. Bien, J. Friedman, T. Hastie, N. Simon, J. Taylor, and R. Tibshirani. Strong rules for discarding predictors in lasso-type problems. Journal of the Royal Statistical Society Series B, 74:245– 266, 2012. [22] N. Ueda and K. Saito. Parametric mixture models for multi-labeled text. Advances in neural information processing systems, 15:721–728, 2002. [23] J. Wright, Y. Ma, J. Mairal, G. Sapiro, T. Huang, and S. Yan. Sparse representation for computer vision and pattern recognition. In Proceedings of IEEE, 2010. [24] T. T. Wu, Y. F. Chen, T. Hastie, E. Sobel, and K. Lange. Genomewide association analysis by lasso penalized logistic regression. Bioinformatics, 25:714–721, 2009. [25] Z. J. Xiang and P. J. Ramadge. Fast lasso screening tests based on correlations. In IEEE ICASSP, 2012. [26] Z. J. Xiang, H. Xu, and P. J. Ramadge. Learning sparse representation of high dimensional data on large scale dictionaries. In NIPS, 2011. [27] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society Series B, 68:49–67, 2006. [28] P. Zhao and B. Yu. On model selection consistency of lasso. Journal of Machine Learning Research, 7:2541–2563, 2006. [29] J. Zhou, L. Yuan, J. Liu, and J. Ye. A multi-task learning formulation for predicting disease progression. In KDD, pages 814–822. ACM, 2011. 9
2013
193
4,924
Multiscale Dictionary Learning for Estimating Conditional Distributions Francesca Petralia Department of Genetics and Genomic Sciences Icahn School of Medicine at Mt Sinai New York, NY 10128, U.S.A. francesca.petralia@mssm.edu Joshua Vogelstein Child Mind Institute Department of Statistical Science Duke University Durham, North Carolina 27708, U.S.A. jo.vo@duke.edu David B. Dunson Department of Statistical Science Duke University Durham, North Carolina 27708, U.S.A. dunson@stat.duke.edu Abstract Nonparametric estimation of the conditional distribution of a response given highdimensional features is a challenging problem. It is important to allow not only the mean but also the variance and shape of the response density to change flexibly with features, which are massive-dimensional. We propose a multiscale dictionary learning model, which expresses the conditional response density as a convex combination of dictionary densities, with the densities used and their weights dependent on the path through a tree decomposition of the feature space. A fast graph partitioning algorithm is applied to obtain the tree decomposition, with Bayesian methods then used to adaptively prune and average over different sub-trees in a soft probabilistic manner. The algorithm scales efficiently to approximately one million features. State of the art predictive performance is demonstrated for toy examples and two neuroscience applications including up to a million features. 1 Introduction Massive datasets are becoming an ubiquitous by-product of modern scientific and industrial applications. These data present statistical and computational challenges because many previously developed analysis approaches do not scale-up sufficiently. Challenges arise because of the ultra high-dimensionality and relatively low sample size. Parsimonious models for such big data assume that the density in the ambient space concentrates around a lower-dimensional (possibly nonlinear) subspace. A plethora of methods are emerging to estimate such lower-dimensional subspaces [1, 2]. We are interested in using such lower-dimensional embeddings to obtain estimates of the conditional distribution of some target variable(s). This conditional density estimation setting arises in a number of important application areas, including neuroscience, genetics, and video processing. For example, one might desire automated estimation of a predictive density for a neurologic phenotype of interest, such as intelligence, on the basis of available data for a patient including neuroimaging. The challenge is to estimate the probability density function of the phenotype nonparametrically based on a 106 dimensional image of the subject’s brain. It is crucial to avoid parametric assumptions on the density, such as Gaussianity, while allowing the density to change flexibly with predictors. Otherwise, one can obtain misleading predictions and poorly characterize predictive uncertainty. 1 There is a rich machine learning and statistical literature on conditional density estimation of a response y ∈Y given a set of features (predictors) x = (x1, x2, . . . , xp)T ∈X⊆Rp. Common approaches include hierarchical mixtures of experts [3, 4], kernel methods [5, 6, 7], Bayesian finite mixture models [8, 9, 10] and Bayesian nonparametrics [11, 12, 13, 14]. However, there has been limited consideration of scaling to large p settings, with the variational Bayes approach of [9] being a notable exception. For dimensionality reduction, [9] follow a greedy variable selection algorithm. Their approach does not scale to the sized applications we are interested in. For example, in a problem with p = 1, 000 and n = 500, they reported a CPU time of 51.7 minutes for a single analysis. We are interested in problems with p having many more orders of magnitude, requiring a faster computing time while also accommodating flexible nonlinear dimensionality reduction (variable selection is a limited sort of dimension reduction). To our knowledge, there are no nonparametric density regression competitors to our approach, which maintain a characterization of uncertainty in estimating the conditional densities; rather, all sufficiently scalable algorithms provide point predictions and/or rely on restrictive assumptions such as linearity. In big data problems, scaling is often accomplished using divide-and-conquer techniques. However, as the number of features increases, the problem of finding the best splitting attribute becomes intractable, so that CART, MARS and multiple tree models cannot be efficiently applied. Similarly, mixture of experts becomes computationally demanding, since both mixture weights and dictionary densities are predictor dependent. To improve efficiency, sparse extensions relying on different variable selection algorithms have been proposed [15]. However, performing variable selection in high dimensions is effectively intractable: algorithms need to efficiently search for the best subsets of predictors to include in weight and mean functions within a mixture model, an NP-hard problem [16]. In order to efficiently deal with massive datasets, we propose a novel multiscale approach which starts by learning a multiscale dictionary of densities. This tree is efficiently learned in a first stage using a fast and scalable graph partitioning algorithm applied to the high-dimensional observations [17]. Expressing the conditional densities f(y|x) for each x ∈X as a convex combination of coarse-to-fine scale dictionary densities, the learning problem in the second stage estimates the corresponding multiscale probability tree. This is accomplished in a Bayesian manner using a novel multiscale stick-breaking process, which allows the data to inform about the optimal bias-variance tradeoff; weighting coarse scale dictionary densities more highly decreases variance while adding to bias. This results in a model that borrows information across different resolution levels and reaches a good compromise in terms of the bias-variance tradeoff. We show that the algorithm scales efficiently to millions of features. 2 Setting Let X : Ω→X ⊆Rp be a p-dimensional Euclidean vector-valued predictor random variable, taking values x ∈X, with a marginal probability distribution fX. Similarly, let Y : Ω→Y be a targetvalued random variable (e.g., Y ⊆R). For inferential expedience, we posit the existence of a latent variable η: Ω→M ⊆X, where M is only d “dimensional” and d ≪p. Note that M need not be a linear subspace of X, rather, M could be, for example, a union or affine subspaces, or a smooth compact Riemannian manifold. Regardless of the nature of M, we assume that we can approximately decompose the joint distribution as follows, fX,Y,η = fX,Y |ηfη = fY |X,ηfX|ηfη ≈fY |ηfX|ηfη. Hence, we assume that the signal approximately concentrates around a low-dimensional latent space, fY |X,η = fY |η. This is a much less restrictive assumption than the commonplace assumption in manifold learning that the marginal distribution fX concentrates around a low-dimensional latent space. To provide some intuition for our model, we provide the following concrete example where the distribution of y ∈R is a Gaussian function of the coordinate η ∈M along the swissroll, which is embedded in a high-dimensional ambient space. Specifically, we sample the manifold coordinate, η ∼U(0, 1). We sample x = (x1, . . . , xp)T as follows x1 = η sin(η) ; x2 = η cos(η) ; xr ∼N(0, 1) r ∈{3, . . . , p} Finally, we sample y from N(µ(η), σ(η)). Clearly, x and y are conditionally independent given η, which is the low-dimensional signal manifold. In particular, x lives on a swissroll embedded in a 2 p-dimensional ambient space, but y is only a function of the coordinate η along the swissroll M. The left panels of Figure 1 depict this example when µ(η) = η and σ(η) = η + 1. Figure 1: Illustration of our generative model and algorithm on a swissroll. The top left panel shows the manifold M (a swissroll) embedded in a p-dimensional ambient space, where the color indicates the coordinate along the manifold, η (only the first 3 dimensions are shown for visualization purposes). The bottom left panel shows the distribution of y as a function of η, in particular, fY |η = N(η, η + 1). The middle and right panels show our estimates of fY |η at scales 3 and 4, respectively, which follow from partitioning our data. Sample size was n = 10, 000. 3 Goal Our goal is to develop an approach to learn about fY |X from n pairs of observations that we assume are exchangeable samples from the joint distribution, (xi, yi) ∼fX,Y ∈F. Let Dn = {(xi, yi)}i∈[n], where [n] = {1, . . . , n}. More specifically, we seek to obtain a posterior over fY |X. We insist that our approach satisfies several desiderata, including most importantly: (i) scales up to p ≈106 in reasonable time, (ii) yields good empirical results, and (iii) automatically adapts to the complexity of the data corpus. To our knowledge, no extant approach for estimating conditional densities or posteriors thereof satisfies even our first criterion. 4 Methodology 4.1 Ms. Deeds Framework We propose here a general modular approach which we refer to as multiscale dictionary learning for estimating conditional distributions (“Ms. Deeds”). Ms. Deeds consists of two components: (i) a tree decomposition of the space, and (ii) an assumed form of the conditional probability model. Tree Decomposition A tree decomposition τ yields a multiscale partition of the data or the ambient space in which the data live. Let (W, ρW , FW ) be a measurable metric space, where FW is a Borel probability measure, W, and ρW : W ×W →R is a metric on W. Let BW r (w) be the ρW -ball inside W of radius r > 0 centered at w ∈W. For example, W could be the data corpus Dn, or it could be X × Y. We define a tree decomposition as in [2, 18]. A partition tree τ of W consists of a collection of cells, τ = {Cj,k}j∈Z,k∈Kj. At each scale j, the set of cells Cj = {Cj,k}k∈Kj provides a disjoint partition of W almost everywhere. We define j = 0 as the root node. For each j > 0, each set has a unique parent node. Denote Aj,k = {(j′, k′) : Cj,k ⊆Cj′,k′, j′ < j} , Dj,k = {(j′, k′) : Cj′,k′ ⊆Cj,k, j′ > j} respectively the ancestors and the descendants of node (j, k). 3 Unlike classical harmonic theory which presupposes τ (e.g., in wavelets [19]), we choose to learn τ from the data. Previously, Chen et al. [18] developed a multiscale measure estimation strategy, and proved that there exists a scale j such that the approximate measure is within some bound of the true measure, under certain relatively general assumptions. We decided to simply partition the x’s, ignoring the y’s in the partitioning strategy. Our justification for this choice is as follows. First, sometimes there are many different y’s for many different applications. In such cases, we do not want to bias the partitioning to any specific y’s, all the more so when new unknown y’s may later emerge. Second, because the x’s are so much higher dimensional than the y’s in our applications of interest, the partitions would be dominated by the x’s, unless we chose a partitioning strategy that emphasized the y’s. Thus, our strategy mitigates this difficulty (while certainly introducing others). Given that we are going to partition using only the x’s, we still face the choice of precisely how to partition. A fully Bayesian approach would construct a large number of partitions, and integrate over them to obtain posteriors. However, such a fully Bayesian strategy remains computationally intractable at scale, so we adopt a hybrid strategy. Specifically, we employ METIS [17], a well-known relatively efficient multiscale partitioning algorithm with demonstrably good empirical performance on a wide range of graphs. Given n observations, i.e. xi = (xi1, . . . , xip)T ∈X for i ∈[n], the graph construction follows via computing all pairwise distances using ρ(xu, xv) = ∥˜xu −˜xv∥2, where ˜x is the whitened x (i.e., mean subtracted and variance normalized). We let there be an edge between xu and xv whenever e−ρ(xu,xv)2 > t, where t is some threshold chosen to elicit the desired sparsity level. Applying METIS recursively on the graph constructed in this way yields a single tree (see supplementary material for further details). Conditional Probability Model Given the tree decomposition of the data, we place a nonparametric prior over the tree. Specifically, we define fY |X as fY |X = X j∈Z πj,kj(x)fj,kj(x)(y|x) (1) where kj(x) is the set at scale j where x has been allocated and πj,kj(x) are weights across scales such that P j∈Z πj,kj(x) = 1. We let weights in Eq. (1) be generated by a stick-breaking process [20]. For each node Cj,k in the partition tree, we define a stick length Vj,k ∼Beta(1, α). The parameter α encodes the complexity of the model, with α = 0 corresponding to the case in which f(y|x) = f(y). The stick-breaking process is defined as πj,k = Vj,k Y (j′,k′)∈Aj,k [1 −Vj′,k′] , (2) where P (j′,k′)∈Aj,k πj′,k′ = 1. The implication of this is that each scale within a path is weighted to optimize the bias/variance trade-off across scales. We refer to this prior as a multiscale stickbreaking process. Note that this Bayesian nonparametric prior assigns a positive probability to all possible paths, including those not observed in the training data. Thus, by adopting this Bayesian formulation, we are able to obtain posterior estimates for any newly observed data, regardless of the amount and variability of training data. This is a pragmatically useful feature of the Bayesian formulation, in addition to the alleviation of the need to choose a scale [18]. Each fj,k in Eq. (1) is an element of a family of distributions. This family might be quite general, e.g., all possible conditional densities, or quite simple, e.g., Gaussian distributions. Moreover, the family can adapt with j or k, being more complex at the coarser scales (for which nj,k’s are larger), and simpler for the finer scales (or partitions with fewer samples). We let the family of conditional densities for y be Gaussian for simplicity, that is, we assume that fj,k = N(µj,k, σj,k) with µj,k ∈R and σj,k ∈R+. Because we are interested in posteriors over the conditional distribution fY |X, we place relatively uninformative but conjugate priors on µj,k and σj,k, specifically, assuming the y’s have been whitened and are unidimensional, µj,k ∼N(0, 1) and σj,k = IG(a, b). Obviously, other choices, such as finite or infinite mixtures of Gaussians are also possible for continuous valued data. 4.2 Inference We introduce the latent variable ℓi ∈Z, for i = [n], denoting the multiscale level used by the ith observation. Let nj,k be the number of observations in Cj,k. Let kh(xi) be a variable indicating the 4 set at level h where xi has been allocated. Each Gibbs sampler iteration can be summarized in the following steps: (i) Update ℓi by sampling from the multinomial full conditional: Pr(ℓi = j | ·) = πj,kj(xi)fj,kj(xi)(yi|xi)/ X s∈Z πs,ks(xi)fs,ks(xi)(yi|xi) (ii) Update stick-breaking random variable Vj,k, for any j ∈Z and k ∈Kj, from Beta(β′, α′) with β′ = 1 + nj,k and α′ = α + P (r,s)∈Dj,k nr,s. (iii) Update µj,k and σj,k, for any j ∈Z and k ∈Kj, by sampling from µj,k ∼N (υj,kνj,k¯yj,k, υj,k) , σj,k ∼IG aσ, b + 0.5P i∈Ij,k (yi −µj,k)2  where υj,k = (1 + νj,k)−1, νj,k = nj,k/σj,k aσ = a + nj,k/2, ¯yj,k being the average of the observations {yi} allocated to cell Cj,k and Ij,k = {i : ℓi = j, xi ∈Cj,k}. To make predictions, the Gibbs sampler was run with up to 20, 000 iterations, including a burnin of 1, 000 (see Supplementary material for details). Gibbs sampler chains were stopped testing normality of normalized averages of functions of the Markov chain [21]. Parameters (a, b) and α involved in the prior density of parameters σj,k’s and Vj,k’s were set to (3, 1) and 1, respectively. All predictions used a leave-one-out strategy. 4.3 Simulation Studies In order to assess the predictive performance of the proposed model, we considered the four different simulation scenarios described below: (1) Nonlinear Mixture We first consider a relatively simple yet nonlinear joint model, with a conditional Gaussian distribution y|η ∼|η|N(µ1, σ1) + (1 −|η|)N(µ2, σ2), a marginal distribution for each dimension of x, xr|η ∼N(η, σx), r ∈{1, 2, . . . , p}, and a uniform distribution over the latent manifold η ∼sin(U(0, c)). In the simulations we let (µ1, σ1) = (−2, 1), (µ2, σ2) = (2, 1), σx = 0.1, and c = 20, and p = 1000. Thus, fY |X is a highly nonlinear function of x, and even η, and x is high-dimensional. (2) Swissroll We then return to the swissroll example of Figure 1; in Figure 3 we show results for (µ, σ) = (η, 1). (3) Linear Subspace Letting Γ ∈Rp+1×q and Θ be a q × d “diagonal” matrix (meaning all entires other than the first d < q elements of the diagonal are zero), we assume the following model: Y, X|η ∼Np+1(ΓΘη, I), where Γ ∼Sp+1,d indicates Γ is uniformly sampled from the set of all orthonormal d frames in Rp+1 (a Stiefel manifold), θii ∼IG(aθ, bθ) for i ∈{1, . . . , d} and all other elements of Θ are zero, and η ∼Nd(0, I). In the simulation, we let q = d = 5, (αθ, βθ) = (1, 0.25). (4) Union of Linear Subspaces This model is a direct extension of the linear subspace model, as it is a union of subspaces. We let the dimensionality of each subspace vary to demonstrate the generality of our procedure. Specifically, we assume Y, X|η ∼PG g=1 ωgNp+1(ΓgΘgη, I), ω ∼Dirichlet(α), η ∼Nd(0, I), where Γ ∼Sp+1,g and Θg is “diagonal” with θii ∼IG(ag, bg) for i ∈{1, . . . , g}, and the remaining elements of Θ are zero. In the simulation, we let G = 5, α = (1, . . . , 1)T, (αg, βg) = (αθ, βθ) as above. 4.4 Neuroscience Applications We assessed the predictive performance of the proposed method on two very different neuroimaging datasets. For all analyses, each variable was normalized by subtracting its mean and dividing by its standard deviation. The prior specification and Gibbs sampler described in §4.1 and 4.2 were utilized. In the first experiment we investigated the extent to which we could predict creativity (as measured via the Composite Creativity Index [22]) via a structural connectome dataset collected at the Mind Research Network (data were collected as described in Jung et al. [23]). For each subject, we estimate a 70 vertex undirected weighted brain-graph using the Magnetic Resonance Connectome Automated Pipeline (MRCAP) [24] from diffusion tensor imaging data [25]. Because our graphs are 5 undirected and lack self-loops, we have a total of p = 70 2  = 2, 415 potential weighted edges. The p-dimensional feature vector is defined by the natural logarithm of the vectorized matrix described above. The second dataset comes from a resting-state functional magnetic resonance experiment as part of the Autism Brain Imaging Data Exchange [26]. We selected the Yale Child Study Center for analysis. Each brain-image was processed using the Configurable Pipeline for Analysis of Connectomes (CPAC) [27]. For each subject, we computed a measure of normalized power at each voxel called fALFF [28]. To ensure the existence of nonlinear signal relating these predictors, we let yi correspond to an estimate of overall head motion in the scanner, called mean framewise displacement (FD) computed as described in Power et al. [29]. In total, there were p = 902, 629 voxels. 4.5 Evaluation Criteria To compare algorithmic performance we considered rA m defined as rA m = φ(MSB)/φ(A), where φ is the quantity of interest (for example, CPU time in seconds or mean squared error), MSB is our approach and A is the competitor algorithm. To obtain mean-squared error estimates from MSB, we select our posterior mean as a point-estimate (the comparison algorithms do not generate posterior predictions, only point estimates). For each simulation scenario, we sampled multiple datasets and compute the matched distribution of rA m. In other words, rather than running simulations and reporting the distribution of performance for each algorithm, we compare the algorithms per simulation. This provides a much more informative indication of algorithmic performance, in that we indicate the fraction of simulations one algorithm outperforms another on some metric. For each example, we sampled 20 datasets to obtain estimates of the distribution over rA m. All experiments were performed on a typical workstation, Intel Core i7-2600K Quad-Core Processor with 8192 MB of RAM. 5 Results 5.1 Illustrative Example The middle and right panels of Figure 1 depict the quality of partitioning and density estimation for the swissroll example described in §2, with the ambient dimension p = 1000 and the predictive manifold dimension d = 1. We sampled n = 104 samples for this illustration. At scale 3 we have 4 partitions, and at scale 4 we have 8 (note that the partition tree, in general, need not be binary). The top panels are color coded to indicate which xi’s fall into which partition. Although imperfect, it should be clear that the data are partitioned very well. The bottom panels show the resulting estimate of the posteriors at the two scales. These posteriors are piecewise constant, as they are invariant to the manifold coordinate within a given partition. To obviate the need to choose a scale to use to make a prediction, we choose to adopt a Bayesian approach and integrate across scales. Figure 2 shows the estimated density of two observations of model (1) with parameters (µ1, σ1) = (−2, 1), (µ2, σ2) = (2, 1), σx = 0.1, and c = 20 for different sample sizes. Posteriors of the conditional density fY |X were computed for various sample sizes. Figure 2 suggests that our estimate of fY |X approaches the true density as the number of observations in the training set increases. We are unable to compare our strategy for posterior estimation to previous literature because we are unaware of previous Bayesian approaches for this problem that scale up to problems of this size. Therefore, we numerically compare the performance of our point-estimates (which we define as the posterior mean of ˆfY |X) with the predictions of the competitor algorithms. 5.2 Quantitative Comparisons for Simulated Data Figure 3 compares the numerical performance of our algorithm (MSB) with Lasso (black), CART (red), and PC regression (green) in terms of both mean-squared error (top) and CPU time (bottom) for models (2), (3), and (4) in the left, middle, and right panels respectively. These figures show relative performance on a per simulation basis, thus enabling a much more powerful comparison than averaging performance for each algorithm over a set of simulations. Note that these three simulations span a wide range of models, including nonlinear smooth manifolds such as the swissroll 6 −4 −2 0 2 4 0 0.3 0.6 0.9 n=100 f(y|η=−0.9) −4 −2 0 2 4 0 0.3 0.6 y f(y|η=0.5) −4 −2 0 2 4 0 0.3 0.6 0.9 n=150 −4 −2 0 2 4 0 0.3 0.6 −4 −2 0 2 4 0 0.3 0.6 0.9 n=200 −4 −2 0 2 4 0 0.3 0.6 Figure 2: Illustrative example of model (1) suggesting that our posterior estimates of the conditional density are converging as n increases even when fY |η is highly nonlinear and fX|η is very high-dimensional. True (red) and estimated (black) density (50th percentile: solid line, 2.5th and 97.5th percentiles: dashed lines) for two data positions along the manifold (top panels: η ≈−0.9, bottom panels: η ≈0.5) considering different training set sizes. (model 2), relatively simple linear subspace manifolds (model 3), and a union of linear subspaces model (model 4 ; which is neither linear nor a manifold). In terms of predictive accuracy, the top panels show that for all three simulations, in every dimensionality that we considered—including p = 0.5 × 106—MSB is more accurate than either Lasso, CART, or PC regression. Note that this is the case even though MSB provides much more information about the posterior fY |X, yielding an entire posterior over fY |X, rather than merely a point estimate. In terms of computational time, MSB is much faster than the competitors for large p and n, as shown in the bottom three panels. The supplementary materials show that computational time for MSB is relatively constant as a function of p, whereas Lasso’s computational time grows considerably with p. Thus, for large enough p, MSB is significantly faster that Lasso. MSB is faster than CART and PC regression for all p and n under consideration. Thus, it is clear from these simulations that MSB has better scaling properties—in terms of both predictive accuracy and computational time—than the competitor methods. 50k 100k 0 1 p MSE Ratio (2) Swissroll 100 200 300 0 1 sample size Time Ratio 50k 100k 0 1 p (3) Linear Subspace 100k 200k 300k 0 2 4 p 50k 100k 0 1 p (4) Union of Linear Subspaces 100 200 300 0 1 sample size Figure 3: Numerical results for various simulation scenarios. Top plots depict the relative meansquared error of MSB (our approach), versus CART (red), Lasso (black), and PC regression (green) for as a function of ambient dimension of x. Bottom plots depict the ratio of CPU time as a function of sample size. The three simulation scenarios are: swissroll (left), linear subspaces (middle), union of linear subspaces (right). MSB outperforms both CART, Lasso, and PC regression in all three scenarios regardless of ambient dimension (rA mse < 1 for all p). MSB compute time is relatively constant as n or p increase, whereas Lasso’s compute time increases, thus, as n or p increase, MSB CPU time becomes less than Lasso’s. MSB was always significantly faster than CART and PC regression, regardless of n or p. For all panels, n = 100 when p varies, and p = 300k when n varies, where k indicates 1000, e.g., 300k= 3 × 105. 7 Table 1: Neuroscience application quantitative performance comparisons. Squared error predictive accuracy per subject (using leave-one-out) was computed. We report the mean and standard deviation (s.d.) across subjects of squared error, and CPU time (in seconds). We compare multiscale stick-breaking (MSB), CART, Lasso, random forest (RF), and PC regression. MSB outperforms all the competitors in terms of predictive accuracy and scalability. Only MSB and Lasso even ran for the ≈106 dimensional application. Bold indicates best MSE, ∗indicates best CPU time. DATA n p MODEL MSE (S.D.) TIME (S.D.) CREATIVITY 108 2,415 MSB 0.56 (0.85) 1.1 (0.02) CART 1.10 (1.00) 0.9 (0.01) LASSO∗ 0.63 (0.95)∗ 0.40 (0.10)∗ RF 0.57(0.90) 78.2 (0.59) PC REGRESSION 0.65 (0.88) 0.46 (0.37) MOVEMENT 56 ≈106 MSB∗ 0.76 (0.90)∗ 20.98 (2.31)∗ LASSO 1.02 (0.98) 96.18 (9.66) 5.3 Quantitative Comparisons for Neuroscience Applications Table 1 shows the mean and standard deviation of point-estimate predictions per subject (using leave-one-out) for the two neuroscience applications that we investigated: (i) predicting creativity from diffusion MRI (creativity) and, (ii) predicting head motion based on functional MRI (movement). For the creativity application, p was relatively small, “merely” 2, 415, so we could run Lasso, CART, and random forests (RF) [30]. For the movement application, p was nearly one million. For both applications, MSB yielded improved predictive accuracy over all competitors. Although CART and Lasso were faster than MSB on the relatively low-dimensional predictor example (creativity), their computational scaling was poor, such that CART yielded a memory fault on the higherdimensional case, and Lasso required substantially more time than MSB. 6 Discussion In this work we have introduced a general formalism to estimate conditional distributions via multiscale dictionary learning. An important property of any such strategy is the ability to scale up to ultrahigh-dimensional predictors. We considered simulations and real-data examples where the dimensionality of the predictor space approached one million. To our knowledge, no other approach to learn conditional distributions can run at this scale. Our approach explicitly assumes that the posterior fY |X can be well approximated by projecting x onto a lower-dimensional space, fY |X ≈fY |η, where η ∈M ⊂Rd, and x ∈Rd. Note that this assumption is much less restrictive than assuming that x is close to a low-dimensional space; rather, we only assume that the part of fX that “matters” to predict y lives near a low-dimensional subspace. Because a fully Bayesian strategy remains computationally intractable at this scale, we developed an empirical Bayes approach, estimating the partition tree based on the data, but integrating over scales and posteriors. We demonstrate that even though we obtain posteriors over the conditional distribution fY |X, our approach, dubbed multiscale stick-breaking (MSB), outperforms several standard machine learning algorithms in terms of both predictive accuracy and computational time, as the sample size (n) and ambient dimension (p) increase. This improvement was demonstrated when the M was a swissroll, a latent subspace, a union of latent subspaces, and real data (for which the latent space may not even exist). In future work, we will extend these numerical results to obtain theory on posterior convergence. Indeed, while multiscale methods benefit from a rich theoretical foundation [2], the relative advantages and disadvantages of a fully Bayesian approach, in which one can estimate posteriors over all functionals of fY |X at all scales, remains relatively unexplored. References [1] I. U. Rahman, I. Drori, V. C. Stodden, and D. L. Donoho. Multiscale representations for manifold- valued data. SIAM J. Multiscale Model, 4:1201–1232, 2005. 8 [2] W.K. Allard, G. Chen, and M. Maggioni. Multiscale geometric methods for data sets II: geometric wavelets. Applied and Computational Harmonic Analysis, 32:435–462, 2012. [3] R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton. Adaptive mixture of local experts. Neural Computation, 3:79–87, 1991. [4] W. X. Jiang and M. A. Tanner. Hierarchical mixtures-of-experts for exponential family regression models: approximation and maximum likelihood estimation. Annals of Statistics, 27:987–1011, 1999. [5] J. Q. Fan, Q. W. Yao, and H. Tong. Estimation of conditional densities and sensitivity measures in nonlinear dynamical systems. Biometrika, 83:189–206, 1996. [6] M. P. Holmes, G. A. Gray, and C. L. Isbell. Fast kernel conditional density estimation: a dual-tree Monte Carlo approach. Computational statistics & data analysis, 54:1707–1718, 2010. [7] G. Fu, F. Y. Shih, and H. Wang. A kernel-based parametric method for conditional density estimation. Pattern recognition, 44:284–294, 2011. [8] D. J. Nott, S. L. Tan, M. Villani, and R. Kohn. Regression density estimation with variational methods and stochastic approximation. Journal of Computational and Graphical Statistics, 21:797–820, 2012. [9] M. N. Tran, D. J. Nott, and R. Kohn. Simultaneous variable selection and component selection for regression density estimation with mixtures of heteroscedastic experts. Electronic Journal of Statistics, 6:1170–1199, 2012. [10] A. Norets and J. Pelenis. Bayesian modeling of joint and conditional distributions. Journal of Econometrics, 168:332–346, 2012. [11] J. E. Griffin and M. F. J. Steel. Order-based dependent Dirichlet processes. Journal of the American Statistical Association, 101:179–194, 2006. [12] D. B. Dunson, N. Pillai, and J. H. Park. Bayesian density regression. Journal of the Royal Statistical Society Series B-Statistical Methodology, 69:163–183, 2007. [13] Y. Chung and D. B. Dunson. Nonparametric Bayes conditional distribution modeling with variable selection. Journal of the American Statistical Association, 104:1646–1660, 2009. [14] S. T. Tokdar, Y. M. Zhu, and J. K. Ghosh. Bayesian density regression with logistic Gaussian process and subspace projection. Bayesian Analysis, 5:319–344, 2010. [15] I. Mossavat and O. Amft. Sparse bayesian hierarchical mixture of experts. IEEE Statistical Signal Processing Workshop (SSP), 2011. [16] Isabelle Guyon and Andr´e Elisseeff. An introduction to variable and feature selection. The Journal of Machine Learning Research, 3:1157–1182, 2003. [17] G. Karypis and V. Kumar. A fast and high quality multilevel scheme for partitioning irregular graphs. SIAM Journal on Scientific Computing 20, 1:359392, 1999. [18] G. Chen, M. Iwen, S. Chin, and M. Maggioni. A fast multiscale framework for data in high-dimensions: Measure estimation, anomaly detection, and compressive measurements. In VCIP, 2012 IEEE, 2012. [19] Ingrid Daubechies. Ten Lectures on Wavelets (CBMS-NSF Regional Conference Series in Applied Mathematics). SIAM: Society for Industrial and Applied Mathematics, 1992. [20] J. Sethuraman. A constructive denition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. [21] Didier Chauveau and Jean Diebolt. An automated stopping rule for mcmc convergence assessment. Computational Statistics, 14:419–442, 1998. [22] R. Arden, R. S. Chavez, R. Grazioplene, and R. E. Jung. Neuroimaging creativity: a psychometric view. Behavioural brain research, 214:143–156, 2010. [23] R.˜E. Jung, R. Grazioplene, A. Caprihan, R.˜S. Chavez, and R.˜J. Haier. White matter integrity, creativity, and psychopathology: Disentangling constructs with diffusion tensor imaging. PloS one, 5(3):e9818, 2010. [24] W. ˜R. Gray, J. ˜A. Bogovic, J.˜T. Vogelstein, B. ˜A. Landman, J˙ L. Prince, and R.˜J. Vogelstein. Magnetic resonance connectome automated pipeline: an overview. IEEE pulse, 3(2):42–8, March 2010. [25] Susumu Mori and Jiangyang Zhang. Principles of diffusion tensor imaging and its applications to basic neuroscience research. Neuron, 51(5):527–39, September 2006. [26] ABIDE. http://fcon 1000.projects.nitrc.org/indi/abide/. [27] S. Sikka, J.˜T. Vogelstein, and M.˜P. Milham. Towards Automated Analysis of Connectomes: The Configurable Pipeline for the Analysis of Connectomes (C-PAC). Neuroinformatics, 2012. [28] Q-H. Zou, C-Z. Zhu, Y. Yang, X-N. Zuo, X-Y. Long, Q-J. Cao, Y-F ˙Wang, and Y-F. Zang. An improved approach to detection of amplitude of low-frequency fluctuation (ALFF) for resting-state fMRI: fractional ALFF. Journal of neuroscience methods, 172(1):137–141, July 2008. [29] J. D. Power, K. A. Barnes, C. J. Stone, and R. A. Olshen. Spurious but systematic correlations in functional connectivity MRI networks arise from subject motion. Neuroimage, 59:2142–2154, 2012. [30] Leo Breiman. Statistical Modeling : The Two Cultures. Statistical Science, 16(3):199–231, 2001. 9
2013
194
4,925
Dirty Statistical Models Eunho Yang Department of Computer Science University of Texas at Austin eunho@cs.utexas.edu Pradeep Ravikumar Department of Computer Science University of Texas at Austin pradeepr@cs.utexas.edu Abstract We provide a unified framework for the high-dimensional analysis of “superposition-structured” or “dirty” statistical models: where the model parameters are a superposition of structurally constrained parameters. We allow for any number and types of structures, and any statistical model. We consider the general class of M-estimators that minimize the sum of any loss function, and an instance of what we call a “hybrid” regularization, that is the infimal convolution of weighted regularization functions, one for each structural component. We provide corollaries showcasing our unified framework for varied statistical models such as linear regression, multiple regression and principal component analysis, over varied superposition structures. 1 Introduction High-dimensional statistical models have been the subject of considerable focus over the past decade, both theoretically as well as in practice. In these high-dimensional models, the ambient dimension of the problem p may be of the same order as, or even substantially larger than the sample size n. It has now become well understood that even in this type of high-dimensional p ≫n scaling, it is possible to obtain statistically consistent estimators provided one imposes structural constraints on the statistical models. Examples of such structural constraints include sparsity constraints (e.g. compressed sensing), graph-structure (for graphical model estimation), low-rank structure (for matrix-structured problems), and sparse additive structure (for non-parametric models), among others. For each of these structural constraints, a large body of work have proposed and analyzed statistically consistent estimators. For instance, a key subclass leverage such structural constraints via specific regularization functions. Examples include `1-regularization for sparse models, nuclear norm regularization for low-rank matrix-structured models, and so on. A caveat to this strong line of work is that imposing such “clean” structural constraints such as sparsity or low-rank structure, is typically too stringent for real-world messy data. What if the parameters are not exactly sparse, or not exactly low rank? Indeed, over the last couple of years, there has been an emerging line of work that address this caveat by “mixing and matching” different structures. Chandrasekaran et al. [5] consider the problem of recovering an unknown low-rank and an unknown sparse matrix, given the sum of the two matrices; for which they point to applications in system identification in linear time-invariant systems, and optical imaging systems among others. Chandrasekaran et al. [6] also apply this matrix decomposition estimation to the learning of latentvariable Gaussian graphical models, where they estimate an inverse covariance matrix that is the sum of sparse and low-rank matrices. A number of papers have applied such decomposition estimation to robust principal component analysis: Cand`es et al. [3] learn a covariance matrix that is the sum of a low-rank factored matrix and a sparse “error/outlier” matrix, while [9, 15] learn a covariance matrix that is the sum of a low-rank matrix and a column-sparse error matrix. Hsu et al. [7] analyze this estimation of a sum of a low-rank and elementwise sparse matrix in the noisy setting; while Agarwal et al. [1] extend this to the sum of a low-rank matrix and a matrix with general structure. Another application is multi-task learning, where [8] learn a multiple-linear-regression coefficient 1 matrix that is the sum of a sparse and a block-sparse matrix. This strong line of work can be seen to follow the resume of estimating a superposition of two structures; and indeed their results show this simple extension provides a vast increase in the practical applicability of structurally constrained models. The statistical guarantees in these papers for the corresponding M-estimators typically require fairly extensive technical arguments that extend the analyses of specific single-structured regularized estimators in highly non-trivial ways. This long-line of work above on M-estimators and analyses for specific pairs of super-position structures for specific statistical models, lead to the question: is there a unified framework for studying any general tuple (i.e. not just a pair) of structures, for any general statistical model? This is precisely the focus of this paper: we provide a unified framework of “superposition-structured” or “dirty” statistical models, with any number and any types of structures, for any statistical model. By such “superposition-structure,” we mean the constraint that the parameter be a superposition of “clean” structurally constrained parameters. In addition to the motivation above, of unifying the burgeoning list of works above, as well as to provide guarantees for many novel superpositions (of for instance more than two structures) not yet considered in the literature; another key motivation is to provide insights on the key ingredients characterizing the statistical guarantees for such dirty statistical models. Our unified analysis allows the following very general class of M-estimators, which are the sum of any loss function, and an instance of what we call a “hybrid” regularization function, that is the infimal convolution of any weighted regularization functions, one for each structural component. As we show, this is equivalent to an M-estimator that is the sum of (a) a loss function applied to the sum of the multiple parameter vectors, one corresponding to each structural component; and (b) a weighted sum of regularization functions, one for each of the parameter vectors. We stress that our analysis allows for general loss functions, and general component regularization functions. We provide corollaries showcasing our unified framework for varied statistical models such as linear regression, multiple regression and principal component analysis, over varied superposition structures. 2 Problem Setup We consider the following general statistical modeling setting. Consider a random variable Z with distribution P, and suppose we are given n observations Zn 1 := {Z1, . . . , Zn} drawn i.i.d. from P. We are interested in estimating some parameter ✓⇤2 Rp of the distribution P. We assume that the statistical model parameter ✓⇤is “superposition-structured,” so that it is the sum of parameter components, each of which is constrained by a specific structure. For a formalization of the notion of structure, we first review some terminology from [11]. There, they use subspace pairs (M, M ?), where M ✓M, to capture any structured parameter. M is the model subspace that captures the constraints imposed on the model parameter, and is typically low-dimensional. M ? is the perturbation subspace of parameters that represents perturbations away from the model subspace. They also define the property of decomposability of a regularization function, which captures the suitablity of a regularization function R to particular structure. Specifically, a regularization function R is said to be decomposable with respect to a subspace pair (M, M ?), if R(u + v) = R(u) + R(v), for all u 2 M, v 2 M ?. For any structure such as sparsity, low-rank, etc., we can define the corresponding low-dimensional model subspaces, as well as regularization functions that are decomposable with respect to the corresponding subspace pairs. I. Sparse vectors. Given any subset S ✓{1, . . . , p} of the coordinates, let M(S) be the subspace of vectors in Rp that have support contained in S. It can be seen that any parameter ✓2 M(S) would be atmost |S|-sparse. For this case, we use M(S) = M(S), so that M ?(S) = M?(S). As shown in [11], the `1 norm R(✓) = k✓k1, commonly used as a sparsity-encouraging regularization function, is decomposable with respect to subspace pairs (M(S), M ?(S)). II. Low-rank matrices. Consider the class of matrices ⇥2 Rk⇥m that have rank r min{k, m}. For any given matrix ⇥, we let row(⇥) ✓Rm and col(⇥) ✓Rk denote its row space and column space respectively. For a given pair of r-dimensional subspaces U ✓Rk and V ✓Rm, we define the subspace pairs as follows: M(U, V ) := ! ⇥2 Rk⇥m | row(⇥) ✓V, col(⇥) ✓U and 2 M ?(U, V ) := ! ⇥2 Rk⇥m | row(⇥) ✓V ?, col(⇥) ✓U ? . As [11] show, the nuclear norm R(✓) = |||✓|||1 is decomposable with respect to the subspace pairs (M(U, V ), M ?(U, V )). In our dirty statistical model setting, we do not just have one, but a set of structures; suppose we index them by the set I. Our key structural constraint can then be stated as: ✓⇤= P ↵2I ✓⇤ ↵, where ✓⇤ ↵is a “clean” structured parameter with respect to a subspace pair (M↵, M ? ↵), for M↵✓M↵. We also assume we are given a set of regularization functions R↵(·), for ↵2 I that are suited to the respective structures, in the sense that they are decomposable with respect to the subspace pairs (M↵, M ? ↵). Let L : ⌦⇥Zn 7! R be some loss function that assigns a cost to any parameter ✓2 ⌦✓Rp, for a given set of observations Zn 1 . For ease of notation, in the sequel, we adopt the shorthand L(✓) for L(✓; Zn 1 ). We are interested in the following “super-position” estimator: min (✓↵)↵2I L ⇣X ↵2I ✓↵ ⌘ + X ↵2I λ↵R↵(✓↵), (1) where (λ↵)↵2I are the regularization penalties. This optimization problem involves not just one parameter vector, but multiple parameter vectors, one for each structural component: while the loss function applies only to the sum of these, separate regularization functions are applied to the corresponding parameter vectors. We will now see that this can be re-written to a standard Mestimation problem which minimizes, over a single parameter vector, the sum of a loss function and a special “dirty” regularization function. Given a vector c := (c↵)↵2I of convex-combination weights, suppose we define the following “dirty” regularization function, that is the infimal convolution of a set of regularization functions: R(✓; c) = inf n X ↵2I c↵R↵(✓↵) : X ↵2I ✓↵= ✓ o . (2) It can be shown that provided the individual regularization functions R↵(·), for ↵2 I, are norms, R(·; c) is a norm as well. We discuss this and other properties of this hybrid regularization function R(·; c) in Appendix A. Proposition 1. Suppose (b✓↵)↵2I is the solution to the M-estimation problem in (1). Then b✓:= P ↵2I b✓↵is the solution to the following problem: min ✓2⌦L(✓) + λR(✓; c), (3) where c↵= λ↵/λ. Similarly, if b✓is the solution to (3), then there is a solution (b✓↵)↵2I to the M-estimation problem (1), such that b✓:= P ↵2I b✓↵. Proposition 1 shows that the optimization problems (1) and (3) are equivalent. While the tuning parameters in (1) correspond to the regularization penalties (λ↵)↵2I, the tuning parameters in (3) correspond to the weights (c↵)↵2I specifying the “dirty” regularization function. In our unified analysis theorem, we will provide guidance on setting these tuning parameters as a function of various model-parameters. 3 Error Bounds for Convex M-estimators Our goal is to provide error bounds kb✓−✓⇤k, between the target parameter ✓⇤, the minimizer of the population risk, and our M-estimate b✓from (1), for any error norm k · k. A common example of an error norm for instance is the `2 norm k · k2. We now turn to the properties of the loss function and regularization function that underlie our analysis. We first restate some natural assumptions on the loss and regularization functions. (C1) The loss function L is convex and differentiable. (C2) The regularizers R↵are norms, and are decomposable with respect to the subspace pairs (M↵, M ? ↵), where M↵✓M↵. 3 Our next assumption is a restricted strong convexity assumption [11]. Specifically, we will require the loss function L to satisfy: (C3) (Restricted Strong Convexity) For all ∆↵2 ⌦↵, where ⌦↵is the parameter space for the parameter component ↵, δL(∆↵; ✓⇤) := L(✓⇤+ ∆↵) −L(✓⇤) − ⌦ r✓L(✓⇤), ∆↵ ↵ ≥Lk∆↵k2 −g↵R2 ↵(∆↵), where L is a “curvature” parameter, and g↵R2 ↵(∆↵) is a “tolerance” parameter. Note that these conditions (C1)-(C3) are imposed even when the model has a single clean structural constraint; see [11]. Note that g↵is usually a function on the problem size decreasing in the sample size; in the standard Lasso with |I| = 1 for instance, g↵= log p n . Our next assumption is on the interaction between the different structured components. (C4) (Structural Incoherence) For all ∆↵2 ⌦↵, ,,,L ✓⇤+ X ↵2I ∆↵ . + (|I| −1)L(✓⇤) − X ↵2I L ✓⇤+ ∆↵ .,,, L 2 X ↵2I k∆↵k2 + X ↵2I h↵R2 ↵(∆↵). Note that for a model with a single clean structural constraint, with |I| = 1, the condition (C4) is trivially satisfied since the LHS becomes 0. We will see in the sequel that for a large collection of loss functions including all linear loss functions, the condition (C4) simplifies considerably, and moreover holds with high probability, typically with h↵= 0. We note that this condition is much weaker than “incoherence” conditions typically imposed when analyzing specific instances of such superposition-structured models (see e.g. references in the introduction), where the assumptions typically include (a) assuming that the structured subspaces (M↵)↵2I intersect only at {0}, and (b) that the sizes of these subspaces are extremely small. Finally, we will use the notion of subspace compatibility constant defined in [11], that captures the relationship between the regularization function R(·) and the error norm k · k, over vectors in the subspace M: (M, k · k) := supu2M\{0} R kuk. Theorem 1. Suppose we solve the M-estimation problem in (3), with hybrid regularization R(·; c), where the convex-combination weights c are set as c↵= λ↵/ P ↵2I λ↵, with λ↵≥ 2R⇤ ↵ r✓↵L(✓⇤; Zn 1 ) . . Further, suppose conditions (C1) - (C4) are satisfied. Then, the parameter error bounds are given as: kb✓−✓⇤k  ✓3|I| 2¯ ◆ max ↵2I λ↵ ↵(M↵) + (|I|p⌧L/ p ¯), where ¯:= L 2 −32¯g2|I| ⇣ max ↵2I λ↵ ↵(M↵) ⌘2 , ¯g := max ↵ 1 λ↵ p g↵+ h↵, ⌧L := X ↵2I h 32¯g2λ2 ↵R2 ↵ ⇧M? ↵(✓⇤ ↵) . + 2λ↵ |I| R↵ ⇧M? ↵(✓⇤ ↵) .i . Remarks: (R1) It is instructive to compare Theorem 1 to the main Theorem in [11], where they derive parameter error bounds for any M-estimator with a decomposable regularizer, for any “clean” structure. Our theorem can be viewed as a generalization: we recover their theorem when we have a single structure with |I| = 1. We cannot derive our result in turn from their theorem applied to the M-estimator (3) with the hybrid regularization function R(·; c): the “superposition” structure is not captured by a pair of subspaces, nor is the hybrid regularization function decomposable, as is required by their theorem. Our setting as well as analysis is strictly more general, because of which we needed the additional structural incoherence assumption (C4) (which is trivially satisfied when |I| = 1). (R2) Agarwal et al. [1] provide Frobenius norm error bounds for the matrix-decomposition problem of recovering the sum of low-rank and a general structured matrix. In addition to the greater generality of our theorem and framework, Theorem 1 addresses two key drawbacks of their theorem even in their specific setting. First, the proof for their theorem requires the regularization 4 penalty λ for the second structure to be strongly bounded away from zero: their convergence rate does not approach zero even with infinite number of samples n. Theorem 1, in contrast, imposes the weaker condition λ↵≥2R⇤ ↵ r✓↵L(✓⇤; Zn 1 ) . , which as we show in the corollaries, allows for the convergence rates to go to zero as a function of the samples. Second, they assumed much stronger conditions for their theorem to hold; in Theorem 1 in contrast, we pose much milder “local” RSC conditions (C3), and a structural incoherence condition (C4). (R3) The statement in the theorem is deterministic for fixed choices of (λ↵). We also note that the theorem holds for any set of subspace pairs (M↵, M ? ↵)↵2I with respect to which the corresponding regularizers are decomposable. As noted earlier, the M↵should ideally be set to the structured subspace in which the true parameter at least approximately lies, and which we want to be as small as possible (note that the bound includes a term that depends on the size of this subspace via the subspace compatibility constant). In particular, if we assume that the subspaces are chosen so that ⇧M? ↵(✓⇤ ↵) = 0 i.e. ✓⇤ ↵2 M↵, then we obtain the simpler bound in the following corollary. Corollary 1. Suppose we solve the M-estimation problem in (1), with hybrid regularization R(·; c), where the convex-combination weights c are set as c↵= λ↵/ P ↵2I λ↵, with λ↵≥ 2R⇤ ↵ r✓↵L(✓⇤; Zn 1 ) . , and suppose conditions (C1) - (C4) are satisfied. Further, suppose that the subspace-pairs are chosen so that ✓⇤ ↵2 M↵. Then, the parameter error bounds are given as: kb✓−✓⇤k  ✓3|I| 2¯ ◆ max ↵2I λ↵ ↵(M↵). It is now instructive to compare the bounds of Theorem 1, and Corollary 1. Theorem 1 has two terms: the first of which is the sole term in the bound in Corollary 1. This first term can be thought of as the “estimation error” component of the error bound, when the parameter has exactly the structure being modeled by the regularizers. The second term can be thought of as the “approximation error” component of the error bound, which is the penalty for the parameter not exactly lying in the structured subspaces modeled by the regularizers. The key term in the “estimation error” component, in Theorem 1, and Corollary 1, is: Φ = max ↵2I λ↵ ↵(M↵). Note that each λ↵is larger than a particular norm of the sample score function (gradient of the loss at the true parameter): since the expected value of the score function is zero, the magnitude of the sample score function captures the amount of “noise” in the data. This is in turn scaled by ↵(M↵), which captures the size of the structured subspace corresponding to the parameter component ✓⇤ ↵. Φ can thus be thought of as capturing the amount of noise in the data relative to the particular structure at hand. We now provide corollaries showcasing our unified framework for varied statistical models such as linear regression, multiple regression and principal component analysis, over varied superposition structures. 4 Convergence Rates for Linear Regression In this section, we consider the linear regression model: Y = X✓⇤+ w, (4) where Y 2 Rn is the observation vector, and ✓⇤2 Rp is the true parameter. X 2 Rn⇥p is the “observation” matrix; while w 2 Rn is the observation noise. For this class of statistical models, we will consider the instantiation of (1) with the loss function L consisting of the squared loss: min (✓↵)↵2I ( 1 n 555Y −X - X ↵2I ✓↵ .555 2 2 + X ↵2I λ↵R↵(✓↵) ) . (5) For this regularized least squared estimator (5), conditions (C1-C2) in Theorem 1 trivially hold. The restricted strong convexity condition (C3) reduces to the following. Noting that L(✓⇤+ ∆↵) − L(✓⇤) −hr✓L(✓⇤), ∆↵i = 1 nkX∆↵k2 2, we obtain the following restricted eigenvalue condition: 5 (D3) 1 nkX∆↵k2 2 ≥Lk∆↵k2 −g↵R2 ↵(∆↵) for all ∆↵2 ⌦↵. Finally, our structural incoherence condition reduces to the following: Noting that ,,L(✓⇤+ P ↵2I ∆↵) + (|I| −1)L(✓⇤) −P ↵2I L(✓⇤+ ∆↵) ,, = 2 n ,, P ↵<βhX∆↵, X∆βi ,, in this specific case, (D4) 2 n ,, P ↵<βhX∆↵, X∆βi ,, L 2 P ↵2I k∆↵k2 + P ↵2I h↵R2 ↵(∆↵). 4.1 Structural Incoherence with Gaussian Design We now show that the condition (D4) required for Theorem 1, holds with high probability when the observation matrix is drawn from a so-called ⌃-Gaussian ensemble: where each row Xi is independently sampled from N(0, ⌃). Before doing so, we first state some assumption on the population covariance matrix ⌃. Let PM denote the matrix corresponding to the projection operator for the subspace M. We will then require the following assumption: (C-Linear) Let ⇤:= maxγ1,γ2 n 2 + 3λγ1 γ1( ¯ Mγ1) λγ2 γ2( ¯ Mγ2) o . For any ↵, β 2 I, max n σmax ⇣ P ¯ M↵⌃P ¯ Mβ ⌘ , σmax ⇣ P ¯ M↵⌃P ¯ M? β ⌘ , σmax ⇣ P ¯ M? ↵⌃P ¯ M? β ⌘o  L 8 -|I| 2 . ⇤2|I| . (6) Proposition 2. Suppose each row Xi of the observation matrix X is independently sampled from N(0, ⌃), and the condition (C-Linear) (6) holds. Further, suppose that ⇧M? ↵(✓⇤ ↵) = 0, for all ↵2 I. Then, it holds that with probability at least 1 − 4 max{n,p}, 2 n ,, X ↵<β hX∆↵, X∆βi ,, L 2 X ↵ k∆↵k2 2, when the number of samples scales as n ≥c ⇣( |I| 2 )⇤2|I| L ⌘2max↵ ↵(M↵)2 + max{log p, log n} . , for some constant c that depends only on the distribution of X. Condition (D3) is the usual restricted eigenvalue condition which has been analyzed previously in “clean-structured” model estimation, so that we can directly appeal to previous results [10, 12] to show that it holds with high probability when the observation matrix is drawn from the ⌃-Gaussian ensemble. We are now ready to derive the consequences of the deterministic bound in Theorem 1 for the case of the linear regression model above. 4.2 Linear Regression with Sparse and Group-sparse structures We now consider the following superposition structure, comprised of both sparse and group-sparse structures. Suppose that a set of groups G = {G1, G2, . . . , Gq} are disjoint subsets of the indexset {1, . . . , p}, each of size at most |Gi| m. Suppose that the linear regression parameter ✓⇤is a superposition of a group-sparse component ✓⇤ g with respect to this set of groups G, as well as a sparse component ✓⇤ s with respect to the remaining indices {1, . . . , p}\[q i=1Gi, so that ✓⇤= ✓⇤ g+✓⇤ s. Then, we use the hybrid regularization function P ↵2I λ↵R↵(✓↵) = λsk✓sk1 + λgk✓gk1,a where k✓k1,a := Pq t=1 k✓Gtka for a ≥2. Corollary 2. Consider the linear model (4) where ✓⇤is the sum of exact s-sparse ✓⇤ s and exact sg group-sparse ✓⇤ g. Suppose that each row Xi of the observation matrix X is independently sampled from N(0, ⌃). Further, suppose that (6) holds and w is sub-Gaussian with parameter σ. Then, if we solve (5) with λs = 8σ r log p n and λg = 8σ ⇢m1−1/a pn + r log q n 9 , then, with probability at least 1 −c1 exp(−c2nλ2 s) −c3/q2, we have the error bound: kb✓−✓⇤k2 24σ ¯ max ⇢r s log p n , psgm1−1/a pn + r sg log q n 9 . 6 Let us briefly compare the result from Corollary 2 with those from single-structured regularized estimators. Since the total sparsity of ✓⇤is bounded by k✓k0 msg + s, “clean” `1 regularized least squares, with high probability, gives the bound [11]: kb✓`1 −✓⇤k2 = O ✓q (msg+s) log p n ◆ . On the other hand, the support of ✓⇤also can be interpreted as comprising sg + s disjoint groups in the worst case, so that “clean” `1/`2 group regularization entails, with high probability, the bound [11]: kb✓`1/`2 −✓⇤k2 = O ✓q (sg+s)m n + q (sg+s) log q n ◆ . We can easily verify that Corollary 2 achieves better bounds, considering the fact p mq. 5 Convergence Rates for Multiple Regression In this section, we consider the multiple linear regression model, with m linear regressions written jointly as Y = X⇥⇤+ W, (7) where Y 2 Rn⇥m is the observation matrix: with each column corresponding to a separate linear regression task, and ⇥⇤2 Rp⇥m is the collated set of parameters. X 2 Rn⇥p is the “observation” matrix; while W 2 Rn⇥m is collated set of observation noise vectors. For this class of statistical models, we will consider the instantiation of (1) with the loss function L consisting of the squared loss: min (⇥↵)↵2I n 1 n|||Y −X - X ↵2I ⇥↵ . |||2 F + X ↵2I λ↵R↵(⇥↵) o . (8) In contrast to the linear regression model in the previous section, the model (7) has a matrixstructured parameter; nonetheless conditions (C3-C4) in Theorem 1 reduce to the following conditions that are very similar to those in the previous section, with the Frobenius norm replacing the `2 norm: (D3) 1 n|||X∆↵|||2 F ≥Lk∆↵k2 −g↵R2 ↵(∆↵) for all ∆↵2 ⌦↵. (D4) 2 n ,, P ↵<βhhX∆↵, X∆βii ,, L 2 P ↵2I k∆↵k2 + P ↵2I h↵R2 ↵(∆↵). where the notation hhA, Bii denotes the trace inner product, trace(A>B) = P i P j AijBij. As in the previous linear regression example, we again impose the assumption (C-Linear) on the population covariance matrix of a ⌃-Gaussian ensemble, but in this case with the notational change of P ¯ M↵denoting the matrix corresponding to projection operator onto the row-spaces of matrices in ¯ M↵. Thus, with the low-rank matrix structure discussed in Section 2, we would have P ¯ M↵= UU >. Under the (C-Linear) assumption, the following proposition then extends Proposition 2: Proposition 3. Consider the problem (8) with the matrix parameter ⇥. Under the same assumptions as in Proposition 2, we have with probability at least 1 − 4 max{n,p}, 2 n ,, X ↵<β hhX∆↵, X∆βii ,, L 2 X ↵ |||∆↵|||2 F . Consider an instance of this multiple linear regression model with the superposition structure consisting of row-sparse, column-sparse and elementwise sparse matrices: ⇥⇤= ⇥⇤ r+⇥⇤ c+⇥⇤ s. In order to obtain estimators for this model, we use the hybrid regularization function P ↵2I λ↵R↵(✓↵) = λrk⇥rkr,a + λck⇥ckc,a + λsk⇥sk1 where k · kr,a denotes the sum of `a norm of rows for a ≥2, and similarly k · kc,a is the sum of `a norm of columns, and k · k1 is entrywise `1 norm for matrix. Corollary 3. Consider the multiple linear regression model (7) where ⇥⇤is the sum of ⇥⇤ r with sr nonzero rows, ⇥⇤ c with sc nonzero columns, and ⇥⇤ s with s nonzero elements. Suppose that the design matrix X is ⌃-Gaussian ensemble with the properties of column normalization and σmax(X) pn. Further, suppose that (6) holds and W is elementwise sub-Gaussian with parameter σ. Then, if we solve (8) with λs = 8σ r log p + log m n , λr = 8σ nm1−1/a pn + r log p n o , and λc = 8σ np1−1/a pn + r log m n o , 7 with probability at least 1 −c1 exp(−c2nλ2 s) −c3 p2 −c3 m2 , the error of the estimate b⇥is bounded as: kb⇥−⇥⇤k2 36σ ¯ max ⇢r s(log p + log m) n , psrm1−1/a pn + r sr log p n , pscp1−1/a pn + r sc log m n $ . 6 Convergence Rates for Principal Component Analysis In this section, we consider the robust/noisy principal component analysis problem, where we are given n i.i.d. random vectors Zi 2 Rp where Zi = Ui + vi. Ui ⇠N(0, ⇥⇤) is the “uncorrupted” set of observations, with a low-rank covariance matrix ⇥⇤= LLT , for some loading matrix L 2 Rp⇥r. vi 2 Rp is a noise/error vector; in standard factor analysis, vi is a spherical Gaussian noise vector: vi ⇠N(0, σ2Ip⇥p) (or vi = 0); and the goal is to recover the loading matrix L from samples. In PCA with sparse noise, vi ⇠N(0, Γ⇤), where Γ⇤is elementwise sparse. In this case, the covariance matrix of Zi has the form ⌃= ⇥⇤+ Γ⇤, where ⇥⇤is low-rank, and Γ⇤is sparse. We can thus write the sample covariance model as: Y := 1 n Pn i=1 ZiZT i = ⇥⇤+ Γ⇤+ W, where W 2 Rp⇥p is a Wishart distributed random matrix. For this class of statistical models, we will consider the following instantiation of (1): min (⇥,Γ) ! |||Y −⇥−Γ|||2 F + λ⇥|||⇥|||1 + λΓkΓk1 . (9) where ||| · |||1 denotes the nuclear norm while k · k1 does the element-wise `1 norm (we will use ||| · |||2 for the spectral norm.). In contrast to the previous two examples, (9) includes a trivial design matrix, X = Ip⇥p, which allows (D4) to hold under the simpler (C-linear) condition: where ⇤is maxγ1,γ2 n 2+ 3λγ1 γ1( ¯ Mγ1) λγ2 γ2( ¯ Mγ2) o , max n σmax ⇣ P ¯ M⇥P ¯ MΓ ⌘ , σmax ⇣ P ¯ M⇥P ¯ M? Γ ⌘ , σmax ⇣ P ¯ M? ⇥P ¯ MΓ ⌘ , σmax ⇣ P ¯ M? ⇥P ¯ M? Γ ⌘o  1 16⇤2 . (10) Corollary 4. Consider the principal component analysis model where ⇥⇤has the rank r at most and Γ⇤has s nonzero entries. Suppose that (10) holds. Then, given the choice of λ⇥= 16 p |||⌃|||2 r p n, λΓ = 32⇢(⌃) r log p n , where ⇢(⌃) = maxj ⌃jj, the optimal error of (9) is bounded by kb⇥−⇥⇤k2 48 ¯max ⇢p |||⌃|||2 r rp n , 2⇢(⌃) r s log p n $ , with probability at least 1 −c1 exp(−c2 log p). Remarks. Agarwal et al. [1] also analyze this model, and propose to use the M-estimator in (9), with the additional constraint of k⇥k1  ↵ p . Under a stricter “global” RSC condition, they compute the error bound kb⇥−⇥⇤k2 ⇣max{ p |||⌃|||2 p rp n , ⇢(⌃) q s log p n + ↵ p } where ↵is a parameter between 1 and p. This bound is similar to that in Corollary 4, but with an additional term ↵ p , so that it does not go to zero as a function of n. It also faces a trade-off: a smaller value of ↵to reduce error bound would make the assumption on the maximum element of ⇥⇤ stronger as well. Our corollaries do not suffer these lacunae; see also our remarks in (R2) in Theorem 1. [14] extended the result of [1] to the special case where ⇥⇤= ⇥⇤ r + ⇥⇤ s using the notation of the previous section; the remarks above also apply here. Note that our work and [1] derive Frobenius error bounds under restricted strong convexity conditions; other recent works such as [7] also derive such Frobenius error bounds but under stronger conditions (see [1] for details). Acknowledgments We acknowledge the support of ARO via W911NF-12-1-0390 and NSF via IIS-1149803, DMS1264033. 8 References [1] A. Agarwal, S. Negahban, and M. J. Wainwright. Noisy matrix decomposition via convex relaxation: Optimal rates in high dimensions. Annals of Statistics, 40(2):1171–1197, 2012. [2] E. J. Cand`es, J. K. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Communications on Pure and Applied Mathematics, 59(8):1207–1223, 2006. [3] E. J. Cand`es, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? Journal of the ACM, 58(3), May 2011. [4] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. In 48th Annual Allerton Conference on Communication, Control and Computing, 2010. [5] V. Chandrasekaran, S. Sanghavi, P. A. Parrilo, and A. S. Willsky. Rank-sparsity incoherence for matrix decomposition. SIAM Journal on Optimization, 21(2), 2011. [6] V. Chandrasekaran, P. A. Parrilo, and A. S. Willsky. Latent variable graphical model selection via convex optimization. Annals of Statistics (with discussion), 40(4), 2012. [7] D. Hsu, S. M. Kakade, and T. Zhang. Robust matrix decomposition with sparse corruptions. IEEE Trans. Inform. Theory, 57:7221–7234, 2011. [8] A. Jalali, P. Ravikumar, S. Sanghavi, and C. Ruan. A dirty model for multi-task learning. In Neur. Info. Proc. Sys. (NIPS), 23, 2010. [9] M. McCoy and J. A. Tropp. Two proposals for robust pca using semidefinite programming. Electron. J. Statist., 5:1123–1160, 2011. [10] S. Negahban and M. J. Wainwright. Estimation of (near) low-rank matrices with noise and high-dimensional scaling. Annals of Statistics, 39(2):1069–1097, 2011. [11] S. Negahban, P. Ravikumar, M. J. Wainwright, and B. Yu. A unified framework for highdimensional analysis of M-estimators with decomposable regularizers. Statistical Science, 27 (4):538–557, 2012. [12] G. Raskutti, M. J. Wainwright, and B. Yu. Restricted eigenvalue properties for correlated gaussian designs. Journal of Machine Learning Research (JMLR), 99:2241–2259, 2010. [13] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. In Compressed Sensing: Theory and Applications. Cambridge University Press, 2012. [14] H. Xu and C. Leng. Robust multi-task regression with grossly corrupted observations. Inter. Conf. on AI and Statistics (AISTATS), 2012. [15] H. Xu, C. Caramanis, and S. Sanghavi. Robust pca via outlier pursuit. IEEE Transactions on Information Theory, 58(5):3047–3064, 2012. 9
2013
195
4,926
Online Learning of Nonparametric Mixture Models via Sequential Variational Approximation Dahua Lin Toyota Technological Institute at Chicago dhlin@ttic.edu Abstract Reliance on computationally expensive algorithms for inference has been limiting the use of Bayesian nonparametric models in large scale applications. To tackle this problem, we propose a Bayesian learning algorithm for DP mixture models. Instead of following the conventional paradigm – random initialization plus iterative update, we take an progressive approach. Starting with a given prior, our method recursively transforms it into an approximate posterior through sequential variational approximation. In this process, new components will be incorporated on the fly when needed. The algorithm can reliably estimate a DP mixture model in one pass, making it particularly suited for applications with massive data. Experiments on both synthetic data and real datasets demonstrate remarkable improvement on efficiency – orders of magnitude speed-up compared to the state-of-the-art. 1 Introduction Bayesian nonparametric mixture models [7] provide an important framework to describe complex data. In this family of models, Dirichlet process mixture models (DPMM) [1, 15, 18] are among the most popular in practice. As opposed to traditional parametric models, DPMM allows the number of components to vary during inference, thus providing great flexibility for explorative analysis. Nonetheless, the use of DPMM in practical applications, especially those with massive data, has been limited due to high computational cost. MCMC sampling [12, 14] is the conventional approach to Bayesian nonparametric estimation. With heavy reliance on local updates to explore the solution space, they often show slow mixing, especially on large datasets. Whereas the use of splitmerge moves and data-driven proposals [9,17,20] has substantially improved the mixing performance, MCMC methods still require many passes over a dataset to reach the equilibrium distribution. Variational inference [4, 11, 19, 22], an alternative approach based on mean field approximation, has become increasingly popular recently due to better run-time performance. Typical variational methods for nonparametric mixture models rely on a truncated approximation of the stick breaking construction [16], which requires a fixed number of components to be maintained and iteratively updated during inference. The truncation level are usually set conservatively to ensure approximation accuracy, incurring considerable amount of unnecessary computation. The era of Big Data presents new challenges for machine learning research. Many real world applications involve massive amount of data that even cannot be accommodated entirely in the memory. Both MCMC sampling and variational inference maintain the entire configuration and perform iterative updates of multiple passes, which are often too expensive for large scale applications. This challenge motivated us to develop a new learning method for Bayesian nonparametric models that can handle massive data efficiently. In this paper, we propose an online Bayesian learning algorithm for generic DP mixture models. This algorithm does not require random initialization of components. Instead, it begins with the prior DP(αµ) and progressively transforms it into an approximate posterior of the mixtures, with new components introduced on the fly as needed. Based on a new way of variational approximation, the algorithm proceeds sequentially, taking in one sample at a time to make the 1 update. We also devise specific steps to prune redundant components and merge similar ones, thus further improving the performance. We tested the proposed method on synthetic data as well as two real applications: modeling image patches and clustering documents. Results show empirically that the proposed algorithm can reliably estimate a DP mixture model in a single pass over large datasets. 2 Related Work Recent years witness lots of efforts devoted to developing efficient learning algorithms for Bayesian nonparametric models. A n important line of research is to accelerate the mixing in MCMC through better proposals. Jain and Neal [17] proposed to use split-merge moves to avoid being trapped in local modes. Dahl [6] developed the sequentially allocated sampler, where splits are proposed by sequentially allocating observations to one of two split components through sequential importance sampling. This method was recently extended for HDP [20] and BP-HMM [9]. There has also been substantial advancement in variational inference. A significant development along is line is the Stochastic Variational Inference, a framework that incorporates stochastic optimization with variational inference [8]. Wang et al. [23] extended this framework to the non-parametric realm, and developed an online learning algorithm for HDP [18]. Wang and Blei [21] also proposed a truncation-free variational inference method for generic BNP models, where a sampling step is used for updating atom assignment that allows new atoms to be created on the fly. Bryant and Sudderth [5] recently developed an online variational inference algorithm for HDP, using mini-batch to handle streaming data and split-merge moves to adapt truncation levels. They tried to tackle the problem of online BNP learning as we do, but via a different approach. First, we propose a generic method while they focuses on topic models. The designs are also different – our method starts from scratch and progressively adds new components. Its overall complexity is O(nK), where n and K are number of samples and expected number of components. Bryant’s method begins with random initialization and relies on splits over mini-batch to create new topics, resulting in the complexity of O(nKT), where T is the number of iterations for each mini-batch. The differences stem from the theoretical basis – our method uses sequential approximation based on the predictive law, while theirs is an extension of the standard truncation-based model. Nott et al. [13] recently proposed a method, called VSUGS, for fast estimation of DP mixture models. Similar to our algorithm, the VSUGS method proposed takes a sequential updating approach, but relies on a different approximation. Particularly, what we approximate is a joint posterior over both data allocation and model parameters, while VSUGS is based on the approximating the posterior of data allocation. Also, VSUGS requires fixing a truncation level T in advance, which may lead to difficulties in practice (especially for large data). Our algorithm provides a way to tackle this, and no longer requires fixed truncation. 3 Nonparametric Mixture Models This section provide a brief review of Dirichlet Process Mixture Model – one of the most widely used nonparametric mixture models. A Dirichlet Process (DP), typically denoted by DP(αµ) is characterized by a concentration parameter α and a base distribution µ. It has been shown that sample paths of a DP are almost surely discrete [16], and can be expressed as D = ∞ X k=1 πkδφk, with πk = vk k−1 Y l=1 vl, vk ∼Beta(1, αk), ∀k = 1, 2, . . . . (1) This is often referred to as the stick breaking representation, and φk is called an atom. Since an atom can be repeatedly generated from D with positive probability, the number of distinct atoms is usually less than the number of samples. The Dirichlet Process Mixture Model (DPMM) exploits this property, and uses a DP sample as the prior of component parameters. Below is a formal definition: D ∼DP(αµ), θi ∼µ, xi ∼F(·|θi), ∀i = 1, . . . , n. (2) Consider a partition {C1, . . . , CK} of {1, . . . , n} such that θi are identical for all i ∈Ck, which we denote by φk. Instead of maintaining θi explicitly, we introduce an indicator zi for each i with 2 θi = φzi. Using this clustering notation, this formulation can be rewritten equivalently as follows: z1:n ∼CRP(α), φk ∼µ, ∀k = 1, 2, . . . K xi ∼F(·|φzi), ∀i = 1, 2, . . . , n. (3) Here, CRP(α) denotes a Chinese Restaurant Prior, which is a distribution over exchangeable partitions. Its probability mass function is given by pCRP (z1:n|α) = Γ(α)αK Γ(α + n) K Y k=1 Γ(|Ck|). (4) 4 Variational Approximation of Posterior Generally, there are two approaches to learning a mixture model from observed data, namely Maximum likelihood estimation (MLE) and Bayesian learning. Specifically, maximum likelihood estimation seeks an optimal point estimate of ν, while Bayesian learning aims to derive the posterior distribution over the mixtures. Bayesian learning takes into account the uncertainty about ν, often resulting in better generalization performance than MLE. In this paper, we focus on Bayesian learning. In particular, for DPMM, the predictive distribution of component parameters, conditioned on a set of observed samples x1:n, is given by p(θ′|x1:n) = ED|x1:n [p(θ′|D)] . (5) Here, ED|x1:n takes the expectation w.r.t. p(D|x1:n). In this section, we derive a tractable approximation of this predictive distribution based on a detailed analysis of the posterior. 4.1 Posterior Analysis Let D ∼DP(αµ) and θ1, . . . , θn be iid samples from D, {C1, . . . , CK} be a partition of {1, . . . , n} such that θi for all i ∈Ck are identical, and φk = θi ∀i ∈Ck. Then the posterior distribution of D remains a DP, as D|θ1:n ∼DP(˜α˜µ), where ˜α = α + n, and ˜µ = α α + nµ + K X k=1 |Ck| α + nδφk. (6) The atoms are generally unobservable, and therefore it is more interesting in practice to consider the posterior distribution of D given the observed samples. For this purpose, we derive the lemma below that provides a constructive characterization of the posterior distribution given both the observed samples x1:n and the partition z. Lemma 1. Consider the DPMM in Eq.(3). Drawing a sample from the posterior distribution p(D|z1:n, x1:n) is equivalent to constructing a random probability measure as follows β0D′ + K X k=1 βkδφk, with D′ ∼DP(αµ), (β0, β1, . . . , βk) ∼Dir(α, m1, . . . , mK), φk ∼µ|Ck. (7) Here, mk = |Ck|, µ|Ck is a posterior distribution given by i.e. µ|Ck(dθ) ∝µ(dθ) Q i∈Ck F(xi|θ). This lemma immediately follows from the Theorem 2 in [10] as DP is a special case of the socalled Normalized Random Measures with Independent Increments (NRMI). It is worth emphasizing that p(D|x, z) is no longer a Dirichlet process, as the locations of the atoms φ1, . . . , φK are nondeterministic, instead they follow the posterior distributions µ|Ck. By marginalizing out the partition z1:n, we obtain the posterior distribution p(D|x1:n): p(D|x1:n) = X z1:n p(z1:n|x1:n)p(D|x1:n, z1:n). (8) Let {C(z) 1 , . . . , C(z) K } be the partition corresponding to z1:n, we have p(z1:n|x1:n) ∝pCRF (z1:n|α) K(z) Y k=1 Z µ(dφk) Y i∈C(z) k F(xi|φk). (9) 3 4.2 Variational Approximation Computing the predictive distribution based on Eq.(8) requires enumerating all possible partitions, which grow exponentially as n increases. To tackle this difficulty, we resort to variational approximation, that is, to choose a tractable distribution to approximate p(D|x1:n, z1:n). In particular, we consider a family of random probability measures that can be expressed as follows: q(D|ρ, ν) = X z1:n n Y i=1 ρi(zi)q(z) ν (D|z1:n). (10) Here, q(z) ν (D|z1:n) is a stochastic process conditioned on z1:n, defined as q(z) ν (D|z1:n) d∼β0D′ + K X k=1 βkδφk, with D′ ∼DP(αµ), (β0, β1, . . . , βK) ∼Dir(α, m(z) 1 , . . . , m(z) K ), φk ∼νk. (11) Here, we use d∼to indicate that drawing a sample from q(z) ν is equivalent to constructing one according to the right hand side. In addition, m(z) k = |C(z) k | is the cardinality of the k-th cluster w.r.t. z1:n, and νk is a distribution over component parameters that is independent from z. The variational construction in Eq.(10) and (11) is similar to Eq.(7) and (8), except for two significant differences: (1) p(z1:n|x1:n) is replaced by a product distribution Q i ρi(zi), and (2) µ|Ck, which depends on z1:n, is replaced by an independent distribution νk. With this design, zi for different i and φk for different k are independent w.r.t. q, thus resulting in a tractable predictive law below: Let q be a random probability measure given by Eq.(10) and (11), then Eq(D|ρ,ν) [p(θ′|D)] = α α + nµ(θ′) + K X k=1 Pn i=1 ρi(k) α + n νk(θ′). (12) The approximate posterior has two sets of parameters: ρ ≜(ρ1, . . . , ρn) and ν ≜(ν1, . . . , νn). With this approximation, the task of Bayesian learning reduces to the problem of finding the optimal setting of these parameters such that q(D|ρ, ν) best approximates the true posterior distribution. 4.3 Sequential Approximation The first problem here is to determine the value of K. A straightforward approach is to fix K to a large number as in the truncated methods. This way, however, would incur substantial computational costs on unnecessary components. We take a different approach here. Rather than randomly initializing a fixed number of components, we begin with an empty model (i.e. K = 1) and progressively refine the model as samples come in, adding new components on the fly when needed. Specifically, when the first sample x1 is observed, we introduce the first component and denote the posterior for this component by ν1. As there is only one component at this point, we have z1 = 1, i.e. ρ1(z1 = 1) = 1, and the posterior distribution over the component parameter is ν(1) 1 (dθ) ∝ µ(dθ)F(x1|θ). Samples are brought in sequentially. In particular, we compute ρi, and update ν(i−1) to νi upon the arrival of the i-th sample xi. Suppose we have ρ = (ρ1, . . . , ρi) and ν(i) = (ν(i) 1 , . . . , ν(i) K ) after processing i samples. To explain xi+1, we can use either of the K existing components or introduce a new component φk+1. Then the posterior distribution of zi+1, φ1, . . . , φK+1 given x1, . . . , xn, xn+1 is p(zi+1, φ1:K+1|x1:i+1) ∝p(zi+1, φ1:K+1|x1:i)p(xi+1|zi+1, φ1:K+1). (13) Using the tractable distribution q(·|ρ1:i, ν(i)) in Eq.(10) to approximate the posterior p(·|x1:i), we get p(zi+1, φ1:K+1|x1:i+1) ∝q(zi+1|ρ1:i, ν(i))p(xi+1|zi+1, φ1:K+1). (14) Then, the optimal settings of qi+1 and ν(i+1) that minimizes the Kullback-Leibler divergence between q(zi+1, φ1:K+1|q1:i+1, ν(i+1)) and the approximate posterior in Eq.(14) are given as follows: ρi+1 ∝ ( w(i) k R θ F(xi+1|θ)ν(i) k (dθ) (k ≤K), α R θ F(xi+1|θ)µ(dθ) (k = K + 1), (15) 4 Algorithm 1 Sequential Bayesian Learning of DPMM (for conjugate cases). Require: base measure params: λ, λ0, observed samples: x1, . . . , xn, and threshold ϵ Let K = 1, ρ1(1) = 1, w1 = ρ1, ζ1 = φ(x1), and ζ′ 1 = 1. for i = 2 : n do Ti ←T(xi), and bi ←b(xi) marginal log-likelihood: hi(k) ← ( B(ζk + Ti, ζ′ k + τ) −B(ζk, ζ′ k) −bi (k = 1, . . . , K) B(λ + Ti, λ′ + τ) −B(λ, λ′) −bi (k = K + 1) ρi(k) ←wkehi(k)/ P l wlehi(l) for k = 1, . . . , K + 1 with wK+1 = α if ρi(K + 1) > ϵ then wk ←wk + ρi(k), ζk ←ζk + ρi(k)Ti, and ζ′ k ←ζ′ k + ρi(k)τ, for k = 1, . . . , K wK+1 ←ρi(K + 1), ζK+1 ←ρi(K + 1)Ti, and ζ′ K+1 ←ρi(K + 1)τ K ←K + 1 else re-normalize ρi such that PK k=1 ρi(k) = 1 wk ←wk + ρi(k), ζk ←ζk + ρi(k)Ti, and ζ′ k ←ζ′ k + ρi(k)τ, for k = 1, . . . , K end if end for with w(i) k = Pi j=1 ρj(k), and ν(i+1) k (dθ) ∝ ( µ(dθ) Qi+1 j=1 F(xj|θ)ρj(k) (k ≤K), µ(dθ)F(xi+1|θ)ρi+1(k) (k = K + 1). (16) Discussion. There is a key distinction between this approximation scheme and conventional approaches: Instead of seeking the approximation of p(D|x1:n), which is very difficult (D is infinite) and unnecessary (only a finite number of components are useful), we try to approximate the posterior of a finite subset of latent variables that are truly relevant for prediction, namely z and φ1:K+1. This sequential approximation scheme introduces a new component for each sample, resulting in n components over the entire dataset. This, however, is unnecessary. We find empirically that for most samples, ρi(K + 1) is negligible, indicating that the sample is adequately explained by existing component, and there is no need of new components. In practice, we set a small value ϵ and increase K only when ρi(K + 1) > ϵ. This simple strategy is very effective in controlling the model size. 5 Algorithm and Implementation This section discusses the implementation of the sequential Bayesian learning algorithm under two different circumstances: (1) µ and F are exponential family distributions that form a conjuate pair, and (2) µ is not a conjugate prior w.r.t. F. Conjugate Case. In general, when µ is conjugate to F, they can be written as follows: µ(dθ|λ, λ′) = exp λT η(θ) −λ′A(θ) −B(λ, λ′)  h(dθ), (17) F(x|θ) = exp η(θ)T T(x) −τA(θ) −b(x)  . (18) Here, the prior measure µ has a pair of natural parameters: (λ, λ′). Conditioned on a set of observations x1, . . . , xn, the posterior distribution remains in the same family as µ with parameters (λ + Pn i=1 T(xi), λ′ + nτ). In addition, the marginal likelihood is given by Z θ F(x|θ)µ(dθ|λ, λ′) = exp (B(λ + T(x), λ′ + τ) −B(λ, λ′) −b(x)) . (19) In such cases, both the base measure µ and the component-specific posterior measures νk can be represented using the natural parameter pairs, which we denote by (λ, λ′) and (ζk, ζ′ k). With this notation, we derive a sequential learning algorithm for conjugate cases, as shown in Alg 1. Non-conjugate Case. In practical models, it is not uncommon that µ and F are not a conjugate pair. Unlike in the conjugate cases discussed above, there exist no formulas to update posterior 5 parameters or to compute marginal likelihood in general. Here, we propose to address this issue using stochastic optimization. Consider a posterior distribution given by p(θ|x1:n) ∝µ(θ) Qn i=1 F(xi|θ). A stochastic optimization method finds the MAP estimate of θ through update steps as below: θ ←θ + σi (∇θ log µ(θ) + n∇θ log F(xi|θ)) . (20) The basic idea here is to use the gradient computed at a particular sample xi to approximate the true gradient. This procedure converges to a (local) maximum, as long as the step size σi satisfy P∞ i=1 σi = ∞and P∞ i=1 σ2 i < ∞. Incorporating the stochastic optimization method into our algorithm, we obtain a variant of Alg 1. The general procedure is similar, except for the following changes: (1) It maintains point estimates of the component parameters instead of the posterior, which we denote by ˆφ1, . . . , ˆφK. (2) It computes the log-likelihood as hi(k) = log F(xi|ˆφk). (3) The estimates of the component parameters are updated using the formula below: ˆφ(i) k ←ˆφ(i−1) k + σi (∇θ log µ(θ) + nρi(k)∇θ log F(xi|θ)) . (21) Following the common practice of stochastic optimization, we set σi = i−κ/n with κ ∈(0.5, 1]. Prune and Merge. As opposed to random initialization, components created during this sequential construction are often truly needed, as the decisions of creating new components are based on knowledge accumulated from previous samples. However, it is still possible that some components introduced at early iterations would become less useful and that multiple components may be similar. We thus introduce a mechanism to remove undesirable components and merge similar ones. We identify opportunities to make such adjustments by looking at the weights. Let ˜w(i) k = w(i) k / P l w(i) l (with w(i) k = Pi j=1 ρj(k)) be the relative weight of a component at the i-th iteration. Once the relative weight of a component drops below a small threshold εr, we remove it to save unnecessary computation on this component in the future. The similarity between two components φk and φk′ can be measured in terms of the distance between ρi(k) and ρi(k′) over all processed samples, as dρ(k, k′) = i−1 Pi j=1 |ρj(k) −ρj(k′)|. We increment ρi(k) to ρi(k) + ρi(k′) when φk and φ′ k are merged (i.e. dρ(k, k′) < εd). We also merge the associated sufficient statistics (for conjugate case) or take an weighted average of the parameters (for non-conjugate case). Generally, there is no need to perform such checks at every iteration. Since computing this distance between a pair of components takes O(n), we propose to examine similarities at an O(i · K)-interval so that the amortized complexity is maintained at O(nK). Discussion. As compared to existing methods, the proposed method has several important advantages. First, it builds up the model on the fly, thus avoiding the need of randomly initializing a set of components as required by truncation-based methods. The model learned in this way can be readily extended (e.g. adding more components or adapting existing components) when new data is available. More importantly, the algorithm can learn the model in one pass, without the need of iterative updates over the data set. This distinguishes it from MCMC methods and conventional variational learning algorithms, making it a great fit for large scale problems. 6 Experiments To test the proposed algorithm, we conducted experiments on both synthetic data and real world applications – modeling image patches and document clustering. All algorithms are implemented using Julia [2], a new language for high performance technical computing. 6.1 Synthetic Data First, we study the behavior of the proposed algorithm on synthetic data. Specifically, we constructed a data set comprised of 10000 samples in 9 Gaussian clusters of unit variance. The distances between these clusters were chosen such that there exists moderate overlap between neighboring clusters. The estimation of these Gaussian components are based on the DPMM below: D ∼DP α · N(0, σ2 pI)  , θi ∼D, xi ∼N(θi, σ2 xI). (22) 6 CGS TVF SVA SVA-PM −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 −8 −6 −4 −2 0 2 4 6 8 Figure 1: Gaussian clusters on synthetic data obtained using different methods. Both MC-SM and SVA-PM identified the 9 clusters correctly. The result of MC-SM is omitted here, as it looks the same as SVA-PM. 0 20 40 60 80 100 −8.5 −8 −7.5 −7 −6.5 −6 −5.5 x 10 4 minute joint log−lik CGS MC−SM TVF SVA SVA−PM Figure 2: Joint log-likelihood on synthetic data as functions of run-time. The likelihood values were evaluated on a held-out testing set. (Best to view with color) Here, we set α = 1, σp = 100 and σx = 1. We tested the following inference algorithms: Collapsed Gibbs sampling (CGS) [12], MCMC with Split-Merge (MC-SM) [6], Truncation-Free Variational Inference (TFV) [21], Sequential Variational Approximation (SVA), and its variant Sequential Variational Approximation with Prune and Merge (SVA-PM). For CGS, MC-SM, and TFV, we run the updating procedures iteratively for one hour, while for SVA and SVA-PM, we run only one-pass. Figure 1 shows the resulting components. CGS and TFV yield obviously redundant components. This corroborates observations in previous work [9]. Such nuisances are significantly reduced in SVA, which only occasionally brings in redundant components. The key difference that leads to this improvement is that CGS and TFV rely on random initialization to bootstrap the algorithm, which would inevitably introduce similar components, while SVA leverages information gained from previous samples to decide whether new components are needed. Both MC-SM and SVA-PM produce desired mixtures, demonstrating the importance of an explicit mechanism to remove redundancy. Figure 2 plots the traces of joint log-likelihoods evaluated on a held-out set of samples. We can see that SVA-PM quickly reaches the optimal solution in a matter of seconds. SVA also gets to a reasonable solution within seconds, and then the progress slows down. Without the prune-and-merge steps, it takes much longer for redundant components to fade out. MC-SM eventually reaches the optimal solution after many iterations. Methods relying on local updates, including CGS and TFV, did not even come close to the optimal solution within one hour. These results clearly demonstrate that our progressive strategy, which gradually constructs the model through a series of informed decisions, is much more efficient than random initialization followed by iterative updating. 6.2 Modeling Image Patches Image patches, which capture local characteristics of images, play a fundamental role in various computer vision tasks, such as image recovery and scene understanding. Many vision algorithms rely on a patch dictionary to work. It has been a common practice in computer vision to use parametric methods (e.g. K-means) to learn a dictionary of fixed size. This approach is inefficient when large datasets are used. It is also difficult to be extended when new data with a fixed K. To tackle this problem, we applied our method to learn a nonparametric dictionary from the SUN database [24], a large dataset comprised of over 130K images, which capture a broad variety of scenes. We divided all images into two disjoint sets: a training set with 120K images and a testing set with 10K. We extracted 2000 patches of size 32 × 32 from each image, and characterize each patch by a 128-dimensional SIFT feature. In total, the training set contains 240M feature vectors. We respectively run TFV, SVA, and SVA-SM to learn a DPMM from the training set, based on the 7 Figure 3: Examples of image patche clusters learned using SVA-PM. Each row corresponds to a cluster. We can see similar patches are in the same cluster. 0 2 4 6 8 −180 −160 −140 −120 −100 hour avg. pred. log−lik TVF SVA SVA−PM Figure 4: Average loglikelihood on image modeling as functions of run-time. 0 2 4 6 8 10 300 350 400 450 500 550 hour avg. pred. log−lik TVF SVA SVA−PM Figure 5: Average loglikelihood of document clusters as functions of run-time. formulation given in Eq.(22), and evaluate the average predictive log-likelihood over the testing set as the measure of performance. Figure 3 shows a small subset of patch clusters obtained using SVA-PM. Figure 4 compares the trajectories of the average log-likelihoods obtained using different algorithms. TFV takes multiple iterations to move from a random configuration to a sub-optimal one and get trapped in a local optima. SVA steadily improves the predictive performance as it sees more samples. We notice in our experiments that even without an explicit redundancy-removal mechanism, some unnecessary components can still get removed when their relative weights decreases and becomes negligible. SVM-PM accelerates this process by explicitly merging similar components. 6.3 Document Clustering Next, we apply the proposed method to explore categories of documents. Unlike standard topic modeling task, this is a higher level application that builds on top of the topic representation. Specifically, we first obtain a collection of m topics from a subset of documents, and characterize all documents by topic proportions. We assume that the topic proportion vector is generated from a category-specific Dirichlet distribution, as follows D ∼DP (α · Dirsym(γp)) , θi ∼D, xi ∼Dir(γxθi). (23) Here, the base measure is a symmetric Dirichlet distribution. To generate a document, we draw a mean probability vector θi from D, and generates the topic proportion vector xi from Dir(γxθi). The parameter γx is a design parameter that controls how far xi may deviate from the categoryspecific center θi. Note that this is not a conjugate model, and we use stochastic optimization instead of Bayesian updates in SVA (see section 5). We performed the experiments on the New York Times database, which contains about 1.8M articles from year 1987 to 2007. We pruned the vocabulary to 5000 words by removing stop words and those with low TF-IDF scores, and obtained 150 topics by running LDA [3] on a subset of 20K documents. Then, each document is represented by a 150-dimensional vector of topic proportions. We held out 10K documents for testing and use the remaining to train the DPMM. We compared SVA, SVA-PM, and TVF. The traces of log-likelihood values are shown in Figure 5. We observe similar trends as above: SVA and SVA-PM attains better solution more quickly, while TVF is less efficient and is prune to being trapped in local maxima. Also, TVF tends to generate more components than necessary, while SVA-PM maintains a better performance using much less components. 7 Conclusion We presented an online Bayesian learning algorithm to estimate DP mixture models. The proposed method does not require random initialization. Instead, it can reliably and efficiently learn a DPMM from scratch through sequential approximation in a single pass. The algorithm takes in data in a streaming fashion, and thus can be easily adapted to new data. Experiments on both synthetic data and real applications have demonstrated that our algorithm achieves remarkable speedup – it can attain nearly optimal configuration within seconds or minutes, while mainstream methods may take hours or even longer. It is worth noting that the approximation is derived based on the predictive law of DPMM. It is an interesting future direction to investigate how it can be generalized to a broader family of BNP models, such as HDP, Pitman-Yor processes, and NRMIs [10]. 8 References [1] C. Antoniak. Mixtures of dirichlet processes with applications to bayesian nonparametric problems. The Annals of Statistics, 2(6):1152–1174, 1974. [2] Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman. Julia: A fast dynamic language for technical computing. CoRR, abs/1209.5145, 2012. [3] David Blei, Ng Andrew, and Michael Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [4] David M. Blei and Michael I. Jordan. Variational methods for the Dirichlet process. In Proc. of ICML’04, 2004. [5] Michael Bryant and Erik Sudderth. Truly nonparametric online variational inference for hierarchical dirichlet processes. In Proc. of NIPS’12, 2012. [6] David B. Dahl. Sequentially-allocated merge-split sampler for conjugate and nonconjugate dirichlet process mixture models, 2005. [7] Nils Lid Hjort, Chris Holmes, Peter Muller, and Stephen G. Walker. Bayesian Nonparametrics: Principles and Practice. Cambridge University Press, 2010. [8] Matt Hoffman, David M. Blei, Chong Wang, and John Paisley. Stochastic variational inference. arXiv eprints, 1206.7501, 2012. [9] Michael C. Hughes, Emily B. Fox, and Erik B. Sudderth. Effective split-merge monte carlo methods for nonparametric models of sequential data. 2012. [10] Lancelot F. James, Antonio Lijoi, and Igor Pr¨unster. Posterior analysis for normalized random measures with independent increments. Scaninavian Journal of Stats, 36:76–97, 2009. [11] Kenichi Kurihara, Max Welling, and Yee Whye Teh. Collapsed variational dirichlet process mixture models. In Proc. of IJCAI’07, 2007. [12] Radford M. Neal. Markov Chain Sampling Methods for Dirichlet Process Mixture Models. Journal of computational and graphical statistics, 9(2):249–265, 2000. [13] David J. Nott, Xiaole Zhang, Christopher Yau, and Ajay Jasra. A sequential algorithm for fast fitting of dirichlet process mixture models. In Arxiv: 1301.2897, 2013. [14] Ian Porteous, Alex Ihler, Padhraic Smyth, and Max Welling. Gibbs Sampling for (Coupled) Infinite Mixture Models in the Stick-breaking Representation. In Proc. of UAI’06, 2006. [15] Carl Edward Rasmussen. The Infinite Gaussian Mixture Model. In Proc. of NIPS’00, 2000. [16] Jayaram Sethuraman. A constructive definition of dirichlet priors. Statistical Sinica, 4:639–650, 1994. [17] S.Jain and R.M. Neal. A split-merge markov chain monte carlo procedure for the dirichlet process mixture model. Journal of Computational and Graphical Statistics, 13(1):158–182, 2004. [18] Yee Whye Teh, Michael I. Jordan, Matthew J. Beal, and David M. Blei. Hierarchical Dirichlet Processes. Journal of the American Statistical Association, 101(476):1566–1581, 2007. [19] Y.W. Teh, K. Kurihara, and Max Welling. Collapsed Variational Inference for HDP. In Proc. of NIPS’07, volume 20, 2007. [20] Chong Wang and David Blei. A split-merge mcmc algorithm for the hierarchical dirichlet process. arXiv eprints, 1201.1657, 2012. [21] Chong Wang and David Blei. Truncation-free stochastic variational inference for bayesian nonparametric models. In Proc. of NIPS’12, 2012. [22] Chong Wang and David M Blei. Variational Inference for the Nested Chinese Restaurant Process. In Proc. of NIPS’09, 2009. [23] Chong Wang, John Paisley, and David Blei. Online variational inference for the hierarchical dirichlet process. In AISTATS’11, 2011. [24] J. Xiao, J. Hays, K. Ehinger, A. Oliva, and A. Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In Proc. of CVPR’10, 2010. 9
2013
196
4,927
Exact and Stable Recovery of Pairwise Interaction Tensors Shouyuan Chen Michael R. Lyu Irwin King The Chinese University of Hong Kong {sychen,lyu,king}@cse.cuhk.edu.hk Zenglin Xu Purdue University xu218@purdue.edu Abstract Tensor completion from incomplete observations is a problem of significant practical interest. However, it is unlikely that there exists an efficient algorithm with provable guarantee to recover a general tensor from a limited number of observations. In this paper, we study the recovery algorithm for pairwise interaction tensors, which has recently gained considerable attention for modeling multiple attribute data due to its simplicity and effectiveness. Specifically, in the absence of noise, we show that one can exactly recover a pairwise interaction tensor by solving a constrained convex program which minimizes the weighted sum of nuclear norms of matrices from O(nr log2(n)) observations. For the noisy cases, we also prove error bounds for a constrained convex program for recovering the tensors. Our experiments on the synthetic dataset demonstrate that the recovery performance of our algorithm agrees well with the theory. In addition, we apply our algorithm on a temporal collaborative filtering task and obtain state-of-the-art results. 1 Introduction Many tasks of recommender systems can be formulated as recovering an unknown tensor (multiway array) from a few observations of its entries [17, 26, 25, 21]. Recently, convex optimization algorithms for recovering a matrix, which is a special case of tensor, have been extensively studied [7, 22, 6]. Moreover, there are several theoretical developments that guarantee exact recovery of most low-rank matrices from partial observations using nuclear norm minimization [8, 5]. These results seem to suggest a promising direction to solve the general problem of tensor recovery. However, there are inevitable obstacles to generalize the techniques for matrix completion to tensor recovery, since a number of fundamental computational problems of matrix is NP-hard in their tensorial analogues [10]. For instance, H˚astad showed that it is NP-hard to compute the rank of a given tensor [9]; Hillar and Lim proved the NP-hardness to decompose a given tensor into sum of rank-one tensors even if a tensor is fully observed [10]. The existing evidence suggests that it is very unlikely that there exists an efficient exact recovery algorithm for general tensors with missing entries. Therefore, it is natural to ask whether it is possible to identify a useful class of tensors for which we can devise an exact recovery algorithm. In this paper, we focus on pairwise interaction tensors, which have recently demonstrated strong performance in several recommendation applications, e.g. tag recommendation [19] and sequential data analysis [18]. Pairwise interaction tensors are a special class of general tensors, which directly model the pairwise interactions between different attributes. Take movie recommendation as an example, to model a user’s ratings for movies varying over time, a pairwise interaction tensor assumes that each rating is determined by three factors: the user’s inherent preference on the movie, the movie’s trending popularity and the user’s varying mood over time. Formally, pairwise interaction tensor assumes that each entry Tijk of a tensor T of size n1 × n2 × n3 is given by following Tijk = D u(a) i , v(a) j E + D u(b) j , v(b) k E + D u(c) k , v(c) i E , for all (i, j, k) ∈[n1] × [n2] × [n3], (1) 1 where {u(a) i }i∈[n1], {v(a) i }j∈[n2] are r1 dimensional vectors, {u(b) j }j∈[n2], {v(b) k }k∈[n3] are r2 dimensional vectors and {u(c) k }k∈[n3], {v(c) i }i∈[n1] are r3 dimensional vectors, respectively. 1 The existing recovery algorithms for pairwise interaction tensor use local optimization methods, which do not guarantee the recovery performance [18, 19]. In this paper, we design efficient recovery algorithms for pairwise interaction tensors with rigorous guarantee. More specifically, in the absence of noise, we show that one can exactly recover a pairwise interaction tensor by solving a constrained convex program which minimizes the weighted sum of nuclear norms of matrices from O(nr log2(n)) observations, where n = max{n1, n2, n3} and r = max{r1, r2, r3}. For noisy cases, we also prove error bounds for a constrained convex program for recovering the tensors. In the proof of our main results, we reformulated the recovery problem as a constrained matrix completion problem with a special observation operator. Previously, Gross et al. [8] have showed that the nuclear norm heuristic can exactly recover low rank matrix from a sufficient number of observations of an orthogonal observation operator. We note that the orthogonality is critical to their argument. However, the observation operator, in our case, turns out to be non-orthogonal, which becomes a major challenge in our proof. In order to deal with the non-orthogonal operator, we have substantially extended their technique in our proof. We believe that our technique can be generalized to handle other matrix completion problem with non-orthogonal observation operators. Moreover, we extend existing singular value thresholding method to develop a simple and scalable algorithm for solving the recovery problem in both exact and noisy cases. Our experiments on the synthetic dataset demonstrate that the recovery performance of our algorithm agrees well with the theory. Finally, we apply our algorithm on a temporal collaborative filtering task and obtain stateof-the-art results. 2 Recovering pairwise interaction tensors In this section, we first introduce the matrix formulation of pairwise interaction tensors and specify the recovery problem. Then we discuss the sufficient conditions on pairwise interaction tensors for which an exact recovery would be possible. After that we formulate the convex program for solving the recovery problem and present our theoretical results on the sample bounds for achieving an exact recovery. In addition, we also show a quadratically constrained convex program is stable for the recovery from noisy observations. A matrix formulation of pairwise interaction tensors. The original formulation of pairwise interaction tensors by Rendle et al. [19] is given by Eq. (1), in which each entry of a tensor is the sum of inner products of feature vectors. We can reformulate Eq. (1) more concisely using matrix notations. In particular, we can rewrite Eq. (1) as follows Tijk = Aij + Bjk + Cki, for all (i, j, k) ∈[n1] × [n2] × [n3], (2) where we set Aij = D u(a) i , v(a) j E , Bjk = D u(b) j , v(b) k E , and Cki = D u(c) k , v(c) i E for all (i, j, k). Clearly, matrices A, B and C are rank r1, r2 and r3 matrices, respectively. We call tensor T ∈Rn1×n2×n3 a pairwise interaction tensor, which is denoted as T = Pair(A, B, C), if T obeys Eq. (2). We note that this concise definition is equivalent to the original one. In the rest of this paper, we will exclusively use the matrix formulation of pairwise interaction tensors. Recovery problem. Suppose we have partial observations of a pairwise interaction tensor T = Pair(A, B, C). We write Ω⊆[n1] × [n2] × [n3] to be the set of indices of m observed entries. In this work, we shall assume Ωis sampled uniformly from the collection of all sets of size m. Our goal is to recover matrices A, B, C and therefore the entire tensor T from exact or noisy observations of {Tijk}(ijk)∈Ω. Before we proceed to the recovery algorithm, we first discuss when the recovery is possible. Recoverability: uniqueness. The original recovery problem for pairwise interaction tensors is illposed due to a uniqueness issue. In fact, for any pairwise interaction tensor T = Pair(A, B, C), 1For simplicity, we only consider three-way tensors in this paper. 2 we can construct infinitely manly different sets of matrices A′, B′, C′ such that Pair(A, B, C) = Pair(A′, B′, C′). For example, we have Tijk = Aij + Bjk + Cki = (Aij + δai) + Bjk + (Cki + (1 −δ)ai), where δ ̸= 0 can be any non-zero constant and a is an arbitrary non-zero vector of size n1. Now, we can construct A′, B′ and C′ by setting A′ ij = Aij + δai, B′ jk = Bjk and C′ ki = Cki + (1 −δ)ai. It is clear that T = Pair(A′, B′, C′). This ambiguity prevents us to recover A, B, C even if T is fully observed, since it is entirely possible to recover A′, B′, C′ instead of A, B, C based on the observations. In order to avoid this obstacle, we construct a set of constraints such that, given any pairwise interaction tensor Pair(A, B, C), there exists unique matrices A′, B′, C′ satisfying the constraints and obeys Pair(A, B, C) = Pair(A′, B′, C′). Formally, we prove the following proposition. Proposition 1. For any pairwise interaction tensor T = Pair(A, B, C), there exists unique A′ ∈ SA, B′ ∈SB, C′ ∈SC such that Pair(A, B, C) = Pair(A′, B′, C′) where we define SB = {M ∈ Rn2×n3 : 1T M = 0T },SC = {M ∈Rn3×n1 : 1T M = 0T } and SA = {M ∈Rn1×n2 : 1T M =  1 n2 1T M1  1T }. We point out that there is a natural connection between the uniqueness issue and the “bias” components, which is a quantity of much attention in the field of recommender system [13]. Due to lack of space, we defer the detailed discussion on this connection and the proof of Proposition 1 to the supplementary material. Recoverability: incoherence. It is easy to see that recovering a pairwise tensor T = Pair(A, 0, 0) is equivalent to recover the matrix A from a subset of its entries. Therefore, the recovery problem of pairwise interaction tensors subsumes matrix completion problem as a special case. Previous studies have confirmed that the incoherence condition is an essential requirement on the matrix in order to guarantee a successful recovery of matrices. This condition can be stated as follows. Let M = UΣVT be the singular value decomposition of a rank r matrix M. We call matrix M is (µ0, µ1)-incoherent if M satisfies: A0. For all i ∈[n1] and j ∈[n2], we have n1 r P k∈[r] U 2 ik ≤µ0 and n2 r P k∈[r] V 2 jk ≤µ0. A1. The maximum entry of UVT is bounded by µ1 p r/(n1n2) in absolute value. It is well known the recovery is possible only if the matrix is (µ0, µ1)-incoherent for bounded µ0, µ1 (i.e, µ0, µ1 is poly-logarithmic with respect to n). Since the matrix completion problem is reducible to the recovery problem for pairwise interaction tensors, our theoretical result will inherit the incoherence assumptions on matrices A, B, C. Exact recovery in the absence of noise. We first consider the scenario where the observations are exact. Specifically, suppose we are given m observations {Tijk}(ijk)∈Ω, where Ωis sampled from uniformly at random from [n1]×[n2]×[n3]. We propose to recover matrices A, B, C and therefore tensor T = Pair(A, B, C) using the following convex program, minimize X∈SA,Y∈SB,Z∈SC √n3 ∥X∥∗+ √n1 ∥Y∥∗+ √n2 ∥Z∥∗ (3) subject to Xij + Yjk + Zki = Tijk, (i, j, k) ∈Ω, where ∥M∥∗denotes the nuclear norm of matrix M, which is the sum of singular values of M, and SA, SB, SC is defined in Proposition 1. We show that, under the incoherence conditions, the above nuclear norm minimization method successful recovers a pairwise interaction tensor T when the number of observations m is O(nr log2 n) with high probability. Theorem 1. Let T ∈Rn1×n2×n3 be a pairwise interaction tensor T = Pair(A, B, C) and A ∈ SA, B ∈SB, C ∈SC as defined in Proposition 1. Without loss of generality assume that 9 ≤n1 ≤ n2 ≤n3. Suppose we observed m entries of T with the locations sampled uniformly at random from [n1] × [n2] × [n3] and also suppose that each of A, B, C is (µ0, µ1)-incoherent. Then, there exists a universal constant C, such that if m > C max{µ2 1, µ0}n3rβ log2(6n3), where r = max{rank(A), rank(B), rank(C)} and β > 2 is a parameter, the minimizing solution X, Y, Z for program Eq. (3) is unique and satisfies X = A, Y = B, Z = C with probability at least 1 −log(6n3)6n2−β 3 −3n2−β 3 . 3 Stable recovery in the presence of noise. Now, we move to the case where the observations are perturbed by noise with bounded energy. In particular, our noisy model assumes that we observe ˆTijk = Tijk + σijk, for all (i, j, k) ∈Ω, (4) where σijk is a noise term, which maybe deterministic or stochastic. We assume σ has bounded energy on Ωand specifically that ∥PΩ(σ)∥F ≤ϵ1 for some ϵ1 > 0, where PΩ(·) denotes the restriction on Ω. Under this assumption on the observations, we derive the error bound of the following quadratically-constrained convex program, which recover T from the noisy observations. minimize X∈SA,Y∈SB,Z∈SC √n3 ∥X∥∗+ √n1 ∥Y∥∗+ √n2 ∥Z∥∗ (5) subject to PΩ(Pair(X, Y, Z)) −PΩ( ˆT ) F ≤ϵ2. Theorem 2. Let T = Pair(A, B, C) and A ∈SA, B ∈SB, C ∈SC. Let Ωbe the set of observations as described in Theorem 1. Suppose we observe ˆTijk for (i, j, k) ∈Ωas defined in Eq. (4) and also assume that ∥PΩ(σ)∥F ≤ϵ1 holds. Denote the reconstruction error of the optimal solution X, Y, Z of convex program Eq. (5) as E = Pair(X, Y, Z) −T . Also assume that ϵ1 ≤ϵ2. Then, we have ∥E∥∗≤5 s 2rn1n2 2 8β log(n1)(ϵ1 + ϵ2), with probability at least 1 −log(6n3)6n2−β 3 −3n2−β 3 . The proof of Theorem 1 and Theorem 2 is available in the supplementary material. Related work. Rendle et al. [19] proposed pairwise interaction tensors as a model used for tag recommendation. In a subsequent work, Rendle et al. [18] applied pairwise interaction tensors in the sequential analysis of purchase data. In both applications, their methods using pairwise interaction tensor demonstrated excellent performance. However, their algorithms are prone to local optimal issues and the recovered tensor might be very different from its true value. In contrast, our main results, Theorem 1 and Theorem 2, guarantee that a convex program can exactly or accurately recover the pairwise interaction tensors from O(nr log2(n)) observations. In this sense, our work can be considered as a more effective way to recover pairwise interaction tensors from partial observations. In practice, various tensor factorization methods are used for estimating missing entries of tensors [12, 20, 1, 26, 16]. In addition, inspired by the success of nuclear norm minimization heuristics in matrix completion, several work used a generalized nuclear norm for tensor recovery [23, 24, 15]. However, these work do not guarantee exact recovery of tensors from partial observations. 3 Scalable optimization algorithm There are several possible methods to solving the optimization problems Eq. (3) and Eq. (5). For small problem sizes, one may reformulate the optimization problems as semi-definite programs and solve them using interior point method. The state-of-the-art interior point solvers offer excellent accuracy for finding the optimal solution. However, these solvers become prohibitively slow for pairwise interaction tensors larger than 100 × 100 × 100. In order to apply the recover algorithms on large scale pairwise interaction tensors, we use singular value thresholding (SVT) algorithm proposed recently by Cai et al. [3], which is a first-order method with promising performance for solving nuclear norm minimization problems. We first discuss the SVT algorithm for solving the exact completion problem Eq. (3). For convenience, we reformulate the original optimization objective Eq. (3) as follows, minimize X∈SA,Y∈SB,Z∈SC ∥X∥∗+ ∥Y∥∗+ ∥Z∥∗ (6) subject to Xij √n3 + Yjk √n1 + Zki √n2 = Tijk, (i, j, k) ∈Ω, where we have incorporated coefficients on the nuclear norm terms into the constraints. It is easy to see that the recovered tensor is given by Pair(n−1/2 3 X, n−1/2 1 Y, n−1/2 2 Z), where X, Y, Z is the 4 optimal solution of Eq. (6). Our algorithm solves a slightly relaxed version of the reformulated objective Eq. (6), minimize X∈SA,Y∈SB,Z∈SCτ (∥X∥∗+ ∥Y∥∗+ ∥Z∥∗) + 1 2  ∥X∥2 F + ∥Y∥2 F + ∥Z∥2 F  (7) subject to Xij √n3 + Yjk √n1 + Zki √n2 = Tijk, (i, j, k) ∈Ω. It is easy to see that Eq. (7) is closely related to Eq. (6) and the original problem Eq. (3), as the relaxed problem converges to the original one as τ →∞. Therefore by selecting a large value the parameter τ, a minimizing solution to Eq. (7) nearly minimizes Eq. (3). Our algorithm iteratively minimizes Eq. (7) and produces a sequence of matrices {Xk, Yk, Zk} converging to the optimal solution (X, Y, Z) that minimizes Eq. (7). We begin with several definitions. For observations Ω= {ai, bi, ci|i ∈[m]}, let operators PΩA : Rn1×n2 →Rm, PΩB : Rn2×n3 →Rm and PΩC : Rn3×n1 →Rm represents the influence of X, Y, Z on the m observations. In particular, PΩA(X) = 1 √n3 m X i=1 Xaibiδi, PΩB(Y) = 1 √n1 m X i=1 Ybiciδi, and PΩC(Z) = 1 √n2 m X i=1 Zciaiδi. It is easy to verify that PΩA(X) + PΩB(Y) + PΩC(Z) = PΩ(Pair(n−1/2 3 X, n−1/2 1 Y, n−1/2 2 Z)). We also denote P∗ ΩA be the adjoint operator of PΩA and similarly define P∗ ΩB and P∗ ΩC. Finally, for a matrix X for size n1 ×n2, we define center(X) = X−1 n1 11T X as the column centering operator that removes the mean of each n2 columns, i.e., 1T center(X) = 0T . Starting with y0 = 0 and k = 1, our algorithm iteratively computes Step (1). Xk = shrinkA(P∗ ΩA(yk−1), τ), Yk = shrinkB(P∗ ΩB(yk−1), τ), Zk = shrinkC(P∗ ΩC(yk−1), τ), Step (2e). ek = PΩ(T ) −PΩ(Pair(n−1/2 3 X, n−1/2 1 Y, n−1/2 2 Z)) yk = yk−1 + δek. Here shrinkA is a shrinkage operator defined as follows shrinkA(M, τ) ≜arg min ˜ M∈SA 1 2 ˜M −M 2 F + τ ˜M ∗. (8) Shrinkage operators shrinkB and shrinkC are defined similarly except they require ˜M belongs SB and SC, respectively. We note that our definition of the shrinkage operators shrinkA, shrinkB and shrinkC are slightly different from that of the original SVT [3] algorithm, where ˜M is unconstrained. We can show that our constrained version of shrinkage operators can also be calculated using singular value decompositions of column centered matrices. Let the SVD of the column centered matrix center(M) be center(M) = UΣVT , Σ = diag({σi}). We can prove that the shrinkage operator shrinkB is given by shrinkB(M, τ) = U diag({σi −τ}+)VT , (9) where s+ is the positive part of s, that is, s+ = max{0, s}. Since subspace SC is structurally identical to SB, it is easy to see that the calculation of shrinkC is identical to that of shrinkB. The computation of shrinkA is a little more complicated. We have shrinkA(M, τ) = U diag({σi −τ}+)VT + 1 √n1n2 ({δ −τ}+ + {δ + τ}−) 11T , (10) where UΣVT is still the SVD of center(M), δ = 1 √n1n2 1T M1 is a constant and s−= min{0, s} is the negative part of s. The algorithm iterates between Step (1) and Step (2e) and produces a series of (Xk, Yk, Zk) converging to the optimal solution of Eq. (7). The iterative procedure terminates 5 when the training error is small enough, namely, ek F ≤ϵ. We refer interested readers to [3] for a convergence proof of the SVT algorithm. The optimization problem for noisy completion Eq. (5) can be solved in a similar manner. We only need to modify Step (2e) to incorporate the quadratical constraint of Eq. (5) as follows Step (2n). ek = PΩ( ˆT ) −PΩ(Pair(n−1/2 3 X, n−1/2 1 Y, n−1/2 2 Z))  yk sk  = PK  yk−1 sk−1  + δ  ek −ϵ  , where PΩ( ˆT ) is the noisy observations and the cone projection operator PK can be explicitly computed by PK : (x, t) →      (x, t) if ∥x∥≤t, ∥x∥+t 2∥x∥(x, ∥x∥) if −∥x∥≤t ≤∥x∥, (0, 0) if t ≤−∥x∥. By iterating between Step (1) and Step (2n) and selecting a sufficiently large τ, the algorithm generates a sequence of {Xk, Yk, Zk} that converges to a nearly optimal solution to the noisy completion program Eq. (5) [3]. We have also included a detailed description of both algorithms in the supplementary material. At each iteration, we need to compute one singular value decomposition and perform a few elementary matrix additions. We can see that for each iteration k, Xk vanishes outside of ΩA = {aibi} and is sparse. Similarly Yk,Zk are also sparse matrices. Previously, we showed that the computation of shrinkage operators requires a SVD of a column centered matrix center(M) − 1 n1 11T X, which is the sum of a sparse matrix M and a rank-one matrix. Clearly the matrix-vector multiplication of the form center(M)v can be computed with time O(n + m). This enables the use of Lanczos method based SVD implementations for example PROPACK [14] and SVDPACKC [2], which only needs subroutine of calculating matrix-vector products. In our implementation, we develop a customized version of SVDPACKC for computing the shrinkage operators. Further, for an appropriate choice of τ, {Xk, Yk, Zk} turned out to be low rank matrices, which matches the observations in the original SVT algorithm [3]. Hence, the storage cost Xk, Yk, Zk can be kept low and we only need to perform a partial SVD to get the first r singular vectors. The estimated rank r is gradually increased during the iterations using a similar method suggested in [3, Section 5.1.1]. We can see that, in sum, the overall complexity per iteration of the recovery algorithm is O(r(n + m)). 4 Experiments Phase transition in exact recovery. We investigate how the number of measurements affects the success of exact recovery. In this simulation, we fixed n1 = 100, n2 = 150, n3 = 200 and r1 = r2 = r3 = r. We tested a variety of choices of (r, m) and for each choice of (r, m), we repeat the procedure for 10 times. At each time, we randomly generated A ∈SA, B ∈SB, C ∈SC of rank r. We generated A ∈SA by sampling two factor matrices UA ∈Rn1×r, VA ∈Rn2×r with i.i.d. standard Gaussian entries and setting A = PSA(UAVT A), where PSA is the orthogonal projection onto subspace SA. Matrices B ∈SB and C ∈SC are sampled in a similar way. We uniformly sampled a subset Ωof m entries and reveal them to the recovery algorithm. We deemed A, B, C successfully recovered if (∥A∥F + ∥B∥F + ∥C∥F )−1(∥X −A∥F + ∥Y −B∥F + ∥Z −C∥F ) ≤ 10−3, where X, Y and Z are the recovered matrices. Finally, we set the parameters τ, δ of the exact recovery algorithm by τ = 10√n1n2n3 and δ = 0.9m(n1n2n3)−1. Figure 1 shows the results of these experiments. The x-axis is the ratio between the number of measurements m and the degree of freedom d = r(n1 +n2 −r)+r(n2 +n3 −r)+r(n3 +n1 −r). Note that a value of x-axis smaller than one corresponds to a case where there is infinite number of solutions satisfying given entries. The y-axis is the rank r of the synthetic matrices. The color of each grid indicates the empirical success rate. White denotes exact recovery in all 10 experiments, and black denotes failure for all experiments. From Figure 1 (Left), we can see that the algorithm succeeded almost certainly when the number of measurements is 2.5 times or larger than the degree of freedom for most parameter settings. We also observe that, near the boundary of m/d ≈2.5, there is a relatively sharp phase transition. To verify this phenomenon, we repeated the experiments, 6 Figure 1: Phase transition with respect to rank and degree of freedom. Left: m/d ∈[1, 5]. Right: m/d ∈[1.5, 3.0]. but only vary m/d between 1.5 and 3.0 with finer steps. The results on Figure 1 (Right) shows that the phase transition continued to be sharp at a higher resolution. Stability of recovering from noisy data. In this simulation, we show the recovery performance with respect to noisy data. Again, we fixed n1 = 100, n2 = 150, n3 = 200 and r1 = r2 = r3 = r and tested against different choices of (r, m). For each choice of (r, m), we sampled the ground truth A, B, C using the same method as in the previous simulation. We generated Ωuniformly at random. For each entry (i, j, k) ∈Ω, we simulated the noisy observation ˆTijk = Tijk + ϵijk, where ϵijk is a zero-mean Gaussian random variable with variance σ2 n. Then, we revealed { ˆTijk}(ijk)∈Ωto the noisy recovery algorithm and collect the recovered matrix X, Y, Z. The error of recovery result is measured by (∥X −A∥F + ∥Y −B∥F + ∥Z −C∥F )/(∥A∥F + ∥B∥F + ∥C∥F ). We tested the algorithm with a range of noise levels and for each different configuration of (r, m, σ2 n), we repeated the experiments for 10 times and recorded the mean and standard deviation of the relative error. noise level relative error 0.1 0.1020 ± 0.0005 0.2 0.1972 ± 0.0007 0.3 0.2877 ± 0.0011 0.4 0.3720 ± 0.0015 0.5 0.4524 ± 0.0015 (a) Fix r = 20, m = 5d and noise level varies. observations m relative error m = 3d 0.1445 ± 0.0008 m = 4d 0.1153 ± 0.0006 m = 5d 0.1015 ± 0.0004 m = 6d 0.0940 ± 0.0007 m = 7d 0.0920 ± 0.0011 (b) Fix r = 20, 0.1 noise level and m varies. rank r relative error 10 0.1134 ± 0.0006 20 0.1018 ± 0.0007 30 0.0973 ± 0.0037 40 0.1032 ± 0.0212 50 0.1520 ± 0.0344 (c) Fix m = 5d, 0.1 noise level and r varies. Table 1: Simulation results of noisy data. We present the result of the experiments in Table 1. From the results in Table 1(a), we can see that the error in the solution is proportional to the noise level. Table 1(b) indicates that the recovery is not reliable when we have too few observations, while the performance of the algorithm is much more stable for a sufficient number of observations around four times of the degree of freedom. Table 1(c) shows that the recovery error is not affected much by the rank, as the number of observations scales with the degree of freedom in our setting. Temporal collaborative filtering. In order to demonstrate the performance of pairwise interaction tensor on real world applications, we conducted experiments on the Movielens dataset. The MovieLens dataset contains 1,000,209 ratings from 6,040 users and 3,706 movies from April, 2000 and February, 2003. Each rating from Movielens dataset is accompanied with time information provided in seconds. We transformed each timestamp into its corresponding calendar month. We randomly select 10% ratings as test set and use the rest of the ratings as training set. In the end, we obtained a tensor T of size 6040 × 3706 × 36, in which the axes corresponded to user, movie and timestamp respectively, with 0.104% observed entries as the training set. We applied the noisy recovery algorithm on the training set. Following previous studies which applies SVT algorithm on movie recommendation datasets [11], we used a pre-specified truncation level r for computing SVD in each iteration, i.e., we only kept top r singular vectors. Therefore, the rank of recovered matrices are at most r. 7 We evaluated the prediction performance in terms of root mean squared error (RMSE). We compared our algorithm with noisy matrix completion method using standard SVT optimization algorithm [3, 4] to the same dataset while ignore the time information. Here we can regard the noisy matrix completion algorithm as a special case of the recover a pairwise interaction tensor of size 6040 × 3706 × 1, i.e., the time information is ignored. We also noted that the training tensor had more than one million observed entries and 80 millions total entries. This scale made a number of tensor recovery algorithms, for example Tucker decomposition and PARAFAC [12], impractical to apply on the dataset. In contrast, our recovery algorithm took 2430 seconds to finish on a standard workstation for truncation level r = 100. The experimental result is shown in Figure 2. The empirical result of Figure 2(a) suggests that, by incorporating the temporal information, pairwise interaction tensor recovery algorithm consistently outperformed the matrix completion method. Interestingly, we can see that, for most parameter settings in Figure 2(b), our algorithm recovered a rank 2 matrix Y representing the change of movie popularity over time and a rank 15 matrix Z that encodes the change of user interests over time. The reason of the improvement on the prediction performance may be that the recovered matrix Y and Z provided meaningful signal. Finally, we note that our algorithm achieves a RMSE of 0.858 when the truncation level is set to 50, which slightly outperforms the RMSE=0.861 (quote from Figure 7 of the paper) result of 30-dimensional Bayesian Probabilistic Tensor Factorization (BPTF) on the same dataset, where the authors predict the ratings by factorizing a 6040 × 3706 × 36 tensor using BPTF method [26]. We may attribute the performance gain to the modeling flexibility of pairwise interaction tensor and the learning guarantees of our algorithm. 0 20 40 60 80 100 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1 SVD truncation level RMSE MC RPIT (a) 120 20 40 60 80 100 0 20 40 60 80 100 120 SVD Truncation Level r1 r3 r2 (b) Figure 2: Empirical results on the Movielens dataset. (a) Comparison of RMSE with different truncation levels. MC: Matrix completion algorithm. RPIT: Recovery algorithm for pairwise interaction tensor. (b) Rank of recovered matrix X, Y, Z. r1 = rank(X), r2 = rank(Y), r3 = rank(Z). 5 Conclusion In this paper, we proved rigorous guarantees for convex programs for recovery of pairwise interaction tensors with missing entries, both in the absence and in the presence of noise. We designed a scalable optimization algorithm for solving the convex programs. We supplemented our theoretical results with simulation experiments and a real-world application to movie recommendation. In the noiseless case, simulations showed that the exact recovery almost always succeeded if the number of observations is a constant time of the degree of freedom, which agrees asymptotically with the theoretical result. In the noisy case, the simulation results confirmed that the stable recovery algorithm is able to reliably recover pairwise interaction tensor from noisy observations. Our results on the temporal movie recommendation application demonstrated that, by incorporating the temporal information, our algorithm outperforms conventional matrix completion and achieves state-of-the-art results. Acknowledgments This work was fully supported by the Basic Research Program of Shenzhen (Project No. JCYJ20120619152419087 and JC201104220300A), and the Research Grants Council of the Hong Kong Special Administrative Region, China (Project No. CUHK 413212 and CUHK 415212). 8 References [1] Evrim Acar, Daniel M Dunlavy, Tamara G Kolda, and Morten Mørup. Scalable tensor factorizations for incomplete data. Chemometrics and Intelligent Laboratory Systems, 106(1):41–56, 2011. [2] M Berry et al. Svdpackc (version 1.0) user’s guide, university of tennessee tech. Report (393-194, 1993 (Revised October 1996)., 1993. [3] Jian-Feng Cai, Emmanuel J Cand`es, and Zuowei Shen. A singular value thresholding algorithm for matrix completion. SIAM Journal on Optimization, 20(4):1956–1982, 2010. [4] Emmanuel J Candes and Yaniv Plan. Matrix completion with noise. Proceedings of the IEEE, 98(6):925– 936, 2010. [5] Emmanuel J Cand`es and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. [6] A Evgeniou and Massimiliano Pontil. Multi-task feature learning. 2007. [7] Maryam Fazel, Haitham Hindi, and Stephen P Boyd. A rank minimization heuristic with application to minimum order system approximation. In American Control Conference, 2001, 2001. [8] David Gross, Yi-Kai Liu, Steven T Flammia, Stephen Becker, and Jens Eisert. Quantum state tomography via compressed sensing. Physical review letters, 105(15):150401, 2010. [9] Johan H˚astad. Tensor rank is np-complete. Journal of Algorithms, 11(4):644–654, 1990. [10] Christopher Hillar and Lek-Heng Lim. Most tensor problems are np hard. JACM, 2013. [11] Prateek Jain, Raghu Meka, and Inderjit Dhillon. Guaranteed rank minimization via singular value projection. In NIPS, 2010. [12] Tamara G Kolda and Brett W Bader. Tensor decompositions and applications. SIAM review, 51(3):455– 500, 2009. [13] Yehuda Koren, Robert Bell, and Chris Volinsky. Matrix factorization techniques for recommender systems. Computer, 42(8):30–37, 2009. [14] Rasmus Munk Larsen. Propack-software for large and sparse svd calculations. Available online., 2004. [15] Ji Liu, Przemyslaw Musialski, Peter Wonka, and Jieping Ye. Tensor completion for estimating missing values in visual data. In ICCV, 2009. [16] Ian Porteous, Evgeniy Bart, and Max Welling. Multi-hdp: A non-parametric bayesian model for tensor factorization. In AAAI, 2008. [17] Steffen Rendle, Leandro Balby Marinho, Alexandros Nanopoulos, and Lars Schmidt-Thieme. Learning optimal ranking with tensor factorization for tag recommendation. In SIGKDD, 2009. [18] Steffen Rendle, Christoph Freudenthaler, and Lars Schmidt-Thieme. Factorizing personalized markov chains for next-basket recommendation. In WWW, 2010. [19] Steffen Rendle and Lars Schmidt-Thieme. Pairwise interaction tensor factorization for personalized tag recommendation. In ICDM, 2010. [20] Amnon Shashua and Tamir Hazan. Non-negative tensor factorization with applications to statistics and computer vision. In ICML, 2005. [21] Yue Shi, Alexandros Karatzoglou, Linas Baltrunas, Martha Larson, Alan Hanjalic, and Nuria Oliver. Tfmap: Optimizing map for top-n context-aware recommendation. In SIGIR, 2012. [22] Nathan Srebro, Jason DM Rennie, and Tommi Jaakkola. Maximum-margin matrix factorization. NIPS, 2005. [23] Ryota Tomioka, Kohei Hayashi, and Hisashi Kashima. Estimation of low-rank tensors via convex optimization. arXiv preprint arXiv:1010.0789, 2010. [24] Ryota Tomioka, Taiji Suzuki, Kohei Hayashi, and Hisashi Kashima. Statistical performance of convex tensor decomposition. NIPS, 2011. [25] Jason Weston, Chong Wang, Ron Weiss, and Adam Berenzweig. Latent collaborative retrieval. ICML, 2012. [26] Liang Xiong, Xi Chen, Tzu-Kuo Huang, Jeff Schneider, and Jaime G Carbonell. Temporal collaborative filtering with bayesian probabilistic tensor factorization. In SDM, 2010. 9
2013
197
4,928
A* Lasso for Learning a Sparse Bayesian Network Structure for Continuous Variables Jing Xiang Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 jingx@cs.cmu.edu Seyoung Kim Lane Center for Computational Biology Carnegie Mellon University Pittsburgh, PA 15213 sssykim@cs.cmu.edu Abstract We address the problem of learning a sparse Bayesian network structure for continuous variables in a high-dimensional space. The constraint that the estimated Bayesian network structure must be a directed acyclic graph (DAG) makes the problem challenging because of the huge search space of network structures. Most previous methods were based on a two-stage approach that prunes the search space in the first stage and then searches for a network structure satisfying the DAG constraint in the second stage. Although this approach is effective in a lowdimensional setting, it is difficult to ensure that the correct network structure is not pruned in the first stage in a high-dimensional setting. In this paper, we propose a single-stage method, called A* lasso, that recovers the optimal sparse Bayesian network structure by solving a single optimization problem with A* search algorithm that uses lasso in its scoring system. Our approach substantially improves the computational efficiency of the well-known exact methods based on dynamic programming. We also present a heuristic scheme that further improves the efficiency of A* lasso without significantly compromising the quality of solutions. We demonstrate our approach on data simulated from benchmark Bayesian networks and real data. 1 Introduction Bayesian networks have been popular tools for representing the probability distribution over a large number of variables. However, learning a Bayesian network structure from data has been known to be an NP-hard problem [1] because of the constraint that the network structure has to be a directed acyclic graph (DAG). Many of the exact methods that have been developed for recovering the optimal structure are computationally expensive and require exponential computation time [15, 7]. Approximate methods based on heuristic search are more computationally efficient, but they recover a suboptimal structure. In this paper, we address the problem of learning a Bayesian network structure for continuous variables in a high-dimensional space and propose an algorithm that recovers the exact solution with less computation time than the previous exact algorithms, and with the flexibility of further reducing computation time without a significant decrease in accuracy. Many of the existing algorithms are based on scoring each candidate graph and finding a graph with the best score, where the score decomposes for each variable given its parents in a DAG. Although methods may differ in the scoring method that they use (e.g., MDL [9], BIC [14], and BDe [4]), most of these algorithms, whether exact methods or heuristic search techniques, have a two-stage learning process. In Stage 1, candidate parent sets for each node are identified while ignoring the DAG constraint. Then, Stage 2 employs various algorithms to search for the best-scoring network structure that satisfies the DAG constraint by limiting the search space to the candidate parent sets from Stage 1. For Stage 1, methods such as sparse candidate [2], max-min parents children [17], and 1 total conditioning [11] algorithms have been previously proposed. For Stage 2, exact methods based on dynamic programming [7, 15] and A* search algorithm [19] as well as inexact methods such as heuristic search technique [17] and linear programming formulation [6] have been developed. These approaches have been developed primarily for discrete variables, and regardless of whether exact or inexact methods are used in Stage 2, Stage 1 involved exponential computation time and space. For continuous variables, L1-regularized Markov blanket (L1MB) [13] was proposed as a two-stage method that uses lasso to select candidate parents for each variable in Stage 1 and performs heuristic search for DAG structure and variable ordering in Stage 2. Although a two-stage approach can reduce the search space by pruning candidate parent sets in Stage 1, Huang et al. [5] observed that applying lasso in Stage 1 as in L1MB is likely to miss the true parents in a high-dimensional setting, thereby limiting the quality of the solution in Stage 2. They proposed the sparse Bayesian network (SBN) algorithm that formulates the problem of Bayesian network structure learning as a singlestage optimization problem and transforms it into a lasso-type optimization to obtain an approximate solution. Then, they applied a heuristic search to refine the solution as a post-processing step. In this paper, we propose a new algorithm, called A* lasso, for learning a sparse Bayesian network structure with continuous variables in high-dimensional space. Our method is a single-stage algorithm that finds the optimal network structure with a sparse set of parents while ensuring the DAG constraint is satisfied. We first show that a lasso-based scoring method can be incorporated within dynamic programming (DP). While previous approaches based on DP required identifying the exponential number of candidate parent sets and their scores for each variable in Stage 1 before applying DP in Stage 2 [7, 15], our approach effectively combines the score computation in Stage 1 within Stage 2 via lasso optimization. Then, we present A* lasso which significantly prunes the search space of DP by incorporating the A* search algorithm [12], while guaranteeing the optimality of the solution. Since in practice, A* search can still be expensive compared to heuristic methods, we explore heuristic schemes that further limit the search space of A* lasso. We demonstrate in our experiments that this heuristic approach can substantially improve the computation time without significantly compromising the quality of the solution, especially on large Bayesian networks. 2 Background on Bayesian Network Structure Learning A Bayesian network is a probabilistic graphical model defined over a DAG G with a set of p = |V | nodes V = {v1, . . . , vp}, where each node vj is associated with a random variable Xj [8]. The probability model associated with G in a Bayesian network factorizes as p(X1, . . . , Xp) = Qp j=1 p(Xj|Pa(Xj)), where p(Xj|Pa(Xj)) is the conditional probability distribution for Xj given its parents Pa(Xj) with directed edges from each node in Pa(Xj) to Xj in G. We assume continuous random variables and use a linear regression model for the conditional probability distribution of each node Xj = Pa(Xj)′βj + ϵ, where βj = {βjk’s for Xk ∈Pa(Xj)} is the vector of unknown parameters to be estimated from data and ϵ is the noise distributed as N(0, 1). Given a dataset X = [x1, . . . , xp], where xj is a vector of n observations for random variable Xj, our goal is to estimate the graph structure G and the parameters βj’s jointly. We formulate this problem as that of obtaining a sparse estimate of βj’s, under the constraint that the overall graph structure G should not contain directed cycles. Then, the nonzero elements of βj’s indicate the presence of edges in G. We obtain an estimate of Bayesian network structure and parameters by minimizing the negative log likelihood of data with sparsity enforcing L1 penalty as follows: min β1,...,βp p X j=1 ∥xj −x−j ′βj ∥2 2 +λ p X j=1 ∥βj ∥1 s.t. G ∈DAG, (1) where x−j represents all columns of X excluding xj, assuming all other variables are candidate parents of node vj. Given the estimate of βj’s, the set of parents for node vj can be found as the support of βj, S(βj) = {vi|βji ̸= 0}. The λ is the regularization parameter that determines the amount of sparsity in βj’s and can be determined by cross-validation. We notice that if the acyclicity constraint is ignored, Equation (1) decomposes into individual lasso estimations for each node: LassoScore(vj|V \vj) = min βj ∥xj −x−j ′βj ∥2 2 +λ ∥βj ∥1, 2 where V \vj represents the set of all nodes in V excluding vj. The above lasso optimization problem can be solved efficiently with the shooting algorithm [3]. However, the main challenge in optimizing Equation (1) arises from ensuring that the βj’s satisfy the DAG constraint. 3 A* Lasso for Bayesian Network Structure Learning 3.1 Dynamic Programming with Lasso {υ1,υ2} {υ3} {υ2} {} {υ1} {υ1,υ3} {υ2,υ3} {υ1,υ2,υ3} Figure 1: Search space of variable ordering for three variables V = {v1, v2, v3}. The problem of learning a Bayesian network structure that satisfies the constraint of no directed cycles can be cast as that of learning an optimal ordering of variables [8]. Once the optimal variable ordering is given, the constraint of no directed cycles can be trivially enforced by constraining the parents of each variable in the local conditional probability distribution to be a subset of the nodes that precede the given node in the ordering. We let ΠV = [πV 1 , . . . , πV |V |] denote an ordering of the nodes in V , where πV j indicates the node v ∈V in the jth position of the ordering, and ΠV ≺vj denote the set of nodes in V that precede node vj in ordering ΠV . Algorithms based on DP have been developed to learn the optimal variable ordering for Bayesian networks [16]. These approaches are based on the observation that the score of the optimal ordering of the full set of nodes V can be decomposed into (a) the optimal score for the first node in the ordering, given a choice of the first node and (b) the score of the optimal ordering of the nodes excluding the first node. The optimal variable ordering can be constructed by recursively applying this decomposition to select the first node in the ordering and to find the optimal ordering of the set of remaining nodes U ⊂V . This recursion is given as follows, with an initial call of the recursion with U = V : OptScore(U) = min vj∈UOptScore(U\vj) + BestScore(vj|V \U) (2) πU 1 = argmin vj∈U OptScore(U\vj) + BestScore(vj|V \U), (3) where BestScore(vj|V \U) is the optimal score of vj under the optimal choice of parents from V \U. In order to obtain BestScore(vj|V \U) in Equations (2) and (3), for the case of discrete variables, many previous approaches enumerated all possible subsets of V as candidate sets of parents for node vj to precompute BestScore(vj|V \U) in Stage 1 before applying DP in Stage 2 [7, 15]. While this approach may perform well in a low-dimensional setting, in a high-dimensional setting, a two-stage method is likely to miss the true parent sets in Stage 1, which in turn affects the performance of Stage 2 [5]. In this paper, we consider the high-dimensional setting and present a single-stage method that applies lasso to obtain BestScore(vj|V \U) within DP as follows: BestScore(vj|V \U) = LassoScore(vj|V \U) = min βj,S(βj)⊆V \U ∥xj −x−j ′βj ∥2 2 +λ ∥βj ∥1 . The constraint S(βj) ⊆V \U in the above lasso optimization can be trivially maintained by setting the βjk for vk ∈U to 0 and optimizing only for the other βjk’s. When applying the recursion in Equations (2) and (3), DP takes advantage of the overlapping subproblems to prune the search space of orderings, since the problem of computing OptScore(U) for U ⊆V can appear as a subproblem of scoring orderings of any larger subsets of V that contain U. The problem of finding the optimal variable ordering can be viewed as that of finding the shortest path from the start state to the goal state in a search space given as a subset lattice. The search space consists of a set of states, each of which is associated with one of the 2|V | possible subsets of nodes in V . The start state is the empty set {} and the goal state is the set of all variables V . A valid move in this search space is defined from a state for subset Qs to another state for subset Qs′, only if Qs′ contains one additional node to Qs. Each move to the next state corresponds to adding a node at the end of the ordering of the nodes in the previous state. The cost of such a move is given by BestScore(v|Qs), where v = Qs′\Qs. Each path from the start state to the goal state gives one 3 possible ordering of nodes. Figure 1 illustrates the search space, where each state is associated with a Qs. DP finds the shortest path from the start state to the goal state that corresponds to the optimal variable ordering by considering all possible paths in this search space and visiting all 2|V | states. 3.2 A* Lasso for Pruning Search Space As discussed in the previous section, DP considers all 2|V | states in the subset lattice to find the optimal variable ordering. Thus, it is not sufficiently efficient to be practical for problems with more than 20 nodes. On the other hand, a greedy algorithm is computationally efficient because it explores a single variable ordering by greedily selecting the most promising next state based on BestScore(v|Qs), but it returns a suboptimal solution. In this paper, we propose A* lasso that incorporates the A* search algorithm [12] to construct the optimal variable ordering in the search space of the subset lattice. We show that this strategy can significantly prune the search space compared to DP, while maintaining the optimality of the solution. When selecting the next move in the process of constructing a path in the search space, instead of greedily selecting the move, A* search also accounts for the estimate of the future cost given by a heuristic function h(Qs) that will be incurred to reach the goal state from the candidate next state. Although the exact future cost is not known until A* search constructs the full path by reaching the goal state, a reasonable estimate of the future cost can be obtained by ignoring the directed acyclicity constraint. It is well-known that A* search is guaranteed to find the shortest path if the heuristic function h(Qs) is admissible [12], meaning that h(Qs) is always an underestimate of the true cost of reaching the goal state. Below, we describe an admissible heuristic for A* lasso. While exploring the search space, A* search algorithm assigns a score f(Qs) to each state and its corresponding subset Qs of variables for which the ordering has been determined. A* search algorithm computes this score f(Qs) as the sum of the cost g(Qs) that has been incurred so far to reach the current state from the start state and an estimate of the cost h(Qs) that will be incurred to reach the goal state from the current state: f(Qs) = g(Qs) + h(Qs). (4) More specifically, given the ordering ΠQs of variables in Qs that has been constructed along the path from the start state to the state for Qs, the cost that has been incurred so far is defined as g(Qs) = X vj∈Qs LassoScore(vj|ΠQs ≺vj) (5) and the heuristic function for the estimate of the future cost to reach the goal state is defined as: h(Qs) = X vj∈V \Qs LassoScore(vj|V \vj) (6) Note that the heuristic function is admissible, or an underestimate of the true cost, since the constraint of no directed cycles is ignored and each variable in V \Qs is free to choose any variables in V as its parents, which lowers the lasso objective value. When the search space is a graph where multiple paths can reach the same state, we can further improve efficiency if the heuristic function has the property of consistency in addition to admissibility. A consistent heuristic always satisfies h(Qs) ≤h(Qs′) + LassoScore(vk|Qs), where LassoScore(vk|Qs) is the cost of moving from state Qs to state Qs′ with {vk} = Qs′\Qs. Consistency ensures that the first path found by A* search to reach the given state is always the shortest path to that state [12]. This allows us to prune the search when we reach the same state via a different path later in the search. The following proposition states that our heuristic function is consistent. Proposition 1 The heuristic in Equation (6) is consistent. Proof For any successor state Qs′ of Qs, let vk = Qs′\Qs. h(Qs) = X vj∈V \Qs LassoScore(vj|V \vj) = X vj∈V \Qs,vj̸=vk LassoScore(vj|V \vj) + LassoScore(vk|V \vk) ≤h(Qs′) + LassoScore(vk|Qs), 4 Input : X, V , λ Output: Optimal variable ordering ΠV Initialize OPEN to an empty queue; Initialize CLOSED to an empty set; Compute LassoScore(vj|V \vj) for all vj ∈V ; OPEN.insert((Qs = {}, f(Qs) = h({}), g(Qs) = 0, ΠQs = [ ])); while true do (Qs, f(Qs), g(Qs), ΠQs) ←OPEN.pop(); if h(Qs) = 0 then Return ΠV ←ΠQs; end foreach v ∈V \Qs do Qs′ ←Qs ∪{v}; if Qs′ /∈CLOSED then Compute LassoScore(v|Qs) with lasso shooting algorithm; g(Qs′) ←g(Qs) + LassoScore(v|Qs); h(Qs′) ←h(Qs) −LassoScore(v|V \v); f(Qs′) ←g(Qs′) + h(Qs′); ΠQs′ ←[ΠQs, v]; OPEN.insert(L = (Qs′, f(Qs′), g(Qs′), ΠQs′ )); CLOSED ←CLOSED ∪{Qs′}; end end end Algorithm 1: A* lasso for learning Bayesian network structure where LassoScore(vk|Qs) is the true cost of moving from state Qs to Qs′. The inequality above holds because vk has fewer parents to choose from in LassoScore(vk|Qs) than in LassoScore(vk|V \vk). Thus, our heuristic in Equation (6) is consistent. Given a consistent heuristic, many paths that go through the same state can be pruned by maintaining an OPEN list and a CLOSED list during A* search. In practice, the OPEN list can be implemented with a priority queue and the CLOSED list can be implemented with a hash table. The OPEN list is a priority queue that maintains all the intermediate results (Qs, f(Qs), g(Qs), ΠQs)’s for a partial construction of the variable ordering up to Qs at the frontier of the search, sorted according to the score f(Qs). During search, A* lasso pops from the OPEN list the partial construction of ordering with the lowest score f(Qs), visits the successor states by adding another node to the ordering ΠQs, and queues the results onto the OPEN list. Any state that has been popped by A* lasso is placed in the CLOSED list. The states that have been placed in the CLOSED list are not considered again, even if A* search reaches these states through different paths later in the search. The full algorithm for A* lasso is given in Algorithm 1. As in DP with lasso, A* lasso is a singlestage algorithm that solves lasso within A* search. Every time A* lasso moves from state Qs to the next state Qs′ in the search space, LassoScore(vj|ΠQs ≺vj) for {vj} = Qs′\Qs is computed with the shooting algorithm and added to g(Qs) to obtain g(Qs′). The heuristic score h(Qs′) can be precomputed as LassoScore(vj|V \vj) for all vj ∈V for a simple look-up during A* search. 3.3 Heuristic Schemes for A* Lasso to Improve Scalability Although A* lasso substantially prunes the search space compared to DP, it is not sufficiently efficient for large graphs, because it still considers a large number of states in the exponentially large search space. One simple strategy for further pruning the search space would be to limit the size of the priority queue in the OPEN list, forcing A* lasso to discard less promising intermediate results first. In this case, limiting the queue size to one is equivalent to a greedy algorithm with a scoring function in Equation (4). In our experiments, we found that such a naive strategy substantially reduced the quality of solutions because the best-scoring intermediate results tend to be the results at the early stage of the exploration. They are at the shallow part of the search space near the start state because the admissible heuristic underestimates the true cost. Instead, given a limited queue size, we propose to distribute the intermediate results to be discarded across different depths/layers of the search space. For example, given the depth of the search space 5 Table 1: Comparison of computation time of different methods Dataset (Nodes) DP A* lasso A* Qlimit 1000 A* Qlimit 200 A* Qlimit 100 A* Qlimit 5 L1MB SBN Dsep (6) 0.20 (64) 0.14 (15) – (–) – (–) – (–) 0.17 (11) 2.65 8.76 Asia (8) 1.07 (256) 0.26 (34) – (–) – (–) – (–) 0.22 (12) 2.79 8.9 Bowling (9) 2.42 (512) 0.48 (94) – (–) – (–) – (–) 0.23 (13) 2.85 8.75 Inversetree (11) 8.44 (2048) 1.68 (410) – (–) 1.8 (423) 1.16 (248) 0.2 (16) 3.03 8.56 Rain (14) 1216 (1.60e4) 76.64 (2938) 64.38 (1811) 13.97 (461) 7.88 (270) 1.67 (17) 12.26 10.19 Cloud (16) 1.6e4 (6.6e4) 137.36 (2660) 108.39 (1945) 26.16 (526) 9.92 (244) 2.14 (19) 4.72 14.56 Funnel (18) 4.2e4 (2.6e5) 1527.0 (2.3e4) 88.87 (2310) 25.19 (513) 11.53 (248) 2.73 (21) 4.76 10.08 Galaxy (20) 1.3e5 (1.0e6) 2.40e4 (8.2e4) 110.05 (3093) 27.59 (642) 12.02 (323) 3.03 (23) 6.59 11.0 Factor (27) – (–) – (–) 1389.7 (3912) 125.91 (801) 59.92 (397) 3.96 (30) 9.04 13.91 Insurance (27) – (–) – (–) 2874.2 (3448) 442.65 (720) 202.9 (395) 16.31 (33) 10.96 29.45 Water (32) – (–) – (–) 2397.0 (3442) 301.67 (687) 130.71 (343) 12.14 (38) 32.73 14.96 Mildew (35) – (–) – (–) 3928.8 (3737) 802.76 (715) 339.04 (368) 29.3 (36) 15.25 116.33 Alarm (37) – (–) – (–) 2732.3 (3426) 384.87 (738) 158.0 (378) 12.42 (42) 7.91 39.78 Barley (48) – (–) – (–) 10766.0 (4072) 1869.4 (807) 913.46 (430) 109.14 (52) 23.25 483.33 Hailfinder (56) – (–) – (–) 9752.0 (3939) 2580.5 (816) 1058.3 (390) 112.61 (57) 44.36 826.41 Table 2: A* lasso computation time under different edge strengths βj’s Dataset (Nodes) (1.2,1.5) (1,1.2) (0.8,1) Dsep (6) 0.14 (15) 0.14 (16) 0.17 (30) Asia (8) 0.26 (34) 0.23 (37) 0.29 (59) Bowling (9) 0.48 (94) 0.49 (103) 0.54 (128) Inversetree (11) 1.68 (410) 2.09 (561) 2.25 (620) Rain (14) 76.64 (2938) 66.93 (2959) 97.26 (4069) Cloud (16 ) 137.36 (2660) 229.12 (7805) 227.43 (8858) Funnel (18) 1526.7 (22930) 2060.2 (33271) 3744.4 (40644) Galaxy (20) 24040 (82132) 66710 (168492) 256490 (220821) |V |, if we need to discard k intermediate results, we discard k/|V | intermediate results at each depth. In our experiments, we found that this heuristic scheme substantially improves the computation time of A* lasso with a small reduction in the quality of the solution. We also considered other strategies such as inflating heuristics [10] and pruning edges in preprocessing with lasso, but such strategies substantially reduced the quality of solutions. 4 Experiments 4.1 Simulation Study We perform simulation studies in order to evaluate the accuracy of the estimated structures and measure the computation time of our method. We created several small networks under 20 nodes and obtained the structure of several benchmark networks between 27 and 56 nodes from the Bayesian Network Repository (the left-most column in Table 1). In addition, we used the tiling technique [18] to generate two networks of approximately 300 nodes so that we could evaluate our method on larger graphs. Given the Bayesian network structures, we set the parameters βj for each conditional probability distribution of node vj such that βjk ∼±Uniform[l, u] for predetermined values for u and l if node vk is a parent of node vj and βjk = 0 otherwise. We then generated data from each Bayesian network by forward sampling with noise ϵ ∼N(0, 1) in the regression model, given the true variable ordering. All data were mean-centered. We compare our method to several other methods including DP with lasso for an exact method, L1MB for heuristic search, and SBN for an optimization-based approximate method. We downloaded the software implementations of L1MB and SBN from the authors’ website. For L1MB, we increased the authors’ recommended number of evaluations 2500 to 10 000 in Stage 2 heuristic search for all networks except the two larger networks of around 300 nodes (Alarm 2 and Hailfinder 2), where we used two different settings of 50 000 and 100 000 evaluations. We also evaluated A* lasso with the heuristic scheme with the queue sizes of 5, 100, 200, and 1000. DP, A* lasso, and A* lasso with a limited queue size require a selection of the regularization parameter λ with cross-validation. In order to determine the optimal value for λ, for different values of λ, we trained a model on a training set, performed an ordinary least squares re-estimation of the non-zero elements of βj to remove the bias introduced by the L1 penalty, and computed prediction errors on the validation set. Then, we selected the value of λ that gives the smallest prediction error as the optimal λ. We used a training set of 200 samples for relatively small networks with under 6 0 0.5 1 0 0.5 1 Recall Precision Factors L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Alarm L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Barley L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Hailfinder L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Insurance L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Mildew L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Water L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Alarm 2 L1MB−5e4 L1MB−1e5 SBN A*−Qlim=5 A*−Qlim=100 0 0.5 1 0 0.5 1 Recall Precision Hailfinder 2 L1MB−5e4 L1MB−1e5 SBN A*−Qlim=5 A*−Qlim=100 Figure 2: Precision/recall curves for the recovery of skeletons of benchmark Bayesian networks. 0 0.5 1 0 0.5 1 Recall Precision Factors L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Alarm L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Barley L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Hailfinder L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Insurance L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Mildew L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Water L1MB SBN A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 0 0.5 1 0 0.5 1 Recall Precision Alarm 2 L1MB−5e4 L1MB−1e5 SBN A*−Qlim=5 A*−Qlim=100 0 0.5 1 0 0.5 1 Recall Precision Hailfinder 2 L1MB−5e4 L1MB−1e5 SBN A*−Qlim=5 A*−Qlim=100 Figure 3: Precision/recall curves for the recovery of v-structures of benchmark Bayesian networks. 60 nodes and a training set of 500 samples for the two large networks with around 300 nodes. We used a validation set of 500 samples. For L1MB and SBN, we used a similar strategy to select the regularization parameters, while mainly following the strategy suggested by the authors and in their software implementation. We present the computation time for the different methods in Table 1. For DP, A* lasso, and A* lasso with limited queue sizes, we also record the number of states visited in the search space in parentheses in Table 1. All methods were implemented in Matlab and were run on computers with 2.4 GHz processors. We used a dataset generated from a true model with βjk ∼±Uniform[1.2, 1.5]. It can be seen from Table 1 that DP considers all possible states 2|V | in the search space that grows exponentially with the number of nodes. It is clear that A* lasso visits significantly fewer states than DP, visiting about 10% of the number of states in DP for the funnel and galaxy networks. We were unable to obtain the computation time for A* lasso and DP for some of the larger graphs in Table 1 as they required significantly more time. Limiting the size of the queue in A* lasso reduces both the computation time and the number of states visited. For smaller graphs, we do not report the computation time for A* lasso with limited queue size, since it is identical to the full A* lasso. We notice that the computation time for A* lasso with a small queue of 5 or 100 is comparable to that of L1MB and SBN. In general, we found that the extent of pruning of the search space by A* lasso compared to DP depends on the strengths of edges (βj values) in the true model. We applied DP and A* lasso to datasets of 200 samples generated from each of the networks under each of the three settings for the true edge strengths, ±Uniform[1.2, 1.5], ±Uniform[1, 1.2], and ±Uniform[0.8, 1]. As can be seen from the computation time and the number of states visited by DP and A* lasso in Table 2, as the strengths of edges increase, the number of states visited by A* lasso and the computation time tend to decrease. The results in Table 2 indicate that the efficiency of A* lasso is affected by the signal-to-noise ratio. 7 1 2 3 4 5 6 7 8 9 5 10 15 20 25 30 Network Prediction Error L1MB−5e4 L1MB−1e5 L1MB SBN A*−Qlim=5 A*−Qlim=100 A*−Qlim=200 A*−Qlim=1000 Figure 4: Prediction errors for benchmark Bayesian networks. The x-axis labels indicate different benchmark Bayesian networks for 1: Factors, 2: Alarm, 3: Barley, 4: Hailfinder, 5: Insurance, 6: Mildew, 7: Water, 8: Alarm 2, and 9: Hailfinder 2. In order to evaluate the accuracy of the Bayesian network structures recovered by each method, we make use of the fact that two Bayesian network structures are indistinguishable if they belong to the same equivalence class, where an equivalence class is defined as the set of networks with the same skeleton and v-structures. The skeleton of a Bayesian network is defined as the edge connectivities ignoring edge directions and a v-structure is defined as the local graph structure over three variables, with two variables pointing to the other variables (i.e., A →B ←C). We evaluated the performance of the different methods by comparing the estimated network structure with the true network structure in terms of skeleton and v-structures and computing the precision and recall. The precision/recall curves for the skeleton and v-structures of the models estimated by the different methods are shown in Figures 2 and 3, respectively. Each curve was obtained as an average over the results from 30 different datasets for the two large graphs (Alarm 2 and Hailfinder 2) and from 50 different datasets for all the other Bayesian networks. All data were simulated under the setting βjk ∼±Uniform[0.4, 0.7]. For the benchmark Bayesian networks, we used A* lasso with different queue sizes, including 100, 200, and 1000, whereas for the two large networks (Alarm 2 and Hailfinder 2) that require more computation time, we used A* lasso with queue size of 5 and 100. As can be seen in Figures 2 and 3, all methods perform relatively well on identifying the true skeletons, but find it significantly more challenging to recover the true v-structures. We find that although increasing the size of queues in A* lasso generally improves the performance, even with smaller queue sizes, A* lasso outperforms L1MB and SBN in most of the networks. While A* lasso with a limited queue size preforms consistently well on smaller networks, it significantly outperforms the other methods on the larger graphs such as Alarm 2 and Hailfinder 2, even with a queue size of 5 and even when the number of evaluations for L1MB has been increased to 50 000 and 100 000. This demonstrates that while limiting the queue size in A* lasso will not guarantee the optimality of the solution, it still reduces the computation time of A* lasso dramatically without substantially compromising the quality of the solution. In addition, we compare the performance of the different methods in terms of prediction errors on independent test datasets in Figure 4. We find that the prediction errors of A* lasso are consistently lower even with a limited queue size. 4.2 Analysis of S&P Stock Data Prediction Error 5.0 5.2 5.4 5.6 5.8 6.0 L1MB−5e4 L1MB−1e5 SBN A*−Q5 A*−Q100 A*−Q200 Figure 5: Prediction errors for S&P stock price data. We applied the methods on the daily stock price data of the S&P 500 companies to learn a Bayesian network that models the dependencies in prices among different stocks. We obtained the stock prices of 125 companies over 1500 time points between Jan 3, 2007 and Dec 17, 2012. We estimated a Bayesian network using the first 1000 time points with the different methods, and then computed prediction errors on the last 500 time points. For L1MB, we used two settings for the number of evaluations, 50 000 and 100 000. We applied A* lasso with different queue limits of 5, 100, and 200. The prediction accuracies for the various methods are shown in Figure 5. Our method obtains lower prediction errors than the other methods, even with the smaller queue sizes. 5 Conclusions In this paper, we considered the problem of learning a Bayesian network structure and proposed A* lasso that guarantees the optimality of the solution while reducing the computational time of the well-known exact methods based on DP. We proposed a simple heuristic scheme that further improves the computation time but does not significantly reduce the quality of the solution. Acknowledgments This material is based upon work supported by an NSF CAREER Award No. MCB-1149885, Sloan Research Fellowship, and Okawa Foundation Research Grant to SK and by a NSERC PGS-D to JX. 8 References [1] David Maxwell Chickering. Learning Bayesian networks is NP-complete. In Learning from data, pages 121–130. Springer, 1996. [2] Nir Friedman, Iftach Nachman, and Dana Pe´er. Learning Bayesian network structure from massive datasets: the “Sparse Candidate” algorithm. In Proceedings of the Fifteenth conference on Uncertainty in Artificial Intelligence, pages 206–215. Morgan Kaufmann Publishers Inc., 1999. [3] Wenjiang J Fu. Penalized regressions: the bridge versus the lasso. Journal of Computational and Graphical Statistics, 7(3):397–416, 1998. [4] David Heckerman, Dan Geiger, and David M Chickering. Learning Bayesian networks: The combination of knowledge and statistical data. Machine learning, 20(3):197–243, 1995. [5] Shuai Huang, Jing Li, Jieping Ye, Adam Fleisher, Kewei Chen, Teresa Wu, and Eric Reiman. A sparse structure learning algorithm for Gaussian Bayesian network identification from high-dimensional data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(6):1328–1342, 2013. [6] Tommi Jaakkola, David Sontag, Amir Globerson, and Marina Meila. Learning Bayesian network structure using LP relaxations. In Proceedings of the Thirteenth International Conference on Artificial intelligence and Statistics (AISTATS), 2010. [7] Mikko Koivisto and Kismat Sood. Exact Bayesian structure discovery in Bayesian networks. Journal of Machine Learning Research, 5:549–573, 2004. [8] Daphne Koller and Nir Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. [9] Wai Lam and Fahiem Bacchus. Learning Bayesian belief networks: An approach based on the MDL principle. Computational intelligence, 10(3):269–293, 1994. [10] Maxim Likhachev, Geoff Gordon, and Sebastian Thrun. ARA*: Anytime A* with provable bounds on sub-optimality. Advances in Neural Information Processing Systems (NIPS), 16, 2003. [11] Jean-Philippe Pellet and Andr´e Elisseeff. Using Markov blankets for causal structure learning. The Journal of Machine Learning Research, 9:1295–1342, 2008. [12] Stuart Jonathan Russell, Peter Norvig, John F Canny, Jitendra M Malik, and Douglas D Edwards. Artificial intelligence: a modern approach, volume 74. Prentice hall Englewood Cliffs, 1995. [13] Mark Schmidt, Alexandru Niculescu-Mizil, and Kevin Murphy. Learning graphical model structure using L1-regularization paths. In Proceedings of the National Conference on Artificial Intelligence, volume 22, page 1278, 2007. [14] Gideon Schwarz. Estimating the dimension of a model. The Annals of Statistics, 6(2):461–464, 1978. [15] Ajit Singh and Andrew Moore. Finding optimal Bayesian networks by dynamic programming. Technical Report 05-106, School of Computer Science, Carnegie Mellon University, 2005. [16] Marc Teyssier and Daphne Koller. Ordering-based search: A simple and effective algorithm for learning Bayesian networks. In Proceedings of the Twentieth conference on Uncertainty in Artificial Intelligence, pages 584–590, 2005. [17] Ioannis Tsamardinos, Laura E Brown, and Constantin F Aliferis. The max-min hill-climbing Bayesian network structure learning algorithm. Machine Learning, 65(1):31–78, 2006. [18] Ioannis Tsamardinos, Alexander Statnikov, Laura E Brown, and Constantin F Aliferis. Generating realistic large Bayesian networks by tiling. In the Nineteenth International FLAIRS conference, pages 592–597, 2006. [19] Changhe Yuan, Brandon Malone, and Xiaojian Wu. Learning optimal Bayesian networks using A* search. In Proceedings of the Twenty-Second international joint conference on Artificial Intelligence, pages 2186–2191. AAAI Press, 2011. 9
2013
198
4,929
High-Dimensional Gaussian Process Bandits Josip Djolonga ETH Z¨urich josipd@ethz.ch Andreas Krause ETH Z¨urich krausea@ethz.ch Volkan Cevher EPFL volkan.cevher@epfl.ch Abstract Many applications in machine learning require optimizing unknown functions defined over a high-dimensional space from noisy samples that are expensive to obtain. We address this notoriously hard challenge, under the assumptions that the function varies only along some low-dimensional subspace and is smooth (i.e., it has a low norm in a Reproducible Kernel Hilbert Space). In particular, we present the SI-BO algorithm, which leverages recent low-rank matrix recovery techniques to learn the underlying subspace of the unknown function and applies Gaussian Process Upper Confidence sampling for optimization of the function. We carefully calibrate the exploration–exploitation tradeoff by allocating the sampling budget to subspace estimation and function optimization, and obtain the first subexponential cumulative regret bounds and convergence rates for Bayesian optimization in high-dimensions under noisy observations. Numerical results demonstrate the effectiveness of our approach in difficult scenarios. 1 Introduction The optimization of non-linear functions whose evaluation may be noisy and expensive is a challenge that has important applications in sciences and engineering. One approach to this notoriously hard problem takes a Bayesian perspective, which uses the predictive uncertainty in order to trade exploration (gathering data for reducing model uncertainty) and exploitation (focusing sampling near likely optima), and is often called Bayesian Optimization (BO). Modern BO algorithms are quite successful, surpassing even human experts in learning tasks: e.g., gait control for the SONY AIBO, convolutional neural networks, structural SVMs, and Latent Dirichlet Allocation [1, 2, 3]. Unfortunately, the theoretical efficiency of these methods depends exponentially on the—often high—dimension of the domain over which the function is defined. A way to circumvent this “curse of dimensionality” is to make the assumption that only a small number of the dimensions actually matter. For example, the cost function of neural networks effectively varies only along a few dimensions [2]. This idea has been also at the root of nonparametric regression approaches [4, 5, 6, 7]. To this end, we propose an algorithm that learns a low dimensional, not necessarily axis-aligned, subspace and then applies Bayesian optimization on this estimated subspace. In particular, our SIBO approach combines low-rank matrix recovery with Gaussian Process Upper Confidence Bound sampling in a carefully calibrated manner. We theoretically analyze its performance, and prove bounds on its cumulative regret. To the best of our knowledge, we prove the first subexponential bounds for Bayesian optimization in high dimensions under noisy observations. In contrast to existing approaches, which have an exponential dependence on the ambient dimension, our bounds have in fact polynomial dependence on the dimension. Moreover, our performance guarantees depend explicitly on what we could have achieved if we had known the subspace in advance. Previous work. Exploration–exploitation tradeoffs were originally studied in the context of finite multi-armed bandits [8]. Since then, results have been obtained for continuous domains, starting with the linear [9] and Lipschitz-continuous cases [10, 11]. A more recent algorithm that enjoys theoretical bounds for functions sampled from a Gaussian Process (GP), or belong to some Repro1 ducible Kernel Hilbert Space (RKHS) is GP-UCB [12]. The use of GPs to negotiate exploration– exploitation tradeoffs originated in the areas of response surface and Bayesian optimization, for which there are a number of approaches (cf., [13]), perhaps most notably the Expected Improvement [14] approach, which has recently received theoretical justification [15], albeit only in the noise-free setting. Bandit algorithms that exploit low-dimensional structure of the function appeared first for the linear setting, where under sparsity assumptions one can obtain bounds, which depend only weakly on the ambient dimension [16, 17]. In [18] the more general case of functions sampled from a GP under the same sparsity assumptions was considered. The idea of random projections to BO has been recently introduced [19]. They provide bounds on the simple regret under noiseless observations, while we also analyze the cumulative regret and allow noisy observations. Also, unless the low-dimensional space is of dimension 1, our bounds on the simple regret improve on theirs. In [7] the authors approximate functions that live on low-dimensional subspaces using low-rank recovery and analysis techniques. While providing uniform approximation guarantees, their approach is not tailored towards exploration–exploitation tradeoffs, and does not achieve sublinear cumulative regret. In [20] the stochastic and adversarial cases for axis-aligned H¨older continuous functions are considered. Our specific contributions in this paper can be summarized as follows: • We introduce the SI-BO algorithm for Bayesian bandit optimization in high dimensions, admitting a large family of kernel functions. Our algorithm is a natural but non-trivial fusion of modern low-rank subspace approximation tools with GP optimization methods. • We derive theoretical guarantees on SI-BO’s cumulative and simple regret in highdimensions with noise. To the best of our knowledge, these are the first theoretical results on the sample complexity and regret rates that are subexponential in the ambient dimension. • We provide experimental results on synthetic data and classical benchmarks. 2 Background and Problem Statement Goal. In plain words, we wish to sequentially optimize a bounded function over a compact, convex subset D ⊂Rd. Without loss of generality, we denote the function by f : D →[0, 1] and let x∗ be a maximizer. The algorithm proceeds in a total of T rounds. In each round t, it asks an oracle for the function value at some point xt and it receives back the value f(xt), possibly corrupted by noise. Our goal is to choose points such that their values are close to the optimum f(x∗). As performance metric, we consider the regret, which tells us how much better we could have done in round t had we known x∗, or formally rt = f(x∗) −f(xt). In many applications, such as recommender systems, robotic control, etc., we care about the quality of the points chosen at every time step t. Hence, a natural quantity to consider is the cumulative regret defined as RT = PT t=1 rt. One can also consider the simple regret, defined as ST = minT t=1 rt, measuring the quality of the best solution found so far. We will give bounds on the more challenging notion of cumulative regret, which also bounds the simple regret via ST ≤RT /T. Low-dimensional functions in high-dimensions. Unfortunately, our problem cannot be tractably solved without further assumptions on the properties of the function f. What is worse is that the usual compact support and smoothness assumptions cannot achieve much: the minimax lower bound on the sample complexity is exponential in d [21, 6, 7]. We hence assume that the function effectively varies only along a small number of true active dimensions: i.e., the function lives on a k ≪d-dimensional subspace. Typically, k or an upper bound on k is assumed known [4, 5, 7, 6]. Formally, we suppose that there exists some function g : Rk →[0, 1] and a matrix A ∈Rk×d with orthogonal rows so that f(x) = g(Ax). We will additionally assume that g ∈C2, which is necessary to bound the errors from the linear approximation that we will make. Further, w.l.o.g., we assume that D = Bd(1+ ¯ε) for some ¯ε > 0, where we define Bd(r) to be the closed ball around 0 of radius r in Rd.1 To be able to recover the subspace we also need the condition that g has Lipschitz continuous second order derivatives and a full rank Hessian at 0, which is satisfied for many functions [7]. Smooth, low-complexity functions. In addition to the low-dimensional subspace assumption, we also assume that g is smooth. One way to encode our prior is to assume that the function g resides in 1Our method method can be extended to any convex compact set, see Section 5.2 in [22]. 2 Algorithm 1 The SI-BO algorithm Require: mX, mΦ, λ, ε, k, oracle for f, kernel κ C ←mX samples uniformly from Sd−1 for i ←1 to mX do Φi ←mΦ samples uniformly from {±1/√mΦ}k y ←compute using Equation 1 ˆXDS ←Dantzig Selector using y, see Equation 2 and compute the SVD ˆXDS = ˆU ˆΣ ˆV T ˆA ←ˆU (k) // Principal k vectors of ˆU, D ←all ( ˆAx, y) pairs queried so far Use GP inference to obtain µ1(·), σ1(·). for t ←1 to T −mX(mΦ + 1) do zt ←arg maxz µt(z) + β1/2 t σt(z) , yt ←f( ˆAT zt) + noise , D.add(zt, yt) a Reproducing Kernel Hilbert Space (RKHS; cf., [23]), which allows us to quantify g’s complexity via its norm ∥g∥Hκ. The RKHS for some positive semidefinite kernel κ(·, ·) can be constructed by completing the set of functions Pn i=1 αiκ(xi, ·) under a suitable inner product. In this work, we use isotropic kernels, i.e., those that depend only on the distance between points, since the problem is rotation invariant and we can only recover A up to some rotation. Here is a final summary of our problem and its underlying assumptions: 1. We wish to maximize f : Bd(1 + ¯ε) →[0, 1], where f(x) = g(Ax) for some matrix A ∈Rk×d with orthogonal rows and g belongs to some RKHS Hκ. 2. The kernel κ is isotropic κ(x, x′) = κ′(x −x′) = κ′′(∥x −x′∥2) and κ′ is continuous, integrable and with a Fourier transform Fκ′ that is isotropic and radially non-increasing.2 3. The function g has Lipschitz continuous 2nd-order derivatives and a full rank Hessian at 0. 4. The function g is C2 on a compact support and max|β|≤2∥Dβg∥∞≤C2 for some C2 > 0. 5. The oracle noise is Gaussian with zero mean with a known variance σ2. 3 The SI-BO Algorithm The SI-BO algorithm performs two separate exploration and exploitation stages: (1) subspace identification (SI), i.e. estimating the subspace on which the function is supported, and then (2) Bayesian optimization (BO), in order to optimize the function on the learned subspace. A key challenge here is to carefully allocate samples between these phases. We first give a detailed outline for SI-BO in Alg. 1, deferring its theoretical analysis to Section 4. Given the (noisy) oracle for f, we first evaluate the function at several suitably chosen points and then use a low-rank recovery algorithm to compute a matrix ˆA that spans a subspace well aligned with the one generated by the true matrix A. Once we have computed ˆA, similarly to [22, 7], we define the function which we optimize as ˆg(z) = f( ˆAT z) = g(A ˆAT z). Thus, we effectively work with an approximation ˆf to f given by ˆf(x) = ˆg( ˆAx) = g(A ˆAT ˆAx). With the approximation at hand, we apply BO, in particular the GP-UCB algorithm, on ˆg for the remaining steps. Subspace Learning. We learn A using the approach from [7], which reduces the learning problem to that of low rank matrix recovery. We construct a set of mX points C = [ξ1, · · · , ξmX], which we call sampling centers, and consider the matrix X of gradients at those points X = [∇f(ξ1), · · · , ∇f(ξmX)]. Using the chain rule, we have X = AT [∇g(Aξ1), · · · , ∇g(AξmX)]. Because A is a matrix of size k × d it follows that the rank of X is at most k. This suggests that using low-rank approximation techniques, one may be able to (up to rotation) infer A from X. Given that we have no access to the gradients of f directly, we approximate X using a linearization of f. Consider a fixed sampling center ξ. If we make a linear approximation with step size ε to the directional derivative at center ξ in direction ϕ then, by Taylor’s theorem, for a suitable ζ(x, ε, ϕ): ⟨ϕ, AT ∇g(Aξ)⟩= 1 ε(f(ξ + εϕ) −f(ξ)) −ε 2ϕT ∇2f(ζ)ϕ | {z } E(ξ,ε,ϕ) . 2This is the same assumption as in [15]. Radially non-increasing means that if ∥w∥≤∥w′∥then Fκ′(w) ≥ Fκ′(w′). Note that this is satisfied by the RBF and Mat`ern kernels. 3 Thus, sampling the finite difference f(ξ +εϕ)−f(ξ) provides (up to the curvature error E(ξ, ε, ϕ), and sampling noise) information about the one-dimensional subspace spanned by AT ∇g(Aξ). To estimate it accurately, we must observe multiple directions ϕ. Further, to infer the full kdimensional subspace A, we need to consider at least mX ≥k centers. Consequently, for each center ξi, we define a set of mΦ directions and arrange them in a total of mΦ matrices Φi = [ϕi,1, ϕi,2, · · · , ϕi,mX] ∈Rd×mX. We can now define the following linear system: y = A(X) + e + z, yi = 1 ε mX X j=1 (f(ξj + εϕi,j) −f(ξj)), (1) where the linear operator A is defined as A(X)i = tr(ΦT i X), the curvature errors have been accumulated in e and the noise has been put in the vector z which is distributed as zi ∼N(0, 2mXσ2/ε). Given the structure of the problem, we can make use of several low-rank recovery algorithms. For concreteness, we choose the Dantzig Selector (DS, [24]), which recovers low rank matrices via minimize M ∥M∥∗ subject to ∥A∗(y −A(M) | {z } residual )∥≤λ, (2) where ∥·∥∗is the nuclear norm and ∥·∥is the spectral norm. The DS will successfully recover a matrix ˆX close to the true solution in the Frobenius norm and moreover this distance decreases linearly with λ. As shown in [7], choosing the centers C uniformly at random from the unit sphere Sd−1, choosing each direction vector uniformly at random from {±1/√mΦ}k, and—in the case of noisy observations, resampling f repeatedly—suffices to obtain an accurate ˆX w.h.p., as long as mΦ and mX are sufficiently large. The precise choices of these quantities are analyzed in Section 4. Finally, we extract the matrix ˆA from the SVD of ˆX, by taking its top k left singular vectors. Because the DS will find a matrix ˆX close to X, due to a result by Wedin [25] we know that the learned subspace will be close to the true one. Optimizing ˆg. Once we have an approximate ˆA, we optimize the function ˆg(z) = f( ˆAT z) on the low-dimensional domain Z = Bk(1+¯ε). Concretely, we use GP-UCB [12], because it exhibits state of the art empirical performance, and enjoys strong theoretical bounds for the cumulative regret. It requires that ˆg belongs to the RKHS and the noise when conditioned on the history is zero-mean and almost surely bounded by some ˆσ. Section 4 shows that this is indeed true with high probability. In order to trade exploration and exploitation, the GP-UCB algorithm computes, for each point z, a score that combines the predictive mean that we have inferred for that point with its variance, which quantifies the uncertainty in our estimate. They are combined linearly with a time-dependent weighting factor βt in the following surrogate function ucb(z) = µt(z) + β1/2 t σt(z) (3) for a suitably chosen βt = 2B + 300γt log3(t/δ). Here, B is an upper bound on the squared RKHS norm of the function that we optimize, δ is an upper bound on the failure probability and γt depends on the kernel [12]: cf., Section 4.3 The algorithm then greedily maximizes the ucb score above. Note that finding the maximum of this non-convex and in general multi-modal function, while considered to be cheaper than evaluating f at a new point, is by itself a hard problem and it is usually approached by either sampling on a grid in the domain, or using some global Lipschitz optimizer [13]. Hence, by reducing the dimension of the domain Z over which we have to optimize, our algorithm has the additional benefit that this process can be performed more efficiently. Handling the noise. The last ingredient that we need is theory on how to pick ˆσ so that it bounds the noise during the execution of GP-UCB w.h.p., and how to select λ in (2) so that the true matrix X is feasible in the DS. Due to the fast decay of the tails of the Gaussian distribution we can pick ˆσ =  2 log 1 δ + 2 log T + log 1 2π 1/2 σ, where T is the number of GP-UCB iterations and σ2 is the variance of the noise. Then the noise will be trapped in [−ˆσ, ˆσ] with probability at least 1 −δ. 3If the bound B is not known beforehand then one can use a doubling trick. 4 −2 −1 0 1 2 −2 −1 0 1 2 −20 −15 −10 −5 0 5 10 x y f(x,y) −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 −20 −15 −10 −5 0 5 10 x ˆg (x) true subspace Figure 1: A 2-dimensional function f(x, y) varying along a 1-dimensional subspace and its projections on different subspaces. The numbers are the respective cosine distances. The analysis on λ comes from [7]. They bound ∥A∗(e + z)∥using the assumption that the second order derivatives are bounded and, as shown in [24], because z has a Gaussian distribution, ∥A∗(e + z)∥≤1.2 C2εdmXk2 2√mΦ + 5√mXmΦσ ε  (4) If there is no noise it still holds by setting σ = 0. This bound, intuitively, relates the approximation quality λ of the subspace to the quantities mΦ, mX as well as the step size ε. 4 Theoretical Analysis Overview. A crucial choice in our algorithm is how to allocate samples (by choosing mΦ and mX appropriately) to the tasks of subspace learning and function optimization. We now analyze both phases, and determine how to split the queries in order to optimize the cumulative regret bounds. Let us first consider the regret incurred in the second phase, in the ideal (but unrealistic) case that the subspace is estimated exactly (i.e., ˆA = A). This question was answered recently in [12], where it is proven that it is bounded by O∗( √ T(B√γt + γt)) 4 . Hereby, the quantity γT is defined as γT = max S⊆D,|S|=T H(yS) −H(yS|f), where yS are the values of f at the points in S, corrupted by Gaussian noise, and H(·) is the entropy. It quantifies the maximal gain in information that we can obtain about f by picking a set of T points. In [12] sublinear bounds for γT have been computed for several popular kernels. For example, for the RBF kernel in k dimensions, γT = O (log T)k+1 . Further, B is a bound on the squared norm ∥g∥2 Hκ of g w.r.t. kernel κ. Note that generally γT grows exponentially with k, rendering the application of GP-UCB directly to the high-dimensional problem intractable. What happens if the subspace ˆA is estimated incorrectly? Fortunately, w.h.p. the estimated function ˆg still remains in the RKHS associated with kernel κ. However, the norm ∥ˆg∥Hκ may increase, and consequently may the regret. Moreover, the considered ˆf disagrees with the true f, and consequently additional regret per sample may be incurred by η = || ˆf −f||∞. As an illustration of the effect of misestimated subspaces see Figure 1. We can observe that subspaces far from the true one stretch the function more, thus increasing its RKHS norm. We now state a general result that formalizes these insights by bounding the cumulative regret in terms of the samples allocated to subspace learning, and the subspace approximation quality. Lemma 1 Assume that we spend 0 < n ≤T samples to learn the subspace such that ∥f−ˆf∥∞≤η, ∥ˆg∥≤B and the error is bounded by ˆσ, each w.p. at least 1 −δ/4. If we run the GP-UCB algorithm for the remaining T −n steps with the suggested ˆσ and δ/4, then the following bound on the cumulative regret holds w.p. at least 1 −δ RT ≤n + ηT |{z} approx. error + O∗( √ T(B√γt + γt)) | {z } RUCB(T,ˆg,κ) 4We have used the notation O∗(f) = O(f log f) to suppress the log factors. Ω∗(·) is analogously defined. 5 cos Θ = [1.00, 1.00] −2 −1 0 1 2 −2 −1 0 1 2 cos Θ = [0.04, 0.00] −2 −1 0 1 2 −2 −1 0 1 2 cos Θ = [0.99, 0.04] −2 −1 0 1 2 −2 −1 0 1 2 cos Θ = [0.97, 0.95] −2 −1 0 1 2 −2 −1 0 1 2 Figure 2: Approximations ˆg resulting from differently aligned subspaces. Note that inaccurate estimation (the middle two cases) can wildly distort the objective. where RUCB(T, ˆg, κ) is the regret of GP-UCB when run for T steps using ˆg and kernel κ 5. Lemma 1 breaks down the regret in terms of the approximation error incurred by subspacemisestimation, and the optimization error incurred by the resulting increased complexity ∥ˆg∥2 Hκ ≤ B. We now analyze these effects, and then prove our main regret bounds. Effects of Subspace Alignment. A notion that will prove to be very helpful for analyzing both, the approximation precision η and the norm of ˆg, is the set of angles between the subspaces that are defined by A and ˆA. The following definition [26] makes this notion precise. Definition 2 Let A, ˆA ∈Rk×d be two matrices with orthogonal rows so that AAT = ˆA ˆAT = I. We define the vector of cosines between the spanned subspaces cos Θ(A, ˆA) to be equal to the singular values of A ˆAT . Analogously sin Θ(A, ˆA)i = (1 −cos Θ(A, ˆA)2 i )1/2. Let us see how ˆA affects ˆg. Because ˆg(z) = g(A ˆAT z), the matrix M = A ˆAT , which converts any point from its coordinates determined by ˆA to the coordinates defined by A, will be of crucial importance. First, note that its singular values are cosines and are between −1 and 1. This means that it can only shrink the vectors that we apply it to (possibly by different amounts in different directions). The effect on ˆg is that it might only “see” a small part of the whole space, and its shape might be distorted, which in turn will increase its RKHS complexity (see Figure 2 for an illustration). Lemma 3 If g ∈Hκ for a kernel that is isotropic with a radially non-increasing Fourier transform and ˆg(x) = g(A ˆAT x) for some A, ˆA with orthogonal rows, then for C = C2 √ 2k(1 + ¯ε), ∥f −ˆf∥∞≤C∥sin Θ(A, ˆA)∥2 and ∥ˆg∥2 Hκ ≤| prod cos Θ(A, ˆA)|−1∥g∥2 Hκ. (5) Here, we use the notation prod x = Qd i=1 xi to denote the product of the elements of a vector. By decreasing the angles we tackle both issues: the approximation error η = ∥f −ˆf∥∞is reduced and the norm of ˆg gets closer to the one of g. There is one nice interpretation of the product of the cosines. It is equal to the determinant of the matrix M. Hence, ˆg will not be in the RKHS only if M is rank deficient as dimensions are collapsed. Regret Bounds. We now present our main bounds on the cumulative regret. In order to achieve sublinear regret, we need a way of controlling η and ∥ˆg∥Hκ. In the following, we show how this goal can be achieved. As it turns out, subspace learning is substantially harder in the case of noisy observations. Therefore, we focus on the easier, noise-free setting first. Noiseless Observations. We should note that the theory behind GP-UCB still holds in the deterministic case, as it only requires the noise to be bounded a.s. by ˆσ. The following theorem guarantees that in this setting for non-linear kernels we have a regret dominated by GP-UCB, which is of order Ω∗( √ TγT ), as it is usually exponential in k. Theorem 4 If the observations are noiseless we can pick mx = O(kd log 1/δ), ε = 1 k2.25d3/2T 1/2 and mϕ = O(k2d log 1/δ) so that with probability at least 1 −δ we have the following RT ≤O(k3d2 log2(1/δ)) + 2 RUCB(T, g, κ). 5 Because the noise parameter ˆσ depends on T, we have to slightly change the bounds from [12] as we have a term of order O( p log T + log(1/δ)); c.f. supplementary material. 6 Noisy Observations. Equation 4 hints that the noise can have a dramatic effect in learning efficiency. As already mentioned, the DS gets better results as we decrease λ. In the noiseless case, it suffices to increase the number of directions mΦ and decrease the step size ε in estimating the finite differences. However, the second term in λ can only be reduced by decreasing the variance σ2. As a result, each point that we evaluate is sampled n times and we take as its value the average. Moreover, note that because the standard deviation decreases as 1/√n, we have to resample at least ε−2 times and this significantly increases the number of samples that we need. Nevertheless, we are able to obtain cumulative regret bounds (and thereby the first convergence guarantees and rates) for this setting, which only polynomially depend on d. Unfortunately, the dependence on T is now weaker than those in the noiseless setting (Theorem 4), and the regret due to the subspace learning might dominate that of GP-UCB. Theorem 5 If the observations are noisy, we can pick ε = 1 k2.25d1.5T 1/5 and all other parameters as in the previous theorem. Moreover, we have to resample each point O(σ2k2dT 2/5mΦ/ε2) times. Then, with probability at least 1 −δ RT ≤O  σ2k11.5d7T 4/5 log3(1/δ)  + 2 RUCB(T, g, κ). Mismatch on the effective dimension k. All models are imperfect in some sense and the structure of a general f is impossible to identify unless we have further scientific evidence beyond the data. In our case, the assumption f(x) = g(Ax) for some k more or less takes the weakest form for indicating our hope that BO can succeed from a sub-exponential sample size. In general, we must tune k in a degree to reflect the anticipated complexity in the learning problem. Fortunately, all the guarantees are preserved if we assume a k > ktrue, for some true synthetic model, where f(x) = g(Ax) holds. Underfitting k leads to additional errors that are well-controlled in low-rank subspace estimation [24]. The impact of under fitting in our setting is left for future work. 5 Experiments The main intent of our experiments is to provide a proof of concept, confirming that SI-BO not just in theory provides the first subexponential regret bounds, but also empirically obtains low average regret for Bayesian optimization in high dimensions. Baselines. We compare SI-BO against the following baseline approaches: • RandomS-UCB, which runs GP-UCB on a random subspace. • RandomH-UCB, which runs GP-UCB on the high-dimensional space. At each iteration we pick 1000 points at random and choose the one with highest UCB score. • Exact-UCB, which runs GP-UCB on the exact (but in practice unknown) subspace. The βt parameter in the GP-UCB score was set as recommended in [12] for finite sets. To optimize the UCB score we sampled on a grid on the low dimensional subspace. For all of the measurements we have added Gaussian zero-mean noise with σ = 0.01. Data sets. We carry out experiments in the following settings: • GP Samples. We generate random 2-dimensional samples from a GP with Mat`ern kernel with smoothness parameter ν = 5/2, length scale ℓ= 1/2 and signal variance σ2 f = 1. The samples are “hidden” in a random 2-dimensional subspace in 100 dimensions. • Gab`or Filters. The second data set is inspired by experimental design in neuroscience [27]. The goal is to determine visual stimuli that maximally excite some neuron, which reacts to edges in the images. We consider the function f(x) = exp(−(θT x −1)2), where θ is a Gab´or filter of size 17 × 17 and the set of admissible signals is [0, 1]d. In the appendix we also include results for the Branin function, a classical optimization benchmark. Results. The results are presented in Figure 3. We show the averages of 20 runs (10 runs for GP-Posterior) and the shaded areas represent the standard error around the mean. We show both the average regret and simple regret (i.e., suboptimality of the best solution found so far). We find that although SI-BO spends a total of mX(mΦ + 1) samples to learn the subspace and thus incurs 7 0 1000 2000 3000 3500 0 0.2 0.4 0.6 0.8 1 Rt/t Number of samples Our approach RandomS−UCB RandomH−UCB Exact−UCB (a) GP-Posterior 500 1000 1500 2000 2500 3000 3500 0 0.2 0.4 0.6 0.8 1 Rt/t Number of samples UCB−3 UCB−1 UCB−2 (b) GP-Posterior, Different k 500 1000 1500 2000 2500 0 0.2 0.4 0.6 0.8 1 Rt/t Number of samples Exact−UCB RandomH−UCB RandomS−UCB Our approach (c) Gab´or 0 1000 2000 3000 3500 0 0.2 0.4 0.6 0.8 1 Simple Regret Number of samples Our approach RandomH−UCB RandomS−UCB Exact−UCB (d) GP-Posterior 500 1000 1500 2000 2500 3000 3500 0 0.2 0.4 0.6 0.8 1 Simple Regret Number of samples UCB−1 UCB−2 UCB−3 (e) GP-Posterior, Different k 500 1000 1500 2000 2500 0 0.2 0.4 0.6 0.8 1 Simple Regret Number of samples Exact−UCB RandomS−UCB Our approach RandomH−UCB (f) Gab´or Figure 3: Performance comparison on different datasets. Our SI-BO approach outperforms the natural benchmarks in terms of cumulative regret, and competes well with the unrealistic ExactUCB approach that knows the true subspace A. much regret during this phase, learning the subspace pays off, both for average and simple regret, and SI-BO ultimately outperforms the baseline methods on both data sets. This demonstrates the value of accurate subspace estimation for Bayesian optimization in high dimensions. Mis-specified k. What happens if we do not know the dimensionality k of the low dimensional subspace? To test this, we experimented with the stability of SI-BO w.r.t. k. We sampled 2dimensional GP-Posterior functions and ran SI-BO with k set to 1, 2 and 3. From the figure above we can see that in this scenario SI-BO is relatively stable to this parameter mis-specification. 6 Conclusion We have addressed the problem of optimizing high dimensional functions from noisy and expensive samples. We presented the SI-BO algorithm, which tackles this challenge under the assumption that the objective varies only along a low dimensional subspace, and has low norm in a suitable RKHS. By fusing modern techniques for low rank matrix recovery and Bayesian bandit optimization in a carefully calibrated manner, it addresses the exploration–exploitation dilemma, and enjoys cumulative regret bounds, which only polynomially depend on the ambient dimension. Our results hold for a wide family of RKHS’s, including the popular RBF and Mat`ern kernels. Our experiments on different data sets demonstrate that our approach outperforms natural benchmarks. Acknowledgments. A. Krause acknowledges SNF 200021-137971, DARPA MSEE FA8650-111-7156, ERC StG 307036 and a Microsoft Faculty Fellowship. V. Cevher acknowledges MIRG268398, ERC Future Proof, SNF 200021-132548, SNF 200021-146750, and SNF CRSII2-147633. References [1] D. Lizotte, T. Wang, M. Bowling, and D. Schuurmans. Automatic gait optimization with gaussian process regression. In Proc. of IJCAI, pages 944–949, 2007. [2] J. Bergstra and Y. Bengio. Random search for hyper-parameter optimization. The Journal of Machine Learning Research, 13:281–305, 2012. [3] J. Snoek, H. Larochelle, and R. P. Adams. Practical bayesian optimization of machine learning algorithms. In Neural Information Processing Systems, 2012. [4] Ker-Chau Li. Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86(414):316–327, 1991. 8 [5] G. Raskutti, M.J. Wainwright, and B. Yu. Minimax rates of estimation for high-dimensional linear regression over ℓq-balls. Information Theory, IEEE Transactions on, 57(10):6976–6994, 2011. [6] S. Mukherjee, Q. Wu, and D. Zhou. Learning gradients on manifolds. Bernoulli, 16(1):181–207, 2010. [7] H. Tyagi and V. Cevher. Learning non-parametric basis independent models from point queries via lowrank methods. Applied and Computational Harmonic Analysis, (0):–, 2014. [8] H. Robbins. Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 58(5):527–535, 1952. [9] P. Auer. Using confidence bounds for exploitation-exploration trade-offs. The Journal of Machine Learning Research, 3:397–422, 2003. [10] R. Kleinberg, A. Slivkins, and E. Upfal. Multi-armed bandits in metric spaces. In STOC, pages 681–690, 2008. [11] S. Bubeck, R. Munos, G. Stoltz, and C. Szepesv´ari. Online optimization in X-armed bandits. In NIPS, 2008. [12] N. Srinivas, A. Krause, S. Kakade, and M. Seeger. Information-theoretic regret bounds for gaussian process optimization in the bandit setting. IEEE Transactions on Information Theory, 58(5):3250–3265, May 2012. [13] E. Brochu, V.M. Cora, and N. 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. [14] J. Moˇckus. On bayesian methods for seeking the extremum. In Optimization Techniques IFIP Technical Conference Novosibirsk, July 1–7, 1974, pages 400–404. Springer, 1975. [15] A.D. Bull. Convergence rates of efficient global optimization algorithms. The Journal of Machine Learning Research, 12:2879–2904, 2011. [16] A. Carpentier and R. Munos. Bandit theory meets compressed sensing for high dimensional stochastic linear bandit. Journal of Machine Learning Research - Proceedings Track, 22:190–198, 2012. [17] Y. Abbasi-Yadkori, D. Pal, and C. Szepesvari. Online-to-confidence-set conversions and application to sparse stochastic bandits. In Conference on Artificial Intelligence and Statistics (AISTATS), 2012. [18] B. Chen, R. Castro, and A. Krause. Joint optimization and variable selection of high-dimensional gaussian processes. In Proc. International Conference on Machine Learning (ICML), 2012. [19] Z. Wang, M. Zoghi, F. Hutter, D. Matheson, and N. de Freitas. Bayesian optimization in high dimensions via random embeddings. In In Proc. IJCAI, 2013. [20] H. Tyagi and B. G¨artner. Continuum armed bandit problem of few variables in high dimensions. CoRR, abs/1304.5793, 2013. [21] R.A. DeVore and G.G. Lorentz. Constructive approximation, volume 303. Springer Verlag, 1993. [22] M. Fornasier, K. Schnass, and J. Vybiral. Learning functions of few arbitrary linear parameters in high dimensions. Foundations of Computational Mathematics, pages 1–34, 2012. [23] B. Sch¨olkopf and A.J. Smola. Learning with kernels: Support vector machines, regularization, optimization, and beyond. MIT press, 2001. [24] E.J. Candes and Y. Plan. Tight oracle inequalities for low-rank matrix recovery from a minimal number of noisy random measurements. Information Theory, IEEE Transactions on, 57(4):2342–2359, 2011. [25] P. A. Wedin. Perturbation bounds in connection with singular value decomposition. BIT Numerical Mathematics, 12(1):99–111, 1972. [26] G.W. Stewart and J. Sun. Matrix Perturbation Theory, volume 175. Academic Press New York, 1990. [27] J. G. Daugman. Uncertainty relation for resolution in space, spatial frequency, and orientation optimized by two-dimensional visual cortical filters. Optical Society of America, Journal, A: Optics and Image Science, 2:1160–1169, 1985. 9
2013
199
4,930
Approximate Gaussian process inference for the drift of stochastic differential equations Andreas Ruttor Computer Science, TU Berlin andreas.ruttor@tu-berlin.de Philipp Batz Computer Science, TU Berlin philipp.batz@tu-berlin.de Manfred Opper Computer Science, TU Berlin manfred.opper@tu-berlin.de Abstract We introduce a nonparametric approach for estimating drift functions in systems of stochastic differential equations from sparse observations of the state vector. Using a Gaussian process prior over the drift as a function of the state vector, we develop an approximate EM algorithm to deal with the unobserved, latent dynamics between observations. The posterior over states is approximated by a piecewise linearized process of the Ornstein-Uhlenbeck type and the MAP estimation of the drift is facilitated by a sparse Gaussian process regression. 1 Introduction Gaussian process (GP) inference methods have been successfully applied to models for dynamical systems, see e.g. [1–3]. Usually, these studies have dealt with discrete time dynamics, where one uses a GP prior for modeling transition function and the measurement function of the system. On the other hand, many dynamical systems in the physical world evolve in continuous time and the noisy dynamics is described naturally in terms of stochastic differential equations (SDE). SDEs have also attracted considerable interest in the NIPS community in recent years [4–7]. So far most inference approaches have dealt with the posterior prediction of state variables between observations (smoothing) and the estimation of parameters contained in the drift function, which governs the deterministic part of the microscopic time evolution. Since the drift is usually a nonlinear function of the state vector, a nonparametric estimation using Gaussian process priors would be a natural choice, when a large number of data is available. A recent result by [8, 9] presented an important step in this direction. The authors have shown that GPs are a conjugate family to SDE likelihoods. In fact, if an entire path of dense observations of the state dynamics is observed, the posterior process over the drift is exactly a GP. Unfortunately, this simplicity is lost, when observations are not dense, but separated by larger time intervals. In [8] this sparse, incomplete observation case has been treated by a Gibbs sampler, which alternates between sampling complete state paths of the SDE and creating GP samples for the drift. A nontrivial problem is the sampling from SDE paths conditioned on observations. Second, the densely sampled hidden paths are equivalent to a large number of imputed observations, for which the matrix inversions required by the GP posterior predictions can become computationally costly. It was shown in [8] that in the univariate case for GP priors with precision operators (the inverses of covariance kernels) which are differential operators efficient predictions can be realized in terms of the solutions of differential equations. In this paper, we develop an alternative approximate expectation maximization (EM) method for inference from sparse observations, which is faster than the sampling approach and can also be applied to arbitrary kernels and multivariate SDEs. In the E-Step we approximate expectations over 1 state paths by those of a locally fitted Ornstein-Uhlenbeck model. The M-step for computing the maximum posterior GP prediction of the drift depends on a continuum of function values and is thus approximated by a sparse GP. The paper is organized as follows. Section 2 introduces stochastic differential equations and section 3 discusses GP based inference for completely observed paths. In section 4 our approximate EM algorithm is derived and its performance is demonstrated on a variety of SDEs in section 6. Section 7 presents a discussion. 2 Stochastic differential equations We consider continuous-time univariate Markov processes of the diffusion type, where the dynamics of a d-dimensional state vector Xt ∈Rd is given by the stochastic differential equation (SDE) dXt = f(Xt)dt + D1/2dW. (1) The vector function f(x) = (f 1(x), . . . , f d(x)) defines the deterministic drift and W is a Wiener process, which models additive white noise. D is the diffusion matrix, which we assume to be independent of x. We will not attempt a rigorous treatment of probability measures over continuous time paths here, but will mostly assume for our derivations that the process can be approximated with a discrete time process Xt in the Euler-Maruyama discretization [10], where the times t ∈G are on a regular grid G = {0, ∆t, 2∆t, . . . } and where ∆t is some small microscopic time. The discretized process is given by Xt+∆t −Xt = f(Xt)∆t + D1/2√ ∆t ǫt, (2) where ǫt ∼N(0, I) is a sequence of i.i.d. Gaussian noise vectors. We will usually take the limit ∆t →0 only in expressions where (Riemann) sums are over nonrandom quantities, i.e. where expectations over paths have been carried out and can be replaced by ordinary integrals. 3 Bayesian Inference for dense observations Suppose we observe a path of n d-dimensional observations X0:T = (Xt)t∈G over the time interval [0, T]. Since for ∆t →0, the transition probabilities of the process are Gaussian, pf(X0:T |f) ∝exp " −1 2∆t X t ||Xt+∆t −Xt −f(Xt)∆t||2 # , (3) the probability density for the path with a given drift function f .= (f(Xt))t∈G at these observations can be written as the product pf(X0:T |f) = p0(X0:T )L(X0:T |f), (4) where p0(X0:T ) ∝exp " −1 2∆t X t ||Xt+∆t −Xt||2 # (5) is the measure over paths without drift, i.e. a discretized version of the Wiener measure, and a term which we will call likelihood in the following, L(X0:T |f) = exp " −1 2 X t ||f(Xt)||2 ∆t + X t ⟨f(Xt), Xt+∆t −Xt⟩ # . (6) Here we have introduced the inner product ⟨u, v⟩.= u⊤D−1v and the corresponding squared norm ||u||2 .= u⊤D−1u to avoid cluttered notation. To attempt a nonparametric Bayesian estimate of the drift function f(x), we note that the exponent in (6) contains the drift f at most quadratically. Hence it becomes clear that a conjugate prior to the drift for this model is given by a Gaussian process, i.e. we assume that for each component f ∼P0(f) = GP(0, K), where K is a kernel [11], a fact which was recently observed in [8]. We denote probabilities over the drift f by upper case symbols in order to avoid confusion with path probabilities. Although a more general model is possible, we will restrict ourselves to the case where the 2 Figure 1: The left figure shows a snippet of the double well sample path in black and observations as red dots. The right picture displays the estimated drift function for the double well model after initialization, where the red line denotes the true drift function and the black line the mean function with corresponding 95%-confidence bounds (twice the standard deviation) in blue. One can clearly see that the larger distance between the consecutive points leads to a wrong prediction. GP priors over the components f j(x), j = 1, . . . , d of the drift are independent (with usually different kernels) and we assume that we have a diagonal diffusion matrix D = diag(σ2 1, . . . , σ2 d). In this case, the GP posteriors of f j(x) are independent, too, and we can estimate drift components independently by ordinary GP regression. We define data vectors by dj = ((Xj t+∆t−Xj t )/∆t)⊤ t∈G\{T }, the kernel matrix Kj = (Kj(Xs, Xt))s,t∈G, and the test vector kj(x) = (Kj(x, Xt))⊤ t∈G. Then a standard calculation [11] shows that the posterior process over drift functions f has a posterior mean and a GP posterior variance at an arbitrary point x is given by ¯f j(x) = kj(x)⊤ Kj + σ2 j ∆tI !−1 dj, σ2 f j(x) = Kj(x, x)−kj(x)⊤ Kj + σ2 j ∆tI !−1 kj(x). (7) Note that σ2 j /∆t plays the role of the variance of the observation noise in the standard regression case. In practice, the number of observations can be quite large for a fine time discretization, and a fast computation of (7) could become infeasible. A possible way out of this problem—as suggested by [8]—could be a restriction to kernels for which the inverse kernel, the precision operator, is a differential operator. A well known machine learning approach, which is based on a sparse Gaussian process approximation, applies to arbitrary kernels and generalizes easily to multivariate SDE. We have resorted specifically to the optimal Kullback-Leibler sparsity [1,12], where the likelihood term of a GP model is replaced by another effective likelihood, which depends only on a smaller set of variables fs. 4 MAP Inference for sparse observations The simple GP regression approach outlined in the previous section cannot be applied when observations are sparse in time. In this setting, we assume that n observations yk .= Xτk, k = 1, . . . , n are obtained at (for simplicity) regular intervals τk = kτ, where τ ≫∆t is much larger than the microscopic time scale. In this case, a discretization in (6), where the sum over the microscopic grid t ∈G would be replaced by a sum over macroscopic times τk and ∆t by τ, would correspond to a discrete time dynamical model of the form (1) again replacing ∆t by τ. But this discretization would give a bad approximation to the true SDE dynamics. The estimator of the drift would give some (approximate) estimation of the mean of the transition kernel over macroscopic times τ. However, this does usually not give a good approximation for the original drift. This can be seen in figure 1, where the red line corresponds to the true drift (of the so called double-well model [4]) and the black line to its prediction based on observations with τ = 0.2 and the naive estimation method. To deal with this problem, we treat the process Xt for times t between consecutive observations kτ < t < (k + 1)τ as a latent unobserved random variable with a posterior path measure given by p(X0:T |y, f) ∝p(X0:T |f) n Y k=1 δ(yk −Xkτ), (8) 3 where y is the collection of observations yk and δ(·) denotes the Dirac-distribution encoding the fact that the process is known perfectly at times τk. Our goal is to use an EM algorithm to compute the maximum posterior (MAP) prediction for the drift function f(x). Unfortunately, exact posterior expectations are intractable and one needs to work with suitable approximations. 4.1 Approximate EM algorithm The EM algorithm cycles between two steps 1. In the E-step, we compute the expected negative logarithm of the complete data likelihood L(f, q) = −Eq [ln L(X0:T |f)] , (9) where q denotes a measure over paths which approximates the intractable posterior p(X0:T |y, fold) for the previous estimate fold of the drift. 2. In the M-Step, we recompute the drift function as fnew = arg min f (L(f, q) −ln P0(f)) . (10) To compute the expectation in the E-step, we use (6) and take the limit ∆t →0 at the end, when expectations have been computed. As f(x) is a time-independent function, this yields −Eq[ln L(X0:T |f)] = lim ∆t→0 1 2 X t Eq  ||f(Xt)||2∆t −2 ⟨f(Xt), Xt+∆t −Xt⟩  = 1 2 Z T 0 Eq  ||f(Xt)||2 −2 ⟨f(Xt), gt(Xt)⟩  dt = 1 2 Z ||f(x)||2A(x)dx − Z ⟨f(x), y(x)⟩dx. (11) Here qt(x) is the marginal density of Xt computed from the approximate posterior path measure q. We have also defined the corresponding approximate posterior drift gt(x) = lim ∆t→0 1 ∆tEq[Xt+∆t −Xt|Xt = x], (12) as well as the functions A(x) = Z T 0 qt(x)dt and y(x) = Z T 0 gt(x)qt(x)dt. (13) There are two main problems for a practical realization of this EM algorithm: 1. We need to find tractable path measures q, which lead to good approximations for marginal densities and posterior drifts given arbitrary prior drift functions f(x). 2. The M-Step requires a functional optimization, because (11) shows that L(f, q) −ln P0(f) is actually a functional of f(x), i.e. it contains a continuum of values f(x), where x ∈Rd. 4.2 Linear drift approximation: The Ornstein-Uhlenbeck bridge For given drift f(·) and times t ∈Ik in the interval Ik = [k τ; (k + 1)τ] between two consecutive observations, the exact posterior marginal pt(x) equals the density of Xt = x conditioned on the fact that Xkτ = yk and X(k+1)τ = yk+1. This can be expressed by the transition densities of the homogeneous Markov diffusion process with drift f(x). We denote this quantity by ps(Xt+s|Xt) being the density of the random variable Xt+s at time t + s conditioned on Xt at time t. Using the Markov property, this yields the representation pt(x) ∝p(k+1)τ−t(yk+1|x)pt−kτ(x|yk) for t ∈Ik. (14) As functions of t and x, the second factor fulfills a forward Fokker-Planck equation and the first one a Kolmogorov backward equation [13]. Both are partial differential equations. Since exact computations are not feasible for general drift functions, we approximate the transition density ps(x|xk) in each interval Ik by that of a process, where the drift f(x) is replaced by its local linearization f(x) ≈fou(x, t) = f(xk) −Γk(x −xk) with Γk = −∇f(xk). (15) 4 This is equivalent to assuming that for t ∈Ik the dynamics is approximated by the homogeneous Ornstein-Uhlenbeck process [13] dXt = [f(yk) −Γk(Xt −yk)]dt + D1/2dW, (16) which is also used to build computationally efficient hierarchical models [14, 15], as in this case the marginal posterior can be calculated analytically. Here the transition density is a multivariate Gaussian q(k) s (x|y) = N x|αk + e−Γks(y −αk); Ss  (17) where αk = yk + Γ−1 k f(yk) is the stationary mean and the variance Ss = AsB−1 s is calculated using the matrix exponential As Bs  = exp  Γk D 0 −Γ⊤ k  s  0 I  . (18) Then we obtain the Gaussian approximation q(k) t (x) = N(x|m(t); C(t)) of the marginal posterior for t ∈Ik by multiplying the two transition densities, where C(t) =  e−Γ⊤ k (tk+1−t)S−1 tk+1−te−Γk(tk+1−t) + S−1 t−tk −1 and m(t) = C(t) e−Γ⊤ k (tk+1−t)S−1 tk+1−t  yk+1 −αk + e−Γk(tk+1−t)αk  + C(t) S−1 t−tk  αk + e−Γk(t−tk)(yk −αk)  . By inspecting mean and variance we see that the distribution is a equivalent to a bridge between the points X = yk and X = yk+1 and collapses to point masses at these points. Within this approximation, we can estimate parameters such as the diffusion D using the approximate evidence p(y|f) ≈pou(y) = p(x1) n−1 Y j=1 q(k) τ (yk+1|yk) (19) Finally, in this approximation we obtain for the posterior drift gt(x) = lim ∆t→0 1 ∆tE [Xt+∆t −Xt|Xt = x, Xτ = yk+1] = f(yk) −Γk(x −yk) + De−Γ⊤ k (tk+1−t)S−1 tk+1−t(yk+1 −αk −e−Γk(tk+1−t)(x −αk)) as shown in appendix A in the supplementary material. 4.3 Sparse M-Step approximation To cope with the functional optimization, we resort to a sparse approximation for replacing the infinite set f by a sparse set fs. Here the GP posteriors (for each component of the drift) is replaced by one that is closest in the KL sense. Following appendix B in the supplementary material, we find that in the sparse approximation the likelihood (11) is replaced by Ls(f, q) = 1 2 Z ||E0[f(x)|fs]||2 A(x) dx − Z ⟨E0[f(x)|fs], y(x)⟩dx, (20) where the conditional expectation is over the GP prior. In order to avoid cluttered notation, it should be noted that in the following results for a component f j, the quantities Λs, fs, ks, K−1 s , y(x), σ2, similar to (7) depend on the component j, but not A(x). This is easily computed as E0[f(x)|fs] = k⊤ s (x)K−1 s fs. (21) Hence Ls(f, q) = 1 2f ⊤ s Λsf s −f ⊤ s ds (22) with Λs = 1 σ2 K−1 s Z ks(x) A(x) k⊤ s (x)dx  K−1 s , ds = 1 σ2 K−1 s Z ks(x) y(x) dx. (23) 5 With these results, the approximate MAP estimate is ¯fs(x) = k⊤ s (x)(I + ΛsKs)−1ds. (24) The integrals over x in (23) can be computed analytically for many kernels of interest such as polynomial and RBF ones. However, we have done this for 1-dimensional models only. For higher dimensions, we found it more efficient to treat both the time integration in (13) and the x integrals by sampling, where time points t are drawn uniformly at random and x points from the multivariate Gaussian qt(x). A related expression for the variance σ2 s(x) = K(x, x) −k⊤ s (x)(I + ΛKs)−1Λsks(x) can only be viewed as a crude estimate, because it does not include the impact of the GP fluctuations on the path probabilities. 5 A crude estimate of an approximation error Unfortunately, there is no guarantee that this approximation to the EM algorithm will always increase the exact likelihood p(y|f). Here, we will develop a crude estimate how p(y|f) differs from the the Ornstein-Uhlenbeck approximation (19) to lowest order in the difference δf(Xt, t) .= f(Xt) −fou(Xt, t) between drift function and its approximation. Our estimate is based on the exact expression p(y|f) = Z dp0(X0:T ) eln L(X0:T |f) n Y k=1 δ(yk −Xkτ) (25) where the Wiener measure p0 is defined in (5) and the likelihood L(X0:T |f) in (6). The OrnsteinUhlenbeck approximation (19) can expressed in a similar way: we just have to replace L(X0:T |f) by a functional Lou(X0:T |f) which in turn is obtained by replacing f(Xt) with the linearized drift fou(Xt, t) in (6). The difference in free energies (negative log evidences) can be expressed exactly by an expectation over the posterior OU processes and then expanded (similar to a cumulant expansion) in a Taylor series in ∆L = −ln(L/Lou). The first two terms are given by ∆F .= −{ln p(y|f) −ln pou(y)} = −ln Eq  e−∆L ≈Eq [∆L] −1 2Varq [∆L] ± . . . (26) The computation of the first term is similar to (11) and requires only the marginal qt and the posterior gt. The second term contains the posterior variance and requires two-time covariances of the OU process. We concentrate on the first term which we further expand in the difference δf(Xt, t). This yields ∆F ≈Eq [∆L] ≈ Z T 0 Eq [⟨δf(Xt, t), fou(Xt, t) −gt(Xt)⟩] dt. (27) This expression could be evaluated in order to estimate the influence of nonlinear parts of the drift on the approximation error. 6 Experiments In all experiments, we used different versions of the following general kernel, which is a linear combination of a RBF and a polynomial kernel, K(x1, x2) = c σRBF exp  −(x1 −x2)T (x1 −x2) 2l2 RBF  + (1 −c) 1 + x⊤ 1 x2 p , (28) where the hyperparameters σRBF and lRBF denote the variance and length scale of the RBF kernel and p denotes the order of the polynomial kernel. Also, we determined the sparse points for the GP algorithm in each case by first constructing a histogram over the observations and then selecting the set of histogram midpoints of each histogram bin which contained at least a certain number bmin of observations. In our experiments, we chose bmin = 5. 6 Figure 2: The figures show the estimated drift functions for the double well model (left) and the periodic diffusion model (right) after completion of the EM algorithm. Again, the black and blue lines denote mean and 95%-confidence bounds, while the red lines indicate the true drift functions. 6.1 One-dimensional toy models First we test our algorithm on two toy data sets, the double well model with dynamics given by the SDE dx = 4(x −x3)dt + dW (29) and a diffusion model driven by a periodic drift dx = sin(x)dt + dW. (30) For both models, we simulated a path of size M = 105 on a regular grid with width ∆t = 0.01 from the corresponding SDE and kept every 20th sample point as observation, resulting in N = 5000 data points. We initialized the EM Algorithm by running the sparse GP for the observation points without any imputation and subsequently computed the expectation operators by analytically evaluating the expressions on the same time grid as the simulated path and summing over the time steps. An alternative initialization strategy which consists of generating a full trajectory of the same size as the original path using Brownian bridge sampling between observations did not bring any noticeable performance improvements. Since we cannot guarantee that the likelihood increases in every iteration due to the approximation in the E-step, we resort to a simple heuristic by assuming convergence once L stabilizes up to some minor fluctuation. In our experiments convergence was typically attained after a few (< 10) iterations. For the double well model we used an equal weighting c = 0.5 between kernels with hyperparameters σRBF = 1, lRBF = 0.5 and p = 5, whereas for the periodic model we used an RBF kernel (c = 1) with the same values for σRBF and lRBF. 6.2 Application to a real data set As an example of a real world data set, we used the NGRIP ice core data (provided by NielsBohr institute in Copenhagen, http://www.iceandclimate.nbi.ku.dk/data/), which provides an undisturbed ice core record containing climatic information stretching back into the last glacial. Specifically, this data set as shown in figure 3 contains 4918 observations of oxygen isotope concentration δ18O over a time period from the present to roughly 1.23 · 105 years into the past. Since there are generally less isotopes in ice formed under cold conditions, the isotope concentration can be regarded as an indicator of past temperatures. Recent research [16] suggest to model the rapid paleoclimatic changes exhibited in the data set by a simple dynamical system with polynomial drift function of order p = 3 as canonical model which allows for bistability. This corresponds to a meta stable state at higher temperatures close to marginal stability and a stable state at low values, which is consistent with other research on this data set, linking a stable state of oxygen isotopes to a baseline temperature and a region at higher values corresponding to the occurrence of rapid temperature spikes. For this particular problem we first tried to determine the diffusion constant σ of the data. Therefore we estimated the likelihood of the data set for 40 fixed values of σ in an interval from 0.3 to 11.5 by running the EM algorithm with a polynomial kernel (c = 0) of order p = 3 for each value in turn. The resulting drift function with the highest likelihood is shown in figure 3. The result seems to confirm the existence of a metastable state of oxygen isotope concentration and a stable state at lower values. 7 Figure 3: The figure on the left displays the NGRIP data set, while the picture on the right shows the estimated drift in black with corresponding 95%-confidence bounds denoting twice the standard deviation in blue for the optimal diffusion value ˆσ = 2.9. Figure 4: The left figure shows the empirical density for the two-dimensional model, together with the vector fields of the actual drift function given in blue and the estimated drift given in red. The right picture shows a snippet from the full sample in black together with the first 20 observations denoted by red dots. 6.3 Two-dimensional toy model As an example of a two dimensional system, we simulated from a process with the following SDE: dx = (x(1 −x2 −y2) −y)dt + dW1, (31) dy = (y(1 −x2 −y2) + y)dt + dW2. (32) For this model we simulated a path of size M = 106 on a regular grid with width ∆t = 0.002 from the corresponding SDE and kept every 100th sample point as observation, resulting in N = 104 data points. In the inference shown in figure 4 we used a polynomial kernel (c = 0) of order p = 4. 7 Discussion It would be interesting to replace the ad hoc local linear approximation of the posterior drift by a more flexible time dependent Gaussian model. This could be optimized in a variational EM approximation by minimizing a free energy in the E-step, which contains the Kullback-Leibler divergence between the linear and true processes. Such a method could be extended to noisy observations and the case, where some components of the state vector are not observed. Finally, this method could be turned into a variational Bayesian approximation, where one optimizes posteriors over both drifts and over state paths. The path probabilities are then influenced by the uncertainties in the drift estimation, which would lead to more realistic predictions of error bars. Acknowledgments This work was supported by the European Community’s Seventh Framework Programme (FP7, 2007-2013) under the grant agreement 270327 (CompLACS). 8 References [1] Michalis K. Titsias. Variational learning of inducing variables in sparse Gaussian processes. JMLR WC&P, 5:567–574, 2009. [2] Marc Deisenroth and Shakir Mohamed. Expectation propagation in Gaussian process dynamical systems. In P. Bartlett, F.C.N. Pereira, C.J.C. Burges, L. Bottou, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 2618–2626. 2012. [3] Jonathan Ko and Dieter Fox. GP-BayesFilters: Bayesian filtering using Gaussian process prediction and observation models. Autonomous Robots, 27(1):75–90, July 2009. [4] C´edric Archambeau, Manfred Opper, Yuan Shen, Dan Cornford, and John Shawe-Taylor. Variational inference for diffusion processes. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 17–24. MIT Press, Cambridge, MA, 2008. [5] Jos´e Bento Ayres Pereira, Morteza Ibrahimi, and Andrea Montanari. Learning networks of stochastic differential equations. In J. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R.S. Zemel, and A. Culotta, editors, Advances in Neural Information Processing Systems 23, pages 172–180. 2010. [6] Danilo J. Rezende, Daan Wierstra, and Wulfram Gerstner. Variational learning for recurrent spiking networks. In J. Shawe-Taylor, R.S. Zemel, P. Bartlett, F.C.N. Pereira, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 24, pages 136–144. 2011. [7] Simon Lyons, Amos Storkey, and Simo Sarkka. The coloured noise expansion and parameter estimation of diffusion processes. In P. Bartlett, F.C.N. Pereira, C.J.C. Burges, L. Bottou, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 1961–1969. 2012. [8] Omiros Papaspiliopoulos, Yvo Pokern, Gareth O. Roberts, and Andrew M. Stuart. Nonparametric estimation of diffusions: a differential equations approach. Biometrika, 99(3):511–531, 2012. [9] Yvo Pokern, Andrew M. Stuart, and J.H. van Zanten. Posterior consistency via precision operators for Bayesian nonparametric drift estimation in SDEs. Stochastic Processes and their Applications, 123(2):603–628, 2013. [10] P. E. Kloeden and E. Platen. Numerical Solution of Stochastic Differential Equations. Springer, New York, corrected edition, June 2011. [11] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [12] Lehel Csat´o, Manfred Opper, and Ole Winther. TAP Gibbs free energy, belief propagation and sparsity. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, Advances in Neural Information Processing Systems 14, pages 657–663. MIT Press, 2002. [13] C. W. Gardiner. Handbook of Stochastic Methods. Springer, Berlin, second edition, 1996. [14] Manfred Opper, Andreas Ruttor, and Guido Sanguinetti. Approximate inference in continuous time Gaussian-jump processes. In J. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R.S. Zemel, and A. Culotta, editors, Advances in Neural Information Processing Systems 23, pages 1831–1839. 2010. [15] Florian Stimberg, Manfred Opper, and Andreas Ruttor. Bayesian inference for change points in dynamical systems with reusable states—a Chinese restaurant process approach. JMLR WC&P, 22:1117–1124, 2012. [16] Frank Kwasniok. Analysis and modelling of glacial climate transitions using simple dynamical systems. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 371(1991), 2013. 9
2013
2
4,931
Variational Inference for Mahalanobis Distance Metrics in Gaussian Process Regression Michalis K. Titsias Department of Informatics Athens University of Economics and Business mtitsias@aueb.gr Miguel L´azaro-Gredilla Dpt. Signal Processing & Communications Universidad Carlos III de Madrid - Spain miguel@tsc.uc3m.es Abstract We introduce a novel variational method that allows to approximately integrate out kernel hyperparameters, such as length-scales, in Gaussian process regression. This approach consists of a novel variant of the variational framework that has been recently developed for the Gaussian process latent variable model which additionally makes use of a standardised representation of the Gaussian process. We consider this technique for learning Mahalanobis distance metrics in a Gaussian process regression setting and provide experimental evaluations and comparisons with existing methods by considering datasets with high-dimensional inputs. 1 Introduction Gaussian processes (GPs) have found many applications in machine learning and statistics ranging from supervised learning tasks to unsupervised learning and reinforcement learning. However, while GP models are advertised as Bayesian models, it is rarely the case that a full Bayesian procedure is considered for training. In particular, the commonly used procedure is to find point estimates over the kernel hyperparameters by maximizing the marginal likelihood, which is the likelihood obtained once the latent variables associated with the GP function have been integrated out (Rasmussen and Williams, 2006). Such a procedure provides a practical algorithm that is expected to be robust to overfitting when the number of hyperparameters that need to be tuned are relatively few compared to the amount of data. In contrast, when the number of hyperparameters is large this approach will suffer from the shortcomings of a typical maximum likelihood method such as overfitting. To avoid the above problems, in GP models, the use of kernel functions with few kernel hyperparameters is common practice, although this can lead to limited flexibility when modelling the data. For instance, in regression or classification problems with high dimensional input data the typical kernel functions used are restricted to have the simplest possible form, such as a squared exponential with common length-scale across input dimensions, while more complex kernel functions such as ARD or Mahalanobis kernels (Vivarelli and Williams, 1998) are not considered due to the large number of hyperparameters needed to be estimated by maximum likelihood. On the other hand, while full Bayesian inference for GP models could be useful, it is pragmatically a very challenging task that currently has been attempted only by using expensive MCMC techniques such as the recent method of Murray and Adams (2010). Deterministic approximations and particularly the variational Bayes framework has not been applied so far for the treatment of kernel hyperparameters in GP models. To this end, in this work we introduce a variational method for approximate Bayesian inference over hyperparameters in GP regression models with squared exponential kernel functions. This approach consists of a novel variant of the variational framework introduced in (Titsias and Lawrence, 2010) for the Gaussian process latent variable model. Furthermore, this method uses the concept of a standardised GP process and allows for learning Mahalanobis distance metrics (Weinberger and Saul, 2009; Xing et al., 2003) in Gaussian process regression settings using Bayesian inference. In 1 the experiments, we compare the proposed algorithm with several existing methods by considering several datasets with high-dimensional inputs. The remainder of this paper is organised as follows: Section 2 provides the motivation and theoretical foundation of the variational method, Section 3 demonstrates the method in a number of challenging regression datasets by providing also a comprehensive comparison with existing methods. Finally, the paper concludes with a discussion in Section 4. 2 Theory Section 2.1 discusses Bayesian GP regression and motivates the variational method. Section 2.2 explains the concept of the standardised representation of a GP model that is used by the variational method described in Section 2.3. Section 2.4 discusses setting the prior over the kernel hyperparameters together with a computationally analytical way to reduce the number of parameters to be optimised during variational inference. Finally, Section 2.5 discusses prediction in novel test inputs. 2.1 Bayesian GP regression and motivation for the variational method Suppose we have data {yi, xi}n i=1, where each xi ∈RD and each yi is a real-valued scalar output. We denote by y the vector of all output data and by X all input data. In GP regression, we assume that each observed output is generated according to yi = f(xi) + ϵi, ϵi ∼N(0, σ2), where the full length latent function f(x) is assigned a zero-mean GP prior with a certain covariance or kernel function kf(x, x′) that depends on hyperparameters θ. Throughout the paper we will consider the following squared exponential kernel function kf(x, x′) = σ2 fe−1 2 (x−x′)T WT W(x−x′) = σ2 fe−1 2 ||Wx−Wx′||2 = σ2 fe−1 2 d2 W(x,x′), (1) where dW(x, x′) = ||Wx −Wx′||. In the above, σf is a global scale parameter while the matrix W ∈RK×D quantifies a linear transformation that maps x into a linear subspace with dimension at most K. In the special case where W is a square and diagonal matrix, the above kernel function reduces to kf(x, x′) = σ2 fe−1 2 PD d=1 w2 d(xd−x′ d)2, (2) which consists of the well-known ARD squared exponential kernel commonly used in GP regression applications (Rasmussen and Williams, 2006). In other cases where K < D, dW(x, x′) defines a Mahalanobis distance metric (Weinberger and Saul, 2009; Xing et al., 2003) that allows for supervised dimensionality reduction to be applied in a GP regression setting (Vivarelli and Williams, 1998). In a full Bayesian formulation, the hyperparameters θ = (σf, W) are assigned a prior distribution p(θ) and the Bayesian model follows the hierarchical structure depicted in Figure 1(a). According to this structure the random function f(x) and the hyperparameters θ are a priori coupled since the former quantity is generated conditional on the latter. This can make approximate, and in particular variational, inference over the hyperparameters to be troublesome. To clarify this, observe that the joint density induced by the finite data is p(y, f, θ) = N(y|f, σ2I)N(f|0, Kf,f)p(θ), (3) where the vector f stores the latent function values at inputs X and Kf,f is the n × n kernel matrix obtained by evaluating the kernel function on those inputs. Clearly, in the term N(f|0, Kf,f) the hyperparameters θ appear non-linearly inside the inverse and determinant of the kernel matrix Kf,f. While there exist a recently developed variational inference method applied to Gaussian process latent variable model (GP-LVM) (Titsias and Lawrence, 2010), that approximately integrates out inputs that appear inside a kernel matrix, this method is still not applicable to the case of kernel hyperparameters such as length-scales. This is because the augmentation with auxiliary variables used in (Titsias and Lawrence, 2010), that allows to bypass the intractable term N(f|0, Kf,f), leads to an inversion of a matrix Ku,u that still depends on the kernel hyperparameters. More precisely, the Ku,u matrix is defined on auxiliary values u comprising points of the function f(x) at some arbitrary and freely optimisable inputs (Snelson and Ghahramani, 2006a; Titsias, 2009). While this kernel matrix does not depend on the inputs X any more (which need to be integrated out in the GP-LVM case), it still depends on θ, making a possible variational treatment of those parameters 2 intractable. In Section 2.3, we present a novel modification of the approach in (Titsias and Lawrence, 2010) which allows to overcome the above intractability. Such an approach makes use of the socalled standardised representation of the GP model that is described next. 2.2 The standardised representation Consider a function s(z), where z ∈RK, which is taken to be a random sample drawn from a GP indexed by elements in the low K-dimensional space and assumed to have a zero mean function and the following squared exponential kernel function: ks(z, z′) = e−1 2 ||z−z′||2, (4) where the kernel length-scales and global scale are equal to unity. The above GP is referred to as standardised process, whereas a sample path s(z) is referred to as a standardised function. The interesting property that a standardised process has is that it does not depend on kernel hyperparameters since it is defined in a space where all hyperparameters have been neutralised to take the value one. Having sampled a function s(z) in the low dimensional input space RK, we can deterministically express a function f(x) in the high dimensional input space RD according to f(x) = σfs(Wx), (5) where the scalar σf and the matrix W ∈RK×D are exactly the hyperparameters defined in the previous section. The above simply says that the value of f(x) at a certain input x is the value of the standardised function s(z), for z = Wx ∈RK, times a global scale σf that changes the amplitude or power of the new function. Given (σf, W), the above assumptions induce a GP prior on the function f(x), which has zero mean and the following kernel function kf(x, x′) = E[σfs(Wx)σfs(Wx′)] = σ2 fe−1 2 d2 W(x,x′), (6) which is precisely the kernel function given in eq. (1) and therefore, the above construction leads to the same GP prior distribution described in Section 2.1. Nevertheless, the representation using the standardised process also implies a reparametrisation of the GP regression model where a priori the hyperparameters θ and the GP function are independent. More precisely, one can now represent the GP model according to the following structure: s(z) ∼ GP(0, ks(z, z′)), θ ∼p(θ) f(x) = σfs(Wx) yi ∼ N(yi|f(xi), σ2), i = 1, . . . , n (7) which is depicted graphically in Figure 1(b). The interesting property of this representation is that the GP function s(z) and the hyperparameters θ interact only inside the likelihood function while a priori are independent. Furthermore, according to this representation one could now consider a modification of the variational method in (Titsias and Lawrence, 2010) so that the auxiliary variables u are defined to be points of the function s(z) so that the resulting kernel matrix Ku,u which needs to be inverted does not depend on the hyperparameters but only on some freely optimisable inputs. Next we discuss the details of this variational method. 2.3 Variational inference using auxiliary variables We define a set of m auxiliary variables u ∈Rm such that each ui is a value of the standardised function so that ui = s(zi) and the input zi ∈RK lives in dimension K. The set of all inputs Z = (z1, . . . , zm) are referred to as inducing inputs and consist of freely-optimisable parameters that can improve the accuracy of the approximation. The inducing variables u follow the Gaussian density p(u) = N(u|0, Ku,u), (8) where [Ku,u]ij = ks(zi, zj) and ks is the standardised kernel function given by eq. (4). Notice that the density p(u) does not depend on the kernel hyperparameters and particularly on the matrix W. This is a rather critical point, that essentially allows the variational method to be applicable, and comprise the novelty of our method compared to the initial framework in (Titsias and Lawrence, 2010). The vector f of noise-free latent function values, such that [f]i = σfs(Wxi), covary with the vector u based on the cross-covariance function kf,u(x, z) = E[σfs(Wx)s(z)] = σfE[s(Wx)s(z)] = σfe−1 2 ||Wx−z||2 = σfks(Wx, z). (9) 3 θ f(x) y s(x) θ f(x) y 1 2 3 4 5 6 7 8 9 10 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Latent dimension (sorted) Relevance Latent dimension (sorted) Input dimension 2 4 6 8 10 5 10 15 20 25 30 (a) (b) (c) Figure 1: The panel in (a) shows the usual hierarchical structure of a GP model where the middle node corresponds to the full length function f(x) (although only a finite vector f is associated with the data). The panel in (b) shows an equivalent representation of the GP model expressed through the standardised random function s(z), that does not depend on hyperparameters, and interacts with the hyperparameters at the data generation process. The rectangular node for f(x) corresponds to a deterministic operation representing f(x) = σfs(Wx). The panel in (c) shows how the latent dimensionality of the Puma dataset is inferred to be 4, roughly corresponding to input dimensions 4, 5, 15 and 16 (see Section 3.3). Based on this function, we can compute the cross-covariance matrix Kf,u and subsequently express the conditional Gaussian density (often referred to as conditional GP prior): p(f|u, W) = N(f|Kf,uK−1 u,uu, Kf,f −Kf,uK−1 u,uKT f,u), so that p(f|u, W)p(u) allows to obtain the initial conditional GP prior p(f|W), used in eq. (3), after a marginalisation over the inducing variables, i.e. p(f|W) = R p(f|u, W)p(u)du. We would like now to apply variational inference in the augmented joint model1 p(y, f, u, W) = N(y|f, σ2I)p(f|u, W)p(u)p(W), in order to approximate the intractable posterior distribution p(f, W, u|y). We introduce the variational distribution q(f, W, u) = p(f|u, W)q(W)q(u), (10) where p(f|u, W) is the conditional GP prior that appears in the joint model, q(u) is a free-form variational distribution that after optimisation is found to be Gaussian (see Section B.1 in the supplementary material), while q(W) is restricted to be the following factorised Gaussian: q(W) = K Y k=1 D Y d=1 N(wkd|µdk, σ2 kd), (11) The variational lower bound that minimises the Kullback Leibler (KL) divergence between the variational and the exact posterior distribution can be written in the form F = F1 −KL(q(W)||p(W)), (12) where the analytical form of F1 is given in Section B.1 of the supplementary material, whereas the KL divergence term KL(q(W)||p(W)) that depends on the prior distribution over W is described in the next section. The variational lower bound is maximised using gradient-based methods over the variational parameters {µkd, σ2 kd}K,D k=1,d=1, the inducing inputs Z (which are also variational parameters) and the hyperparameters (σf, σ2). 1The scale parameter σf and the noise variance σ2 are not assigned prior distributions, but instead they are treated by Type II ML. Notice that the treatment of (σf, σ2) with a Bayesian manner is easier and approximate inference could be done with the standard conjugate variational Bayesian framework (Bishop, 2006). 4 2.4 Prior over p(W) and analytical reduction of the number of optimisable parameters To set the prior distribution for the parameters W, we follow the automatic relevance determination (ARD) idea introduced in (MacKay, 1994; Neal, 1998) and subsequently considered in several models such as sparse linear models (Tipping, 2001) and variational Bayesian PCA (Bishop, 1999). Specifically, the prior distribution takes the form p(W) = K Y k=1 D Y d=1 N(wkd|0, ℓ2 k), (13) where the elements of each row of W follow a zero-mean Gaussian distribution with a common variance. Learning the set of variances {ℓ2 k}K k=1 can allow to automatically select the dimensionality associated with the Mahalanobis distance metric dW(x, x′). This could be carried out by either applying a Type II ML estimation procedure or a variational Bayesian approach, where the latter assigns a conjugate Gamma prior on the variances and optimises a variational distribution q({ℓ2 k}K k=1) over them. The optimisable quantities in both these procedures can be removed analytically and optimally from the variational lower bound as described next. Consider the case where we apply Type II ML for the variances {ℓ2 k}K k=1. These parameters appear only in the KL(q(W)||p(W)) term (denoted by KL in the following) of the lower bound in eq. (12) which can be written in the form: KL = 1 2 K X k=1 "PD d=1 σ2 dk + µ2 dk ℓ2 k −D − D X d=1 log σ2 dk ℓ2 k # . By first minimizing this term with respect to these former hyperparameters we find that ℓ2 k = PD d=1 σ2 dk + µ2 dk D , k = 1, . . . , K, (14) and then by substituting back these optimal values into the KL divergence we obtain KL = 1 2 K X k=1 " D X d=1 log σ2 dk −D log D X d=1 σ2 dk + µ2 dk ! + D log D # , (15) which now depends only on variational parameters. When we treat {ℓ2 k}K k=1 in a Bayesian manner, we assign inverse Gamma prior to each variance ℓ2 k, p(ℓ2 k) = βα Γ(α) ℓ2 k −α−1 e −β ℓ2 k . Then, by following a similar procedure as the one above we can remove optimally the variational factor q({ℓ2 k}K k=1) (see Section B.2 in the supplementary material) to obtain KL = − D 2 + α  K X k=1 log 2β + D X d=1 µ2 kd + σ2 kd ! + 1 2 K X k=1 D X d=1 log(σ2 kd) + const, (16) which, as expected, has the nice property that when α = β = 0, so that the prior over variances becomes improper, it reduces to the quantity in (15). Finally, it is important to notice that different and particularly non-Gaussian priors for the parameters W can be also accommodated by our variational method. More precisely, any alternative prior for W changes only the form of the negative KL divergence term in the lower bound in eq. (12). This term remains analytically tractable even for priors such as the Laplace or certain types of spike and slab priors. In the experiments we have used the ARD prior described above while the investigation of alternative priors is intended to be studied as a future work. 2.5 Predictions Assume we have a test input x∗and we would like to predict the corresponding output y∗. The exact predictive density p(y∗|y) is intractable and therefore we approximate it with the density obtained by averaging over the variational posterior distribution: q(y∗|y) = Z N(y∗|f∗, σ2)p(f∗|f, u, W)p(f|u, W)q(u)q(W)df∗dfdudW, (17) 5 where p(f|u, W)q(u)q(W) is the variational distribution and p(f∗|f, u, W) is the conditional GP prior over the test value f∗given the training function values f and the inducing variables u. By performing first the integration over f, we obtain R p(f∗|f, u, W)p(f|u, W)df = p(f∗|u, W) which yields as a consequence of the consistency property of the Gaussian process prior. Given that p(f∗|u, W) and q(u) (see Section B.1 in the supplementary material) are Gaussian densities with respect to f∗and u, the above can be further simplified to q(y∗|y) = Z N(y∗|µ∗(W), σ2 ∗(W) + σ2)q(W)dW, where the mean µ∗(W) and variance σ2 ∗(W) obtain closed-form expressions and consist of nonlinear functions of W making the above integral intractable. However, by applying Monte Carlo integration based on drawing independent samples from the Gaussian distribution q(W) we can efficiently approximate the above according to q(y∗|y) = 1 T T X t=1 N(y∗|µ∗(W(t)), σ2 ∗(W(t)) + σ2), (18) which is the quantity used in our experiments. Furthermore, although the predictive density is not Gaussian, its mean and variance can be computed analytically as explained in Section B.1 of the supplementary material. 3 Experiments In this section we will use standard data sets to assess the performance of the proposed VDMGP in terms of normalised mean square error (NMSE) and negative log-probability density (NLPD). We will use as benchmarks a full GP with automatic relevance determination (ARD) and the stateof-the-art SPGP-DR model, which is described below. Also, see Section A of the supplementary material for an example of dimensionality reduction on a simple toy example. 3.1 Review of SPGP-DR The sparse pseudo-input GP (SPGP) from Snelson and Ghahramani (2006a) is a well-known sparse GP model, that allows the computational cost of GP regression to scale linearly with the number of samples in a the dataset. This model is sometimes referred to as FITC (fully independent training conditional) and uses an active set of m pseudo-inputs that control the speed vs. performance tradeoff of the method. SPGP is often used when dealing with datasets containing more than a few thousand samples, since in those cases the cost of a full GP becomes impractical. In Snelson and Ghahramani (2006b), a version of SPGP with dimensionality reduction (SPGP-DR) is presented. SPGP-DR applies the SPGP model to a linear projection of the inputs. The K × D projection matrix W is learned so as to maximise the evidence of the model. This can be seen simply as a specialisation of SPGP in which the covariance function is a squared exponential with a Mahalanobis distance defined by W⊤W. The idea had already been applied to the standard GP in (Vivarelli and Williams, 1998). Despite the apparent similarities between SPGP-DR and VDMGP, there are important differences worth clarifying. First, SPGP’s pseudo-inputs are model parameters and, as such, fitting a large number of them can result in overfitting, whereas the inducing inputs used in VDMGP are variational parameters whose optimisation can only result in a better fit of the posterior densities. Second, SPGP-DR does not place a prior on the linear projection matrix W; it is instead fitted using Maximum Likelihood, just as the pseudo-inputs. In contrast, VDMGP does place a prior on W and variationally integrates it out. These differences yield an important consequence: VDMGP can infer automatically the latent dimensionality K of data, but SPGP-DR is unable to, since increasing K is never going to decrease its likelihood. Thus, VDMGP follows Occam’s razor on the number of latent dimensions K. 3.2 Temp and SO2 datasets We will assess VDMGP on real-world datasets. For this purpose we will use the two data sets from the WCCI-2006 Predictive Uncertainty in Environmental Modeling Competition run by Gavin 6 100 200 500 1000 2000 5000 7117 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 Full GP VDMGP SPGP−DR (a) Temp, avg. NMSE ± 1 std. dev. of avg. 100 200 500 1000 2000 5000 15304 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 Full GP VDMGP SPGP−DR (b) SO2, avg. NMSE ± 1 std. dev. of avg. 100 200 500 1000 2000 5000 7168 0.2 0.4 0.6 0.8 1 1.2 1.4 Full GP VDMGP SPGP−DR (c) Puma, avg. NMSE ± 1 std. dev. of avg. 100 200 500 1000 2000 5000 7117 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Full GP VDMGP SPGP−DR (d) Temp, avg. NLPD ± one std. dev. of avg. 100 200 500 1000 2000 5000 15304 4.4 4.6 4.8 5 5.2 5.4 5.6 5.8 6 Full GP VDMGP SPGP−DR (e) SO2, avg. NLPD ± one std. dev. of avg. 100 200 500 1000 2000 5000 7168 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Full GP VDMGP SPGP−DR (f) Puma, avg. NLPD ± one std. dev. of avg. Figure 2: Average NMSE and NLPD for several real datasets, showing the effect of different training set sizes. Cawley2, called Temp and SO2. In dataset Temp, maximum daily temperature measurements have to be predicted from 106 input variables representing large-scale circulation information. For the SO2 dataset, the task is to predict the concentration of SO2 in an urban environment twenty-four hours in advance, using information on current SO2 levels and meteorological conditions.3 These are the same datasets on which SPGP-DR was originally tested (Snelson and Ghahramani, 2006b), and it is worth mentioning that SPGP-DR’s only entry in the competition (for the Temp dataset) was the winning one. We ran SPGP-DR and VDMGP using the same exact initialisation for the projection matrix on both algorithms and tested the effect of using a reduced number of training data. For SPGP-DR we tested several possible latent dimensions K = {2, 5, 10, 15, 20, 30}, whereas for VDMGP we fixed K = 20 and let the model infer the number of dimensions. The number of inducing variables (pseudo-inputs for SPGP-DR) was set to 10 for Temp and 20 for SO2. Varying sizes for the training set between 100 and the total amount of available samples were considered. Twenty independent realisations were performed. Average NMSE as a function of training set size is shown in Figures 2(a) and 2(b). The multiple dotted blue lines correspond to SPGP-DR with different choices of latent dimensionality K. The dashed black line represents the full GP, which has been run for training sets up to size 2000. VDMGP is shown as a solid red line. Similarly, average NLPD is shown as a function of training set size in Figures 2(d) and 2(e). When feasible, the full GP performs best, but since it requires the inversion of the full kernel matrix, it cannot by applied to large-scale problems such as the ones considered in this subsection. Also, even in reasonably-sized problems, the full GP may run into trouble if several noise-only input dimensions are present. SPGP-DR works well for large training set sizes, since there is enough information for it to avoid overfitting and the advantage of using a prior on W is reduced. However, 2Available at http://theoval.cmp.uea.ac.uk/˜gcc/competition/ Temp: 106 dimensions 7117/3558 training/testing data, SO2: 27 dimensions 15304/7652 training/testing data. 3For SO2, which contains only positive labels yn, a logarithmic transformation of the type log(a + yn) was applied, just as the authors of (Snelson and Ghahramani, 2006b) did. However, reported NMSE and NLPD figures still correspond to the original labels. 7 for smaller training sets, performance is quite bad and the choice of K becomes very relevant (which must be selected through cross-validation). Finally, VDMGP results in scalable performance: It is able to perform dimensionality reduction and achieve high accuracy both on small and large datasets, while still being faster than a full GP. 3.3 Puma dataset In this section we consider the 32-input, moderate noise version of the Puma dataset.4 This is realistic simulation of the dynamics of a Puma 560 robot arm. Labels represent angular accelerations of one of the robot arm’s links, which have to be predicted based on the angular positions, velocities and torques of the robot arm. 7168 samples are available for training and 1024 for testing. It is well-known from previous works (Snelson and Ghahramani, 2006a) that only 4 out of the 32 input dimensions are relevant for the prediction task, and that identifying them is not always easy. In particular, SPGP (the standard version, with no dimensionality reduction), fails at this task unless initialised from a “good guess” about the relevant dimensions coming from a different model, as discussed in (Snelson and Ghahramani, 2006a). We thought it would be interesting to assess the performance of the discussed models on this dataset, again considering different training set sizes, which are generated by randomly sampling from the training set. Results are shown in Figures 2(c) and 2(f). VDMGPR determines that there are 4 latent dimensions, as shown in Figure 1(c). The conclusions to be drawn here are similar to those of the previous subsection: SPGP-DR has trouble with “small” datasets (where the threshold for a dataset being considered small enough may vary among different datasets) and requires a parameter to be validated, whereas VDMGPR seems to perform uniformly well. 3.4 A note on computational complexity The computational complexity of VDMGP is O(NM 2K +NDK), just as that of SPGP-DR, which is much smaller than the O(N 3+N 2D) required by a full GP. However, since the computation of the variational bound of VDMGP involves more steps than the computation of the evidence of SPGPDR, VDMGP is slower than SPGP-DR. In two typical cases using 500 and 5000 training points full GP runs in 0.24 seconds (for 500 training points) and in 34 seconds (for 5000 training points), VDMGP runs in 0.35 and 3.1 seconds while SPGP-DR runs in 0.01 and 0.10 seconds. 4 Discussion and further work A typical approach to regression when the number of input dimensions is large is to first use a linear projection of input data to reduce dimensionality (e.g., PCA) and then apply some regression technique. Instead of approaching this method in two steps, a monolithic approach allows the dimensionality reduction to be tailored to the specific regression problem. In this work we have shown that it is possible to variationally integrate out the linear projection of the inputs of a GP, which, as a particular case, corresponds to integrating out its length-scale hyperparameters. By placing a prior on the linear projection, we avoid overfitting problems that may arise in other models, such as SPGP-DR. Only two parameters (noise variance and scale) are free in this model, whereas the remaining parameters appearing in the bound are free variational parameters, and optimizing them can only result in improved posterior estimates. This allows us to automatically infer the number of latent dimensions that are needed for regression in a given problem, which is also not possible using SPGP-DR. Finally, the size of the data sets that the proposed model can handle is much wider than that of SPGP-DR, which performs badly on small-size data. One interesting topic for future work is to investigate non-Gaussian sparse priors for the parameters W. Furthermore, given that W represents length-scales it could be replaced by a random function W(x), such a GP random function, which would render the length-scales input-dependent, making such a formulation useful in situations with varying smoothness across input space. Such a smoothness-varying GP is also an interesting subject of further work. Acknowledgments MKT greatly acknowledges support from “Research Funding at AUEB for Excellence and Extroversion, Action 1: 2012-2014”. MLG acknowledges support from Spanish CICYT TIN2011-24533. 4Available from Delve, see http://www.cs.toronto.edu/˜delve/data/pumadyn/desc. html. 8 References Bishop, C. M. (1999). Variational principal components. In In Proceedings Ninth International Conference on Artificial Neural Networks, ICANN?99, pages 509–514. Bishop, C. M. (2006). Pattern Recognition and Machine Learning (Information Science and Statistics). Springer, 1st ed. 2006 edition. MacKay, D. J. (1994). Bayesian non-linear modelling for the energy prediction competition. SHRAE Transactions, 4:448–472. Murray, I. and Adams, R. P. (2010). Slice sampling covariance hyperparameters of latent Gaussian models. In Lafferty, J., Williams, C. K. I., Zemel, R., Shawe-Taylor, J., and Culotta, A., editors, Advances in Neural Information Processing Systems 23, pages 1723–1731. Neal, R. M. (1998). Assessing relevance determination methods using delve. Neural Networksand Machine Learning, pages 97–129. Rasmussen, C. and Williams, C. (2006). Gaussian Processes for Machine Learning. Adaptive Computation and Machine Learning. MIT Press. Snelson, E. and Ghahramani, Z. (2006a). Sparse Gaussian processes using pseudo-inputs. In Advances in Neural Information Processing Systems 18, pages 1259–1266. MIT Press. Snelson, E. and Ghahramani, Z. (2006b). Variable noise and dimensionality reduction for sparse Gaussian processes. In Uncertainty in Artificial Intelligence. Tipping, M. E. (2001). Sparse bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1:211–244. Titsias, M. K. (2009). Variational learning of inducing variables in sparse Gaussian processes. In Proc. of the 12th International Workshop on AI Stats. Titsias, M. K. and Lawrence, N. D. (2010). Bayesian Gaussian process latent variable model. Journal of Machine Learning Research - Proceedings Track, 9:844–851. Vivarelli, F. and Williams, C. K. I. (1998). Discovering hidden features with Gaussian processes regression. In Advances in Neural Information Processing Systems, pages 613–619. Weinberger, K. Q. and Saul, L. K. (2009). Distance metric learning for large margin nearest neighbor classification. J. Mach. Learn. Res., 10:207–244. Xing, E., Ng, A., Jordan, M., and Russell, S. (2003). Distance metric learning, with application to clustering with side-information. 9
2013
20
4,932
Generalizing Analytic Shrinkage for Arbitrary Covariance Structures Daniel Bartz Department of Computer Science TU Berlin, Berlin, Germany daniel.bartz@tu-berlin.de Klaus-Robert M¨uller TU Berlin, Berlin, Germany Korea University, Korea, Seoul klaus-robert.mueller@tu-berlin.de Abstract Analytic shrinkage is a statistical technique that offers a fast alternative to crossvalidation for the regularization of covariance matrices and has appealing consistency properties. We show that the proof of consistency requires bounds on the growth rates of eigenvalues and their dispersion, which are often violated in data. We prove consistency under assumptions which do not restrict the covariance structure and therefore better match real world data. In addition, we propose an extension of analytic shrinkage –orthogonal complement shrinkage– which adapts to the covariance structure. Finally we demonstrate the superior performance of our novel approach on data from the domains of finance, spoken letter and optical character recognition, and neuroscience. 1 Introduction The estimation of covariance matrices is the basis of many machine learning algorithms and estimation procedures in statistics. The standard estimator is the sample covariance matrix: its entries are unbiased and consistent [1]. A well-known shortcoming of the sample covariance is the systematic error in the spectrum. In particular for high dimensional data, where dimensionality p and number of observations n are often of the same order, large eigenvalues are over- und small eigenvalues underestimated. A form of regularization which can alleviate this bias is shrinkage [2]: the convex combination of the sample covariance matrix S and a multiple of the identity T = p−1trace(S)I, Csh = (1 −λ)S + λT, (1) has potentially lower mean squared error and lower bias in the spectrum [3]. The standard procedure for chosing an optimal regularization for shrinkage is cross-validation [4], which is known to be time consuming. For online settings CV can become unfeasible and a faster model selection method is required. Recently, analytic shrinkage [3] which provides a consistent analytic formula for the above regularization parameter λ has become increasingly popular. It minimizes the expected mean squared error of the convex combination with a computational cost of O(p2), which is negligible when used for algorithms like Linear Discriminant Analysis (LDA) which are O(p3). The consistency of analytic shrinkage relies on assumptions which are rarely tested in practice [5]. This paper will therefore aim to render the analytic shrinkage framework more practical and usable for real world data. We contribute in three aspects: first, we derive simple tests for the applicability of the analytic shrinkage framework and observe that for many data sets of practical relevance the assumptions which underly consistency are not fullfilled. Second, we design assumptions which better fit the statistical properties observed in real world data which typically has a low dimensional structure. Under these new assumptions, we prove consistency of analytic shrinkage. We show a counter-intuitive result: for typical covariance structures, no shrinkage –and therefore no regularization– takes place in the limit of high dimensionality and number of observations. In practice, this leads to weak shrinkage and degrading performance. Therefore, third, we propose an extension of the shrinkage framework: automatic orthogonal complement shrinkage (aoc-shrinkage) 1 takes the covariance structure into account and outperforms standard shrinkage on real world data at a moderate increase in computation time. Note that proofs of all theorems in this paper can be found in the supplemental material. 2 Overview of analytic shrinkage To derive analytic shrinkage, the expected mean squared error of the shrinkage covariance matrix eq. (1) as an estimator of the true covariance matrix C is minimized: λ⋆= arg min λ R(λ) := arg min λ E  C −(1 −λ)S −λT 2 (2) = arg min λ X i,j ( 2λ n Cov  Sij, Tij  −Var  Sij o + λ2E hSij −Tij 2i + Var  Sij ) (3) = P i,j n Var Sij  −Cov Sij, Tij o P i,j E hSij −Tij 2i . The analytic shrinkage estimator ˆλ is obtained by replacing expectations with sample estimates: d Var Sij  = 1 (n −1)n X s  xisxjs −1 n X t xitxjt 2 d Cov Sii, Tii  = 1 (n −1)np X k ( X s x2 isx2 ks −1 n X t x2 it X t′ x2 it′ ) bE  (Sij −Tij)2 = (Sij −Tij)2 Theoretical results on the estimator ˆλ are based on analysis of a sequence of statistical models indexed by n. Xn denotes a pn × n matrix of n iid observations of pn variables with mean zero and covariance matrix Σn. Yn = ΓT nXn denotes the same observations in their eigenbasis, having diagonal covariance Λn = ΓT nΣnΓn. Lower case letters xn it and yn it denote the entries of Xn and Yn, respectively1. The main theoretical result on the estimator ˆλ is its consistency in the large n, p limit [3]. A decisive role is played by an assumption on the eighth moments2 in the eigenbasis: Assumption 2 (A2, Ledoit/Wolf 2004 [3]). There exists a constant K2 independent of n such that p−1 n pn X i=1 E[(yn i1)8] ≤K2. 3 Implicit assumptions on the covariance structure From the assumption on the eighth moments in the eigenbasis, we derive requirements on the eigenvalues which facilitate an empirical check: Theorem 1 (largest eigenvalue growth rate). Let A2 hold. Then, there exists a limit on the growth rate of the largest eigenvalue γn 1 = max i Var(yn i ) = O  p1/4 n  . Theorem 2 (dispersion growth rate). Let A2 hold. Then, there exists a limit on the growth rate of the normalized eigenvalue dispersion dn = p−1 n X i (γi −p−1 n X j γj)2 = O (1) . 1We shall often drop the sequence index n and the observation index t to improve readability of formulas. 2eighth moments arise because Var(Sij), the variance of the sample covariance, is of fourth order and has to converge. Nevertheless, even for for non-Gaussian data convergence is fast. 2 model A model B 100 200 300 400 500 2 2.5 3 3.5 4 normalized sample dispersion model A 100 200 300 400 5000 10 20 30 40 sample dispersion max(EV) 100 200 300 400 500 0 10 20 model B covariance matrices dispersion and largest EV dimensionality 100 200 300 400 5000 50 100 max(EV) Figure 1: Covariance matrices and dependency of the largest eigenvalue/dispersion on the dimensionality. Average over 100 repetitions. 0 500 1000 0 50 100 150 normalized sample dispersion #assets US stock market sample dispersion max(EV) 0 500 1000 0 200 400 600 0 100 200 0 5 10 #pixels USPS hand−written digits 0 100 200 0 20 40 0 200 400 600 0 20 40 #features ISOLET spoken letters 0 200 400 6000 100 200 0 200 400 0 50 100 #features BCI EEG data 0 200 4000 100 200 max(EV) dimensionality Figure 2: Dependency of the largest eigenvalue/dispersion on the dimensionality. Average over 100 random subsets. The theorems restrict the covariance structure of the sequence of models when the dimensionality increases. To illustrate this, we design two sequences of models A and B indexed by their dimensionality p, in which dimensions xp i are correlated with a signal sp: xp i = (0.5 + bp i ) · εp i + αcp i sp, with probability PsA/B(i), (0.5 + bp i ) · εp i , else. (4) where bp i and cp i are uniform random from [0, 1], sp and ϵp i are standard normal, α = 1, PsB(i) = 0.2 and PsA(i) = (i/10 + 1)−7/8 (power law decay). To avoid systematic errors, we hold the ratio of observations to dimensions fixed: np/p = 2. To the left in Figure 1, covariance matrices are shown: For model A, the matrix is dense in the upper left corner, the more dimensions we add the more sparse the matrix gets. For model B, correlations are spread out evenly. To the right, normalized sample dispersion and largest eigenvalue are shown. For model A, we see the behaviour from the theorems: the dispersion is bounded, the largest eigenvalue grows with the fourth root. For model B, there is a linear dependency of both dispersion and largest eigenvalue: A2 is violated. For real world data, we measure the dependency of the largest eigenvalue/dispersion on the dimensionality by averaging over random subsets. Figure 2 shows the results for four data sets3: (1) New York Stock Exchange, (2) USPS hand-written digits, (3) ISOLET spoken letters and (4) a Brain Computer Interface EEG data set. The largest eigenvalues and the normalized dispersions (see Figure 2) closely resemble model B; a linear dependence on the dimensionality which violates A2 is visible. 3for details on the data sets, see section 5. 3 4 Analytic shrinkage for arbitrary covariance structures We replace A2 by a weaker assumption on the moments in the basis of the observations X which does not impose any constraints on the covariance structure4: Assumption 2′ (A2′). There exists a constant K2 independent of p such that p−1 p X i=1 E[(xp i1)8] ≤K2. Standard assumptions For the proof of consistency, the relationship between dimensionality and number of observations has to be defined and a weak restriction on the correlation of the products of uncorrelated variables is necessary. We use slightly modified versions of the original assumptions [3]. Assumption 1′ (A1′, Kolmogorov asymptotics). There exists a constant K1, 0 ≤K1 ≤∞independent of p such that lim p→∞p/np = K1. Assumption 3′ (A3′). lim p→∞ P i,j,kl,l∈Qp Cov[yp i1yp j1, yp k1yp l1] 2 |Qp| = 0 where Qp is the set of all quadruples consisting of distinct integers between 1 and p. Additional Assumptions A1′ to A3′ subsume a wide range of dispersion and eigenvalue configurations. To investigate the role which this plays, we categorize sequences by adding an additional parameter k. It will prove essential for the limit behavior of optimal shrinkage and the consistency of analytic shrinkage: Assumption 4 (A4, growth rate of the normalized dispersion). Let γi denote the eigenvalues of C. Then, the limit behaviour of the normalized dispersion is parameterized by k: p−1 X i (γi −p−1 X j γj)2 = Θ max(1, p2k−1)  , where Θ is the Landau Theta. In sequences of models with k ≤0.5 the normalized dispersion is bounded from above and below, as in model A in the last section. For k > 0.5 the normalized dispersion grows with the dimensionality, for k = 1 it is linear in p, as in model B. We make two technical assumptions to rule out degenerate cases. First, we assume that, on average, additional dimensions make a positive contribution to the mean variance: Assumption 5 (A5). There exists a constant K3 such that p−1 p X i=1 E[(xp i1)2] ≥K3. Second, we assume that limits on the relation between second, fourth and eighth moments exist: Assumption 6 (A6, moment relation). ∃α4, α8, β4 and β8: E[y8 i ] ≤ (1 + α8)E2[y4 i ] E[y4 i ] ≤ (1 + α4)E2[y2 i ] E[y8 i ] ≥ (1 + β8)E2[y4 i ] E[y4 i ] ≥ (1 + β4)E2[y2 i ] 4For convenience, we index the sequence of statistical models by p instead of n. 4 Figure 3: Illustration of orthogonal complement shrinkage. Theoretical results on limit behaviour and consistency We are able to derive a novel theorem which shows that under these wider assumptions, shrinkage remains consistent: Theorem 3 (Consistency of Shrinkage). Let A1′, A2′, A3′, A4, A5, A6 hold and m = E  (λ∗−ˆλ)/λ∗2 denote the expected squared relative error of the estimate ˆλ. Then, independently of k, lim p→∞m = 0. An unexpected caveat accompanying this result is the limit behaviour of the optimal shrinkage strength λ∗: Theorem 4 (Limit behaviour). Let A1′, A2′, A3′, A4, A5, A6 hold. Then, there exist 0 < bl < bu < 1 k ≤0.5 ⇒ ∀n : bl ≤λ∗≤bu k > 0.5 ⇒ lim p→∞λ∗= 0 The theorem shows that there is a fundamental problem with analytic shrinkage: if k is larger than 0.5 (all data sets in the last section had k = 1) there is no shrinkage in the limit. 5 Automatic orthogonal complement shrinkage Orthogonal complement shrinkage To obtain a finite shrinkage strength, we propose an extension of shrinkage we call oc-shrinkage: it leaves the first eigendirection untouched and performs shrinkage on the orthogonal complement oc of that direction. Figure 3 illustrates this approach. It shows a three dimensional true covariance matrix with a high dispersion that makes it highly ellipsoidal. The result is a high level of discrepancy between the spherical shrinkage target and the true covariance. The best convex combination of target and sample covariance will put extremely low weight on the target. The situation is different in the orthogonal complement of the first eigendirection of the sample covariance matrix: there, the discrepancy between sample covariance and target is strongly reduced. To simplify the theoretical analysis, let us consider the case where there is only a single growing eigenvalue while the remainder stays bounded: 5 Assumption 4′ (A4′ single large eigenvalue). Let us define zi = yi, 2 ≤i ≤p, z1 = p−k/2y1. There exist constants Fl and Fu such that Fl ≤E[z8 i ] ≤Fu A recent result from Random Matrix Theory [6] allows us to prove that the projection on the empirical orthogonal complement boc does not affect the consistency of the estimator ˆλ b oc: Theorem 5 (consistency of oc-shrinkage). Let A1′, A2′, A3′, A4′, A5, A6 hold. In addition, assume that 16th moments5 of the yi exist and are bounded. Then, independently of k, lim p→∞  ˆλ b oc −arg min λ Q b oc(λ) 2 = 0, where Q denotes the mean squared error (MSE) of the convex combination (cmp. eq. (2)). Automatic model selection Orthogonal complement shrinkage only yields an advantage if the first eigenvalue is large enough. Starting from eq. (2), we can consistently estimate the error of standard shrinkage and orthogonal complement shrinkage and only use oc-shrinkage when the difference b∆R, b oc is positive. In the supplemental material, we derive a formula of a conservative estimate: b∆R,cons., b oc = b∆R, b oc −m∆ˆσb∆R,c oc −mEˆλ2 b ocˆσ ˆ E. Usage of m∆= 0.45 corresponds to 75% probability of improvement under gaussianity and yields good results in practice. The second term is relevant in small samples, setting mE = 0.1 is sufficient. A dataset may have multiple large eigenvalues. It is straightforward to iterate the procedure and thus automatically select the number of retained eigendirections ˆr. We call this automatic orthogonal complement shrinkage. An algorithm listing can be found in the supplemental. The computational cost of aoc-shrinkage is larger than that of standard shrinkage as it additionally requires an eigendecomposition O(p3) and some matrix multiplications O(ˆrp2). In the applications considered here, this additional cost is negligible: ˆr ≪p and the eigendecomposition can replace matrix inversions for LDA, QDA or portfolio optimization. 10 1 10 2 0.4 0.5 0.6 0.7 0.8 0.9 1 dimensionality p PRIAL Shrinkage oc(1)−Shrinkage oc(2)−Shrinkage oc(3)−Shrinkage oc(4)−Shrinkage aoc−Shrinkage Figure 4: Automatic selection of the number of eigendirections. Average over 100 runs. 6 Empirical validation Simulations To test the method, we extend model B (eq. (4), section 3) to three signals, Psi = (0.1, 0.25, 0.5). Figure 4 reports the percentage improvement in average loss over the sample covariance matrix, PRIAL Csh/oc−sh/aoc−sh = E∥S −C∥−E∥Csh/oc−sh/aoc−sh −C∥ E∥S −C∥ , 5The existence of 16th moments is needed because we bound the estimation error in each direction by the maximum over all directions, an extremely conservative approximation. 6 Table 1: Portfolio risk. Mean absolute deviations·103 (mean squared deviations·106) of the resulting portfolios for the different covariance estimators and markets. † := aoc-shrinkage significantly better than this model at the 5% level, tested by a randomization test. US EU HK sample covariance 8.56† (156.1†) 5.93† (78.9†) 6.57† (81.2†) standard shrinkage 6.27† (86.4†) 4.43† (46.2†) 6.32† (76.2†) ˆλ 0.09 0.12 0.10 shrinkage to a factor model 5.56† (69.6†) 4.00† (39.1†) 6.17† (72.9†) ˆλ 0.41 0.44 0.42 aoc-shrinkage 5.41 (67.0) 3.83 (36.3) 6.11 (71.8) ˆλ 0.75 0.79 0.75 average ˆr 1.64 1.17 1.41 Table 2: Accuracies for classification tasks on ISOLET and USPS data. ∗:= significantly better than all compared methods at the 5% level, tested by a randomization test. ISOLET USPS ntrain 500 2000 5000 500 2000 5000 LDA 75.77% 92.29% 94.1% 72.31% 87.45% 89.56% LDA (shrinkage) 88.92% 93.25% 94.3% 83.77% 88.37% 89.77% LDA (aoc) 89.69%∗ 93.42%∗ 94.33%∗ 83.95%∗ 88.37% 89.77% QDA 2.783% 4.882% 14.09% 10.11% 49.45% 72.43% QDA (shrinkage) 58.57% 75.4% 79.25% 82.2% 88.85% 89.67% QDA (aoc) 59.51% 80.84% 87.35% 83.31% 89.4%∗ 90.07% of standard shrinkage, oc-shrinkage for one to four eigendirections and aoc-shrinkage. Standard shrinkage behaves as predicted by Theorem 4: ˆλ and therefore the PRIAL tend to zero in the large n, p limit. The same holds for orders of oc-shrinkage –oc(1) and oc(2)– lower than the number of signals, but performance degrades more slowly. For small dimensionalities eigenvalues are small and therefore there is no advantage for oc-shrinkage. On the contrary, the higher the order of oc-shrinkage, the larger the error by projecting out spurious large eigenvalues which should have been subject to regularization. The automatic order selection aoc-shrinkage leads to close to optimal PRIAL for all dimensionalities. Real world data I: portfolio optimization Covariance estimates are needed for the minimization of portfolio risk [7]. Table 1 shows portfolio risk for approximately eight years of daily return data from 1200 US, 600 European and 100 Hong Kong stocks, aggregated from Reuters tick data [8]. Estimation of covariance matrices is based on short time windows (150 days) because of the data’s nonstationarity. Despite the unfavorable ratio of observations to dimensionality, standard shrinkage has very low values of ˆλ: the stocks are highly correlated and the spherical target is highly inappropriate. Shrinkage to a financial factor model incorporating the market factor [9] provides a better target; it leads to stronger shrinkage and better portfolios. Our proposed aoc-shrinkage yields even stronger shrinkage and significantly outperforms all compared methods. Table 3: Accuracies for classification tasks on BCI data. Artificially injected noise in one electrode. ∗:= significantly better than all compared methods at the 5% level, tested by a randomization test. σnoise 0 10 30 100 300 1000 LDA 92.28% 92.28% 92.28% 92.28% 92.28% 92.28% LDA (shrinkage) 92.39% 92.94% 92.18% 88.04% 82.15% 73.79% LDA (aoc) 93.27%∗ 93.27%∗ 93.24%∗ 92.88%∗ 93.16%∗ 93.19%∗ average ˆr 2.0836 3.0945 3.0891 3.0891 3.0891 3.09 7 −0.0932 −0.0466 0 0.0466 0.0932 −0.0631 −0.0316 0 0.0316 0.0631 −0.2532 −0.1266 0 0.1266 0.2532 Figure 5: High variance components responsible for failure of shrinkage in BCI. σnoise = 10. Subject 1. Real world data II: USPS and ISOLET We applied Linear and Quadratic Discriminant Analysis (LDA and QDA) to hand-written digit recognition (USPS, 1100 observations with 256 pixels for each of the 10 digits [10]) and spoken letter recognition (ISOLET, 617 features, 7797 recordings of 26 spoken letters [11], obtained from the UCI ML Repository [12]) to assess the quality of standard and aoc-shrinkage covariance estimates. Table 2 shows that aoc-shrinkage outperforms standard shrinkage for QDA and LDA on both data sets for different training set sizes. Only for LDA and large sample sizes on the relatively low dimensional USPS data, there is no difference between standard and aoc-shrinkage: the automatic procedure decides that shrinkage on the whole space is optimal. Real world data III: Brain-Computer-Interface The BCI data was recorded in a study in which 11 subjects had to distinguish between noisy and noise-free phonemes [13, 14]. We applied LDA on 427 standardized features calculated from event related potentials in 61 electrodes to classify two conditions: correctly identified noise-free and correctly identified noisy phonemes (ntrain = 1000). For Table 3, we simulated additive noise in a random electrode (100 repetitions). With and without noise, our proposed aoc-shrinkage outperforms standard shrinkage LDA. Without noise, ˆr ≈2 high variance directions –probably corresponding to ocular and facial muscle artefacts, depicted to the left in Figure 5– are left untouched by aoc-shrinkage. With injected noise, the number of directions increases to ˆr ≈3, as the procedure detects the additional high variance component –to the right in Figure 5– and adapts the shrinkage procedure such that performance remains unaffected. For standard shrinkage, noise affects the analytic regularization and performance degrades as a result. 7 Discussion Analytic shrinkage is a fast and accurate alternative to cross-validation which yields comparable performance, e.g. in prediction tasks and portfolio optimization. This paper has contributed by clarifying the (limited) applicability of the analytic shrinkage formula. In particular we could show that its assumptions are often violated in practice since real world data has complex structured dependencies. We therefore introduced a set of more general assumptions to shrinkage theory, chosen such that the appealing consistency properties of analytic shrinkage are preserved. We have shown that for typcial structure in real world data, strong eigendirections adversely affect shrinkage by driving the shrinkage strength to zero. Therefore, finally, we have proposed an algorithm which automatically restricts shrinkage to the orthogonal complement of the strongest eigendirections if appropriate. This leads to improved robustness and significant performance enhancement in simulations and on real world data from the domains of finance, spoken letter and optical character recognition, and neuroscience. Acknowledgments This work was supported in part by the World Class University Program through the National Research Foundation of Korea funded by the Ministry of Education, Science, and Technology, under Grant R31-10008. We thank Gilles Blanchard, Duncan Blythe, Thorsten Dickhaus, Irene Winkler and Anne Porbadnik for valuable comments and discussions. 8 References [1] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. Springer, 2008. [2] Charles Stein. Inadmissibility of the usual estimator for the mean of a multivariate normal distribution. In Proc. 3rd Berkeley Sympos. Math. Statist. Probability, volume 1, pages 197–206, 1956. [3] Olivier Ledoit and Michael Wolf. A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis, 88(2):365–411, 2004. [4] Jerome. H. Friedman. Regularized discriminant analysis. Journal of the American Statistical Association, 84(405):165–175, 1989. [5] Juliane Sch¨afer and Korbinian Strimmer. A shrinkage approach to large-scale covariance matrix estimation and implications for functional genomics. Statistical Applications in Genetics and Molecular Biology, 4(1):1175–1189, 2005. [6] Boaz Nadler. Finite sample approximation results for principal component analysis: A matrix perturbation approach. The Annals of Statistics, 36(6):2791–2817, 2008. [7] Harry Markowitz. Portfolio selection. Journal of Finance, VII(1):77–91, March 1952. [8] Daniel Bartz, Kerr Hatrick, Christian W. Hesse, Klaus-Robert M¨uller, and Steven Lemm. Directional Variance Adjustment: Bias reduction in covariance matrices based on factor analysis with an application to portfolio optimization. PLoS ONE, 8(7):e67503, 07 2013. [9] Olivier Ledoit and Michael Wolf. Improved estimation of the covariance matrix of stock returns with an application to portfolio selection. Journal of Empirical Finance, 10:603–621, 2003. [10] Jonathan J. Hull. A database for handwritten text recognition research. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(5):550–554, May 1994. [11] Mark A Fanty and Ronald Cole. Spoken letter recognition. In Advances in Neural Information Processing Systems, volume 3, pages 220–226, 1990. [12] Kevin Bache and Moshe Lichman. UCI machine learning repository. University of California, Irvine, School of Information and Computer Sciences, 2013. [13] Anne Kerstin Porbadnigk, Jan-Niklas Antons, Benjamin Blankertz, Matthias S Treder, Robert Schleicher, Sebastian M¨oller, and Gabriel Curio. Using ERPs for assessing the (sub)conscious perception of noise. In 32nd Annual Intl Conf. of the IEEE Engineering in Medicine and Biology Society, pages 2690–2693, 2010. [14] Anne Kerstin Porbadnigk, Matthias S Treder, Benjamin Blankertz, Jan-Niklas Antons, Robert Schleicher, Sebastian M¨oller, Gabriel Curio, and Klaus-Robert M¨uller. Single-trial analysis of the neural correlates of speech quality perception. Journal of neural engineering, 10(5):056003, 2013. 9
2013
200
4,933
Higher Order Priors for Joint Intrinsic Image, Objects, and Attributes Estimation Vibhav Vineet Oxford Brookes University, UK vibhav.vineet@gmail.com Carsten Rother TU Dresden, Germany carsten.rother@tu-dresden.de Philip H.S. Torr University of Oxford, UK philip.torr@eng.ox.ac.uk Abstract Many methods have been proposed to solve the problems of recovering intrinsic scene properties such as shape, reflectance and illumination from a single image, and object class segmentation separately. While these two problems are mutually informative, in the past not many papers have addressed this topic. In this work we explore such joint estimation of intrinsic scene properties recovered from an image, together with the estimation of the objects and attributes present in the scene. In this way, our unified framework is able to capture the correlations between intrinsic properties (reflectance, shape, illumination), objects (table, tv-monitor), and materials (wooden, plastic) in a given scene. For example, our model is able to enforce the condition that if a set of pixels take same object label, e.g. table, most likely those pixels would receive similar reflectance values. We cast the problem in an energy minimization framework and demonstrate the qualitative and quantitative improvement in the overall accuracy on the NYU and Pascal datasets. 1 Introduction Recovering scene properties (shape, illumination, reflectance) that led to the generation of an image has been one of the fundamental problems in computer vision. Barrow and Tenebaum [13] posed this problem as representing each scene properties with its distinct “intrinsic” images. Over the years, many decomposition methods have been proposed [5, 16, 17], but most of them focussed on recovering a reflectance image and a shading1 image without explicitly modelling illumination or shape. But in the recent years a breakthrough in the research on intrinsic images came with the works of Barron and Malik [1-4] who presented an algorithm that jointly estimated the reflectance, the illumination and the shape. They formulate this decomposition problem as an energy minimization problem that captures prior information about the structure of the world. Further, recognition of objects and their material attributes is central to our understanding of the world. A great deal of work has been devoted to estimating the objects and their attributes in the scene: Shotton et.al. [22] and Ladicky et.al. [9] propose approaches to estimate the object labels at the pixel level. Separately, Adelson [20], Farhadi et.al. [6], Lazebnik et.al. [23] define and estimate the attributes at the pixel, object and scene levels. Some of these attributes are material properties such as woollen, metallic, shiny, and some are structural properties such as rectangular, spherical. While these methods for estimating the intrinsic images, objects and attributes have separately been successful in generating good results on laboratory and real-world datasets, they fail to capture the strong correlation existing between these properties. Knowledge about the objects and attributes in the image can provide strong prior information about the intrinsic properties. For example, if a set of pixels takes the same object label, e.g. table, most likely those pixels would receive similar reflectance values. Thus recovering the objects and their attributes can help reduce the ambiguities present in the world leading to better estimation of the reflectance and other intrinsic properties. 1shading is the product of some shape and some illumination model which includes effects such as shadows, indirect lighting etc. 1 Input Image Input Depth Image Reflectance Shading Depth Object Attributes Object-color coding Attribute-color coding Figure 1: Given a RGBD image, our algorithm jointly estimates the intrinsic properties such as reflectance, shading and depth maps, along with the per-pixel object and attribute labels. Additionally such a decomposition might be useful for per-pixel object and attribute segmentation tasks. For example, using reflectance (illumination invariant) should improve the results-when estimating per-pixel object and attribute labels [24]. Moreover if a set of pixels have similar reflectance values, they are more likely to have the same object and attribute class. Some of the previous research has looked at the correlation of objects and intrinsic properties by propagating results from one step to the next. Osadchy et.al. [18] use specular highlights to improve recognition of transparent, shiny objects. Liu et.al. [15] recognize material categories utilizing the correlation between the materials and their reflectance properties (e.g. glass is often translucent). Weijer et.al. [14] use knowledge of the objects present in the scene to better separate the illumination from the reflectance images. However, the problem with these approaches is that the errors in one step can propagate to the next steps with no possibility of recovery. Joint estimation of the intrinsic images, objects and attributes can be used to overcome these issues. For instance, in the context of joint object recognition and depth estimation such positive synergy effects have been shown in e.g. [8]. In this work, our main contribution is to explore such synergy effects existing between the intrinsic properties, objects and material attributes present in a scene (see Fig. 1). Given an image, our algorithm jointly estimates the intrinsic properties such as reflectance, shading and depth maps, along with per-pixel object and attribute labels. We formulate it in a global energy minimization framework, and thus our model is able to enforce the consistency among these terms. Finally, we use an approximate dual decomposition based strategy to efficiently perform inference in the joint model consisting of both the continuous (reflectance, shape and illumination) and discrete (objects and attributes) variables. We demonstrate the potential of our approach on the aNYU and aPascal datasets, which are extended versions of the NYU [25] and Pascal [26] datasets with perpixel attribute labels. We evaluate both the qualitative and quantitative improvements for the object and attribute labelling, and qualitative improvement for the intrinsic images estimation. We introduce the problem in Sec. 2. Section 3 provides details about our joint model, section 4 describes our inference and learning, Sec. 5 and 6 provide experimentation and discussion. 2 Problem Formulation Our goal is to jointly estimate the intrinsic properties of the image, i.e. reflectance, shape and illumination, along with estimating the objects and attributes at the pixel level, given an image array ¯C = ( ¯C1... ¯CV ) where ¯Ci ∈R3 is the ith pixel’s associated RGB value in the image with i ∈V = {1...V }. Before going into the details of the joint formulation, we consider the formulations for independently solving these problems. We first briefly describe the SIRFS (shape, illumination and reflectance from shading) model [2] for estimating the intrinsic properties for a single given object, and then a CRF model for estimating objects, and attributes [12]. 2.1 SIRFS model for a single, given object mask We build on the SIRFS model [2] for estimating the intrinsic properties of an image. They formulate the problem of recovering the shape, illumination and reflectance as an energy minimization problem given an image. Let R = (R1...RV ), Z = (Z1...ZV ) be the reflectance, and depth maps respectively, where Ri ∈R3 and Zi ∈R3, and the illumination L be a 27-dimensional vector of spherical harmonics [10]. Further, let S(Z, L) be a function that generates a shading image given the depth map Z and the illumination L. Here Si ∈R3 and subsumes all light-dependent properties, e.g. shadows, inter-reflections (refer to [2] for details). The SIRFS model then minimizes the energy minimizeR,Z,L ESIRFS = ER(R) + EZ(Z) + EL(L) subject to ¯C = R · S(Z, L) (1) 2 where ”·” represents componentwise multiplication, and ER(R), EZ(Z) and EL(L) are the costs for the reflectance, depth and illumination respectively. The most likely solution is then estimated by using a multi-scale L-BFGS, a limited-memory approximation of the Broyden-Fletcher-GoldfarbShanno algorithm [2], strategy which in practice finds better local optima than other gradient descent strategies. The SIRFS model is limited to estimating the intrinsic properties for a single object mask within an image. The recently proposed Scene-SIRFS model [4] proposes an approach to recover the intrinsic properties of whole image by embedding a mixture of shapes in a soft segmentation of the scene. In Sec. 3 we will also extend the SIRFS model to handle multiple objects. The main difference to Scene-SIRFS is that we perform joint optimization over the object (and attributes) labelling and intrinsic image properties per-pixel. 2.2 Multilabel Object and Attribute Model The problem of estimating the per-pixel objects and attributes labels can also be formulated in a CRF framework [12]. Let O = (O1...OV ) and A = (A1...AV ) be the object and attribute variables associated with all V pixels, where each object variable Oi takes one out of K discrete labels such as table, monitor, or floor. Each attribute variable Ai takes a label from the power set of the M attribute labels, for example the subset of attribute labels can be Ai = {red, shiny, wet}. Efficient inference is performed by first representing each attributes subset Ai by M binary attribute variables Am i ∈ {0, 1}, meaning that Am i = 1 if the ith pixel takes the mth attribute and it is absent when Am i = 0. Under this assumption, the most likely solution for the objects and the attributes correspond to minimizing the following energy function EOA(O, A) = X i∈V ψi(Oi) + X m X i∈V ψi,m(Am i )+ X i<j∈V ψij(Oi, Oj)+ X m X i<j∈V ψij(Am i , Am j ) (2) Here ψi(Oi) and ψi,m(Am i ) are the object and per-binary attribute dependent unary terms respectively. Similarly, ψij(Oi, Oj) and ψij(Am i , Am j ) are the pairwise terms defined over the object and per-binary attribute variables. Finally the best configuration for the object and attributes are estimated using a mean-field based inference approach [12]. Further details about the form of the unary, pairwise terms and the inference approach are described in our technical report [29]. 3 Joint Model for Intrinsic Images, Objects and Attributes Now, we provide the details of our formulation for jointly estimating the intrinsic images (R, Z, L) along with the objects (O) and attribute (A) properties given an image ¯C in a probabilistic framework. We define the posterior probability and the corresponding joint energy function E as: P(R, Z, L, O, A|I) = 1/Z(I) exp{−E(R, Z, L, O, A|I)} E(R, Z, L, O, A|I) = ESIRFSG(R, Z, L|O, A) +ERO(R, O)+ERA(R, A)+EOA(O, A) subject to ¯C = R · S(Z, L) (3) We define ESIRFSG = ER(R) + EZ(Z) + EL(L), a new global energy term. The terms ERO(R, O) and ERA(R, A) capture correlations between the reflectance, objects and/or attribute labels assigned to the pixels. These terms take the form of higher order potentials defined on the image segments or regions of pixels generated using unsupervised segmentation approach of Felzenswalb and Huttenlocker [21]. Let S corresponds to the set of these image segments. These terms are described in detail below. 3.1 SIRFS model for a scene Given this representation of the scene, we model the scene specific ESIRFSG by a mixture of reflectance, and depth terms embedded into the segmentation of the image and an illumination term as: ESIRFSG(R, Z, L|O, A) = X c∈S  ER(Rc) + EZ(Zc)  + EL(L) (4) where R = {Rc}, Z = {Zc}. Here ER(Rc) and EZ(Zc) are the reflectance and depth terms respectively defined over segments c ∈S. In the current formulation, we have assumed that we have a single model of illumination L for whole scene which corresponds to a 27-dimensional vector of spherical harmonics [2]. 3 3.2 Reflectance, Objects term The joint reflectance-object energy term ERO(R, O) captures the relations between the objects present in the scene and their reflectance properties. Our higher order term takes following form: ERO(R, O) = X c∈S πc oψ(Rc) + X c∈S πc rψ(Oc) (5) where Rc, Oc are the labeling for the subset of pixels c respectively. Here πc oψ(Rc) is an object dependent quality sensitive higher order cost defined over the reflectance variables, and πc rψ(Oc) is a reflectance dependent quality sensitive higher order cost defined over the object variables. The term ψ(Rc) reduces the variance of the reflectance values within a clique and takes the form ψ(Rc) = ∥c∥θα(θp + θvGr(c)) where Gr(c) = exp  −θβ ∥P i∈c(Ri −µc)2∥ ∥c∥  . (6) Here ∥c∥is the size of the clique, µc = P i∈c Ri ∥c∥ and θα, θp, θv, θβ are constants. Further in order to measure the quality of the reflectance assignment to the segment, we weight the higher order cost ψ(Rc) with an object dependent πc o that measures the quality of the segment. In our case, πc o takes following form: πc o = 1 if Oi = l, ∀i ∈c λo otherwise (7) where λo < 1 is a constant. This term allows variables within a segment to take different reflectance values if the pixels in that segment take different object labels. Currently the term πc o gives rise to a hard constraint on the penalty but can be extended to one that penalizes the cost softly as in [29]. Similarly we enforce higher order consistency over the object labeling in a clique c ∈S. The term ψ(Oc) takes the form of pattern-based P N-Potts model [7] as: ψ(Oc) = γo l if Oi = l, ∀i ∈c γo max otherwise (8) where γo l , γo max are constants. Further we weight this term with a reflectance dependent quality sensitive term πc r. In our experiment we measure this term based on the variance of reflectance terms on all constituent pixels of a segment, i.e., Gr(c) (define earlier). Thus πc r takes following form: πc r = 1 if Gr(c) < K, ∀i ∈c λr otherwise (9) where K and λr < 1 are constants. Essentially, this quality measurement allows the pixels within a segment to take different object labels, if the variation in the reflectance terms within the segment is above a threshold. To summarize, these two higher order terms enforce the cost of inconsistency within the object and reflectance labels. 3.3 Reflectance, Attributes term Similarly we define the term ERA(R, A) which enforces a higher order consistency between reflectance and attribute variables. Such higher order consistency takes the following form: ERA(R, A) = X m  X c∈S πc a,mψ(Rc) + X c∈S πc rψ(Am c )  (10) where πc a,mψ(Rc) and πc rψ(Am c ) are the higher order terms defined over the reflectance image and the attribute image corresponding to the mth attribute respectively. Forms of these terms are similar to the one defined for the object-reflectance higher order terms; these terms are further explained in the supplementary material. 4 Inference and Learning Given the above model, our optimization problem involves solving following joint energy function to get the most likely solution for (R, Z, L, O, A): E(R, Z, L, O, A|I) = ESIRFSG(R, Z, L) + ERO(R, O) + ERA(R, A) + EOA(O, A) (11) 4 However, this problem is very challenging since it consists of both the continuous variables (R, Z, L) and discrete variables (O, A). Thus in order to minimize the function efficiently without losing accuracy we follow an approximate dual decomposition strategy [28]. We first introduce a set of duplicate variables for the reflectance (R1, R2, R3), objects (O1, O2), and attributes (A1, A2) and a set of new equality constraints to enforce the consistency on these duplicate variables. Our optimization problem thus takes the following form: minimize R1,R2,R3,Z,L,O1,O2 E(R1, Z, L) + E(O1, A1) + E(R2, O2) + E(R3, A2) subject to R1 = R2 = R3; O1 = O2; A1 = A2 (12) From now on we have removed the subscripts and superscripts from the energy terms for simplicity of the notations. Now we formulate it as an unconstrained optimization problem by introducing a set of lagrange multipliers θ1 r, θ2 r, θo, θa and decompose the dual problem into four sub-problems as: E(R1, Z, L) + E(O1, A1) + E(R2, O2) + E(R3, A2) + θ1 r(R1 −R2) + θ2 r(R2 −R3) + θo(O1 −O2) + θa(A1 −A2) = g1(R1, Z, L) + g2(O1, A1) + g3(O2, R2) + g4(A2, R3), (13) where g1(R1, Z, L) = minimizeR1,Z,L E(R1, Z, L) + θ1 rR1 g2(O1, A1) = minimizeO1,A1 E(O1, A1) + θoO1 + θaA1 g3(O2, R2) = minimizeO2,R2 E(O2, R2) −θoO2 −θ1 rR2 g4(A2, R3) = minimizeA2,R3 E(A2, R3) −θaA2 −θ2 rR3 (14) are the slave problems which are optimized separately and efficiently while treating the dual variables θ1 r, θ2 r, θo, θa constant, and the master problem then optimizes these dual variables to enforce consistency. Next, we solve each of the sub-problems and the master problem. Solving subproblem g1(R1, Z, L): Solving the sub-problem g1(R1, Z, L) requires optimizing with only continuous variables (R1, Z, L). We follow a multi-scale LBFGS strategy [2] to optimize this part. Each step of the LBFGS approach requires evaluating the gradient of g1(R1, Z, L) wrt. R1, Z, L. Solving subproblem g2(O1, A1): The second sub-problem g2(O1, A1) involves only discrete variables (O1, A1). The dual variable dependent terms add θoO1 to the object unary potential ψi(O1) and θaA1 to the attribute unary potential ψi(A1). Let ψ′(O1) and ψ′(A1) be the updated object and attribute unary potentials. We follow a filter-based mean-field strategy [11, 12] for the optimization. In the mean-field framework, given the true distribution P = exp(−g2(O1,A1)) ¯ Z , we find an approximate distribution Q, where approximation is measured in terms of the KL-divergence between the P and Q distributions. Here ¯Z is the normalizing constant. Based on the model in Sec. 2.2, Q takes the form as Qi(O1 i , A1 i ) = QO i (O1 i ) Q m QA i,m(Ai 1 m), where QO i is a multi-class distribution over the object variable, and QA i,m is a binary distribution over {0,1}. With this, the mean-field updates for the object variables take the following form: QO i (O1 i = l) = 1 ZO i exp{−ψ′ i(O1 i ) − X l′∈1..K X j̸=i QO j (O1 j = l′)(ψij(O1 i , O1 j))} (15) where ψij is a potts term modulated by a contrast sensitive pairwise cost defined by a mixture of Gaussian kernels [12], and ZO i is per-pixel normalization factor. Given this form of the pairwise terms, as in [12], we can efficiently evaluate the pairwise summations in Eq. 15 using K Gaussian convolutions. The updates for the attribute variables also take similar form (refer to the supplementary material). Solving subproblems g3(O2, R2), g4(A2, R3): These two problems take the following forms: g3(O2, R2) = minimizeO2,R2 X c∈S πc o2ψ(R2 c) + X c∈S πc r2ψ(O2 c) −θoO2 −θ1 rR2 (16) g4(A2, R3) = minimizeA2,R3 X m X c∈S πc a2,mψ(R3 c)+ X c∈S πc r3ψ(A2,m c )  −θaA2−θ2 rR3 5 Solving of these two sub-problems requires optimization with both the continuous R2 and discrete O2, A2 variables respectively. However since these two sub-problems consist of higher order terms (described in Eq. 8) and dual variable dependent terms, we follow a simple co-ordinate descent strategy to update the reflectance and the object (and attribute) variables iteratively. The optimization of the object (and attribute) variables are performed in a mean-field framework, and a gradient descent based approach is used for the reflectance variables. Solving master problem The master problem then updates the dual-variables θ1 r, θ2 r, θo, θa given the current solution from the slaves. Here we provide the update equations for θ1 r; the updates for the other dual variables take similar form. The master calculates the gradient of the problem E(R, Z, L, O, A|I) wrt. θ1 r, and then iteratively updates the values of θ1 r as: θ1 r = θ1 r + α1 r  gθ1 r 1 (R1, Z, L) + gθ1 r 3 (O2, R2)  (17) where αt r is the step size tth iteration and gθ1 r 1 , gθ1 r 3 are the gradients w.r.t. to the θ1 r. It should be noted that we do not guarantee the convergence of our approach since the subproblems g1(.) and g2(.) are solved approximately. Further details on our inference techniques are provided in the supplementary material. Learning: In the model described above, there are many parameters joining each of these terms. We use a cross-validation strategy to estimate these parameters in a sequential manner and thus ensuring efficient strategy to estimate a good set of parameters. The unary potentials for the objects and attributes are learnt using a modified TextonBoost model of Ladicky et.al. [9] which uses a colour, histogram of oriented gradient (HOG), and location features. 5 Experiments We demonstrate our joint estimation approach on both the per-pixel object and attribute labelling tasks, and estimation of the intrinsic properties of the images. For the object and attribute labelling tasks, we conduct experiments on the NYU 2 [25] and Pascal [26] datasets both quantitatively and qualitatively. To this end, we annotate the NYU 2 and the Pascal datasets with per-pixel attribute labels. As a baseline, we compare our joint estimation approach against the mean-field based method [12], and the graph-cuts based α-expansion method [9]. We assess the accuracy in terms of the overall percentage of the pixels correctly labelled, and the intersection/union score per class (defined in terms of the true/false positives/negatives for a given class as TP/(TP+FP+FN)). Additionally we also evaluate our approach in estimating better intrinsic properties of the images though qualitatively only, since it is extremely difficult to generate the ground truths for the intrinsic properties, e.g. reflectance, depth and illumination for any general image. We compare our intrinsic properties results against the model of Barron and Malik2[2, 4], Gehler et.al. [5] and the Retinex model [17]. Further, only visually we also show how our approach is able to recover better smooth and de-noised depth maps compared to the raw depth provided by the Kinect [25]. In all these cases, we use the code provided by the authors for the AHCRF [9], mean-field approach [11, 12]. Details of all the experiments are provided below. 5.1 aNYU 2 dataset We first conduct experiment on aNYU 2 RGBD dataset, an extended version of the indoor NYU 2 dataset [25]. The dataset consists of 725 training images, 100 validation and 624 test images. Further, the dataset consists of per-pixel object and attribute labels (see Fig. 1 and 3 for per-pixel attribute labels). We select 15 object and 8 attribute classes that have sufficient number of instances to train the unary classifier responses. The object labels corresponds to some indoor object classes as floor, wall, .. and attribute labels corresponds to material properties of the objects as wooden, painted, .... Further, since this dataset has depth from the Kinect depths, we use them to initialize the depth maps Z for both our joint estimation approach and the Barron and Malik models [2-4]. We show quantitative and qualitative results in Tab. 1 and Fig. 3 respectively. As shown, our joint approach achieves an improvement of almost 2.3% , and 1.2% in the overall accuracy and average intersection-union (I/U) score over the model of AHCRF [9], and almost 1.5 % improvement in the 2We extended the SIRFS [2] model to our Scene-SIRFS using a mixture of reflectance and depth maps, and a single illumination model. These mixtures of reflectance and depth maps were embedded in the soft segmentation of the scene generated using the approach of Felzenswalb et.al. [21]. We call this model: Barron and Malik [2,4]. 6 Algorithm Av. I/U Oveall(% corr) AHCRF [9] 28.88 51.06 DenseCRF [12] 29.66 50.70 Ours (OA+Intr) 30.14 52.23 (a) Object Accuracy Algorithm Av. I/U Oveall(% corr) AHCRF [9] 21.9 40.7 DenseCRF [12] 22.02 37.6 Ours (OA+Intr) 24.175 39.25 (b) Attribute Accuracy Table 1: Quantitative results on aNYU 2 dataset for both the object segmentation (a), and attributes segmentation (b) tasks. The table compares performance of our approach (last line) against three baselines. The importance of our joint estimation for intrinsic images, objects and attributes is confirmed by the better performance of our algorithm compared to the graph-cuts based (AHCRF) method [9] and mean-field based approach [12] for both the tasks. Here intersection vs. union (I/U) is defined as T P T P +F N+F P and ’% corr’ as the total proportional of correctly labelled pixels. Input Image our reflectance our shading our normals our depth reflectance [17] reflectance[5] Kinect depth reflectance [2,4] shading [2,4] normals [2,4] depth [2,4] shading [17] shading[5] Input Image our reflectance our shading our normals our depth reflectance [17] reflectance[5] Kinect depth reflectance [2,4] shading [2,4] normals [2,4] depth [2,4] shading [17] shading[5] Figure 2: Given an image and its depth image for the aNYU dataset, these figures qualitatively compare our algorithm in jointly estimating better the intrinsic properties such as reflectance, shading, normals and depth maps. We compare against the model Barron and Malik [2,4], the Retinex model [17] (2nd last column) and the Gehler et.al. approach [5] (last column). average I/U over the model of [12] for the object class segmentation . Similarly we also observe an improvement of almost 2.2 % and 0.5 % in the overall accuracy and I/U score over AHCRF [12], and almost 2.1 % and 1.6 % in the overall accuracy and average I/U over the model of [12] for the per-pixel attribute labelling task. These quantitative improvement suggests that our model is able to improve the object and attribute labelling using the intrinsic properties information. Qualitatively also we observe an improvement in the output of both the object and attribute segmentation tasks as shown in Fig. 3. Further, we show the qualitative improvement in the results of the intrinsic properties in the Fig. 2. As shown our joint approach helps to recover better depth map compared to the noisy kinect depth maps; justifying the unification of reconstruction and objects and attributes based recognition tasks. Further, our reflectance and shading images visually look much better than the models of Retinex [17] and Gehler et.al. [5], and similar to the Barron and Malik approach [2,4]. 5.2 aPascal dataset We also show experiments on aPascal dataset, our extended Pascal dataset with per-pixel attribute labels. We select a subset of 517 images with the per-pixel object labels from the Pascal dataset and annotate it with 7 material attribute labels at the pixel level. These attributes correspond to wooden, skin, metallic, glass, shiny... etc. Further for the Pascal dataset we do not have any initial depth estimate. Thus, we start with a depth map where each point in the space is given same constant depth value. Some quantitative and qualitative results are shown in Tab. 2 and Fig. 3 respectively. As shown, our approach achieves an improvement of almost 2.0 % and 0.5 % in the I/U score for the object and 7 Algorithm Av. I/U Oveall(% corr) AHCRF [9] 32.53 82.30 DenseCRF [12] 36.9 79.4 Ours (OA + Intr) 38.1 81.4 (a) Object Accuracy Algorithm Av. I/U Oveall(% corr) AHCRF [9] 17.4 95.1 DenseCRF [12] 18.28 96.2 Ours (OA+Intr) 18.85 96.7 (b) Attribute Accuracy Table 2: Quantitative results on aPascal dataset for both the object segmentation (a), and attributes segmentation (b) tasks. The table compares performance of our approach (last line) against three baselines. The importance of our joint estimation for intrinsic images, objects and attributes is confirmed by the better performance of our algorithm compared to the graph-cuts based (AHCRF) method [9] and mean-field based approach [12] for both the tasks. Here intersection vs. union (I/U) is defined as T P T P +F N+F P and ’% corr’ as the total proportional of correctly labelled pixels. attribute labelling tasks respectively over the model of [12]. We observe qualitative improvement in the accuracy shown in Fig. 3. Input Image Reflectance Depth Ground truth Output [9] Output [10] Our Object Our Attribute NYU Object-color coding Attribute-color coding Figure 3: Qualitative results on aNYU (first 2 lines) and aPascal (last line) dataset. From left to right: input image, reflectance, depth images, ground truth, output from [9] (AHCRF), output from [12], our output for the object segmentation. Last column shows our attribute segmentation output. (Attributes for NYU dataset: wood, painted, cotton, glass, brick, plastic, shiny, dirty; Attributes for Pascal dataset: skin, metal, plastic, wood, cloth, glass, shiny.) 6 Discussion and Conclusion In this work, we have explored the synergy effects between intrinsic properties of an images, and the objects and attributes present in the scene. We cast the problem in a joint energy minimization framework; thus our model is able to encode the strong correlations between intrinsic properties (reflectance, shape,illumination), objects (table, tv-monitor), and materials (wooden, plastic) in a given scene. We have shown that dual-decomposition based techniques can be effectively applied to perform optimization in the joint model. We demonstrated its applicability on the extended versions of the NYU and Pascal datasets. We achieve both the qualitative and quantitative improvements for the object and attribute labeling, and qualitative improvement for the intrinsic images estimation. Future directions include further exploration of the possibilities of integrating priors based on the structural attributes such as slanted, cylindrical to the joint intrinsic properties, objects and attributes model. For instance, knowledge that the object is slanted would provide a prior for the depth and distribution of the surface normals. Further, the possibility of incorporating a mixture of illumination models to better model the illumination in a natural scene remains another future direction. Acknowledgements. This work was supported by the IST Programme of the European Community, under the PASCAL2 Network of Excellence, IST-2007-216886. P.H.S. Torr is in receipt of Royal Society Wolfson Research Merit Award. References [1] Barron, J.T. & Malik, J. (2012) Shape, albedo, and illumination from a single image of an unknown object. In IEEE CVPR, pp. 334-341. Providence, USA. [2] Barron, J.T. & Malik, J. (2012) Color constancy, intrinsic images, and shape estimation. In ECCV, pp. 57-70. Florence, Italy. 8 [3] Barron, J.T. & Malik, J. (2012) High-frequency shape and albedo from shading using natural image statistics. In IEEE CVPR, pp. 2521-2528. CO, USA. [4] Barron, J., & Malik, J. (2013) Intrinsic scene properties from a single RGB-D image. In IEEE CVPR. [5] Gehler, P.V., Rother, C., Kiefel, M., Zhang, L. & Bernhard, S. (2011) Recovering intrinsic images with a global sparsity prior on reflectance. In NIPS, pp. 765-773. Granada, Spain. [6] Farhadi, A., Endres, I., Hoiem, D. & Forsyth D.A., (2009) Describing objects by their attributes. In IEEE CVPR, pp. 1778-1785. Miami, USA. [7] Kohli, P., Kumar, M.P., & Torr, P.H.S. (2009) P & beyond: move making algorithms for solving higher order functions. In IEEE PAMI, pp. 1645-1656. [8] Ladicky, L., Sturgess, P., Russell C., Sengupta, S., Bastnlar, Y., Clocksin, W.F., & Torr P.H.S. (2012) Joint optimization for object class segmentation and dense stereo reconstruction. In IJCV, pp. 739-746. [9] Ladicky, L., Russell C., Kohli P. & Torr P.H.S., (2009) Associative hierarchical CRFs for object class image segmentation. In IEEE ICCV, pp. 739-746. Kyoto, Japan. [10] Sloan, P.P., Kautz, J., & Snyder, J., (2002) Precomputed radiance transfer for real-time rendering in dynamic, low-frequency lighting environments. In SIGGRAPH, pp. 527-536. [11] Vineet, V., Warrell J., & Torr P.H.S., (2012) Filter-based mean-field inference for random fields with higher-order terms and product label-spaces . In IEEE ECCV, pp. 31-44. Florence, Italy. [12] Kr¨ahenb¨uhl P. & Koltun V., (2011) Efficient inference in fully connected CRFs with Gaussian edge potentials. In IEEE NIPS, pp. 109-117. Granada, Spain. [13] Barrow, H.G. & Tenenbaum, J.M. (1978) Recovering intrinsic scene characteristics from images. In A. Hanson and E. Riseman, editors, Computer Vision Systems, pp. 3-26. Academic Press, 1978. [14] Weijer, J.V.d., Schmid, C. & Verbeek, J. (2007) Using high-level visual information for color constancy. In IEEE, ICCV, pp. 1-8. [15] Liu, C., Sharan, L., Adelson, E.H., & Rosenholtz, R. (2010) Exploring features in a bayesian framework for material recognition. In IEEE, CVPR, pp. 239-246. [16] Horn, B.K.P. (1970) Shape from shading: a method for obtaining the shape of a smooth opaque object from one view. Technical Report, MIT. [17] Land, E.H., & McCann, J.J. (1971) Lightness and retinex theory. In JOSA. [18] Osadchy, M., Jacobs, D.W. & Ramamoorthi, R. (2003) Using specularities for recognition . In IEEE ICCV. [19] Adelson, E.H. (2000) Lightness perception and lightness illusions. The New Cognitive Neuroscience, 2nd Ed. MIT Press, pp. 339-351. [20] Adelson, E.H. (2001) On seeing stuff: the perception of materials by humans and machines. SPIE, vol. 4299, pp. 1-12. [21] Felzenswalb, P.F., & Huttenlocker, D.P. (2004) Efficient graph-based image segmentation. In IJCV. [22] Shotton, J., Winn, J., Rother, C., & Criminisi, A. (2003) TextonBoost for Image Understanding: MultiClass Object Recognition and Segmentation by Jointly Modeling Texture, Layout, and Context. In IEEE IJCV. [23] Tighe, J. & Lazebnik, S. (2011) Understanding scenes on many levels. In IEEE ICCV pp. 335-342. [24] LeCun, Y., Huang, F.J., & Bottou, L. (2004) Learning methods for generic object recognition with invariance to pose and lighting. In IEEE CVPR pp. 97-104. [25] Silberman, N., Hoim, D., Kohli, P., & Fergus, R. (2012) Indoor segmentation and support inference from RGBD images. In IEEE ECCV pp. 746-760. [26] Everingham, M., Gool, L.J.V., Williams, C.K.I., Winn, J.M. & Zisserman, A. (2010) The pascal visual object classes (VOC) challenge. In IEEE IJCV pp. 303-338. [27] Cheng, M. M., Zheng, S., Lin, W.Y., Warrell, J., Vineet, V., Sturgess, P., Mitra, N., Crook, N., & Torr, P.H.S. (2013) ImageSpirit: Verbal Guided Image Parsing. Oxford Brookes Technical Report. [28] Domj, Q. T., Necoara, I., & Diehl, M. (2013) Fast Inexact Decomposition Algorithms for Large-Scale Separable Convex Optimization. In JOTA. [29] Kohli, P., Ladicky, L., & Torr, P.H.S. (2008) on. In IEEE CVPR, 2008. 9
2013
201
4,934
Online Robust PCA via Stochastic Optimization Jiashi Feng ECE Department National University of Singapore jiashi@nus.edu.sg Huan Xu ME Department National University of Singapore mpexuh@nus.edu.sg Shuicheng Yan ECE Department National University of Singapore eleyans@nus.edu.sg Abstract Robust PCA methods are typically based on batch optimization and have to load all the samples into memory during optimization. This prevents them from efficiently processing big data. In this paper, we develop an Online Robust PCA (OR-PCA) that processes one sample per time instance and hence its memory cost is independent of the number of samples, significantly enhancing the computation and storage efficiency. The proposed OR-PCA is based on stochastic optimization of an equivalent reformulation of the batch RPCA. Indeed, we show that OR-PCA provides a sequence of subspace estimations converging to the optimum of its batch counterpart and hence is provably robust to sparse corruption. Moreover, OR-PCA can naturally be applied for tracking dynamic subspace. Comprehensive simulations on subspace recovering and tracking demonstrate the robustness and efficiency advantages of the OR-PCA over online PCA and batch RPCA methods. 1 Introduction Principal Component Analysis (PCA) [19] is arguably the most widely used method for dimensionality reduction in data analysis. However, standard PCA is brittle in the presence of outliers and corruptions [11]. Thus many techniques have been developed towards robustifying it [12, 4, 24, 25, 7]. One prominent example is the Principal Component Pursuit (PCP) method proposed in [4] that robustly finds the low-dimensional subspace through decomposing the sample matrix into a low-rank component and an overall sparse component. It is proved that both components can be recovered exactly through minimizing a weighted combination of the nuclear norm of the first term and ℓ1 norm of the second one. Thus the subspace estimation is robust to sparse corruptions. However, PCP and other robust PCA methods are all implemented in a batch manner. They need to access every sample in each iteration of the optimization. Thus, robust PCA methods require memorizing all samples, in sharp contrast to standard PCA where only the covariance matrix is needed. This pitfall severely limits their scalability to big data, which are becoming ubiquitous now. Moreover, for an incremental samples set, when a new sample is added, the optimization procedure has to be re-implemented on all available samples. This is quite inefficient in dealing with incremental sample sets such as network detection, video analysis and abnormal events tracking. Another pitfall of batch robust PCA methods is that they cannot handle the case where the underlying subspaces are changing gradually. For example, in the video background modeling, the background is assumed to be static across different frames for applying robust PCA [4]. Such assumption is too restrictive in practice. A more realistic situation is that the background is changed gradually along 1 with the camera moving, corresponding to a gradually changing subspace. Unfortunately, traditional batch RPCA methods may fail in this case. In order to efficiently and robustly estimate the subspace of a large-scale or dynamic samples set, we propose an Online Robust PCA (OR-PCA) method. OR-PCA processes only one sample per time instance and thus is able to efficiently handle big data and dynamic sample sets, saving the memory cost and dynamically estimating the subspace of evolutional samples. We briefly explain our intuition here. The major difficulty of implementing the previous RPCA methods, such as PCP, in an online fashion is that the adopted nuclear norm tightly couples the samples and thus the samples have to be processed simultaneously. To tackle this, OR-PCA pursues the low-rank component in a different manner: using an equivalent form of the nuclear norm, OR-PCA explicitly decomposes the sample matrix into the multiplication of the subspace basis and coefficients plus a sparse noise component. Through such decomposition, the samples are decoupled in the optimization and can be processed separately. In particular, the optimization consists of two iterative updating components. The first one is to project the sample onto the current basis and isolate the sparse noise (explaining the outlier contamination), and the second one is to update the basis given the new sample. Our main technical contribution is to show the above mentioned iterative optimization sheme converges to the global optimal solution of the original PCP formulation, thus we establish the validity of our online method. Our proof is inspired by recent results from [16], who proposed an online dictionary learning method and provided the convergence guarantee of the proposed online dictionary learning method. However, [16] can only guarantee that the solution converges to a stationary point of the optimization problem. Besides the nice behavior on single subspace recovering, OR-PCA can also be applied for tracking time-variant subspace naturally, since it updates the subspace estimation timely after revealing one new sample. We conduct comprehensive simulations to demonstrate the advantages of OR-PCA for both subspace recovering and tracking in this work. 2 Related Work The robust PCA algorithms based on nuclear norm minimization to recover low-rank matrices are now standard, since the seminal works [21, 6]. Recent works [4, 5] have taken the nuclear norm minimization approach to the decomposition of a low-rank matrix and an overall sparse matrix. Different from the setting of samples being corrupted by sparse noise, [25, 24] and [7] solve robust PCA in the case that a few samples are completely corrupted. However, all of these RPCA methods are implemented in batch manner and cannot be directly adapted to the online setup. There are only a few pieces of work on online robust PCA [13, 20, 10], which we discuss below. In [13], an incremental and robust subspace learning method is proposed. The method proposes to integrate the M-estimation into the standard incremental PCA calculation. Specifically, each newly coming data point is re-weighted by a pre-defined influence function [11] of its residual to the current estimated subspace. However, no performance guarantee is provided in this work. In [20], a compressive sensing based recursive robust PCA algorithm is proposed. The proposed method essentially solves compressive sensing optimization over a small batch of data to update the principal components estimation instead of using a single sample, and it is not clear how to extend the method to the latter case. Recently, He et al. propose an incremental gradient descent method on Grassmannian manifold for solving the robust PCA problem, named GRASTA [10]. In each iteration, GRASTA uses the gradient of the updated augmented Lagrangian function after revealing a new sample to perform the gradient descent. However, no theoretic guarantee of the algorithmic convergence for GRASTA is provided in this work. Moreover, in the experiments in this work, we show that our proposed method is more robust than GRASTA to the sparse corruption and achieves higher breakdown point. The most closely related work to ours in technique is [16], which proposes an online learning method for dictionary learning and sparse coding. Based on that work, [9] proposes an online nonnegative matrix factorization method. Both works can be seen as solving online matrix factorization problems with specific constraints (sparse or non-negative). Though OR-PCA can also be seen as a kind of matrix factorization, it is essentially different from those two works. In OR-PCA, an additive sparse noise matrix is considered along with the matrix factorization. Thus the optimization and analysis 2 are different from the ones in those works. In addition, benefitting from explicitly considering the noise, OR-PCA is robust to sparse contamination, which is absent in either the dictionary learning or nonnegative matrix factorization works. Most importantly, in sharp contrast to [16, 9] which shows their methods converge to a stationary point, our method is solving essentially a re-formulation of a convex optimization, and hence we can prove that the method converges to the global optimum. After this paper was accepted, we found similar works which apply the same main idea of combining the online learning framework in [16] with the factorization formulation of nuclear norm was published in [17, 18, 23] before. However, in this work, we use different optimization from them. More specifically, our proposed algorithm needs not determine the step size or solve a Lasso subproblem. 3 Problem Formulation 3.1 Notation We use bold letters to denote vectors. In particular, x ∈Rp denotes an authentic sample without corruption, e ∈Rp is for the noise, and z ∈Rp is for the corrupted observation z = x + e. Here p denotes the ambient dimension of the observed samples. Let r denote the intrinsic dimension of the subspace underlying {xi}n i=1. Let n denote the number of observed samples, t denote the index of the sample/time instance. We use capital letters to denote matrices, e.g., Z ∈Rp×n is the matrix of observed samples. Each column zi of Z corresponds to one sample. For an arbitrary real matrix E, Let ∥E∥F denote its Frobenius norm, ∥E∥ℓ1 = P i,j |Eij| denote the ℓ1-norm of E seen as a long vector in Rp×n, and ∥E∥∗= P i σi(E) denote its nuclear norm, i.e., the sum of its singular values. 3.2 Objective Function Formulation Robust PCA (RPCA) aims to accurately estimate the subspace underlying the observed samples, even though the samples are corrupted by gross but sparse noise. As one of the most popular RPCA methods, the Principal Component Pursuit (PCP) method [4] proposes to solve RPCA by decomposing the observed sample matrix Z into a low-rank component X accounting for the low-dimensional subspace plus an overall sparse component E incorporating the sparse corruption. Under mild conditions, PCP guarantees that the two components X and E can be exactly recovered through solving: min X,E 1 2∥Z −X −E∥2 F + λ1∥X∥∗+ λ2∥E∥1. (1) To solve the problem in (1), iterative optimization methods such as Accelerated Proximal Gradient (APG) [15] or Augmented Lagrangian Multiplier (ALM) [14] methods are often used. However, these optimization methods are implemented in a batch manner. In each iteration of the optimization, they need to access all samples to perform SVD. Hence a huge storage cost is incurred when solving RPCA for big data (e.g., web data, large image set). In this paper, we consider online implementation of PCP. The main difficulty is that the nuclear norm couples all the samples tightly and thus the samples cannot be considered separately as in typical online optimization problems. To overcome this difficulty, we use an equivalent form of the nuclear norm for the matrix X whose rank is upper bounded by r, as follows [21], ∥X∥∗= inf L∈Rp×r,R∈Rn×r 1 2∥L∥2 F + 1 2∥R∥2 F : X = LRT  . Namely, the nuclear norm is re-formulated as an explicit low-rank factorization of X. Such nuclear norm factorization is developed in [3] and well established in recent works [22, 21]. In this decomposition, L ∈Rp×r can be seen as the basis of the low-dimensional subspace and R ∈Rn×r denotes the coefficients of the samples w.r.t. the basis. Thus, the RPCA problem (1) can be re-formulated as min X,L∈Rp×r,R∈Rn×r,E 1 2∥Z −X −E∥2 F + λ1 2 (∥L∥2 F + ∥R∥2 F ) + λ2∥E∥1, s.t. X = LRT . Substituting X by LRT and removing the constraint, the above problem is equivalent to: min L∈Rp×r,R∈Rn×r,E 1 2∥Z −LRT −E∥2 F + λ1 2 (∥L∥2 F + ∥R∥2 F ) + λ2∥E∥1. (2) 3 Though the reformulated objective function is not jointly convex w.r.t. the variables L and R, we prove below that the local minima of (2) are global optimal solutions to original problem in (1). The details are given in the next section. Given a finite set of samples Z = [z1, . . . , zn] ∈Rp×n, solving problem (2) indeed minimizes the following empirical cost function, fn(L) ≜1 n n X i=1 ℓ(zi, L) + λ1 2n∥L∥2 F , (3) where the loss function for each sample is defined as ℓ(zi, L) ≜min r,e 1 2∥zi −Lr −e∥2 2 + λ1 2 ∥r∥2 2 + λ2∥e∥1. (4) The loss function measures the representation error for the sample z on a fixed basis L, where the coefficients on the basis r and the sparse noise e associated with each sample are optimized to minimize the loss. In the stochastic optimization, one is usually interested in the minimization of the expected cost overall all the samples [16], f(L) ≜Ez[ℓ(z, L)] = lim n→∞fn(L), (5) where the expectation is taken w.r.t. the distribution of the samples z. In this work, we first establish a surrogate function for this expected cost and then optimize the surrogate function for obtaining the subspace estimation in an online fashion. 4 Stochastic Optimization Algorithm for OR-PCA We now present our Online Robust PCA (OR-PCA) algorithm. The main idea is to develop a stochastic optimization algorithm to minimize the empirical cost function (3), which processes one sample per time instance in an online manner. The coefficients r, noise e and basis L are optimized in an alternative manner. In the t-th time instance, we obtain the estimation of the basis Lt through minimizing the cumulative loss w.r.t. the previously estimated coefficients {ri}t i=1 and sparse noise {ei}t i=1. The objective function for updating the basis Lt is defined as, gt(L) ≜1 t t X i=1 1 2∥zi −Lri −ei∥2 2 + λ1 2 ∥ri∥2 2 + λ2∥ei∥1  + λ1 2t ∥L∥2 F . (6) This is a surrogate function of the empirical cost function ft(L) defined in (3), i.e., it provides an upper bound for ft(L): gt(L) ≥ft(L). The proposed algorithm is summarized in Algorithm 1. Here, the subproblem in (7) involves solving a small-size convex optimization problem, which can be solved efficiently by the off-the-shelf solver (see the supplementary material). To update the basis matrix L, we adopt the block-coordinate descent with warm restarts [2]. In particular, each column of the basis L is updated individually while fixing the other columns. The following theorem is the main theoretic result of the paper, which states that the solution from Algorithm 1 will converge to the optimal solution of the batch optimization. Thus, the proposed OR-PCA converges to the correct low-dimensional subspace even in the presence of sparse noise, as long as the batch version – PCP – works. Theorem 1. Assume the observations are always bounded. Given the rank of the optimal solution to (5) is provided as r, and the solution Lt ∈Rp×r provided by Algorithm 1 is full rank, then Lt converges to the optimal solution of (5) asymptotically. Note that the assumption that observations are bounded is quite natural for the realistic data (such as images, videos). We find in the experiments that the final solution Lt is always full rank. A standard stochastic gradient descent method may further enhance the computational efficiency, compared with the used method here. We leave the investigation for future research. 4 Algorithm 1 Stochastic Optimization for OR-PCA Input: {z1, . . . , zT } (observed data which are revealed sequentially), λ1, λ2 ∈R (regularization parameters), L0 ∈Rp×r, r0 ∈Rr, e0 ∈Rp (initial solutions), T (number of iterations). for t = 1 to T do 1) Reveal the sample zt. 2) Project the new sample: {rt, et} = arg min 1 2∥zt −Lt−1r −e∥2 2 + λ1 2 ∥r∥2 2 + λ2∥e∥1. (7) 3) At ←At−1 + rtrT t , Bt ←Bt−1 + (zt −et)rT t . 4) Compute Lt with Lt−1 as warm restart using Algorithm 2: Lt ≜arg min 1 2Tr  LT (At + λ1I) L  −Tr(LT Bt). (8) end for Return XT = LT RT T (low-rank data matrix), ET (sparse noise matrix). Algorithm 2 The Basis Update Input: L = [l1, . . . , lr] ∈Rp×r, A = [a1, . . . , ar] ∈Rr×r, and B = [b1, . . . , br] ∈Rp×r. ˜A ←A + λ1I. for j = 1 to r do lj ← 1 ˜Aj,j (bj −L˜aj) + lj. (9) end for Return L. 5 Proof Sketch In this section we sketch the proof of Theorem 1. The details are deferred to the supplementary material due to space limit. The proof of Theorem 1 proceeds in the following four steps: (I) we first prove that the surrogate function gt(Lt) converges almost surely; (II) we then prove that the solution difference behaves as ∥Lt −Lt−1∥F = O(1/t); (III) based on (II) we show that f(Lt) −gt(Lt) →0 almost surely, and the gradient of f vanishes at the solution Lt when t →∞; (IV) finally we prove that Lt actually converges to the optimum solution of the problem (5). Theorem 2 (Convergence of the surrogate function gt). Let gt denote the surrogate function defined in (6). Then, gt(Lt) converges almost surely when the solution Lt is given by Algorithm 1. We prove Theorem 2, i.e., the convergence of the stochastic positive process gt(Lt) > 0, by showing that it is a quasi-martingale. We first show that the summation of the positive difference of gt(Lt) is bounded utilizing the fact that gt(Lt) upper bounds the empirical cost ft(Lt) and the loss function ℓ(zt, Lt) is Lipschitz. These imply that gt(Lt) is a quasi-martingale. Applying the lemma from [8] about the convergence of quasi-martingale, we conclude that gt(Lt) converges. Next, we show the difference of the two successive solutions converges to 0 as t goes to infinity. Theorem 3 (Difference of the solution Lt). For the two successive solutions obtained from Algorithm 1, we have ∥Lt+1 −Lt∥F = O(1/t) a.s. To prove the above result, we first show that the function gt(L) is strictly convex. This holds since the regularization component λ1∥L∥2 F naturally guarantees that the eigenvalues of the Hessian matrix are bounded away from zero. Notice that this is essentially different from [16], where one has to assume that the smallest eigenvalue of the Hessian matrix is lower bounded. Then we further show 5 that variation of the function gt(L), gt(Lt)−gt+1(Lt), is Lipschitz if using the updating rule shown in Algorithm 2. Combining these two properties establishes Theorem 3. In the third step, we show that the expected cost function f(Lt) is a smooth one, and the difference f(Lt)−gt(Lt) goes to zero when t →∞. In order for showing the regularity of the function f(Lt), we first provide the following optimality condition of the loss function ℓ(Lt). Lemma 1 (Optimality conditions of Problem (4)). r⋆∈Rr and e⋆∈Rp is a solution of Problem (4) if and only if CΛ(zΛ −e⋆ Λ) = λ2sign(e⋆ Λ), |CΛc(zΛc −e⋆ Λc)| ≤λ2, otherwise, r⋆= (LT L + λ1I)−1LT (z −e⋆), where C = I −L(LT L + λ1I)−1LT and CΛ denotes the columns of matrix C indexed by Λ = {j|e⋆[j] ̸= 0} and Λc denotes the complementary set of Λ. Moreover, the optimal solution is unique. Based on the above lemma, we can prove that the solution r⋆and e⋆are Lipschitz w.r.t. the basis L. Then, we can obtain the following results about the regularity of the expected cost function f. Lemma 2. Assume the observations z are always bounded. Define {r⋆, e⋆} = arg min r,e 1 2∥z −Lr −e∥2 2 + λ1 2 ∥r∥2 2 + λ2∥e∥1. Then, 1) the function ℓdefined in (4) is continuously differentiable and ∇Lℓ(z, L) = (Lr⋆+ e⋆−z)r⋆T ; 2) ∇f(L) = Ez[∇Lℓ(z, L)]; and 3)∇f(L) is Lipschitz. Equipped with the above regularities of the expected cost function f, we can prove the convergence of f, as stated in the following theorem. Theorem 4 (Convergence of f). Let gt denote the surrogate function defined in (2). Then, 1) f(Lt) −gt(Lt) converges almost surely to 0; and 2) f(Lt) converges almost surely, when the solution Lt is given by Algorithm 1. Following the techniques developed in [16], we can show the solution obtained from Algorithm 1, L∞, satisfies the first order optimality condition for minimizing the expected cost f(L). Thus the OR-PCA algorithm provides a solution converging to a stationary point of the expected loss. Theorem 5. The first order optimal condition for minimizing the objective function in (5) is satisfied by Lt, the solution provided by Algorithm 1, when t tends to infinity. Finally, to complete the proof, we establish the following result stating that any full-rank L that satisfies the first order condition is the global optimal solution. Theorem 6. When the solution L satisfies the first order condition for minimizing the objective function in (5) , the obtained solution L is the optimal solution of the problem (5) if L is full rank. Combining Theorem 5 and Theorem 6 directly yields Theorem 1 – the solution from Algorithm 1 converges to the optimal solution of Problem (5) asymptotically. 6 Empirical Evaluation We report some numerical results in this section. Due to space constraints, more results, including those of subspace tracking, are deferred in the supplementary material. 6.1 Medium-scale Robust PCA We here evaluate the ability of the proposed OR-PCA of correctly recovering the subspace of corrupted observations, under various settings of the intrinsic subspace dimension and error density. In particular, we adopt the batch robust PCA method, Principal Component Pursuit [4], as the batch 6 Batch RPCA rank/n ρs 0.1 0.2 0.3 0.4 0.5 0.5 0.4 0.3 0.2 0.1 (a) Batch RPCA Online RPCA rank/n ρs 0.1 0.2 0.3 0.4 0.5 0.5 0.4 0.3 0.2 0.1 (b) OR-PCA 0 200 400 600 800 1000 0 0.2 0.4 0.6 0.8 1 Number of Samples E.V. OR−PCA Grasta online PCA batch RPCA (c) ρs = 0.1 200 400 600 800 1000 0 0.2 0.4 0.6 0.8 1 Number of Samples E.V. OR−PCA Grasta online PCA batch RPCA (d) ρs = 0.3 Figure 1: (a) and (b): subspace recovery performance under different corruption fraction ρs (vertical axis) and rank/n (horizontal axis). Brighter color means better performance; (c) and (d): the performance comparison of the OR-PCA, Grasta, and online PCA methods against the number of revealed samples under two different corruption levels ρs with PCP as reference. counterpart of the proposed OR-PCA method for reference. PCP estimates the subspace in a batch manner through solving the problem in (1) and outputs the low-rank data matrix. For fair comparison, we follow the data generation scheme of PCP as in [4]: we generate a set of n clean data points as a product of X = UV T , where the sizes of U and V are p × r and n × r respectively. The elements of both U and V are i.i.d. sampled from the N(0, 1/n) distribution. Here U is the basis of the subspace and the intrinsic dimension of the subspace spanned by U is r. The observations are generated through Z = X + E, where E is a sparse matrix with a fraction of ρs non-zero elements. The elements in E are from a uniform distribution over the interval of [−1000, 1000]. Namely, the matrix E contains gross but sparse errors. We run the OR-PCA and the PCP algorithms 10 times under the following settings: the ambient dimension and number of samples are set as p = 400 and n = 1, 000; the intrinsic rank r of the subspace varies from 4 to 200; the value of error fraction, ρs, varies from very sparse 0.01 to relatively dense 0.5. The trade-off parameters of OR-PCA are fixed as λ1 = λ2 = 1/√p. The performance is evaluated by the similarity between the subspace obtained from the algorithms and the groundtruth. In particular, the similarity is measured by the Expressed Variance (E.V.) (see definition in [24]). A larger value of E.V. means better subspace recovery. We plot the averaged E.V. values of PCP and OR-PCA under different settings in a matrix form, as shown in Figure 1(a) and Figure 1(b) respectively. The results demonstrate that under relatively low intrinsic dimension (small rank/n) and sparse corruption (small ρs), OR-PCA is able to recover the subspace nearly perfectly (E.V.= 1). We also observe that the performance of OR-PCA is close to that of the PCP. This demonstrates that the proposed OR-PCA method achieves comparable performance with the batch method and verifies our convergence guarantee on the OR-PCA. In the relatively difficult setting (high intrinsic dimension and dense error, shown in the top-right of the matrix), OR-PCA performs slightly worse than the PCP, possibly because the number of streaming samples is not enough to achieve convergence. To better demonstrate the robustness of OR-PCA to corruptions and illustrate how the performance of OR-PCA is improved when more samples are revealed, we plot the performance curve of ORPCA against the number of samples in Figure 1(c), under the setting of p = 400, n = 1, 000, ρs = 0.1, r = 80, and the results are averaged from 10 repetitions. We also apply GRASTA [10] to solve this RPCA problem in an online fashion as a baseline. The parameters of GRASTA are set as the values provided in the implementation package provided by the authors. We observe that when more samples are revealed, both OR-PCA and GRASTA steadily improve the subspace recovery. However, our proposed OR-PCA converges much faster than GRASTA, possibly because in each iteration OR-PCA obtains the optimal closed-form solution to the basis updating subproblem while GRASTA only takes one gradient descent step. Observe from the figure that after 200 samples are revealed, the performance of OR-PCA is already satisfactory (E.V.> 0.8). However, for GRASTA, it needs about 400 samples to achieve the same performance. To show the robustness of the proposed OR-PCA, we also plot the performance of the standard online (or incremental) PCA [1] for comparison. This work focuses on developing online robust PCA. The non-robustness of (online) PCA is independent of used optimization method. Thus, we only compare with the basic online PCA method [1], which is enough for comparing robustness. The comparison results are given in Figure 1(c). We observe that as expected, the online PCA cannot recover the subspace correctly (E.V.≈0.1), since standard PCA is fragile to gross corruptions. We then increase the corruption 7 level to ρs = 0.3, and plot the performance curve of the above methods in Figure 1(d). From the plot, it can be observed that the performance of GRASTA decreases severely (E.V.≈0.3) while OR-PCA still achieves E.V. ≈0.8. The performance of PCP is around 0.88. This result clearly demonstrates the robustness advantage of OR-PCA over GRASTA. In fact, from other simulation results under different settings of intrinsic rank and corruption level (see supplementary material), we observe that the GRASTA breaks down at 25% corruption (the value of E.V. is zero). However, OR-PCA achieves a performance of E.V.≈0.5, even in presence of 50% outlier corruption. 6.2 Large-scale Robust PCA We now investigate the computational efficiency of OR-PCA and the performance for large scale data. The samples are generated following the same model as explained in the above subsection. The results are provided in Table 1. All of the experiments are implemented in a PC with 2.83GHz Quad CPU and 8GB RAM. Note that batch RPCA cannot process these data due to out of memory. Table 1: The comparison of OR-PCA and GRASTA under different settings of sample size (n) and ambient dimensions (p). Here ρs = 0.3, r = 0.1p. The corresponding computational time (in ×103 seconds) is shown in the top row and the E.V. values are shown in the bottom row correspondingly. The results are based on the average of 5 repetitions and the variance is shown in the parentheses. p 1 × 103 1 × 104 n 1 × 106 1 × 108 1 × 1010 1 × 106 1 × 108 OR-PCA 0.013(0.0004) 1.312(0.082) 139.233(7.747) 0.633(0.047) 15.910(2.646) 0.99(0.01) 0.99(0.00) 0.99(0.00) 0.82(0.09) 0.82(0.01) GRASTA 0.023(0.0008) 2.137(0.016) 240.271(7.564) 2.514(0.011) 252.630(2.096) 0.54(0.08) 0.55(0.02) 0.57(0.03) 0.45(0.02) 0.46(0.03) From the above results, we observe that OR-PCA is much more efficient and performs better than GRASTA. In fact, the computational time of OR-PCA is linear in the sample size and nearly linear in the ambient dimension. When the ambient dimension is large (p = 1×104), OR-PCA is more efficient than GRASTA with an order magnitude efficiency enhancement. We then compare OR-PCA with batch PCP. In each iteration, batch PCP needs to perform an SVD plus a thresholding operation, whose complexity is O(np2). In contrast, for OR-PCA, in each iteration, the computational cost is O(pr2), which is independent of the sample size and linear in the ambient dimension. To see this, note that in step 2) of Algorithm 1, the computation complexity is O(r2 + pr + r3). Here O(r3) is for computing LT L. The complexity of step 3) is O(r2 + pr). For step 4) (i.e., Algorithm 2), the cost is O(pr2) (updating each column of L requires O(pr) and there are r columns in total). Thus the total complexity is O(r2 + pr + r3 + pr2). Since p ≫r, the overall complexity is O(pr2). The memory cost is significantly reduced too. The memory required for OR-PCA is O(pr), which is independent of the sample size. This is much smaller than the memory cost of the batch PCP algorithm (O(pn)), where n ≫p for large scale dataset. This is quite important for processing big data. The proposed OR-PCA algorithm can be easily parallelized to further enhance its efficiency. 7 Conclusions In this work, we develop an online robust PCA (OR-PCA) method. Different from previous batch based methods, the OR-PCA need not “remember” all the past samples and achieves much higher storage efficiency. The main idea of OR-PCA is to reformulate the objective function of PCP (a widely applied batch RPCA algorithm) by decomposing the nuclear norm to an explicit product of two low-rank matrices, which can be solved by a stochastic optimization algorithm. We provide the convergence analysis of the OR-PCA method and show that OR-PCA converges to the solution of batch RPCA asymptotically. Comprehensive simulations demonstrate the effectiveness of OR-PCA. Acknowledgments J. Feng and S. Yan are supported by the Singapore National Research Foundation under its International Research Centre @Singapore Funding Initiative and administered by the IDM Programme Office. H. Xu is partially supported by the Ministry of Education of Singapore through AcRF Tier Two grant R-265-000-443-112 and NUS startup grant R-265-000-384-133. 8 References [1] M. Artac, M. Jogan, and A. Leonardis. Incremental pca for on-line visual learning and recognition. In Pattern Recognition, 2002. Proceedings. 16th International Conference on, volume 3, pages 781–784. IEEE, 2002. [2] D.P. Bertsekas. Nonlinear programming. Athena Scientific, 1999. [3] Samuel Burer and Renato Monteiro. A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Math. Progam., 2003. [4] E.J. Candes, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? ArXiv:0912.3599, 2009. [5] V. Chandrasekaran, S. Sanghavi, P.A. Parrilo, and A.S. Willsky. Rank-sparsity incoherence for matrix decomposition. SIAM Journal on Optimization, 21(2):572–596, 2011. [6] M. Fazel. Matrix rank minimization with applications. PhD thesis, PhD thesis, Stanford University, 2002. [7] J. Feng, H. Xu, and S. Yan. Robust PCA in high-dimension: A deterministic approach. In ICML, 2012. [8] D.L. Fisk. Quasi-martingales. Transactions of the American Mathematical Society, 1965. [9] N. Guan, D. Tao, Z. Luo, and B. Yuan. Online nonnegative matrix factorization with robust stochastic approximation. Neural Networks and Learning Systems, IEEE Transactions on, 23(7):1087–1099, 2012. [10] Jun He, Laura Balzano, and John Lui. Online robust subspace tracking from partial information. arXiv preprint arXiv:1109.3827, 2011. [11] P.J. Huber, E. Ronchetti, and MyiLibrary. Robust statistics. John Wiley & Sons, New York, 1981. [12] M. Hubert, P.J. Rousseeuw, and K.V. Branden. Robpca: a new approach to robust principal component analysis. Technometrics, 2005. [13] Y. Li. On incremental and robust subspace learning. Pattern recognition, 2004. [14] Z. Lin, M. Chen, and Y. Ma. The augmented lagrange multiplier method for exact recovery of corrupted low-rank matrices. arXiv preprint arXiv:1009.5055, 2010. [15] Z. Lin, A. Ganesh, J. Wright, L. Wu, M. Chen, and Y. Ma. Fast convex optimization algorithms for exact recovery of a corrupted low-rank matrix. Computational Advances in Multi-Sensor Adaptive Processing (CAMSAP), 2009. [16] J. Mairal, F. Bach, J. Ponce, and G. Sapiro. Online learning for matrix factorization and sparse coding. JMLR, 2010. [17] Morteza Mardani, Gonzalo Mateos, and G Giannakis. Dynamic anomalography: Tracking network anomalies via sparsity and low rank. 2012. [18] Morteza Mardani, Gonzalo Mateos, and Georgios B Giannakis. Rank minimization for subspace tracking from incomplete data. In ICASSP, 2013. [19] K. Pearson. On lines and planes of closest fit to systems of points in space. Philosophical Magazine, 1901. [20] C. Qiu, N. Vaswani, and L. Hogben. Recursive robust pca or recursive sparse recovery in large but structured noise. arXiv preprint arXiv:1211.3754, 2012. [21] B. Recht, M. Fazel, and P.A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [22] Jasson Rennie and Nathan Srebro. Fast maximum margin matrix factorization for collaborative prediction. In ICML, 2005. [23] Pablo Sprechmann, Alex M Bronstein, and Guillermo Sapiro. Learning efficient sparse and low rank models. arXiv preprint arXiv:1212.3631, 2012. [24] H. Xu, C. Caramanis, and S. Mannor. Principal component analysis with contaminated data: The high dimensional case. In COLT, 2010. [25] H. Xu, C. Caramanis, and S. Sanghavi. Robust pca via outlier pursuit. Information Theory, IEEE Transactions on, 58(5):3047–3064, 2012. 9
2013
202
4,935
Compete to Compute Rupesh Kumar Srivastava, Jonathan Masci, Sohrob Kazerounian, Faustino Gomez, Jürgen Schmidhuber IDSIA, USI-SUPSI Manno–Lugano, Switzerland {rupesh, jonathan, sohrob, tino, juergen}@idsia.ch Abstract Local competition among neighboring neurons is common in biological neural networks (NNs). In this paper, we apply the concept to gradient-based, backprop-trained artificial multilayer NNs. NNs with competing linear units tend to outperform those with non-competing nonlinear units, and avoid catastrophic forgetting when training sets change over time. 1 Introduction Although it is often useful for machine learning methods to consider how nature has arrived at a particular solution, it is perhaps more instructive to first understand the functional role of such biological constraints. Indeed, artificial neural networks, which now represent the state-of-the-art in many pattern recognition tasks, not only resemble the brain in a superficial sense, but also draw on many of its computational and functional properties. One of the long-studied properties of biological neural circuits which has yet to fully impact the machine learning community is the nature of local competition. That is, a common finding across brain regions is that neurons exhibit on-center, off-surround organization [1, 2, 3], and this organization has been argued to give rise to a number of interesting properties across networks of neurons, such as winner-take-all dynamics, automatic gain control, and noise suppression [4]. In this paper, we propose a biologically inspired mechanism for artificial neural networks that is based on local competition, and ultimately relies on local winner-take-all (LWTA) behavior. We demonstrate the benefit of LWTA across a number of different networks and pattern recognition tasks by showing that LWTA not only enables performance comparable to the state-of-the-art, but moreover, helps to prevent catastrophic forgetting [5, 6] common to artificial neural networks when they are first trained on a particular task, then abruptly trained on a new task. This property is desirable in continual learning wherein learning regimes are not clearly delineated [7]. Our experiments also show evidence that a type of modularity emerges in LWTA networks trained in a supervised setting, such that different modules (subnetworks) respond to different inputs. This is beneficial when learning from multimodal data distributions as compared to learning a monolithic model. In the following, we first discuss some of the relevant neuroscience background motivating local competition, then show how we incorporate it into artificial neural networks, and how LWTA, as implemented here, compares to alternative methods. We then show how LWTA networks perform on a variety of tasks, and how it helps buffer against catastrophic forgetting. 2 Neuroscience Background Competitive interactions between neurons and neural circuits have long played an important role in biological models of brain processes. This is largely due to early studies showing that 1 many cortical [3] and sub-cortical (e.g., hippocampal [1] and cerebellar [2]) regions of the brain exhibit a recurrent on-center, off-surround anatomy, where cells provide excitatory feedback to nearby cells, while scattering inhibitory signals over a broader range. Biological modeling has since tried to uncover the functional properties of this sort of organization, and its role in the behavioral success of animals. The earliest models to describe the emergence of winner-take-all (WTA) behavior from local competition were based on Grossberg’s shunting short-term memory equations [4], which showed that a center-surround structure not only enables WTA dynamics, but also contrast enhancement, and normalization. Analysis of their dynamics showed that networks with slower-than-linear signal functions uniformize input patterns; linear signal functions preserve and normalize input patterns; and faster-than-linear signal functions enable WTA dynamics. Sigmoidal signal functions which contain slower-than-linear, linear, and faster-than-linear regions enable the supression of noise in input patterns, while contrast-enhancing, normalizing and storing the relevant portions of an input pattern (a form of soft WTA). The functional properties of competitive interactions have been further studied to show, among other things, the effects of distance-dependent kernels [8], inhibitory time lags [8, 9], development of self-organizing maps [10, 11, 12], and the role of WTA networks in attention [13]. Biological models have also been extended to show how competitive interactions in spiking neural networks give rise to (soft) WTA dynamics [14], as well as how they may be efficiently constructed in VLSI [15, 16]. Although competitive interactions, and WTA dynamics have been studied extensively in the biological literature, it is only more recently that they have been considered from computational or machine learning perspectives. For example, Maas [17, 18] showed that feedforward neural networks with WTA dynamics as the only non-linearity are as computationally powerful as networks with threshold or sigmoidal gates; and, networks employing only soft WTA competition are universal function approximators. Moreover, these results hold, even when the network weights are strictly positive—a finding which has ramifications for our understanding of biological neural circuits, as well as the development of neural networks for pattern recognition. The large body of evidence supporting the advantages of locally competitive interactions makes it noteworthy that this simple mechanism has not provoked more study by the machine learning community. Nonetheless, networks employing local competition have existed since the late 80s [21], and, along with [22], serve as a primary inspiration for the present work. More recently, maxout networks [19] have leveraged locally competitive interactions in combination with a technique known as dropout [20] to obtain the best results on certain benchmark problems. 3 Networks with local winner-take-all blocks This section describes the general network architecture with locally competing neurons. The network consists of B blocks which are organized into layers (Figure 1). Each block, bi, i = 1..B, contains n computational units (neurons), and produces an output vector yi, determined by the local interactions between the individual neuron activations in the block: yj i = g(h1 i , h2 i ..., hn i ), (1) where g(·) is the competition/interaction function, encoding the effect of local interactions in each block, and hj i, j = 1..n, is the activation of the j-th neuron in block i computed by: hi = f(wT ijx), (2) where x is the input vector from neurons in the previous layer, wij is the weight vector of neuron j in block i, and f(·) is a (generally non-linear) activation function. The output activations y are passed as inputs to the next layer. In this paper we use the winner-take-all interaction function, inspired by studies in computational neuroscience. In particular, we use the hard winner-take-all function: yj i = hj i if hj i ≥hk i , ∀k = 1..n 0 otherwise. In the case of multiple winners, ties are broken by index precedence. In order to investigate the capabilities of the hard winner-take-all interaction function in isolation, f(x) = x 2 Figure 1: A Local Winner-Take-All (LWTA) network with blocks of size two showing the winning neuron in each block (shaded) for a given input example. Activations flow forward only through the winning neurons, errors are backpropagated through the active neurons. Greyed out connections do not propagate activations. The active neurons form a subnetwork of the full network which changes depending on the inputs. (identity) is used for the activation function in equation (2). The difference between this Local Winner Take All (LWTA) network and a standard multilayer perceptron is that no non-linear activation functions are used, and during the forward propagation of inputs, local competition between the neurons in each block turns offthe activation of all neurons except the one with the highest activation. During training the error signal is only backpropagated through the winning neurons. In a LWTA layer, there are as many neurons as there are blocks active at any one time for a given input pattern1. We denote a layer with blocks of size n as LWTA-n. For each input pattern presented to a network, only a subgraph of the full network is active, e.g. the highlighted neurons and synapses in figure 1. Training on a dataset consists of simultaneously training an exponential number of models that share parameters, as well as learning which model should be active for each pattern. Unlike networks with sigmoidal units, where all of the free parameters need to be set properly for all input patterns, only a subset is used for any given input, so that patterns coming from very different sub-distributions can potentially be modelled more efficiently through specialization. This modular property is similar to that of networks with rectified linear units (ReLU) which have recently been shown to be very good at several learning tasks (links with ReLU are discussed in section 4.3). 4 Comparison with related methods 4.1 Max-pooling Neural networks with max-pooling layers [23] have been found to be very useful, especially for image classification tasks where they have achieved state-of-the-art performance [24, 25]. These layers are usually used in convolutional neural networks to subsample the representation obtained after convolving the input with a learned filter, by dividing the representation into pools and selecting the maximum in each one. Max-pooling lowers the computational burden by reducing the number of connections in subsequent convolutional layers, and adds translational/rotational invariance. 1However, there is always the possibility that the winning neuron in a block has an activation of exactly zero, so that the block has no output. 3 after before 0.5 0.8 0.8 (a) max-pooling after before 0.8 0.8 0 0.5 (b) LWTA Figure 2: Max-pooling vs. LWTA. (a) In max-pooling, each group of neurons in a layer has a single set of output weights that transmits the winning unit’s activation (0.8 in this case) to the next layer, i.e. the layer activations are subsampled. (b) In an LWTA block, there is no subsampling. The activations flow into subsequent units via a different set of connections depending on the winning unit. At first glance, the max-pooling seems very similar to a WTA operation, however, the two differ substantially: there is no downsampling in a WTA operation and thus the number of features is not reduced, instead the representation is "sparsified" (see figure 2). 4.2 Dropout Dropout [20] can be interpreted as a model-averaging technique that jointly trains several models sharing subsets of parameters and input dimensions, or as data augmentation when applied to the input layer [19, 20]. This is achieved by probabilistically omitting (“dropping”) units from a network for each example during training, so that those neurons do not participate in forward/backward propagation. Consider, hypothetically, training an LWTA network with blocks of size two, and selecting the winner in each block at random. This is similar to training a neural network with a dropout probability of 0.5. Nonetheless, the two are fundamentally different. Dropout is a regularization technique while in LWTA the interaction between neurons in a block replaces the per-neuron non-linear activation. Dropout is believed to improve generalization performance since it forces the units to learn independent features, without relying on other units being active. During testing, when propagating an input through the network, all units in a layer trained with dropout are used with their output weights suitably scaled. In an LWTA network, no output scaling is required. A fraction of the units will be inactive for each input pattern depending on their total inputs. Viewed this way, WTA is restrictive in that only a fraction of the parameters are utilized for each input pattern. However, we hypothesize that the freedom to use different subsets of parameters for different inputs allows the architecture to learn from multimodal data distributions more accurately. 4.3 Rectified Linear units Rectified Linear Units (ReLU) are simply linear neurons that clamp negative activations to zero (f(x) = x if x > 0, f(x) = 0 otherwise). ReLU networks were shown to be useful for Restricted Boltzmann Machines [26], outperformed sigmoidal activation functions in deep neural networks [27], and have been used to obtain the best results on several benchmark problems across multiple domains [24, 28]. Consider an LWTA block with two neurons compared to two ReLU neurons, where x1 and x2 are the weighted sum of the inputs to each neuron. Table 1 shows the outputs y1 and y2 in all combinations of positive and negative x1 and x2, for ReLU and LWTA neurons. For both ReLU and LWTA neurons, x1 and x2 are passed through as output in half of the possible cases. The difference is that in LWTA both neurons are never active or inactive at the same time, and the activations and errors flow through exactly one neuron in the block. For ReLU neurons, being inactive (saturation) is a potential drawback since neurons that 4 Table 1: Comparison of rectified linear activation and LWTA-2. ReLU neurons LWTA neurons x1 x2 y1 y2 y1 y2 x1 > x2 Positive Positive x1 x2 x1 0 Positive Negative x1 0 x1 0 Negative Negative 0 0 x1 0 x2 > x1 Positive Positive x1 x2 0 x2 Negative Positive 0 x2 0 x2 Negative Negative 0 0 0 x2 do not get activated will not get trained, leading to wasted capacity. However, previous work suggests that there is no negative impact on optimization, leading to the hypothesis that such hard saturation helps in credit assignment, and, as long as errors flow through certain paths, optimization is not affected adversely [27]. Continued research along these lines validates this hypothesis [29], but it is expected that it is possible to train ReLU networks better. While many of the above arguments for and against ReLU networks apply to LWTA networks, there is a notable difference. During training of an LWTA network, inactive neurons can become active due to training of the other neurons in the same block. This suggests that LWTA nets may be less sensitive to weight initialization, and a greater portion of the network’s capacity may be utilized. 5 Experiments In the following experiments, LWTA networks were tested on various supervised learning datasets, demonstrating their ability to learn useful internal representations without utilizing any other non-linearities. In order to clearly assess the utility of local competition, no special strategies such as augmenting data with transformations, noise or dropout were used. We also did not encourage sparse representations in the hidden layers by adding activation penalties to the objective function, a common technique also for ReLU units. Thus, our objective is to evaluate the value of using LWTA rather than achieving the absolute best testing scores. Blocks of size two are used in all the experiments.2 All networks were trained using stochastic gradient descent with mini-batches, learning rate lt and momentum mt at epoch t given by αt = α0λt if αt > αmin αmin otherwise mt =  t T mi + (1 −t T )mf if t < T pf if t ≥T where λ is the learning rate annealing factor, αmin is the lower learning rate limit, and momentum is scaled from mi to mf over T epochs after which it remains constant at mf. L2 weight decay was used for the convolutional network (section 5.2), and max-norm normalization for other experiments. This setup is similar to that of [20]. 5.1 Permutation Invariant MNIST The MNIST handwritten digit recognition task consists of 70,000 28x28 images (60,000 training, 10,000 test) of the 10 digits centered by their center of mass [33]. In the permutation invariant setting of this task, we attempted to classify the digits without utilizing the 2D structure of the images, e.g. every digit is a vector of pixels. The last 10,000 examples in the training set were used for hyperparameter tuning. The model with the best hyperparameter setting was trained until convergence on the full training set. Mini-batches of size 20 were 2To speed up our experiments, the Gnumpy [30] and CUDAMat [31] libraries were used. 5 Table 2: Test set errors on the permutation invariant MNIST dataset for methods without data augmentation or unsupervised pre-training Activation Test Error Sigmoid [32] 1.60% ReLU [27] 1.43% ReLU + dropout in hidden layers [20] 1.30% LWTA-2 1.28% Table 3: Test set errors on MNIST dataset for convolutional architectures with no data augmentation. Results marked with an asterisk use layer-wise unsupervised feature learning to pre-train the network and global fine tuning. Architecture Test Error 2-layer CNN + 2 layer MLP [34] * 0.60% 2-layer ReLU CNN + 2 layer LWTA-2 0.57% 3-layer ReLU CNN [35] 0.55% 2-layer CNN + 2 layer MLP [36] * 0.53% 3-layer ReLU CNN + stochastic pooling [33] 0.47% 3-layer maxout + dropout [19] 0.45% used, the pixel values were rescaled to [0, 1] (no further preprocessing). The best model obtained, which gave a test set error of 1.28%, consisted of three LWTA layers of 500 blocks followed by a 10-way softmax layer. To our knowledge, this is the best reported error, without utilizing implicit/explicit model averaging, for this setting which does not use deformations/noise to enhance the dataset or unsupervised pretraining. Table 2 compares our results with other methods which do not use unsupervised pre-training. The performance of LWTA is comparable to that of a ReLU network with dropout in the hidden layers. Using dropout in input layers as well, lower error rates of 1.1% using ReLU [20] and 0.94% using maxout [19] have been obtained. 5.2 Convolutional Network on MNIST For this experiment, a convolutional network (CNN) was used consisting of 7 × 7 filters in the first layer followed by a second layer of 6 × 6, with 16 and 32 maps respectively, and ReLU activation. Every convolutional layer is followed by a 2 × 2 max-pooling operation. We then use two LWTA-2 layers each with 64 blocks and finally a 10-way softmax output layer. A weight decay of 0.05 was found to be beneficial to improve generalization. The results are summarized in Table 3 along with other state-of-the-art approaches which do not use data augmentation (for details of convolutional architectures, see [33]). 5.3 Amazon Sentiment Analysis LWTA networks were tested on the Amazon sentiment analysis dataset [37] since ReLU units have been shown to perform well in this domain [27, 38]. We used the balanced subset of the dataset consisting of reviews of four categories of products: Books, DVDs, Electronics and Kitchen appliances. The task is to classify the reviews as positive or negative. The dataset consists of 1000 positive and 1000 negative reviews in each category. The text of each review was converted into a binary feature vector encoding the presence or absence of unigrams and bigrams. Following [27], the 5000 most frequent vocabulary entries were retained as features for classification. We then divided the data into 10 equal balanced folds, and tested our network with cross-validation, reporting the mean test error over all folds. ReLU activation was used on this dataset in the context of unsupervised learning with denoising autoencoders to obtain sparse feature representations which were used for classification. We trained an LWTA-2 network with three layers of 500 blocks each in a supervised setting to directly classify each review as positive or negative using a 2-way softmax output layer. We obtained mean accuracies of Books: 80%, DVDs: 81.05%, Electronics: 84.45% and Kitchen: 85.8%, giving a mean accuracy of 82.82%, compared to 78.95% reported in [27] for denoising autoencoders using ReLU and unsupervised pre-training to find a good initialization. 6 Table 4: LWTA networks outperform sigmoid and ReLU activation in remembering dataset P1 after training on dataset P2. Testing error on P1 LWTA Sigmoid ReLU After training on P1 1.55 ± 0.20% 1.38 ± 0.06% 1.30 ± 0.13% After training on P2 6.12 ± 3.39% 57.84 ± 1.13% 16.63 ± 6.07% 6 Implicit long term memory This section examines the effect of the LWTA architecture on catastrophic forgetting. That is, does the fact that the network implements multiple models allow it to retain information about dataset A, even after being trained on a different dataset B? To test for this implicit long term memory, the MNIST training and test sets were each divided into two parts, P1 containing only digits {0, 1, 2, 3, 4}, and P2 consisting of the remaining digits {5, 6, 7, 8, 9}. Three different network architectures were compared: (1) three LWTA layers each with 500 blocks of size 2, (2) three layers each with 1000 sigmoidal neurons, and (3) three layers each of 1000 ReLU neurons. All networks have a 5-way softmax output layer representing the probability of an example belonging to each of the five classes. All networks were initialized with the same parameters, and trained with a fixed learning rate and momentum. Each network was first trained to reach a 0.03 log-likelihood error on the P1 training set. This value was chosen heuristically to produce low test set errors in reasonable time for all three network types. The weights for the output layer (corresponding to the softmax classifier) were then stored, and the network was trained further, starting with new initial random output layer weights, to reach the same log-likelihood value on P2. Finally, the output layer weights saved from P1 were restored, and the network was evaluated on the P1 test set. The experiment was repeated for 10 different initializations. Table 4 shows that the LWTA network remembers what was learned from P1 much better than sigmoid and ReLU networks, though it is notable that the sigmoid network performs much worse than both LWTA and ReLU. While the test error values depend on the learning rate and momentum used, LWTA networks tended to remember better than the ReLU network by about a factor of two in most cases, and sigmoid networks always performed much worse. Although standard network architectures are known to suffer from catastrophic forgetting, we not only show here, for the first time, that ReLU networks are actually quite good in this regard, and moreover, that they are outperformed by LWTA. We expect this behavior to manifest itself in competitive models in general, and to become more pronounced with increasingly complex datasets. The neurons encoding specific features in one dataset are not affected much during training on another dataset, whereas neurons encoding common features can be reused. Thus, LWTA may be a step forward towards models that do not forget easily. 7 Analysis of subnetworks A network with a single LWTA-m of N blocks consists of mN subnetworks which can be selected and trained for individual examples while training over a dataset. After training, we expect the subnetworks consisting of active neurons for examples from the same class to have more neurons in common compared to subnetworks being activated for different classes. In the case of relatively simple datasets like MNIST, it is possible to examine the number of common neurons between mean subnetworks which are used for each class. To do this, which neurons were active in the layer for each example in a subset of 10,000 examples were recorded. For each class, the subnetwork consisting of neurons active for at least 90% of the examples was designated the representative mean subnetwork, which was then compared to all other class subnetworks by counting the number of neurons in common. Figure 3a shows the fraction of neurons in common between the mean subnetworks of each pair of digits. Digits that are morphologically similar such as “3” and “8” have subnetworks with more neurons in common than the subnetworks for digits “1” and “2” or “1” and “5” which are intuitively less similar. To verify that this subnetwork specialization is a result of training, we looked at the fraction of common neurons between all pairs of digits for the 7 Digits Digits 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0.2 0.3 0.4 (a) MNIST digit pairs Fraction of neurons in common 30 50 trained untrained 0.5 0.6 0.1 0.2 0.3 0.4 0 10 20 0.7 40 (b) Figure 3: (a) Each entry in the matrix denotes the fraction of neurons that a pair of MNIST digits has in common, on average, in the subnetworks that are most active for each of the two digit classes. (b) The fraction of neurons in common in the subnetworks of each of the 55 possible digit pairs, before and after training. same 10000 examples both before and after training (Figure 3b). Clearly, the subnetworks were much more similar prior to training, and the full network has learned to partition its parameters to reflect the structure of the data. 8 Conclusion and future research directions Our LWTA networks automatically self-modularize into multiple parameter-sharing subnetworks responding to different input representations. Without significant degradation of state-of-the-art results on digit recognition and sentiment analysis, LWTA networks also avoid catastrophic forgetting, thus retaining useful representations of one set of inputs even after being trained to classify another. This has implications for continual learning agents that should not forget representations of parts of their environment when being exposed to other parts. We hope to explore many promising applications of these ideas in the future. Acknowledgments This research was funded by EU projects WAY (FP7-ICT-288551), NeuralDynamics (FP7ICT-270247), and NASCENCE (FP7-ICT-317662); additional funding from ArcelorMittal. References [1] Per Anderson, Gary N. Gross, Terje Lømo, and Ola Sveen. Participation of inhibitory and excitatory interneurones in the control of hippocampal cortical output. In Mary A.B. Brazier, editor, The Interneuron, volume 11. University of California Press, Los Angeles, 1969. [2] John Carew Eccles, Masao Ito, and János Szentágothai. The cerebellum as a neuronal machine. Springer-Verlag New York, 1967. [3] Costas Stefanis. Interneuronal mechanisms in the cortex. In Mary A.B. Brazier, editor, The Interneuron, volume 11. University of California Press, Los Angeles, 1969. [4] Stephen Grossberg. Contour enhancement, short-term memory, and constancies in reverberating neural networks. Studies in Applied Mathematics, 52:213–257, 1973. [5] Michael McCloskey and Neal J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. The Psychology of Learning and Motivation, 24:109–164, 1989. [6] Gail A. Carpenter and Stephen Grossberg. The art of adaptive pattern recognition by a self-organising neural network. Computer, 21(3):77–88, 1988. [7] Mark B. Ring. Continual Learning in Reinforcement Environments. PhD thesis, Department of Computer Sciences, The University of Texas at Austin, Austin, Texas 78712, August 1994. [8] Samuel A. Ellias and Stephen Grossberg. Pattern formation, contrast control, and oscillations in the short term memory of shunting on-center off-surround networks. Bio. Cybernetics, 1975. [9] Brad Ermentrout. Complex dynamics in winner-take-all neural nets with slow inhibition. Neural Networks, 5(1):415–431, 1992. 8 [10] Christoph von der Malsburg. Self-organization of orientation sensitive cells in the striate cortex. Kybernetik, 14(2):85–100, December 1973. [11] Teuvo Kohonen. Self-organized formation of topologically correct feature maps. Biological cybernetics, 43(1):59–69, 1982. [12] Risto Mikkulainen, James A. Bednar, Yoonsuck Choe, and Joseph Sirosh. Computational maps in the visual cortex. Springer Science+ Business Media, 2005. [13] Dale K. Lee, Laurent Itti, Christof Koch, and Jochen Braun. Attention activates winner-takeall competition among visual filters. Nature Neuroscience, 2(4):375–81, April 1999. [14] Matthias Oster and Shih-Chii Liu. Spiking inputs to a winner-take-all network. In Proceedings of NIPS, volume 18. MIT; 1998, 2006. [15] John P. Lazzaro, Sylvie Ryckebusch, Misha Anne Mahowald, and Caver A. Mead. Winnertake-all networks of O(n) complexity. Technical report, 1988. [16] Giacomo Indiveri. Modeling selective attention using a neuromorphic analog VLSI device. Neural Computation, 12(12):2857–2880, 2000. [17] Wolfgang Maass. Neural computation with winner-take-all as the only nonlinear operation. In Proceedings of NIPS, volume 12, 1999. [18] Wolfgang Maass. On the computational power of winner-take-all. Neural Computation, 12:2519–2535, 2000. [19] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. In Proceedings of the ICML, 2013. [20] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors, 2012. arXiv:1207.0580. [21] Juergen Schmidhuber. A local learning algorithm for dynamic feedforward and recurrent networks. Connection Science, 1(4):403–412, 1989. [22] Rupesh K. Srivastava, Bas R. Steunebrink, and Juergen Schmidhuber. First experiments with powerplay. Neural Networks, 2013. [23] Maximillian Riesenhuber and Tomaso Poggio. Hierarchical models of object recognition in cortex. Nature Neuroscience, 2(11), 1999. [24] Alex Krizhevsky, Ilya Sutskever, and Goeffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Proceedings of NIPS, pages 1–9, 2012. [25] Dan Ciresan, Ueli Meier, and Jürgen Schmidhuber. Multi-column deep neural networks for image classification. Proceeedings of the CVPR, 2012. [26] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the ICML, number 3, 2010. [27] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier networks. In AISTATS, volume 15, pages 315–323, 2011. [28] George E. Dahl, Tara N. Sainath, and Geoffrey E. Hinton. Improving Deep Neural Networks for LVCSR using Rectified Linear Units and Dropout. In Proceedings of ICASSP, 2013. [29] Andrew L. Maas, Awni Y. Hannun, and Andrew Y. Ng. Rectifier nonlinearities improve neural network acoustic models. In Proceedings of the ICML, 2013. [30] Tijmen Tieleman. Gnumpy: an easy way to use GPU boards in Python. Department of Computer Science, University of Toronto, 2010. [31] Volodymyr Mnih. CUDAMat: a CUDA-based matrix class for Python. Department of Computer Science, University of Toronto, Tech. Rep. UTML TR, 4, 2009. [32] Patrice Y. Simard, Dave Steinkraus, and John C. Platt. Best practices for convolutional neural networks applied to visual document analysis. In International Conference on Document Analysis and Recognition (ICDAR), 2003. [33] Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [34] Marc’Aurelio Ranzato, Christopher Poultney, Sumit Chopra, and Yann LeCun. Efficient learning of sparse representations with an energy-based model. In Proceedings of NIPS, 2007. [35] Matthew D. Zeiler and Rob Fergus. Stochastic pooling for regularization of deep convolutional neural networks. In Proceedings of the ICLR, 2013. [36] Kevin Jarrett, Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. What is the best multi-stage architecture for object recognition? In Proc. of the ICCV, pages 2146–2153, 2009. [37] John Blitzer, Mark Dredze, and Fernando Pereira. Biographies, bollywood, boom-boxes and blenders: Domain adaptation for sentiment classification. Annual Meeting-ACL, 2007. [38] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In Proceedings of the ICML, number 1, 2011. 9
2013
203
4,936
Heterogeneous-Neighborhood-based Multi-Task Local Learning Algorithms Yu Zhang Department of Computer Science, Hong Kong Baptist University yuzhang@comp.hkbu.edu.hk Abstract All the existing multi-task local learning methods are defined on homogeneous neighborhood which consists of all data points from only one task. In this paper, different from existing methods, we propose local learning methods for multitask classification and regression problems based on heterogeneous neighborhood which is defined on data points from all tasks. Specifically, we extend the knearest-neighbor classifier by formulating the decision function for each data point as a weighted voting among the neighbors from all tasks where the weights are task-specific. By defining a regularizer to enforce the task-specific weight matrix to approach a symmetric one, a regularized objective function is proposed and an efficient coordinate descent method is developed to solve it. For regression problems, we extend the kernel regression to multi-task setting in a similar way to the classification case. Experiments on some toy data and real-world datasets demonstrate the effectiveness of our proposed methods. 1 Introduction For single-task learning, besides global learning methods there are local learning methods [7], e.g., k-nearest-neighbor (KNN) classifier and kernel regression. Different from the global learning methods, the local learning methods make use of locality structure in different regions of the feature space and are complementary to the global learning algorithms. In many applications, the single-task local learning methods have shown comparable performance with the global counterparts. Moreover, besides classification and regression problems, the local learning methods are also applied to some other learning problems, e.g., clustering [18] and dimensionality reduction [19]. When the number of labeled data is not very large, the performance of the local learning methods is limited due to sparse local density [14]. In this case, we can leverage the useful information from other related tasks to help improve the performance which matches the philosophy of multi-task learning [8, 4, 16]. Multi-task learning utilizes supervised information from some related tasks to improve the performance of one task at hand and during the past decades many advanced methods have been proposed for multi-task learning, e.g., [17, 3, 9, 1, 2, 6, 12, 20, 14, 13]. Among those methods, [17, 14] are two representative multi-task local learning methods. Even though both methods in [17, 14] use KNN as the base learner for each task, Thrun and O’Sullivan [17] focus on learning cluster structure among different tasks while Parameswaran and Weinberger [14] learn different distance metrics for different tasks. The KNN classifiers use in both two methods are defined on the homogeneous neighborhood which is the set of nearest data points from the same task the query point belongs to. In some situation, it is better to use a heterogeneous neighborhood which is defined as the set of nearest data points from all tasks. For example, suppose we have two similar tasks marked with two colors as shown in Figure 1. For a test data point marked with ‘?’ from one task, we obtain an estimation with low confidence or even a wrong one based on the homogeneous neighborhood. However, if we can use the data points from both two tasks to define the neighborhood (i.e., heterogeneous neighborhood), we can obtain a more confident estimation. 1 Figure 1: Data points with one color (i.e., black or red) are from the same task and those with one type of marker (i.e., ‘+’ or ‘-’) are from the same class. A test data point is represented by ‘?’. In this paper, we propose novel local learning models for multi-task learning based on the heterogeneous neighborhood. For multi-task classification problems, we extend the KNN classifier by formulating the decision function on each data point as weighted voting of its neighbors from all tasks where the weights are task-specific. Since multi-task learning usually considers that the contribution of one task to another one equals that in the reverse direction, we define a regularizer to enforce the task-specific weight matrix to approach a symmetric matrix and then based on this regularizer, a regularized objective function is proposed. We develop an efficient coordinate descent method to solve it. Moreover, we also propose a local method for multi-task regression problems. Specifically, we extend the kernel regression method to multi-task setting in a similar way to the classification case. Experiments on some toy data and real-world datasets demonstrate the effectiveness of our proposed methods. 2 A Multi-Task Local Classifier based on Heterogeneous Neighborhood In this section, we propose a local classifier for multi-task learning by generalizing the KNN algorithm, which is one of the most widely used local classifiers for single-task learning. Suppose we are given m learning tasks {Ti}m i=1. The training set consists of n triples (xi, yi, ti) with the ith data point as xi ∈RD, its label yi ∈{−1, 1} and its task indicator ti ∈{1, . . . , m}. So each task is a binary classification problem with ni = |{j|tj = i}| data points belonging to the ith task Ti. For the ith data point xi, we use Nk(i) to denote the set of the indices of its k nearest neighbors. If Nk(i) is a homogeneous neighborhood which only contains data points from the task that xi belongs to, we can use d(xi) = sgn P j∈Nk(i) s(i, j)yj  to make a decision for xi where sgn(·) denotes the sign function and s(i, j) denotes a similarity function between xi and xj. Here, by defining Nk(i) as a heterogeneous neighborhood which contains data points from all tasks, we cannot directly utilize this decision function and instead we introduce a weighted decision function by using task-specific weights as d(xi) = sgn  X j∈Nk(i) wti,tjs(i, j)yj   where wqr represents the contribution of the rth task Tr to the qth one Tq when Tr has some data points to be neighbors of a data point from Tq. Of course, the contribution from one task to itself should be positive and also the largest, i.e., wii ≥0 and −wii ≤wij ≤wii for j ̸= i. When wqr(q ̸= r) approaches wqq, it means Tr is very similar to Tq in local regions. At another extreme where wqr(q ̸= r) approaches −wqq, if we flip the labels of data points in Tr, Tr can have a positive contribution −wqr to Tq which indicates that Tr is negatively correlated to Tq. Moreover, when wqr/wqq(q ̸= r) is close to 0 which implies there is no contribution from Tr to Tq, Tr is likely to be unrelated to Tq. So the utilization of {wqr} can model three task relationships: positive task correlation, negative task correlation and task unrelatedness as in [6, 20]. We use f(xi) to define the estimation function as f(xi) = P j∈Nk(i) wti,tjs(i, j)yj. Then similar to support vector machine (SVM), we use hinge loss l(y, y′) = max(0, 1 −yy′) to measure empirical performance on the training data. Moreover, recall that wqr represents the contribution of Tr to Tq and wrq is the contribution of Tq to Tr. Since multi-task learning usually considers that the contribution of Tr to Tq almost equals that of Tq to Tr, we expect wqr to be close to wrq. To encode this priori information into our model, we can either formulate it as wqr = wrq, a hard constraint, or a soft regularizer, i.e., minimizing (wqr −wrq)2 to enforce wqr ≈wrq, which is more preferred. Combining all the above considerations, we can construct a objective function for our proposed method MT-KNN as min W n X i=1 l(yi, f(xi)) + λ1 4 ∥W −WT ∥2 F + λ2 2 ∥W∥2 F s.t. wqq ≥0, wqq ≥wqr ≥−wqq (q ̸= r) (1) 2 where W is a m×m matrix with wqr as its (q, r)th element and ∥·∥F denotes Frobenius norm of a matrix. The first term in the objective function of problem (1) measures the training loss, the second one enforces W to be a symmetric matrix which implies wqr ≈wrq, and the last one penalizes the complexity of W. The regularization parameters λ1 and λ2 balance the trade-off between these three terms. 2.1 Optimization Procedure In this section, we discuss how to solve problem (1). We first rewrite f(xi) as f(xi) = Pm j=1 wtij P l∈N j k(i) s(i, l)yl  = wtiˆxi where N j k(i) denotes the set of the indices of xi’s nearest neighbors from the jth task in Nk(i), wti = (wti1, . . . , wtim) is the tith row of W, and ˆxi is a m × 1 vector with the jth element as P l∈N j k(i) s(i, l)yl. Then we can reformulate problem (1) as min W m X i=1 X j∈Ti l(yj, wiˆxj) + λ1 4 ∥W −WT ∥2 F + λ2 2 ∥W∥2 F s.t. wqq ≥0, wqq ≥wqr ≥−wqq(q ̸= r). (2) To solve problem (2), we use a coordinate descent method, which is also named as an alternating optimization method in some literatures. By adopting the hinge loss in problem (2), the optimization problem for wik (k ̸= i) is formulated as min wik λ 2 w2 ik −βikwik + X j∈Ti max(0, aj ikwik + bj ik) s.t. cik ≤wik ≤eik (3) where λ = λ1 + λ2, βik = λ1wki, ˆxjk is the kth element of ˆxj, aj ik = −yj ˆxjk, bj ik = 1 − yj P t̸=k witˆxjt, cik = −wii, and eik = wii. If the objective function of problem (3) only has the first two terms, this problem will become a univariate quadratic programming (QP) problem with a linear inequality constraint, leading to an analytical solution. Moreover, similar to SVM we can introduce some slack variables for the third term in the objective function of problem (3) and then that problem will become a QP problem with ni + 1 variables and 2ni + 1 linear constraints. We can use off-the-shelf softwares to solve this problem in polynomial time. However, the whole optimization procedure may not be very efficient since we need to solve problem (3) and call QP solvers for multiple times. Here we utilize the piecewise linear structure of the last term in the objective function of problem (3) and propose a more efficient solution. We assume all aj are non-zero and otherwise we can discard them without affecting the solution since the corresponding losses are constants. We define six index sets as C1 = {j|aj ik > 0, −bj ik aj ik < cik}, C2 = {j|aj ik > 0, cik ≤−bj ik aj ik ≤eik}, C3 = {j|aj ik > 0, −bj ik aj ik > eik} C4 = {j|aj ik < 0, −bj ik aj ik < cik}, C5 = {j|aj ik < 0, cik ≤−bj ik aj ik ≤eik}, C6 = {j|aj ik < 0, −bj ik aj ik > eik}. It is easy to show that when j ∈C1∪C6 where the operator ∪denotes the union of sets, aj ikw+bj ik > 0 holds for w ∈[cik, eik], corresponding to the set of data points with non-zero loss. Oppositely when j ∈C3 ∪C4, the values of the corresponding losses become zero since aj ikw + bj ik ≤0 holds for w ∈[cik, eik]. The variation lies in the data points with indices j ∈C2 ∪C5. We sort sequence {−bj ik/aj ik|j ∈C2} and record it in a vector u of length du with u1 ≤. . . ≤udu. Moreover, we also keep a index mapping qu with its rth element qu r defined as qu r = j if ur = −bj ik/aj ik. Similarly, for sequence {−bj ik/aj ik|j ∈C5}, we define a sorted vector v of length dv and the corresponding index mapping qv. By using the merge-sort algorithm, we merge u and v into a sorted vector s and then we add cik and eik into s as the minimum and maximum elements if they are not contained in s. Obviously, in range [sl, sl+1] where sl is the lth element of s and ds is the length of s, problem (3) becomes a univariate QP problem which has an analytical solution. So we can compute local minimums in successive regions [sl, sl+1] (l = 1, . . . , ds −1) and get the global minimum over region [cik, eik] by comparing all local optima. The key operation is to compute the coefficients of quadratic function over each region [sl, sl+1] and we devise an algorithm in Table 1 which only needs to scan s once, leading to an efficient solution for problem (3). 3 Table 1: Algorithm for problem (3) 01: Construct four sets C1, C2, C3, C4, C5 and C6; 02: Construct u, qu, v, qv and s; 03: Insert cik and eik into s if needed; 04: c0 := P j∈C1∪C2∪C6 bj ik; 05: c1 := P j∈C1∪C2∪C6 aj ik −βik; 06: w := sds; 07: o := c0 + c1w + λw2/2; for l = ds −1 to 1 if sl+1 = ur for some r 08: c0 := c0 −b qu r ik ; c1 := c1 −a qu r ik ; end if if sl+1 = vr for some r 09: c0 := c0 + b qv r ik ; c1 := c1 + a qv r ik ; end if 10: w0 := min(sl+1, max(sl, −c1 λ )); 11: o0 := c0 + c1w0 + λw2 0/2; if o0 < o 12: w := w0; o := o0; end if 13: l := l −1; end for The first step of the algorithm in Table 1 needs O(ni) time complexity to construct the six sets C1 to C6. In step 2, we need to sort two sequences to obtain u and v in O(du ln du + dv ln dv) time and merge two sequences to get s in O(du + dv). Then it costs O(ni) to calculate coefficients c0 and c1 by scanning C1, C2 and C6 in step 4 and 5. Then from step 6 to step 13, we need to scan vector s once which costs O(du + dv) time. The overall complexity of the algorithm in Table 1 is O(du ln du + dv ln dv + ni) which is at most O(ni ln ni) due to du + dv ≤ni. For wii, the optimization problem is formulated as min wii λ2 2 w2 ii + X j∈Ti max(0, aj iwii + bj i) s.t. wii ≥ci, (4) where aj i = −yj ˆxji, bj i = 1 −yj P t̸=i witˆxjt, ci = max(0, maxj̸=i(|wij|)), and |·| denotes the absolute value of a scalar. The main difference between problem (3) and (4) is that there exist a box constraint for wik in problem (3) but in problem (4) wii is only lower-bounded. We define ei as ei = maxj{−bj i aj i } for all aj i ̸= 0. For wii ∈[ei, +∞), the objective function of problem (4) can be reformulated as λ2 2 w2 ii + P j∈S(aj iwii + bj i) where S = {j|aj i > 0} and the minimum value in [ei, +∞) will take at w(1) ii = max{ei, − P j∈S aj i λ2 }. Then we can use the algorithm in Table 1 to find the minimizor w(2) ii in the interval [ci, ei] for problem (4). Finally we can choose the optimal solution to problem (4) from {w(1) ii , w(2) ii } by comparing the corresponding values of the objective function. Since the complexity to solve both problem (3) and (4) is O(ni ln ni), the complexity of one update for the whole matrix W is O(m Pm i=1 ni ln ni). Usually the coordinate descent algorithm converges very fast in a small number of iterations and hence the whole algorithm to solve problem (2) or (1) is very efficient. We can use other loss functions for problem (2) instead of hinge loss, e.g., square loss l(s, t) = (s −t)2 as in the least square SVM [10]. It is easy to show that problem (3) has an analytical solution as wik = min  max  cik, βik−2 P j∈Ti aj ikbj ik λ+2 P j∈Ti (aj ik)2  , eik  and the solution to problem (4) can be computed as wii = max  ci, −2 P j∈Ti aj i bj i λ2+2 P j∈Ti (aj i )2  . Then the computational complexity of the whole algorithm to solve problem (2) by adopting square loss is O(mn). 3 A Multi-Task Local Regressor based on Heterogeneous Neighborhood In this section, we consider the situation that each task is a regression problem with each label yi ∈R. Similar to the classification case in the previous section, one candidate for multi-task local regressor is a generalization of kernel regression, a counterpart of KNN classifier for regression problems, and the estimation function can be formulated as f(xi) = P j∈Nk(i) wti,tjs(i, j)yj P j∈Nk(i) wti,tjs(i, j) (5) where wqr also represents the contribution of Tr to Tq. Since the denominator of f(xi) is a linear combination of elements in each row of W with data-dependent combination coefficients, if we utilize a similar formulation to problem (1) with square loss, we need to solve a complex and nonconvex fractional programming problem. For computational consideration, we resort to another way to construct the multi-task local regressor. 4 Recall that the estimation function for the classification case is formulated as f(xi) = Pm j=1 wtij P l∈N j k(i) s(i, l)yl  . We can see that the expression in the brackets on the right-hand side can be viewed as a prediction for xi based on its neighbors in the jth task. Inspired by this observation, we can construct a prediction ˆyi j for xi based on its neighbors from the jth task by utilizing any regressor, e.g., kernel regression and support vector regression. Here due to the local nature of our proposed method, we choose the kernel regression method, which is a local regression method, as a good candidate and hence ˆyi j is formulated as ˆyi j = P l∈N j k(i) s(i,l)yl P l∈N j k(i) s(i,l) . When j equals ti which means we use neighbored data points from the task that xi belongs to, we can use this prediction in confidence. However, if j ̸= ti, we cannot totally trust the prediction and need to add some weight wti,j as a confidence. Then by using the square loss, we formulate an optimization problem to get the estimation function f(xi) based on {ˆyi j} as f(xi) = arg min y m X j=1 wti,j(y −ˆyi j)2 = Pm j=1 wti,j ˆyi j Pm j=1 wti,j . (6) Compared with the regression function of the direct extension of kernel regression to multi-task learning in Eq. (5), the denominator of our proposed regressor in Eq. (6) only includes the row summation of W, making the optimization problem easier to solve as we will see later. Since the scale of wij does not matter the value of the estimation function in Eq. (6), we constrain the row summation of W to be 1, i.e., Pm j=1 wij = 1 for i = 1, . . . , m. Moreover, the estimation ˆyi ti by using data from the same task as xi is more trustful than the estimations based on other tasks, which suggests wii should be the largest among elements in the ith row. Then this constraint implies that wii ≥ 1 m P k wik = 1 m > 0. To capture the negative task correlations, wij (i ̸= j) is only required to be a real scalar and wij ≥−wii. Combining the above consideration, we formulate an optimization problem as min W m X i=1 X j∈Ti (wiˆyj −yj)2 + λ1 4 ∥W −WT ∥2 F + λ2 2 ∥W∥2 F s.t. W1 = 1, wii ≥wij ≥−wii, (7) where 1 denotes a vector of all ones with appropriate size and ˆyj = (ˆyj 1, . . . , ˆyj m)T . In the following section, we discuss how to optimize problem (7). 3.1 Optimization Procedure Due to the linear equality constraints in problem (7), we cannot apply a coordinate descent method to update variables one by one in a similar way to problem (2). However, similar to the SMO algorithm [15] for SVM, we can update two variables in one row of W at one time to keep the linear equality constraints valid. We update each row one by one and the optimization problem with respect to wi is formulated as min wi 1 2wiAwT i + wibT s.t. m X j=1 wij = 1, −wii ≤wij ≤wii ∀j ̸= i, (8) where A = 2 P j∈Ti ˆyjˆyT j + λ1Ii m + λ2Im, Im is an m × m identity matrix, Ii m is a copy of Im by setting the (i, i)th element to be 0, b = −2 P j∈Ti yjˆyT j −λ1cT i , and ci is the ith column of W by setting its ith element to 0. We define the Lagrangian as J =1 2wiAwT i + wibT −α( m X j=1 wij −1) − X j̸=i (wii −wij)βj − X j̸=i (wii + wij)γj. The Karush-Kuhn-Tucker (KKT) optimality condition is formulated as ∂J ∂wij = wiaj + bj −α + βj −γj = 0, for j ̸= i (9) ∂J ∂wii = wiai + bi −α − X k̸=i (βk + γk) = 0 (10) βj ≥0, (wii −wij)βj = 0 ∀j ̸= i (11) γj ≥0, (wii + wij)γj = 0 ∀j ̸= i, (12) 5 where aj is the jth column of A and bj is the jth element of b. It is easy to show that βjγj = 0 for all j ̸= i. When wij satisfies wij = wii, according to Eq. (12) we have γj = 0 and further wiaj + bj = α −βj ≤α according to Eq. (9). When wij = −wii, based on Eq. (11) we can get βj = 0 and then wiaj + bj = α + γj ≥α. For wij between those two extremes (i.e., −wii < wij < wii), γj = βj = 0 according to Eqs. (11) and (12), which implies that wiaj + bj = α. Moreover, Eq. (10) implies that wiai + bi = α + P k̸=i(βk + γk) ≥α. We define sets as S1 = {j|wij = wii, j ̸= i}, S2 = {j| −wii < wij < wii}, S3 = {j|wij = −wii}, and S4 = {i}. Then a feasible wi is a stationary point of problem (8) if and only if maxj∈S1∪S2{wiaj + bj} ≤ mink∈S2∪S3∪S4{wiak + bk}. If there exist a pair of indices (j, k), where j ∈S1 ∪S2 and k ∈ S2 ∪S3 ∪S4, satisfying wiaj + bj > wiak + bk, {j, k} is called a violating pair. If the current estimation wi is not an optimal solution, there should exist some violating pairs. Our SMO algorithm updates a violating pair at one step by choosing the most violating pair {j, k} with j and k defined as j = arg maxl∈S1∪S2{wial + bl} and k = arg minl∈S2∪S3∪S4{wial + bl}. We define the update rule for wij and wik as ˜wij = wij + t and ˜wik = wik −t. By noting that j cannot be i, t should satisfy the following constraints to make the updated solution feasible: when k = i, t −wik ≤wij + t ≤wik −t, t −wik ≤wil ≤wik −t ∀l ̸= j&l ̸= k when k ̸= i, −wii ≤wij + t ≤wii, −wii ≤wik −t ≤wii. When k = i, there will be a constraint on t as t ≤e ≡min wik−wij 2 , minl̸=j&l̸=k(wik −|wil|)  and otherwise t will satisfy c ≤t ≤e where c = max(wik −wii, −wij −wii) and e = min(wii − wij, wii + wik). Then the optimization problem for t can be unified as min t ajj + aii −2aji 2 t2 + (wiaj + bj −wiai −bi)t s.t. c ≤t ≤e, where for the case that k = i, c is set to be −∞. This problem has an analytical solution as t = min  e, max  c, wiai+bi−wiaj−bj ajj+aii−2aji  . We update each row of W one by one until convergence. 4 Experiments In this section, we test the empirical performance of our proposed methods in some toy data and real-world problems. 4.1 Toy Problems We first use one UCI dataset, i.e., diabetes data, to analyze the learned W matrix. The diabetes data consist of 768 data points from two classes. We randomly select p percent of data points to form the training set of two learning tasks respectively. The regularization parameters λ1 and λ2 are fixed as 1 and the number of nearest neighbors is set to 5. When p = 20 and p = 40, the means of the estimated W over 10 trials are  0.1025 0.1011 0.0980 0.1056  and  0.1014 0.1004 0.1010 0.1010  . This result shows wij (j ̸= i) is very close to wii for i = 1, 2. This observation implies our method can find that these two tasks are positive correlated which matches our expectation since those two tasks are from the same distribution. For the second experiment, we randomly select p percent of data points to form the training set of two learning tasks respectively but differently we flip the labels of one task so that those two tasks should be negatively correlated. The matrices W’s learned for p = 20 and p = 40 are  0.1019 −0.1017 −0.1007 0.1012  and  0.1019 −0.0999 −0.0997 0.1038  . We can see that wij (j ̸= i) is very close to −wii for i = 1, 2, which is what we expect. As the third problem, we construct two learning tasks as in the first one but flip 50% percent of the class labels in each class of those two tasks. Here those two tasks can be viewed as unrelated tasks since the label assignment is random. The estimated matrices W’s for p = 20 and p = 40 are  0.1575 0.0144 0.0398 0.1281  and  0.1015 −0.0003 0.0081 0.1077  , where wij (i ̸= j) is much smaller than wii. From the structure of the estimations, we can see that those two tasks are more likely to be unrelated, matching our expectation. In summary, our method can learn the positive correlations, negative correlations and task unrelatedness for those toy problems. 6 4.2 Experiments on Classification Problems Table 2: Comparison of classification errors of different methods on the two classification problems in the form of mean±std. Letter USPS KNN 0.0775±0.0053 0.0445±0.0131 mtLMNN 0.0511±0.0053 0.0141±0.0038 MTFL 0.0505±0.0038 0.0140±0.0025 MT-KNN(hinge) 0.0466±0.0023 0.0114±0.0013 MT-KNN(square) 0.0494±0.0028 0.0124±0.0014 Two multi-task classification problems are used in our experiments. The first problem we investigate is a handwritten letter classification application consisting of seven tasks each of which is to distinguish two letters. The corresponding letters for each task to classify are: c/e, g/y, m/n, a/g, a/o, f/t and h/n. Each class in each task has about 1000 data points which have 128 features corresponding to the pixel values of handwritten letter images. The second one is the USPS digit classification problem and it consists of nine binary classification tasks each of which is to classify two digits. Each task contains about 1000 data points with 255 features for each class. Letter USPS Robot 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Dataset Running Time (in second) Our Method CVX Solver Figure 2: Comparison on average running time over 100 trials between our proposed coordinate descent methods and the CVX solver on classification and regression problems. Here the similarity function we use is a heat kernel s(i, j) = exp{−∥xi−xj∥2 2 2σ2 } where σ is set to the mean pairwise Euclidean distance among training data. We use 5-fold cross validation to determine the optimal λ1 and λ2 whose candidate values are chosen from n × {0.01, 0.1, 0.5, 1, 5, 10, 100} and the optimal number of nearest neighbors from {5, 10, 15, 20}. The classification error is used as the performance measure. We compare our method, which is denoted as MT-KNN, with the KNN classifier which is a single-task learning method, the multi-task large margin nearest neighbor (mtLMNN) method [14]1 which is a multi-task local learning method based on the homogeneous neighborhood, and the multi-task feature learning (MTFL) method [2] which is a global method for multi-task learning. By utilizing hinge and square losses, we also consider two variants of our MT-KNN method. To mimic the real-world situation where the training data are usually limited, we randomly select 20% of the whole data as training data and the rest to form the test set. The random selection is repeated for 10 times and we record the results in Table 2. From the results, we can see that our method MT-KNN is better than KNN, mtLMNN and MTFL methods, which demonstrates that the introduction of the heterogeneous neighborhood is helpful to improve the performance. For different loss functions utilized by our method, MT-KNN with hinge loss is better than that with square loss due to the robustness of the hinge loss against the square loss. For those two problems, we also compare our proposed coordinate descent method described in Table 1 with some off-the-shelf solvers such as the CVX solver [11] with respect to the running time. The platform to run the experiments is a desktop with Intel i7 CPU 2.7GHz and 8GB RAM and we use Matlab 2009b for implementation and experiments. We record the average running time over 100 trials in Figure 2 and from the results we can see that on the classification problems above, our proposed coordinate descent method is much faster than the CVX solver which demonstrates the efficiency of our proposed method. 4.3 Experiments on Regression Problems Here we study a multi-task regression problem to learn the inverse dynamics of a seven degree-offreedom SARCOS anthropomorphic robot arm.2 The objective is to predict seven joint torques based 1http://www.cse.wustl.edu/˜kilian/code/files/mtLMNN.zip 2http://www.gaussianprocess.org/gpml/data/ 7 on 21 input features, corresponding to seven joint positions, seven joint velocities and seven joint accelerations. So each task corresponds to the prediction of one torque and can be formulated as a regression problem. Each task has 2000 data points. The similarity function used here is also the heat kernel and 5-fold cross validation is used to determine the hyperparameters, i.e., λ1, λ2 and k. The performance measure used is normalized mean squared error (nMSE), which is mean squared error on the test data divided by the variance of the ground truth. We compare our method denoted by MTKR with single-task kernel regression (KR), the multi-task feature learning (MTFL) under different configurations on the size of the training set. Compared with KR and MTFL methods, our method achieves better performance over different sizes of the training sets. Moreover, for our proposed coordinate descent method introduced in section 3.1, we compare it with CVX solver and record the results in the last two columns of Figure 2. We find the running time of our proposed method is much smaller than that of the CVX solver which demonstrates that the proposed coordinate descent method can speed up the computation of our MT-KR method. 0.1 0.2 0.3 0 0.02 0.04 0.06 0.08 The size of training set nMSE KR MTFL MT−KR Figure 3: Comparison of different methods on the robot arm application when varying the size of the training set. 4.4 Sensitivity Analysis 5 10 15 20 25 30 35 40 0.01 0.02 0.03 0.04 0.05 0.06 Number of Neighbors Error Letter USPS Robot Figure 4: Sensitivity analysis of the performance of our method with respect to the number of nearest neighbors at different data sets. Here we test the sensitivity of the performance with respect to the number of nearest neighbors. By changing the number of nearest neighbors from 5 to 40 at an interval of 5, we record the mean of the performance of our method over 10 trials in Figure 4. From the results, we can see our method is not very sensitive to the number of nearest neighbors, which makes the setting of k not very difficult. 5 Conclusion In this paper, we develop local learning methods for multi-task classification and regression problems. Based on an assumption that all task pairs contributes to each other almost equally, we propose regularized objective functions and develop efficient coordinate descent methods to solve them. Up to here, each task in our studies is a binary classification problem. In some applications, there may be more than two classes in each task. So we are interested in an extension of our method to multi-task multi-class problems. Currently the task-specific weights are shared by all data points from one task. One interesting research direction is to investigate a localized variant where different data points have different task-specific weights based on their locality structure. Acknowledgment Yu Zhang is supported by HKBU ‘Start Up Grant for New Academics’. 8 References [1] R. K. Ando and T. Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. Journal of Machine Learning Research, 6:1817–1853, 2005. [2] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. In B. Sch¨olkopf, J. C. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 41–48, Vancouver, British Columbia, Canada, 2006. [3] B. Bakker and T. Heskes. Task clustering and gating for bayesian multitask learning. Journal of Machine Learning Research, 4:83–99, 2003. [4] J. Baxter. A Bayesian/information theoretic model of learning to learn via multiple task sampling. Machine Learning, 28(1):7–39, 1997. [5] J. C. Bezdek and R. J. Hathaway. Convergence of alternating optimization. Neural, Parallel & Scientific Computations, 11(4):351–368, 2003. [6] E. Bonilla, K. M. A. Chai, and C. Williams. Multi-task Gaussian process prediction. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 153–160, Vancouver, British Columbia, Canada, 2007. [7] L. Bottou and V. Vapnik. Local learning algorithms. Neural Computation, 4(6):888–900, 1992. [8] R. Caruana. Multitask learning. Machine Learning, 28(1):41–75, 1997. [9] 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, Seattle, Washington, USA, 2004. [10] T. V. Gestel, J. A. K. Suykens, B. Baesens, S. Viaene, J. Vanthienen, G. Dedene, B. De Moor, and J. Vandewalle. Benchmarking least squares support vector machine classifiers. Machine Learning, 54(1):5–32, 2004. [11] M. Grant and S. Boyd. CVX: Matlab software for disciplined convex programming, 2011. [12] L. Jacob, F. Bach, and J.-P. Vert. Clustered multi-task learning: a convex formulation. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 745–752, Vancouver, British Columbia, Canada, 2008. [13] A. Kumar and H. Daum´e III. Learning task grouping and overlap in multi-task learning. In Proceedings of the 29 th International Conference on Machine Learning, Edinburgh, Scotland, UK, 2012. [14] S. Parameswaran and K. Weinberger. Large margin multi-task metric learning. In J. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R.S. Zemel, and A. Culotta, editors, Advances in Neural Information Processing Systems 23, pages 1867–1875, 2010. [15] J. C. Platt. Fast training of support vector machines using sequential minimal optimization. In B. Sch¨olkopf, C. J. C. Burges, and A. J. Smola, editors, Advances in Kernel Methods: Support Vector Learning. MIT Press, 1998. [16] S. Thrun. Is learning the n-th thing any easier than learning the first? In D. S. Touretzky, M. Mozer, and M. E. Hasselmo, editors, Advances in Neural Information Processing Systems 8, pages 640–646, Denver, CO, 1995. [17] S. Thrun and J. O’Sullivan. Discovering structure in multiple learning tasks: The TC algorithm. In Proceedings of the Thirteenth International Conference on Machine Learning, pages 489–497, Bari, Italy, 1996. [18] M. Wu and B. Sch¨olkopf. A local learning approach for clustering. In B. Sch¨olkopf, J. C. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 1529–1536, Vancouver, British Columbia, Canada, 2006. [19] M. Wu, K. Yu, S. Yu, and B. Sch¨olkopf. Local learning projections. In Proceedings of the Twenty-Fourth International Conference on Machine Learning, pages 1039–1046, Corvallis, Oregon, USA, 2007. [20] Y. Zhang and D.-Y. Yeung. A convex formulation for learning task relationships in multi-task learning. In Proceedings of the 26th Conference on Uncertainty in Artificial Intelligence, pages 733–742, Catalina Island, California, 2010. 9
2013
204
4,937
Scalable Influence Estimation in Continuous-Time Diffusion Networks Nan Du∗ Le Song∗ Manuel Gomez-Rodriguez† Hongyuan Zha∗ Georgia Institute of Technology∗ MPI for Intelligent Systems† dunan@gatech.edu lsong@cc.gatech.edu manuelgr@tue.mpg.de zha@cc.gatech.edu Abstract If a piece of information is released from a media site, can we predict whether it may spread to one million web pages, in a month ? This influence estimation problem is very challenging since both the time-sensitive nature of the task and the requirement of scalability need to be addressed simultaneously. In this paper, we propose a randomized algorithm for influence estimation in continuous-time diffusion networks. Our algorithm can estimate the influence of every node in a network with |V| nodes and |E| edges to an accuracy of ϵ using n = O(1/ϵ2) randomizations and up to logarithmic factors O(n|E|+n|V|) computations. When used as a subroutine in a greedy influence maximization approach, our proposed algorithm is guaranteed to find a set of C nodes with the influence of at least (1 −1/e) OPT −2Cϵ, where OPT is the optimal value. Experiments on both synthetic and real-world data show that the proposed algorithm can easily scale up to networks of millions of nodes while significantly improves over previous state-of-the-arts in terms of the accuracy of the estimated influence and the quality of the selected nodes in maximizing the influence. 1 Introduction Motivated by applications in viral marketing [1], researchers have been studying the influence maximization problem: find a set of nodes whose initial adoptions of certain idea or product can trigger, in a time window, the largest expected number of follow-ups. For this purpose, it is essential to accurately and efficiently estimate the number of follow-ups of an arbitrary set of source nodes within the given time window. This is a challenging problem for that we need first accurately model the timing information in cascade data and then design a scalable algorithm to deal with large real-world networks. Most previous work in the literature tackled the influence estimation and maximization problems for infinite time window [1, 2, 3, 4, 5, 6]. However, in most cases, influence must be estimated or maximized up to a given time, i.e., a finite time window must be considered [7]. For example, a marketer would like to have her advertisement viewed by a million people in one month, rather than in one hundred years. Such time-sensitive requirement renders those algorithms which only consider static information, such as network topologies, inappropriate in this context. A sequence of recent work has argued that modeling cascade data and information diffusion using continuous-time diffusion networks can provide significantly more accurate models than discretetime models [8, 9, 10, 11, 12, 13, 14, 15]. There is a twofold rationale behind this modeling choice. First, since follow-ups occur asynchronously, continuous variables seem more appropriate to represent them. Artificially discretizing the time axis into bins introduces additional tuning parameters, like the bin size, which are not easy to choose optimally. Second, discrete time models can only describe transmission times which obey an exponential density, and hence can be too restricted to capture the rich temporal dynamics in the data. Extensive experimental comparisons on both synthetic and real world data showed that continuous-time models yield significant improvement in settings such as recovering hidden diffusion network structures from cascade data [8, 10] and predicting the timings of future events [9, 14]. 1 However, estimating and maximizing influence based on continuous-time diffusion models also entail many challenges. First, the influence estimation problem in this setting is a difficult graphical model inference problem, i.e., computing the marginal density of continuous variables in loopy graphical models. The exact answer can be computed only for very special cases. For example, Gomez-Rodriguez et al. [7] have shown that the problem can be solved exactly when the transmission functions are exponential densities, by using continuous time Markov processes theory. However, the computational complexity of such approach, in general, scales exponentially with the size and density of the network. Moreover, extending the approach to deal with arbitrary transmission functions would require additional nontrivial approximations which would increase even more the computational complexity. Second, it is unclear how to scale up influence estimation and maximization algorithms based on continuous-time diffusion models to millions of nodes. Especially in the maximization case, even a naive sampling algorithm for approximate inference is not scalable: n sampling rounds need to be carried out for each node to estimate the influence, which results in an overall O(n|V||E|) algorithm. Thus, our goal is to design a scalable algorithm which can perform influence estimation and maximization in this regime of networks with millions of nodes. In particular, we propose CONTINEST (Continous-Time Influence Estimation), a scalable randomized algorithm for influence estimation in a continuous-time diffusion network with heterogeneous edge transmission functions. The key idea of the algorithm is to view the problem from the perspective of graphical model inference, and reduces the problem to a neighborhood estimation problem in graphs. Our algorithm can estimate the influence of every node in a network with |V| nodes and |E| edges to an accuracy of ϵ using n = O(1/ϵ2) randomizations and up to logarithmic factors O(n|E| + n|V|) computations. When used as a subroutine in a greedy influence maximization algorithm, our proposed algorithm is guaranteed to find a set of nodes with an influence of at least (1 −1/e) OPT −2Cϵ, where OPT is the optimal value. Finally, we validate CONTINEST on both influence estimation and maximization problems over large synthetic and real world datasets. In terms of influence estimation, CONTINEST is much closer to the true influence and much faster than other state-of-the-art methods. With respect to the influence maximization, CONTINEST allows us to find a set of sources with greater influence than other state-of-the-art methods. 2 Continuous-Time Diffusion Networks First, we revisit the continuous-time generative model for cascade data in social networks introduced in [10]. The model associates each edge j →i with a transmission function, fji(τji), a density over time, in contrast to previous discrete-time models which associate each edge with a fixed infection probability [1]. Moreover, it also differs from discrete-time models in the sense that events in a cascade are not generated iteratively in rounds, but event timings are sampled directly from the transmission function in the continuous-time model. Continuous-Time Independent Cascade Model. Given a directed contact network, G = (V, E), we use a continuous-time independent cascade model for modeling a diffusion process [10]. The process begins with a set of infected source nodes, A, initially adopting certain contagion (idea, meme or product) at time zero. The contagion is transmitted from the sources along their out-going edges to their direct neighbors. Each transmission through an edge entails a random spreading time, τ, drawn from a density over time, fji(τ). We assume transmission times are independent and possibly distributed differently across edges. Then, the infected neighbors transmit the contagion to their respective neighbors, and the process continues. We assume that an infected node remains infected for the entire diffusion process. Thus, if a node i is infected by multiple neighbors, only the neighbor that first infects node i will be the true parent. As a result, although the contact network can be an arbitrary directed network, each cascade (a vector of event timing information from the spread of a contagion) induces a Directed Acyclic Graph (DAG). Heterogeneous Transmission Functions. Formally, the transmission function fji(ti|tj) for directed edge j →i is the conditional density of node i getting infected at time ti given that node j was infected at time tj. We assume it is shift invariant: fji(ti|tj) = fji(τji), where τji := ti −tj, and nonnegative: fji(τji) = 0 if τji < 0. Both parametric transmission functions, such as the exponential and Rayleigh function [10, 16], and nonparametric function [8] can be used and estimated from cascade data (see Appendix A for more details). Shortest-Path property. The independent cascade model has a useful property we will use later: given a sample of transmission times of all edges, the time ti taken to infect a node i is the length 2 of the shortest path in G from the sources to node i, where the edge weights correspond to the associated transmission times. 3 Graphical Model Perspectives for Continuous-Time Diffusion Networks The continuous-time independent cascade model is essentially a directed graphical model for a set of dependent random variables, the infection times ti of the nodes, where the conditional independence structure is supported on the contact network G (see Appendix B for more details). More formally, the joint density of {ti}i∈V can be expressed as p ({ti}i∈V) = Y i∈V p (ti|{tj}j∈πi) , (1) where πi denotes the set of parents of node i in a cascade-induced DAG, and p(ti|{tj}j∈πi) is the conditional density of infection ti at node i given the infection times of its parents. Instead of directly modeling the infection times ti, we can focus on the set of mutually independent random transmission times τji = ti −tj. Interestingly, by switching from a node-centric view to an edge-centric view, we obtain a fully factorized joint density of the set of transmission times p {τji}(j,i)∈E  = Y (j,i)∈E fji(τji), (2) Based on the Shortest-Path property of the independent cascade model, each variable ti can be viewed as a transformation from the collection of variables {τji}(j,i)∈E. More specifically, let Qi be the collection of directed paths in G from the source nodes to node i, where each path q ∈Qi contains a sequence of directed edges (j, l). Assuming all source nodes are infected at zero time, then we obtain variable ti via ti = gi {τji}(j,i)∈E  := min q∈Qi X (j,l)∈q τjl, (3) where the transformation gi(·) is the value of the shortest-path minimization. As a special case, we can now compute the probability of node i infected before T using a set of independent variables: Pr {ti ≤T} = Pr  gi {τji}(j,i)∈E  ≤T . (4) The significance of the relation is that it allows us to transform a problem involving a sequence of dependent variables {ti}i∈V to one with independent variables {τji}(j,i)∈E. Furthermore, the two perspectives are connected via the shortest path algorithm in weighted directed graph, a standard well-studied operation in graph analysis. 4 Influence Estimation Problem in Continuous-Time Diffusion Networks Intuitively, given a time window, the wider the spread of infection, the more influential the set of sources. We adopt the definition of influence as the average number of infected nodes given a set of source nodes and a time window, as in previous work [7]. More formally, consider a set of C source nodes A ⊆V which gets infected at time zero, then, given a time window T, a node i is infected in the time window if ti ≤T. The expected number of infected nodes (or the influence) given the set of transmission functions {fji}(j,i)∈E can be computed as σ(A, T) = E hX i∈V I {ti ≤T} i = X i∈V E [I {ti ≤T}] = X i∈V Pr {ti ≤T} , (5) where I {·} is the indicator function and the expectation is taken over the the set of dependent variables {ti}i∈V. Essentially, the influence estimation problem in Eq. (5) is an inference problem for graphical models, where the probability of event ti ≤T given sources in A can be obtained by summing out the possible configuration of other variables {tj}j̸=i. That is Pr{ti ≤T} = Z ∞ 0 · · · Z T ti=0 · · · Z ∞ 0 Y j∈V p tj|{tl}l∈πj  Y j∈V dtj  , (6) which is, in general, a very challenging problem. First, the corresponding directed graphical models can contain nodes with high in-degree and high out-degree. For example, in Twitter, a user can follow dozens of other users, and another user can have hundreds of “followees”. The tree-width corresponding to this directed graphical model can be very high, and we need to perform integration for functions involving many continuous variables. Second, the integral in general can not be eval3 uated analytically for heterogeneous transmission functions, which means that we need to resort to numerical integration by discretizing the domain [0, ∞). If we use N level of discretization for each variable, we would need to enumerate O(N |πi|) entries, exponential in the number of parents. Only in very special cases, can one derive the closed-form equation for computing Pr{ti ≤T} [7]. However, without further heuristic approximation, the computational complexity of the algorithm is exponential in the size and density of the network. The intrinsic complexity of the problem entails the utilization of approximation algorithms, such as mean field algorithms or message passing algorithms.We will design an efficient randomized (or sampling) algorithm in the next section. 5 Efficient Influence Estimation in Continuous-Time Diffusion Networks Our first key observation is that we can transform the influence estimation problem in Eq. (5) into a problem with independent variables. Using relation in Eq. (4), we have σ(A, T) = X i∈V Pr  gi {τji}(j,i)∈E  ≤T = E hX i∈V I  gi {τji}(j,i)∈E  ≤T i , (7) where the expectation is with respect to the set of independent variables {τji}(j,i)∈E. This equivalent formulation suggests a naive sampling (NS) algorithm for approximating σ(A, T): draw n samples of {τji}(j,i)∈E, run a shortest path algorithm for each sample, and finally average the results (see Appendix C for more details). However, this naive sampling approach has a computational complexity of O(nC|V||E| + nC|V|2 log |V|) due to the repeated calling of the shortest path algorithm. This is quadratic to the network size, and hence not scalable to millions of nodes. Our second key observation is that for each sample {τji}(j,i)∈E, we are only interested in the neighborhood size of the source nodes, i.e., the summation P i∈V I {·} in Eq. (7), rather than in the individual shortest paths. Fortunately, the neighborhood size estimation problem has been studied in the theoretical computer science literature. Here, we adapt a very efficient randomized algorithm by Cohen [17] to our influence estimation problem. This randomized algorithm has a computational complexity of O(|E| log |V| + |V| log2 |V|) and it estimates the neighborhood sizes for all possible single source node locations. Since it needs to run once for each sample of {τji}(j,i)∈E, we obtain an overall influence estimation algorithm with O(n|E| log |V| + n|V| log2 |V|) computation, nearly linear in network size. Next we will revisit Cohen’s algorithm for neighborhood estimation. 5.1 Randomized Algorithm for Single-Source Neighborhood Size Estimation Given a fixed set of edge transmission times {τji}(j,i)∈E and a source node s, infected at time 0, the neighborhood N(s, T) of a source node s given a time window T is the set of nodes within distance T from s, i.e., N(s, T) =  i gi {τji}(j,i)∈E  ≤T, i ∈V . (8) Instead of estimating N(s, T) directly, the algorithm will assign an exponentially distributed random label ri to each network node i. Then, it makes use of the fact that the minimum of a set of exponential random variables {ri}i∈N (s,T ) will also be a exponential random variable, but with its parameter equals to the number of variables. That is if each ri ∼exp(−ri), then the smallest label within distance T from source s, r∗:= mini∈N (s,T ) ri, will distribute as r∗∼exp {−|N(s, T)|r∗}. Suppose we randomize over the labeling m times, and obtain m such least labels, {ru ∗}m u=1. Then the neighborhood size can be estimated as |N(s, T)| ≈ m −1 Pm u=1 ru∗ . (9) which is shown to be an unbiased estimator of |N(s, T)| [17]. This is an interesting relation since it allows us to transform the counting problem in (8) to a problem of finding the minimum random label r∗. The key question is whether we can compute the least label r∗efficiently, given random labels {ri}i∈V and any source node s. Cohen [17] designed a modified Dijkstra’s algorithm (Algorithm 1) to construct a data structure r∗(s), called least label list, for each node s to support such query. Essentially, the algorithm starts with the node i with the smallest label ri, and then it traverses in breadth-first search fashion along the reverse direction of the graph edges to find all reachable nodes. For each reachable node s, the distance d∗between i and s, and ri are added to the end of r∗(s). Then the algorithm moves to the node i′ with the second smallest label ri′, and similarly find all reachable nodes. For each reachable 4 node s, the algorithm will compare the current distance d∗between i′ and s with the last recorded distance in r∗(s). If the current distance is smaller, then the current d∗and ri′ are added to the end of r∗(s). Then the algorithm move to the node with the third smallest label and so on. The algorithm is summarized in Algorithm 1 in Appendix D. Algorithm 1 returns a list r∗(s) per node s ∈V, which contains information about distance to the smallest reachable labels from s. In particular, each list contains pairs of distance and random labels, (d, r), and these pairs are ordered as ∞> d(1) > d(2) > . . . > d(|r∗(s)|) = 0 (10) r(1) < r(2) < . . . < r(|r∗(s)|), (11) where {·}(l) denotes the l-th element in the list. (see Appendix D for an example). If we want to query the smallest reachable random label r∗for a given source s and a time T, we only need to perform a binary search on the list for node s: r∗= r(l), where d(l−1) > T ≥d(l). (12) Finally, to estimate |N(s, T)|, we generate m i.i.d. collections of random labels, run Algorithm 1 on each collection, and obtain m values {ru ∗}m u=1, which we use on Eq. (9) to estimate |N(i, T)|. The computational complexity of Algorithm 1 is O(|E| log |V| + |V| log2 |V|), with expected size of each r∗(s) being O(log |V|). Then the expected time for querying r∗is O(log log |V|) using binary search. Since we need to generate m set of random labels and run Algorithm 1 m times, the overall computational complexity for estimating the single-source neighborhood size for all s ∈V is O(m|E| log |V| + m|V| log2 |V| + m|V| log log |V|). For large scale network, and when m ≪ min{|V|, |E|}, this randomized algorithm can be much more efficient than approaches based on directly calculating the shortest paths. 5.2 Constructing Estimation for Multiple-Source Neighborhood Size When we have a set of sources, A, its neighborhood is the union of the neighborhoods of its constituent sources N(A, T) = [ i∈A N(i, T). (13) This is true because each source independently infects its downstream nodes. Furthermore, to calculate the least label list r∗corresponding to N(A, T), we can simply reuse the least label list r∗(i) of each individual source i ∈A. More formally, r∗= mini∈A minj∈N (i,T ) rj, (14) where the inner minimization can be carried out by querying r∗(i). Similarly, after we obtain m samples of r∗, we can estimate |N(A, T)| using Eq. (9). Importantly, very little additional work is needed when we want to calculate r∗for a set of sources A, and we can reuse work done for a single source. This is very different from a naive sampling approach where the sampling process needs to be done completely anew if we increase the source set. In contrast, using the randomized algorithm, only an additional constant-time minimization over |A| numbers is needed. 5.3 Overall Algorithm So far, we have achieved efficient neighborhood size estimation of |N(A, T)| with respect to a given set of transmission times {τji}(j,i)∈E. Next, we will estimate the influence by averaging over multiple sets of samples for {τji}(j,i)∈E. More specifically, the relation from (7) σ(A, T) = E{τji}(j,i)∈E [|N(A, T)|] = E{τji}E{r1,...,rm}|{τji}  m −1 Pm u=1 ru∗  , (15) suggests the following overall algorithm Continuous-Time Influence Estimation (CONTINEST): 1. Sample n sets of random transmission times {τ l ij}(j,i)∈E ∼Q (j,i)∈E fji(τji) 2. Given a set of {τ l ij}(j,i)∈E, sample m sets of random labels {ru i }i∈V ∼Q i∈V exp(−ri) 3. Estimate σ(A, T) by sample averages σ(A, T) ≈1 n Pn l=1 (m −1)/ Pm ul=1 rul ∗  5 Importantly, the number of random labels, m, does not need to be very large. Since the estimator for |N(A, T)| is unbiased [17], essentially the outer-loop of averaging over n samples of random transmission times further reduces the variance of the estimator in a rate of O(1/n). In practice, we can use a very small m (e.g., 5 or 10) and still achieve good results, which is also confirmed by our later experiments. Compared to [2], the novel application of Cohen’s algorithm arises for estimating influence for multiple sources, which drastically reduces the computation by cleverly using the least-label list from single source. Moreover, we have the following theoretical guarantee (see Appendix E for proof) Theorem 1 Draw the following number of samples for the set of random transmission times n ⩾CΛ ϵ2 log 2|V| δ  (16) where Λ := maxA:|A|≤C 2σ(A, T)2/(m −2) + 2V ar(|N(A, T)|)(m −1)/(m −2) + 2aϵ/3 and |N(A, T)| ≤a, and for each set of random transmission times, draw m set of random labels. Then |bσ(A, T) −σ(A, T)| ⩽ϵ uniformly for all A with |A| ⩽C, with probability at least 1 −δ. The theorem indicates that the minimum number of samples, n, needed to achieve certain accuracy is related to the actual size of the influence σ(A, T), and the variance of the neighborhood size |N(A, T)| over the random draw of samples. The number of random labels, m, drawn in the inner loop of the algorithm will monotonically decrease the dependency of n on σ(A, T). It suffices to draw a small number of random labels, as long as the value of σ(A, T)2/(m −2) matches that of V ar(|N(A, T)|). Another implication is that influence at larger time window T is harder to estimate, since σ(A, T) will generally be larger and hence require more random labels. 6 Influence Maximization Once we know how to estimate the influence σ(A, T) for any A ⊆V and time window T efficiently, we can use them in finding the optimal set of C source nodes A∗⊆V such that the expected number of infected nodes in G is maximized at T. That is, we seek to solve, A∗= argmax|A|⩽C σ(A, T), (17) where set A is the variable. The above optimization problem is NP-hard in general. By construction, σ(A, T) is a non-negative, monotonic nondecreasing function in the set of source nodes, and it can be shown that σ(A, T) satisfies a diminishing returns property called submodularity [7]. A well-known approximation algorithm to maximize monotonic submodular functions is the greedy algorithm. It adds nodes to the source node set A sequentially. In step k, it adds the node i which maximizes the marginal gain σ(Ak−1 ∪{i}; T)−σ(Ak−1; T). The greedy algorithm finds a source node set which achieves at least a constant fraction (1 −1/e) of the optimal [18]. Moreover, lazy evaluation [5] can be employed to reduce the required number of marginal gains per iteration. By using our influence estimation algorithm in each iteration of the greedy algorithm, we gain the following additional benefits: First, at each iteration k, we do not need to rerun the full influence estimation algorithm (section 5.2). We just need to store the least label list r∗(i) for each node i ∈V computed for a single source, which requires expected storage size of O(|V| log |V|) overall. Second, our influence estimation algorithm can be easily parallelized. Its two nested sampling loops can be parallelized in a straightforward way since the variables are independent of each other. However, in practice, we use a small number of random labels, and m ≪n. Thus we only need to parallelize the sampling for the set of random transmission times {τji}. The storage of the least element lists can also be distributed. However, by using our randomized algorithm for influence estimation, we also introduce a sampling error to the greedy algorithm due to the approximation of the influence σ(A, T). Fortunately, the greedy algorithm is tolerant to such sampling noise, and a well-known result provides a guarantee for this case (following an argument in [19, Th. 7.9]): Theorem 2 Suppose the influence σ(A, T) for all A with |A| ≤C are estimated uniformly with error ϵ and confidence 1 −δ, the greedy algorithm returns a set of sources b A such that σ( b A, T) ≥ (1 −1/e)OPT −2Cϵ with probability at least 1 −δ. 6 2 4 6 8 10 0 50 100 150 200 T influence NS ConTinEst 10 2 10 3 10 4 0 0.02 0.04 0.06 0.08 #samples relative error 5 10 20 30 40 50 0 2 4 6 8 x 10 −3 #labels relative error (a) Influence vs. time (b) Error vs. #samples (c) Error vs. #labels Figure 1: For core-periphery networks with 1,024 nodes and 2,048 edges, (a) estimated influence for increasing time window T, and (b) fixing T = 10, relative error for increasing number of samples with 5 random labels, and (c) for increasing number of random labels with 10,000 random samples. 7 Experiments We evaluate the accuracy of the estimated influence given by CONTINEST and investigate the performance of influence maximization on synthetic and real networks. We show that our approach significantly outperforms the state-of-the-art methods in terms of both speed and solution quality. Synthetic network generation. We generate three types of Kronecker networks [20]: (i) coreperiphery networks (parameter matrix: [0.9 0.5; 0.5 0.3]), which mimic the information diffusion traces in real world networks [21], (ii) random networks ([0.5 0.5; 0.5 0.5]), typically used in physics and graph theory [22] and (iii) hierarchical networks ([0.9 0.1; 0.1 0.9]) [10]. Next, we assign a pairwise transmission function for every directed edge in each type of network and set its parameters at random. In our experiments, we use the Weibull distribution [16], f(t; α, β) = β α t α β−1 e−(t/α)β, t ⩾0, where α > 0 is a scale parameter and β > 0 is a shape parameter. The Weibull distribution (Wbl) has often been used to model lifetime events in survival analysis, providing more flexibility than an exponential distribution [16]. We choose α and β from 0 to 10 uniformly at random for each edge in order to have heterogeneous temporal dynamics. Finally, for each type of Kronecker network, we generate 10 sample networks, each of which has different α and β chosen for every edge. Accuracy of the estimated influence. To the best of our knowledge, there is no analytical solution to the influence estimation given Weibull transmission function. Therefore, we compare CONTINEST with Naive Sampling (NS) approach (see Appendix C) by considering the highest degree node in a network as the source, and draw 1,000,000 samples for NS to obtain near ground truth. Figures 1(a) compares CONTINEST with the ground truth provided by NS at different time window T, from 0.1 to 10 in corre-periphery networks. For CONTINEST, we generate up to 10,000 random samples (or set of random waiting times), and 5 random labels in the inner loop. In all three networks, estimation provided by CONTINEST fits accurately the ground truth, and the relative error decreases quickly as we increase the number of samples and labels (Figures 1(b) and 1(c)). For 10,000 random samples with 5 random labels, the relative error is smaller than 0.01. (see Appendix F for additional results on the random and hierarchal networks) Scalability. We compare CONTINEST to the state-of-the-art method INFLUMAX [7] and the Naive Sampling (NS) method in terms of runtime for the continuous-time influence estimation and maximization. For CONTINEST, we draw 10,000 samples in the outer loop, each having 5 random labels in the inner loop. For NS, we also draw 10,000 samples. The first two experiments are carried out in a single 2.4GHz processor. First, we compare the performance of increasingly selecting sources (from 1 to 10) on small core-periphery networks (Figure 2(a)). When the number of selected sources is 1, different algorithms essentially spend time estimating the influence for each node. CONTINEST outperforms other methods by order of magnitude and for the number of sources larger than 1, it can efficiently reuse computations for estimating influence for individual nodes. Dashed lines mean that a method did not finish in 24 hours, and the estimated run time is plotted. Next, we compare the run time for selecting 10 sources on core-periphery networks of 128 nodes with increasing densities (or the number of edges) (Figure 2(a)). Again, INFLUMAX and NS are order of magnitude slower due to their respective exponential and quadratic computational complexity in network density. In contrast, the run time of CONTINEST only increases slightly with the increasing density since its computational complexity is linear in the number of edges (see Appendix F for additional results on the random and hierarchal networks). Finally, we evaluate the speed on large core-periphery networks, ranging from 100 to 1,000,000 nodes with density 1.5 in Figure 2(c). We report the parallel run time 7 1 2 3 4 5 6 7 8 9 10 10 0 10 1 10 2 10 3 10 4 10 5 #sources time(s) ConTinEst NS Influmax > 24 hours 1.5 2 2.5 3 3.5 4 4.5 5 10 0 10 1 10 2 10 3 10 4 10 5 density time(s) ConTinEst NS Influmax > 24 hours 10 2 10 3 10 4 10 5 10 6 10 2 10 3 10 4 10 5 10 6 #nodes time(s) ConTinEst NS > 48 hours (a) Run time vs. # sources (b) Run time vs. network density (c) Run time vs. #nodes Figure 2: For core-periphery networks with T = 10, runtime for (a) selecting increasing number of sources in networks of 128 nodes and 320 edges; for (b)selecting 10 sources in networks of 128 nodes with increasing density; and for (c) selecting 10 sources with increasing network size from 100 to 1,000,000 fixing 1.5 density. 10 20 30 40 50 0.5 1 1.5 2 2.5 3 3.5 T MAE ConTinEst IC LT SP1M PMIA 0 10 20 30 40 50 0 10 20 30 40 50 60 #sources influence ConTinEst Greedy(IC) Greedy(LT) SP1M PMIA 0 5 10 15 20 0 20 40 60 80 T influence ConTinEst(Wbl) Greedy(IC) Greedy(LT) SP1M PMIA (a) Influence estimation error (b) Influence vs. #sources (c) Influence vs. time Figure 3: In MemeTracker dataset, (a) comparison of the accuracy of the estimated influence in terms of mean absolute error, (b) comparison of the influence of the selected nodes by fixing the observation window T = 5 and varying the number sources, and (c) comparison of the influence of the selected nodes by by fixing the number of sources to 50 and varying the time window. only for CONTINEST and NS (both are implemented by MPI running on 192 cores of 2.4Ghz) since INFLUMAX is not scalable. In contrast to NS, the performance of CONTINEST increases linearly with the network size and can easily scale up to one million nodes. Real-world data. We first quantify how well each method can estimate the true influence in a real-world dataset. Then, we evaluate the solution quality of the selected sources for influence maximization. We use the MemeTracker dataset [23] which has 10,967 hyperlink cascades among 600 media sites. We repeatedly split all cascades into a 80% training set and a 20% test set at random for five times. On each training set, we learn the continuous-time model using NETRATE [10] with exponential transmission functions. For discrete-time model, we learn the infection probabilities using [24] for IC, SP1M and PMIA. Similarly, for LT, we follow the methodology by [1]. Let C(u) be the set of all cascades where u was the source node. Based on C(u), the total number of distinct nodes infected before T quantifies the real influence of node u up to time T. In Figure 3(a), we report the Mean Absolute Error (MAE) between the real and the estimated influence. Clearly, CONTINEST performs the best statistically. Because the length of real cascades empirically conforms to a power-law distribution where most cascades are very short (2-4 nodes), the gap of the estimation error is relatively not large. However, we emphasize that such accuracy improvement is critical for maximizing long-term influence. The estimation error for individuals will accumulate along the spreading paths. Hence, any consistent improvement in influence estimation can lead to significant improvement to the overall influence estimation and maximization task, which is further confirmed by Figures 3(b) and 3(c) where we evaluate the influence of the selected nodes in the same spirit as influence estimation: the true influence is calculated as the total number of distinct nodes infected before T based on C(u) of the selected nodes. The selected sources given by CONTINEST achieve the best performance as we vary the number of selected sources and the observation time window. 8 Conclusions We propose a randomized influence estimation algorithm in continuous-time diffusion networks, which can scale up to networks of millions of nodes while significantly improves over previous stateof-the-arts in terms of the accuracy of the estimated influence and the quality of the selected nodes in maximizing the influence. In future work, it will be interesting to apply the current algorithm to other tasks like influence minimization and manipulation, and design scalable algorithms for continuous-time models other than the independent cascade model. Acknowledgement: Our work is supported by NSF/NIH BIGDATA 1R01GM108341-01, NSF IIS1116886, NSF IIS1218749, NSFC 61129001, a DARPA Xdata grant and Raytheon Faculty Fellowship of Gatech. 8 References [1] David Kempe, Jon Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In KDD, pages 137–146, 2003. [2] Wei Chen, Yajun Wang, and Siyu Yang. Efficient influence maximization in social networks. In KDD, pages 199–208, 2009. [3] Wei Chen, Yifei Yuan, and Li Zhang. Scalable influence maximization in social networks under the linear threshold model. In ICDM, pages 88–97, 2010. [4] Amit Goyal, Francesco Bonchi, and Laks V. S. Lakshmanan. A data-based approach to social influence maximization. Proc. VLDB Endow., 5, 2011. [5] Jure Leskovec, Andreas Krause, Carlos Guestrin, Christos Faloutsos, Jeanne M. VanBriesen, and Natalie S. Glance. Cost-effective outbreak detection in networks. In KDD, pages 420–429, 2007. [6] Matthew Richardson and Pedro Domingos. Mining knowledge-sharing sites for viral marketing. In KDD, pages 61–70, 2002. [7] Manuel Gomez-Rodriguez and Bernhard Sch¨olkopf. Influence maximization in continuous time diffusion networks. In ICML ’12, 2012. [8] Nan Du, Le Song, Alexander J. Smola, and Ming Yuan. Learning networks of heterogeneous influence. In NIPS, 2012. [9] Nan Du, Le Song, Hyenkyun Woo, and Hongyuan Zha. Uncover topic-sensitive information diffusion networks. In AISTATS, 2013. [10] Manuel Gomez-Rodriguez, David Balduzzi, and Bernhard Sch¨olkopf. Uncovering the temporal dynamics of diffusion networks. In ICML, pages 561–568, 2011. [11] Manuel Gomez-Rodriguez, Jure Leskovec, and Bernhard Sch¨olkopf. Structure and Dynamics of Information Pathways in On-line Media. In WSDM, 2013. [12] Ke Zhou, Le Song, and Hongyuan Zha. Learning social infectivity in sparse low-rank networks using multi-dimensional hawkes processes. In Artificial Intelligence and Statistics (AISTATS), 2013. [13] Ke Zhou, Hongyuan Zha, and Le Song. Learning triggering kernels for multi-dimensional hawkes processes. In International Conference on Machine Learning(ICML), 2013. [14] Manuel Gomez-Rodriguez, Jure Leskovec, and Bernhard Sch¨olkopf. Modeling information propagation with survival theory. In ICML, 2013. [15] Shuanghong Yang and Hongyuan Zha. Mixture of mutually exciting processes for viral diffusion. In International Conference on Machine Learning(ICML), 2013. [16] Jerald F. Lawless. Statistical Models and Methods for Lifetime Data. Wiley-Interscience, 2002. [17] Edith Cohen. Size-estimation framework with applications to transitive closure and reachability. Journal of Computer and System Sciences, 55(3):441–453, 1997. [18] GL Nemhauser, LA Wolsey, and ML Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 14(1), 1978. [19] Andreas Krause. Ph.D. Thesis. CMU, 2008. [20] Jure Leskovec, Deepayan Chakrabarti, Jon M. Kleinberg, Christos Faloutsos, and Zoubin Ghahramani. Kronecker graphs: An approach to modeling networks. JMLR, 11, 2010. [21] Manuel Gomez-Rodriguez, Jure Leskovec, and Andreas Krause. Inferring networks of diffusion and influence. In KDD, 2010. [22] David Easley and Jon Kleinberg. Networks, Crowds, and Markets: Reasoning About a Highly Connected World. Cambridge University Press, 2010. [23] Jure Leskovec, Lars Backstrom, and Jon M. Kleinberg. Meme-tracking and the dynamics of the news cycle. In KDD, 2009. [24] Praneeth Netrapalli and Sujay Sanghavi. Learning the graph of epidemic cascades. In SIGMETRICS/PERFORMANCE, pages 211–222. ACM, 2012. [25] Wei Chen, Chi Wang, and Yajun Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In KDD ’10, pages 1029–1038, 2010. 9
2013
205
4,938
More data speeds up training time in learning halfspaces over sparse vectors Amit Daniely Department of Mathematics The Hebrew University Jerusalem, Israel Nati Linial School of CS and Eng. The Hebrew University Jerusalem, Israel Shai Shalev-Shwartz School of CS and Eng. The Hebrew University Jerusalem, Israel Abstract The increased availability of data in recent years has led several authors to ask whether it is possible to use data as a computational resource. That is, if more data is available, beyond the sample complexity limit, is it possible to use the extra examples to speed up the computation time required to perform the learning task? We give the first positive answer to this question for a natural supervised learning problem — we consider agnostic PAC learning of halfspaces over 3-sparse vectors in {−1, 1, 0}n. This class is inefficiently learnable using O n/ϵ2 examples. Our main contribution is a novel, non-cryptographic, methodology for establishing computational-statistical gaps, which allows us to show that, under a widely believed assumption that refuting random 3CNF formulas is hard, it is impossible to efficiently learn this class using only O n/ϵ2 examples. We further show that under stronger hardness assumptions, even O n1.499/ϵ2 examples do not suffice. On the other hand, we show a new algorithm that learns this class efficiently using ˜Ω n2/ϵ2 examples. This formally establishes the tradeoff between sample and computational complexity for a natural supervised learning problem. 1 Introduction In the modern digital period, we are facing a rapid growth of available datasets in science and technology. In most computing tasks (e.g. storing and searching in such datasets), large datasets are a burden and require more computation. However, for learning tasks the situation is radically different. A simple observation is that more data can never hinder you from performing a task. If you have more data than you need, just ignore it! A basic question is how to learn from “big data”. The statistical learning literature classically studies questions like “how much data is needed to perform a learning task?” or “how does accuracy improve as the amount of data grows?” etc. In the modern, “data revolution era”, it is often the case that the amount of data available far exceeds the information theoretic requirements. We can wonder whether this, seemingly redundant data, can be used for other purposes. An intriguing question in this vein, studied recently by several researchers ([Decatur et al., 1998, Servedio., 2000, Shalev-Shwartz et al., 2012, Berthet and Rigollet, 2013, Chandrasekaran and Jordan, 2013]), is the following Question 1: Are there any learning tasks in which more data, beyond the information theoretic barrier, can provably be leveraged to speed up computation time? The main contributions of this work are: 1 • Conditioning on the hardness of refuting random 3CNF formulas, we give the first example of a natural supervised learning problem for which the answer to Question 1 is positive. • To prove this, we present a novel technique to establish computational-statistical tradeoffs in supervised learning problems. To the best of our knowledge, this is the first such a result that is not based on cryptographic primitives. Additional contributions are non trivial efficient algorithms for learning halfspaces over 2-sparse and 3-sparse vectors using ˜O n ϵ2  and ˜O  n2 ϵ2  examples respectively. The natural learning problem we consider is the task of learning the class of halfspaces over k-sparse vectors. Here, the instance space is the space of k-sparse vectors, Cn,k = {x ∈{−1, 1, 0}n | |{i | xi ̸= 0}| ≤k} , and the hypothesis class is halfspaces over k-sparse vectors, namely Hn,k = {hw,b : Cn,k →{±1} | hw,b(x) = sign(⟨w, x⟩+ b), w ∈Rn, b ∈R} , where ⟨·, ·⟩denotes the standard inner product in Rn. We consider the standard setting of agnostic PAC learning, which models the realistic scenario where the labels are not necessarily fully determined by some hypothesis from Hn,k. Note that in the realizable case, i.e. when some hypothesis from Hn,k has zero error, the problem of learning halfspaces is easy even over Rn. In addition, we allow improper learning (a.k.a. representation independent learning), namely, the learning algorithm is not restricted to output a hypothesis from Hn,k, but only should output a hypothesis whose error is not much larger than the error of the best hypothesis in Hn,k. This gives the learner a lot of flexibility in choosing an appropriate representation of the problem. This additional freedom to the learner makes it much harder to prove lower bounds in this model. Concretely, it is not clear how to use standard reductions from NP hard problems in order to establish lower bounds for improper learning (moreover, Applebaum et al. [2008] give evidence that such simple reductions do not exist). The classes Hn,k and similar classes have been studied by several authors (e.g. Long. and Servedio [2013]). They naturally arise in learning scenarios in which the set of all possible features is very large, but each example has only a small number of active features. For example: • Predicting an advertisement based on a search query: Here, the possible features of each instance are all English words, whereas the active features are only the set of words given in the query. • Learning Preferences [Hazan et al., 2012]: Here, we have n players. A ranking of the players is a permutation σ : [n] →[n] (think of σ(i) as the rank of the i’th player). Each ranking induces a preference hσ over the ordered pairs, such that hσ(i, j) = 1 iff i is ranked higher that j. Namely, hσ(i, j) = 1 σ(i) > σ(j) −1 σ(i) < σ(j) The objective here is to learn the class, Pn, of all possible preferences. The problem of learning preferences is related to the problem of learning Hn,2: if we associate each pair (i, j) with the vector in Cn,2 whose i’th coordinate is 1 and whose j’th coordinate is −1, it is not hard to see that Pn ⊂Hn,2: for every σ, hσ = hw,0 for the vector w ∈Rn, given by wi = σ(i). Therefore, every upper bound for Hn,2 implies an upper bound for Pn, while every lower bound for Pn implies a lower bound for Hn,2. Since VC(Pn) = n and VC(Hn,2) = n + 1, the information theoretic barrier to learn these classes is Θ n ϵ2  . In Hazan et al. [2012] it was shown that Pn can be efficiently learnt using O  n log3(n) ϵ2  examples. In section 4, we extend this result to Hn,2. We will show a positive answer to Question 1 for the class Hn,3. To do so, we show1 the following: 1In fact, similar results hold for every constant k ≥3. Indeed, since Hn,3 ⊂Hn,k for every k ≥3, it is trivial that item 3 below holds for every k ≥3. The upper bound given in item 1 holds for every k. For item 2, 2 1. Ignoring computational issues, it is possible to learn the class Hn,3 using O n ϵ2  examples. 2. It is also possible to efficiently learn Hn,3 if we are provided with a larger training set (of size ˜Ω  n2 ϵ2  ). This is formalized in Theorem 3.1. 3. It is impossible to efficiently learn Hn,3, if we are only provided with a training set of size O n ϵ2  under Feige’s assumption regarding the hardness of refuting random 3CNF formulas [Feige, 2002]. Furthermore, for every α ∈[0, 0.5), it is impossible to learn efficiently with a training set of size O  n1+α ϵ2  under a stronger hardness assumption. This is formalized in Theorem 4.1. A graphical illustration of our main results is given below: runtime 2O(n) > poly(n) nO(1) examples n2 n1.5 n The proof of item 1 above is easy – simply note that Hn,3 has VC dimension n + 1. Item 2 is proved in section 4, relying on the results of Hazan et al. [2012]. We note, however, that a weaker result, that still suffices for answering Question 1 in the affirmative, can be proven using a naive improper learning algorithm. In particular, we show below how to learn Hn,3 efficiently with a sample of Ω  n3 ϵ2  examples. The idea is to replace the class Hn,3 with the class {±1}Cn,3 containing all functions from Cn,3 to {±1}. Clearly, this class contains Hn,3. In addition, we can efficiently find a function f that minimizes the empirical training error over a training set S as follows: For every x ∈Cn,k, if x does not appear at all in the training set we will set f(x) arbitrarily to 1. Otherwise, we will set f(x) to be the majority of the labels in the training set that correspond to x. Finally, note that the VC dimension of {±1}Cn,3 is smaller than n3 (since |Cn,3| < n3). Hence, standard generalization results (e.g. Vapnik [1995]) implies that a training set size of Ω  n3 ϵ2  suffices for learning this class. Item 3 is shown in section 3 by presenting a novel technique for establishing statisticalcomputational tradeoffs. The class Hn,2. Our main result gives a positive answer to Question 1 for the task of improperly learning Hn,k for k ≥3. A natural question is what happens for k = 2 and k = 1. Since VC(Hn,1) = VC(Hn,2) = n + 1, the information theoretic barrier for learning these classes is Θ n ϵ2  . In section 4, we prove that Hn,2 (and, consequently, Hn,1 ⊂Hn,2) can be learnt using O  n log3(n) ϵ2  examples, indicating that significant computational-statistical tradeoffs start to manifest themselves only for k ≥3. 1.1 Previous approaches, difficulties, and our techniques [Decatur et al., 1998] and [Servedio., 2000] gave positive answers to Question 1 in the realizable PAC learning model. Under cryptographic assumptions, they showed that there exist binary learning problems, in which more data can provably be used to speed up training time. [Shalev-Shwartz et al., 2012] showed a similar result for the agnostic PAC learning model. In all of these papers, the main idea is to construct a hypothesis class based on a one-way function. However, the constructed it is not hard to show that Hn,k can be learnt using a sample of Ω  nk ϵ2  examples by a naive improper learning algorithm, similar to the algorithm we describe in this section for k = 3. 3 classes are of a very synthetic nature, and are of almost no practical interest. This is mainly due to the construction technique which is based on one way functions. In this work, instead of using cryptographic assumptions, we rely on the hardness of refuting random 3CNF formulas. The simplicity and flexibility of 3CNF formulas enable us to derive lower bounds for natural classes such as halfspaces. Recently, [Berthet and Rigollet, 2013] gave a positive answer to Question 1 in the context of unsupervised learning. Concretely, they studied the problem of sparse PCA, namely, finding a sparse vector that maximizes the variance of an unsupervised data. Conditioning on the hardness of the planted clique problem, they gave a positive answer to Question 1 for sparse PCA. Our work, as well as the previous work of Decatur et al. [1998], Servedio. [2000], Shalev-Shwartz et al. [2012], studies Question 1 in the supervised learning setup. We emphasize that unsupervised learning problems are radically different than supervised learning problems in the context of deriving lower bounds. The main reason for the difference is that in supervised learning problems, the learner is allowed to employ improper learning, which gives it a lot of power in choosing an adequate representation of the data. For example, the upper bound we have derived for the class of sparse halfspaces switched from representing hypotheses as halfspaces to representation of hypotheses as tables over Cn,3, which made the learning problem easy from the computational perspective. The crux of the difficulty in constructing lower bounds is due to this freedom of the learner in choosing a convenient representation. This difficulty does not arise in the problem of sparse PCA detection, since there the learner must output a good sparse vector. Therefore, it is not clear whether the approach given in [Berthet and Rigollet, 2013] can be used to establish computational-statistical gaps in supervised learning problems. 2 Background and notation For hypothesis class H ⊂{±1}X and a set Y ⊂X, we define the restriction of H to Y by H|Y = {h|Y | h ∈H}. We denote by J = Jn the all-ones n × n matrix. We denote the j’th vector in the standard basis of Rn by ej. 2.1 Learning Algorithms For h : Cn,3 →{±1} and a distribution D on Cn,3 × {±1} we denote the error of h w.r.t. D by ErrD(h) = Pr(x,y)∼D (h(x) ̸= y). For H ⊂{±1}Cn,3 we denote the error of H w.r.t. D by ErrD(H) = minh∈H ErrD(h). For a sample S ∈(Cn,3 × {±1})m we denote by ErrS(h) (resp. ErrS(H)) the error of h (resp. H) w.r.t. the empirical distribution induces by the sample S. A learning algorithm, L, receives a sample S ∈(Cn,3 × {±1})m and return a hypothesis L(S) : Cn,3 →{±1}. We say that L learns Hn,3 using m(n, ϵ) examples if,2 for every distribution D on Cn,3 × {±1} and a sample S of more than m(n, ϵ) i.i.d. examples drawn from D, Pr S (ErrD(L(S)) > ErrD(H3,n) + ϵ) < 1 10 The algorithm L is efficient if it runs in polynomial time in the sample size and returns a hypothesis that can be evaluated in polynomial time. 2.2 Refuting random 3SAT formulas We frequently view a boolean assignment to variables x1, . . . , xn as a vector in Rn. It is convenient, therefore, to assume that boolean variables take values in {±1} and to denote negation by “ −” (instead of the usual “¬”). An n-variables 3CNF clause is a boolean formula of the form C(x) = (−1)j1xi1 ∨(−1)j2xi2 ∨(−1)j1xi3, x ∈{±1}n An n-variables 3CNF formula is a boolean formula of the form φ(x) = ∧m i=1Ci(x) , 2For simplicity, we require the algorithm to succeed with probability of at least 9/10. This can be easily amplified to probability of at least 1 −δ, as in the usual definition of agnostic PAC learning, while increasing the sample complexity by a factor of log(1/δ). 4 where every Ci is a 3CNF clause. Define the value, Val(φ), of φ as the maximal fraction of clauses that can be simultaneously satisfied. If Val(φ) = 1, we say the φ is satisfiable. By 3CNFn,m we denote the set of 3CNF formulas with n variables and m clauses. Refuting random 3CNF formulas has been studied extensively (see e.g. a special issue of TCS Dubios et al. [2001]). It is known that for large enough ∆(∆= 6 will suffice) a random formula in 3CNFn,∆n is not satisfiable with probability 1 −o(1). Moreover, for every 0 ≤ϵ < 1 4, and a large enough ∆= ∆(ϵ), the value of a random formula 3CNFn,∆n is ≤1 −ϵ with probability 1 −o(1). The problem of refuting random 3CNF concerns efficient algorithms that provide a proof that a random 3CNF is not satisfiable, or far from being satisfiable. This can be thought of as a game between an adversary and an algorithm. The adversary should produce a 3CNF-formula. It can either produce a satisfiable formula, or, produce a formula uniformly at random. The algorithm should identify whether the produced formula is random or satisfiable. Formally, let ∆: N →N and 0 ≤ϵ < 1 4. We say that an efficient algorithm, A, ϵ-refutes random 3CNF with ratio ∆if its input is φ ∈3CNFn,n∆(n), its output is either “typical” or “exceptional” and it satisfies: • Soundness: If Val(φ) ≥1 −ϵ, then Pr Rand. coins of A (A(φ) = “exceptional”) ≥3 4 • Completeness: For every n, Pr Rand. coins of A, φ∼Uni(3CNFn,n∆(n)) (A(φ) = “typical”) ≥1 −o(1) By a standard repetition argument, the probability of 3 4 can be amplified to 1−2−n, while efficiency is preserved. Thus, given such an (amplified) algorithm, if A(φ) = “typical”, then with confidence of 1 −2−n we know that Val(φ) < 1 −ϵ. Since for random φ ∈3CNFn,n∆(n), A(φ) = “typical” with probability 1 −o(1), such an algorithm provides, for most 3CNF formulas a proof that their value is less that 1 −ϵ. Note that an algorithm that ϵ-refutes random 3CNF with ratio ∆also ϵ′-refutes random 3CNF with ratio ∆for every 0 ≤ϵ′ ≤ϵ. Thus, the task of refuting random 3CNF’s gets easier as ϵ gets smaller. Most of the research concerns the case ϵ = 0. Here, it is not hard to see that the task is getting easier as ∆grows. The best known algorithm [Feige and Ofek, 2007] 0-refutes random 3CNF with ratio ∆(n) = Ω(√n). In Feige [2002] it was conjectured that for constant ∆no efficient algorithm can provide a proof that a random 3CNF is not satisfiable: Conjecture 2.1 (R3SAT hardness assumption – [Feige, 2002]). For every ϵ > 0 and for every large enough integer ∆> ∆0(ϵ) there exists no efficient algorithm that ϵ-refutes random 3CNF formulas with ratio ∆. In fact, for all we know, the following conjecture may be true for every 0 ≤µ ≤0.5. Conjecture 2.2 (µ-R3SAT hardness assumption). For every ϵ > 0 and for every integer ∆> ∆0(ϵ) there exists no efficient algorithm that ϵ-refutes random 3CNF with ratio ∆· nµ. Note that Feige’s conjecture is equivalent to the 0-R3SAT hardness assumption. 3 Lower bounds for learning Hn,3 Theorem 3.1 (main). Let 0 ≤µ ≤0.5. If the µ-R3SAT hardness assumption (conjecture 2.2) is true, then there exists no efficient learning algorithm that learns the class Hn,3 using O  n1+µ ϵ2  examples. In the proof of Theorem 3.1 we rely on the validity of a conjecture, similar to conjecture 2.2 for 3variables majority formulas. Following an argument from [Feige, 2002] (Theorem 3.2) the validity of the conjecture on which we rely for majority formulas follows the validity of conjecture 2.2. 5 Define ∀(x1, x2, x3) ∈{±1}3, MAJ(x1, x2, x3) := sign(x1 + x2 + x3) An n-variables 3MAJ clause is a boolean formula of the form C(x) = MAJ((−1)j1xi1, (−1)j2xi2, (−1)j1xi3), x ∈{±1}n An n-variables 3MAJ formula is a boolean formula of the form φ(x) = ∧m i=1Ci(x) where the Ci’s are 3MAJ clauses. By 3MAJn,m we denote the set of 3MAJ formulas with n variables and m clauses. Theorem 3.2 ([Feige, 2002]). Let 0 ≤µ ≤0.5. If the µ-R3SAT hardness assumption is true, then for every ϵ > 0 and for every large enough integer ∆> ∆0(ϵ) there exists no efficient algorithm with the following properties. • Its input is φ ∈3MAJn,∆n1+µ, and its output is either “typical” or “exceptional”. • If Val(φ) ≥3 4 −ϵ, then Pr Rand. coins of A (A(φ) = “exceptional”) ≥3 4 • For every n, Pr Rand. coins of A, φ∼Uni(3MAJn,∆n1+µ) (A(φ) = “typical”) ≥1 −o(1) Next, we prove Theorem 3.1. In fact, we will prove a slightly stronger result. Namely, define the subclass Hd n,3 ⊂Hn,3, of homogenous halfspaces with binary weights, given by Hd n,3 = {hw,0 | w ∈{±1}n}. As we show, under the µ-R3SAT hardness assumption, it is impossible to efficiently learn this subclass using only O  n1+µ ϵ2  examples. Proof idea: We will reduce the task of refuting random 3MAJ formulas with linear number of clauses to the task of (improperly) learning Hd n,3 with linear number of samples. The first step will be to construct a transformation that associates every 3MAJ clause with two examples in Cn,3 ×{±1}, and every assignment with a hypothesis in Hd n,3. As we will show, the hypothesis corresponding to an assignment ψ is correct on the two examples corresponding to a clause C if and only if ψ satisfies C. With that interpretation at hand, every 3MAJ formula φ can be thought of as a distribution Dφ on Cn,3 × {±1}, which is the empirical distribution induced by ψ’s clauses. It holds furthermore that ErrDφ(Hd n,3) = 1 −Val(φ). Suppose now that we are given an efficient learning algorithm for Hd n,3, that uses κ n ϵ2 examples, for some κ > 0. To construct an efficient algorithm for refuting 3MAJ-formulas, we simply feed the learning algorithm with κ n 0.012 examples drawn from Dφ and answer “exceptional” if the error of the hypothesis returned by the algorithm is small. If φ is (almost) satisfiable, the algorithm is guaranteed to return a hypothesis with a small error. On the other hand, if φ is far from being satisfiable, ErrDφ(Hd n,3) is large. If the learning algorithm is proper, then it must return a hypothesis from Hd n,3 and therefore it would necessarily return a hypothesis with a large error. This argument can be used to show that, unless NP = RP, learning Hd n,3 with a proper efficient algorithm is impossible. However, here we want to rule out improper algorithms as well. The crux of the construction is that if φ is random, no algorithm (even improper and even inefficient) can return a hypothesis with a small error. The reason for that is that since the sample provided to the algorithm consists of only κ n 0.012 samples, the algorithm won’t see most of ψ’s clauses, and, consequently, the produced hypothesis h will be independent of them. Since these clauses are random, h is likely to err on about half of them, so that ErrDφ(h) will be close to half! To summarize we constructed an efficient algorithm with the following properties: if φ is almost satisfiable, the algorithm will return a hypothesis with a small error, and then we will declare “exceptional”, while for random φ, the algorithm will return a hypothesis with a large error, and we will declare “typical”. 6 Our construction crucially relies on the restriction to learning algorithm with a small sample complexity. Indeed, if the learning algorithm obtains more than n1+µ examples, then it will see most of ψ’s clauses, and therefore it might succeed in “learning” even when the source of the formula is random. Therefore, we will declare “exceptional” even when the source is random. Proof. (of theorem 3.1) Assume by way of contradiction that the µ-R3SAT hardness assumption is true and yet there exists an efficient learning algorithm that learns the class Hn,3 using O  n1+µ ϵ2  examples. Setting ϵ = 1 100, we conclude that there exists an efficient algorithm L and a constant κ > 0 such that given a sample S of more than κ · n1+µ examples drawn from a distribution D on Cn,3 × {±1}, returns a classifier L(S) : Cn,3 →{±1} such that • L(S) can be evaluated efficiently. • W.p. ≥3 4 over the choice of S, ErrD(L(S)) ≤ErrD(Hn,3) + 1 100. Fix ∆large enough such that ∆> 100κ and the conclusion of Theorem 3.2 holds with ϵ = 1 100. We will construct an algorithm, A, contradicting Theorem 3.2. On input φ ∈3MAJn,∆n1+µ consisting of the 3MAJ clauses C1, . . . , C∆n1+µ, the algorithm A proceeds as follows 1. Generate a sample S consisting of ∆n1+µ examples as follows. For every clause, Ck = MAJ((−1)j1xi1, (−1)j2xi2, (−1)j3xi3), generate an example (xk, yk) ∈Cn,3 × {±1} by choosing b ∈{±1} at random and letting (xk, yk) = b · 3 X l=1 (−1)jleil, 1 ! ∈Cn,3 × {±1} . For example, if n = 6, the clause is MAJ(−x2, x3, x6) and b = −1, we generate the example ((0, 1, −1, 0, 0, −1), −1) 2. Choose a sample S1 consisting of ∆n1+µ 100 ≥κ · n1+µ examples by choosing at random (with repetitions) examples from S. 3. Let h = L(S1). If ErrS(h) ≤3 8, return “exceptional”. Otherwise, return “typical”. We claim that A contradicts Theorem 3.2. Clearly, A runs in polynomial time. It remains to show that • If Val(φ) ≥3 4 − 1 100, then Pr Rand. coins of A (A(φ) = “exceptional”) ≥3 4 • For every n, Pr Rand. coins of A, φ∼Uni(3MAJn,∆n1+µ) (A(φ) = “typical”) ≥1 −o(1) Assume first that φ ∈3MAJn,∆n1+µ is chosen at random. Given the sample S1, the sample S2 := S \ S1 is a sample of |S2| i.i.d. examples which are independent from the sample S1, and hence also from h = L(S1). Moreover, for every example (xk, yk) ∈S2, yk is a Bernoulli random variable with parameter 1 2 which is independent of xk. To see that, note that an example whose instance is xk can be generated by exactly two clauses – one corresponds to yk = 1, while the other corresponds to yk = −1 (e.g., the instance (1, −1, 0, 1) can be generated from the clause MAJ(x1, −x2, x4) and b = 1 or the clause MAJ(−x1, x2, −x4) and b = −1). Thus, given the instance xk, the probability that yk = 1 is 1 2, independent of xk. 7 It follows that ErrS2(h) is an average of at least 1 − 1 100  ∆n1+µ independent Bernoulli random variable. By Chernoff’s bound, with probability ≥1 −o(1), ErrS2(h) > 1 2 − 1 100. Thus, ErrS(h) ≥  1 − 1 100  ErrS2(h) ≥  1 − 1 100  · 1 2 − 1 100  > 3 8 And the algorithm will output “typical”. Assume now that Val(φ) ≥3 4 − 1 100 and let ψ ∈{±1}n be an assignment that indicates that. Let Ψ ∈Hn,3 be the hypothesis Ψ(x) = sign (⟨ψ, x⟩). It can be easily checked that Ψ(xk) = yk if and only if ψ satisfies Ck. Since Val(φ) ≥3 4 − 1 100, it follows that ErrS(Ψ) ≤1 4 + 1 100 . Thus, ErrS(Hn,3) ≤1 4 + 1 100 . By the choice of L, with probability ≥1 −1 4 = 3 4, ErrS(h) ≤1 4 + 1 100 + 1 100 < 3 8 and the algorithm will return “exceptional”. 4 Upper bounds for learning Hn,2 and Hn,3 The following theorem derives upper bounds for learning Hn,2 and Hn,3. Its proof relies on results from Hazan et al. [2012] about learning β-decomposable matrices, and due to the lack of space is given in the appendix. Theorem 4.1. • There exists an efficient algorithm that learns Hn,2 using O  n log3(n) ϵ2  examples • There exists an efficient algorithm that learns Hn,3 using O  n2 log3(n) ϵ2  examples 5 Discussion We formally established a computational-sample complexity tradeoff for the task of (agnostically and improperly) PAC learning of halfspaces over 3-sparse vectors. Our proof of the lower bound relies on a novel, non cryptographic, technique for establishing such tradeoffs. We also derive a new non-trivial upper bound for this task. Open questions. An obvious open question is to close the gap between the lower and upper bounds. We conjecture that Hn,3 can be learnt efficiently using a sample of ˜O  n1.5 ϵ2  examples. Also, we believe that our new proof technique can be used for establishing computational-sample complexity tradeoffs for other natural learning problems. Acknowledgements: Amit Daniely is a recipient of the Google Europe Fellowship in Learning Theory, and this research is supported in part by this Google Fellowship. Nati Linial is supported by grants from ISF, BSF and I-Core. Shai Shalev-Shwartz is supported by the Israeli Science Foundation grant number 590-10. References Benny Applebaum, Boaz Barak, and David Xiao. On basing lower-bounds for learning on worstcase assumptions. In Foundations of Computer Science, 2008. FOCS’08. IEEE 49th Annual IEEE Symposium on, pages 211–220. IEEE, 2008. 8 Quentin Berthet and Philippe Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In COLT, 2013. Nicolo Cesa-Bianchi, Alex Conconi, and Claudio Gentile. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50:2050–2057, 2001. Venkat Chandrasekaran and Michael I. Jordan. Computational and statistical tradeoffs via convex relaxation. Proceedings of the National Academy of Sciences, 2013. S. Decatur, O. Goldreich, and D. Ron. Computational sample complexity. SIAM Journal on Computing, 29, 1998. O. Dubios, R. Monasson, B. Selma, and R. Zecchina (Guest Editors). Phase Transitions in Combinatorial Problems. Theoretical Computer Science, Volume 265, Numbers 1-2, 2001. U. Feige. Relations between average case complexity and approximation complexity. In STOC, pages 534–543, 2002. Uriel Feige and Eran Ofek. Easily refutable subformulas of large random 3cnf formulas. Theory of Computing, 3(1):25–43, 2007. E. Hazan, S. Kale, and S. Shalev-Shwartz. Near-optimal algorithms for online matrix prediction. In COLT, 2012. P. Long. and R. Servedio. Low-weight halfspaces for sparse boolean vectors. In ITCS, 2013. R. Servedio. Computational sample complexity and attribute-efficient learning. J. of Comput. Syst. Sci., 60(1):161–178, 2000. Shai Shalev-Shwartz, Ohad Shamir, and Eran Tromer. Using more data to speed-up training time. In AISTATS, 2012. V.N. Vapnik. The Nature of Statistical Learning Theory. Springer, 1995. 9
2013
206
4,939
Top-Down Regularization of Deep Belief Networks Hanlin Goh∗, Nicolas Thome, Matthieu Cord Laboratoire d’Informatique de Paris 6 UPMC – Sorbonne Universit´es, Paris, France {Firstname.Lastname}@lip6.fr Joo-Hwee Lim† Institute for Infocomm Research A*STAR, Singapore joohwee@i2r.a-star.edu.sg Abstract Designing a principled and effective algorithm for learning deep architectures is a challenging problem. The current approach involves two training phases: a fully unsupervised learning followed by a strongly discriminative optimization. We suggest a deep learning strategy that bridges the gap between the two phases, resulting in a three-phase learning procedure. We propose to implement the scheme using a method to regularize deep belief networks with top-down information. The network is constructed from building blocks of restricted Boltzmann machines learned by combining bottom-up and top-down sampled signals. A global optimization procedure that merges samples from a forward bottom-up pass and a top-down pass is used. Experiments on the MNIST dataset show improvements over the existing algorithms for deep belief networks. Object recognition results on the Caltech-101 dataset also yield competitive results. 1 Introduction Deep architectures have strong representational power due to their hierarchical structures. They are capable of encoding highly varying functions and capture complex relationships and high-level abstractions among high-dimensional data [1]. Traditionally, the multilayer perceptron is used to optimize such hierarchical models based on a discriminative criterion that models P(y|x) using a error backpropagating gradient descent [2, 3]. However, when the architecture is deep, it is challenging to train the entire network through supervised learning due to the large number of parameters, the non-convex optimization problem and the dilution of the error signal through the layers. This optimization may even lead to worse performances as compared to shallower networks [4]. Recent developments in unsupervised feature learning and deep learning algorithms have made it possible to learn deep feature hierarchies. Deep learning, in its current form, typically involves two consecutive learning phases. The first phase greedily learns unsupervised modules layer-by-layer from the bottom-up [1, 5]. Some common criteria for unsupervised learning include the maximum likelihood that models P(x) [1] and the input reconstruction error of vector x [5–7]. This is subsequently followed by a supervised phase that fine-tunes the network using a supervised, usually discriminative algorithm, such as supervised error backpropagation. The unsupervised learning phase initializes the parameters without taking into account the ultimate task of interest, such as classification. The second phase assumes the entire burden of modifying the model to fit the task. In this work, we propose a gradual transition from the fully-unsupervised learning to the highlydiscriminative optimization. This is done by adding an intermediate training phase between the two existing deep learning phases, which enhances the unsupervised representation by incorporating top-down information. To realize this notion, we introduce a new global (non-greedy) optimization ∗Hanlin Goh is also with the Institute for Infocomm Research, A*STAR, Singapore and the Image and Pervasive Access Lab, CNRS UMI 2955, Singapore – France. †Joo-Hwee Lim is also with the Image and Pervasive Access Lab, CNRS UMI 2955, Singapore – France. 1 that regularizes the deep belief network (DBN) from the top-down. We retain the same gradient descent procedure of updating the parameters of the DBN as the unsupervised learning phase. The new regularization method and deep learning strategy are applied to handwritten digit recognition and dictionary learning for object recognition, with competitive empirical results. 2 Related Work 1 z! Latent layer! I input units! J latent units! x! Input layer! W! b c! Figure 1: Structure of the RBM. Restricted Boltzmann Machines. A restricted Boltzmann machine (RBM) [8] is a bipartite Markov random field with an input layer x ∈RI and a latent layer z ∈RJ (see Figure 1). The layers are connected by undirected weights W ∈RI×J. Each unit also receives input from a bias parameter bj or ci. The joint configuration of binary states {x, z} has an energy given by: E(x, z) = −z⊤Wx −b⊤z −c⊤x. (1) The probability assigned to x is given by: P(x) = 1 Z X z exp(−E(x, z)), Z = X x X z exp(−E(x, z)), (2) where Z is known as the partition function, which normalizes P(x) to a valid distribution. The units in a layer are conditionally independent with distributions given by logistic functions: P(z|x) = Y j P(zj|x), P(zj|x) = 1/(1 + exp(−w⊤ j x −bj)), (3) P(x|z) = Y i P(xi|z), P(xi|z) = 1/(1 + exp(−wiz −ci)). (4) This enables the model to be sampled via alternating Gibbs sampling between the two layers. To estimate the maximum likelihood of the data distribution P(x), the RBM is trained by taking the gradient of the log probability of the input data with respect to the parameters: ∂log P(x) ∂wij ≈⟨xizj⟩0 −⟨xizj⟩N , (5) where ⟨·⟩t denotes the expectation under the distribution at the t-th sampling of the Markov chain. The first term samples the data distribution at t = 0, while the second term approximates the equilibrium distribution at t = ∞using the contrastive divergence method [9] by using a small and finite number of sampling steps N to obtain a distribution of reconstructed states at t = N. RBMs have also been regularized to produce sparse representations [10, 11]. z! Latent layer! I input units! J latent units! x! Inputs! W! C output units! y! Classes! V! Concatenated! layer! Figure 2: A supervised RBM jointly models inputs and outputs. Biases are omitted for simplicity. Supervised Restricted Boltzmann Machines. To introduce class labels to the RBM, a one-hot coded output vector y ∈RC is defined, where yc = 1 iff c is the class index. Another set of weights V ∈RC×J connects y with z. The two vectors are concatenated to form a new input vector [x, y] for the RBM, which is linked to z through [W⊤, V⊤], as shown in Figure 2. This supervised RBM models the joint distribution P(x, y). The energy function of this model can be extended to E(x, y, z) = −z⊤Wx −z⊤Vy −b⊤z −c⊤x −d⊤y (6) The conditional distribution of the concatenated vector is now: P(x, y|z) = P(x|z)P(y|z) = Y i P(xi|z) Y c P(yc|z), (7) where P(xi|z) is given in Equation 4 and the outputs yc may either be logistic units or the softmax units. The RBM may again be trained using contrastive divergence algorithm [9] to approximate the maximum likelihood of joint distribution. 2 During inference, only x is given and y is set at a neutral value, which makes this part of the RBM ‘noisy’. The objective is to use x to ‘denoise’ y and obtain the prediction. This can be done by several iterations of alternating Gibbs sampling. If the number of classes is huge, the number of input units need to be huge to maintain a high signal to noise ratio. Larochelle and Bengio [12] suggested to couple this generative model P(x, y) with a discriminative model P(y|x), which can help alleviate this issue. However, if the objective is to train a deep network, then with ever new layer, the previous V has to be discarded and retrained. It may also not be desirable to use a discriminative criterion directly from the outputs, especially in the initial layers of the network. Deep Belief Networks. Deep belief networks (DBN) [1] are probabilistic graphical models made up of a hierarchy of stochastic latent variables. Being universal approximators [13], they have been applied to a variety of problems such as image and video recognition [1, 14], dimension reduction [15]. It follows a two-phase training strategy of unsupervised greedy pre-training followed by supervised fine-tuning. For unsupervised pre-training, a stack of RBMs is trained greedily from the bottom-up, with the latent activations of each layer used as the inputs for the next RBM. Each new layer RBM models the data distribution P(x), such that when higher-level layers are sufficiently large, the variational bound on the likelihood always improves [1]. A popular method for supervised fine-tuning backpropagates the error given by P(y|x) to update the network’s parameters. It has been shown to perform well when initialized by first learning a model of input data using unsupervised pre-training [15]. An alternative supervised method is a generative model that implements a supervised RBM (Figure 2) that models P(x, y) at the top layer. For training, the network employs the up-down backfitting algorithm [1]. The algorithm is initialized by untying the network’s recognition and generative weights. First, a stochastic bottom-up pass is performed and the generative weights are adjusted to be good at reconstructing the layer below. Next, a few iterations of alternating sampling using the respective conditional probabilities are done at the top-level supervised RBM between the concatenated vector and the latent layer. Using contrastive divergence the RBM is updated by fitting to its posterior distribution. Finally, a stochastic top-down pass adjusts bottom-up recognition weights to reconstruct the activations of the layer above. In this work, we extend the existing DBN training strategy by having an additional supervised training phase before the discriminative error backpropagation. A top-down regularization of the network’s parameters is proposed. The network is optimized globally so that the inputs gradually map to the output through the layers. We also retain the simple method of using gradient descent to update the weights of the RBMs and retain the same convention for generative RBM learning. 3 Top-Down RBM Regularization: The Building Block We regularize RBM learning with targets obtained by sampling from higher-level representations. Generic Cross-Entropy Regularization. The aim is to construct a top-down regularized building block for deep networks, instead of combining the optimization criteria directly [12], which is done for the supervised RBM model (Figure 2). To give control over individual elements in the latent vector, one way to manipulate the representations is to point-wise bias the activations for each latent variable j [11]. Given a training dataset Dtrain, a regularizer based on the cross-entropy loss can be defined to penalize the difference between the latent vector z and a target vector ˆz: LRBM+reg(Dtrain) = − |Dtrain| X k=1 log P(xk) −α |Dtrain| X k=1 J X j=1 log P(ˆzjk|zjk). (8) The update rule of the cross-entropy-regularized RBM can be modified to: ∆wij ∝⟨xisj⟩0 −⟨xizj⟩N , (9) where sj = (1 −λ) zj + λˆzj (10) is the merger of the latent and target activations used to update the parameters. Here, the influences of ˆzj and zj are regulated by parameter λ. If λ = 0 or when the activationes match (i.e. zj = ˆzj), then the parameter update is exactly that the original contrastive divergence learning algorithm. 3 Building Block. The same principle of regularizing the latent activations can be used to combine signals from the bottom-up and top-down. This forms the building block for optimizing a DBN with top-down regularization. The basic building block is a three-layer structure consisting of three consecutive layers: the previous zl−1 ∈RI, current zl ∈RJ and next zl+1 ∈RH layers. The layers are connected by two sets of weight parameters Wl−1 and Wl to the previous and next layers respectively. For the current layer zl, the bottom-up representations zl,l−1 are sampled from the previous layer zl−1 through weighted connections Wl−1 with: P(zl,l−1,j | zl−1; Wl−1) = 1/(1 + exp(−w⊤ l−1,jzl−1 −bl,j)), (11) where the two terms in the subscripts of a sampled representation zdest,src refer to the destination (dest) and source (src) layers respectively. Meanwhile, sampling from the next layer zl+1 via weights Wl drives the top-down representations zl,l+1: P(zl,l+1,j | zl+1; Wl) = 1/(1 + exp(−wl,jzl+1 −cl,j)). (12) The objective is to learn the RBM parameters Wl−1 that map from the previous layer zl−1 to the current latent layer zl,l−1, by maximizing the likelihood of the previous layer P(zl−1) while considering the top-down samples zl,l+1 from the next layer zl+1 as target representations. The loss function for a network with L layers can be broken down as: LDBN+topdown = L X l=2 Ll,RBM+topdown (13) where the cross-entropy regularization the loss function for the layer is Ll,RBM+topdown = − |Dtrain| X k=1 log P(zl−1,k) −α |Dtrain| X k=1 J X j=1 log P(zl,l+1,jk|zl,l−1,jk). (14) This results in the following gradient descent: ∆wl−1,ij = ε ⟨zl−1,l−2,isl,j⟩0 −⟨zl−1,l,izl,l−1,j⟩N  , (15) where sl,jk = (1 −λl) zl,l−1,jk | {z } Bottom-up +λl zl,l+1,jk | {z } Top-down , (16) is the merged representation from the bottom-up and top-down signals (see Figure 3), weighted by hyperparameter λl. The bias towards one source of signal can be adjusted by selecting an appropriate λl. Additionally, the alternating Gibbs sampling, necessary for the contrastive divergence updates, is performed from the unbiased bottom-up samples using Equation 11 and a symmetric decoder: P(zl−1,l,j = 1 | zl,l−1; Wl−1) = 1/(1 + exp(−wl−1,izl,l−1 −cl−1,j)). (17) Bottom-up! Top-down! Merged! zl,l−1 zl+1 zl−1 zl−1,l zl,l+1 zl,l−1 1-step CD! sl Wl−1 Wl Previous layer! Next layer! Intermediate layer! Figure 3: The basic building block learns a bottom-up latent representation regularized by topdown signals. Bottom-up zl,l−1 and top-down zl,l+1 latent activations are sampled from zl−1 and zl+1 respectively. They are merged to get the modified activations sl used for parameter updates. Reconstructions independently driven from the input signals form the Gibbs sampling Markov chain. 4 4 Globally-Optimized Deep Belief Networks Forward-Backward Learning Strategy. In the DBN, RBMs are stacked from the bottom-up in a greedy layer-wise manner, with each new layer modeling the posterior distribution of the previous layer. Similarly, regularized building blocks can also be used to construct the regularized DBN (Figure 4). The network, as illustrated in Figure 4(a), comprises of a total of L −1 RBMs. The network can be trained with a forward and backward strategy (Figure 4(b)). It integrates top-down regularization with contrastive divergence learning, which is given by alternating Gibbs sampling between the layers (Figure 4(c)). Input! Output! Layer 2! Layer 4! Layer 3! x z3,2 z4,5 z2,1 z2,3 z3,4 z4,3 y z5,4 z2,3 z3,4 z2,1 z3,2 z4,3 z1,2 s2 s3 s4 s5 z4,5 z5,4 (a) Top-down regularized deep belief network. x z3,2 z4,5 z2,1 z2,3 z3,4 Merged! z4,3 y z5,4 s2 s3 s4 s5 Forward pass! Backward pass! (b) Forward and backward passes for top-down regularization. x z3,2 z2,1 z4,3 z5,4 z2,3 z3,4 z2,1 z3,2 z4,3 z1,2 z4,5 z5,4 1-step CD! (c) Alternating Gibbs sampling chains for contrastive divergence learning. Figure 4: Constructing a top-down regularized deep belief network (DBN). All the restricted Boltzmann machines (RBM) that make up the network are concurrently optimized. (a) The building blocks are connected layer-wise. Both bottom-up and top-down activations are used for training the network. (b) Activations for the top-down regularization are obtained by sampling and merging the forward pass and the backward pass. (c) From the activations of the forward pass, the reconstructions can be obtained by performing alternating Gibbs sampling with the previous layer. In the forward pass, given the input features, each layer zl is sampled from the bottom-up, based on the representation of the previous layer zl−1 (Equation 11). The top-level vector zL is activated with the softmax function. Upon reaching the output layer, the backward pass begins. The activations zL are combined with the output labels y to produce sL given by sL,ck = (1 −λL)zL,L−1,ck + λLyck, (18) The merged activations sl (Equation 16), which besides being used for parameter updates, have a second role of activating the lower layer zl−1 from the top-down: P(zl−1,l,j | sl; Wl) = 1/1 + exp(−wl−1,jsl −cl−1,j). (19) This is repeated until the second layer is reached (l = 2) and s2 is computed. 5 Top-down sampling encourages the class-based invariance of the bottom-up representations. However, sampling from the top-down, with the output vector y as the only source will result in only one activation pattern per class. This is undesirable, especially for the bottom layers, which should have representations more heavily influenced by bottom-up data. By merging the top-down representations with the bottom-up ones, the representations will encode both instance-based variations and class-based variations. In the last layer, we typically set λL as 1, so that the final RBM given by WL−1 learns to map to the class labels y. Backward activation of zL−1,L is a class-based invariant representation obtained from y and used to regularize WL−2. All other backward activations from this point onwards are based on the merged representation from instance- and class-based representations. Three-Phase Learning Procedure. After greedy learning models P(x) and the top-down regularized forward-backward learning is executed. The eventual goal of the network is to be able to give a prediction of P(y|x). This suggest that the network can adopt a three-phase strategy for training, whereby the parameters learned in one phase initializes the next, as follows: • Phase 1 – Unsupervised Greedy. The network is constructed by greedily learning a new unsupervised RBM on top of the existing network. To enhance the representations, various regularizations, such as sparsity [10], can be applied. The stacking process is repeated for L −2 RBMs, until layer L −1 is added to the network. • Phase 2 – Supervised Regularized. This phase begins by connecting the L −1 to a final layer, which is activated by the softmax activation function for a classification problem. Using the one-hot coded output vector y ∈RC as its target activations and setting λL to 1, the RBM is learned as an associative memory with the following update: ∆wL−1,ic ∝⟨zL−1,L−2,i yc⟩0 −⟨zL−1,L,i zL,L−1,c⟩N. (20) This final RBM, together with the other RBMs learned from Phase 1, form the initialization for the top-down regularized forward-backward learning algorithm. This phase is used to fine-tune the network using generative learning, and binds the layers together by aligning all the parameters of the network with the outputs. • Phase 3 – Supervised Discriminative. Finally, the supervised error backpropagation algorithm is used to improve class discrimination in the representations. Backpropagation can also be described in two passes. In the forward pass, each layer is activated from the bottom-up to obtain the class predictions. The classification error is then computed based on the groundtruth and the backward pass performs gradient descent on the parameters by backpropagating the errors through the layers from the top-down. From Phase 1 to Phase 2, the form of the parameter update rule based on gradient descent does not change. Only that top-down signals are also taken into account. Essentially, the two phases are performing a variant of the contrastive divergence algorithm. Meanwhile, from Phase 2 to Phase 3, the inputs to the phases (x and y) do not change, while the optimization function is modified from performing regularization to being completely discriminative. 5 Empirical Evaluation In this work, the proposed deep learning strategy and top-down regularization method were evaluated and analyzed using the MNIST handwritten digit dataset [16] and the Caltech-101 object recognition dataset [17]. 5.1 MNIST Handwritten Digit Recognition The MNIST dataset contains images of handwritten digits. The task is to recognize a digit from 0 to 9 given a 28 × 28 pixel image. The dataset is split into 60, 000 images used for training and 10, 000 test images. Many different methods have used this dataset to perform evaluation on classification performances, specifically the DBNN [1]. The basic version of this dataset, with neither preprocessing nor enhancements, was used for the evaluation. A five-layer DBN was setup to have the same topography as evaluated in [1]. The number of units in each layer, from the first to the last layer, were 784, 500, 500, 2000 and 10, in that order. Five architectural setups were tested: 6 1. Stacked RBMs with up-down learning (original DBN reported in [1]), 2. Stacked RBMs with forward-backward learning and backpropagation, 3. Stacked sparse RBMs [11] with forward-backward learning and backpropagation, and 4. Stacked sparse RBMs [11] with backpropagation, and 5. Forward-backward learning from random weights. In the phases 1 and 2, we followed the evaluation procedure of Hinton et al. [1] by initially using 44, 000 training and 10, 000 validation images to train the network before retraining it with the full training set. In phase 3, sets of 50, 000 and 10, 000 images were used as the initial training and validation sets. After model selection, the network was retrained on the training set of 60, 000 images. To simplify the parameterization for the forward-backward learning in phase 2, the top-down modulation parameter λl across the layers were controlled by a single parameter γ using the function: λl = |l −1|γ/(|l −1|γ −|L −l|γ). (21) where γ > 0. The top-down influence for a layer l is also dependent on its relative position in the network. The function assigns λl such that the layers nearer to the input will have stronger influences from the input, while the layers near the output will be biased towards the output. This distancebased modulation of their influences enables a gradual mapping between the input and output layers. Our best performance was obtained using setting 3, which got an error rate of 0.91% on the test set. Figure 5 shows the 91 wrongly classified test examples for this setting. When initialized with the conventional RBMs but fine-tuned with forward-backward learning and error backpropagation, the score was 0.98%. As a comparison, the conventional DBN obtained an error rate of 1.25%. Directly optimizing the network from random weights produced an error of 1.61%, which is still fairly decent, considering that the network was optimized globally from scratch. For each setup, the intermediate results for each training phase are reported in Table 1. Overall, the results achieved are very competitive for methods with the same complexity that rely on neither convolution nor image distortions and normalization. A variant of the DBN, which focused on learning nonlinear transformations of the feature space for nearest neighbor classification [18], had an error rate of 1.0%. The deep convex net [19], which utilized more complex convex-optimized modules as building blocks but did not perform fine-tuning on a global network level, got a score of 0.83%. At the time of writing, the best performing model on the dataset gave an error rate of 0.23% and used a heavy architecture of a committee of 35 deep convolutional neural nets with elastic distortions and image normalization [20]. From Table 1, we can observe that each of the three learning phases helped to improve the overall performance of the networks. The forward-backward algorithm outperforms the up-down learning of the original DBN. Using sparse RBMs [11] and backpropagation, it was possible to further improve the recognition performances. The forward-backward learning was effective as a bridge between the other two phases, with an improvement of 0.17% over the setup without phase 2. The method was even as a standalone algorithm, demonstrating its potential by learning from randomly initialized weights. Table 1: Results on MNIST after various phases of the training process. Setup / Learning algorithm* Classification error rate Phase 1 Phase 2 Phase 1 Phase 2 Phase 3 Deep belief network (reported in [1]) 1. RBMs Up-down 2.49% 1.25% – Proposed top-down regularized deep belief network 2. RBMs Forward-backward 2.49% 1.14% 0.98% 3. Sparse RBMs Forward-backward 2.14% 1.06% 0.91% 4. Sparse RBMs – 2.14% – 1.08% 5. Random weights Forward-backward – 1.61% – *Phase 3 runs the error backpropagation algorithm whenever employed. 7 Figure 5: The 91 wrongly classified test examples from the MNIST dataset. 5.2 Caltech-101 Object Recognition The Caltech-101 dataset [17] is one of the most popular datasets for object recognition evaluation. It contains 9, 144 images belonging to 101 object categories and one background class. The images were first resized while retaining their original aspect ratios, such that the longer spatial dimension was at most 300 pixels. SIFT descriptors [21] were extracted from densely sampled patches of 16 × 16 at 4 pixel intervals. The SIFT descriptors were ℓ1-normalized by constraining each descriptor vector to sum to a maximum of one, resulting in a quasi-binary feature. Additionally, SIFT descriptors from a spatial neighborhood of 2 × 2 were concatenated to form a macrofeature [22]. A DBN setup was used to learn a dictionary to map local macrofeatures to a mid-level representation. Two layers of RBMs were stacked to model the macrofeatures. Both RBMs were regularized with population and lifetime sparseness during training [23]. First a single RBM, which had 1024 latent variables, was trained from macrofeature. A set of 200, 000 randomly selected macrofeatures was used for training this first layer. The resulting representations of the first RBM were then concatenated within each spatial neighborhood of 2 × 2. The second RBM modeled this spatially aggregated representation into a higher-level representation. Another set of 200, 000 randomly selected spatially aggregated representations was used for training this RBM. The higher-level RBM representation was associated to the image label. For each experimental trial, a set of 30 training examples per class (totaling to 3060) was randomly selected for supervised learning. The forward-backward learning algorithm was used to regularize the learning while finetuning the network. Finally, error backpropagation was performed to further optimize the dictionary. From these representations, max-pooling within spatial regions defined by a spatial pyramid was employed [22, 24] to obtain a single vector representing the whole image. It is also possible to employ more advanced pooling schemes [25]. A linear SVM classifier was then trained, using the same train-test split from the previous supervised learning phase. Table 2: Classification accuracy on Caltech-101. Method / Training phase Accuracy Proposed top-down regularized DBN Phase 1: Unsupervised stacking 72.8% Phase 2: Top-down regularization 78.2% Phase 3: Error backpropagation 79.7% Sparse coding & max-pooling [22] 73.4% Extended HMAX [26] 76.3% Convolutional RBM [27] 77.8% Unsupervised & supervised RBM [23] 78.9% Gated Convolutional RBM [28] 78.9% Table 2 shows the average class-wise classification accuracy, averaged across 102 classes and 10 experimental trials. The results demonstrate a consistent improvement moving from Phase 1 to phase 3. The final accuracy obtained was 79.7%. This outperforms all existing dictionary learning methods based on a single image descriptors, with a 0.8% improvement over the previous state-of-the-art results [23, 28]. As a comparison, other existing reported dictionary learning methods that encode SIFT-based local descriptors are also included in Table 2. 6 Conclusion We proposed the notion of deep learning by gradually transitioning from being fully unsupervised to strongly discriminative. This is achieved through the introduction of an intermediate phase between the unsupervised and supervised learning phases. This notion is implemented by incorporating top-down information to DBNs through regularization. The method is easily integrated into the intermediate learning phase based on simple building blocks. It can be performed to complement greedy layer-wise unsupervised learning and discriminative optimization using error backpropagation. Empirical evaluation show that the method leads to competitive results for handwritten digit recognition and object recognition datasets. 8 References [1] G. E. Hinton, S. Osindero, and Y.-W. Teh, “A fast learning algorithm for deep belief networks,” Neural Computation, vol. 18, no. 7, pp. 1527–1554, 2006. [2] Y. LeCun, “Une proc´edure d’apprentissage pour r´eseau a seuil asymmetrique (a learning scheme for asymmetric threshold networks),” in Cognitiva 85, 1985. [3] D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning representations by back-propagating errors,” Nature, vol. 323, pp. 533 – 536, October 1986. [4] Y. Bengio, “Learning deep architectures for AI,” Foundations and Trends in Machine Learning, vol. 2, no. 1, pp. 1–127, 2009. [5] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle, “Greedy layer-wise training of deep networks,” in NIPS, 2006. [6] M. Ranzato, C. Poultney, S. Chopra, and Y. LeCun, “Efficient learning of sparse representations with an energy-based model,” in NIPS, 2006. [7] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol, “Extracting and composing robust features with denoising autoencoders,” in ICML, 2008. [8] P. Smolensky, “Information processing in dynamical systems: Foundations of harmony theory,” in Parallel Distributed Processing: Volume 1: Foundations, ch. 6, pp. 194–281, MIT Press, 1986. [9] G. E. Hinton, “Training products of experts by minimizing contrastive divergence,” Neural Computation, vol. 14, no. 8, p. 1771–1800, 2002. [10] H. Lee, C. Ekanadham, and A. Ng, “Sparse deep belief net model for visual area V2,” in NIPS, 2008. [11] H. Goh, N. Thome, and M. Cord, “Biasing restricted Boltzmann machines to manipulate latent selectivity and sparsity,” in NIPS Workshop, 2010. [12] H. Larochelle and Y. Bengio, “Classification using discriminative restricted Boltzmann machines,” in ICML, 2008. [13] N. Le Roux and Y. Bengio, “Representational power of restricted Boltzmann machines and deep belief networks,” Neural Computation, vol. 20, pp. 1631–1649, June 2008. [14] I. Sutskever and G. E. Hinton, “Learning multilevel distributed representations for high-dimensional sequences,” in AISTATS, 2007. [15] G. E. Hinton and R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” Science, vol. 28, pp. 504–507, 2006. [16] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, pp. 2278–2324, November 1998. [17] L. Fei-Fei, R. Fergus, and P. Perona, “Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories,” CVPR Workshop, 2004. [18] R. Salakhutdinov and G. E. Hinton, “Learning a nonlinear embedding by preserving class neighbourhood structure,” in AISTATS, 2007. [19] L. Deng and D. Yu, “Deep convex net: A scalable architecture for speech pattern classification,” in Interspeech, 2011. [20] D. C. Cires¸an, U. Meier, and J. Schmidhuber, “Multi-column deep neural networks for image classification,” in CVPR, 2012. [21] D. Lowe, “Object recognition from local scale-invariant features,” in CVPR, 1999. [22] Y. Boureau, F. Bach, Y. LeCun, and J. Ponce, “Learning mid-level features for recognition,” in CVPR, 2010. [23] H. Goh, N. Thome, M. Cord, and J.-H. Lim, “Unsupervised and supervised visual codes with restricted Boltzmann machines,” in ECCV, 2012. [24] S. Lazebnik, C. Schmid, and J. Ponce, “Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories,” in CVPR, 2006. [25] S. Avila, N. Thome, M. Cord, E. Valle, and A. Ara´ujo, “Pooling in image representation: the visual codeword point of view,” Computer Vision and Image Understanding, pp. 453–465, May 2013. [26] C. Theriault, N. Thome, and M. Cord, “Extended coding and pooling in the HMAX model,” IEEE Transaction on Image Processing, 2013. [27] K. Sohn, D. Y. Jung, H. Lee, and A. Hero III, “Efficient learning of sparse, distributed, convolutional feature representations for object recognition,” in ICCV, 2011. [28] K. Sohn, G. Zhou, C. Lee, and H. Lee, “Learning and selecting features jointly with point-wise gated boltzmann machines,” in ICML, 2013. 9
2013
207
4,940
Polar Operators for Structured Sparse Estimation Xinhua Zhang Machine Learning Research Group National ICT Australia and ANU xinhua.zhang@anu.edu.au Yaoliang Yu and Dale Schuurmans Department of Computing Science, University of Alberta Edmonton, Alberta T6G 2E8, Canada {yaoliang,dale}@cs.ualberta.ca Abstract Structured sparse estimation has become an important technique in many areas of data analysis. Unfortunately, these estimators normally create computational difficulties that entail sophisticated algorithms. Our first contribution is to uncover a rich class of structured sparse regularizers whose polar operator can be evaluated efficiently. With such an operator, a simple conditional gradient method can then be developed that, when combined with smoothing and local optimization, significantly reduces training time vs. the state of the art. We also demonstrate a new reduction of polar to proximal maps that enables more efficient latent fused lasso. 1 Introduction Sparsity is an important concept in high-dimensional statistics [1] and signal processing [2] that has led to important application successes by reducing model complexity and improving interpretability of the results. Standard computational strategies such as greedy feature selection [3] and generic convex optimization [4–7] can be used to implement simple sparse estimators. However, sophisticated notions of structured sparsity have been recently developed that can encode combinatorial patterns over variable subsets [8]. Although combinatorial structure greatly enhances modeling capability, it also creates computational challenges that require sophisticated optimization approaches. For example, current structured sparse estimators often adopt an accelerated proximal gradient (APG) strategy [9, 10], which has a low per-step complexity and enjoys an optimal convergence rate among black-box first-order procedures [10]. Unfortunately, APG must also compute a proximal update (PU) of the nonsmooth regularizer during each iteration. Not only does the PU require a highly nontrivial computation for structured regularizers [4]—e.g., requiring tailored network flow algorithms in existing cases [5, 11, 12]—it yields dense intermediate iterates. Recently, [6] has demonstrated a class of regularizers where the corresponding PUs can be computed by a sequence of submodular function minimizations, but such an approach remains expensive. Instead, in this paper, we demonstrate that an alternative approach can be more effective for many structured regularizers. We base our development on the generalized conditional gradient (GCG) algorithm [13, 14], which also demonstrates promise for sparse model optimization. Although GCG possesses a slower convergence rate than APG, it demonstrates competitive performance if its updates are interleaved with local optimization [14–16]. Moreover, GCG produces sparse intermediate iterates, which allows additional sparsity control. Importantly, unlike APG, GCG requires computing the polar of the regularizer, instead of the PU, in each step. This difference allows important new approaches for characterizing and evaluating structured sparse regularizers. Our first main contribution is to characterize a rich class of structured sparse regularizers that allow efficient computation of their polar operator. In particular, motivated by [6], we consider a family of structured sparse regularizers induced by a cost function on variable subsets. By introducing a “lifting” construction, we show how these regularizers can be expressed as linear functions, which after some reformulation, allows efficient evaluation by a simple linear program (LP). Important examples covered include overlapping group lasso [5] and path regularization in directed acyclic graphs [12]. By exploiting additional structure in these cases, the LP can be reduced to a piecewise 1 linear objective over a simple domain, allowing further reduction in computation time via smoothing [17]. For example, for the overlapping group lasso with n groups where each variable belongs to at most r groups, the cost of evaluating the polar operator can be reduced from O(rn3) to O(rn√n/ϵ) for a desired accuracy of ϵ. Encouraged by the superior performance of GCG in these cases, we then provide a simple reduction of the polar operator to the PU. This reduction makes it possible to extend GCG to cases where the PU is easy to compute. To illustrate the usefulness of this reduction we provide an efficient new algorithm for solving the fused latent lasso [18]. 2 Structured Sparse Models Consider the standard regularized risk minimization framework min w∈Rn f(w) + λ Ω(w), (1) where f is the empirical risk, assumed to be convex with a Lipschitz continuous gradient, and Ωis a convex, positively homogeneous regularizer, i.e. a gauge [19, §4]. Let 2[n] denote the power set of [n] := {1, . . . , n}, and let R+ := R+ ∪{∞}. Recently, [6] has established a principled method for deriving regularizers from a subset cost function F : 2[n] →R+ based on defining the gauge: ΩF (w)= inf{γ ≥0: w∈γ conv(SF )}, where SF =  wA : ∥wA∥p ˜p = 1/F(A), ∅̸=A ⊆[n] . (2) Here γ is a scalar, conv(SF ) denotes the convex hull of the set SF , ˜p, p ≥1 with 1 ˜p + 1 p = 1, ∥· ∥p throughout is the usual ℓp-norm, and wA denotes a duplicate of w with all coordinates not in A set to 0. Note that we have tacitly assumed F(A) = 0 iff A = ∅in (2). The gauge ΩF defined in (2) is also known as the atomic norm with the set of atoms SF [20]. It will be useful to recall that the polar of a gauge Ωis defined by [19, §15]: Ω◦(g) := supw{⟨g, w⟩: Ω(w) ≤1}. (3) In particular, the polar of a norm is its dual norm. (Recall that any norm is also a gauge.) For the specific gauge ΩF defined in (2), its polar is simply the support function of SF [19, Theorem 13.2]: Ω◦ F (g) = max w∈SF ⟨g, w⟩= max ∅̸=A⊆[n] ∥gA∥p /[F(A)]1/p. (4) (The first equality uses the definition of support function, and the second follows from (2).) By varying ˜p and F, one can generate a class of sparsity inducing regularizers that includes most current proposals [6]. For instance, if F(A) = 1 whenever |A| (the cardinality of A) is 1, and F(A) = ∞ for |A| > 1, then Ω◦ F is the ℓ∞norm and ΩF is the usual ℓ1 norm. More importantly, one can encode structural information through the cost function F, which selects and establishes preferences over the set of atoms SF . As pointed out in [6], when F is submodular, (4) can be evaluated by a secant method with submodular minimizations ([21, §8.4], see also Appendix B). However, as we will show, it is possible to do significantly better by completely avoiding submodular optimization. Before presenting our main results, we first review the state of the art for solving (1), and demonstrate how the performance of current methods can hinge on efficient computation of (4). 2.1 Optimization Algorithms A standard approach for minimizing (1) is the accelerated proximal gradient (APG) algorithm [9, 10], where each iteration involves solving the proximal update (PU): wk+1 = arg minw ⟨dk, w⟩+ 1 2sk ∥w −wk∥2 2 + λΩF (w), for some step size sk and descent direction dk. Although it can be shown that APG finds an ϵ accurate solution in O(1/√ϵ) iterations [9, 10], each update can be quite difficult to compute when ΩF encodes combinatorial structure, as noted in the introduction. An alternative approach to solving (1) is the generalized conditional gradient (GCG) method [13, 14], which has recently received renewed attention. Unlike APG, GCG only requires the polar operator of the regularizer ΩF to be computed in each iteration, given by the argument of (4): P◦ F (g) = arg max w∈SF ⟨g, w⟩= F(C) −1 p arg max w:∥w∥˜ p=1 ⟨gC, w⟩for C = arg max ∅̸=A⊆[n] ∥gA∥p p /F(A). (5) Algorithm 1 outlines a GCG procedure for solving (1) that only requires the evaluation of P◦ F in each iteration without needing the full PU to be computed. The algorithm is quite simple: Line 3 2 Algorithm 1 Generalized conditional gradient (GCG) for optimizing (1). 1: Initialize w0 ←0, s0 ←0, ℓ0 ←0. 2: for k = 0, 1, . . . do 3: Polar operator: vk ←P◦ F (gk), Ak ←C(gk), where gk =−∇f(wk) and C is defined in (5). 4: 2-D Conic search: (α, β) := arg minα≥0,β≥0 f(αwk + βvk) + λ(αsk + β). 5: Local re-optimization: {ui}k 1 := arg min{ui=ui Ai} f(P i ui) + λ P i F(Ai) 1 p ∥ui∥˜p where the {ui} are initialized by ui = αℓi for i < k and ui = βvi for i = k. 6: wk+1 ←P i ui, ℓi ←ui for i ≤k, sk+1 ←P i F(Ai) 1 p ∥ui∥˜p. 7: end for evaluates the polar operator, which provides a descent direction vk; Line 4 finds the optimal step sizes for combining the current iterate wk with the direction vk; and Line 5 locally improves the objective (1) by maintaining the same support patterns but re-optimizing the parameters. It has been shown that GCG can find an ϵ accurate solution to (1) in O(1/ϵ) steps, provided only that the polar (5) is computed to ϵ accuracy [14]. Although GCG has a slower theoretical convergence rate than APG, the introduction of local optimization (Line 5) often yields faster convergence in practice [14– 16]. Importantly, Line 5 does not increase the sparsity of the intermediate iterates. Our main goal in this paper therefore is to extend this GCG approach to structured sparse models by developing efficient algorithms for computing the polar operator for the structured regularizers defined in (2). 3 Polar Operators for Atomic Norms Let 1 denote the vector of all 1s with length determined by context. Our first main contribution is to develop a general class of atomic norm regularizers whose polar operator (5) can be computed efficiently. To begin, consider the case of a (partially) linear function F where there exists a c ∈ Rn such that F(A) = ⟨c, 1A⟩for all A ∈dom F (note that the domain need not be a lattice). A few useful regularizers can be generated by linear functions: for example, the ℓ1 norm can be derived from F(A) = ⟨1, 1A⟩for |A| = 1, which is linear. Unfortunately, linearity is too restrictive to capture most structured regularizers of interest, therefore we will need to expand the space of functions F we consider. To do so, we introduce the more general class of marginalized linear functions: we say that F is marginalized linear if there exists a nonnegative linear function M on an extended domain 2[n+l] such that its marginalization to 2[n] is exactly F: F(A) = min B:A⊆B⊆[n+l] M(B), ∀A ⊆[n]. (6) Essentially, such a function F is “lifted” to a larger domain where it becomes linear. The key question is whether the polar Ω◦ F can be efficiently evaluated for such functions. To develop an efficient procedure for computing the polar Ω◦ F , first consider the simpler case of computing the polar Ω◦ M for a nonnegative linear function M. Note that by linearity the function M can be expressed as M(B) = ⟨b, 1B⟩for B ∈dom M ⊆2[n+l] (b ∈Rn+l + ). Since the effective domain of M need not be the whole space in general, we make use of the specialized polytope: P := conv{1B : B ∈dom M} ⊆[0, 1]n+l. (7) Note P may have exponentially many faces. From the definition (4) one can then re-express the polar Ω◦ M as: Ω◦ M(g) = max ∅̸=B∈dom M ∥gB∥p /M(B)1/p =  max 0̸=w∈P ⟨˜g, w⟩ ⟨b, w⟩ 1/p where ˜gi = |gi|p ∀i, (8) where we have used the fact that the linear-fractional objective must attain its maximum at vertices of P; that is, at 1B for some B ∈dom M. Although the linear-fractional program (8) can be reduced to a sequence of LPs using the classical method of [22], a single LP suffices for our purposes. Indeed, let us first remove the constraint w ̸= 0 by considering the alternative polytope: Q := P ∩{w ∈Rn+l : ⟨1, w⟩≥1}. (9) As shown in Appendix A, all vertices of Q are scalar multiples of the nonzero vertices of P. Since the objective in (8) is scale invariant, we can restrict the constraints to w ∈Q. Then, by applying transformations ˜w = w/ ⟨b, w⟩, σ = 1/ ⟨b, w⟩, problem (8) can be equivalently re-expressed by: max ˜w,σ>0 ⟨˜g, ˜w⟩, subject to ˜w ∈σQ, ⟨b, ˜w⟩= 1. (10) 3 Of course, whether this LP can be solved efficiently depends on the structure of Q (and of P indeed). Finally, we note that the same formulation allows the polar to be efficiently computed for a marginalized linear function F via a simple reduction: Consider any g ∈Rn and let [g; 0] ∈Rn+l denote g padded by l zeros. Then Ω◦ F (g) = Ω◦ M([g; 0]) for all g ∈Rn because max ∅̸=A⊆[n] ∥gA∥p p F(A) = max ∅̸=A⊆[n] ∥gA∥p p minB:A⊆B⊆[n+l] M(B) = max ∅̸=A⊆B ∥gA∥p p M(B) = max B:∅̸=B⊆[n+l] ∥[g; 0]B∥p p M(B) . (11) To see the last equality, fixing B the optimal A is attained at A = B ∩[n]. If B ∩[n] is empty, then ∥[g; 0]B∥= 0 and the corresponding B cannot be the maximizer of the last term, unless Ω◦ F (g) = 0 in which case it is easy to see Ω◦ M([g; 0]) = 0. Although we have kept our development general so far, the idea is clear: once an appropriate “lifting” has been found so that the polytope Q in (9) can be compactly represented, the polar (5) can be reformulated as the LP (10), for which efficient implementations can be sought. We now demonstrate this new methodology for the two important structured regularizers: group sparsity and path coding. 3.1 Group Sparsity For a general formulation of group sparsity, let G ⊆2[n] be a set of variable groups (subsets) that possibly overlap [3, 6, 7]. Here we use i ∈[n] to index variables and G ∈G to index groups. Consider the cost function over variable groups Fg : 2[n] →R+ defined by: Fg(A) = X G∈G cG I(A ∩G ̸= ∅), (12) where cG is a nonnegative cost and I is an indicator such that I(·) = 1 if its argument is true, and 0 otherwise. The value Fg(A) provides a weighted count of how many groups overlap with A. Unfortunately, Fg is not linear, so we need to re-express it to recover an efficient polar operator. To do so, augment the domain by adding l = |G| variables such that each new variable G corresponds to a group G. Then define a weight vector b ∈Rn+l + such that bi = 0 for i ≤n and bG = cG for n < G ≤n + l. Finally, consider the linear cost function Mg : 2[n+l] →R+ defined by: Mg(B) = ⟨b, 1B⟩if i ∈B ⇒G ∈B, ∀i ∈G ∈G; Mg(B) = ∞otherwise. (13) The constraint ensures that if a variable i ≤n appears in the set B, then every variable G corresponding to a group G that contains i must also appear in B. By construction, Mg is a nonnegative linear function. It is also easy to verify that Fg satisfies (6) with respect to Mg. To compute the corresponding polar, observe that the effective domain of Mg is a lattice, hence (4) can be solved by combinatorial methods. However, we can do better by exploiting problem structure in the LP. For example, observe that the polytope (7) can now be compactly represented as: Pg = {w ∈Rn+l : 0 ≤w ≤1, wi ≤wG, ∀i ∈G ∈G}. (14) Indeed, it is easy to verify that the integral vectors in Pg are precisely {1B : B ∈dom Mg}. Moreover, the linear constraint in (14) is totally unimodular (TUM) since it is the incidence matrix of a bipartite graph (variables and groups), hence Pg is the convex hull of its integral vectors [23]. Using the fact that the scalar σ in (10) admits a closed form solution σ = ⟨1, ˜w⟩in this case, the LP (10) can be reduced to: max ˜w X i∈[n] ˜gi min G:i∈G∈G ˜wG, subject to ˜w ≥0, X G∈G bG ˜wG = 1. (15) Note only { ˜wG} appear in the problem as implicitly ˜wi = minG:i∈G ˜wG, ∀i ∈[n]. This is now just a piecewise linear objective over a (reweighted) simplex. Since projecting to a simplex can be performed in linear time, the smoothing method of [17] can be used to obtain a very efficient implementation. We illustrate a particular case where each variable i ∈[n] belongs to at most r > 1 groups. (Appendix D considers when the groups form a directed acyclic graph.) Proposition 1 Let h( ˜w) denote the negated objective of (15). Then for any ϵ > 0, hϵ( ˜w) := ϵ n log r P i∈[n] log P G:i∈G r−n˜gi ˜ wG/ϵ satisfies: (i) the gradient of hϵ is n ϵ ∥˜g∥2 ∞log r  -Lipschitz, (ii) h( ˜w) −hϵ( ˜w) ∈(−ϵ, 0] for all ˜w, and (iii) the gradient of hϵ can be computed in O(nr) time. 4 (The proof is given in Appendix C.) With this construction, APG can be run on hϵ to achieve a 2ϵ accurate solution to (15) within O( 1 ϵ √n log r) steps [17], using a total time cost of O( nr ϵ √n log r). Note that this is significantly cheaper than the O(n2(l + n)r) worst case complexity of [11, Algorithm 2]. More importantly, we gain explicit control of the trade-off between accuracy ϵ and computational cost. A detailed comparison to related approaches is given in Appendix B.1 and E. 3.2 Path Coding Another interesting regularizer, recently investigated by [12], is determined by path costs in a directed acyclic graph (DAG) defined over the set of variables i ∈[n]. For convenience, we add two nodes, a source s and a sink t, with dummy edges (s, i) and (i, t) for all i ∈[n]. An (s, t)-path (or simply path) is then given by a sequence (s, i1), (i1, i2), . . . , (ik−1, ik), (ik, t) with k ≥1. A nonnegative cost is associated with each edge including (s, i) and (i, t), so the cost of a path is the sum of its edge costs. A regularizer can then be defined by (2) applied to the cost function Fp : 2[n] →R+ Fp(A) = cost of the path if the nodes in A form an (s, t)-path (unique for DAG) ∞ if such a path does not exist . (16) Note Fp is not submodular. Although Fp is not linear, a similar “lifting” construction can be used to show that it is marginalized linear, hence it supports efficient computation of the polar. To explain the construction, let V := [n] ∪{s, t} be the node set including s and t, E be the edge set including (s, i) and (i, t), T = V ∪E, and let b ∈R|T | + be the concatenation of zeros for node costs and the given edge costs. Let m := |E| be the number of edges. It is then easy to verify that Fp satisfies (6) with respect to the linear cost function Mp : 2T →R+ defined by: Mp(B) = ⟨b, 1B⟩if B represents a path; ∞otherwise. (17) To efficiently compute the resulting polar, we consider the form (8) using ˜gi = |gi|p ∀i as before: Ω◦ Mp(g) = max 0̸=w∈[0,1]|T | ⟨˜g, w⟩ ⟨b, w⟩, s.t. wi = X j:(i,j)∈E wij = X k:(k,i)∈E wki, ∀i ∈[n]. (18) Here the constraints form the well-known flow polytope whose vertices are exactly all the paths in a DAG. Similar to (15), the normalized LP (10) can be simplified by solving for the scalar σ to obtain: max ˜w≥0 X i∈[n] ˜gi X j:(i,j)∈E ˜wij + X k:(k,i)∈E ˜wki ! , s.t. ⟨b, ˜w⟩= 1, X j:(i,j)∈E ˜wij = X k:(k,i)∈E ˜wki, ∀i ∈[n]. (19) Due to the extra constraints, the LP (19) is more complicated than (15) obtained for group sparsity. Nevertheless, after some reformulation (essentially dualization), (19) can still be converted to a simple piecewise linear objective, hence it is amenable to smoothing; see Appendix F for details. To find a 2ϵ accurate solution, the cutting plane method takes O( mn ϵ2 ) computations to optimize the nonsmooth piecewise linear objective, while APG needs O( 1 ϵ √n) steps to optimize the smoothed objective, using a total time cost of O( m ϵ √n). This too is faster than the O(nm) worst case complexity of [12, Appendix D.5] in the regime where n is large and the desired accuracy ϵ is moderate. 4 Generalizing Beyond Atomic Norms Although we find the above approach to be effective, many useful regularizers are not expressed in form of an atomic norm (2), which makes evaluation of the polar a challenge and thus creates difficulty in applying Algorithm 1. For example, another important class of structured sparse regularizers is given by an alternative, composite gauge construction: Ωs(w) = X i κi(w), where κi is a closed gauge that can be different for different i. (20) The polar for such a regularizer is given by Ω◦ s(g) = inf{maxi κ◦ i (wi) : P i wi = g}, where each wi is an independent vector and κ◦ i corresponds to the polar of κi (proof given in Appendix H). Unfortunately, a polar in this form does not appear to be easy to compute. However, for some regularizers in the form (20) the following proximal objective can indeed be computed efficiently: ProxΩ(g) = minθ 1 2∥g −θ∥2 2 + Ω(θ), ArgProxΩ(g) = arg minθ 1 2∥g −θ∥2 2 + Ω(θ). (21) The key observation is that computing Ω◦can be efficiently reduced to just computing ProxΩ. Proposition 2 For any closed gauge Ω, its polar Ω◦can be equivalently expressed by: Ω◦(g) = inf{ ζ ≥0 : ProxζΩ(g) = 1 2∥g∥2 2 }. (22) 5 (The proof is included in Appendix I.) Since the left hand side of the inner constraint is decreasing in ζ, one can efficiently compute the polar Ω◦by a simple root finding search in ζ. Thus, regularizers in the form of (20) can still be accommodated in an efficient GCG method in the form of Algorithm 1. 4.1 Latent Fused Lasso To demonstrate the usefulness of this reduction we consider the recently proposed latent fused lasso model [18], where for given data X ∈Rm×n one seeks a dictionary matrix W ∈Rm×t and coefficient matrix U ∈Rt×n that allow X to be accurately reconstructed from a dictionary that has desired structure. In particular, for a reconstruction loss f, the problem is specified by: min W,U∈U f(WU, X) + Ωp(W), where Ωp(W) = X i  λ1 ∥W:i∥p + λ2 ∥W:i∥TV  , (23) such that ∥· ∥TV is given by ∥w∥TV = Pm−1 j=1 |wj+1 −wj| and ∥· ∥p is the usual ℓp-norm. The fused lasso [24] corresponds to p = 1. Note that U is constrained to be in a compact set U to avoid degeneracy. To ease notation, we assume w.l.o.g. λ1 = λ2 = 1. The main motivation for this regularizer arises from biostatistics, where one wishes to identify DNA copy number variations simultaneously for a group of related samples [18]. In this case the total variation norm ∥· ∥TV encourages the dictionary to vary smoothly from entry to entry while the ℓp norm shrinks the dictionary so that few latent features are selected. Conveniently, Ωp decomposes along the columns of W, so one can apply the reduction in Proposition 2 to compute its polar assuming ProxΩp can be efficiently computed. Solving ProxΩp appears non-trivial due to the composition of two overlapping norms, however [25] showed that for p = 1 the polar can be solved efficiently by computing Prox for each of the two norms successively. Here we extend this results by proving in Appendix J that the same fact holds for any ℓp norm. Proposition 3 For any 1 ≤p ≤∞, ArgProx∥·∥TV+∥·∥p(w) = ArgProx∥·∥p ArgProx∥·∥TV(w)  . Since Prox∥·∥p is easy to compute, the only remaining problem is to develop an efficient algorithm for computing Prox∥·∥TV. Although [26] has recently proposed an approximate iterative method, we provide an algorithm in Appendix K that is able to efficiently compute the exact solution. Therefore, by combining this result with Propositions 2 and 3 we are able to efficiently compute the polar Ω◦ p and hence apply Algorithm 1 to solving (23) with respect to W. 5 Experiments To investigate the effectiveness of these computational schemes we considered three applications: group lasso, path coding, and latent fused lasso. All algorithms were implemented in Matlab unless otherwise noted. 5.1 Group Lasso: CUR-like Matrix Factorization Our first experiment considered an example of group lasso that is inspired by CUR matrix factorization [27]. Given a data matrix X ∈Rn×d, the goal is to compute an approximate factorization X ≈CUR, such that C contains a subset of c columns from X and R contains a subset of r rows from X. Mairal et al. [11, §5.3] proposed a convex relaxation of this problem: minW 1 2 ∥X−XWX∥2+ λ P i ∥Wi:∥∞+ P j ∥W:j∥∞  . (24) Conveniently, the regularizer fits the development of Section 3.1, with p = 1 and the groups defined to be the rows and columns of W. To evaluate different methods, we used four gene-expression data sets [28]: SRBCT, Brain Tumor 2, 9 Tumor, and Leukemia2, of sizes 83 × 2308, 50 × 10367, 60×5762, and 72×11225, respectively. The data matrices were first centered columnwise and then rescaled to have unit Frobenius norm. Algorithms. We compared three algorithms: GCG (Algorithm 1) with our polar operator which we call GCG TUM, GCG with the polar operator of [11, Algorithm 2] (GCG Secant), and APG (see Section 2.1). The PU in APG uses the routine mexProximalGraph from the SPAMS package [29]. The polar operator of GCG Secant was implemented with a mex wrapper of a max-flow package [30], while GCG TUM used L-BFGS to find an optimal solution {w∗ G} for the smoothed version of 6 10 1 10 2 10 3 10 4 0.05 0.1 0.15 0.2 0.25 CPU time (seconds) Objective function value (a) SRBCT 10 1 10 2 10 3 10 4 0.03 0.04 0.05 0.06 0.07 0.08 CPU time (seconds) Objective function value (b) Brain Tumor 2 10 1 10 2 10 3 10 4 0.04 0.05 0.06 0.07 0.08 CPU time (seconds) Objective function value (c) 9 Tumor 10 1 10 2 10 3 0.05 0.06 0.07 0.08 0.09 0.1 CPU time (seconds) Objective function value (d) Leukemia2 Figure 1: Convex CUR matrix factorization results. 10 −1 10 0 10 1 1 1.1 1.2 1.3 CPU time (seconds) Objective function value (a) Obj vs CPU time (λ = 10−2) 10 −1 10 0 10 1 10 2 0.2 0.4 0.6 0.8 1 CPU time (seconds) Objective function value (b) Obj vs CPU time (λ = 10−3) Figure 2: Path coding results. (15) given in Proposition 1, with smoothing parameter ϵ set to 10−3. To recover an integral solution it suffices to find an optimal solution to (15) that has the form wG = c for some groups and wG = 0 for the remainder (such a solution must exist). So we sorted {w∗ G} and set the wG of the smallest k groups to 0, and wG for the remaining groups set to a common value that satisfies the constraint. The best k can be recovered from {0, 1, . . . , |G| −1} in O(nr) time. See more details in Appendix G. Both GCG methods relinquish local optimization (step 5) in Algorithm 1, but use a totally corrective variant of step 4, which allows efficient optimization by L-BFGS-B via pre-computing XP◦ Fg(gk)X. Results. For simplicity, we tested three values for λ: 10−3, 10−4, and 10−5, which led to increasingly dense solutions. Due to space limitations we only show in Figure 1 the results for λ = 10−4 which gives moderately sparse solutions. On these data sets, GCG TUM proves to be an order of magnitude faster than GCG Secant in computing the polar. As [11] observes, network flow based algorithms often find solutions in practice far more quickly than their theoretical bounds. Thanks to the efficiency of totally corrective update, almost all computations taken by GCG Secant were devoted to the polar operator. Therefore the acceleration proffered by GCG TUM in computing the polar leads to a reduction of overall optimization time by at least 50%. Finally, APG is always even slower than GCG Secant by an order of magnitude, with PU taking up the most computation. 5.2 Path Coding Following [12, §4.3], we consider a logistic regression problem where one is given training examples xi ∈Rn with corresponding labels yi ∈{−1, 1}. For this problem, we formulate (1) with a path coding regularizer ΩFp and the empirical risk: f(w) = P i 1 ni log(1 + exp(−yi ⟨w, xi⟩)), (25) where ni is the number of examples that share the same label as yi. We used the breast cancer data set for this experiment, which consists of 8141 genes and 295 tumors [31]. The gene network is adopted from [32]. Similar to [12, §4.3], we removed all isolated genes (nodes) to which no edge is incident, randomly oriented the raw edges, and removed cycles to form a DAG using the function mexRemoveCyclesGraph in SPAMS. This resulted in 34864 edges and n = 7910 nodes. Algorithms. We again considered three methods: APG, GCG with our polar operator (GCG TUM), and GCG with the polar operator from [12, Algorithm 1], which we label as GCG Secant. The PU in APG uses the routine mexProximalPathCoding from SPAMS, which solves a quadratic network flow problem. It turns out the time cost for a single call of the PU was enough for GCG TUM and 7 GCG Secant to converge to a final solution, and so the APG result is not included in our plots. We implemented the polar operator for GCG Secant based on Matlab’s built-in shortest path routine graphshortestpath (C++ wrapped by mex). For GCG TUM, we used cutting plane to solve a variant of the dual of (19) (see Appendix F), which is much simipler than smoothing in implementation, but exhibits similar efficiency in practice. An integral solution can also be naturally recovered in the course of computing the objective. Again, both GCG methods only used totally corrective updates. Results. Figure 2 shows the result for path coding, with the regularization coefficient λ set to 10−2 and 10−3 so that the solution is moderately sparse. Again it is clear that GCG TUM is an order of magnitude faster than GCG Secant. 5.3 Latent Fused Lasso Finally, we compared GCG and APG on the latent fused lasso problem (23). Two algorithms were tested as the PU in APG: our proposed method and the algorithm in [26], which we label as APGLiu. The synthetic data is generated by following [18]. For each basis (column) of the dictionary, we use the model ˜Wij = PSj s=1 csI(is ≤i ≤is + ls), where Sj ∈{3, 5, 8, 10} specifies the number of consecutive blocks in the j-th basis, cs ∈{±1, ±2, ±3, ±4, ±5}, is ∈{1, . . . , m −10} and ls ∈{5, 10, 15, 20}, which are the magnitude, starting position, and length of the s-th block, respectively. Note that we choose cs, is, ls randomly (and independently for each block s) from their respective sets. The coefficient matrix ˜U are sampled from the Gaussian distribution N(0, 1) (independently for each entry) and normalized to have unit ℓ2 norm for each row. Finally, we generate the observation matrix X = ˜W ˜U + ε, with added (zero mean and unit variance) Gaussian noise ε. We set the dimension m = 300, the number of samples n = 200, and the number of bases (latent dimension) ˜t = 10. Since the noise is Gaussian, we choose the squared loss f(WU, X) = 1 2∥X −WU∥2 F , but the algorithm is applicable to any other smooth loss as well. To avoid degeneracy, we constrained each row of U to have unit ℓ2 norm. Finally, to pick an appropriate dictionary size, we tried t ∈{5, 10, 20}, which corresponds to under-, perfect- and over-estimation, respectively. The regularization constants λ1, λ2 in Ωp were chosen from {0.01, 0.1, 1, 10, 100}. Note that problem (23) is not jointly convex in W and U, so we followed the same strategy as [18]; that is, we alternatively optimized W and U keeping the other fixed. For each subproblem, we ran both APG and GCG to compare their performance. For space limitations, we only report the running time for the setting λ1 = λ2 = 0.1, t = 20 and p ∈{1, 2}. In these experiments we observed that the polar typically only requires 5 to 6 calls to Prox. As can be seen from Figure 3, GCG is significantly faster than APG and APGLiu in reducing the objective. This is due to the greedy nature of GCG, which yields very sparse iterates, and when interleaved with local search achieves fast convergence. 0 20 40 60 80 100 5.2 5.4 5.6 5.8 6 6.2 6.4 x 10 4 CPU time (sec) Loss + Reg APG, p=1 GCG, p=1 APGïLiu, p=1 APG, p=2 GCG, p=2 APGïLiu,p=2 Figure 3: Latent fused lasso. 6 Conclusion We have identified and investigated a new class of structured sparse regularizers whose polar can be reformulated as a linear program with totally unimodular constraints. By leveraging smoothing techniques, we are able to compute the corresponding polars with significantly better efficiency than previous approaches. When plugged into the GCG algorithm, one can observe significant reductions in run time for both group lasso and path coding regularization. We have further developed a generic scheme for converting an efficient proximal solver to an efficient method for computing the polar operator. This reduction allowed us to develop a fast new method for latent fused lasso. For future work, we plan to study more general subset cost functions and investigate new structured regularizers amenable to our approach. It will also be interesting to extend GCG to handle nonsmooth losses. 8 References [1] P. B¨uhlmann and S. van de Geer. Statistics for High-Dimensional Data. Springer, 2011. [2] Y. Eldar and G. Kutyniok, editors. Compressed Sensing: Theory and Applications. Cambridge, 2012. [3] J. Huang, T. Zhang, and D. Metaxas. Learning with structured sparsity. JMLR, 12:3371–3412, 2011. [4] S. Kim and E. Xing. Tree-guided group lasso for multi-task regression with structured sparsity. In ICML, 2010. [5] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proximal methods for hierarchical sparse coding. JMLR, 12:2297–2334, 2011. [6] G. Obozinski and F. Bach. Convex relaxation for combinatorial penalties. Technical Report HAL 00694765, 2012. [7] P. Zhao, G. Rocha, and B. Yu. The composite absolute penalties family for grouped and hierarchical variable selection. Annals of Statistics, 37(6A):3468–3497, 2009. [8] F. Bach, R. Jenatton, J. Mairal, and G. Obozinski. Optimization with sparsity-inducing penalties. Foundations and Trends in Machine Learning, 4(1):1–106, 2012. [9] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [10] Y. Nesterov. Gradient methods for minimizing composite functions. Mathematical Programming, 140: 125–161, 2013. [11] J. Mairal, R. Jenatton, G. Obozinski, and F. Bach. Convex and network flow optimization for structured sparsity. JMLR, 12:2681–2720, 2011. [12] J. Mairal and B. Yu. Supervised feature selection in graphs with path coding penalties and network flows. JMLR, 14:2449–2485, 2013. [13] M. Dudik, Z. Harchaoui, and J. Malick. Lifted coordinate descent for learning with trace-norm regularizations. In AISTATS, 2012. [14] X. Zhang, Y. Yu, and D. Schuurmans. Accelerated training for matrix-norm regularization: A boosting approach. In NIPS, 2012. [15] S. Laue. A hybrid algorithm for convex semidefinite optimization. In ICML, 2012. [16] B. Mishra, G. Meyer, F. Bach, and R. Sepulchre. Low-rank optimization with trace norm penalty. Technical report, 2011. http://arxiv.org/abs/1112.2318. [17] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103(1):127– 152, 2005. [18] G. Nowak, T. Hastie, J. R. Pollack, and R. Tibshirani. A fused lasso latent feature model for analyzing multi-sample aCGH data. Biostatistics, 12(4):776–791, 2011. [19] R. T. Rockafellar. Convex Analysis. Princeton University Press, 1970. [20] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805–849, 2012. [21] F. Bach. Convex analysis and optimization with submodular functions: a tutorial. Technical Report HAL 00527714, 2010. [22] W. Dinkelbach. On nonlinear fractional programming. Management Science, 13(7), 1967. [23] A. Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons, 1st edition, 1986. [24] R. Tibshirani, M. Saunders, S. Rosset, J. Zhu, and K. Knight. Sparsity and smoothness via the fused lasso. Journal of the Royal Statistical Society: Series B, 67:91–108, 2005. [25] J. Friedman, T. Hastie, H. H¨ofling, and R. Tibshirani. Pathwise coordinate optimization. The Annals of Applied Statistics, 1(2):302–332, 2007. [26] J. Liu, L. Yuan, and J. Ye. An efficient algorithm for a class of fused lasso problems. In Conference on Knowledge Discovery and Data Mining, 2010. [27] M. Mahoney and P. Drineas. CUR matrix decompositions for improved data analysis. Proceedings of the National Academy of Sciences, 106(3):697–702, 2009. [28] URL http://www.gems-system.or. [29] URL http://spams-devel.gforge.inria.fr. [30] URL http://drwn.anu.edu.au/index.html. [31] M. Van De Vijver et al. A gene-expression signature as a predictor of survival in breast cancer. The New England Journal of Medicine, 347(25):1999–2009, 2002. [32] H. Chuang, E. Lee, Y. Liu, D. Lee, and T. Ideker. Network-based classification of breast cancer metastasis. Molecular Systems Biology, 3(140), 2007. 9
2013
208
4,941
Learning with Invariance via Linear Functionals on Reproducing Kernel Hilbert Space Xinhua Zhang Machine Learning Research Group National ICT Australia and ANU xinhua.zhang@nicta.com.au Wee Sun Lee Department of Computer Science National University of Singapore leews@comp.nus.edu.sg Yee Whye Teh Department of Statistics University of Oxford y.w.teh@stats.ox.ac.uk Abstract Incorporating invariance information is important for many learning problems. To exploit invariances, most existing methods resort to approximations that either lead to expensive optimization problems such as semi-definite programming, or rely on separation oracles to retain tractability. Some methods further limit the space of functions and settle for non-convex models. In this paper, we propose a framework for learning in reproducing kernel Hilbert spaces (RKHS) using local invariances that explicitly characterize the behavior of the target function around data instances. These invariances are compactly encoded as linear functionals whose value are penalized by some loss function. Based on a representer theorem that we establish, our formulation can be efficiently optimized via a convex program. For the representer theorem to hold, the linear functionals are required to be bounded in the RKHS, and we show that this is true for a variety of commonly used RKHS and invariances. Experiments on learning with unlabeled data and transform invariances show that the proposed method yields better or similar results compared with the state of the art. 1 Introduction Invariances are among the most useful prior information used in machine learning [1]. In many vision problems such as handwritten digit recognition, detectors are often supposed to be invariant to certain local transformations, such as translation, rotation, and scaling [2, 3]. One way to utilize this invariance is by assuming that the gradient of the function is small along the directions of transformation at each data instance. Another important scenario is semi-supervised learning [4], which relies on reasonable priors over the relationship between the data distribution and the discriminant function [5, 6]. It is commonly assumed that the function does not change much in the proximity of each observed data instance, which reflects the typical clustering structure in the data set: instances from the same class are clustered together and away from those of different classes [7–9]. Another popular assumption is that the function varies smoothly over the graph Laplacian [10–12]. A number of existing works have established a mathematical framework for learning with invariance. Suppose T(x, θ) transforms a data point x by an operator T with a parameter θ (e.g. T for rotation and θ for the degree of rotation). Then to incorporate invariance, the target function f is assumed to be (almost) invariant over T(x, Θ) := {T(x, θ) : θ ∈Θ}, where Θ controls the locality of invariance. The consistency of this framework was shown by [13] in the context of robust optimization [14]. However, in practice it usually leads to a large or infinite number of constraints, and hence tractable formulations inevitably rely on approximating or restricting the invariance under consideration. Finally, this paradigm gets further complicated when f comes from a rich space of functions, e.g. the reproducing kernel Hilbert space (RKHS) induced by universal kernels. In [15], all perturbations within the ellipsoids around instances are treated as invariances. This led to a second order cone program, which is difficult to solve efficiently. In [16], a discrete set of Θ that corresponds to feature deletions [17] are considered. The problem is reduced to a quadratic program, but at the cost of blowing up the number of variables which makes scaling to large problems chal1 lenging. A one step approximation of T(x, Θ) via the even-order Taylor expansions around θ = 0 is used in [18]. This results in a semi-definite programming, which is still hard to solve. A further simplification was introduced by [19], which performed sparse approximations of T(x, Θ) by finding (via an oracle) the most violating instance under the current solution. Besides yielding a cheap quadratic program at each iteration, it also improved upon the Virtual Support Vector approach in [20], which did not have a clear optimization objective despite a similar motivation of sparse approximation. However, tractable oracles are often unavailable, and so a simpler approximation can be performed by merely enforcing the invariance of f along some given directions, e.g. the tangent direction ∂ ∂θ|θ=0T(x, θ). This idea was used in [21] in a nonlinear RKHS, but their direction of perturbation was not in the original space but in the RKHS. By contrast, [3] did penalize the gradient of f in the original feature space, but their function space was limited to neural networks and only locally optimal solutions were found. The goal of our paper, therefore, is to develop a new framework that: (1) allows a variety of invariances to be compactly encoded over a rich family of functions like RKHS, and (2) allows the search of the optimal function to be formulated as a convex program that is efficiently solvable. The key requirement to our approach is that the invariances can be characterized by linear functionals that are bounded (§ 2). Under this assumption, we are able to formulate our model into a standard regularized risk minimization problem, where the objective consists of the sum of loss functions on these linear functionals, the usual loss functions on the labeled training data, and a regularization penalty based on the RKHS norm of the function (§ 3). We give a representer theorem that guarantees that the cost can be minimized by linearly combining a finite number of basis functions1. Using convex loss, the resulting optimization problem is a convex program, which can be efficiently solved in a batch or online fashion (§ 5). Note [23] also proposed an operator based model for invariance, but did not derive a representer theorem and did not study the empirical performance. We also show that a wide range of commonly used invariances can be encoded as bounded linear functionals. This include derivatives, transformation invariances, and local averages in commonly used RKHSs such as those defined by Gaussian and polynomial kernels (§ 4). Experiment show that the use of some of these invariances within our framework yield better or similar results compared to the state of the art. Finally, we point out that our focus is to find a function in a given RKHS which respects the prespecified invariances. We are not constructing kernels that instantiate the invariance, e.g. [24, 25]. 2 Preliminaries Suppose features of training examples lie in a domain X. A function k : X × X →R is called a positive semi-definite kernel (or simply kernel) if for all l ∈N and all x1, . . . , xl ∈X, the l×l Gram matrix K := (k(xi, xj))ij is symmetric positive semi-definite. Example kernels on Rn×Rn include polynomial kernel of degree r, which are defined as k(x1, x2) = (x1 · x2 + 1)r,2 as well as Gaussian kernels, defined as k(x1, x2) = κσ(x1, x2) where κσ(x1, x2) := exp(−∥x1 −x2∥2 /(2σ2)). More comprehensive introductions to kernels are available in, e.g., [26–28]. Given k, let H0 be the set of all finite linear combinations of functions in {k(x, ·) : x ∈X}, and endow on H0 an inner product as ⟨f, g⟩= Pp i=1 Pq j=1 αiβjk(xi, yj) where f(·) = Pp i=1 αik(xi, ·) and g(·) = Pq j=1 βjk(yj, ·). Note ⟨f, g⟩is invariant to the form of expansion of f and g [26, 27]. Using the positive semi-definite properties of k, it is easy to show that H0 is an inner product space, and we call its completion under ⟨·, ·⟩as a reproducing kernel Hilbert space (RKHS) H induced by k. For any f ∈H, the reproducing property implies f(x) = ⟨f, k(x, ·)⟩and we denote ∥f∥2 := ⟨f, f⟩. 2.1 Operators and Representers Definition 1 (Bounded Linear Operator and Functional). A linear operator T is a mapping from a vector space V to a vector space W, such that T(x + y) = Tx + Ty and T(αx) = α · Tx for all x, y ∈V and scalar α ∈R. T is also called a functional if W = R. In the case that V and W are normed, T is called bounded if c := supx∈V,∥x∥V=1 ∥Tx∥W is finite, and we call c as the norm of the operator, denoted by ∥T∥. 1A similar result was provided in [22], but not in the context of learning with invariance. 2We write a variable in boldface if it is a vector in a Euclidean space. 2 Example 1. Let H be an RKHS induced by a kernel k defined on X × X. Then for any x ∈X, the linear functional T : H →R defined as T(f) := f(x) is bounded since |f(x)| = |⟨f, k(x, ·)⟩| ≤ ∥k(x, ·)∥· ∥f∥= k(x, x)1/2∥f∥by the Cauchy-Schwarz inequality. Boundedness of linear functionals is particularly useful thanks to the Riesz representation theorem which establishes their one-to-one correspondence to V [29]. Theorem 1 (Riesz representation Theorem). Every bounded linear functional L on a Hilbert space V can be represented in terms of an inner product L(x) = ⟨x, z⟩for all x ∈V, where the representer of the functional, z ∈V, has norm ∥z∥= ∥L∥and is uniquely determined by L. Example 2. Let H be the RKHS induced by a kernel k. For any functional L on H, the representer z can be constructed as z(x) = ⟨z, k(x, ·)⟩= L(k(x, ·)) for all x ∈X. By Theorem 1, z ∈H. Using Riesz’s representer theorem, it is not hard to show that for any bounded linear operator T : V →V where V is Hilbertian, there exists a unique bounded linear operator T ∗: V →V such that ⟨Tx, y⟩= ⟨x, T ∗y⟩for all x, y ∈V. T ∗is called the adjoint operator. So continuing Example 2: Example 3. Suppose the functional L has the form L(f) = T(f)(x0), where x0 ∈X and T : H → H is a bounded linear operator on H. Then the representer of L is z = T ∗(k(x0, ·)) because ∀x ∈X, z(x) = L(k(x, ·)) = T(k(x, ·))(x0) = ⟨T(k(x, ·)), k(x0, ·)⟩= ⟨k(x, ·), T ∗(k(x0, ·))⟩. (1) Riesz’s theorem will be useful for our framework since it allows us to compactly represent functionals related to local invariances as elements of the RKHS. 3 Regularized Risk Minimization in RKHS with Invariances To simplify the presentation, we first describe our framework in the settings of semi-supervised learning [SSL, 4], and later show how to extend it to other learning scenarios in a straightforward way. In SSL, we wish to learn a target function f both from labeled data and from local invariances extracted from labeled and unlabeled data. Let (x1, y1), . . . , (xl, yl) be the labeled training data, and ℓ1(f(x), y) be the loss function on f when the training input x is labeled as y. In this paper we restrict ℓ1 to be convex in its first argument, e.g. logistic loss, hinge loss, and squared loss. We measure deviations from local invariances around each labeled or unlabeled input instance, and express them as bounded linear functionals Ll+1(f), . . . , Ll+m(f) on the RKHS H. The linear functionals are associated with another convex loss function ℓ2(Li(f)) penalizing violations of the local invariances. As an example, the derivative of f with respect to an input feature at some training instance x is a linear functional in f, and the loss function penalizes large values of the derivative at x using, e.g., squared loss, absolute loss, and ϵ-insensitive loss. Section 4 describes other local invariances we can consider and shows that these can be expressed as bounded linear functionals. Finally, we penalize the complexity of f via the squared RKHS norm ∥f∥2. Putting together the loss and regularizer, we set out to minimize the regularized risk functional over f ∈H: min f∈H 1 2∥f∥2 + λ l X i=1 ℓ1(f(xi), yi) + ν l+m X i=l+1 ℓ2 (Li(f)) , (2) where λ, ν > 0. By the convexity of ℓ1 and ℓ2, (2) must be a convex optimization problem. However it is still in the function space and involves functionals. In order to derive an efficient optimization procedure, we now derive a representer theorem showing that the optimal solution lies in the span of a finite number of functions associated with the labeled data and the representers of the functionals Li. Similar results are available in [22]. Theorem 2. Let H be the RKHS defined by the kernel k. Let Li (i = l + 1, . . . , l + m) be bounded linear functionals on H with representers zi. Then the optimal solution to (2) must be in the form of g(·) = l X i=1 αik(xi, ·) + l+m X i=l+1 αizi(·) (3) Furthermore, the parameters α = (α1, . . . , αl+m)′ (finite dimensional) can be found by minimizing λ l X i=1 ℓ1(⟨k(xi, ·), f⟩, yi) + ν l+m X i=l+1 ℓ2 (⟨zi, f⟩) + 1 2α′Kα, where f = l X i=1 αik(xi, ·) + l+m X i=l+1 αizi. (4) Here Kij =⟨ˆki, ˆkj⟩, where ˆki =k(xi, ·) if i ≤l, and ˆki = zi(·) otherwise. (Proof is in Appendix A.) 3 Theorem 2 is similar to the results in [18, Proposition 3] and [19, Eq 8], where the optimal function lies in the span of a finite number of representers. However, our model is quite different in that it uses the representers of the linear functionals corresponding to the invariance, rather than virtual samples drawn from the invariant neighborhood. This could result in more compact models because the invariance (e.g. rotation) is enforced by a single representer, rather than multiple virtual examples (e.g. various degrees of rotation) drawn from the trajectory of invariant transforms. By the expansion of f in (4), the labeling of a new instance x depends not only on k(x, xi) that often measures the similarity between x and training examples, but also takes into account the extent to which k(x, ·), as a function, conforms to the prior invariances. Computationally, ⟨k(xi, ·), zj⟩is straightforward based on the definition of Lj. The efficient computation of ⟨zi, zj⟩depends on the specific kernels and invariances, as we will show in Section 4. In the simplest case, consider the commonly used graph Laplacian regularizer [10, 11] which, given the similarity measure wij between xi and xj, can be written as P ij wij(f(xi) −f(xj))2 = P ij wij(Lij(f))2, where Lij(f) = ⟨f, k(xi, ·) −k(xj, ·)⟩is linear and bounded. Then ⟨zij, zpq⟩= k(xi, xp) + k(xj, xq) −k(xj, xp) −k(xi, xq). Another generic approach is to use the assumption in Example 3 that ⟨zs, f⟩= Ls(f) = Ts(f)(xs), ∀s ∈{i, j}. Then ⟨zi, zj⟩=Li(zj)=Ti(zj)(xi) = ⟨Ti(zj), k(xi, ·)⟩= ⟨zj, T ∗ i (k(xi, ·))⟩= Tj(T ∗ i (k(xi, ·)))(xj). (5) In practice, classifiers such as the support vector machine often use an additional constant term (bias) that is not penalized in the optimization. This is equivalent to searching f over F + H, where F is a finite set of basis functions. A similar representer theorem can be established (see Appendix A). 4 Local Invariances as Bounded Linear Functionals Interestingly, many useful local invariances can be modeled as bounded linear functionals. If it can be expressed in terms of function values f(x), then it must be bounded as shown in Example 1. In general, boundedness hinges on the functional and the RKHS H. When H is finite dimensional, such as that induced by linear or polynomial kernels, all linear functionals on H must be bounded: Theorem 3 ([29, Thm 2.7-8]). Linear functionals on finite dimensional normed space are bounded. However, in most nonparametric statistics problems that are of interest, the RKHS is infinite dimensional. So the boundedness requires a more refined analysis depending on the specific functional. 4.1 Differentiation Functional In semi-supervised learning, a common prior is that the discriminant function f does not change rapidly around sampled points. Therefore, we expect the norm of the gradient at these locations is small. Suppose X ⊆Rn is an open set, and k is continuously differentiable on X2. Then we are interested in linear functionals Lxi,d(f) := ∂f(x) ∂xd |x=xi, where xd stands for the d-th component of the vector x. Then Lxi,d must be bounded: Theorem 4. Lxi,d is bounded on H with respect to the RKHS norm. Proof. This result is immediate from the inequality given by [28, Corollary 4.36]: ∂ ∂xd x=xif(x) ≤∥f∥  ∂2 ∂xd∂yd x=y=xik(x, y)  1 2 . ■ Let us denote the representer of Lxi,d as zi,d. Indeed, [28, Corollary 4.36] established the same result for higher order partial derivatives, which can be easily used in our framework as well. The inner product between representers can be computed by definition: ⟨zi,d, zj,d′⟩= ∂ ∂yd′ y=xj zi,d(y) = ∂ ∂yd′ y=xj ⟨zi,d, k(y, ·)⟩= ∂2 ∂yd′∂xd x=xi,y=xj k(x, y). (6) If k is considered as a function on (x, y) ∈R2n, this implies that the inner product ⟨zi,d, zj,d′⟩is the (xd, yd′)-th element of the Hessian of k evaluated at (xi, xj), which could be interpreted as some sort of “covariance” between the two invariances with respect to the touchstone function k. Applying (6) to the polynomial kernel k(x, y) = (⟨x, y⟩+ 1)r, we derive ⟨zi,d, zj,d′⟩= r(⟨xi, xj⟩+ 1)r−2[(r −1)xd′ i xd j + (⟨xi, xj⟩+ 1)δd=d′], (7) 4 where δd=d′ = 1 if d = d′, and 0 otherwise. For Gaussian kernels k(x, y) = κσ(x, y), we can take another path that is different from (6). Note that Lxi,d(f) = T(f)(xi) where T : f 7→ ∂f ∂xd , and it is straightforward to verify that T is bounded with T ∗= −T for Gaussian RKHS. So applying (5), ⟨zi,d, zj,d′⟩= ∂ ∂yd′ y=xj  −∂ ∂yd k(xi, y)  = k(xi, xj) σ4 [σ2δd=d′ −(xd i −xd j)(xd′ i −xd′ j )]. (8) By Theorem 1, it immediately follows that the norm of Lxi,d is p ⟨zi,d, zi,d⟩= 1/σ. 4.2 Transformation Invariance Invariance to known local transformations of input has been used successfully in supervised learning [3]. Here we show that transformation invariance can be handled in our framework via representers in RKHS. In particular, gradients with respect to the transformations are bounded linear functionals. Following [3], we first require a differentiable function g that maps points from a space S to R, where S lies in a Euclidean space.3 For example, an image can be considered as a function g that maps points in the plane S = R2 to the intensity of the image at that point. Next, we consider a family of bijective transformations tα : S 7→S, which is differentiable in both the input and the parameter α. For instance, translation, rotation, and scaling can be represented as mappings t(1) α , t(2) α , and t(3) α respectively:  x y  t(1) α 7−→  x + αx y + αy  ,  x y  t(2) α 7−→  x cos α −y sin α x sin α −y cos α  ,  x y  t(3) α 7−→  x + αx y + αy  . Based on tα, we define a family of operators Tα : RS →RS as Tα(g) = g ◦t−1 α . The function Tα(g)(x, y) gives us the intensity at location (x, y) of the image translated by an offset (αx, αy), rotated by an angle α, or scaled by an amount α. Finally we sample from S a fixed number of locations S := {s1, . . . , sq}, and present to the learning algorithm a vector I(g, α; S) := (Tα(g)(s1)′, . . . , Tα(g)(sq)′)′. Digital images are discretization of real images where we sample at fixed pixel locations of the function g to obtain a fixed sized vector. Clearly, for a fixed g, the sampled observation I(g, α; S) is a vector valued function of α. The following result allows our framework to use derivatives with respect to the parameters in α. Theorem 5. Let F be a normed vector space of functions that map from the range of I(g, α; S) to R. Suppose the linear functional that maps f ∈F to ∂f(u) ∂uj u=u0 is bounded for any u0 and coordinate j, and its norm is denoted as Cj. Then the functional Lg,d,S: f 7→ ∂ ∂αd α=0f(I(g, α; S)), i.e. derivatives with respect to each of the components in α, must be bounded linear functionals on F. Proof. Let Ij(g, α; S) be the j-th component of I(g, α; S). Using the chain rule, for any f ∈F |Lg,d,S(f)| = ∂f(I(g, α; S)) ∂αd α=0 = q X j=1 ∂f(u) ∂uj u=I(g,0;S) · ∂Ij(g, α; S) ∂αd α=0 (by definition of ∥f∥) ≤ q X j=1 (Cj ∥f∥) · ∂Ij(g, α; S) ∂αd α=0 = ∥f∥· q X j=1 Cj ∂Ij(g, α; S) ∂αd α=0 . The proof is completed by noting that the last summation is a finite constant independent of f. ■ Corollary 1. The derivatives ∂ ∂αd α=0f(I(g, α; S)) with respect to each of the component in α are bounded linear functionals on the RKHS defined by the polynomial and Gaussian kernels. To compute the inner product between representers, let zg,d,S be the representer of Lg,d,S and denote vg,d,S = ∂I(g,α;S) ∂αd |α=0. Then ⟨k(x, ·), zg,d,S⟩= D ∂ ∂y y=I(g,0,S)k(x, y), vg,d,S E and ⟨zg,d,S, zg′,d′,S′⟩=  vg,d,S, ∂ ∂x x=I(g,0,S)  vg′,d′,S′, ∂ ∂y y=I(g′,0,S′)k(x, y)  . (9) 3In practice, S can be a discrete domain such as the pixel coordinate of an image. Then g can be extended to an interpolated continuous space via convolution with a Gaussian. See [3, § 2.3] for more details. 5 4.3 Local Averaging Using gradients to enforce the local invariance that the target function does not change much around data instances increases the number of basis functions by a factor of n, where n is the number of gradient directions that we use. The optimization problem can become computationally expensive if n is large. When we do not have useful information about the invariant directions, it may be useful to have methods that do not increase the number of basis functions by much. Consider functionals Lxi(f) = Z X f(τ)p(xi −τ)dτ −f(xi), (10) where p(·) is a probability density function centered at zero. Minimizing a loss with such linear functionals will favor functions whose local averages given by the integral are close to the function values at data instances. If p(·) is selected to be a low pass filter, the function should be smoother and less likely to change in regions with more data points but is less constrained to be smooth in regions where the data points are sparse. Hence, such loss functions may be appropriate when we believe that data instances from the same class are clustered together. To use the framework we have developed, we need to select the probability density p(·) and the kernel k such that Lxi(f) is a bounded linear functional. Theorem 6. Assume there is a constant C > 0 such that k(x, x) ≤C2 for all x ∈X. Then the linear functional Lxi in (10) is bounded in the RKHS defined by k for any probability density p(·). See proof in Appendix B. As a result, radial kernels such as Gaussian and exponential kernels make Lxi bounded. k(x, x) is not bounded for polynomial kernel, but it has been covered by Theorem 3. To allow for efficient implementation, the inner product between representers of invariances must be computed efficiently. Unlike differentiation, integration often does not result in a closed form expression. Fortunately, analytic evaluation is feasible for the Gaussian kernel κσ(xi, xj) together with the Gaussian density function p(x) = (θ √ 2π)−nκθ(x, 0), because the convolution of two Gaussian densities is still a Gaussian density (see derivation in Appendix B): ⟨zxi, zxj⟩= κσ(xi, xj) + (1 + 2θ/σ)−nκσ+2θ(xi, xj) −2(1 + θ/σ)−nκσ+θ(xi, xj). 5 Optimization The objective (2) can be optimized by many algorithms, such as stochastic gradient [30], bundle method [19, 31], and (randomized) coordinate descent in its dual (4) [32]. Since all computational strategies rely on kernel evaluation, we prefer the dual approach. In particular, (4) allows an unconstrained optimization and the nonsmooth regions in ℓ1 or ℓ2 can be easily approximated by smooth surrogates [33]. So without loss of generality, we assume ℓ1 and ℓ2 are smooth. Our approach can work in both batch and coordinate-wise, depending on the scale of different problems. In the batch setting, the major challenge is the cost in computing the gradient when the number of invariance is large. For example, consider all derivatives at all labeled examples x1, . . . , xl and let N = (⟨zi,d′, zj,d′⟩)(i,d),(j,d′) ∈Rnl×nl as in (8). Then given α = (α′ 1, . . . , α′ l)′ ∈Rnl, the bottleneck of computation is g := Nα, which costs O(l2n2) time and O(l2n2) space to store N in a vanilla implementation. However, since the kernel matrices often employ rich structures, a careful treatment can reduce the cost by an order of magnitude, e.g. into O(l2n) time and O(nl+l2) space in this case. Specifically, denote K = (k(xi, xj))ij ∈Rl×l, and three n×l matrices X = (x1, . . . , xl), A = (α1, . . . , αl), and G = (gd,i). Then one can show G = σ−4  σ2AK + XQ −X ◦(1n ⊗1′ lQ)  , where Qij = Kij(Λji −Λii), Λ = X′A. (11) Here ◦stands for Hadamard product, and ⊗is Kronecker product. 1n ∈Rn is a vector of straight one. The computational cost is dominated by X′A, AK, and XQ, which are all O(l2n). When the number of invariance is huge, a batch solver can be slow and coordinate-wise updates can be more efficient. In each iteration, it picks a coordinate in α and optimizes the objective over all the coordinates picked so far, leaving the rest elements to zero. [32] selected the coordinate randomly, while another strategy is to choose the steepest descent coordinate. Clearly, it is useful only when this selection can be performed efficiently, which depends heavily on the structure of the problem. 6 Experimental Result We compared our approach,which is henceforth referred to as InvSVM,with state-of-the-art methods 6 −1 −0.5 0 0.5 1 1.5 2 2.5 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 −1 −0.5 0 0.5 1 1.5 2 2.5 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 −1 −0.5 0 0.5 1 1.5 2 2.5 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 −1 −0.5 0 0.5 1 1.5 2 2.5 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 Figure 1: Decision boundary for the two moon dataset with ν = 0, 0.01, 0.1, and 1 (left to right). in (semi-)supervised learning using invariance to differentiation and transformation. 6.1 Invariance to Differentiation: Transduction on Two Moon Dataset As a proof of concept, we experimented with the “two moon” dataset shown in Figure 1, with only l = 2 labeled data instances (red circle and black square). We used the Gaussian kernel with σ = 0.25 and the gradient invariances on both labeled and unlabeled data. The loss ℓ1 and ℓ2 are logistic and squared loss respectively, with λ = 1, and ν ∈{0, 0.01, 0.1, 1}. (4) was minimized by a L-BFGS solver [34]. In Figure 1, from left to right our method lays more and more emphasis on placing the separation boundary in low density regions, which allows unlabeled data to improve the classification accuracy. We also tried hinge loss for ℓ1 and ϵ-insensitive loss for ℓ2 with similar classification results. 6.2 Invariance to Differentiation: Semi-supervised Learning on Real-world Data. Datasets. We used 9 datasets for binary classification from [4] and the UCI repository [35]. The number of features (n) and instances (t) are given in Table 1. All feature vectors were normalized to zero mean and unit length. Algorithms. We trained InvSVM with hinge loss for ℓ1 and squared loss for ℓ2. The differentiation invariance was used over the whole dataset, i.e. m = nt in (4), and the gradient computation was accelerated by (11). We compared InvSVM with the standard SVM, and a state-of-the-art semisupervised learning algorithm LapSVM [36], which uses manifold regularization based on graph Laplacian [11, 37]. All three algorithms used Gaussian kernel with the bandwidth σ set to be the median of pairwise distance among all instances. Settings. We trained SVM, LapSVM, and InvSVM on a subset of l ∈{30, 60, 90} labeled examples, and compared their test error on the other t −l examples in each dataset. We used 5 fold stratified cross validation (CV) to select the values of λ and ν for InvSVM. CV was also applied to LapSVM for choosing the number of nearest neighbor for graph construction, weight on the Laplacian regularizer, and the standard RKHS norm regularizer. For each fold of CV, InvSVM and LapSVM used the other 4 folds ( 4 5l points) as labeled data, and the remaining t −4 5l points as unlabeled data. The error on the 1 5l points was then used for CV. Finally the random selection of l labeled examples was repeated for 10 times, and we reported the mean test error and standard deviation. Results. It is clear from Table 1 that in most cases InvSVM achieves lower or similar test error compared to SVM and LapSVM. Both LapSVM and InvSVM are implementations of the low density prior. To this end, LapSVM enforces smoothness of the discrimination function over neighboring instances, while InvSVM directly penalizes the gradient at instances and does not require a notion of neighborhood. The lower error of InvSVM suggests the superiority of the use of gradient, which is enabled by our representer based approach. Besides, SVM often performs quite well when the number of labeled data is large, with similar error as LapSVM. But still, InvSVM can attain even lower error. 6.3 Transformation Invariance Next we study the use of transformation invariance for supervised learning. We used the handwritten digits from the MNIST dataset [38] and compared InvSVM with the virtual sample SVM (VirSVM) which constructs additional instances by applying the following transformations to the training data: 2-pixel shifts in 4 directions, rotations by ±10 degrees, scaling by ±0.1 unit, and shearing in vertical or horizontal axis by ±0.1 unit. For InvSVM, the derivative ∂ ∂α|α=0I(g, α; S) was approximated with the difference that results from the above transformation. We considered binary classification problems by choosing four pairs of digits (4-vs-9, 2-vs-3, and 6-vs-5 are hard, while 7-vs-1 is 7 Table 1: Test error of SVM, LapSVM, and InvSVM for semi-supervised learning. The best result (including tie) that is statistically significant in each setting is highlighted in bold. No number is highlighted if there is no significant difference between the three methods. Method heart (n = 13, t = 270) BCI (n = 117, t = 400) bupa (n = 6, t = 245) l = 30 l = 60 l = 90 l = 30 l = 60 l = 90 l = 30 l = 60 l = 90 SVM 23.5±2.08 21.4±0.23 20.0±1.11 44.6±1.89 39.0±3.41 34.6±3.25 36.2±5.53 37.9±5.80 36.9±1.80 LapSVM 23.2±1.68 22.7±1.92 20.7±2.10 44.8±2.72 45.4±2.25 36.1±3.92 36.6±5.98 40.7±4.05 37.1±1.58 InvSVM 22.3±1.27 20.2±1.01 19.6±2.79 45.3±3.59 38.4±4.41 32.7±2.27 38.2±4.46 35.4±1.85 35.2±0.45 g241c (n = 241, t = 1500) g241n (n = 241, t = 1500) Australian (n = 14, t = 690) l = 30 l = 60 l = 90 l = 30 l = 60 l = 90 l = 30 l = 60 l = 90 SVM 32.9±1.59 27.1±0.92 24.8±1.99 34.6±2.52 28.3±2.65 25.6±1.48 20.6±4.18 21.7±11.3 15.3±0.86 LapSVM 37.1±1.25 28.4±2.44 29.7±1.57 37.7±5.76 29.9±2.41 25.9±1.49 21.9±9.27 15.6±2.49 14.7±0.16 InvSVM 33.1±0.49 26.4±1.14 23.4±1.36 35.4±1.57 28.4±3.03 22.3±4.69 17.7±1.74 16.4±1.11 15.6±0.77 ionosphere (n = 34, t = 351) sonar (n = 60, t = 208) USPS (n = 241, t = 1500) l = 30 l = 60 l = 90 l = 30 l = 60 l = 90 l = 30 l = 60 l = 90 SVM 12.5±3.12 8.71±1.62 7.17±1.67 30.9±2.53 22.7±0.39 20.6±4.81 14.9±0.26 12.6±2.04 11.3±2.06 LapSVM 14.9±1.73 9.05±1.05 7.66±1.53 29.4±2.33 22.9±0.17 24.9±1.29 15.3±1.10 12.3±1.74 11.1±1.81 InvSVM 7.58±1.29 7.90±0.23 7.02±0.88 31.6±4.68 24.1±2.06 21.8±3.91 15.4±4.02 12.2±2.93 11.3±1.63 5 10 15 5 10 15 Error of InvSVM Error of VirSVM (a) 4 (pos) vs 9 (neg) 4 6 8 4 5 6 7 8 Error of InvSVM Error of VirSVM (b) 2 (pos) vs 3 (neg) 5 10 4 6 8 10 Error of InvSVM Error of VirSVM (c) 6 (pos) vs 5 (neg) 0.5 1 1.5 2 0.5 1 1.5 2 Error of InvSVM Error of VirSVM (d) 7 (pos) vs 1 (neg) Figure 2: Test error (in percentage) of InvSVM versus SVM with virtual sample. easier). As the real distribution of digit is imbalanced and invariance is more useful when the number of labeled data is low, we randomly chose n+ = 50 labeled images for one class and n−= 10 images for the other. Accordingly the supervised loss was normalized within each class: n−1 + P i:yi=1 ℓ1(f(xi), 1) + n−1 − P i:yi=−1 ℓ1(f(xi), −1). Logistic loss and ϵ-insensitive loss were used for ℓ1 and ℓ2 respectively. All parameters were set by 5 fold CV and the test error was measured on the rest images in the dataset. The whole process was repeated for 20 times. In Figure 2, InvSVM generally yields lower error than VirSVM, which suggests that compared with drawing virtural samples from the invariance, it seems more effective to directly enforce a flat gradient like in [3]. 7 Conclusion and Discussion We have shown how to model local invariances by using representers in RKHS. This subsumes a wide range of invariances that are useful in practice, and the formulation can be optimized efficiently. For future work, it will be interesting to extend the framework to a broader range of learning tasks. A potential application is to the problem of imbalanced data learning, where one wishes to keep the decision boundary further away from instances of the minority class and closer to the instances of majority class. It will also be interesting to generalize the framework to invariances that are not directly linear. For example, the total variation ℓ(f) := R b a |f ′(x)| dx (a, b ∈R) is not linear, but we can treat the integral of absolute value as a loss function and take the derivative as the linear functional: Lx(f) = f ′(x) and ℓ(f) = R b a |Lx(f)| dx. As a result, the optimization may have to resort to sparse approximation methods. Finally the norm of the linear functional does affect the optimization efficiency, and a detailed analysis will be useful for choosing the linear functionals. 8 References [1] G. E. Hinton. Learning translation invariant recognition in massively parallel networks. In Proceedings Conference on Parallel Architectures and Laguages Europe, pages 1–13. Springer, 1987. [2] M. Ferraro and T. M. Caelli. Lie transformation groups, integral transforms, and invariant pattern recognition. Spatial Vision, 8:33–44, 1994. [3] P. Simard, Y. LeCun, J. S. Denker, and B. Victorri. Transformation invariance in pattern recognitiontangent distance and tangent propagation. In Neural Networks: Tricks of the Trade, pages 239–274, 1996. [4] O. Chapelle, B. Sch¨olkopf, and A. Zien, editors. Semi-Supervised Learning. MIT Press, 2006. [5] S. Ben-David, T. Lu, and D. Pal. Does unlabeled data provably help? Worst-case analysis of the sample complexity of semi-supervised learning. In COLT, 2008. [6] T. Zhang and F. J. Oles. A probability analysis on the value of unlabeled data for classification problems. In ICML, 2000. [7] O. Bousquet, O. Chapelle, and M. Hein. Measure based regularization. In NIPS, 2003. [8] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, 1999. [9] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. In ICML, 2001. [10] M. Belkin, P. Niyogi, and V. Sindhwani. On manifold regularization. In AI-Stats, 2005. [11] X. Zhu, Z. Ghahramani, and J. D. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In ICML, 2003. [12] D. Zhou and B. Sch¨olkopf. Discrete regularization. In Semi-Supervised Learning, pages 221–232. MIT Press, 2006. [13] H. Xu, C. Caramanis, and S. Mannor. Robustness and regularization of support vector machines. Journal of Machine Learning Research, 10:3589–3646, 2009. [14] A. Ben-Tal, L. El Ghaoui, and A. Nemirovski. Robust Optimization. Princeton University Press, 2008. [15] C. Bhattacharyya, K. S. Pannagadatta, and A. J. Smola. A second order cone programming formulation for classifying missing data. In NIPS, 2005. [16] A. Globerson and S. Roweis. Nightmare at test time: Robust learning by feature deletion. In ICML, 2006. [17] N. Dalvi, P. Domingos, Mausam, S. Sanghai, and D. Verma. Adversarial classification. In KDD, 2004. [18] T. Graepel and R. Herbrich. Invariant pattern recognition by semidefinite programming machines. In NIPS, 2004. [19] C. H. Teo, A. Globerson, S. Roweis, and A. Smola. Convex learning with invariances. In NIPS, 2007. [20] D. DeCoste and B. Sch¨olkopf. Training invariant support vector machines. Machine Learning, 46:161– 190, 2002. [21] O. Chapelle and B. Sch¨olkopf. Incorporating invariances in nonlinear support vector machines. In NIPS, 2001. [22] G. Wahba. An introduction to model building with reproducing kernel Hilbert spaces. Technical Report TR 1020, University of Wisconsin-Madison, 2000. [23] A. J. Smola and B. Sch¨olkopf. On a kernel-based method for pattern recognition, regression, approximation and operator inversion. Algorithmica, 22:211–231, 1998. [24] C. Walder and O. Chapelle. Learning with transformation invariant kernels. In NIPS, 2007. [25] C. Burges. Geometry and invariance in kernel based methods. In B. Sch¨olkopf, C. Burges, and A. Smola, editors, Advances in Kernel Methods — Support Vector Learning, pages 89–116. MIT Press, 1999. [26] B. Sch¨olkopf and A. Smola. Learning with Kernels. MIT Press, 2001. [27] N. Cristianini and J. Shawe-Taylor. An Introduction to Support Vector Machines and Other Kernel-based Learning Methods. Cambridge University Press, Cambridge, UK, 2000. [28] I. Steinwart and A. Christmann. Support Vector Machines. Information Science and Statistics. Springer, 2008. [29] E. Kreyszig. Introductory Functional Analysis with Applications. Wiley, 1989. [30] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In ICML, 2007. [31] C. H. Teo, S. V. N. Vishwanthan, A. J. Smola, and Q. V. Le. Bundle methods for regularized risk minimization. Journal of Machine Learning Research, 11:311–365, January 2010. [32] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [33] O. Chapelle. Training a support vector machine in the primal. Neural Comput., 19(5):1155–1178, 2007. [34] http://www.cs.ubc.ca/∼pcarbo/lbfgsb-for-matlab.html. [35] K. Bache and M. Lichman. UCI machine learning repository, 2013. University of California, Irvine. [36] http://www.dii.unisi.it/∼melacci/lapsvmp. [37] V. Sindhwani, P. Niyogi, and M. Belkin. Beyond the point cloud: from transductive to semi-supervised learning. In ICML, 2005. [38] http://www.cs.nyu.edu/∼roweis/data.html. 9
2013
209
4,942
Efficient Online Inference for Bayesian Nonparametric Relational Models Dae Il Kim1, Prem Gopalan2, David M. Blei2, and Erik B. Sudderth1 1Department of Computer Science, Brown University, {daeil,sudderth}@cs.brown.edu 2Department of Computer Science, Princeton University, {pgopalan,blei}@cs.princeton.edu Abstract Stochastic block models characterize observed network relationships via latent community memberships. In large social networks, we expect entities to participate in multiple communities, and the number of communities to grow with the network size. We introduce a new model for these phenomena, the hierarchical Dirichlet process relational model, which allows nodes to have mixed membership in an unbounded set of communities. To allow scalable learning, we derive an online stochastic variational inference algorithm. Focusing on assortative models of undirected networks, we also propose an efficient structured mean field variational bound, and online methods for automatically pruning unused communities. Compared to state-of-the-art online learning methods for parametric relational models, we show significantly improved perplexity and link prediction accuracy for sparse networks with tens of thousands of nodes. We also showcase an analysis of LittleSis, a large network of who-knows-who at the heights of business and government. 1 Introduction A wide range of statistical models have been proposed for the discovery of hidden communities within observed networks. The simplest stochastic block models [20] create communities by clustering nodes, aiming to identify demographic similarities in social networks, or proteins with related functional interactions. The mixed-membership stochastic blockmodel (MMSB) [1] allows nodes to be members of multiple communities; this generalization substantially improves predictive accuracy in real-world networks. These models are practically limited by the need to externally specify the number of latent communities. We propose a novel hierarchical Dirichlet process relational (HDPR) model, which allows mixed membership in an unbounded collection of latent communities. By adapting the HDP [18], we allow data-driven inference of the number of communities underlying a given network, and growth in the community structure as additional nodes are observed. The infinite relational model (IRM) [10] previously adapted the Dirichlet process to define a nonparametric relational model, but restrictively associates each node with only one community. The more flexible nonparametric latent feature model (NLFM) [14] uses an Indian buffet process (IBP) [7] to associate nodes with a subset of latent communities. The infinite multiple membership relational model (IMRM) [15] also uses an IBP to allow multiple memberships, but uses a non-conjugate observation model to allow more scalable inference for sparse networks. The nonparametric metadata dependent relational (NMDR) model [11] employs a logistic stick-breaking prior on the node-specific community frequencies, and thereby models relationships between communities and metadata. All of these previous nonparametric relational models employed MCMC learning algorithms. In contrast, the conditionally conjugate structure of our HDPR model allows us to easily develop a stochastic variational inference algorithm [17, 2, 9]. Its online structure, which incrementally updates global community parameters based on random subsets of the full graph, is highly scalable; our experiments consider social networks with tens of thousands of nodes. 1 While the HDPR is more broadly applicable, our focus in this paper is on assortative models for undirected networks, which assume that the probability of linking distinct communities is small. This modeling choice is appropriate for the clustered relationships found in friendship and collaboration networks. Our work builds on stochastic variational inference methods developed for the assortative MMSB (aMMSB) [6], but makes three key technical innovations. First, adapting work on HDP topic models [19], we develop a nested family of variational bounds which assign positive probability to dynamically varying subsets of the unbounded collection of global communities. Second, we use these nested bounds to dynamically prune unused communities, improving computational speed, predictive accuracy, and model interpretability. Finally, we derive a structured mean field variational bound which models dependence among the pair of community assignments associated with each edge. Crucially, this avoids the expensive and inaccurate local optimizations required by naive mean field approximations [1, 6], while maintaining computation and storage requirements that scale linearly (rather than quadratically) with the number of hypothesized communities. In this paper, we use our assortative HDPR (aHDPR) model to recover latent communities in social networks previously examined with the aMMSB [6], and demonstrate substantially improved perplexity scores and link prediction accuracy. We also use our learned community structure to visualize business and governmental relationships extracted from the LittleSis database [13]. 2 Assortative Hierarchical Dirichlet Process Relational Models We introduce the assortative HDP relational (aHDPR) model, a nonparametric generalization of the aMMSB for discovering shared memberships in an unbounded collection of latent communities. We focus on undirected binary graphs with N nodes and E = N(N −1)/2 possible edges, and let yij = yji = 1 if there is an edge between nodes i and j. For some experiments, we assume the yij variables are only partially observed to compare the predictive performance of different models. As summarized in the graphical models of Fig. 1, we begin by defining a global Dirichlet process to capture the parameters associated with each community. Letting βk denote the expected frequency of community k, and γ > 0 the concentration, we define a stick-breaking representation of β: βk = vk k−1 Y ℓ=1 (1 −vℓ), vk ∼Beta(1, γ), k = 1, 2, . . . (1) Adapting a two-layer hierarchical DP [18], the mixed community memberships for each node i are then drawn from DP with base measure β, πi ∼DP(αβ). Here, E[πi | α, β] = β, and small precisions α encourage nodes to place most of their mass on a sparse subset of communities. To generate a possible edge yij between nodes i and j, we first sample a pair of indicator variables from their corresponding community membership distributions, sij ∼Cat(πi), rij ∼Cat(πj). We then determine edge presence as follows: p(yij = 1 | sij = rij = k) = wk, p(yij = 1 | sij ̸= rij) = ϵ. (2) For our assortative aHDPR model, each community has its own self-connection probability wk ∼Beta(τa, τb). To capture the sparsity of real networks, we fix a very small probability of between-community connection, ϵ = 10−30. Our HDPR model could easily be generalized to more flexible likelihoods in which each pair of communities k, ℓhave their own interaction probability [1], but motivated by work on the aMMSB [6], we do not pursue this generalization here. 3 Scalable Variational Inference Previous applications of the MMSB associate a pair of community assignments, sij and rij, with each potential edge yij. In assortative models these variables are strongly dependent, since present edges only have non-negligible probability for consistent community assignments. To improve accuracy and reduce local optima, we thus develop a structured variational method based on joint configurations of these assignment pairs, which we denote by eij = (sij, rij). See Figure 1. Given this alternative representation, we aim to approximate the joint distribution of the observed edges y, local community assignments e, and global community parameters π, w, β given fixed 2 ∞ ∞ ⌧ yij sij rij βk ⇡i ↵ E N γ wk ∞ ∞ ⌧ yij βk ⇡i ↵ E N eij γ wk Figure 1: Alternative graphical representations of the aHDPR model, in which each of N nodes has mixed membership πi in an unbounded set of latent communities, wk are the community self-connection probabilities, and yij indicates whether an edge is observed between nodes i and j. Left: Conventional representation, in which source sij and receiver rij community assignments are independently sampled. Right: Blocked representation in which eij = (sij, rij) denotes the pair of community assignments underlying yij. hyperparameters τ, α, γ. Mean field variational methods minimize the KL divergence between a family of approximating distributions q(e, π, w, β) and the true posterior, or equivalently maximize the following evidence lower bound (ELBO) on the marginal likelihood of the observed edges y: L(q) ≜Eq[log p(y, e, π, w, β | τ, α, γ)] −Eq[log q(e, π, w, β)]. (3) For the nonparametric aHDPR model, the number of latent community parameters wk, βk, and the dimensions of the community membership distributions πi, are both infinite. Care must thus be taken to define a tractably factorized, and finitely parameterized, variational bound. 3.1 Variational Bounds via Nested Truncations We begin by defining categorical edge assignment distributions q(eij | φij) = Cat(eij | φij), where φijkℓ= q(eij = (k, ℓ)) = q(sij = k, rij = ℓ). For some truncation level K, which will be dynamically varied by our inference algorithms, we constrain φijkℓ= 0 if k > K or ℓ> K. Given this restriction, all observed interactions are explained by one of the first (and under the stick-breaking prior, most probable) K communities. The resulting variational distribution has K2 parameters. This truncation approach extends prior work for HDP topic models [19, 5]. For the global community parameters, we define an untruncated factorized variational distribution: q(β, w | v∗, λ) = ∞ Y k=1 δv∗ k(vk)Beta(wk | λka, λkb), βk(v∗) = v∗ k k−1 Y ℓ=1 (1 −v∗ ℓ). (4) Our later derivations show that for communities k > K above the truncation level, the optimal variational parameters equal the prior: λka = τa, λkb = τb. These distributions thus need not be explicitly represented. Similarly, the objective only depends on v∗ k for k ≤K, defining K + 1 probabilities: the frequencies of the first K communities, and the aggregate frequency of all others. Matched to this, we associate a (K + 1)-dimensional community membership distribution πi to each node, where the final component contains the sum of all mass not assigned to the first K. Exploiting the fact that the Dirichlet process induces a Dirichlet distribution on any finite partition, we let q(πi | θi) = Dir(πi | θi), θi ∈RK+1. The overall variational objective is then L(q) = P k Eq[log p(wk | τa, τb)] −Eq[log q(wk | λka, λkb)] + Eq[log p(v∗ k | γ)] (5) + P i Eq[log p(πi | α, β(v∗))] −Eq[log q(πi | θi)] + P ij Eq[log p(yij|w, eij)] + Eq[log p(eij|πi, πj)] −Eq[log q(eij|φij)]. Unlike truncations of the global stick-breaking process [4], our variational bounds are nested, so that lower-order approximations are special cases of higher-order ones with some zeroed parameters. 3.2 Structured Variational Inference with Linear Time and Storage Complexity Conventional, coordinate ascent variational inference algorithms iteratively optimize each parameter given fixed values for all others. Community membership and interaction parameters are updated as λka = τa + PE ij PK k=1 φijkkyij, λkb = τb + PE ij PK k=1 φijkk(1 −yij), (6) θik = αβk + P (i,j)∈E PK ℓ=1 φijkℓ. (7) 3 Here, the final summation is over all potential edges (i, j) linked to node i. Updates for assignment distributions depend on expectations of log community assignment probabilities: Eq[log(wk)] = ψ(λka) −ψ(λka + λkb), Eq[log(1 −wk)] = ψ(λkb) −ψ(λka + λkb), (8) ˜πik ≜exp{Eq[log(πik)]} = exp{ψ(θik) −ψ(PK+1 ℓ=1 θiℓ)}, ˜πi ≜PK k=1 ˜πik. (9) Given these sufficient statistics, the assignment distributions can be updated as follows: φijkk ∝˜πik˜πjkf(wk, yij), (10) φijkℓ∝˜πik˜πjℓf(ϵ, yij), ℓ̸= k. (11) Here, f(wk, yij) = exp{yijEq[log(wk)] + (1 −yij)Eq[log(1 −wk)]}. More detailed derivations of related updates have been developed for the MMSB [1]. A naive implementation of these updates would require O(K2) computation and storage for each assignment distribution q(eij | φij). Note, however, that the updates for q(wk | λk) in Eq. (6) depend only on the K probabilities φijkk that nodes select the same community. Using the updates for φijkℓfrom Eq. (11), the update of q(πi | θi) in Eq. (7) can be expanded as follows: θik = αβk + P (i,j)∈E φijkk + 1 Zij P ℓ̸=k ˜πik˜πjℓf(ϵ, yij) (12) = αβk + P (i,j)∈E φijkk + 1 Zij ˜πikf(ϵ, yij)(˜πj −˜πjk). Note that ˜πj need only be computed once, in O(K) operations. The normalization constant Zij, which is defined so that φij is a valid categorical distribution, can also be computed in linear time: Zij = ˜πi˜πjf(ϵ, yij) + PK k=1 ˜πik˜πjk(f(wk, yij) −f(ϵ, yij)). (13) Finally, to evaluate our variational bound and assess algorithm convergence, we still need to calculate the likelihood and entropy terms dependent on φijkℓ. However, we can compute part of our bound by caching our partition function Zij in linear time. See ‡A.2 for details regarding the full derivation of this ELBO and its extensions. 3.3 Stochastic Variational Inference Standard variational batch updates become computationally intractable when N becomes very large. Recent advancements in applying stochastic optimization techniques within variational inference [8] showed that if our variational mean-field family of distributions are members of the exponential family, we can derive a simple stochastic natural gradient update for our global parameters λ, θ, v. These gradients can be calculated from only a subset of the data and are noisy approximations of the true natural gradient for the variational objective, but represent an unbiased estimate of that gradient. To accomplish this, we define a new variational objective with respect to our current set of observations. This function, in expectation, is equivalent to our true ELBO. By taking natural gradients with respect to our new variational objective for our global variables λ, θ, we have ∇λ∗ ka = 1 g(i,j)φijkkyij + τa −λka; (14) ∇θ∗ ik = 1 g(i,j) P (i,j)∈E PK ℓ=1 φijkℓ+ αβk −θik, (15) where the natural gradient for ∇λ∗ kb is symmetric to ∇λ∗ ka and where yij in Eq. (14) is replaced by (1 −yij). Note that P (i,j)∈E PK ℓ=1 φijkℓwas shown in the previous section to be computable in O(K). The scaling term g(i, j) is needed for an unbiased update to our expectation. If g(i, j) = 2/N(N −1), then this would represent a uniform distribution over possible edge selections in our undirected graphs. In general, g(i, j) can be an arbitrary distribution over possible edge selections such as a distribution over sets of edges as long as the expectation with respect to this distribution is equivalent to the original ELBO [6]. When referring to the scaling constant associated with sets, we consider the notation of h(T) instead of g(i, j). We optimize this ELBO with a Robbins-Monro algorithm which iteratively steps along the direction of this noisy gradient. We specify a learning rate ρt ≜(µ0 + t)−κ at time t where κ ∈(.5, 1] and µ0 ≥0 downweights the influence of earlier updates. With the requirement that P t ρ2 t < ∞and 4 P t ρt = ∞, we will provably converge to a local optimum. For our global variational parameters {λ, θ}, the updates at iteration t are now λt ka = λt−1 ka + ρt(∇λ∗ ka) = (1 −ρt)λt−1 ka + ρt( 1 g(i,j)φijkkyij + τa); (16) θt ik = θt−1 ik + ρt(∇θ∗ ik) = (1 −ρt)θt−1 ik + ρt( 1 g(i,j) P (i,j)∈E PK ℓ=1 φijkℓ+ αβk); (17) vt k = (1 −ρt)vt−1 k + ρt(v∗ k), (18) where v∗ k is obtained via a constrained optimization task using the gradients derived in ‡A.3. Defining an update on our global parameters given a single edge observation can result in very poor local optima. In practice, we specify a mini-batch T, a set of unique observations in determining a noisy gradient that is more informative. This results in a simple summation over the sufficient statistics associated with the set of observations as well as a change to g(i, j) to reflect the necessary scaling of our gradients when we can no longer assume our samples are uniformly chosen from our dataset. 3.4 Restricted Stratified Node Sampling Stochastic variational inference provides us with the ability to choose a sampling scheme that allows us to better exploit the sparsity of real world networks. Given the success of stratified node sampling [6], we consider this technique for all our experiments. Briefly, stratified node-sampling randomly selects a single node i and either chooses its associated links or a set of edges from m equally sized non-link edge sets. For this mini-batch strategy, h(T) = 1/N for link sets and h(T) = 1/Nm for a partitioned non-link set. In [6], all nodes in π were considered global parameters and updated after each mini-batch. For our model, we also treat π similarly, but maintain a separate learning rate ρi for each node. This allows us to focus on updating only nodes that are relevant to our mini-batch as well as limit the computational costs associated with this global update. To ensure that our Robbins-Monro conditions are still satisfied, we set the learning rate for nodes that are not part of our mini-batch to be 0. When a new minibatch contains this particular node, we look to the most previous learning rate and assume this value as the previous learning rate. This modified subsequence of learning rates maintains our convergence criterion so that the P t ρ2 it < ∞and that P t ρit = ∞. We show how performing this simple modification results in significant improvements in both perplexity and link prediction scores. 3.5 Pruning Moves Our nested truncation requires setting an initial number of communities K. A large truncation lets the posterior find the best number of communities, but can be computationally costly. A truncation set too small may not be expressive enough to capture the best approximate posterior. To remedy this, we define a set of pruning moves aimed at improving inference by removing communities that have very small posterior mass. Pruning moves provide the model with a more parsimonious and interpretable latent structure, and may also significantly reduce the computational cost of subsequent iterations. Figure 2 provides an example illustrating how pruning occurs in our model. To determine communities which are good candidates for pruning, for each community k we first compute Θk = (PN i=1 θik)/(PN i=1 PK k=1 θik). Any community for which Θk < (log K)/N for t∗= N/2 consecutive iterations is then evaluated in more depth. We scale t∗with the number of nodes N within the graph to ensure that a broad set of observations are accounted for. To estimate an approximate but still informative ELBO for the pruned model, we must associate a set of relevant observations to each pruning candidate. In particular, we approximate the pruned ELBO L(qprune) by considering observations yij among pairs of nodes with significant mass in the pruned community. We also calculate L(qold) from these same observations, but with the old model parameters. We then compare these two values to accept or reject the pruning of the low-weight community. 4 Experiments In this section we perform experiments that compare the performance of the aHDPR model to the aMMSB. We show significant gains in AUC and perplexity scores by using the restricted form of 5 Adjacency Matrix ✓ K communities N nodes New Model ⇥k = (PN i=1 ✓ik)/(PN i=1 PK k=1 ✓ik) ✓⇤ Prune k=3 Uniformly redistribute mass. Perform similar operation for other latent variables. ⇥k < (log K)/N Select nodes relevant to pruned topic and its corresponding subgraph (red box) to generate a new ELBO: L(qprune) If L(qprune) > L(qold), accept or else reject and continue inference with old model Y L(qold) v⇤, β⇤, λ⇤ ✓⇤, φ⇤ ij2S L(qprune) v, β, λ ✓, φij2S Figure 2: Pruning extraneous communities. Suppose that community k = 3 is considered for removal. We specify a new model by redistributing its mass PN i=1 θi3 uniformly across the remaining communities θiℓ, ℓ̸= 3. An analogous operation is used to generate {v∗, β∗, λ∗ a, λ∗ b, θ∗}. To accurately estimate the true change in ELBO for this pruning, we select the n∗= 10 nodes with greatest participation θi3 in community 3. Let S denote the set of all pairs of these nodes, and yij∈S their observed relationships. From these observations we can estimate φ∗ ij∈S for a model in which community k = 3 is pruned, and a corresponding ELBO L(qprune). Using the data from the same sub-graph, but the old un-pruned model parameters, we estimate an alternative ELBO L(qold). We accept if L(qprune) > L(qold), and reject otherwise. Because our structured mean-field approach provides simple direct updates for φ∗ ij∈S, the calculation of L(qold) and L(qprune) is efficient. stratified node sampling, a quick K-means initialization1 for θ, and our efficient structured meanfield approach combined with pruning moves. We perform a detailed comparison on a synthetic toy dataset, as well as the real-world relativity collaboration network, using a variety of metrics to show the benefits of each contribution. We then show significant improvements over the baseline aMMSB model in both AUC and perplexity metrics on several real-world datasets previously analyzed by [6]. Finally, we perform a qualitative analysis on the LittleSis network and demonstrate the usefulness of using our learned latent community structure to create visualizations of large networks. For additional details on the parameters used in these experiments, please see ‡A.1. 4.1 Synthetic and Collaboration Networks The synthetic network we use for testing is generated from the standards and software outlined in [12] to produce realistic synthetic networks with overlapping communities and power-law degree distributions. For these purposes, we set the number of nodes N = 1000, with the minimum degree per node set to 10 and its maximum to 60. On this network the true number of latent communities was found to be K = 56. Our real world networks include 5 undirected networks originally ranging from N = 5, 242 to N = 27, 770. These raw networks, however, contain several disconnected components. Both the aMMSB and aHDPR achieve highest posterior probability by assigning each connected component distinct, non-overlapping communities; effectively, they analyze each connected sub-graph independently. To focus on the more challenging problem of identifying overlapping community structure, we take the largest connected component of each graph for analysis. Initialization and Node-Specific Learning Rates. The upper-left panels in Fig. 3 compare different aHDPR inference algorithms, and the perplexity scores achieved on various networks. Here we demonstrate the benefits of initializing θ via K-means, and our restricted stratified node sampling procedure. For our random initializations, we initalized θ in the same fashion as the aMMSB. Using a combination of both modifications, we achieve the best perplexity scores on these datasets. The node-specific learning rates intuitively restrict updates for θ to batches containing relevant observations, while our K-means initialization quickly provides a reasonable single-membership partition as a starting point for inference. Naive Mean-Field vs. Structured Mean-Field. The naive mean-field approach is the aHDPR model where the community indicator assignments are split into sij and rij. This can result in severe local optima due to their coupling as seen in some experiments in Fig. 4. The aMMSB in some 1Our K-means initialization views the rows of the adjacency matrix as distinct data points and produces a single community assignment zi for each node. To initialize community membership distributions based on these assignments, we set θizi = N −1 and θi\zi = α. 6 2 4 6 8 10 12 14 16 x 10 6 3 4 5 6 7 8 9 10 11 12 Mini−Batch Strategies TOY, K=56 (aHDPR−Fixed) Number of Observed Edges Perplexity Random Init−All Random Init−Restricted Kmeans Init−All Kmeans Init−Restricted 1 2 3 4 5 x 10 7 5 10 15 20 25 30 35 40 Mini−Batch Strategies Relativity, K=250 (aHDPR−Fixed) Number of Observed Edges Perplexity Random Init−All Random Init−Restricted Kmeans Init−All Kmeans Init−Restricted 20 40 56 60 80 100 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 Average Perplexity vs. K (Toy) Perplexity Number of Communities K (aMMSB) aMMSB aHDPR−K100 aHDPR−Pruning−K100 aHDPR−Pruning−K200 150 200 250 300 350 400 2 4 6 8 10 12 14 16 18 20 Average Perplexity vs. K (Relativity) Perplexity Number of Communities K (aMMSB) aMMSB aHDPR−K500 aHDPR−Pruning 2 4 6 8 10 12 14 16 x 10 6 2 3 4 5 6 7 8 9 10 Perplexity TOY N=1000 Number of Observed Edges Perplexity aMMSB−K20 aMMSB−K56 aHDPR−Naive−K56 aHDPR−Batch−K56 aHDPR−K56 aHDPR−Pruning−K200 aHDPR−Truth 1 2 3 4 5 x 10 7 5 10 15 20 25 30 Perplexity Relativity N=4158 Number of Observed Edges Perplexity aMMSB−K150 aMMSB−K200 aHDPR−Naive−K500 aHDPR−K500 aHDPR−Pruning 10 5 10 6 10 7 0 20 40 60 80 100 120 140 160 180 200 Pruning process for Toy Data Number of Observed Edges (Log Axis) Number of Communities Init K=100 Init K=200 True K=56 rel hep2 hep astro cm 250 300 350 400 Number of Communities Used K after Pruning (aHDPR Initial K=500) Figure 3: The upper left shows benefits of a restricted update and a K-means initialization for stratified node sampling on both synthetic and relativity networks. The upper right shows the sensitivity of the aMMSB as K varies versus the aHDPR. The lower left shows various perplexity scores for the synthetic and relativity networks with the best performing model (aHDPR-Pruning) scoring an average AUC of 0.9675 ± .0017 on the synthetic network and 0.9466 ± .0062 on the relativity network. The lower right shows the pruning process for the toy data and the final K communities discovered on our real-world networks. instances performs better than the naive mean-field approach, but this can be due to differences in our initialization procedures. However, by changing our inference procedure to an efficient structured mean-field approach, we see significant improvements across all datasets. Benefits of Pruning Moves. Pruning moves were applied every N/2 iterations with a maximum of K/10 communities removed per move. If the number of prune candidates was greater than K/10, then K/10 communities with the lowest mass were chosen. The lower right portion of Fig. 3 shows that our pruning moves can learn close to the true underlying number of clusters (K=56) on a synthetic network even when significantly altering its initial K. Across several real world networks, there was low variance between runs with respect to the final K communities discovered, suggesting a degree of robustness. Furthermore, pruning moves improved perplexity and AUC scores across every dataset as well as reducing computational costs during inference. 1 2 3 4 5 6 7 8 9 x 10 7 10 15 20 25 30 35 40 45 50 55 Perplexity Hep2 N=7464 Number of Observed Edges Perplexity aMMSB−K150 aMMSB−K200 aHDPR−Naive−K500 aHDPR−K500 aHDPR−Pruning 2 4 6 8 10 12 14 x 10 7 5 10 15 20 25 30 Perplexity Hep N=11204 Number of Observed Edges Perplexity aMMSB−K250 aMMSB−K300 aHDPR−Naive−K500 aHDPR−K500 aHDPR−Pruning 0.5 1 1.5 2 x 10 8 10 15 20 25 30 35 Perplexity AstroPhysics N=17903 Number of Observed Edges Perplexity aMMSB−K300 aMMSB−K350 aHDPR−Naive−K500 aHDPR−K500 aHDPR−Pruning 0.5 1 1.5 2 2.5 x 10 8 10 20 30 40 50 60 70 Perplexity Condensed Matter N=21363 Number of Observed Edges Perplexity aMMSB−K400 aMMSB−K450 aHDPR−Naive−K500 aHDPR−K500 aHDPR−Pruning 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 AUC Hep2 N=7464 AUC Quantiles aMMSB K200 aMMSB K250 aHDPR Naive−K500 aHDPR K500 aHDPR Pruning 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 AUC Hep N=11204 AUC Quantiles aMMSB K250 aMMSB K300 aHDPR Naive−K500 aHDPR K500 aHDPR Pruning 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 AUC AstroPhysics N=17903 AUC Quantiles aMMSB K300 aMMSB K350 aHDPR Naive−K500 aHDPR K500 aHDPR Pruning 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 AUC Condensed Matter N=21363 AUC Quantiles aMMSB K400 aMMSB K450 aHDPR Naive−K500 aHDPR K500 aHDPR Pruning Figure 4: Analysis of four real-world collaboration networks. The figures above show that the aHDPR with pruning moves has the best performance, in terms of both perplexity (top) and AUC (bottom) scores. 4.2 The LittleSis Network The LittleSis network was extracted from the website (http://littlesis.org), which is an organization that acts as a watchdog network to connect the dots between the world’s most powerful people 7 Zalmay_Khalilzad Russell_L_Carson Terry_J_Lundgren Leon_D_Black William_Donaldson Ronald_L_Olson William_C_Rudin Jerry_Speyer Paul_H_O_Neill Roger_C_Altman Neal_S_Wolin Ralph_L_Schlosstein Vikram_S_Pandit Thomas_R_Nides William_M_Lewis_Jr Robert_H_Herz Suresh_Sundaresan Rebecca_M_Blank William_A_Haseltine Robert_D_Reischauer Stephen_M_Wolf Maya_MacGuineas Tom_Clausen Vernon_E_Jordan_Jr Richard_N_Haass Richard_D_Parsons Larry_Summers Todd_Stern Peter_J_Wallison Thomas_E_Donilon Peter_Orszag Nancy_Killefer Scooter_Libby Trenton_Arthur Stephanie_Cutter Robert_Boorstin Thomas_F_McLarty_III Tony_Fratto Ron_Bloom Richard_L__Jake__Siewert Stanton_Anderson Glenn_H_Hutchins Thurgood_Marshall_Jr Roger_B_Porter Robert_Gates Mark_B_McClellan Robert_E_Rubin Stephen_Friedman Peter_G_Peterson Shirley_Ann_Jackson Kenneth_M_Duberstein Sylvia_Mathews_Burwell Laura_D_Tyson Tim_Geithner Richard_C_Holbrooke Martin_S_Feldstein William_McDonough Warren_Bruce_Rudman Paul_Volcker John_C_Whitehead Maurice_R_Greenberg Strobe_Talbott William_S_Cohen Stephen_W_Bosworth Thomas_R_Pickering Reynold_Levy Michael_H_Moskow Thomas_S_Foley Vincent_A_Mai Warren_Christopher Vin_Weber Richard_N_Cooper Madeleine_K_Albright Michael_Froman Susan_Rice Peter_J_Solomon Valerie_Jarrett Robert_Wolf Reed_E_Hundt Richard_J_Danzig Penny_Pritzker William_E_Kennard Wendy_Abrams Robert_Bauer Robert_Lane_Gibbs Tom_Bernstein Ron_Moelis Mark_T_Gallogly Susan_Mandel Tony_West Michael_Strautmanis Louis_B_Susman Norm_Eisen Paul_J_Taubman Wendy_Neu Michael_Lynton Steven_Gluckstern William_Von_Hoene Jason_Furman Melissa_E_Winter Wahid_Hamid Paul_Tudor_Jones_II Paula_H_Crown Ronald_Kirk Robert_M_Perkowitz Robert_Zoellick Thomas_Steyer Willem_Buiter Richard_Kauffman Suzanne_Nora_Johnson Robert_K_Steel Thomas_K_Montag William_Wicker Robert_D_Hormats Timothy_M_George Peter_Bass William_C_Dudley Thomas_J_Healey Tracy_R_Wolstencroft Rajat_K_Gupta Meredith_Broome Peter_K_Scaturro Robert_S_Kaplan Reuben_Jeffery_III Robin_Jermyn_Brooks William_P_Boardman John_L_Thornton Sarah_G_Smith Steven_T_Mnuchin Sharmin_Mossavar_Rahmani Robert_B_Menschel Robert_J_Hurst William_W_George Ron_Di_Russo Lloyd_C_Blankfein William_M_Yarbenet Thomas_L_Kempner_Jr Kenneth_M_Jacobs John_A_Thain Josh_Bolten Richard_C_Perry Thomas_E_Tuft Marti_Thomas Judd_Alan_Gregg Walter_W_Driver_Jr Neel_Kashkari Mark_Patterson Nick_O_Donohoe Mario_Draghi Pete_Coneway Scott_Kapnick Figure 5: The LittleSis Network. Near the center in violet we have prominent government figures such as Larry H. Summers (71st US Treasury Secretary) and Robert E. Rubin (70th US Treasury Secretary) with ties to several distinct communities, representative of their high posterior bridgness. Conversely, within the beige colored community, individuals with small posterior bridgness such as Wendy Neu can reflect a career that was highly focused in one organization. A quick internet search shows that she is currently the CEO of Hugo Neu, a green-technology firm where she has worked for over 30 years. An analysis on this type of network might provide insights into the structures of power that shape our world and the key individuals that define them. and organizations. Our final graph contained 18,831 nodes and 626,881 edges, which represents a relatively sparse graph with edge density of 0.35% (for details on how this dataset was processed see ‡A.3). For this analysis, we ran the aHDPR with pruning on the entire dataset using the same settings from our previous experiments. We then took the top 200 degree nodes and generated weighted edges based off of a variational distance between their learned expected variational posteriors such that dij = 1 − |Eq[πi]−Eq[πj]| 2 . This weighted edge was then included in our visualization software [3] if dij > 0.5. Node sizes were determined by posterior bridgness [16] where bi = 1 − p K/(K −1) PK k=1(Eq[πik] − 1 K )2and measures the extent to which a node is involved with multiple communities. Larger nodes have greater posterior bridgeness while node colors represent its dominant community membership. Our learned latent communities can drive these types of visualizations that otherwise might not have been possible given the raw subgraph (see ‡A.4). 5 Discussion Our model represents the first Bayesian nonparametric relational model to use a stochastic variational approach for efficient inference. Our pruning moves allow us to save computation and improve inference in a principled manner while our efficient structured mean-field inference procedure helps us escape local optima. Future extensions of interest could entail advanced split-merge moves that can grow the number of communities as well as extending these scalable inference algorithms to more sophisticated relational models. 8 References [1] E. Airoldi, D. Blei, S. Fienberg, and E. Xing. Mixed membership stochastic blockmodels. JMLR, 9, 2008. [2] S. Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2):251–276, 1998. [3] M. Bastian, S. Heymann, and M. Jacomy. Gephi: An open source software for exploring and manipulating networks, 2009. [4] D. M. Blei and M. I. Jordan. Variational methods for the dirichlet process. In ICML, 2004. [5] M. Bryant and E. B. Sudderth. Truly nonparametric online variational inference for hierarchical dirichlet processes. In NIPS, pages 2708–2716, 2012. [6] P. Gopalan, D. M. Mimno, S. Gerrish, M. J. Freedman, and D. M. Blei. Scalable inference of overlapping communities. In NIPS, pages 2258–2266, 2012. [7] T. L. Griffiths and Z. Ghahramani. Infinite latent feature models and the Indian buffet process. Technical Report 2005-001, Gatsby Computational Neuroscience Unit, May 2005. [8] M. Hoffman, D. Blei, C. Wang, and J. Paisley. Stochastic variational inference. arXiv preprint arXiv:1206.7051, 2012. [9] M. D. Hoffman, D. M. Blei, and F. R. Bach. Online learning for latent dirichlet allocation. In NIPS, pages 856–864, 2010. [10] C. Kemp, J. Tenenbaum, T. Griffiths, T. Yamada, and N. Ueda. Learning systems of concepts with an infinite relational model. In AAAI, 2006. [11] D. Kim, M. C. Hughes, and E. B. Sudderth. The nonparametric metadata dependent relational model. In ICML, 2012. [12] A. Lancichinetti and S. Fortunato. Benchmarks for testing community detection algorithms on directed and weighted graphs with overlapping communities. Phys. Rev. E, 80(1):016118, July 2009. [13] littlesis.org. Littlesis is a free database detailing the connections between powerful people and organizations, June 2009. [14] K. Miller, T. Griffiths, and M. Jordan. Nonparametric latent feature models for link prediction. In NIPS, 2009. [15] M. Morup, M. N. Schmidt, and L. K. Hansen. Infinite multiple membership relational modeling for complex networks. In Machine Learning for Signal Processing (MLSP), 2011 IEEE International Workshop on, pages 1–6. IEEE, 2011. [16] T. Nepusz, A. Petrczi, L. Ngyessy, and F. Bazs. Fuzzy communities and the concept of bridgeness in complex networks. Phys Rev E Stat Nonlin Soft Matter Phys, 77(1 Pt 2):016107, 2008. [17] M. Sato. Online model selection based on the variational bayes. Neural Computation, 13(7):1649–1681, 2001. [18] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical Dirichlet processes. JASA, 101(476):1566–1581, Dec. 2006. [19] Y. W. Teh, K. Kurihara, and M. Welling. Collapsed variational inference for hdp. In NIPS, 2007. [20] Y. Wang and G. Wong. Stochastic blockmodels for directed graphs. JASA, 82(397):8–19, 1987. 9
2013
21
4,943
Real-Time Inference for a Gamma Process Model of Neural Spiking 1David Carlson, 2Vinayak Rao, 2Joshua Vogelstein, 1Lawrence Carin 1Electrical and Computer Engineering Department, Duke University 2Statistics Department, Duke University {dec18,lcarin}@duke.edu, {var11,jovo}@stat.duke.edu Abstract With simultaneous measurements from ever increasing populations of neurons, there is a growing need for sophisticated tools to recover signals from individual neurons. In electrophysiology experiments, this classically proceeds in a two-step process: (i) threshold the waveforms to detect putative spikes and (ii) cluster the waveforms into single units (neurons). We extend previous Bayesian nonparametric models of neural spiking to jointly detect and cluster neurons using a Gamma process model. Importantly, we develop an online approximate inference scheme enabling real-time analysis, with performance exceeding the previous state-of-theart. Via exploratory data analysis—using data with partial ground truth as well as two novel data sets—we find several features of our model collectively contribute to our improved performance including: (i) accounting for colored noise, (ii) detecting overlapping spikes, (iii) tracking waveform dynamics, and (iv) using multiple channels. We hope to enable novel experiments simultaneously measuring many thousands of neurons and possibly adapting stimuli dynamically to probe ever deeper into the mysteries of the brain. 1 Introduction The recent heightened interest in understanding the brain calls for the development of technologies that will advance our understanding of neuroscience. Crucial for this endeavor is the advancement of our ability to understand the dynamics of the brain, via the measurement of large populations of neural activity at the single neuron level. Such reverse engineering efforts benefit from real-time decoding of neural activity, to facilitate effectively adapting the probing stimuli. Regardless of the experimental apparati used (e.g., electrodes or calcium imaging), real-time decoding of individual neuron responses requires identifying and labeling individual spikes from recordings from large populations. In other words, real-time decoding requires real-time spike sorting. Automatic spike sorting methods are continually evolving to deal with more sophisticated experiments. Most recently, several methods have been proposed to (i) learn the number of separable neurons on each electrode or “multi-trode” [1, 2], or (ii) operate online to resolve overlapping spikes from multiple neurons [3]. To our knowledge, no method to date is able to simultaneously address both of these challenges. We develop a nonparametric Bayesian continuous-time generative model of population activity. Our model explains the continuous output of each neuron by a latent marked Poisson process, with the “marks” characterizing the shape of each spike. Previous efforts to address overlapping spiking often assume a fixed kernel for each waveform, but joint intracellular and extracellular recording clearly indicate that this assumption is false (see Figure 3c). Thus, we assume that the statistics of the marks are time-varying. We use the framework of completely random measures to infer how many of a potentially infinite number of neurons (or single units) are responsible for the observed data, simultaneously characterizing spike times and waveforms of these neurons We describe an intuitive discrete-time approximation to the above infinite-dimensional continuous-time stochastic process, then develop an online variational Bayesian inference algorithm for this model. Via numerical simulations, we demonstrate that our inference procedure improves 1 over the previous state-of-the-art, even though we allow the other methods to use the entire dataset for training, whereas we learn online. Moreover, we demonstrate that we can effectively track the time-varying changes in waveform, and detect overlapping spikes. Indeed, it seems that the false positive detections from our approach have indistinguishable first order statistics from the true positives, suggesting that second-order methods may be required to reduce the false positive rate (i.e., template methods may be inadequate). Our work therefore suggests that further improvements in real-time decoding of activity may be most effective if directed at simultaneous real-time spike sorting and decoding. To facilitate such developments and support reproducible research, all code and data associated with this work is provided in the Supplementary Materials. 2 Model Our data is a time-series of multielectrode recordings X ⌘(x1, · · · , xT ), and consists of T recordings from M channels. As in usual measurement systems, the recording times lie on regular grid, with interval length ∆, and xt 2 RM for all t. Underlying these observations is a continuous-time electrical signal driven by an unknown number of neurons. Each neuron generates a continuous-time voltage trace, and the outputs of all neurons are superimposed and discretely sampled to produce the recordings X. At a high level, in §2.1 we model the continuous-time output of each neuron as a series of idealized Poisson events smoothed with appropriate kernels, while §2.2 uses the Gamma process to develop a nonparametric prior for an entire population. §2.3 then describes a discrete-time approximation based on the Bernoulli approximation to the Poisson process. For conceptual clarity, we restrict ourselves to single channel recordings until §2.4, where we describe the complete model for multichannel data. 2.1 Modeling the continuous-time output of a single neuron There is a rich literature characterizing the spiking activity of a single neuron [4] accounting in detail for factors like non-stationarity, refractoriness and spike waveform. We however make a number of simplifying assumptions (some of which we later relax). First, we model the spiking activity of each neuron are stationary and memoryless, so that its set of spike times are distributed as a homogeneous Poisson process (PP). We model the neurons themselves are heterogeneous, with the ith neuron having an (unknown) firing rate λi. Call the ordered set of spike times of the ith neuron Ti = (⌧i1, ⌧i2, . . .); then the time between successive elements of Ti is exponentially distributed with mean 1/λi. We write this as Ti ⇠PP(λi). The actual electrical output of a neuron is not binary; instead each spiking event is a smooth perturbation in voltage about a resting state. This perturbation forms the shape of the spike, with the spike shapes varying across neurons as well as across different spikes of the same neuron. However, each neuron has its own characteristic distribution over shapes, and we let ✓⇤ i 2 ⇥parametrize this distribution for neuron i. Whenever this neuron emits a spike, a new shape is drawn independently from the corresponding distribution. This waveform is then offset to the time of the spike, and contributes to the voltage trace associated with that spike. The complete recording from the neuron is the superposition of all these spike waveforms plus noise. Rather than treating the noise as white as is common in the literature [5], we allow it to exhibit temporal correlation, recognizing that the ‘noise’ is in actual fact background neural activity. We model it as a realization of a Gaussian process (GP) [6], with the covariance kernel K of the GP determining the temporal structure. We use an exponential kernel, modeling the noise as Markov. We model each spike shape as weighted superpositions of a dictionary of K basis functions d(t) ⌘(d1(t), · · · , dK(t))T. The dictionary elements are shared across all neurons, and each is a real-valued function of time, i.e., dk 2 L2. Each spike time ⌧ij is associated with a random K-dimensional weight vector y⇤ ij ⌘(y⇤ ij1, . . . y⇤ ijK)T, and the shape of this spike at time t is given by the weighted sum PK k=1 y⇤ ijkdk(t −⌧ij). We assume y⇤ ij ⇠NK(µ⇤ i , ⌃⇤ i ), indicating a K-dimensional Gaussian distribution with mean and covariance given by (µ⇤ i , ⌃⇤ i ); we let ✓⇤ i ⌘(µ⇤ i , ⌃⇤ i ). Then, at any time t, the output of neuron i is xi(t) = P|Ti| j=1 PK k=1 y⇤ ijkdk(t −⌧ij). The total signal received by any electrode is the superposition of the outputs of all neurons. Assume for the moment there are N neurons, and define T ⌘[i2[N]Ti as the (ordered) union of the spike times of all neurons. Let ⌧l 2 T indicate the time of the lth overall spike, whereas ⌧ij 2 Ti is the time of the jth spike of neuron i. This defines a pair of mappings: ⌫: [|T |] ! [N], and p : [|T |] ! T⌫i, with ⌧l = ⌧⌫lpl. In words, ⌫l 2 N is the neuron to which the lth element of T belongs, while pl indexes this spike in the spike train T⌫l. Let ✓l ⌘(µl, ⌃l) be the neuron parameter associated with spike l, so that ✓l = ✓⇤ ⌫l. Finally, define yl ⌘(yl1, . . . , ylK)T ⌘y⇤ ⌫jpj as the weight 2 vector of spike ⌧l. Then, we have that x(t) = X i2[N] xi(t) = X l2|T | X k2[K] ylkdk(t −⌧l), where yl ⇠NK(µl, ⌃l). (1) From the superposition property of the Poisson process [7], the overall spiking activity T is Poisson with rate ⇤= P i2[N] λi. Each event ⌧l 2 T has a pair of labels, its neuron parameter ✓l ⌘(µl, ⌃l), and yl, the weight-vector characterizing the spike shape. We view these weight-vectors as the “marks” of a marked Poisson process T . From the properties of the Poisson process, we have that the marks ✓l are drawn i.i.d. from a probability measure G(d✓) = 1/⇤P i2[N] λiδ✓⇤ i . With probability one, the neurons have distinct parameters, so that the mark ✓l identifies the neuron which produced spike l: G(✓l = ✓⇤ i ) = P(⌫l = i) = λi/⇤. Given ✓l, yl is distributed as in Eq. (1). The output waveform x(t) is then a linear functional of this marked Poisson process. 2.2 A nonparametric model of population activity In practice, the number of neurons driving the recorded activity is unknown. We do not wish to bound this number a priori, moreover we expect this number to increase as we record over longer intervals. This suggests a nonparametric Bayesian approach: allow the total number of underlying neurons to be infinite. Over any finite interval, only a finite subset of these will be active, and typically, these dominate spiking activity over any interval. This elegant and flexible modeling approach allows the data to suggest how many neurons are active, and has already proved successful in neuroscience applications [8]. We use the framework of completely random measures (CRMs) [9] to model our data. CRMs have been well studied in the Bayesian nonparametrics community, and there is a wealth of literature on theoretical properties, as well as posterior computation; see e.g. [10, 11, 12]. Recalling that each neuron is characterized by a pair of parameters (λi, ✓⇤ i ), we map the infinite collection of pairs {(λi, ✓⇤ i )} to an random measure ⇤(·) on ⇥: ⇤(d✓) = P1 i=1 λiδ✓⇤ i . For a CRM, the distribution over measures is induced by distributions over the infinite sequence of weights, and the infinite sequence of their locations. The weights λi are the jumps of a L´evy process [13], and their distribution is characterized by a L´evy measure ⇢(λ). The locations ✓⇤ i are drawn i.i.d. from a base probability measure H(✓⇤). As is typical, we assume these to be independent. We set the L´evy measure ⇢(λ) = ↵λ−1 exp(−λ), resulting in a CRM called the Gamma process (ΓP) [14]. The Gamma process has the convenient property that the total rate ⇤⌘⇤(⇥) = P1 i=1 λi is Gamma distributed (and thus conjugate to the Poisson process prior on T ). The Gamma process is also closely connected with the Dirichlet process [15], which will prove useful later on. To complete the specification on the Gamma process, we set Hφ(✓⇤) to the conjugate normal-Wishart distribution with hyperparameters φ. It is easy to directly specify the resulting continuous-time model, we provide the equations in the Supplementary Material. However it is more convenient to represent the model using the marked Poisson process of Eq. (1). There, the overall process T is a rate ⇤Poisson process, and under a Gamma process prior, ⇤is Gamma(↵, 1) distributed [15]. The labels ✓i assigning events to neurons are drawn i.i.d. from a normalized Gamma process: G(d✓) = (1/⇤) P1 l=1 λl. G(d✓) is a random probability measure (RPM) called a normalized random measure [10]. Crucially, a normalized Gamma process is the Dirichlet process (DP) [15], so that the spike parameters ✓are i.i.d. draws with a DP-distributed RPM. For spike l, the shape vector is drawn from a normal with parameters (µl, ⌃l): these are thus draws from a DP mixture (DPM) of Gaussians [16]. We can exploit the connection with the DP to integrate out the infinite-dimensional measure G(·) (and thus ⇤(·)), and assign spikes to neurons via the so-called Chinese restaurant process (CRP) [17]. Under this scheme, the lth spike is assigned the same parameter as an earlier spike with probability proportional to the number of earlier spikes having that parameter. It is assigned a new parameter (and thus, a new neuron is observed) with probability proportional to ↵. Letting Ct be the number of neurons observed until time t, and T t i = Ti \ [0, t) be the times of spikes produced by neuron i before time t, we then have for spike l at time t = ⌧l: ✓l = ✓⇤ ⌫l, where P(⌫l = i) / ⇢|T t i | i 2 [Ct], ↵ i = Ct + 1, (2) This marginalization property of the DP allows us to integrate out the infinite-dimensional rate vector ⇤(·), and sequentially assign spikes to neurons based on the assignments of earlier spikes. This requires one last property: for the Gamma process, the RPM G(·) is independent of the total mass ⇤. Consequently, the clustering of spikes (determined by G(·)) is independent of the rate ⇤at which they are produced. We then have the following model: 3 T ⇠PP(⇤), where ⇤⇠ΓP(↵, 1), (3a) yl ⇠NK(µl, ⌃l), where (µl, ⌃l) ⇠CRP(↵, Hφ(·)), l 2 [|T |], (3b) x(t) = P l2|T | P k2[K] ylkdk(t −⌧l) + "t where " ⇠GP(0, K). (3c) 2.3 A discrete-time approximation The previous subsections modeled the continuous-time voltage output of a neural population. Our data on the other hand consists of recordings at a discrete set of times. While it is possible to make inferences about the continuous-time process underlying these discrete recordings, in this paper, we restrict ourselves to the discrete case. The marked Poisson process characterization of Eq. 3 leads to a simple discrete-time approximation of our model. Recall first the Bernoulli approximation to the Poisson process: a sample from a Poisson process with rate ⇤can be approximated by discretizing time at a granularity ∆, and assigning each bin an event independently with probability ⇤∆(the accuracy of the approximation increasing as ∆tends to 0). To approximate the marked Poisson process T , all that is additionally required is to assign marks ✓i and yi to each event in the Bernoulli approximation. Following Eqs. (3b) and (3c), the ✓l’s are distributed according to a Chinese restaurant process, while each yl is drawn from a normal distribution parametrized by the corresponding ✓l. We discretize the elements of dictionary as well, yielding discrete dictionary elements edk,: = ( edk,1, . . . , edk,L)T. These form the rows of a K ⇥L matrix eD (we call its columns ed:,h). The shape of the jth spike is now a vector of length L, and for a weight vector y, is given by eDy. We can simplify notation a little for the discrete-time model. Let t index time-bins (so that for an observation interval of length T, t 2 [T/∆]). We use tildes for variables indexed by bin-position. Thus, e⌫t and e✓t are the neuron and neuron parameter associated with time bin t, and eyt is its weightvector. Let the binary variable ezt indicate whether or not a spike is present in time bin t (recall that ezt ⇠Bernoulli(⇤∆)). If there is no spike associated with bin t, then we ignore the marks eµ and ey. Thus the output at time t, xt is given by xt = PL h=1 ezt−hd T :,heyt−h−1 + "t. Note that the noise "t is now a discrete-time Markov Gaussian process. Let a and rt be the decay and innovation of the resulting autoregressive (AR) process, so that "t+1 = a"t + rt. 2.4 Correlations in time and across electrodes So far, for simplicity, we restricted our model to recordings from a single channel. We now describe the full model we use in experiments with multichannel recordings. We let every spike affect the recordings at all channels, with the spike shape varying across channels. For spike l in channel m, call the weight-vector ym l . All these vectors must be correlated as they correspond to the same spike; we do this simply by concatenating the set of vectors into a single MK-element vector yl = (y1 l ; · · · ; yM l ), and modeling this as a multivariate normal. In principle, one might expect the associated covariance matrix to possess a block structure (corresponding to the subvector associated with each channel); however, rather than building this into the model, we allow the data to inform us about any such structure. We also relax the requirement that the parameters ✓⇤of each neuron remain constant, and instead allow µ⇤, the mean of the weight-vector distribution, to evolve with time (we keep the covariance parameter ⌃⇤ i fixed, however). Such flexibility can capture effects like changing cell characteristics or moving electrodes. Like the noise term, we model the time-evolution of this quantity as a realization of a Markov Gaussian process; again, in discrete-time, this corresponds to a simple first-order AR process. With B 2 RK⇥K the transition matrix, and rt 2 RK, independent Gaussian innovations, we have µ⇤ t+1 = Bµ⇤ t + rt. Where we previously had a DP mixture of Gaussians, we now have a DP mixture of GPs. Each neuron is now associated with a vector-valued function ✓⇤(·), rather than a constant. When a spike at time ⌧l is assigned to neuron i, it is assigned a weight-vector yl drawn from a Gaussian with mean µ⇤ i (⌧l). Algorithm 1 in the Supplementary Material summarizes the full generative mechanism for the full discrete-time model. 3 Inference There exists a vast literature on computational approaches to posterior inference for Bayesian nonparametric models, especially so for models based on the DP. Traditional approaches are samplingbased, typically involving Markov chain Monte Carlo techniques (see eg. [18, 19]), and recently there has also been work on constructing deterministic approximations to the intractable posterior (eg. [20, 21]). Our problem is complicated by two additional factors. The first is the convolutional nature of our observation process, where at each time, we observe a function of the previous obser4 vations drawn from the DPMM. This is in contrast to the usual situation where one directly observes the DPMM outputs themselves. The second complication is a computational requirement: typical inference schemes are batch methods that are slow and computationally expensive. Our ultimate goal, on the other hand, is to perform inference in real time, making these approaches unsuitable. Instead, we develop an online algorithm for posterior inference. Our algorithm is inspired by the sequential update and greedy search (SUGS) algorithm of [22], though that work was concerned with the usual case of i.i.d. observations from a DPMM. We generalize SUGS to our observation process, also accounting for the time-evolution of the cluster parameters and correlated noise. Below, we describe a single iteration of our algorithm for the case a single electrode; generalizing to the multielectrode case is straightforward. At each time t, our algorithm maintains the set of times of the spikes it has inferred from the observations so far. It also maintains the identities of the neurons that it assigned each of these spikes to, as well as the weight vectors determining the shapes of the associated spike waveforms. We indicate these point estimates with the hat operator, so, for example bT t i is the set of estimated spike times before time t assigned to neuron i. In addition to these point estimates, the algorithm also keeps a set of posterior distributions qit(✓⇤ i ) where i spans over the set of neurons seen so far (i.e. i 2 [ bCt]). For each i, qit(✓⇤ i ) approximates the distribution over the parameters ✓⇤ i ⌘(µ⇤ i , ⌃⇤ i ) of neuron i given the observations until time t. Having identified the time and shape of spikes from earlier times, we can calculate their contribution to the recordings xL t ⌘(xt, · · · , xt+L−1)T. Recalling that the basis functions D, and thus all spike waveforms, span L time bins, the residual at time t + t1 is then given by δxt+t1 = xt −P h2[L−t1] bzt−hDbyt−h (at time t, for t1 > 0, we define bzt+t1 = 0). We treat the residual δxt = (δxt, · · · , δxt+L)T as an observation from a DP mixture model, and use this to make hard decisions about whether or not this was produced by an underlying spike, what neuron that spike belongs to (one of the earlier neurons or a new neuron), and what the shape of the associated spike waveform is. The latter is used to calculate qi,t+1(✓⇤ i ), the new distribution over neuron parameters at time t + 1. Our algorithm proceeds recursively in this manner. For the first step we use Bayes’ rule to decide whether there is a spike underlying the residual: P(ezt = 1|δxt) / P i2 b Ct+1P(δxt, ⌫t = i|ezt = 1)P(ezt = 1) (4) Here, P(δxt|⌫t = i, ezt = 1) = R ⇥P(δxt|✓t)qit(✓t)d✓t, while P(⌫t = i|ezt = 1) follows from the CRP update rule (equation (2)). P(δxt|✓t) is just the normal distribution, while we restrict qit(·) be the family of normal-Wishart distribution. We can then evaluate the integral, and then summation (4) to approximate P(ezt = 1|δxt). If this exceeds a threshold of 0.5 we decide that there is a spike present at time t, otherwise, we set ezt = 0. Observe that making this decision involves marginalizing over all possible cluster assignments ⌫t, and all values of the weight vector yt. On the other hand, having made this decision, we collapse these posterior distributions to point estimates b⌫t and byt equal to their MAP values. In the event of a spike (bzt = 1), we use these point estimates to update the posterior distribution over parameters of cluster b⌫t, to obtain qi,t+1(·) from qi,t(·); this is straightforward because of conjugacy. We follow this up with an additional update step for the distributions of the means of all clusters: this is to account for the AR evolution of the cluster means. We use a variational update to keep qi,t+1(·) in the normal-Wishart distribution. Finally we take a stochastic gradient step to update any hyperparameters we wish to learn. We provide all details in the Supplementary material. 4 Experiments Data: In the following, we refer to our algorithm as OPASS1. We used two different datasets to demonstrate the efficacy of OPASS. First, the ever popular, publicly available HC1 dataset as described in [23]. We used the dataset d533101 that consisted of an extracellular tetrode and a single intracellular electrode. The recording was made simultaneously on all electrodes and was set up such that the cell with the intracellular electrode was also recorded on the extracellular array implanted in the hippocampus of an anesthetized rat. The intracellular recording is relatively noiseless and gives nearly certain firing times of the intracellular neuron. The extracellular recording contains the spike waveforms from the intracellular neuron as well as an unknown number of additional neurons. The data is a 4-minute recording at a 10 kHz sampling rate. The second dataset comes from novel NeuroNexus devices implanted in the rat motor cortex. The data was recorded at 32.5 kHz in freely-moving rats. The first device we consider is a set of 1Online gamma Process Autoregressive Spike Sorting 5 3 channels of data (Fig. 7a). The neighboring electrode sites in these devices have 30 µm between electrode edges and 60 µm between electrode centers. These devices are close enough that a locallyfiring neuron could appear on multiple electrode sites [2], so neighboring channels warrant joint processing. The second device has 8-channels (see Fig. 10a), but is otherwise similar to the first. We used a 15-minute segment of this data for our experiments. For both datasets, we preprocessed with a high-pass filter at 800 Hz using a fourth order Butterworth filter before we analyzed the time series. To define D, we used the first five principle components of all spikes detected with a threshold (three times the standard deviation of the noise above the mean) in the first five seconds. The noise standard deviation was estimated both over the first five seconds of the recording as well as the entire recording, and the estimate was nearly identical. Our results were also robust to minor variations in the choice of the number of principal components. The autoregressive parameters were estimated by using lag-1 autocorrelation on the same set of data. For the multichannel algorithms we estimate the covariance between channels and normalize by our noise variance estimate. Each algorithm gives a clustering of the detected spikes. In this dataset, we only have a partial ground truth, so we can only verify accuracy for the neuron with the intracellular (IC) recording. We define a detected spike to be an IC spike if the IC recording has a spike within 0.5 milliseconds (ms) of the detected spike in the extracellular recording. We define the cluster with the greatest number of intracellular spikes as a the “IC cluster”. We refer to these data as “partial ground truth data”, because we know the ground truth spike times for one of the neurons, but not all the others. Algorithm Comparisons We compare a number of variants of OPASS, as well as several previously proposed methods, as described below. The vanilla version of OPASS operates on a single channel with colored noise. When using multiple channels, we append an “M” to obtain MOPASS. When we model the mean of the waveforms as an auto-regressive process, we “post-pend” to obtain OP A SSR. We compare these variants of OPASS to Gaussian mixture models and k-means [5] with N components (GMM-N and K-N, respectively), where N indicates the number of components. We compare with a Dirichlet Process Mixture Model (DPMM) [8] as well as the Focused Mixture Model (FM M) [24], a recently proposed Bayesian generative model with state-of-the-art performance. Finally, with compare with OSORT [25], an online sorting algorithm. Only OPASS and OSORT methods were online as we desired to compare to the state-of-the-art batch algorithms which use all the data. Note that OPASS algorithms learned D from the first five seconds of data, whereas all other algorithms used a dictionary learned from the entire data set. The single-channel experiments were all run on channel 2 (the results were nearly identical for all channels). The spike detections for the offline methods used a threshold of three times the noise standard deviation [5] (unless stated otherwise), and windowed at a size L = 30. For multichannel data, we concatenated the M channels for each waveform to obtain a M ⇥L-dimensional vector. The online algorithms were all run with weakly informative parameters. For the normal-Wishart, we used µ0 = 0 , λ0 = 0.1, W = 10I, and ⌫= 1 (I is the identity matrix). The AR process corresponded to a GP with length-scale 30 seconds, and variance 0.1. ↵was set to 0.1. The parameters were insensitive to minor changes. Running time in unoptimized MATLAB code for 4 minutes of data was 31 seconds for a single channel and 3 minutes for all 4 channels on a 3.2 GHz Intel Core i5 machine with 6 GB of memory (see Supplementary Fig. 11 for details). Performance on partial ground truth data The main empirical result of our contribution is that all variants of OPASS detect more true positives with fewer false positives than any of the other algorithms on the partial ground truth data (see Fig. 1). The only comparable result is the OSORT; however, the OSORT algorithm split the IC cluster into 2 different clusters and we combined the two clusters into one by hand. Our improved sensitivity and specificity is despite the fact that OP A SS is fully online, whereas all the algorithms (besides OSORT) that we compare to are batch algorithms using all data for all spikes. Note that all the comparison algorithms pre-process the data via thresholding at some constant (which we set to three standard deviations above the mean). To assess the extent to which performance of OPASS is due to not thresholding, we implement FA K E-OPASS, which thresholds the data. Indeed, FAKE-OPASS’s performance is much like that of the batch algorithms. To get uncertainty estimates, we split the data into ten random two minute segments and repeat this analysis and the results are qualitatively similar. One possible explanation for the relatively poor performance of the batch algorithms as compared to OPASS is a poor choice of the important—but often overlooked—threshold parameter. The right panel of Fig. 1 shows the receiver operating characteristic (ROC) curve for the k-means algorithms as well as OPASS and MOPASS (where M indicates multichannel, see below for detail). Although we 6 4 6 8 10 12 x 10 −5 0.75 0.8 0.85 0.9 0.95 1 K−2 K−3 K−4 K−5 GMM−2 GMM−3 GMM−4 GMM−5 O OR MO MOR FAKE−O O−W FMM DPMM FOSORT False Positive Rate True Positive Rate Performance on the IC Cluster 0 0.5 1 x 10 −4 0 0.2 0.4 0.6 0.8 1 False Positive Rates True Positive Rates ROC Curves for the IC Cluster K−4 OR MOR Figure 1: OPASS achieves improved sensitivity and specificity over all competing methods on partial ground truth data. (a) True positive and false positive rates for all variants of OPASS and several competing algorithms. (b) ROC curves demonstrating that OPASS outperforms all competitor algorithms, regardless of threshold (• indicates learning ⇤from the data). 0.5 1 1.5 2 2.5 3 3.5 4 −1 0 1 Overlapping Spikes 0 1 2 3 4 −1 0 1 Time (ms) Amplitude, mv Residuals 0 5 10 0 20 40 60 80 100 120 Residual Sum of Squares Frequency Overlapping Spike Residuals No Spikes 1st Only 2nd Only Both Figure 2: OPASS detects multiple overlapping waveforms (Top Left) The observed voltage (solid black), MAP waveform 1 (red), MAP waveform 2 (blue), and waveform from the sum (dashed-black). (Bottom Left) Residuals from same example snippet, showing a clear improvement in residuals. typically run OPASS without tuning parameters, the prior on ⇤sets the expected number of spikes, which we can vary in a kind of “empirical Bayes” strategy. Indeed, the OPASS curves are fully above the batch curves for all thresholds and priors, suggesting that regardless of which threshold one chooses for pre-processing, OPA SS always does better on these data than all the competitor algorithms. Moreover, in OPASSwe are able to infer the parameter ⇤at a reasonable point, and the inferred ⇤is shown in the left panel of Fig. 1. and the points along the curve in the right panel. These figures also reveal that using the correlated noise model greatly improves performance. The above analysis suggests OPAS S’s ability to detect signals more reliably than thresholding contributes to its success. In the following, we provide evidence suggesting how several of OPASS’s key features are fundamental to this improvement. Overlapping Spike Detection A putative reason for the improved sensitivity and specificity of OP A SS over other algorithms is its ability to detect overlapping spikes. When spikes overlap, although the result can accurately be modeled as a linear sum in voltage space, the resulting waveform often does not appear in any cluster in PC space (see [1]). However, our online approach can readily find such overlapping spikes. Fig. 2 (top left panel) shows one example of 135 examples where OP A SS believed that multiple waveforms were overlapping. Note that even though the waveform peaks are approximately 1 ms from one another, thresholding algorithms do not pick up these spikes, because they look different in PC space. Indeed, by virtue of estimating the presence of multiple spikes, the residual squared error between the expected voltage and observed voltage shrinks for this snippet (bottom left). The right panel of Fig. 2 shows the density of the residual errors for all putative overlapping spikes. The mass of this density is significantly smaller than the mass of the other scenarios. Of the 135 pairs of overlapping spikes, 37 of those spikes came from the intracellular neuron. Thus, while it seems detecting overlapping spikes helps, it does not fully explain the improvements over the competitor algorithms. Time-Varying Waveform Adaptation As has been demonstrated previously [26], the waveform shape of a neuron may change over time. The mean waveform over time for the intracellular neuron is shown in Fig. 3a. Clearly, the mean waveform is changing over time. Moreover, these changes are reflected in the principal component space (Fig. 3b). We therefore compared means and variances OP A SS with OPASSR, which models the mean of the dictionary weights via an auto-regressive process. Fig. 3c shows that the auto-regressive model for the mean dictionary weights yields a timevarying posterior (top), whereas the static prior yields a constant posterior mean with increasing posterior marginal variances (bottom). More precisely, the mean of the posterior standard deviations for the time-varying prior is about half of that for the static prior’s posteriors. Indeed, the OPASSR yields 11 more true detections than OPASS. Multielectrode Array OPASS achieved a heightened sensitivity by incorporating multiple channels (see MOPASS point in Fig. 1). We further evaluate the impact of multiple channels using a three 7 0 1 2 3 −0.5 0 0.5 1 ms Amplitude, units Evolution of the IC Waveform Shape (a) 0.5 1 1.5 2 0 0.5 1 1.5 2 PCA Component 1 PCA Component 2 Evolution of IC Waveform in PC Space Elapsed Seconds 33 66 100 133 166 200 (b) 0 1 2 3 O ms OR IC Cluster Posterior Parameters 1 Min 3 Min 4 Min (c) Figure 3: The IC waveform changes over time, which our posterior parameters track. (a) Mean IC waveforms over time. Each colored line represents the mean of the waveform averaged over 24 seconds with color denoting the time interval. This neuron decreases in amplitude over the period of the recording. (b) The same waveforms plotted in PC space still captures the temporal variance. (c) The mean and standard deviation of the waveforms at three time points for the auto-regressive prior on the mean waveform (top) and static prior (bottom). While the auto-regressive prior admits adaptation to the time-varying mean, the posterior of the static prior simply increases its variance. −0.05 0 0.05 Amplitude, mv Ch1 Ch2 Ch3 −0.05 0 0.05 Amplitude, mv Ch1 Ch2 Ch3 Figure 4: Improving OPASS by incorporating multiple channels. The top 2 most prevalent waveforms from the NeuroNexus dataset with three channels. Note that the left panel has a waveform that appears on both channel 2 and channel 3, whereas the waveform in the right panel only appears in channel 3. If only channel 3 was used, it would be difficult to separate these waveform. channel NeuroNexus shank (Supp. Fig. 7a). In Fig. 4 we show the top two most prevalent waveforms from these data across the three electrodes. Had only the third electrode been used, these two waveforms would not be distinct (as evidenced by their substantial overlap in PC space upon using only the third channel in Fig. 7b). This suggests that borrowing strength across electrodes improves detection accuracy. Supplementary Fig. 10 shows a similar plot for the eight channel data. 5 Discussion Our improved sensitivity and specificity seem to arise from multiple sources including (i) improved detection, (ii) accounting for correlated noise, (iii) capturing overlapping spikes, (iv) tracking waveform dynamics, and (v) utilizing multiple channels. While others have developed closely related Bayesian models for clustering [8, 27], deconvolution based techniques [1], time-varying waveforms [26], or online methods [25, 3], we are the first to our knowledge to incorporate all of these. An interesting implication of our work is that it seems that our errors may be irreconcilable using merely first order methods (that only consider the mean waveform to detect and cluster). Supp. Fig. 8a shows the mean waveform of the true and false positives are essentially identical, suggesting that even in the full 30-dimensional space excluding those waveforms from intracellular cluster would be difficult. Projecting each waveform into the first two PCs is similarly suggestive, as the missed positives do not seem to be in the cluster of the true positives (Supp. Fig. 8b). Thus, in future work, we will explore dynamic and multiscale dictionaries [28], as well as incorporate a more rich history and stimulus dependence. Acknowledgments This research was supported in part by the Defense Advanced Research Projects Agency (DARPA), under the HIST program managed by Dr. Jack Judy. 8 References [1] J W Pillow, J Shlens, E J Chichilnisky, and E P Simoncelli. A model-based spike sorting algorithm for removing correlation artifacts in multi-neuron recordings. PLoS ONE, 8(5):1–15, 2013. [2] J S Prentice, J Homann, K D Simmons, G Tkaˇcik, V Balasubramanian, and P C Nelson. Fast, scalable, Bayesian spike identification for multi-electrode arrays. PloS one, 6(7):e19884, January 2011. [3] F Franke, M Natora, C Boucsein, M H J Munk, and K Obermayer. An online spike detection and spike classification algorithm capable of instantaneous resolution of overlapping spikes. Journal of Computational Neuroscience, 29(1-2):127–148, August 2010. [4] W Gerstner and W M Kistler. Spiking Neuron Models: Single Neurons, Populations, Plasticity. Cambridge University Press, 1 edition, August 2002. [5] M S Lewicki. A review of methods for spike sorting: the detection and classification of neural action potentials. Network: Computation in Neural Systems, 1998. [6] C E Rasmussen and C K I Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [7] J F C Kingman. Poisson processes, volume 3 of Oxford Studies in Probability. The Clarendon Press Oxford University Press, New York, 1993. Oxford Science Publications. [8] F Wood and M J Black. A non-parametric Bayesian alternative to spike sorting. Journal of Neuroscience Methods, 173:1–12, 2008. [9] J F C Kingman. Completely random measures. Pacific Journal of Mathematics, 21(1):59–78, 1967. [10] L F James, A Lijoi, and I Pruenster. Posterior analysis for normalized random measures with independent increments. Scand. J. Stat., 36:76–97, 2009. [11] N L Hjort. Nonparametric Bayes estimators based on beta processes in models for life history data. Annals of Statistics, 18(3):1259–1294, 1990. [12] R Thibaux and M I Jordan. Hierarchical beta processes and the Indian buffet process. In Proceedings of the International Workshop on Artificial Intelligence and Statistics, volume 11, 2007. [13] K Sato. L´evy Processes and Infinitely Divisible Distributions. Cambridge University Press, 1990. [14] D Applebaum. L´evy Processes and Stochastic Calculus. Cambridge studies in advanced mathematics. University Press, 2004. [15] T S Ferguson. A Bayesian analysis of some nonparametric problems. The Annals of Statistics, 1(2):209– 230, 1973. [16] A Y Lo. On a class of bayesian nonparametric estimates: I. density estimates. Annals of Statistics, 12(1):351–357, 1984. [17] J Pitman. Combinatorial stochastic processes. Technical Report 621, Department of Statistics, University of California at Berkeley, 2002. Lecture notes for St. Flour Summer School. [18] R M Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9:249–265, 2000. [19] H Ishwaran and L F James. Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453):161–173, 2001. [20] D M Blei and M I Jordan. Variational inference for Dirichlet process mixtures. Bayesian Analysis, 1(1):121–144, 2006. [21] T P Minka and Z Ghahramani. Expectation propagation for infinite mixtures. Presented at NIPS2003 Workshop on Nonparametric Bayesian Methods and Infinite Models, 2003. [22] L Wang and D B Dunson. Fast bayesian inference in dirichlet process mixture models. Journal of Computational & Graphical Statistics, 2009. [23] D A Henze, Z Borhegyi, J Csicsvari, A Mamiya, K D Harris, and G Buzsaki. Intracellular feautures predicted by extracellular recordings in the hippocampus in Vivo. J. Neurophysiology, 2000. [24] D E Carlson, Q Wu, W Lian, M Zhou, C R Stoetzner, D Kipke, D Weber, J T Vogelstein, D B Dunson, and L Carin. Multichannel Electrophysiological Spike Sorting via Joint Dictionary Learning and Mixture Modeling. IEEE TBME, 2013. [25] U Rutishauser, E M Schuman, and A N Mamelak. Online detection and sorting of extracellularly recorded action potentials in human medial temporal lobe recordings, in vivo. J. Neuro. Methods, 2006. [26] A Calabrese and L Paninski. Kalman filter mixture model for spike sorting of non-stationary data. Journal of neuroscience methods, 196(1):159–169, 2011. [27] J Gasthaus, F D Wood, D Gorur, and Y W Teh. Dependent dirichlet process spike sorting. Advances in neural information processing systems, 21:497–504, 2009. [28] G Chen, M Iwen, S Chin, and M. Maggioni. A fast multiscale framework for data in high-dimensions: Measure estimation, anomaly detection, and compressive measurements. In VCIP, 2012 IEEE, 2012. 9
2013
210
4,944
Direct 0-1 Loss Minimization and Margin Maximization with Boosting Shaodan Zhai, Tian Xia, Ming Tan and Shaojun Wang Kno.e.sis Center Department of Computer Science and Engineering Wright State University {zhai.6,xia.7,tan.6,shaojun.wang}@wright.edu Abstract We propose a boosting method, DirectBoost, a greedy coordinate descent algorithm that builds an ensemble classifier of weak classifiers through directly minimizing empirical classification error over labeled training examples; once the training classification error is reduced to a local coordinatewise minimum, DirectBoost runs a greedy coordinate ascent algorithm that continuously adds weak classifiers to maximize any targeted arbitrarily defined margins until reaching a local coordinatewise maximum of the margins in a certain sense. Experimental results on a collection of machine-learning benchmark datasets show that DirectBoost gives better results than AdaBoost, LogitBoost, LPBoost with column generation and BrownBoost, and is noise tolerant when it maximizes an n′th order bottom sample margin. 1 Introduction The classification problem in machine learning and data mining is to predict an unobserved discrete output value y based on an observed input vector x. In the spirit of the model-free framework, it is always assumed that the relationship between the input vector and the output value is stochastic and described by a fixed but unknown probability distribution p(X, Y ) [7]. The goal is to learn a classifier, i.e., a mapping function f(x) from x to y ∈Y such that the probability of the classification error is small. As it is well known, the optimal choice is the Bayes classifier [7]. However, since p(X, Y ) is unknown, we cannot learn the Bayes classifier directly. Instead, following Vapnik’s general setting of the empirical risk minimization [7, 24], we focus on a more realistic goal: Given a set of training data D = {(x1, y1), · · · , (xn, yn)} independently drawn from p(X, Y ), we consider finding f(x) in a function class H that minimizes the empirical classification error, 1 n n X i=1 1(ˆyi ̸= yi) (1) where ˆyi = arg maxy∈Y yf(xi), Y = {−1, 1} and 1(·) is an indicator function. Under certain conditions, direct empirical classification error minimization is consistent [24] and under low noise situations it has a fast convergence rate [15, 23]. However, due to the nonconvexity, nondifferentiability and discontinuity of the classification error function, the minimization of (1) is typically NP-hard for general linear models [13]. The common approach is to minimize a surrogate function which is usually a convex upper bound of the classification error function. The problem of minimizing the empirical surrogate loss turns out to be a convex programming problem with considerable computational advantages and learned classifiers remain consistent to Bayes classifier [1, 20, 28, 29], however clearly there is a mismatch between “desired” loss function used in inference and “training” loss function during the training process [16]. Moreover, it has been shown that all boosting algorithms based on convex functions are susceptible to random classification noise [14]. Boosting is a machine-learning method based on the idea of creating a single, highly accurate classifier by combining many weak and inaccurate “rules of thumb.” A remarkably rich theory and a record of empirical success [18] have evolved around boosting, nevertheless it is still not clear how to best exploit what is known about how boosting operates, even for binary classification. In 1 this paper, we propose a boosting method for binary classification – DirectBoost – a greedy coordinate descent algorithm that directly minimizes classification error over labeled training examples to build an ensemble linear classifier of weak classifiers. Once the training error is reduced to a (local coordinatewise) minimum, DirectBoost runs a coordinate ascent algorithm that greedily adds weak classifiers by directly maximizing any targeted arbitrarily defined margins, it might escape the region of minimum training error in order to achieve a larger margin. The algorithm stops once a (local coordinatewise) maximum of the margins is reached. In the next section, we first present a coordinate descent algorithm that directly minimizes 0-1 loss over labeled training examples. We then describe coordinate ascent algorithms that aims to directly maximize any targeted arbitrarily defined margins right after we reach a (local coordinatewise) minimum of 0-1 loss. In Section 3, we show experimental results on a collection of machine-learning benchmark data sets for DirectBoost, AdaBoost [9], LogitBoost [11], LPBoost with column generation [6] and BrownBoost [10], and discuss our findings. Due to space limitation, the proofs of theorems, related works, technical details as well as conclustions and future works are given in the full version of this paper [27]. 2 DirectBoost: Minimizing 0-1 Loss and Maximizing Margins Let H = {h1, ..., hl} denote the set of all possible weak classifiers that can be produced by the weak learning algorithm, where a weak classifier hj ∈H is a mapping from an instance space X to Y = {−1, 1}. The hjs are not assumed to be linearly independent, and H is closed under negation, i.e., both h and −h belong to H. We assume that the training set consists of examples with labels {(xi, yi)}, i = 1, · · · , n, where (xi, yi) ∈X × Y that are generated independently from p(X, Y ). We define C of H as the set of mappings that can be generated by taking a weighted average of classifiers from H: C = ( f : x → X h∈H αhh(x) | αh ≥0 ) , (2) The goal here is to find f ∈C that minimizes the empirical classification error (1), and has good generalization performance. 2.1 Minimizing 0-1 Loss Similar to AdaBoost, DirectBoost works by sequentially running an iterative greedy coordinate descent algorithm, each time directly minimizing true empirical classification error (1) instead of a weighted empirical classification error in AdaBoost. That is, for each iteration, only the parameter of a weak classifier that leads to the most significant true classification error reduction is updated, while the weights of all other weak classifiers are kept unchanged. The rationale is that the inference used to predict the label of a sample can be written as a linear function with a single parameter. Consider the tth iteration, the ensemble classifier is ft(x) = t X k=1 αkhk(x) (3) where previous t −1 weak classifiers hk(x) and corresponding weights αk, k = 1, · · · , t −1 have been selected and determined. The inference function for sample xi is defined as Ft(xi, y) = yft(xi) = y ( t−1 X k=1 αkhk(xi)) + αtyht(xi) (4) Since a(xi) = Pt−1 k=1 αkhk(xi) is constant and hk(xi) is either +1 or -1 depending on sample xi, we re-write the equation above as, Ft(xi, y) = y ht(xi)αt + ya(xi) (5) Note that for each label y of sample xi, there is a linear function of αt with the slope to be either +1 or -1 and intercept to be ya(xi). Given an input of αt, each example xi has two linear scoring functions, Ft(xi, +1) and Ft(xi, −1), i = 1, · · · , n, one for the positive label y = +1 and one for the negative label y = −1. From these two linear scoring functions, the one with the higher score determines the predicted label ˆyi of the ensemble classifier ft(xi). The intersection point ei of these two linear scoring functions is the critical point that the predicted label ˆyi switches its sign, the intersection point satisfies the condition that Ft(xi, +1) = Ft(xi, −1) = 0, i.e. a(xi) + αtht(xi) = 0, and can be computed as ei = −a(xi) ht(xi), i = 1, · · · , n. These points divide αt into (at most) n + 1 intervals, each interval has the value of a true classification error, thus the classification error is a stepwise 2 Algorithm 1 Greedy coordinate descent algorithm that minimizes a 0-1 loss. 1: D = {(xi, yi), i = 1, · · · , n} 2: Sort |a(xi)|, i = 1, · · · , n in an increasing order. 3: for a weak classifier hk ∈H do 4: Visit each sample in the order that |a(xi)| is increasing. 5: Compute the slope and intercept of F(xi, yi) = yihk(xi)α + yia(xi). 6: Let ˆei = |a(xi)|. 7: If (slope > 0 and intercept < 0), error update on the righthand side of ˆei is -1. 8: If (slope < 0 and intercept > 0), error update on the righthand side of ˆei is +1. 9: Incrementally calculate classification error on intervals of ˆeis. 10: Get the interval that has minimum classification error. 11: end for 12: Pick the weak classifiers that lead to largest classification error reduction. 13: Among selected these weak classifiers, only update the weight of one weak classifier that gives the smallest exponential loss. 14: Repeat 2-13 until training error reaches minimum. function of αt. The value of ei, i = 1, · · · , n can be negative or positive, however since H is closed in negation, we only care about these that are positive. The greedy coordinate descent algorithm that sequentially minimizes a 0-1 loss is described in Algorithm 1, lines 3-11 are the weak learning steps and the rest are boosting steps. Consider an example with 4 samples to illustrate this procedure. Suppose for a weak classifier, we have Ft(xi, yi), i = 1, 2, 3, 4 as shown in Figure 1. At αt = 0, samples x1 and x2 have negative margins, thus they are misclassified, the error rate is 50%. We incrementally update the classification error on intervals of ˆei, i = 1, 2, 3, 4: For Ft(x1, y1), its slope is negative and its intercept is negative, sample x1 always has a negative margin for αt > 0, thus there is no error update on the right-hand side of ˆe1. For Ft(x2, y2), its slope is positive and its intercept is negative, then when αt is at the right side of ˆe2, sample x2 has positive margin and becomes correctly classified, so we update the error by -1, the error rate is reduced to 25%. For Ft(x3, y3), its slope is negative and its intercept is positive, then when αt is at the right side of ˆe3, sample x3 has a negative margin and becomes misclassified, so we update the error rate changes to 50% again. For Ft(x4, y4), its slope is positive and its intercept is positive, sample x4 always has positive margin for αt > 0, thus there is no error update on the right-hand side of ˆe4. We finally have the minimum error rate of 25% on the interval of [ˆe2, ˆe3]. 0 a1 a2 a3,|a3| a4,|a4| |a1| |a2| ˆe1 ˆe2 ˆe3 ˆe4 0 Ft(x2, y2) Ft(x3, y3) Ft(x4, y4) Ft(x1, y1) 25% 50% Classification error αt αt ˆe2 ˆe3 Figure 1: An example of computing minimum 0-1 loss of a weak learner over 4 samples. We repeat this procedure until the training error reaches its minimum, which may be 0 in a data separable case. We then go to the next stage, explained below, that aims to maximize margins. A nice property of the above greedy coordinate descent algorithm is that the classification error is monotonically decreasing. Assume there are M weak classifiers be considered, the computational complexity of Algorithm 1 in the training stage is O(Mn) for each iteration. For boosting, as long as the weaker learner is strong enough to achieve reasonably high accuracy, the data will be linearly separable and the minimum 0-1 loss is usually 0. As shown in Theorem 1, the region of zero 0-1 loss is a (convex) cone. Theorem 1 The region of zero training error, if exists, is a cone, and it is not a set of isolated cones. Algorithm 1 is a heuristic procedure that minimizes 0-1 loss, it is not guaranteed to find the global minimum, it may trap to a coordinatewise local minimum [22] of 0-1 loss. Nevertheless, we switch to algorithms that directly maximize the margins we present below. 2.2 Maximizing Margins The margins theory [17] provides an insightful analysis for the success of AdaBoost where the authors proved that the generalization error of any ensemble classifiers is bounded in terms of the 3 entire distribution of margins of training examples, as well as the number of training examples and the complexity of the base classifiers, and AdaBoost’s dynamics has a strong tendency to increase the margins of training examples. Instead, we can prove that the generalization error of any ensemble classifier is bounded in terms of the average margin of bottom n′ samples or n′th order margin of training examples, as well as the number of training examples and the complexity of the base classifiers. This view motivates us to propose a coordinate ascent algorithm to directly maximize several types of margins just right after the training error reaches a (local coordinatewise) minimum. The margin of a labeled example (xi, yi) with respect to an ensemble classifier ft(x) = Pt k=1 αkhk(xi) is defined to be mi = yi Pt k=1 αkhk(xi) Pt k=1 αk (6) This is a real number between -1 and +1 that intuitively measures the confidence of the classifier in its prediction on the ith example. It is equal to the weighted fraction of base classifiers voting for the correct label minus the weighted fraction voting for the incorrect label [17]. We denote the minimum margin, the average margin, and median margin over the training examples as gmin = mini∈{1,··· ,n} mi, gaverage = 1 n Pn i=1 mi, and gmedian = median{mi, i = 1, · · · , n}. Furthermore, we can sort the margins over all training examples in an increasing order, and consider n′ worst training examples n′ ≤n that have smaller margins, and compute the average margin over those n′ training examples. We call this the average margin of the bottom n′ samples, and denote it as gaverage n′ = 1 n′ P i∈Bn′ mi, where Bn′ denotes the set of n′ samples having the smallest margins. The margin maximization method described below is a greedy coordinate ascent algorithm that adds a weak classifier achieving maximum margin. It allows us to continuously maximize the margin while keeping the training error at a minimum by running the greedy coordinate descent algorithm presented in the previous section. The margin mi is a linear fractional function of α, and it is quasiconvex, and quasiconcave, i.e., quasilinear [2, 5]. Theorem 2 shows that the average margin of bottom n′ examples is quasiconcave in the region of the zero training error. Theorem 2 Denote the average margin of bottom n′ samples as gaverage n′(α) = X i∈{Bn′ |α} yi Pt k=1 αkhk(xi) Pt k=1 αk where {Bn′|α} denotes the set of n′ samples whose margins are at the bottom for fixed α. Then gaverage n′(α) in the region of zero training error is quasiconcave. We denote ai = Pt−1 k=1 yiαkhk(xi), bi,t = yiht(xi) ∈{−1, +1} and c = Pt−1 k=1 αk, then the margin on the ith example (xi, yi) can be rewritten as, mi = ai + bi,tαt c + αt (7) The derivative of the margin on ith example with respect to αt is calculated as, ∂mi ∂αt = bi,tc −ai (c + αt)2 (8) αt 0 d m6 m5 m4 m3 m2 m1 Margin q1 q2 q3 q4 Figure 2: Margin curves of six examples. At points q1, q2, q3 and q4, the median example is changed. At points q2 and q4, the set of bottom n′ = 3 examples are changed. Since c ≥ai, depending on the sign of bi,t, the derivative of the margin on the ith sample (xi, yi) is either positive or negative, which is irrelevant to the value of αt. This is also true for the second derivative of the margin. Therefore, the margin on the ith example (xi, yi) with respect to αt is either concave when it is monotonically increasing or convex when it is monotonically decreasing. See Figure 2 for a simple illustration. Consider a greedy coordinate ascent algorithm that maximizes the average margin gaverage over all training examples. The derivative of gaverage can be written as, ∂gaverage ∂αt = Pn i=1 bi,tc −Pn i=1 ai (c + αt)2 (9) 4 Algorithm 2 Greedy coordinate ascent algorithm that maximizes the average margin of bottom n′ examples. 1: Input: ai=1,··· ,n and c from previous round. 2: Sort ai=1,··· ,n in an increasing order. Bn′ ←{n′ samples having the smallest ai at αt = 0}. 3: for a weak classifier do 4: Determine the lowest sample whose margin is decreasing and determine d. 5: Compute Dn′ ←P i∈Bn′ (bi,tc −ai). 6: j ←0, qj ←0. 7: Compute the intersection qj+1 of the j +1th highest increasing margin in Bn′ and the j +1th smallest decreasing margin in Bc n′ (the complement of the set Bn′). 8: if qj+1 < d and Dn′ > 0 then 9: Incrementally update Bn′, Bc n′ and Dn′ at αt = qj+1; j ←j + 1. 10: Go back to Line 7. 11: else 12: if Dn′ > 0 then q∗←d; otherwise q∗←qj. 13: Compute the average margin of the bottom n′ examples at q∗. 14: end if 15: end for 16: Pick the weak classifier with the largest increment of the average margin of bottom n′ examples with weight being q∗. 17: Repeat 2-16 until no increment in average margin of bottom n′ examples. Therefore, the maximum average margin can only happen at two ends of the interval. As shown in Figure 2, the maximum average margin is either at the origin or at point d, which depends on the sign of the derivative in (9). If it is positive, the average margin is monotonically increasing, we set αt = d −ǫ, otherwise we set αt = 0. The greedy coordinate ascent algorithm found by: looking at all weak classifiers in H, if the nominator in (9) is positive, we let its weight ǫ close to the right value on the interval where the training error is minimum, and compute the value of the average margin. We add the weak classifier which has the largest average margin increment. We iterate this procedure until convergence. Its convergence is given by Theorem 3 shown below. Theorem 3 When constrained to the region of zero training error, the greedy coordinate ascent algorithm that maximizes the average margin over all examples converges to an optimal solution. Now consider a greedy coordinate ascent algorithm maximizing the average margin of bottom n′ training examples, gaverage n′. Apparently maximizing the minimum margin is a special case by choosing n′ = 1. Figure 2 is a simple illustration with six training examples. Our aim is to maximize the average margin of the bottom 3 examples. The interval [0, d] of αt indicates an interval where the training error is zero. On the point of d, the sample margin m3 alters from positive to negative, which causes the training error jump from 0 to 1/6. As shown in Figure 2, the margin of each of six training examples is either monotonically increasing or decreasing. If we know a fixed set of bottom n′ training examples having smaller margins for an interval of αt with a minimum training error, it is straightforward to compute the derivative of the average margin of bottom n′ training examples as ∂gaverage n′ ∂αt = P i∈Bn′ bi,tc −P i∈Bn′ ai (c + αt)2 (10) Again gaverage n′ is a monotonic function of αt, depending on the sign of the derivative in (10), it is maximized either on the left side or on the right side of the interval. In general, the set of bottom n′ training examples for an interval of αt with a minimum training error varies over αt, it is required to precisely search for any snapshot of bottom n′ examples with a different value of α. To address this, we first examine when the margins of two examples intersect. Consider the ith example (xi, yi) with margin mi = ai+bi,tαt c+αt and the jth example (xj, yj) with margin mj = aj+bj,tαt c+αt . Notice bi, bj is either -1 or +1. Assume bi = bj, then because mi ̸= mj (since ai ̸= aj), the margins of example i and example j never intersect; assume bi ̸= bj, then because mi = mj 5 at αt = |ai−aj| 2 , the margins of example i and example j might intersect with each other if |ai−aj| 2 belongs to the interval of αt with the minimum training error. In summary, given any two samples, we can decide whether they intersect by checking whether b terms have the same sign, if not, they do intersect, and we can determine the intersection point. The greedy coordinate ascent algorithm that sequentially maximizes the average margin of bottom n′ examples is described in Algorithm 2, lines 3-15 are the weak learning steps and the rest are boosting steps. At line 5 we compute Dn′ which can be used to check the sign of the derivative in (10). Since the function of the average margin of bottom n′ examples is quasiconcave, we can determine the optimal point q∗by Dn′, and only need to compute the margin value at q∗. We add the weak learner, which has the largest increment of the average margin over bottom n′ examples, into the ensembled classifier. This procedure terminates if there is no increment in the average margin of bottom n′ examples over the considered weak classifiers. If M weak learners are considered, the computational complexity of Algorithm 2 in the training stage is O (max(n log n, Mn′)) for each iteration. The convergence analysis of Algorithm 2 is given by Theorem 4. Theorem 4 When constrained to the region of zero training error, the greedy coordinate ascent algorithm that maximizes average margin of bottom n′ samples converges to a coordinatewise maximum solution, but it is not guaranteed to converge to an optimal solution due to the non-smoothness of the average margin of bottom n′ samples. ǫ-relaxation: Unfortunately, there is a fundamental difficulty in the greedy coordinate ascent algorithm that maximizes the average margin of bottom n′ samples: It gets stuck at a corner, from which it is impossible to make progress along any coordinate direction. We propose an ǫ-relaxation method to overcome this difficulty. This method was first proposed by [3] for the assignment problem, and was extended to the linear cost network flow problem and strictly convex costs and linear constraints [4, 21]. The main idea is to allow a single coordinate to change even if this worsens the margin function. When a coordinate is changed, it is set to ǫ plus or ǫ minus the value that maximizes the margin function along that coordinate, where ǫ is a positive number. We can design a similar greedy coordinate ascent algorithm to directly maximize the bottom n′th sample margin by only making a slight modification to Algorithm 2: for a weak classifier, we choose the intersection point that led to the largest increasing of the bottom n′th margin. When combined with ǫ-relaxation, this algorithm will eventually approach a small neighbourhood of a local optimal solution that maximizes the bottom n′th sample margin. As shown in Figure 2, bottom n′th margin is a multimodal function, this algorithm with ǫ-relaxation is very sensitive to the choice of n′, and it usually gets stuck in a bad coordinatewise point without using ǫ-relaxation. However, an impressive advantage is that this method is tolerant to noise, which will be shown in Section 3. 3 Experimental Results In the experiments below, we first evaluate the performance of DirectBoost on 10 UCI data sets. We then evaluate noise robustness of DirectBoost. For all the algorithms in our comparison, we use decision trees with depth of either 1 or 3 as weak learners since for the small datasets, decision stumps (tree depth of 1) is already strong enough. DirectBoost with decision trees is implemented by a greedy top-down recursive partition algorithm to find the tree but differently from AdaBoost and LPBoost, since DirectBoost does not maintain a distribution over training samples. Instead, for each splitting node, DirectBoost simply chooses the attribute to split on by minimizing 0-1 loss or maximizing the predefined margin value. In all the experiments that ǫ-relaxation is used, the value of ǫ is 0.01. Note that our empirical study is focused on whether the proposed boosting algorithm is able to effectively improve the accuracy of state-of-the-art boosting algorithms with the same weak learner space H, thus we restrict our comparison to boosting algorithms with the same weak learners, rather than a wide range of classification algorithms, such as SVMs and KNN. 3.1 Experiments on UCI data We first compare DirectBoost with AdaBoost, LogitBoost, soft margin LPBoost and BrownBoost on 10 UCI data sets1 from the UCI Machine Learning Repository [8]. We partition each UCI dataset into five parts with the same number of samples for five-fold cross validation. In each fold, we use three parts for training, one part for validation, and the remaining part for testing. The validation 1For Adult data, where we use a subset a5a in LIBSVM set http://www.csie.ntu.edu.tw/˜cjlin/libsvm. We do not use the original Adult data which has 48842 examples since LPBoost runs very slow on it. 6 Datasets N D depth AdaBoost LogitBoost LPBoost BrownBoost DirectBoostavg DirectBoostǫ avg DirectBoostorder Tic-tac-toe 958 9 3 1.47(0.7) 1.47(1.0) 2.62(0.8) 3.66(1.3) 0.63(0.4) 1.15(0.8) 1.05(0.4) Diabetes 768 8 3 27.71(1.7) 27.32(1.3) 26.01(3.3) 26.67(2.6) 25.62(2.5) 25.49(3.0) 23.4(3.7) Australian 690 14 3 14.2(1.8) 16.23(2.6) 14.49(4.4) 13.77(4.6) 14.06(3.6) 13.33(3.0) 13.48(2.9) Fourclass 862 2 3 1.86(1.3) 2.44(1.6) 3.02(2.3) 2.33(1.7) 2.33(1.0) 1.86(1.3) 1.74(1.5) Ionosphere 351 34 3 9.71(3.7) 9.71(3.1) 8.57(2.7) 10.86(2.8) 7.71(3.0) 8.29(2.7) 7.71(4.4) Splice 1000 61 3 5.3(1.4) 5.3(2.6) 4.8(1.4) 6.1(1.1) 4.8(0.7) 4.0(0.5) 6.7(1.6) Cancer-wdbc 569 29 1 4.25(2.5) 4.42(1.4) 3.89(1.5) 4.25(2.2) 4.96(3.0) 4.07(2.0) 3.72(2.9) Cancer-wpbc 198 32 1 27.69(7.6) 30.26(7.3) 26.15(10.5) 28.72(8.4) 27.69(8.1) 24.62(7.6) 27.18(10.0) Heart 270 13 1 17.41(7.7) 18.52(5.1) 19.26(8.1) 18.15(7.2) 18.15(5.1) 16.67(7.5) 18.15(7.6) Adult 6414 14 3 15.6(0.7) 15.39(0.8) 16.2(1.1) 15.56(0.9) 16.25(1.7) 15.28(0.8) 15.8(1.1) Table 1: Percent test errors of AdaBoost, LogitBoost, soft margin LPBoost with column generation, BrownBoost, and three DirectBoost methods on 10 UCI datasets each with N samples and D attributes. set is used to choose the optimal model for each algorithm: For AdaBoost and LogitBoost, the validation data is used to perform early stopping since there is no nature stopping criteria for these algorithms. We run the algorithms until convergence where the stopping criterion is that the change of loss is less than 1e-6, and then choose the ensemble classifier from the round with minimum error on the validation data. For BrownBoost, we select the optimal cutoff parameters by the validation set, which are chosen from {0.0001, 0.001, 0.01, 0.03, 0.05, 0.08, 0.1, 0.14, 0.17, 0.2}. LPBoost maximizes the soft margin subject to linear constraints, its objective is equivalent to DirectBoost with maximizing the average margin of bottom n′ samples [19], thus we set the same candidate parameters n′/n = {0.01, 0.05, 0.1, 0.2, 0.5, 0.8} for them. For LPBoost, the termination rule we use is same to the one in [6], and we select the optimal regularization parameter by the validation set. For DirectBoost, the algorithm terminates when there is no increment in the targeted margin value, and we select the model with the optimal n′ by the validation set. We use DirectBoostavg to denote our method that runs Algorithm 1 first and then maximizes the average of bottom n′ margins without ǫ-relaxation, DirectBoostǫ avg to denote our method that runs Algorithm 1 first and then maximizes the average margin of bottom n′ samples with ǫ-relaxation, and DirectBoostorder to denote our method that runs Algorithm 1 first and then maximizes the bottom n′th margin with ǫ-relaxation. The means and standard deviations of test errors are given in Table 1. Clearly DirectBoostavg, DirectBoostǫ avg and DirectBoostorder outperform other boosting algorithms in general, specially DirectBoostǫ avg is better than AdaBoost, LogitBoost, LPBoost and BrownBoost over all data sets except Cancer-wdbc. Among the family of DirectBoost algorithms, DirectBoostavg wins on two datasets where it searches the optimal margin solution in the region of zero training error, this means that keeping the training error at zero may lead to good performance in some cases. DirectBoostorder wins on three other datasets, but its results are unstable and sensitive to n′. With ǫ-relaxation, DirectBoostǫ avg searches the optimal margin solution in the whole parameter space and gives the best performance on the remaining 5 data sets. It is well known that AdaBoost performs well on the datasets with a small test error such as Tic-tac-toe and Fourclass, it is extremely hard for other boosting algorithms to beat AdaBoost. Nevertheless, DirectBoost is still able to give even better results in this case. For example, on Tic-tac-toe data set, the test error becomes 0.63%, more than half the error rate reduction. Our method would be more valuable for those who value prediction accuracy, which might be the case in areas of medical and genetic research. Figure 3: The value of average margins of bottom n′ samples vs. the number of iterations for LPBoost with column generation and DirectBoostǫ avg on Australian dataset, left: Decision tree, right: Decision stump. DirectBoostǫ avg and LPBoost are both designed to maximize the average margin over bottom n′ samples [19], but as shown by the left figure in Figure 3, DirectBoostǫ avg generates a larger margin value than LPBoost when decision trees with depth greater than 1 are used as weak learners, this may explain why DirectBoostǫ avg outperforms LPBoost. When decision stumps are used as weak learners, LPBoost converges to a global optimal solution, and DirectBoostǫ avg nearly converges to the maximum margin as shown by the right figure in Figure 3, even though no theoretical justification is known for this observed phenomenon. 7 # of iterations Total running times AdaBoost 117852 31168 LPBoost 286 167520 DirectBoostǫ avg 1737 606 Table 2: Number of iterations and total run times (in seconds) in training stage on Adult dataset with 10000 training samples and the depth of DecisionTrees is 3. Table 2 shows the number of iterations and total run times (in seconds) for AdaBoost, LPBoost and DirectBoostǫ avg at the training stage, where we use the Adult dataset with 10000 training samples. All these three algorithms employ decision trees with a depth of 3 as weak learners. The experiments are conducted on a PC with Core2 Duo 2.6GHz CPU and 2G RAM. Clearly DirectBoostǫ avg takes less time for the entire training stage since it converges much faster. LPBoost converges in less than three hundred rounds, but as a total corrective algorithm, it has a greater computational cost on each round. To handle large scale data sets in practice, similar to AdaBoost, we can use many tricks. For example, we can partition the data into many parts and use distributed algorithms to select the weak classifier. 3.2 Evaluate noise robustness In the experiments conducted below, we evaluate the noise robustness of each boosting method. First, we run the above algorithms on a synthetic example created by [14]. This is a simple counterexample to show that for a broad class of convex loss functions, no boosting algorithm is provably robust to random label noise, this class includes AdaBoost, LogitBoost, etc. For LPBoost and its variations [25, 26], they do not satisfy the preconditions of the theorem presented by [14], but Glocer [12] showed experimentally that these soft margin boosting methods have the same problem as the AdaBoost and LogitBoost to handle random noise. l η AB LB LPB BB DBǫ avg DBorder 5 0 0 0 0 0 0 0 0.05 17.6 0 0 1.2 0 0 0.2 24.2 23.4 14.5 2.2 24.7 0 20 0 0 0 0 0.6 0 0 0.05 30.0 29.6 27.0 15.0 25.4 0 0.2 29.9 30.0 29.8 19.6 29.6 3.2 Table 3: Percent test errors of AdaBoost (AB), LogitBoost (LB), LPBoost (LPB), BrownBoost (BB), DirectBoostǫ avg, and DirectBoostorder on Long and Servedio’s example with random noise. data η AB LB LPB BB DBǫ avg DBorder wdbc 0 4.3 4.4 4.0 4.5 4.1 3.7 0.05 6.6 6.8 4.9 6.5 5.0 5.0 0.2 8.8 8.8 7.6 8.3 8.4 6.6 Iono. 0 9.7 9.7 8.6 8.8 8.3 7.7 0.05 10.3 12.3 9.3 11.5 9.3 8.6 0.2 16.6 15.0 14.6 17.9 14.4 9.5 Table 4: Percent test errors of AdaBoost (AB), LogitBoost (LB), LPBoost (LPB), BrownBoost (BB), DirectBoostǫ avg, and DirectBoostorder on two UCI datasets with random noise. We repeat the synthetic learning problem with binary-valued weak classifiers that is described in [14]. We set the number of training examples to 1000 and the labels are corrupted with a noise rate η at 0%, 5%, and 20% respectively. Examples in this setting are binary vectors of length 2l+11. Table 3 reports the error rates on a clean test data set with size 5000, that is, the labels of test data are uncorrupted, and a same size clean data is generated as validation data. AdaBoost performs very poor on this problem. This result is not surprising at all since [14] designed this example on purpose to explain the inadequacy of convex optimization methods. LogitBoost, LPBoost with column generation, and DirectBoostǫ avg perform better in the case that l = 5 and η = 5%, but for the other cases they do as bad as AdaBoost. BrownBoost is designed for noise tolerance, and it does well in the case of l = 5, but it also cannot handle the case of l = 20 and η > 0%. On the other hand, DirectBoostorder performs very well for all cases, showing DirectBoostorder’s impressive noise tolerance property since the most difficult examples are given up without any penalty. These algorithms are also tested on two UCI datasets, randomly corrupted with additional label noise on training data at rates of 5% and 20% respectively. Again, we keep the validation and the test data are clean. The results are reported in Table 4 by five-fold cross validation, the same as Experiment 1. LPBoost with column generation, DirectBoostǫ avg and DirectBoostorder do well in the case of η = 5%, and their performance is better than AdaBoost, LogitBoost, and BrownBoost. For the case of η = 20%, all the algorithms perform much worse than the corresponding noise-free case, except DirectBoostorder which still generates a good performance close to the noise-free case. 4 Acknowledgements This research is supported in part by AFOSR under grant FA9550-10-1-0335, NSF under grant IIS:RI-small 1218863, DoD under grant FA2386-13-1-3023, and a Google research award. 8 References [1] P. Bartlett and M. Traskin. AdaBoost is consistent. Journal of Machine Learning Research, 8:2347–2368, 2007. [2] M. Bazaraa, H. Sherali and C. Shetty. Nonlinear Programming: Theory and Algorithms, 3rd Edition. Wiley-Interscience, 2006. [3] D. P. Bertsekas. A distributed algorithm for the assignment problem. Technical Report, MIT, 1979. [4] D. Bertsekas. Network Optimization: Continuous and Discrete Models. Athena Scientific, 1998. [5] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [6] A. Demiriz, K. Bennett and J. Shawe-Taylor. Linear programming boosting via column generation, Machine Learning, 46:225–254, 2002. [7] L. Devroye, L. Gy¨orfiand G. Lugosi. A Probabilistic Theory of Pattern Recognition Springer, New York, 1996. [8] A. Frank and A. Asuncion. UCI Machine Learning Repository. School of Information and Computer Science, University of California at Irvine, 2006. [9] 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. [10] Y. Freund. An adaptive version of the boost by majority algorithm. Machine Learning, 43(3):293–318, 2001. [11] J. Friedman, T. Hastie and R. Tibshirani. Additive logistic regression: A statistical view of boosting. The Annals of Statistics, 28(2):337–374, 2000. [12] K. Glocer. Entropy regularization and soft margin maximization. Ph.D. Dissertation, UCSC, 2009. [13] K. Hoffgen, H. Simon and K. van Horn. Robust trainability of single neurons. Journal of Computer and System Sciences, 50(1):114–125, 1995. [14] P. Long and R. Servedio. Random classification noise defeats all convex potential boosters. Machine Learning, 78:287-304, 2010. [15] E. Mammen and A. Tsybakov. Smooth discrimination analysis. The Annals of Statistics, 27, 1808-1829, 1999. [16] D. McAllester, T. Hazan and J. Keshet. Direct loss minimization for structured prediction. Neural Information Processing Systems (NIPS), 1594-1602, 2010. [17] R. Schapire, Y. Freund, P. Bartlett and W. Lee. Boosting the margin: A new explanation for the effectiveness of voting methods. The Annals of Statistics, 26(5):1651–1686, 1998. [18] R. Schapire and Y. Freund. Boosting: Foundations and Algorithms. MIT Press, 2012. [19] S. Shalev-Shwartz and Y. Singer. On the equivalence of weak learnability and linear separability: new relaxations and efficient boosting algorithms. Machine Learning, 80(2-3): 141-163, 2010. [20] I. Steinwart. Consistency of support vector machines and other regularized kernel classifiers. IEEE Transactions on Information Theory, 51(1):128-142, 2005. [21] P. Tseng and D. Bertsekas. Relaxation methods for strictly convex costs and linear constraints. Mathematics of Operations Research, 16:462-481, 1991. [22] P. Tseng. Convergence of block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 109(3):475–494, 2001. [23] A. Tsybakov. Optimal aggregation of classifiers in statistical learning. The Annals of Statistics, 32(1):135166, 2004. [24] V. Vapnik. Statistical Learning Theory. John Wiley, 1998. [25] M. Warmuth, K. Glocer and G. Ratsch. Boosting algorithms for maximizing the soft margin. Advances in Neural Information Processing Systems (NIPS), 21, 1585-1592, 2007. [26] M. Warmuth, K. Glocer and S. Vishwanathan. Entropy regularized LPBoost. The 19th International conference on Algorithmic Learning Theory (ALT), 256-271, 2008. [27] S. Zhai, T. Xia, M. Tan and S. Wang. Direct 0-1 loss minimization and margin maximization with boosting. Technical Report, 2013. [28] T. Zhang. Statistical behavior and consistency of classification methods based on convex risk minimization. The Annals of Statistics, 32(1):56–85, 2004. [29] T. Zhang and B. Yu. Boosting with early stopping: Convergence and consistency. The Annals of Statistics, 33:1538–1579, 2005. 9
2013
211
4,945
Marginals-to-Models Reducibility Tim Roughgarden Stanford University tim@cs.stanford.edu Michael Kearns University of Pennsylvania mkearns@cis.upenn.edu Abstract We consider a number of classical and new computational problems regarding marginal distributions, and inference in models specifying a full joint distribution. We prove general and efficient reductions between a number of these problems, which demonstrate that algorithmic progress in inference automatically yields progress for “pure data” problems. Our main technique involves formulating the problems as linear programs, and proving that the dual separation oracle required by the ellipsoid method is provided by the target problem. This technique may be of independent interest in probabilistic inference. 1 Introduction The movement between the specification of “local” marginals and models for complete joint distributions is ingrained in the language and methods of modern probabilistic inference. For instance, in Bayesian networks, we begin with a (perhaps partial) specification of local marginals or CPTs, which then allows us to construct a graphical model for the full joint distribution. In turn, this allows us to make inferences (perhaps conditioned on observed evidence) regarding marginals that were not part of the original specification. In many applications, the specification of marginals is derived from some combination of (noisy) observed data and (imperfect) domain expertise. As such, even before the passage to models for the full joint distribution, there are a number of basic computational questions we might wish to ask of given marginals, such as whether they are consistent with any joint distribution, and if not, what the nearest consistent marginals are. These can be viewed as questions about the “data”, as opposed to inferences made in models derived from the data. In this paper, we prove a number of general, polynomial time reductions between such problems regarding data or marginals, and problems of inference in graphical models. By “general” we mean the reductions are not restricted to particular classes of graphs or algorithmic approaches, but show that any computational progress on the target problem immediately transfers to progress on the source problem. For example, one of our main results establishes that the problem of determining whether given marginals, whose induced graph (the “data graph”) falls within some class G, are consistent with any joint distribution reduces to the problem of MAP inference in Markov networks falling in the same class G. Thus, for instance, we immediately obtain that the tractability of MAP inference in trees or tree-like graphs yields an efficient algorithm for marginal consistency in tree data graphs; and any future progress in MAP inference for other classes G will similarly transfer. Conversely, our reductions also can be used to establish negative results. For instance, for any class G for which we can prove the intractability of marginal consistency, we can immediately infer the intractability of MAP inference as well. There are a number of reasons to be interested in such problems regarding marginals. One, as we have already suggested, is the fact that given marginals may not be consistent with any joint 1 Figure 1: Summary of main results. Arrows indicate that the source problem can be reduced to the target problem for any class of graphs G, and in polynomial time. Our main results are the left-to-right arrows from marginals-based problems to Markov net inference problems. distribution, due to noisy observations or faulty domain intuitions,1 and we may wish to know this before simply passing to a joint model that forces or assumes consistency. At the other extreme, given marginals may be consistent with many joint distributions, with potentially very different properties.2 Rather than simply selecting one of these consistent distributions in which to perform inference (as would typically happen in the construction of a Markov or Bayes net), we may wish to reason over the entire class of consistent distributions, or optimize over it (for instance, choosing to maximize or minimize independence). We thus consider four natural algorithmic problems involving (partially) specified marginals: • CONSISTENCY: Is there any joint distribution consistent with given marginals? • CLOSEST CONSISTENCY: What are the consistent marginals closest to given inconsistent marginals? • SMALL SUPPORT: Of the consistent distributions with the closest marginals, can we compute one with support size polynomial in the data (i.e., number of given marginal values)? • MAX ENTROPY: What is the maximum entropy distribution closest to given marginals? The consistency problem has been studied before as the membership problem for the marginal polytope (see Related Work); in the case of inconsistency, the closest consistency problem seeks the minimal perturbation to the data necessary to recover coherence. When there are many consistent distributions, which one should be singled out? While the maximum entropy distribution is a staple of probabilistic inference, it is not the only interesting answer. For example, consider the three features “votes Republican”, “supports universal healthcare”, and “supports tougher gun control”, and suppose the single marginals are 0.5, 0.5, 0.5. The maximum entropy distribution is uniform over the 8 possibilities. We might expect reality to hew closer to a small support distribution, perhaps even 50/50 over the two vectors 100 and 011. The small support problem can be informally viewed as attempting to minimize independence or randomization, and thus is a natural contrast to maximum entropy. It is also worth noting that small support distributions arise naturally through the joint behavior of no-regret algorithms in game-theoretic settings [1]. We also consider two standard algorithmic inference problems on full joint distributions (models): 1For a simple example, consider three random variables for which each pairwise marginal specifies that the settings (0,1) and (1,0) each occurs with probability 1/2. The corresponding “data graph” is a triangle. This requires that each variable always disagrees with the other two, which is impossible. 2 For example, consider random variables X, Y, Z. Suppose the pairwise marginals for X and Y and for Y and Z specify that all four binary settings are equally likely. No pairwise marginals for X and Z are given, so the data graph is a two-hop path. One consistent distribution flips a fair coin independently for each variable; but another flips one coin for X, a second for Y , and sets Z = X. The former maximizes entropy while the latter minimizes support size. 2 • MAP INFERENCE: What is the MAP joint assignment in a given Markov network? • GENERALIZED PARTITION: What is the normalizing constant of a given Markov network, possibly after conditioning on the value of one vertex or edge? All six of these problems are parameterized by a class of graphs G — for the four marginals problems, this is the graph induced by the given pairwise marginals, while for the models problems, it is the graph of the given Markov network. All of our reductions are of the form “for every class G, if there is a polynomial-time algorithm for solving inference problem B for (model) graphs in G, then there is a polynomial-time algorithm for marginals problem A for (marginal) graphs in G” — that is, A reduces to B. Our main results, which are summarized in Figure 1, can be stated informally as follows: • CONSISTENCY reduces to MAP INFERENCE. • CLOSEST CONSISTENCY reduces to MAP INFERENCE. • SMALL SUPPORT reduces to MAP INFERENCE. • MAX ENTROPY reduces to GENERALIZED PARTITION.3 While connections between some of these problems are known for specific classes of graphs — most notably in trees, where all of these problems are tractable and rely on common underlying algorithmic approaches such as dynamic programming — the novelty of our results is their generality, showing that the above reductions hold for every class of graphs. All of our reductions share a common and powerful technique: the use of the ellipsoid method for Linear Programming (LP), with the key step being the articulation of an appropriate separation oracle. The first three problems we consider have a straightforward LP formulation which will typically have a number of variables that is equal to the number of joint settings, and therefore exponential in the number of variables; for the MAX ENTROPY problem, there is an analogous convex program formulation. Since our goal is to run in time polynomial in the input length (the number and size of given marginals), the straightforward LP formulation will not suffice. However, by passing to the dual LP, we instead obtain an LP with only a polynomial number of variables, but an exponential number of constraints that can be represented implicitly. For each of the reductions above, we show that the required separation oracle for these implicit constraints is provided exactly by the corresponding inference problem (MAP INFERENCE or GENERALIZED PARTITION). We believe this technique may be of independent interest and have other applications in probabilistic inference. It is perhaps surprising that in the study of problems strictly addressing properties of given marginals (which have received relatively little attention in the graphical models literature historically), problems of inference in full joint models (which have received great attention) should arise so naturally and generally. For the marginal problems, our reductions (via the ellipsoid method) effectively create a series of “fictitious” Markov networks such that the solutions to corresponding inference problems (MAP INFERENCE and GENERALIZED PARTITION) indirectly lead to a solution to the original marginal problems. Related Work: The literature on graphical models and probabilistic inference is rife with connections between some of the problems we study here for specific classes of graphical models (such as trees or otherwise sparse structures), and under specific algorithmic approaches (such as dynamic programming or message-passing algorithms more generally, and various forms of variational inference); see [2, 3, 4] for good overviews. In contrast, here we develop general and efficient reductions between marginal and inference problems that hold regardless of the graph structure or algorithmic approach; we are not aware of prior efforts in this vein. Some of the problems we consider are also either new or have been studied very little, such as CLOSEST CONSISTENCY and SMALL SUPPORT. The CONSISTENCY problem has been studied before as the membership problem for the marginal polytope. In particular, [8] shows that finding the MAP assignment for Markov random fields with pairwise potentials can be cast as an integer linear program over the marginal polytope — that is, algorithms for the CONSISTENCY problem are useful subroutines for inference. Our work is the 3The conceptual ideas in this reduction are well known. We include a formal treatment in the Appendix for completeness and to provide an analogy with our other reductions, which are our more novel contributions. 3 first to show a converse, that inference algorithms are useful subroutines for decision and optimization problems for the marginal polytope. Furthermore, previous polynomial-time solutions to the CONSISTENCY problem generally give a compact (polynomial-size) description of the marginal polytope. Our approach dodges this ambitious requirement, in that it only needs a polynomial-time separation oracle (which, for this problem, turns out to be MAP inference). As there are many combinatorial optimization problems with no compact LP formulation that admit polynomial-time ellipsoid-based algorithms — like non-bipartite matching, with its exponentially many odd cycle inequalities — our approach provides a new way of identifying computationally tractable special cases of problems concerning marginals. The previous work that is perhaps most closely related in spirit to our interests are [5] and [6, 7]. These works provide reductions of some form, but not ones that are both general (independent of graph structure) and polynomial time. However, they do suggest both the possibility and interest in such stronger reductions. The paper [5] discusses and provides heuristic reductions between MAP INFERENCE and GENERALIZED PARTITION. The work in [6, 7] makes the point that maximizing entropy subject to an (approximate) consistency condition yields a distribution that can be represented as a Markov network over the graph induced by the original data or marginals. As far as we are aware, however, there has been essentially no formal complexity analysis (i.e., worst-case polynomial-time guarantees) for algorithms that compute max-entropy distributions.4 2 Preliminaries 2.1 Problem Definitions For clarity of exposition, we focus on the pairwise case in which every marginal involves at most two variables.5 Denote the underlying random variables by X1, . . . , Xn, which we assume have range [k] = {0, 1, 2, . . . , k}. The input is at most one real-valued single marginal value µis for every variable i ∈[n] and value s ∈[k], and at most one real-valued pairwise marginal value µijst for every ordered variable pair i, j ∈[n]×[n] with i < j and every pair s, t ∈[k]. Note that we allow a marginal to be only partially specified. The data graph induced by a set of marginals has one vertex per random variable Xi, and an undirected edge (i, j) if and only if at least one of the given pairwise marginal values involves the variables Xi and Xj. Let M1 and M2 denote the sets of indices (i, s) and (i, j, s, t) of the given single and pairwise marginal values, and m = |M1| + |M2| the total number of marginal values. Let A = [k]n denote the space of all possible variable assignments. We say that the given marginals µ are consistent if there exists a (joint) probability distribution consistent with all of them (i.e., that induces the marginals µ). With these basic definitions, we can now give formal definitions for the marginals problems we consider. Let G denote an arbitrary class of undirected graphs. • CONSISTENCY (G): Given marginals µ such that the induced data graph falls in G, are they consistent? • CLOSEST CONSISTENCY (G): Given (possibly inconsistent) marginals µ such that the induced data graph falls in G, compute the consistent marginals ν minimizing ||ν −µ||1. • SMALL SUPPORT (G): Given (consistent or inconsistent) marginals µ such that the induced data graph falls in G, compute a distribution that has a polynomial-size support and marginals ν that minimize ||ν −µ||1. • MAX ENTROPY (G): Given (consistent or inconsistent) marginals µ such that the induced data graph falls in G, compute the maximum entropy distribution that has marginals ν that minimize ||ν −µ||1. 4There are two challenges to doing this. The first, which has been addressed in previous work, is to circumvent the exponential number of decision variables via a separation oracle. The second, which does not seem to have been previously addressed, is to bound the diameter of the search space (i.e., the magnitude of the optimal Lagrange variables). Proving this requires using special properties of the MAX ENTROPY problem, beyond mere convexity. We adapt recent techniques of [13] to provide the necessary argument. 5All of our results generalize to the case of higher-order marginals in a straightforward manner. 4 It is important to emphasize that all of the problems above are “model-free”, in that we do not assume that the marginals are consistent with, or generated by, any particular model (such as a Markov network). They are simply given marginals, or “data”. For each of these problems, our interest is in algorithms whose running time is polynomial in the size of the input µ. The prospects for this depend strongly on the class G, with tractability generally following for “nice” classes such as tree or tree-like graphs, and intractability for the most general cases. Our contribution is in showing a strong connection between tractability for these marginals problems and the following inference problems for any class G. • MAP INFERENCE (G): Given a Markov network whose graph falls in G, find the maximum a posteriori (MAP) or most probable joint assignment.6 • GENERALIZED PARTITION: Given a Markov network whose graph falls in G, compute the partition function or normalization constant for the full joint distribution, possibly after conditioning on the value of a single vertex or edge.7 2.2 The Ellipsoid Method for Linear Programming Our algorithms for the CONSISTENCY, CLOSEST CONSISTENCY, and SMALL SUPPORT problems use linear programming. There are a number of algorithms that solve explictly described linear programs in time polynomial in the description size. Our problems, however, pose an additional challenge: the obvious linear programming formulation has size exponential in the parameters of interest. To address this challenge, we turn to the ellipsoid method [9], which can solve in polynomial time linear programs that have an exponential number of implicitly described constraints, provided there is a polynomial-time “separation oracle” for these constraints. The ellipsoid method is discussed exhaustively in [10, 11]; we record in this section the facts necessary for our results. Definition 2.1 (Separation Oracle) Let P = {x ∈Rn : aT 1 x ≤b1, . . . , aT mx ≤bm} denote the feasible region of m linear constraints in n dimensions. A separation oracle for P is an algorithm that takes as input a vector x ∈Rn, and either (i) verifies that x ∈P; or (ii) returns a constraint i such that at ix > bi. A polynomial-time separation oracle runs in time polynomial in n, the maximum description length of a single constraint, and the description length of the input x. One obvious separation oracle is to simply check, given a candidate solution x, each of the m constraints in turn. More interesting and relevant are constraint sets that have size exponential in the dimension n but admit a polynomial-time separation oracle. Theorem 2.2 (Convergence Guarantee of the Ellipsoid Method [9]) Suppose the set P = {x ∈ Rn : aT 1 x ≤b1, . . . , aT mx ≤bm} admits a polynomial-time separation oracle and cT x is a linear objective function. Then, the ellipsoid method solves the optimization problem {max cT x : x ∈P} in time polynomial in n and the maximum description length of a single constraint or objective function. The method correctly detects if P = ∅. Moreover, if P is non-empty and bounded, the ellipsoid method returns a vertex of P.8 Theorem 2.2 provides a general reduction from a problem to an intuitively easier one: if the problem of verifying membership in P can be solved in polynomial time, then the problem of optimizing an arbitrary linear function over P can also be solved in polynomial time. This reduction is “many-toone,” meaning that the ellipsoid method invokes the separation oracle for P a large (but polynomial) number of times, each with a different candidate point x. See Appendix A.1 for a high-level description of the ellipsoid method and [10, 11] for a detailed treatment. The ellipsoid method also applies to convex programming problems under some additional technical conditions. This is discussed in Appendix A.2 and applied to the MAX ENTROPY problem in Appendix A.3. 6Formally, the input is a graph G = (V, E) with a log-potential log φi(s) and log φij(s, t) for each vertex i ∈V and edge (i, j) ∈E, and each value s ∈[k] = {0, 1, 2 . . . , k} and pair s, t ∈[k] × [k] of values. The MAP assignment maximizes P(a) := Q i∈V φi(ai) Q (i,j)∈E φij(ai, aj) over all assignments a ∈[k]V . 7Formally, given the log-potentials of a Markov network, compute P a∈[k]n P(a); P a : ai=s P(a) for a given i, s; or P a : ai=s,aj=t P(a) for a given i, j, s, t. 8A vertex is a point of P that satisfies with equality n linearly independent constraints. 5 3 CONSISTENCY Reduces to MAP INFERENCE The goal of this section is to reduce the CONSISTENCY problem for data graphs in the family G to the MAP INFERENCE problem for networks in G. Theorem 3.1 (Main Result 1) Let G be a set of graphs. If the the MAP INFERENCE (G) problem can be solved in polynomial time, then the CONSISTENCY (G) problem can be solved in polynomial time. We begin with a straightforward linear programming formulation of the CONSISTENCY problem. Lemma 3.2 (Linear Programming Formulation) An instance of the CONSISTENCY problem admits a consistent distribution if and only if the following linear program (P) has a solution: (P) max p 0 subject to: P a∈A:ai=s pa = µis for all (i, s) ∈M1 P a∈A:ai=s,aj=t pa = µijst for all (i, j, s, t) ∈M2 P a∈A pa = 1 pa ≥0 for all a ∈A. Solving (P) using the ellipsoid method (Theorem 2.2), or any other linear programming method, requires time at least |A| = (k+1)n, the number of decision variables. This is generally exponential in the size of the input, which is proportional to the number m of given marginal values. A ray of hope is provided by the fact that the number of constraints of the linear program in Lemma 3.2 is equal to the number of marginal values. With an eye toward applying the ellipsoid method (Theorem 2.2), we consider the dual linear program. We use the following notation. Given a vector y indexed by M1 ∪M2, we define y(a) = X (i,s)∈M1 : ai=s yis + X (i,j,s,t)∈M2 : ai=s,aj=t yijst (1) for each assignment a ∈A, and µT y = X (i,s)∈M1 µisyis + X (i,j,s,t)∈M2 µijstyijst. (2) Strong linear programming duality implies the following. Lemma 3.3 (Dual Linear Programming Formulation) An instance of the CONSISTENCY problem admits a consistent distribution if and only if the optimal value of the following linear program (D) is 0: (D) max y,z µT y + z subject to: y(a) + z ≤0 for all a ∈A y, z unrestricted. The number of variables in (D) — one per constraint of the primal linear program — is polynomial in the size of the CONSISTENCY input. What use is the MAP INFERENCE problem for solving the CONSISTENCY problem? The next lemma forges the connection. Lemma 3.4 (Map Inference as a Separation Oracle) Let G be a set of graphs and suppose that the MAP INFERENCE (G) problem can be solved in polynomial time. Consider an instance of the CONSISTENCY problem with a data graph in G, and a candidate solution y, z to the corresponding 6 dual linear program (D). Then, there is a polynomial-time algorithm that checks whether or not there is an assignment a ∈A that satisfies X (i,s)∈M1 : ai=s yis + X (i,j,s,t)∈M2 : ai=s,aj=t yijst > −z, (3) and produces such an assignment if one exists. Proof: The key idea is to interpret y as the log-potentials of a Markov network. Precisely, construct a Markov network N as follows. The vertex set V and edge set E correspond to the random variables and edge set of the data graph of the CONSISTENCY instance. The potential function at a vertex i is defined as φi(s) = exp{yis} for each value s ∈[k]. The potential function at an edge (i, j) is defined as φij(s, t) = exp{yijst} for (s, t) ∈[k] × [k]. For a missing pair (i, s) /∈M1 or 4tuple (i, j, s, t) /∈M2, we define the corresponding potential value φi(s) or φij(st) to be 1. The underlying graph of N is the same as the data graph of the given CONSISTENCY instance and hence is a member of G. In the distribution induced by N, the probability of an assignment a ∈[k]n is, by definition, proportional to   Y i∈V : (i,ai)∈M1 exp{yiai}     Y (i,j)∈E : (i,j,ai,aj)∈M2 exp{yijaiaj}   = exp{y(a)}. That is, the MAP assignment for the Markov network N is the assignment that maximizes the lefthand size of (3). Checking if some assignment a ∈A satisfies (3) can thus be implemented as follows: compute the MAP assignment a∗for N — by assumption, and since the graph of N lies in G, this can be done in polynomial time; return a∗if it satisfies (3), and otherwise conclude that no assignment a ∈A satisfies (3). ■ All of the ingredients for the proof of Theorem 3.1 are now in place. Proof of Theorem 3.1: Assume that there is a polynomial-time algorithm for the MAP INFERENCE (G) problem with the family G of graphs, and consider an instance of the CONSISTENCY problem with data graph G ∈G. Deciding whether or not this instance has a consistent distribution is equivalent to solving the program (D) in Lemma 3.3. By Theorem 2.2, the ellipsoid method can be used to solve (D) in polynomial time, provided the constraint set admits a polynomial-time separation oracle. Lemma 3.4 shows that the relevant separation oracle is equivalent to computing the MAP assignment of a Markov network with graph G ∈G. By assumption, the latter problem can be solved in polynomial time. ■ We defined the CONSISTENCY problem as a decision problem, where the answer is “yes” or no.” For instances that admit a consistent distribution, we can also ask for a succinct representation of a distribution that witnesses the marginals’ consistency. We next strengthen Theorem 3.1 by showing that for consistent instances, under the same hypothesis, we can compute a small-support consistent distribution in polynomial time. See Figure 2 for the high-level description of the algorithm. Theorem 3.5 (Small-Support Witnesses) Let G be a set of graphs. If the MAP INFERENCE (G) problem can be solved in polynomial time, then for every consistent instance of the CONSISTENCY (G) problem with m = |M1| + |M2| marginal values, a consistent distribution with support size at most m + 1 can be computed in polynomial time. Proof: Consider a consistent instance of CONSISTENCY with data graph G ∈G. The algorithm of Theorem 3.1 concludes by solving the dual linear program of Lemma 3.3 using the ellipsoid method. This method runs for a polynomial number K of iterations, and each iteration generates one new inequality. At termination, the algorithm has identified a “reduced dual linear program”, in which a set of only K out of the original (k + 1)n constraints is sufficient to prove the optimality of its solution. By strong duality, the corresponding “reduced primal linear program,” obtained from the linear program in Lemma 3.2 by retaining only the decision variables corresponding to the K 7 1. Solve the dual linear program (D) (Lemma 3.3) using the ellipsoid method (Theorem 2.2), using the given polynomial-time algorithm for MAP INFERENCE (G) to implement the ellipsoid separation oracle (see Lemma 3.4). 2. If the dual (D) has a nonzero (and hence, unbounded) optimal objective function value, then report “no consistent distributions” and halt. 3. Explicitly form the reduced primal linear program (P-red), obtained from (P) by retaining only the variables that correspond to the dual inequalities generated by the separation oracle in Step 1. 4. Solve (P-red) using a polynomial-time linear programming algorithm that returns a vertex solution, and return the result. Figure 2: High-level description of the polynomial-time reduction from CONSISTENCY (G) to MAP INFERENCE (G) (Steps 1 and 2) and postprocessing to extract a small-support distribution that witnesses consistent marginals (Steps 3 and 4). reduced dual constraints, has optimal objective function value 0. In particular, this reduced primal linear program is feasible. The reduced primal linear program has a polynomial number of variables and constraints, so it can be solved by the ellipsoid method (or any other polynomial-time method) to obtain a feasible point p. The point p is an explicit description of a consistent distribution with support size at most K. To improve the support size upper bound from K to m + 1, recall from Theorem 2.2 that p is a vertex of the feasible region, meaning it satisfies K linearly independent constraints of the reduced primal linear program with equality. This linear program has at most one constraint for each of the m given marginal values, at most one normalization constraint P a∈A pa = 1, and non-negativity constraints. Thus, at least K−m−1 of the constraints that p satisfies with equality are non-negativity constraints. Equivalently, it has at most m + 1 strictly positive entries. ■ 4 CLOSEST CONSISTENCY, SMALL SUPPORT Reduce to MAP INFERENCE This section considers the CLOSEST CONSISTENCY and SMALL SUPPORT problems. The input to these problems is the same as in the CONSISTENCY problem — single marginal values µis for (i, s) ∈M1 and pairwise marginal values µijst for (i, j, s, t) ∈M2. The goal is to compute sets of marginals {νis}M1 and {νijst}M2 that are consistent and, subject to this constraint, minimize the ℓ1 norm ||µ −ν||1 with respect to the given marginals. An algorithm for the CLOSEST CONSISTENCY problem solves the CONSISTENCY problem as a special case, since a given set of marginals is consistent if and only if the corresponding CLOSEST CONSISTENCY problem has optimal objective function value 0. Despite this greater generality, the CLOSEST CONSISTENCY problem also reduces in polynomial time to the MAP INFERENCE problem, as does the still more general SMALL SUPPORT problem. Theorem 4.1 (Main Result 2) Let G be a set of graphs. If the MAP INFERENCE (G) problem can be solved in polynomial time, then the CLOSEST CONSISTENCY (G) problem can be solved in polynomial time. Moreover, a distribution consistent with the optimal marginals with support size at most 3m + 1 can be computed in polynomial time, where m = |M1| + |M2| denotes the number of marginal values. The formulation of the CLOSEST CONSISTENCY (G) problem has linear constraints — the same as those in Lemma 3.2, except with the given marginals µ replaced by the computed consistent marginals ν — but a nonlinear objective function ||µ −ν||1. We can simulate the absolute value functions in the objective by adding a small number of variables and constraints. We provide details and the proof of Theorem 4.1 in Appendix A.4. 8 References [1] Nicolo Cesa-Bianchi and G´abor Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [2] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [3] M.J. Wainwright and M.I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1), 2008. [4] S. Lauritzen. Graphical Models. Oxford University Press, 1996. [5] T. Hazan and T. Jaakkola. On the partition function and random maximum a-posteriori perturbations. Proceedings of the 29th International Conference on Machine Learning, 2012. [6] J. K. Johnson, V. Chandrasekaran, and A. S. Willsky. Learning markov structure by maximum entropy relaxation. In 11th International Conference in Artificial Intelligence and Statistics (AISTATS 2007), 2007. [7] V. Chandrasekaran, J. K. Johnson, and A. S. Willsky. Maximum entropy relaxation for graphical model selection given inconsistent statistics. In IEEE Statistical Signal Processing Workshop (SSP 2007), 2007. [8] D. Sontag and T. Jaakkola. New outer bounds on the marginal polytope. In Neural Information Processing Systems (NIPS), 2007. [9] L. G. Khachiyan. A polynomial algorithm in linear programming. Soviet Mathematics Doklady, 20(1):191–194, 1979. [10] A. Ben-Tal and A. Nemirovski. Optimization iii. Lecture notes, 2012. [11] M. Gr¨otschel, L. Lov´asz, and A. Schrijver. Geometric Algorithms and Combinatorial Optimization. Springer, 1988. Second Edition, 1993. [12] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge, 2004. [13] M. Singh and N. Vishnoi. Entropy, optimization and counting. arXiv, (1304.8108), 2013. 9
2013
212
4,946
Sketching Structured Matrices for Faster Nonlinear Regression Haim Avron Vikas Sindhwani IBM T.J. Watson Research Center Yorktown Heights, NY 10598 {haimav,vsindhw}@us.ibm.com David P. Woodruff IBM Almaden Research Center San Jose, CA 95120 dpwoodru@us.ibm.com Abstract Motivated by the desire to extend fast randomized techniques to nonlinear lp regression, we consider a class of structured regression problems. These problems involve Vandermonde matrices which arise naturally in various statistical modeling settings, including classical polynomial fitting problems, additive models and approximations to recently developed randomized techniques for scalable kernel methods. We show that this structure can be exploited to further accelerate the solution of the regression problem, achieving running times that are faster than “input sparsity”. We present empirical results confirming both the practical value of our modeling framework, as well as speedup benefits of randomized regression. 1 Introduction Recent literature has advocated the use of randomization as a key algorithmic device with which to dramatically accelerate statistical learning with lp regression or low-rank matrix approximation techniques [12, 6, 8, 10]. Consider the following class of regression problems, arg min x∈C ∥Zx −b∥p, where p = 1, 2 (1) where C is a convex constraint set, Z ∈Rn×k is a sample-by-feature design matrix, and b ∈Rn is the target vector. We assume henceforth that the number of samples is large relative to data dimensionality (n ≫k). The setting p = 2 corresponds to classical least squares regression, while p = 1 leads to least absolute deviations fit, which is of significant interest due to its robustness properties. The constraint set C can incorporate regularization. When C = Rk and p = 2, an ϵoptimal solution can be obtained in time O(nk log k) + poly(k ϵ−1) using randomization [6, 19], which is much faster than an O(nk2) deterministic solver when ϵ is not too small (dependence on ϵ can be improved to O(log(1/ϵ)) if higher accuracy is needed [17]). Similarly, a randomized solver for l1 regression runs in time O(nk log n) + poly(k ϵ−1) [5]. In many settings, what makes such acceleration possible is the existence of a suitable oblivious subspace embedding (OSE). An OSE can be thought of as a data-independent random “sketching” matrix S ∈Rt×n whose approximate isometry properties over a subspace (e.g., over the column space of Z, b) imply that, ∥S(Zx −b)∥p ≈∥Zx −b∥p for all x ∈C , which in turn allows x to be optimized over a “sketched” dataset of much smaller size without losing solution quality. Sketching matrices include Gaussian random matrices, structured random matrices which admit fast matrix multiplication via FFT-like operations, and others. This paper is motivated by two questions which in our context turn out to be complimentary: 1 ◦Can additional structure in Z be non-trivially exploited to further accelerate runtime? Clarkson and Woodruff have recently shown that when Z is sparse and has nnz(Z) ≪nk non-zeros, it is possible to achieve much faster “input-sparsity” runtime using hashing-based sketching matrices [7]. Is it possible to further beat this time in the presence of additional structure on Z? ◦Can faster and more accurate sketching techniques be designed for nonlinear and nonparametric regression? To see that this is intertwined with the previous question, consider the basic problem of fitting a polynomial model, b = Pq i=1 βizi to a set of samples (zi, bi) ∈R × R, i = 1, . . . , n. Then, the design matrix Z has Vandermonde structure which can potentially be exploited in a regression solver. It is particularly appealing to estimate non-parametric models on large datasets. Sketching algorithms have recently been explored in the context of kernel methods for nonparametric function estimation [16, 11]. To be able to precisely describe the structure on Z that we consider in this paper, and outline our contributions, we need the following definitions. Definition 1 (Vandermonde Matrix) Let x0, x1, . . . , xn−1 be real numbers. The Vandermonde matrix, denoted Vq,n(x0, x1, . . . , xn−1), has the form: Vq,n(x1, x1, . . . , xn−1) =    1 1 . . . 1 x0 x1 . . . xn−1 . . . . . . . . . . . . xq−1 0 xq−1 1 . . . xq−1 n−1    Vandermonde matrices of dimension q × n require only O(n) implicit storage and admit O((n + q) log2 q) matrix-vector multiplication time. We also define the following matrix operator Tq which maps a matrix A to a block-Vandermonde structured matrix. Definition 2 (Matrix Operator) Given a matrix A ∈Rn×d, we define the following matrix: Tq(A) =  Vq,n(A1,1, . . . , An,1)T Vq,n(A1,2, . . . , An,2)T · · · Vq,n(A1,d, . . . , An,d)T  In this paper, we consider regression problems, Eqn. 1, where Z can be written as Z = Tq(A) (2) for an n × d matrix A, so that k = dq. The operator Tq expands each feature (column) of the original dataset A to q columns of Z by applying monomial transformations upto degree q −1. This lends a block-Vandermonde structure to Z. Such structure naturally arises in polynomial regression problems, but also applies more broadly to non-parametric additive models and kernel methods as we discuss below. With this setup, the goal is to solve the following problem: Structured Regression: Given A and b, with constant probability output a vector x′ ∈C for which ∥Tq(A)x′ −b∥p ≤(1 + ε)∥Tq(A)x⋆−b∥p, for an accuracy parameter ε > 0, where x⋆= arg minx∈C ∥Tq(A)x −b∥p. Our contributions in this paper are as follows: ◦For p = 2, we provide an algorithm that solves the structured regression problem above in time O(nnz(A) log2 q) + poly(dqϵ−1). By combining our sketching methods with preconditioned iterative solvers, we can also obtain logarithmic dependence on ϵ. For p = 1, we provide an algorithm with runtime O(nnz(A) log n log2 q) + poly(dqϵ−1 log n). This implies that moving from linear (i.e, Z = A) to nonlinear regression (Z = Tq(A))) incurs only a mild additional log2 q runtime cost, while requiring no extra storage! Since nnz(Tq(A)) = q nnz(A), this provides - to our knowledge - the first sketching approach that operates faster than “input-sparsity” time, i.e. we sketch Tq(A) in time faster than nnz(Tq(A)). ◦Our algorithms apply to a broad class of nonlinear models for both least squares regression and their robust l1 regression counterparts. While polynomial regression and additive models with monomial basis functions are immediately covered by our methods, we also show that under a suitable choice of the constraint set C, the structured regression problem with Z = Tq(AG) for a Gaussian random matrix G approximates non-parametric regression using the Gaussian kernel. We argue that our approach provides a more flexible modeling framework when compared to randomized Fourier maps for kernel methods [16, 11]. 2 ◦Empirical results confirm both the practical value of our modeling framework, as well as speedup benefits of sketching. 2 Polynomial Fitting, Additive Models and Random Fourier Maps Our primary goal in this section is to motivate sketching approaches for a versatile class of BlockVandermonde structured regression problems by showing that these problems arise naturally in various statistical modeling settings. The most basic application is the one-dimensional (d = 1) polynomial regression. In multivariate additive regression models, a continuous target variable y ∈R and input variables z ∈Rd are related through the model y = µ + Pd i=1 fi(zi) + ϵi where µ is an intercept term, ϵi are zero-mean Gaussian error terms and fi are smooth univariate functions. The basic idea is to expand each function as fi(·) = Pq t=1 βi,thi,t(·) using basis functions hi,t(·) and estimate the unknown parameter vector x = [β11 . . . β1q . . . βdq]T typically by a constrained or penalized least squares model, argminx∈C∥Zx −b∥2 2 where b = (y1 . . . yn)T and Z = [H1 . . . Hq] ∈Rn×dq for (Hi)j,t = hi,t(zj) on a training sample (zi, yi), i = 1 . . . n. The constraint set C typically imposes smoothing, sparsity or group sparsity constraints [2]. It is easy to see that choosing a monomial basis hi,s(u) = us immediately maps the design matrix Z to the structured regression form of Eqn. 2. For p = 1, our algorithms also provide fast solvers for robust polynomial additive models. Additive models impose a restricted form of univariate nonlinearity which ignores interactions between covariates. Let us denote an interaction term as zα = zα1 1 . . . zαd d , α = (α1 . . . αd) where P i αi = q, αi ∈{0 . . . q}. A degree-q multivariate polynomial function space Pq is spanned by {zα, α ∈{0, . . . q}d, P i αi ≤q}. Pq admits all possible degree-q interactions but has dimensionality dq which is computationally infeasible to explicitly work with except for low-degrees and low-dimensional or sparse datasets [3]. Kernel methods with polynomial kernels k(z, z′) = zT z′q = P α zαz′α provide an implicit mechanism to compute inner products in the feature space associated with Pq. However, they require O(n3) computation for solving associated kernelized (ridge) regression problems and O(n2) storage of dense n × n Gram matrices K (given by Kij = k(zi, zj)), and therefore do not scale well. For a d × D matrix G let SG be the subspace spanned by    d X i=1 Gijzi !t , t = 1 . . . q, j = 1 . . . s   . Assuming D = dq and that G is a random matrix of i.i.d Gaussian variables, then almost surely we have SG = Pq. An intuitively appealing explicit scalable approach is then to use D ≪dq. In that case SG essentially spans a random subspace of Pq. The design matrix for solving the multivariate polynomial regression restricted to SG has the form Z = Tq(AG) where A = [zT 1 . . . zT n ]T . This scheme can be in fact related to the idea of random Fourier features introduced by Rahimi and Recht [16] in the context of approximating shift-invariant kernel functions, with the Gaussian Kernel k(z, z′) = exp (−∥z −z′∥2 2/2σ2) as the primary example. By appealing to Bochner’s Theorem [18], it is shown that the Gaussian kernel is the Fourier transform of a zero-mean multivariate Gaussian distribution with covariance matrix σ−1Id where Id denotes the d-dimensional identity matrix, k(z, z′) = exp (−∥z −z′∥2 2/2σ2) = Eω∼N(0d,σ−1Id)[φω(z)φω(z′)∗] where φω(z) = eiω′z. An empirical approximation to this expectation can be obtained by sampling D frequencies ω ∼N(0d, σ−1Id) and setting k(z, z′) = 1 D PD i=1 φωi(z)φωi(z)∗. This implies that the Gram matrix of the Gaussian kernel, Kij = exp (−∥zi −zj∥2 2/2σ2) may be approximated with high concentration as K ≈RRT where R = [cos(AG) sin(AG)] ∈Rn×2D (sine and cosine are applied elementwise as scalar functions). This randomized explicit feature mapping for the Gaussian kernel implies that standard linear regression, with R as the design matrix, can then be used to obtain a solution in time O(nD2). By taking the Maclaurin series expansion of sine and cosine upto degree q, we can see that a restricted structured regression problem of the form, 3 argminx∈range(Q)∥Tq(AG)x −b∥p, where the matrix Q ∈R2Dq×2D contains appropriate coefficients of the Maclaurin series, will closely approximate the randomized Fourier features construction of [16]. By dropping or modifying the constraint set x ∈range(Q), the setup above, in principle, can define a richer class of models. A full error analysis of this approach is the subject of a separate paper. 3 Fast Structured Regression with Sketching We now develop our randomized solvers for block-Vandermonde structured lp regression problems. In the theoretical developments below, we consider unconstrained regression though our results generalize straightforwardly to convex constraint sets C. For simplicity, we state all our results for constant failure probability. One can always repeat the regression procedure O(log(1/δ)) times, each time with independent randomness, and choose the best solution found. This reduces the failure probability to δ. 3.1 Background We begin by giving some notation and then provide necessary technical background. Given a matrix M ∈Rn×d, let M1, . . . , Md be the columns of M, and M 1, . . . , M n be the rows of M. Define ∥M∥1 to be the element-wise ℓ1 norm of M. That is, ∥M∥1 = P i∈[d] ∥Mi∥1. Let ∥M∥F = P i∈[n],j∈[d] M 2 i,j 1/2 be the Frobenius norm of M. Let [n] = {1, . . . , n}. 3.1.1 Well-Conditioning and Sampling of A Matrix Definition 3 ((α, β, 1)-well-conditioning [8]) Given a matrix M ∈Rn×d, we say M is (α, β, 1)well-conditioned if (1) ∥x∥∞≤β ∥Mx∥1 for any x ∈Rd, and (2) ∥M∥1 ≤α. Lemma 4 (Implicit in [20]) Suppose S is an r × n matrix so that for all x ∈Rd, ∥Mx∥1 ≤∥SMx∥1 ≤κ∥Mx∥1. Let Q · R be a QR-decomposition of SM, so that QR = SM and Q has orthonormal columns. Then MR−1 is (d√r, κ, 1)-well-conditioned. Theorem 5 (Theorem 3.2 of [8]) Suppose U is an (α, β, 1)-well-conditioned basis of an n × d matrix A. For each i ∈[n], let pi ≥min  1, ∥Ui∥1 t∥U∥1  , where t ≥32αβ(d ln 12 ε  + ln 2 δ  )/(ε2). Suppose we independently sample each row with probability pi, and create a diagonal matrix S where Si,i = 0 if i is not sampled, and Si,i = 1/pi if i is sampled. Then with probability at least 1 −δ, simultaneously for all x ∈Rd we have: |∥SAx∥1 −∥Ax∥1| ≤ε∥Ax∥1. We also need the following method of quickly obtaining approximations to the pi’s in Theorem 5, which was originally given in Mahoney et al. [13]. Theorem 6 Let U ∈Rn×d be an (α, β, 1)-well-conditioned basis of an n × d matrix A. Suppose G is a d × O(log n) matrix of i.i.d. Gaussians. Let pi = min  1, ∥UiG∥1 t2 √ d∥UG∥1  for all i, where t is as in Theorem 5. Then with probability 1 −1/n, over the choice of G, the following occurs. If we sample each row with probability pi, and create S as in Theorem 5, then with probability at least 1 −δ, over our choice of sampled rows, simultaneously for all x ∈Rd we have: |∥SAx∥1 −∥Ax∥1| ≤ε∥Ax∥1. 3.1.2 Oblivious Subspace Embeddings Let A ∈Rn×d. We assume that n > d. Let nnz(A) denote the number of non-zero entries of A. We can assume nnz(A) ≥n and that there are no all-zero rows or columns in A. 4 ℓ2 Norm The following family of matrices is due to Charikar et al. [4] (see also [9]): For a parameter t, define a random linear map ΦD : Rn →Rt as follows: • h : [n] 7→[t] is a random map so that for each i ∈[n], h(i) = t′ for t′ ∈[t] with probability 1/t. • Φ ∈{0, 1}t×n is a t × n binary matrix with Φh(i),i = 1, and all remaining entries 0. • D is an n × n random diagonal matrix, with each diagonal entry independently chosen to be +1 or −1 with equal probability. We will refer to Π = ΦD as a sparse embedding matrix. For certain t, it was recently shown [7] that with probability at least .99 over the choice of Φ and D, for any fixed A ∈Rn×d, we have simultaneously for all x ∈Rd, (1 −ε) · ∥Ax∥2 ≤∥ΠAx∥2 ≤(1 + ε) · ∥Ax∥2 , that is, the entire column space of A is preserved [7]. The best known value of t is t = O(d2/ε2) [14, 15] . We will also use an oblivious subspace embedding known as the subsampled randomized Hadamard transform, or SRHT. See Boutsidis and Gittens’s recent article for a state-the-art analysis [1]. Theorem 7 (Lemma 6 in [1]) There is a distribution over linear maps Π′ such that with probability .99 over the choice of Π′, for any fixed A ∈Rn×d, we have simultaneously for all x ∈Rd, (1 −ε) · ∥Ax∥2 ≤∥Π′Ax∥2 ≤(1 + ε) · ∥Ax∥2 , where the number of rows of Π′ is t′ = O(ε−2(log d)( √ d + √log n)2), and the time to compute Π′A is O(nd log t′). ℓ1 Norm The results can be generalized to subspace embeddings with respect to the ℓ1-norm [7, 14, 21]. The best known bounds are due to Woodruff and Zhang [21], so we use their family of embedding matrices in what follows. Here the goal is to design a distribution over matrices Ψ, so that with probability at least .99, for any fixed A ∈Rn×d, simultaneously for all x ∈Rd, ∥Ax∥1 ≤∥ΨAx∥1 ≤κ ∥Ax∥1 , where κ > 1 is a distortion parameter. The best known value of κ, independent of n, for which ΨA can be computed in O(nnz(A)) time is κ = O(d2 log2 d) [21]. Their family of matrices Ψ is chosen to be of the form Π · E, where Π is as above with parameter t = d1+γ for arbitrarily small constant γ > 0, and E is a diagonal matrix with Ei,i = 1/ui, where u1, . . . , un are independent standard exponentially distributed random variables. Recall that an exponential distribution has support x ∈[0, ∞), probability density function (PDF) f(x) = e−x and cumulative distribution function (CDF) F(x) = 1−e−x. We say a random variable X is exponential if X is chosen from the exponential distribution. 3.1.3 Fast Vandermonde Multipication Lemma 8 Let x0, . . . , xn−1 ∈R and V = Vq,n(x0, . . . , xn−1). For any y ∈Rn and z ∈Rq, the matrix-vector products V y and V T z can be computed in O((n + q) log2 q) time. 3.2 Main Lemmas We handle ℓ2 and ℓ1 separately. Our algorithms uses the subroutines given by the next lemmas. Lemma 9 (Efficient Multiplication of a Sparse Sketch and Tq(A)) Let A ∈Rn×d. Let Π = ΦD be a sparse embedding matrix for the ℓ2 norm with associated hash function h : [n] →[t] for an arbitrary value of t, and let E be any diagonal matrix. There is a deterministic algorithm to compute the product Φ · D · E · Tq(A) in O((nnz(A) + dtq) log2 q) time. Proof: By definition of Tq(A), it suffices to prove this when d = 1. Indeed, if we can prove for a column vector a that the product Φ·D ·E ·Tq(a) can be computed in O((nnz(a)+tq) log2 q) time, then by linearity if will follow that the product Φ · D · E · Tq(A) can be computed in O((nnz(A + 5 Algorithm 1 StructRegression-2 1: Input: An n × d matrix A with nnz(A) non-zero entries, an n × 1 vector b, an integer degree q, and an accuracy parameter ε > 0. 2: Output: With probability at least .98, a vector x′ ∈Rd for which ∥Tq(A)x′ −b∥2 ≤(1 + ε) minx ∥Tq(A)x −b∥2. 3: Let Π = ΦD be a sparse embedding matrix for the ℓ2 norm with t = O((dq)2/ε2). 4: Compute ΠTq(A) using the efficient algorithm of Lemma 9 with E set to the identity matrix. 5: Compute Πb. 6: Compute Π′(ΠTq(A)) and Π′Πb, where Π′ is a subsampled randomized Hadamard transform of Theorem 7 with t′ = O(ε−2(log(dq))(√dq + √log t)2) rows. 7: Output the minimizer x′ of ∥Π′ΠTq(A)x′ −Π′Πb∥2. dtq) log2 q) time for general d. Hence, in what follows, we assume that d = 1 and our matrix A is a column vector a. Notice that if a is just a column vector, then Tq(A) is equal to Vq,n(a1, . . . , an)T . For each k ∈[t], define the ordered list Lk = i such that ai ̸= 0 and h(i) = k. Let ℓk = |Lk|. We define an ℓk-dimensional vector σk as follows. If pk(i) is the i-th element of Lk, we set σk i = Dpk(i),pk(i) · Epk(i),pk(i). Let V k be the submatrix of Vq,n(a1, . . . , an)T whose rows are in the set Lk. Notice that V k is itself the transpose of a Vandermonde matrix, where the number of rows of V k is ℓk. By Lemma 8, the product σkV k can be computed in O((ℓk + q) log2 q) time. Notice that σkV k is equal to the k-th row of the product ΦDETq(a). Therefore, the entire product ΦDETq(a) can be computed in O P k ℓk log2 q  = O((nnz(a) + tq) log2 q) time. Lemma 10 (Efficient Multiplication of Tq(A) on the Right) Let A ∈Rn×d. For any vector z, there is a deterministic algorithm to compute the matrix vector product Tq(A) · z in O((nnz(A) + dq) log2 q) time. The proof is provided in the supplementary material. Lemma 11 (Efficient Multiplication of Tq(A) on the Left) Let A ∈Rn×d. For any vector z, there is a deterministic algorithm to compute the matrix vector product z · Tq(A) in O((nnz(A) + dq) log2 q) time. The proof is provided in the supplementary material. 3.3 Fast ℓ2-regression We start by considering the structured regression problem in the case p = 2. We give an algorithm for this problem in Algorithm 1. Theorem 12 Algorithm STRUCTREGRESSION-2 solves w.h.p the structured regression with p = 2 in time O(nnz(A) log2 q) + poly(dq/ε). Proof: By the properties of a sparse embedding matrix (see Section 3.1.2), with probability at least .99, for t = O((dq)2/ε2), we have simultaneously for all y in the span of the columns of Tq(A) adjoined with b, (1 −ε)∥y∥2 ≤∥Πy∥2 ≤(1 + ε)∥y∥2, since the span of this space has dimension at most dq + 1. By Theorem 7, we further have that with probability .99, for all vectors z in the span of the columns of Π(Tq(A) ◦b), (1 −ε)∥z∥2 ≤∥Π′z∥2 ≤(1 + ε)∥z∥2. It follows that for all vectors x ∈Rd, (1 −O(ε))∥Tq(A)x −b∥2 ≤∥Π′Π(Tq(A)x −B)∥2 ≤(1 + O(ε))∥Tq(A)x −b∥2. It follows by a union bound that with probability at least .98, the output of STRUCTREGRESSION-2 is a (1 + ε)-approximation. For the time complexity, ΠTq(A) can be computed in O((nnz(A)+dtq) log2 q) by Lemma 9, while Πb can be computed in O(n) time. The remaining steps can be performed in poly(dq/ε) time, and therefore the overall time is O(nnz(A) log2 q) + poly(dq/ε). 6 Algorithm 2 StructRegression-1 1: Input: An n × d matrix A with nnz(A) non-zero entries, an n × 1 vector b, an integer degree q, and an accuracy parameter ε > 0. 2: Output: With probability at least .98, a vector x′ ∈Rd for which ∥Tq(A)x′ −b∥1 ≤(1 + ε) minx ∥Tq(A)x −b∥1. 3: Let Ψ = ΠE = ΦDE be a subspace embedding matrix for the ℓ1 norm with t = (dq + 1)1+γ for an arbitrarily small constant γ > 0. 4: Compute ΨTq(A) = ΠETq(A) using the efficient algorithm of Lemma 9. 5: Compute Ψb = ΠEb. 6: Compute a QR-decomposition of Ψ(Tq(A) ◦b), where ◦denotes the adjoining of column vector b to Tq(A). 7: Let G be a (dq + 1) × O(log n) matrix of i.i.d. Gaussians. 8: Compute R−1 · G. 9: Compute (Tq(A) ◦b) · (R−1G) using the efficient algorithm of Lemma 10 applied to each of the columns of R−1G. 10: Let S be the diagonal matrix of Theorem 6 formed by sampling ˜ O(q1+γ/2d4+γ/2ε−2) rows of Tq(A) and corresponding entries of b using the scheme of Theorem 6. 11: Output the minimizer x′ of ∥STq(A)x′ −Sb∥1. 3.3.1 Logarithmic Dependence on 1/ε The STRUCTREGRESSION-2 algorithm can be modified to obtain a running time with a logarithmic dependence on ε by combining sketching-based methods with iterative ones. Theorem 13 There is an algorithm which solves the structured regression problem with p = 2 in time O((nnz(A) + dq) log(1/ε)) + poly(dq) w.h.p. Due to space limitations the proof is provided in Supplementary material. 3.4 Fast ℓ1-regression We now consider the structured regression in the case p = 1. The algorithm in this case is more complicated than that for p = 2, and is given in Algorithm 2. Theorem 14 Algorithm STRUCTREGRESSION-1 solves w.h.p the structured regression in problem with p = 1 in time O(nnz(A) log n log2 q) + poly(dqε−1 log n). The proof is provided in supplementary material. We note when there is a convex constraint set C the only change in the above algorithms is to optimize over x′ ∈C. 4 Experiments We report two sets of experiments on classification and regression datasets. The first set of experiments compares generalization performance of our structured nonlinear least squares regression models against standard linear regression, and nonlinear regression with random fourier features [16]. The second set of experiments focus on scalability benefits of sketching. We used Regularized Least Squares Classification (RLSC) for classification. Generalization performance is reported in Table 1. As expected, ordinary ℓ2 linear regression is very fast, especially if the matrix is sparse. However, it delivers only mediocre results. The results improve somewhat with additive polynomial regression. Additive polynomial regression maintains the sparsity structure so it can exploit fast sparse solvers. Once we introduce random features, thereby introducing interaction terms, results improve considerably. When compared with random Fourier features, for the same number of random features D, additive polynomial regression with random features get better results than regression with random Fourier features. If the number of random features is not the same, then if DF ourier = DP oly · q (where DF ourier is the number of Fourier features, and DP oly is the number of random features in the additive polynomial regression) then regression with random Fourier features seems to outperform additive polynomial regression with random features. However, computing the random features is one of the most expensive steps, so computing better approximations with fewer random features is desirable. Figure 1 reports the benefit of sketching in terms of running times, and the trade-off in terms of accuracy. In this experiment we use a larger sample of the MNIST dataset with 300,000 examples. 7 Dataset Ord. Reg. Add. Poly. Reg. Add. Poly. Reg. Ord. Reg. w/ Random Features w/ Fourier Features MNIST 14% 11% 6.9% 7.8% classification 3.9 sec 19.1 sec 5.5 sec 6.8 sec n = 60, 000, d = 784 q = 4 D = 300, q = 4 D = 500 k = 10, 000 CPU 12% 3.3% 2.8% 2.8% regression 0.01 sec 0.07 sec 0.13 sec 0.14 sec n = 6, 554, d = 21 q = 4 D = 60, q = 4 D = 180 k = 819 ADULT 15.5% 15.5% 15.0% 15.1% classification 0.17 sec 0.55 sec 3.9 sec 3.6 sec n = 32, 561, d = 123 q = 4 D = 500, q = 4 D = 1000 k = 16, 281 CENSUS 7.1% 7.0% 6.85% 6.5% regression 0.3 sec 1.4 sec 1.9 sec 2.1 sec n = 18, 186, d = 119 q = 4 D = 500, q = 4, D = 500 k = 2, 273 λ = 0.2 λ = 0.1 λ = 0.1 FOREST COVER 25.7% 23.7% 20.0% 21.3% classification 3.3 sec 7.8 sec 14.0 sec 15.5 sec n = 522, 910, d = 54 q = 4 D = 200, q = 4 D = 400 k = 58, 102 Table 1: Comparison of testing error and training time of the different methods. In the table, n is number of training instances, d is the number of features per instance and k is the number of instances in the test set. “Ord. Reg.” stands for ordinary ℓ2 regression. “Add. Poly. Reg.” stands for additive polynomial ℓ2 regression. For classification tasks, the percent of testing points incorrectly predicted is reported. For regression tasks, we report ∥yp −y∥2 / ∥y∥where yp is the predicted values and y is the ground truth. 0% 10% 20% 30% 40% 50% 0 5 10 15 20 Sketch Size (% of Examples) Speedup Sketching Sampling 0% 10% 20% 30% 40% 50% 10 −2 10 0 10 2 Sketch Size (% of Examples) Suboptimality of residual Sketching Sampling 0% 10% 20% 30% 40% 50% 3 4 5 6 7 Sketch Size (% of Examples) Classification Error on Test Set (%) Sketching Sampling Exact (a) (b) (c) Figure 1: Examining the performance of sketching. We compute 1,500 random features, and then solve the corresponding additive polynomial regression problem with q = 4, both exactly and with sketching to different number of rows. We also tested a sampling based approach which simply randomly samples a subset of the rows (no sketching). Figure 1 (a) plots the speedup of the sketched method relative to the exact solution. In these experiments we use a non-optimized straightforward implementation that does not exploit fast Vandermonde multiplication or parallel processing. Therefore, running times were measured using a sequential execution. We measured only the time required to solve the regression problem. For this experiment we use a machine with two quad-core Intel E5410 @ 2.33GHz, and 32GB DDR2 800MHz RAM. Figure 1 (b) explores the sub-optimality in solving the regression problem. More specifically, we plot (∥Yp −Y ∥F − Y ⋆ p −Y F )/ Y ⋆ p −Y F where Y is the labels matrix, Y ⋆ p is the best approximation (exact solution), and Yp is the sketched solution. We see that indeed the error decreases as the size of the sampled matrix grows, and that with a sketch size that is not too big we get to about a 10% larger objective. In Figure 1 (c) we see that this translates to an increase in error rate. Encouragingly, a sketch as small as 15% of the number of examples is enough to have a very small increase in error rate, while still solving the regression problem more than 5 times faster (the speedup is expected to grow for larger datasets). Acknowledgements The authors acknowledge the support from XDATA program of the Defense Advanced Research Projects Agency (DARPA), administered through Air Force Research Laboratory contract FA875012-C-0323. 8 References [1] C. Boutsidis and A. Gittens. Improved matrix algorithms via the Subsampled Randomized Hadamard Transform. ArXiv e-prints, Mar. 2012. To appear in the SIAM Journal on Matrix Analysis and Applications. [2] P. Buhlmann and S. v. d. Geer. Statistics for High-dimensional Data. Springer, 2011. [3] Y. Chang, C. Hsieh, K. Chang, M. Ringgaard, and C. Lin. Low-degree polynomial mapping of data for svm. JMLR, 11, 2010. [4] M. Charikar, K. Chen, and M. Farach-Colton. Finding frequent items in data streams. Theoretical Computer Science, 312(1):3 – 15, 2004. ¡ce:title¿Automata, Languages and Programming¡/ce:title¿. [5] K. L. Clarkson, P. Drineas, M. Magdon-Ismail, M. W. Mahoney, X. Meng, and D. P. Woodruff. The Fast Cauchy Transform and faster faster robust regression. CoRR, abs/1207.4684, 2012. Also in SODA 2013. [6] K. L. Clarkson and D. P. Woodruff. Numerical linear algebra in the streaming model. In Proceedings of the 41st annual ACM Symposium on Theory of Computing, STOC ’09, pages 205–214, New York, NY, USA, 2009. ACM. [7] K. L. Clarkson and D. P. Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the 45th annual ACM Symposium on Theory of Computing, STOC ’13, pages 81–90, New York, NY, USA, 2013. ACM. [8] A. Dasgupta, P. Drineas, B. Harb, R. Kumar, and M. Mahoney. Sampling algorithms and coresets for ℓp regression. SIAM Journal on Computing, 38(5):2060–2078, 2009. [9] A. Gilbert and P. Indyk. Sparse recovery using sparse matrices. Proceedings of the IEEE, 98(6):937–947, 2010. [10] N. Halko, P. G. Martinsson, and J. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53(2):217– 288, 2011. [11] Q. Le, T. Sarl´os, and A. Smola. Fastfood computing hilbert space expansions in loglinear time. In Proceedings of International Conference on Machine Learning, ICML ’13, 2013. [12] M. W. Mahoney. Randomized algorithms for matrices and data. Foundations and Trends in Machine Learning, 3(2):123–224, 2011. [13] M. W. Mahoney, P. Drineas, M. Magdon-Ismail, and D. P. Woodruff. Fast approximation of matrix coherence and statistical leverage. In Proceedings of the 29th International Conference on Machine Learning, ICML ’12, 2012. [14] X. Meng and M. W. Mahoney. Low-distortion subspace embeddings in input-sparsity time and applications to robust linear regression. In Proceedings of the 45th annual ACM Symposium on Theory of Computing, STOC ’13, pages 91–100, New York, NY, USA, 2013. ACM. [15] J. Nelson and H. L. Nguyen. OSNAP: Faster numerical linear algebra algorithms via sparser subspace embeddings. CoRR, abs/1211.1002, 2012. [16] R. Rahimi and B. Recht. Random features for large-scale kernel machines. In Proceedings of Neural Information Processing Systems, NIPS ’07, 2007. [17] V. Rokhlin and M. Tygert. A fast randomized algorithm for overdetermined linear least-squares regression. Proceedings of the National Academy of Sciences, 105(36):13212, 2008. [18] W. Rudin. Fourier Analysis on Groups. Wiley Classics Library. Wiley-Interscience, New York, 1994. [19] T. Sarl´os. Improved approximation algorithms for large matrices via random projections. In Proceeding of IEEE Symposium on Foundations of Computer Science, FOCS ’06, pages 143– 152, 2006. [20] C. Sohler and D. P. Woodruff. Subspace embeddings for the l1-norm with applications. In Proceedings of the 43rd annual ACM Symposium on Theory of Computing, STOC ’11, pages 755–764, 2011. [21] D. P. Woodruff and Q. Zhang. Subspace embeddings and lp regression using exponential random variables. In COLT, 2013. 9
2013
213
4,947
Variance Reduction for Stochastic Gradient Optimization Chong Wang Xi Chen∗ Alex Smola Eric P. Xing Carnegie Mellon University, University of California, Berkeley∗ {chongw,xichen,epxing}@cs.cmu.edu alex@smola.org Abstract Stochastic gradient optimization is a class of widely used algorithms for training machine learning models. To optimize an objective, it uses the noisy gradient computed from the random data samples instead of the true gradient computed from the entire dataset. However, when the variance of the noisy gradient is large, the algorithm might spend much time bouncing around, leading to slower convergence and worse performance. In this paper, we develop a general approach of using control variate for variance reduction in stochastic gradient. Data statistics such as low-order moments (pre-computed or estimated online) is used to form the control variate. We demonstrate how to construct the control variate for two practical problems using stochastic gradient optimization. One is convex—the MAP estimation for logistic regression, and the other is non-convex—stochastic variational inference for latent Dirichlet allocation. On both problems, our approach shows faster convergence and better performance than the classical approach. 1 Introduction Stochastic gradient (SG) optimization [1, 2] is widely used for training machine learning models with very large-scale datasets. It uses the noisy gradient (a.k.a. stochastic gradient) estimated from random data samples rather than that from the entire data. Thus, stochastic gradient algorithms can run many more iterations in a limited time budget. However, if the noisy gradient has a large variance, the stochastic gradient algorithm might spend much time bouncing around, leading to slower convergence and worse performance. Taking a mini-batch with a larger size for computing the noisy gradient could help to reduce its variance; but if the mini-batch size is too large, it can undermine the advantage in efficiency of stochastic gradient optimization. In this paper, we propose a general remedy to the “noisy gradient” problem ubiquitous to all stochastic gradient optimization algorithms for different models. Our approach builds on a variance reduction technique, which makes use of control variates [3] to augment the noisy gradient and thereby reduce its variance. The augmented “stochastic gradient” can be shown to remain an unbiased estimate of the true gradient, a necessary condition that ensures the convergence. For such control variates to be effective and sound, they must satisfy the following key requirements: 1) they have a high correlation with the noisy gradient, and 2) their expectation (with respect to random data samples) is inexpensive to compute. We show that such control variates can be constructed via low-order approximations to the noisy gradient so that their expectation only depends on low-order moments of the data. The intuition is that these low-order moments roughly characterize the empirical data distribution, and can be used to form the control variate to correct the noisy gradient to a better direction. In other words, the variance of the augmented “stochastic gradient” becomes smaller as it is derived with more information about the data. The rest of the paper is organized as follows. In §2, we describe the general formulation and the theoretical property of variance reduction via control variates in stochastic gradient optimization. 1 In §3, we present two examples to show how one can construct control variates for practical algorithms. (More examples are provided in the supplementary material.) These include a convex problem—the MAP estimation for logistic regression, and a non-convex problem—stochastic variational inference for latent Dirichlet allocation [22]. Finally, we demonstrate the empirical performance of our algorithms under these two examples in §4. We conclude with a discussion on some future work. 2 Variance reduction for general stochastic gradient optimization We begin with a description of the general formulation of variance reduction via control variate for stochastic gradient optimization. Consider a general optimization problem over a finite set of training data D = {xd}D d=1 with each xd ∈Rp. Here D is the number of the training data. We want to maximize the following function with respect to a p-dimensional vector w, maximize w L(w) := R(w) + (1/D) PD d=1 f(w; xd), where R(w) is a regularization function.1 Gradient-based algorithms can be used to maximize L(w) at the expense of computing the gradient over the entire training set. Instead, stochastic gradient (SG) methods use the noisy gradient estimated from random data samples. Suppose data index d is selected uniformly from {1, · · · , D} at step t, g(w; xd) = ∇wR(w) + ∇wf(w; xd), (1) wt+1 = wt + ρtg(w; xd), (2) where g(w; xd) is the noisy gradient that only depends on xd and ρt is a proper step size. To make notation simple, we use gd(w) ≜g(w; xd). Following the standard stochastic optimization literature [1, 4], we require the expectation of the noisy gradient gd equals to the true gradient, Ed[gd(w)] = ∇wL(w), (3) to ensure the convergence of the stochastic gradient algorithm. When the variance of gd(w) is large, the algorithm could suffer from slow convergence. The basic idea of using control variates for variance reduction is to construct a new random vector that has the same expectation as the target expectation but with smaller variance. In previous work [5], control variates were used to improve the estimate of the intractable integral in variational Bayesian inference which was then used to compute the gradient of the variational lower bound. In our context, we employ a random vector hd(w) of length p to reduce the variance of the sampled gradient, egd(w) = gd(w) −AT (hd(w) −h(w)), (4) where A is a p × p matrix and h(w) ≜Ed[hd(w)]. (We will show how to choose hd(w) later, but it usually depends on the form of gd(w).) The random vector egd(w) has the same expectation as the noisy gradient gd(w) in Eq. 1, and thus can be used to replace gd(w) in the SG update in Eq. 2. To reduce the variance of the noisy gradient, the trace of the covariance matrix of egd(w), Vard[egd(w)] ≜Covd[egd(w), egd(w)] = Vard[gd(w)] −(Covd[hd(w), gd(w)] + Covd[gd(w), hd(w)])A + AT Vard[hd(w)]A, (5) must be necessarily small; therefore we set A to be the minimizer of Tr (Vard[egd(w)]). That is, A∗= argminATr (Vard[egd(w)]) = (Vard[hd(w)])−1 (Covd[gd(w), hd(w)] + Covd[hd(w), gd(w)]) /2. (6) The optimal A∗is a function of w. Why is egd(w) a better choice? Now we show that egd(w) is a better “stochastic gradient” under the ℓ2-norm. In the first-order stochastic oracle model, we normally assume that there exists a constant σ such that for any estimate w in its domain [6, 7]: Ed h ∥gd(w) −Ed[gd(w)]∥2 2 i = Tr(Vard[gd(w)]) ≤σ2. 1We follow the convention of maximizing a function f: when we mention a convex problem, we actually mean the objective function −f is convex. 2 Under this assumption, the dominating term in the optimal convergence rate is O(σ/ √ t) for convex problems and O(σ2/(µt)) for strongly convex problems, where µ is the strong convexity parameter (see the definition of strong convexity on Page 459 in [8]). Now suppose that we can find a random vector hd(w) and compute A∗according to Eq. 6. By plugging A∗back into Eq. 5, Ed h ∥egd(w) −Ed[egd(w)]∥2 2 i = Tr(Vard[˜gd(w)]), where Vard[egd(w)] = Vard[gd(w)] −Covd[gd(w), hd(w)](Vard[hd(w)])−1Covd[hd(w), gd(w)]. For any estimate w, Covd(gd, hd) (Covd(hd, hd))−1 Covd(hd, gd) is a semi-positive definite matrix. Therefore, its trace, which equals to the sum of the eigenvalues, is positive (or zero when hd and gd are uncorrelated) and hence, Ed h ∥˜gd(w) −Ed[˜gd(w)]∥2 2 i ≤Ed h ∥gd(w) −Ed[gd(w)]∥2 2 i . In other words, it is possible to find a constant τ ≤σ such that Ed h ∥˜gd(w) −Ed[˜gd(w)]∥2 2 i ≤τ 2 for all w. Therefore, when applying stochastic gradient methods, we could improve the optimal convergence rate from O(σ/ √ t) to O(τ/ √ t) for convex problems; and from O(σ2/(µt)) to O(τ 2/(µt)) for strongly convex problems. Estimating optimal A∗. When estimating A∗according to Eq. 6, one needs to compute the inverse of Vard[hd(w)], which could be computationally expensive. In practice, we could constrain A to be a diagonal matrix. According to Eq. 5, when A = Diag(a11, . . . , app), its optimal value is: a∗ ii = [Covd(gd(w),hd(w))]ii [Vard(hd(w))]ii . (7) This formulation avoids the computation of the matrix inverse, and leads to significant reduction of computational cost since only the diagonal elements of Covd(gd(w), hd(w)) and Vard(hd(w)), instead of the full matrices, need to be evaluated. It can be shown that, this simpler surrogate to the A∗due to Eq. 6 still leads to a better convergence rate. Specifically: Ed  ∥˜gd(w) −Ed[˜gd(w)]∥2 2  = Tr(Vard(˜gd(w))) = Tr (Vard(gd(w))) −Pp i=1 ([Covd(gd(w),hd(w))]ii)2 [Vard(hd(w))]ii , = Pp i=1(1 −ρ2 ii)Var(gd(w))ii ≤Tr (Vard(gd(w))) = Ed  ∥gd(w) −Ed[gd(w)]∥2 2  , (8) where ρii is the Pearson’s correlation coefficient between [gd(w)]i and [hd(w)]i. Indeed, an even simpler surrogate to the A∗, by reducing A to a single real number a, can also improve convergence rate of SG. In this case, according to Eq. 5, the optimal a∗is simply: a∗= Tr (Covd(gd(w), hd(w)))/Tr (Vard(hd(w))). (9) To estimate the optimal A∗or its surrogates, we need to evaluate Covd(gd(w), hd(w)) and Vard(hd(w)) (or their diagonal elements), which can be approximated by the sample covariance and variance from mini-batch samples while running the stochastic gradient algorithm. If we can not always obtain mini-batch samples, we may use strategies like moving average across iterations, as those used in [9, 10]. From Eq. 8, we observe that when the Pearson’s correlation coefficient between gd(w) and hd(w) is higher, the control variate hd(w) will lead to a more significant level of variance reduction and hence faster convergence. In the maximal correlation case, one could set hd(w) = gd(w) to obtain zero variance. But obviously, we cannot compute Ed[hd(w)] efficiently in this case. In practice, one should construct hd(w) such that it is highly correlated with gd(w). In next section, we will show how to construct control variates for both convex and non-convex problems. 3 Practicing variance reduction on convex and non-convex problems In this section, we apply the variance reduction technique presented above to two exemplary but practical problems: MAP estimation for logistic regression—a convex problem; and stochastic variational inference for latent Dirichlet allocation [11, 22]—a non-convex problem. In the supplement, 3 (a) entire data (b) sampled subset (c) sampled subset with data statistics exact gradient direction exact gradient direction but unreachable noisy gradient direction exact gradient direction but unreachable noisy gradient direction improved noisy gradient direction Figure 1: The illustration of how data statistics help reduce variance for the noisy gradient in stochastic optimization. The solid (red) line is the final gradient direction the algorithm will follow. (a) The exact gradient direction computed using the entire dataset. (b) The noisy gradient direction computed from the sampled subset, which can have high variance. (c) The improved noisy gradient direction with data statistics, such as low-order moments of the entire data. These low-order moments roughly characterize the data distribution, and are used to form the control variate to aid the noisy gradient. we show that the same principle can be applied to more problems, such as hierarchical Dirichlet process [12, 13] and nonnegative matrix factorization [14]. As we discussed in §2, the higher the correlation between gd(w) and hd(w), the lower the variance is. Therefore, to apply the variance reduction technique in practice, the key is to construct a random vector hd(w) such that it has high correlations with gd(w), but its expectation h(w) = Ed[hd(w)] is inexpensive to compute. The principle behind our choice of h(w) is that we construct h(w) based on some data statistics, such as low-order moments. These low-order moments roughly characterize the data distribution which does not depend on parameter w. Thus they can be pre-computed when processing the data or estimated online while running the stochastic gradient algorithm. Figure 1 illustrates this idea. We will use this principle throughout the paper to construct control variates for variance reduction under different scenarios. 3.1 SG with variance reduction for logistic regression Logistic regression is widely used for classification [15]. Given a set of training examples (xd, yd), d = 1, ..., D, where yd = 1 or yd = −1 indicates class labels, the probability of yd is p(yd | xd, w) = σ(ydw⊤xd), where σ(z) = 1/(1 + exp(−z)) is the logistic function. The averaged log likelihood of the training data is ℓ(w) = 1 D PD d=1  ydw⊤xd −log 1 + exp(ydw⊤xd)  . (10) An SG algorithm employs the following noisy gradient: gd(w) = ydxdσ(−ydw⊤xd). (11) Now we show how to construct our control variate for logistic regression. We begin with the first-order Taylor expansion around ˆz for the sigmoid function, σ(z) ≈σ(ˆz) (1 + σ(−ˆz)(z −ˆz)) . We then apply this approximation to σ(−ydw⊤xd) in Eq. 11 to obtain our control variate.2 For logistic regression, we consider two classes separately, since data samples within each class are more likely to be similar. We consider positive data samples first. Let z = −w⊤xd, and we define our control variate hd(w) for yd = 1 as h(1) d (w) ≜xdσ(ˆz) (1 + σ(−ˆz)(z −ˆz)) = xdσ(ˆz) 1 + σ(−ˆz)(−w⊤xd −ˆz)  . Its expectation given yd = 1 can be computed in closed-form as Ed[h(1) d (w) | yd = 1] = σ(ˆz)  ¯x(1) (1 −σ(−ˆz)ˆz) −σ(−ˆz)  Var(1)[xd] + ¯x(1)(¯x(1))⊤ w  , 2Taylor expansion is not the only way to obtain control variates. Lower bounds or upper bounds of the objective function [16] can also provide alternatives. But we will not explore those solutions in this paper. 4 where ¯x(1) and Var(1)[xd] are the mean and variance of the input features for the positive examples. In our experiments, we choose ˆz = −w⊤¯x(1), which is the center of the positive examples. We can similarly derive the control variate h(−1) d (w) for negative examples and we omit the details. Given the random sample regardless its label, the expectation of the control variate is computed as Ed[hd(w)] = (D(1)/D)Ed[h(1) d (w) | yd = 1] + (D(−1)/D)Ed[h(−1) d (w) | yd = −1], where D(1) and D(−1) are the number of positive and negative examples and D(1)/D is the probability of choosing a positive example from the training set. With Taylor approximation, we would expect our control variate is highly correlated with the noisy gradient. See our experiments in §4 for details. 3.2 SVI with variance reduction for latent Dirichlet allocation The stochastic variational inference (SVI) algorithm used for latent Dirichlet allocation (LDA) [22] is also a form of stochastic gradient optimization, therefore it can also benefit from variance reduction. The basic idea is to stochastically optimize the variational objective for LDA, using stochastic mean field updates augmented by control variates derived from low-order moments on the data. Latent Dirichlet allocation (LDA). LDA is the simplest topic model for discrete data such as text collections [17, 18]. Assume there are K topics. The generative process of LDA is as follows. 1. Draw topics βk ∼DirV (η) for k ∈{1, . . . , K}. 2. For each document d ∈{1, . . . , D}: (a) Draw topic proportions θd ∼DirK(α). (b) For each word wdn ∈{1, . . . , N}: i. Draw topic assignment zdn ∼Mult(θd). ii. Draw word wdn ∼Mult(βzdn). Given the observed words w ≜w1:D, we want to estimate the posterior distribution of the latent variables, including topics β ≜β1:K, topic proportions θ ≜θ1:D and topic assignments z ≜z1:D, p(β, θ, z | w) ∝QK k=1 p(βk | η) QD d=1 p(θd | α) QN n=1 p(zdn | θd)p(wdn | βzdn). (12) However, this posterior is intractable. We must resort to approximation methods. Mean-field variational inference is a popular approach for the approximation [19]. Mean-field variational inference for LDA. Mean-field variational inference posits a family of distributions (called variational distributions) indexed by free variational parameters and then optimizes these parameters to minimize the KL divergence between the variational distribution and the true posterior. For LDA, the variational distribution is q(β, θ, z) = QK k=1 q(βk | λk) QD d=1 q(θd | γd) QN n=1 q(zdn | φdn), (13) where the variational parameters are λk (Dirichlet), θd (Dirichlet), and φdn (multinomial). We seek the variational distribution (Eq. 13) that minimizes the KL divergence to the true posterior (Eq. 12). This is equivalent to maximizing the lower bound of the log marginal likelihood of the data, log p(w) ≥Eq [log p(β, θ, z, w)] −Eq [log q(β, θ, z)] ≜L(q), (14) where Eq [·] denotes the expectation with respect to the variational distribution q(β, θ, z). Setting the gradient of the lower bound L(q) with respect to the variational parameters to zero gives the following coordinate ascent algorithm [17]. For each document d ∈{1, . . . , D}, we run local variational inference using the following updates until convergence, φk dv ∝exp {Ψ(γdk) + Ψ(λk,v) −Ψ (P v λkv)} for v ∈{1, . . . , V } (15) γd = α + PV v=1 ndvφdv. (16) where Ψ(·) is the digamma function and ndv is the number of term v in document d. Note that here we use φdv instead of φdn in Eq. 13 since the same term v have the same φdn. After finding the variational parameters for each document, we update the variational Dirichlet for each topic, λkv = η + PD d=1 ndvφk dv. (17) 5 The whole coordinate ascent variational algorithm iterates over Eq. 15, 16 and 17 until convergence. However, this also reveals the drawback of this algorithm—updating the topic parameter λ in Eq. 17 depends on the variational parameters φ from every document. This is especially inefficient for largescale datasets. Stochastic variational inference solves this problem using stochastic optimization. Stochastic variational inference (SVI). Instead of using the coordinate ascent algorithm, SVI optimizes the variational lower bound L(q) using stochastic optimization [22]. It draws random samples from the corpus and use these samples to form the noisy estimate of the natural gradient [20]. Then the algorithm follows that noisy natural gradient with a decreasing step size until convergence. The noisy gradient only depends on the sampled data and it is inexpensive to compute. This leads to a much faster algorithm than the traditional coordinate ascent variational inference algorithm. Let d be a random document index, d ∼Unif(1, ..., D) and Ld(q) be the sampled lower bound. The sampled lower bound Ld(q) has the same form as the L(q) in Eq. 14 except that the sampled lower bound uses a virtual corpus that only contains document d replicated D times. According to [22], for LDA the noisy natural gradient with respect to the topic variational parameters is gd(λkv) ≜−λkv + η + Dndvφk dv, (18) where the φk dv are obtained from the local variational inference by iterating over Eq. 15 and 16 until convergence.3 With a step size ρt, SVI uses the following update λkv ←λkv + ρtgd(λkv). However, the sampled natural gradient gd(λkv) in Eq. 18 might have a large variance when the number of documents is large. This could lead to slow convergence or a poor local mode. Control variate. Now we show how to construct control variates for the noisy gradient to reduce its variance. According to Eq. 18, the noisy gradient gd(λkv) is a function of topic assignment parameters φdv, which in turn depends on wd, the words in document d, through the iterative updates in Eq. 15 and 16. This is different from the case in Eq. 11. In logistic regression, the gradient is an analytical function of the training data (Eq. 11), while in LDA, the natural gradient directly depends on the optimal local variational parameters (Eq. 18), which then depends on the training data through the local variational inference (Eq. 15). However, by carefully exploring the structure of the iterations, we can create effective control variates. The key idea is to run Eq. 15 and 16 only up to a fixed number of iterations, together with some additional approximations to maintain analytical tractability. Starting the iteration with γdk having the same value, we have φk(0) v ∝exp {Ψ(λkv) −Ψ (P v λkv)}.4 Note that φk(0) v does not depend on document d. Intuitively, φk(0) v is the probability of term v belonging to topic k out of K topics. Next we use γdk −α to approximate exp(Ψ(γdk)) in Eq. 15.5 Plugging this approximation into Eq. 15 and 16 leads to the update, φk(1) dv = ( PV u=1 fduφk(0) u )φk(0) v PK k=1 PV u=1 fduφk(0) u  φk(0) v ≈ ( PV u=1 fduφk(0) u )φk(0) v PK k=1 PV u=1 ¯ fuφk(0) u  φk(0) v , (19) where fdv = ndv/nd is the empirical frequency of term v in document d. In addition, we replace fdu with ¯fu ≜(1/D) P d fdu, the averaged frequency of term u in the corpus, making the denominator of Eq. 19, m(1) v ≜PK k=1 PV u=1 ¯fuφk(0) u  φk(0) v , independent of documents. This approximation does not change the relative importance for the topics from term v. We define our control variate as hd(λkv) ≜Dndvφk(1) dv , whose expectation is Ed[hd(λkv)] =  D/m(1) v  nPV u=1 nvfuφk(0) u  φk(0) v o , where nvfu ≜ (1/D) P d ndufdv = (1/D) P d ndundv/nd. This depends on up to the second-order moments of data, which is usually sparse. We can continue to compute φk(2) dv (or higher) given φk(1) dv , which turns out using the third-order (or higher) moments. We omit the details here. Similar ideas can be used in deriving control variates for hierarchical Dirichlet process [12, 13] and nonnegative matrix factorization [14]. We outline these in the supplementary material. 3Running to convergence is essential to ensure the natural gradient is valid in Eq. 18 [22]. 4In our experiments, we set φk(0) v = 0 if φk(0) v is less than 0.02. This leaves φ(0) very sparse, since a term usually belongs to a small set of topics. For example, in Nature data, only 6% entries are non-zero. 5The scale of the approximation does not matter—C(γdk −α), where C is a constant, has the same effect as γdk −α. Other approximations to exp(Ψ(γdk)) can also be used as long as it is linear in term of γdk. 6 0.01 0.10 1 100 data points (x100K) Optimum minus Objective method Variance Reduction-1 Standard-1 Variance Reduction-0.2 Standard-0.2 Variance Reduction-0.05 Standard-0.05 (a) Optimum minus Objective on training data (b) Test Accuracy on testing data 0.65 0.70 0.75 1 100 data points (x100K) Test Accuracy method Variance Reduction-1 Standard-1 Variance Reduction-0.2 Standard-0.2 Variance Reduction-0.05 Standard-0.05 Figure 2: Comparison of our approach with standard SG algorithms using different constant learning rates. The figure was created using geom smooth function in ggplot2 using local polynomial regression fitting (loess). A wider stripe indicates the result fluctuates more. This figure is best viewed in color. (Decayed learning rates we tested did not perform as well as constant ones and are not shown.) Legend “Variance Reduction-1” indicates the algorithm with variance reduction using learning rate ρt = 1.0. (a) Optimum minus the objective on the training data. The lower the better. (b) Test accuracy on testing data. The higher the better. From these results, we see that variance reduction with ρt = 1.0 performs the best, while the standard SG algorithm with ρt = 1.0 learns faster but bounces more (a wider stripe) and performs worse at the end. With ρt = 0.05, variance reduction performs about the same as the standard algorithm and both converge slowly. These indicate that with the variance reduction, a larger learning rate is possible to allow faster convergence without sacrificing performance. 0.960 0.965 0.970 0.975 0 30 60 90 120 data points (x100K) Pearson's correlation coefficient Figure 3: Pearson’s correlation coefficient for ρt = 1.0 as we run the our algorithm. It is usually high, indicating the control variate is highly correlated with the noisy gradient, leading to a large variance reduction. Other settings are similar. 4 Experiments In this section, we conducted experiments on the MAP estimation for logistic regression and stochastic variational inference for LDA.6 In our experiments, we chose to estimate the optimal a∗as a scalar shown in Eq. 9 for simplicity. 4.1 Logistic regression We evaluate our algorithm on stochastic gradient (SG) for logistic regression. For the standard SG algorithm, we also evaluated the version with averaged output (ASG), although we did not find it outperforms the standard SG algorithm much. Our regularization added to Eq. 10 for the MAP estimation is −1 2Dw⊤w. Our dataset contains covtype (D = 581, 012, p = 54), obtained from the LIBSVM data website.7 We separate 5K examples as the test set. We test two types of learning rates, constant and decayed. For constant rates, we explore ρt ∈{0.01, 0.05, 0.1, 0.2, 0.5, 1}. For decayed rates, we explore ρt ∈{t−1/2, t−0.75, t−1}. We use a mini-batch size of 100. Results. We found that the decayed learning rates we tested did not work well compared with the constant ones on this data. So we focus on the results using the constant rates. We plot three cases in Figure 2 for ρt ∈{0.05, 0.2, 1} to show the trend by comparing the objective function on the training data and the test accuracy on the testing data. (The best result for variance reduction is obtained when ρt = 1.0 and for standard SGD is when ρt = 0.2.) These contain the best results of 6Code will be available on authors’ websites. 7http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets 7 Nature New York Times Wikipedia -7.75 -7.50 -7.25 -7.00 -8.50 -8.25 -8.00 -7.75 -7.50 -8.1 -7.9 -7.7 -7.5 -7.3 -7.1 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 time (in hours) Heldout log likelihood method Standard-100 Standard-500 Var-Reduction-100 Var-Reduction-500 Figure 4: Held-out log likelihood on three large corpora. (Higher numbers are better.) Legend “Standard-100” indicates the stochastic algorithm in [10] with the batch size as 100. Our method consistently performs better than the standard stochastic variational inference. A large batch size tends to perform better. each. With variance reduction, a large learning rate is possible to allow faster convergence without sacrificing performance. Figure 3 shows the mean of Pearson’s correlation coefficient between the control variate and noisy gradient8, which is quite high—the control variate is highly correlated with the noisy gradient, leading to a large variance reduction. 4.2 Stochastic variational inference for LDA We evaluate our algorithm on stochastic variational inference for LDA. [10] has shown that the adaptive learning rate algorithm for SVI performed better than the manually tuned ones. So we use their algorithm to estimate adaptive learning rate. For LDA, we set the number of topics K = 100, hyperparameters α = 0.1 and η = 0.01. We tested mini-batch sizes as 100 and 500. Data sets. We analyzed three large corpora: Nature, New York Times, and Wikipedia. The Nature corpus contains 340K documents and a vocabulary of 4,500 terms; the New York Times corpus contains 1.8M documents and a vocabulary vocabulary of 8,000 terms; the Wikipedia corpus contains 3.6M documents and a vocabulary of 7,700 terms. Evaluation metric and results. To evaluate our models, we held out 10K documents from each corpus and calculated its predictive likelihood. We follow the metric used in recent topic modeling literature [21, 22]. For a document wd in Dtest, we split it in into halves, wd = (wd1, wd2), and computed the predictive log likelihood of the words in wd2 conditioned on wd1 and Dtrain. The per-word predictive log likelihood is defined as likelihoodpw ≜P d∈Dtest log p(wd2|wd1, Dtrain)/P d∈Dtest |wd2|. Here | · | is the number of words. A better predictive distribution given the first half gives higher likelihood to the second half. We used the same strategy as in [22] to approximate its computation. Figure 4 shows the results. On all three corpora, our algorithm gives better predictive distributions. 5 Discussions and future work In this paper, we show that variance reduction with control variates can be used to improve stochastic gradient optimization. We further demonstrate its usage on convex and non-convex problems, showing improved performance on both. In future work, we would like to explore how to use second-order methods (such as Newton’s method) or better line search algorithms to further improve the performance of stochastic optimization. This is because, for example, with variance reduction, second-order methods are able to capture the local curvature much better. Acknowledgement. We thank anonymous reviewers for their helpful comments. We also thank Dani Yogatama for helping with some experiments on LDA. Chong Wang and Eric P. Xing are supported by NSF DBI-0546594 and NIH 1R01GM093156. 8Since the control variate and noisy gradient are vectors, we use the mean of the Pearson’s coefficients computed for each dimension between these two vectors. 8 References [1] Spall, J. Introduction to stochastic search and optimization: Estimation, simulation, and control. John Wiley and Sons, 2003. [2] Bottou, L. Stochastic learning. In O. Bousquet, U. von Luxburg, eds., Advanced Lectures on Machine Learning, Lecture Notes in Artificial Intelligence, LNAI 3176, pages 146–168. Springer Verlag, Berlin, 2004. [3] Ross, S. M. Simulation. Elsevier, fourth edn., 2006. [4] Nemirovski, A., A. Juditsky, G. Lan, et al. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [5] Paisley, J., D. Blei, M. Jordan. Variational Bayesian inference with stochastic search. In International Conference on Machine Learning. 2012. [6] Lan, G. An optimal method for stochastic composite optimization. Mathematical Programming, 133:365– 397, 2012. [7] Chen, X., Q. Lin, J. Pena. Optimal regularized dual averaging methods for stochastic optimization. In Advances in Neural Information Processing Systems (NIPS). 2012. [8] Boyd, S., L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [9] Schaul, T., S. Zhang, Y. LeCun. No More Pesky Learning Rates. ArXiv e-prints, 2012. [10] Ranganath, R., C. Wang, D. M. Blei, et al. An adaptive learning rate for stochastic variational inference. In International Conference on Machine Learning. 2013. [11] Hoffman, M., D. Blei, F. Bach. Online inference for latent Drichlet allocation. In Neural Information Processing Systems. 2010. [12] Teh, Y., M. Jordan, M. Beal, et al. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101(476):1566–1581, 2007. [13] Wang, C., J. Paisley, D. Blei. Online variational inference for the hierarchical Dirichlet process. In International Conference on Artificial Intelligence and Statistics. 2011. [14] Seung, D., L. Lee. Algorithms for non-negative matrix factorization. In Neural Information Processing Systems. 2001. [15] Bishop, C. Pattern Recognition and Machine Learning. Springer New York., 2006. [16] Jaakkola, T., M. Jordan. A variational approach to Bayesian logistic regression models and their extensions. In International Workshop on Artificial Intelligence and Statistics. 1996. [17] Blei, D., A. Ng, M. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [18] Blei, D., J. Lafferty. Topic models. In A. Srivastava, M. Sahami, eds., Text Mining: Theory and Applications. Taylor and Francis, 2009. [19] Jordan, M., Z. Ghahramani, T. Jaakkola, et al. Introduction to variational methods for graphical models. Machine Learning, 37:183–233, 1999. [20] Amari, S. Natural gradient works efficiently in learning. Neural computation, 10(2):251–276, 1998. [21] Asuncion, A., M. Welling, P. Smyth, et al. On smoothing and inference for topic models. In Uncertainty in Artificial Intelligence. 2009. [22] Hoffman, M., D. Blei, C. Wang, et al. Stochastic Variational Inference. Journal of Machine Learning Research, 2013. 9
2013
214
4,948
On Decomposing the Proximal Map Yaoliang Yu Department of Computing Science, University of Alberta, Edmonton AB T6G 2E8, Canada yaoliang@cs.ualberta.ca Abstract The proximal map is the key step in gradient-type algorithms, which have become prevalent in large-scale high-dimensional problems. For simple functions this proximal map is available in closed-form while for more complicated functions it can become highly nontrivial. Motivated by the need of combining regularizers to simultaneously induce different types of structures, this paper initiates a systematic investigation of when the proximal map of a sum of functions decomposes into the composition of the proximal maps of the individual summands. We not only unify a few known results scattered in the literature but also discover several new decompositions obtained almost effortlessly from our theory. 1 Introduction Regularization has become an indispensable part of modern machine learning algorithms. For example, the ℓ2-regularizer for kernel methods [1] and the ℓ1-regularizer for sparse methods [2] have led to immense successes in various fields. As real data become more and more complex, different types of regularizers, usually nonsmooth functions, have been designed. In many applications, it is thus desirable to combine regularizers, usually taking their sum, to promote different structures simultaneously. Since many interesting regularizers are nonsmooth, they are harder to optimize numerically, especially in large-scale high-dimensional settings. Thanks to recent advances [3–5], gradient-type algorithms have been generalized to take nonsmooth regularizers explicitly into account. And due to their cheap per-iteration cost (usually linear-time), these algorithms have become prevalent in many fields recently. The key step of such gradient-type algorithms is to compute the proximal map (of the nonsmooth regularizer), which is available in closed-form for some specific regularizers. However, the proximal map becomes highly nontrivial when we start to combine regularizers. The main goal of this paper is to systematically investigate when the proximal map of a sum of functions decomposes into the composition of the proximal maps of the individual functions, which we simply term prox-decomposition. Our motivation comes from a few known decomposition results scattered in the literature [6–8], all in the form of our interest. The study of such proxdecompositions is not only of mathematical interest, but also the backbone of popular gradient-type algorithms [3–5]. More importantly, a precise understanding of this decomposition will shed light on how we should combine regularizers, taking computational efforts explicitly into account. After setting the context in Section 2, we motivate the decomposition rule with some justifications, as well as some cautionary results. Based on a sufficient condition presented in Section 3.1, we study how “invariance” of the subdifferential of one function would lead to nontrivial proxdecompositions. Specifically, we prove in Section 3.3 that when the subdifferential of one function is scaling invariant, then the prox-decomposition always holds if and only if another function is radial—which is, quite unexpectedly, exactly the same condition proven recently for the validity of the representer theorem in the context of kernel methods [9, 10]. The generalization to cone invariance is considered in Section 3.4, and enables us to recover most known prox-decompositions, as well as some new ones falling out quite naturally. 1 Our notations are mostly standard. We use ιC(x) for the indicator function that takes 0 if x ∈C and ∞otherwise, and 1C(x) for the indicator that takes 1 if x ∈C and 0 otherwise. The symbol Id stands for the identity map and the extended real line R ∪{∞} is denoted as ¯R. Throughout the paper we denote ∂f(x) as the subdifferential of the function f at point x. 2 Preliminary Let our domain be some (real) Hilbert space (H, ⟨·, ·⟩), with the induced Hilbertian norm ∥· ∥. If needed, we will assume some fixed orthonormal basis {ei}i∈I is chosen for H, so that for x ∈H we are able to refer to its “coordinates” xi = ⟨x, ei⟩. For any closed convex proper function f : H →¯R, we define its Moreau envelop as [11] ∀y ∈H, Mf(y) = min x∈H 1 2∥x −y∥2 + f(x), (1) and the related proximal map Pf(y) = argmin x∈H 1 2∥x −y∥2 + f(x). (2) Due to the strong convexity of ∥· ∥2 and the closedness and convexity of f, Pf(y) always exists and is unique. Note that Mf : H →R while Pf : H →H. When f = ιC is the indicator of some closed convex set C, the proximal map reduces to the usual projection. Perhaps the most interesting property of Mf, known as Moreau’s identity, is the following decomposition [11] Mf(y) + Mf ∗(y) = 1 2∥y∥2, (3) where f ∗(z) = supx ⟨x, z⟩−f(x) is the Fenchel conjugate of f. It can be shown that Mf is Frechét differentiable, hence taking derivative w.r.t. y in both sides of (3) yields Pf(y) + Pf ∗(y) = y. (4) 3 Main Results Our main goal is to investigate and understand the equality (we always assume f + g ̸≡∞) Pf+g ?= Pf ◦Pg ?= Pg ◦Pf, (5) where f, g ∈Γ0, the set of all closed convex proper functions on H, and f ◦g denotes the mapping composition. We present first some cautionary results. Note that Pf = (Id+∂f)−1, hence under minor technical assumptions Pf+g = (P−1 2f +P−1 2g )−1◦2Id. However, computationally this formula is of little use. On the other hand, it is possible to develop forward-backward splitting procedures1 to numerically compute Pf+g, using only Pf and Pg as subroutines [12]. Our focus is on the exact closed-form formula (5). Interestingly, under some “shrinkage” assumption, the prox-decomposition (5), even if not necessarily hold, can still be used in subgradient algorithms [13]. Our first result is encouraging: Proposition 1. If H = R, then for any f, g ∈Γ0, there exists h ∈Γ0 such that Ph = Pf ◦Pg. Proof: In fact, Moreau [11, Corollary 10.c] proved that P : H →H is a proximal map iff it is nonexpansive and it is the subdifferential of some convex function in Γ0. Although the latter condition in general is not easy to verify, it reduces to monotonic increasing when H = R (note that P must be continuous). Since both Pf and Pg are increasing and nonexpansive, it follows easily that so is Pf ◦Pg, hence the existence of h ∈Γ0 so that Ph = Pf ◦Pg. In a general Hilbert space H, we again easily conclude that the composition Pf ◦Pg is always a nonexpansion, which means that it is “close” to be a proximal map. This justifies the composition Pf ◦Pg as a candidate for the decomposition of Pf+g. However, we note that Proposition 1 indeed can fail already in R2: 1In some sense, this procedure is to compute Pf+g ≈limt→∞(Pf ◦Pg)t, modulo some intermediate steps. Essentially, our goal is to establish the one-step convergence of that iterative procedure. 2 Example 1. Let H = R2. Let f = ι{x1=x2} and g = ι{x2=0}. Clearly both f and g are in Γ0. The proximal maps in this case are simply projections: Pf(x) = ( x1+x2 2 , x1+x2 2 ) and Pg(x) = (x1, 0). Therefore Pf(Pg(x)) = ( x1 2 , x1 2 ). We easily verify that the inequality ∥Pf(Pg(x)) −Pf(Pg(y))∥2 ≤⟨Pf(Pg(x)) −Pf(Pg(y)), x −y⟩ is not always true, contradiction if Pf ◦Pg was a proximal map [11, Eq. (5.3)]. Even worse, when Proposition 1 does hold, in general we can not expect the decomposition (5) to be true without additional assumptions. Example 2. Let H = R and q(x) = 1 2x2. It is easily seen that Pλq(x) = 1 1+λx. Therefore Pq ◦Pq = 1 4Id ̸= 1 3Id = Pq+q. We will give an explanation for this failure of composition shortly. Nevertheless, as we will see, the equality in (5) does hold in many scenarios, and an interesting theory can be suitably developed. 3.1 A Sufficient Condition We start with a sufficient condition that yields (5). This result, although easy to obtain, will play a key role in our subsequent development. Using the first order optimality condition and the definition of the proximal map (2), we have Pf+g(y) −y + ∂(f + g)(Pf+g(y)) ∋0 (6) Pg(y) −y + ∂g(Pg(y)) ∋0 (7) Pf(Pg(y)) −Pg(y) + ∂f(Pf(Pg(y))) ∋0. (8) Adding the last two equations we obtain Pf(Pg(y)) −y + ∂g(Pg(y)) + ∂f(Pf(Pg(y))) ∋0. (9) Comparing (6) and (9) gives us Theorem 1. A sufficient condition for Pf+g = Pf ◦Pg is ∀x ∈H, ∂g(Pf(x)) ⊇∂g(x). (10) Proof: Let x = Pg(y). Then by (9) and the subdifferential rule ∂(f + g) ⊇∂f + ∂g we verify that Pf(Pg(y)) satisfies (6), hence follows Pf+g = Pf ◦Pg since the proximal map is single-valued. We note that a special form of our sufficient condition has appeared in the proof of [8, Theorem 1], whose main result also follows immediately from our Theorem 4 below. Let us fix f, and define Kf = {g ∈Γ0 : f + g ̸≡∞, (f, g) satisfy (10)}. Immediately we have Proposition 2. For any f ∈Γ0, Kf is a cone. Moreover, if g1 ∈Kf, g2 ∈Kf, f + g1 + g2 ̸≡∞ and ∂(g1 + g2) = ∂g1 + ∂g2, then g1 + g2 ∈Kf too. The condition ∂(g1+g2) = ∂g1+∂g2 in Proposition 2 is purely technical; it is satisfied when, say g1 is continuous at a single, arbitrary point in dom g1 ∩dom g2. For comparison purpose, we note that it is not clear how Pf+g+h = Pf ◦Pg+h would follow from Pf+g = Pf ◦Pg and Pf+h = Pf ◦Ph. This is the main motivation to consider the sufficient condition (10). In particular Definition 1. We call f ∈Γ0 self-prox-decomposable (s.p.d.) if f ∈Kαf for all α > 0. For any s.p.d. f, since Kf is a cone, βf ∈Kαf for all α, β ≥0. Consequently, P(α+β)f = Pβf ◦Pαf = Pαf ◦Pβf. Remark 1. A weaker definition for s.p.d. is to require f ∈Kf, from which we conclude that βf ∈Kf for all β ≥0, in particular P(m+n)f = Pnf ◦Pmf = Pmf ◦Pnf for all natural numbers m and n. The two definitions coincide for positive homogeneous functions. We have not been able to construct a function that satisfies this weaker definition but not the stronger one in Definition 1. Example 3. We easily verify that all affine functions ℓ= ⟨·, a⟩+ b are s.p.d., in fact, they are the only differentiable functions that are s.p.d., which explains why Example 2 must fail. Another trivial class of s.p.d. functions are projectors to closed convex sets. Also, univariate gauges2 are s.p.d., due to Theorem 4 below. Some multivariate s.p.d. functions are given in Remark 5 below. 2A gauge is a positively homogeneous convex function that vanishes at the origin. 3 The next example shows that (10) is not necessary. Example 4. Fix z ∈H, f = ι{z}, and g ∈Γ0 with full domain. Clearly for any x ∈H, Pf+g(x) = z = Pf[Pg(x)]. However, since x is arbitrary, ∂g(Pf(x)) = ∂g(z) ̸⊇∂g(x) if g is not linear. On the other hand, if f, g are differentiable, then we actually have equality in (10), which is clearly necessary in this case. Since convex functions are almost everywhere differentiable (in the interior of their domain), we expect the sufficient condition (10) to be necessary “almost everywhere” too. Thus we see that the key for the decomposition (5) to hold is to let the proximal map of f and the subdifferential of g “interact well” in the sense of (10). Interestingly, both are fully equivalent to the function itself. Proposition 3 ([11, §8]). Let f, g ∈Γ0. f = g +c for some c ∈R ⇐⇒∂f ⊆∂g ⇐⇒Pf = Pg. Proof: The first implication is clear. The second follows from the optimality condition Pf = (Id + ∂f)−1. Lastly, Pf = Pg implies that Mf ∗= Mg∗−c for some c ∈R (by integration). Conjugating we get f = g + c for some c ∈R. Therefore some properties of the proximal map will transfer to some properties of the function f itself, and vice versa. The next result is easy to obtain, and appeared essentially in [14]. Proposition 4. Let f ∈Γ0 and x ∈H be arbitrary, then i). Pf is odd iff f is even; ii). Pf(Ux) = UPf(x) for all unitary U iff f(Ux) = f(x) for all unitary U; iii). Pf(Qx) = QPf(x) for all permutation Q (under some fixed basis) iff f is permutation invariant, that is f(Qx) = f(x) for all permutation Q. In the following, we will put some invariance assumptions on the subdifferential of g and accordingly find the right family of f whose proximal map “respects” that invariance. This way we will meet (10) by construction therefore effortlessly have the decomposition (5). 3.2 No Invariance To begin with, consider first the trivial case where no invariance on the subdifferential of g is assumed. This is equivalent as requiring (10) to hold for all g ∈Γ0. Not surprisingly, we end up with a trivial choice of f. Theorem 2. Fix f ∈Γ0. Pf+g = Pf ◦Pg for all g ∈Γ0 if and only if • dim(H) ≥2; f ≡c or f = ι{w} + c for some c ∈R and w ∈H; • dim(H) = 1 and f = ιC + c for some closed and convex set C and c ∈R. Proof: ⇐: Straightforward calculations, see [15] for details. ⇒: We first prove that f is constant on its domain even when g is restricted to indicators. Indeed, let x ∈dom f and take g = ι{x}. Then x = Pf+g(x) = Pf[Pg(x)] = Pf(x), meaning that x ∈argmin f. Since x ∈dom f is arbitrary, f is constant on its domain. The case dim(H) = 1 is complete. We consider the other case where dim(H) ≥2 and dom f contains at least two points. If dom f ̸= H, there exists z ̸∈dom f such that Pf(z) = y for some y ∈dom f, and closed convex set C ∩dom f ̸= ∅with y ̸∈C ∋z. Let g = ιC we obtain Pf+g(z) ∈C ∩dom f while Pf(Pg(z)) = Pf(z) = y ̸∈C, contradiction. Observe that the decomposition (5) is not symmetric in f and g, also reflected in the next result: Theorem 3. Fix g ∈Γ0. Pf+g = Pf ◦Pg for all f ∈Γ0 iff g is a continuous affine function. Proof: ⇒: If g = ⟨·, a⟩+ c, then Pg(x) = x −a. Easy calculation reveals that Pf+g(x) = Pf(x −a) = Pf[Pg(x)]. ⇐: The converse is true even when f is restricted to continuous linear functions. Indeed, let a ∈H be arbitrary and consider f = ⟨·, a⟩. Then Pf+g(x) = Pg(x −a) = Pf(Pg(x)) = Pg(x) −a. Letting a = x yields Pg(x) = x + Pg(0) = P⟨·,−Pg(0)⟩(x). Therefore by Proposition 3 we know g is equal to a continuous affine function. 4 Naturally, the next step is to put invariance assumptions on the subdifferential of g, effectively restricting the function class of g. As a trade off, the function class of f, that satisfies (10), becomes larger so that nontrivial results will arise. 3.3 Scaling Invariance The first invariance property we consider is scaling-invariance. What kind of convex functions have their subdifferential invariant to (positive) scaling? Assuming 0 ∈dom g and by simple integration g(tx) −g(0) = Z t 0 g′(sx)ds = Z t 0 ⟨∂g(sx), x⟩ds = t · [g(x) −g(0)], where the last equality follows from the scaling invariance of the subdifferential of g. Therefore, up to some additive constant, g is positive homogeneous (p.h.). On the other hand, if g ∈Γ0 is p.h. (automatically 0 ∈dom g), then from definition we verify that ∂g is scaling-invariant. Therefore, under the scaling-invariance assumption, the right function class for g is the set of all p.h. functions in Γ0, up to some additive constant. Consequently, the right function class for f is to have the proximal map Pf(x) = λ · x for some λ ∈[0, 1] that may depend on x as well3. The next theorem completely characterizes such functions. Theorem 4. Let f ∈Γ0. Consider the statements i). f = h(∥· ∥) for some increasing function h : R+ →¯R; ii). x ⊥y =⇒f(x + y) ≥f(y); iii). Pf(u) = λ · u for some λ ∈[0, 1] (that may itself depend on u); iv). 0 ∈dom f and Pf+κ = Pf ◦Pκ for all p.h. (up to some additive constant) function κ ∈Γ0. Then we have i) =⇒ii) ⇐⇒iii) ⇐⇒iv). Moreover, when dim(H) ≥2, ii) =⇒i) as well, in which case Pf(u) = Ph(∥u∥)/∥u∥· u (where we interpret 0/0 = 0). Remark 2. When dim(H) = 1, ii) is equivalent as requiring f to attain its minimum at 0, in which case the implication ii) =⇒iv), under the redundant condition that f is differentiable, was proved by Combettes and Pesquet [14, Proposition 3.6]. The implication ii) =⇒iii) also generalizes [14, Corollary 2.5], where only the case dim(H) = 1 and f differentiable is considered. Note that there exists non-even f that satisfies Theorem 4 when dim(H) = 1. Such is impossible for dim(H) ≥2, in which case any f that satisfies Theorem 4 must also enjoy all properties listed in Proposition 4. Proof: i) =⇒ii): x ⊥y =⇒∥x + y∥≥∥y∥. ii) =⇒iii): Indeed, by definition Mf(u) = min x 1 2∥x −u∥2 + f(x) = minu⊥,λ 1 2∥u⊥+ λu −u∥2 + f(u⊥+ λu) = min λ 1 2∥λu −u∥2 + f(λu) = minλ∈[0,1] 1 2(λ −1)2∥u∥2 + f(λu), where the third equality is due to ii), and the nonnegative constraint in the last equality can be seen as follows: For any λ < 0, by increasing it to 0 we can only decrease both terms; similar argument for λ > 1. Therefore there exists λ ∈[0, 1] such that λu minimizes the Moreau envelop Mf hence we have Pf(u) = λu due to uniqueness. iii) =⇒iv): Note first that iii) implies 0 ∈∂f(0), therefore 0 ∈dom f. Since the subdifferential of κ is scaling-invariant, iii) implies the sufficient condition (10) hence iv). iv) =⇒iii): Fix y and construct the gauge function κ(z) =  0, if z = λ · y for some λ ≥0 ∞, otherwise . Then Pκ(y) = y, hence Pf(Pκ(y)) = Pf(y) = Pf+κ(y) by iv). On the other hand, Mf+κ(y) = min x 1 2∥x −y∥2 2 + f(x) + κ(x) = minλ≥0 1 2∥λy −y∥2 2 + f(λy). (11) 3Note that λ ≤1 is necessary since any proximal map is nonexpansive. 5 Take y = 0 we obtain Pf+κ(0) = 0. Thus Pf(0) = 0, i.e. 0 ∈∂f(0), from which we deduce that Pf(y) = Pf+κ(y) = λy for some λ ∈[0, 1], since f(λy) in (11) is increasing on [1, ∞[. iii) =⇒ii): First note that iii) implies that Pf(0) = 0 hence 0 ∈∂f(0), in particular, 0 ∈dom f. If dim(H) = 1 we are done, so we assume dim(H) ≥2 in the rest of the proof. In this case, it is known, cf. [9, Theorem 1] or [10, Theorem 3], that ii) ⇐⇒i) (even without assuming f convex). All we left is to prove iii) =⇒ii) or equivalently i), for the case dim(H) ≥2. We first prove the case when dom f = H. By iii), Pf(x) = λx for some λ ∈[0, 1] (which may depend on x as well). Using the first order optimality condition for the proximal map we have 0 ∈λx −x + ∂f(λx), that is ( 1 λ −1)y ∈∂f(y) for each y ∈ran(Pf) = H due to our assumption dom f = H. Now for any x ⊥y, by the definition of the subdifferential, f(x + y) ≥f(y) + ⟨x, ∂f(y)⟩= f(y) + x, ( 1 λ −1)y = f(y). For the case when dom f ⊂H, we consider the proximal average [16] g = A(f, q) = [( 1 2(f ∗+ q)∗+ 1 4q)∗−q]∗, (12) where q = 1 2∥· ∥2. Importantly, since q is defined on the whole space, the proximal average g has full domain too [16, Corollary 4.7]. Moreover, Pg(x) = 1 2Pf(x) + 1 4x = ( 1 2λ + 1 4)x. Therefore by our previous argument, g satisfies ii) hence also i). It is easy to check that i) is preserved under taking the Fenchel conjugation (note that the convexity of f implies that of h). Since we have shown that g satisfies i), it follows from (12) that f satisfies i) hence also ii). As mentioned, when dim(H) ≥2, the implication ii) =⇒i) was shown in [9, Theorem 1]. The formula Pf(u) = Ph(∥u∥)/∥u∥· u for f = h(∥· ∥) follows from straightforward calculation. We now discuss some applications of Theorem 4. When dim(H) ≥2, iii) in Theorem 4 automatically implies that the scalar constant λ depends on x only through its norm. This fact, although not entirely obvious, does have a clear geometric picture: Corollary 1. Let dim(H) ≥2, C ⊆H be a closed convex set that contains the origin. Then the projection onto C is simply a shrinkage towards the origin iff C is a ball (of the norm ∥· ∥). Proof: Let f = ιC and apply Theorem 4. Example 5. As usual, denote q = 1 2∥· ∥2. In many applications, in addition to the regularizer κ (usually a gauge), one adds the ℓ2 2 regularizer λq either for stability or grouping effect or strong convexity. This incurs no computational cost in the sense of computing the proximal map: We easily compute that Pλq = 1 λ+1Id. By Theorem 4, for any gauge κ, Pκ+λq = 1 λ+1Pκ, whence it is also clear that adding an extra ℓ2 regularizer tends to double “shrink” the solution. In particular, let H = Rd and take κ = ∥· ∥1 (the sum of absolute values) we recover the proximal map for the elastic-net regularizer [17]. Example 6. The Berhu regularizer h(x) = |x|1|x|<γ + x2+γ2 2γ 1|x|≥γ = |x| + (|x|−γ)2 2γ 1|x|≥γ, being the reverse of Huber’s function, is proposed in [18] as a bridge between the lasso (ℓ1 regularization) and ridge regression (ℓ2 2 regularization). Let f(x) = h(x) −|x|. Clearly, f satisfies ii) of Theorem 4 (but not differentiable), hence Ph = Pf ◦P|·|, whereas simple calculation verifies that Pf(x) = sign(x) · min{|x|, γ 1+γ (|x| + 1)}, and of course P|·|(x) = sign(x) · max{|x| −1, 0}. Note that this regularizer is not s.p.d. Corollary 2. Let dim(H) ≥2, then the p.h. function f ∈Γ0 satisfies any item of Theorem 4 iff it is a positive multiple of the norm ∥· ∥. Proof: [10, Theorem 4] showed that under positive homogeneity, i) implies that f is a positive multiple of the norm. Therefore (positive multiples of) the Hilbertian norm is the only p.h. convex function f that satisfies Pf+κ = Pf ◦Pκ for all gauge κ. In particular, this means that the norm ∥· ∥is s.p.d. Moreover, we easily recover the following result that is perhaps not so obvious at first glance: 6 Corollary 3 (Jenatton et al. [7]). Fix the orthonormal basis {ei}i∈I of H. Let G ⊆2I be a collection of tree-structured groups, that is, either g ⊆g′ or g′ ⊆g or g ∩g′ = ∅for all g, g′ ∈G. Then PPm i=1 ∥·∥gi = P∥·∥g1 ◦· · · ◦P∥·∥gm , where we arrange the groups so that gi ⊂gj =⇒ i > j, and the notation ∥· ∥gi denotes the Hilbertian norm that is restricted to the coordinates indexed by the group gi. Proof: Let f = ∥· ∥g1 and κ = Pm i=2 ∥· ∥gi. Clearly they are both p.h. (and convex). By the tree-structured assumption we can partition κ = κ1 + κ2, where gi ⊂g1 for all gi appearing in κ1 while gj ∩g1 = ∅for all gj appearing in κ2. Restricting to the subspace spanned by the variables in g1 we can treat f as the Hilbertian norm. Apply Theorem 4 we obtain Pf+κ1 = Pf ◦Pκ1. On the other hand, due to the non-overlapping property, nothing will be affected by adding κ2, thus PPm i=1 ∥·∥gi = P∥·∥g1 ◦PPm i=2 ∥·∥gi . We can clearly iterate the argument to unravel the proximal map as claimed. For notational clarity, we have chosen not to incorporate weights in the sum of group seminorms: Such can be absorbed into the seminorm and the corollary clearly remains intact. Our proof also reveals the fundamental reason why Corollary 3 is true: The ℓ2 norm admits the decomposition (5) for any gauge g! This fact, to the best of our knowledge, has not been recognized previously. 3.4 Cone Invariance In the previous subsection, we restricted the subdifferential of g to be constant along each ray. We now generalize this to cones. Specifically, consider the gauge function κ(x) = max j∈J ⟨aj, x⟩, (13) where J is a finite index set and each aj ∈H. Such polyhedral gauge functions have become extremely important due to the work of Chandrasekaran et al. [19]. Define the polyhedral cones Kj = {x ∈H : ⟨aj, x⟩= κ(x)}. (14) Assume Kj ̸= ∅for each j (otherwise delete j from J). Since ∂κ(x) = {aj|j ∈J, x ∈Kj}, the sufficient condition (10) becomes ∀j ∈J, Pf(Kj) ⊆Kj. (15) In other words, each cone Kj is “fixed” under the proximal map of f. Although it would be very interesting to completely characterize f under (15), we show that in its current form, (15) already implies many known results, with some new generalizations falling out naturally. Corollary 4. Denote E a collection of pairs (m, n), and define the total variational norm ∥x∥tv = P {m,n}∈E wm,n|xm −xn|, where wm,n ≥0. Then for any permutation invariant function4 f, Pf+∥·∥tv = Pf ◦P∥·∥tv. Proof: Pick an arbitrary pair (m, n) ∈ E and let κ = |xm −xn|. Clearly J = {1, 2}, K1 = {xm ≥xn} and K2 = {xm ≤xn}. Since f is permutation invariant, its proximal map Pf(x) maintains the order of x, hence we establish (15). Finally apply Proposition 2 and Theorem 1. Remark 3. The special case where E = {(1, 2), (2, 3), . . .} is a chain, wm,n ≡1 and f is the ℓ1 norm, appeared first in [6] and is generally known as the fused lasso. The case where f is the ℓp norm appeared in [20]. We call the permutation invariant function f symmetric if ∀x, f(|x|) = f(x), where | · | denotes the componentwise absolute value. The proof for the next corollary is almost the same as that of Corollary 4, except that we also use the fact sign([Pf(x)]m) = sign(xm) for symmetric functions. Corollary 5. As in Corollary 4, define the norm ∥x∥oct = P {m,n}∈E wm,n max{|xm|, |xn|}. Then for any symmetric function f, Pf+∥·∥oct = Pf ◦P∥·∥oct. 4All we need is the weaker condition: For all {m, n} ∈E, xm ≥xn =⇒[Pf(x)]m ≥[Pf(x)]n. 7 Remark 4. This norm ∥· ∥oct is proposed in [21] for feature grouping. Surprisingly, Corollary 5 appears to be new. The proximal map P∥·∥oct is derived in [22], which turns out to be another decomposition result. Indeed, for i ≥2, define κi(x) = P j≤i−1 max{|xi|, |xj|}. Thus ∥· ∥oct = X i≥2 κi. Importantly, we observe that κi is symmetric on the first i −1 coordinates. We claim that P∥·∥oct = Pκ|I| ◦. . . ◦Pκ2. The proof is by recursion: Write ∥· ∥oct = f + g, where f = κ|I|. Note that the subdifferential of g depends only on the ordering and sign of the first |I| −1 coordinates while the proximal map of f preserves the ordering and sign of the first |I| −1 coordinates (due to symmetry). If we pre-sort x, the individual proximal maps Pκi(x) become easy to compute sequentially and we recover the algorithm in [22] with some bookkeeping. Corollary 6. As in Corollary 3, let G ⊆2I be a collection of tree-structured groups, then PPm i=1 ∥·∥gi,k = P∥·∥g1,k ◦· · · ◦P∥·∥gm,k, where we arrange the groups so that gi ⊂gj =⇒i > j, and ∥x∥gi,k = Pk j=1 |xgi|[j] is the sum of the k (absolute-value) largest elements in the group gi, i.e., Ky-Fan’s k-norm. Proof: Similar as in the proof of Corollary 3, we need only prove that P∥·∥g1,k+∥·∥g2,k = P∥·∥g1,k ◦P∥·∥g2,k, where w.l.o.g. we assume g1 contains all variables while g2 ⊂g1. Therefore ∥· ∥g1,k can be treated as symmetric and the rest follows the proof of Corollary 5. Note that the case k ∈{1, |I|} was proved in [7] and Corollary 6 can be seen as an interpolation. Interestingly, there is another interpolated result whose proof should be apparent now. Corollary 7. Corollary 6 remains true if we replace Ky-Fan’s k-norm with ∥x∥oct,k = X 1≤i1<i2<...<ik≤|I| max{|xi1|, . . . , |xik|}. (16) Therefore we can employ the norm ∥x∥oct,2 for feature grouping in a hierarchical manner. Clearly we can also combine Corollary 6 and Corollary 7. Corollary 8. For any symmetric f, Pf+∥·∥oct,k = Pf ◦P∥·∥oct,k. Similarly for Ky-Fan’s k-norm. Remark 5. The above corollary implies that Ky-Fan’s k-norm and the norm ∥· ∥oct,k defined in (16) are both s.p.d. (see Definition 1). The special case for the ℓp norm where p ∈{1, 2, ∞} was proved in [23, Proposition 11], with a substantially more complicated argument. As pointed out in [23], s.p.d. regularizers allow us to perform lazy updates in gradient-type algorithms. We remark that we have not exhausted the possibility to have the decomposition (5). It is our hope to stimulate further work in understanding the prox-decomposition (5). Added after acceptance: We have managed to extend the results in this subsection to the Lovász extension of submodular set functions. Details will be given elsewhere. 4 Conclusion The main goal of this paper is to understand when the proximal map of the sum of functions decomposes into the composition of the proximal maps of the individual functions. Using a simple sufficient condition we are able to completely characterize the decomposition when certain scaling invariance is exhibited. The generalization to cone invariance is also considered and we recover many known decomposition results, with some new ones obtained almost effortlessly. In the future we plan to generalize some of the results here to nonconvex functions. Acknowledgement The author thanks Bob Williamson and Xinhua Zhang from NICTA—Canberra for their hospitality during the author’s visit when part of this work was performed; Warren Hare, Yves Lucet, and Heinz Bauschke from UBC—Okanagan for some discussions around Theorem 4; and the reviewers for their valuable comments. 8 References [1] Bernhard Scholköpf and Alexander J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press, 2001. [2] Peter Bühlmann and Sara van de Geer. Statistics for High-Dimensional Data. Springer, 2011. [3] Patrick L. Combettes and Valérie R. Wajs. Signal recovery by proximal forward-backward splitting. Multiscale Modeling and Simulation, 4(4):1168–1200, 2005. [4] Amir Beck and Marc Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [5] Yurii Nesterov. Gradient methods for minimizing composite functions. Mathematical Programming, Series B, 140:125–161, 2013. [6] Jerome Friedman, Trevor Hastie, Holger Höfling, and Robert Tibshirani. Pathwise coordinate optimization. The Annals of Applied Statistics, 1(2):302–332, 2007. [7] Rodolphe Jenatton, Julien Mairal, Guillaume Obozinski, and Francis Bach. Proximal methods for hierarchical sparse coding. Journal of Machine Learning Research, 12:2297–2334, 2011. [8] Jiayu Zhou, Jun Liu, Vaibhav A. Narayan, and Jieping Ye. Modeling disease progression via fused sparse group lasso. In Conference on Knowledge Discovery and Data Mining, 2012. [9] Francesco Dinuzzo and Bernhard Schölkopf. The representer theorem for Hilbert spaces: a necessary and sufficient condition. In NIPS, 2012. [10] Yao-Liang Yu, Hao Cheng, Dale Schuurmans, and Csaba Szepesvári. Characterizing the representer theorem. In ICML, 2013. [11] Jean J. Moreau. Proximité et dualtité dans un espace Hilbertien. Bulletin de la Société Mathématique de France, 93:273–299, 1965. [12] Patrick L. Combettes, Ðinh D˜ung, and B`˘ang Công V˜u. Proximity for sums of composite functions. Journal of Mathematical Analysis and Applications, 380(2):680–688, 2011. [13] André F. T. Martins, Noah A. Smith, Eric P. Xing, Pedro M. Q. Aguiar, and Mário A. T. Figueiredo. Online learning of structured predictors with multiple kernels. In Conference on Artificial Intelligence and Statistics, 2011. [14] Patrick L. Combettes and Jean-Christophe Pesquet. Proximal thresholding algorithm for minimization over orthonormal bases. SIAM Journal on Optimization, 18(4):1351–1376, 2007. [15] Yaoliang Yu. Fast Gradient Algorithms for Stuctured Sparsity. PhD thesis, University of Alberta, 2013. [16] Heinz H. Bauschke, Rafal Goebel, Yves Lucet, and Xianfu Wang. The proximal average: Basic theory. SIAM Journal on Optimization, 19(2):766–785, 2008. [17] Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society B, 67:301–320, 2005. [18] Art B. Owen. A robust hybrid of lasso and ridge regression. In Prediction and Discovery, pages 59–72. AMS, 2007. [19] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805–849, 2012. [20] Xinhua Zhang, Yaoliang Yu, and Dale Schuurmans. Polar operators for structured sparse estimation. In NIPS, 2013. [21] Howard Bondell and Brian Reich. Simultaneous regression shrinkage, variable selection, and supervised clustering of predictors with oscar. Biometrics, 64(1):115–123, 2008. [22] Leon Wenliang Zhong and James T. Kwok. Efficient sparse modeling with automatic feature grouping. In ICML, 2011. [23] John Duchi and Yoram Singer. Efficient online and batch learning using forward backward splitting. Journal of Machine Learning Research, 10:2899–2934, 2009. 9
2013
215
4,949
Documents as multiple overlapping windows into a grid of counts Alessandro Perina1 Nebojsa Jojic1 Manuele Bicego2 Andrzej Turski1 1Microsoft Corporation, Redmond, WA 2University of Verona, Italy Abstract In text analysis documents are often represented as disorganized bags of words; models of such count features are typically based on mixing a small number of topics [1,2]. Recently, it has been observed that for many text corpora documents evolve into one another in a smooth way, with some features dropping and new ones being introduced. The counting grid [3] models this spatial metaphor literally: it is a grid of word distributions learned in such a way that a document’s own distribution of features can be modeled as the sum of the histograms found in a window into the grid. The major drawback of this method is that it is essentially a mixture and all the content must be generated by a single contiguous area on the grid. This may be problematic especially for lower dimensional grids. In this paper, we overcome this issue by introducing the Componential Counting Grid which brings the componential nature of topic models to the basic counting grid. We evaluated our approach on document classification and multimodal retrieval obtaining state of the art results on standard benchmarks. 1 Introduction A collection of documents, each consisting of a disorganized bag of words is often modeled compactly using mixture or admixture models, such as Latent Semantic Analysis (LSA) [4] and Latent Dirichlet Allocation (LDA) [1]. The data is represented by a small number of semantically tight topics, and a document is assumed to have a mix of words from an even smaller subset of these topics. There are no strong constraints in how the topics are mixed [5]. Recently, an orthogonal approach emerged: it has been observed that for many text corpora documents evolve into one another in a smooth way, with some words dropping and new ones being introduced. The counting grid model (CG) [3] takes this spatial metaphor – of moving through sources of words and dropping and picking new words – literally: it is multidimensional grid of word distributions, learned in such a way that a document’s own distribution of words can be modeled as the sum of the distributions found in some window into the grid. By using large windows to collate many grid distributions from a large grid, CG model can be a very large mixture without overtraining, as these distributions are highly correlated. LDA model does not have this benefit, and thus has to deal with a smaller number of topics to avoid overtraining. In Fig.1a we show an excerpt of a grid learned from cooking recipes from around the world. Each position in the grid is characterized by a distribution over the words in a vocabulary and for each position we show the 3 words with higher probability whenever they exceed a threshold. The shaded positions, are characterized by the presence, with a non-zero probability, of the word “bake”1. On the grid we also show the windows W of size 4 ⇥5 for 5 recipes. Nomi (1), an Afghan egg-based bread, is close to the recipe of the usual pugliese bread (2), as indeed they share most of the ingredients and procedure and their windows largely overlap. Note how moving from (1) to (2) the word 1Which may or may not be in the top three 1 grain rice cook type cooker resultant good want doesnt method usual however because beings dont tarka white brandy pour chocolate peak mascarpone gradual chocolate fol slowly clear dish run start change sit way indian try indian know going generation they kept only excellence quite electric meringue rum yolk beat granulated cutlet pour gently pick lift back full persian may reheat vary useful given section look needed completion store tasty normal container airtight electric extract mixer vanilla speeds wire beat cake egg springform spoonful carefully pour bottom wooden procedure spatula quickly round nonstick spread dosa least pancake texture biscotti griddle always crepe airtight long almond peach rack cinnamon sugar butter rind confectioners alternative panful larger side invert upside omelet slide slip cylinder spatula second log apartment griddle cookie biscuit pretzel sift grease paper parchment golden fold pressing moisten egg bread crumb panful crumb bread toothpick crumb crusty egg beaten lightly altogether one naan turn handful incorporate handful roti diameter round inch together sheet pastry egg pressing sheet border side salt mixture pour side brown dish mixture sheet additional beat sticky shape brush divide roll rectangle cut seal edge edge sheet place removable chives preheat minute ovenproof preheat middle sheet rack bowl turn mixer bulk dough knead board divide shape surface towel center form fold seal removable place degree oven oven preheat bake preheat baguette work bowl rise smoothe knead elastic circle dough cloth damp round center together form left square triangl raviol set aside center center arrange preheat oil dish grease spray cornmeal pizza loaf surface loaves double sprinkle ball yeast rise warm ball palm useful equal bun start bit work wrapper lin zest pudding half mix completion cool pour pattern cool insert tray sharp resemblance form surface loose long moist machine bread feel starter size desirable amount thoroughly kitchen ready amount feeding neat bake oven Noni Afghan Bread Brown Bread Ceasar Salad Pizza di Napoli Grecian Chicken Gyros Pizza 'dough' 'roll' 'ball' 'shape' 'yeast' 'knead' 'rise' 'bread' 'egg' 'dough' 'roll' 'yeast' 'knead' 'shape' 'desirable' 'water' 'divide' 'keep' 'water' 'aside' 'add' 'smoothe' 'minute' 'lukewarm' 'remain' 'fry' 'sauce' 'deep' 'oil' 'hot' 'golden' 'mix' 'lettuce' 'salad' 'slice' 'garnish' 'dressings' 'beans' 'mix' 'cheese' 'place' 'melt' 'basil' 'cover' 'bag' 'broil' 'chicken' 'marinade' 'shallow' 'hot' 'coat' 'refrigeration' 'heat' 'crust' 'evenly' 'spread' 'edge' 'pressing' 'center' 'place' 'feta' 'mixture' 'useful' a) b) Si Wj (1) (2) (3) (4) (5) [...] [...] [...] Figure 1: a) A particular of a E = 30 ⇥30 componential counting grid ⇡i learned over a corpus of recipes. In each cell we show the 0-3 most probable words greater than a threshold. The area in shaded red has ⇡(0bake0) > 0. b) For 6 recipes, we show how their components are mapped onto this grid. The “mass” of each component (e.g., ✓see Sec.2) is represented with the window thickness. For each component c = j in position j, we show the words generated in each window cz · P j2Wi ⇡j(z) “egg” is dropped. Moving to the right we encounter the basic pizza (3) whose dough is very similar to the bread’s. Continuing to the right words often associated to desserts like sugar, almond, etc emerge. It is not surprising that baked desserts such as cookies (4), and pastry in general, are mapped here. Finally further up we encounter other desserts which do not require baking, like tiramisu (5), or chocolate crepes. This is an example of a“topical shift”; others appear in different portions of the full grid which is included in the additional material. The major drawback of counting grids is that they are essentially a mixture model, assuming only one source for all features in the bag and the topology of the space highly constrains the document mappings resulting in local minima or suboptimal grids. For example, more structured recipes like Grecian Chicken Gyros Pizza or Tex-Mex pizza would have very low likelihood, as words related to meat, which is abundant in both, are hard to generate in the baking area where the recipes would naturally goes. As first contribution we extend here the counting grid model so that each document can be represented by multiple latent windows, rather than just one. In this way, we create a substantially more flexible admixture model, the componential counting grid (CCG), which becomes a direct generalization of LDA as it does allow multiple sources (e.g., the windows) for each bag, in a mathematically identical way as LDA. But, the equivalent of LDA topics are windows in a counting grid, which allows the model to have a very large number of topics that are highly related, as shift in the grid only slightly refines any topic. Starting from the same grid just described, we recomputed the mapping of each recipe which now can be described by multiple windows, if needed. Fig. 1b shows mappings for some recipes. Also the words generated in each component are shown. The three pizzas place most of the mass in the same area (dough), but the words related to the topping are borrowed from different areas. Another example is the Caesar salad which have a component in the salad/vegetable area, and borrows the 2 croutons from the bread area. By observing Fig.1b, one can also notice how the embedding produced by CCGs yields to a similarity measure based on the grid usage of each sample. For example, words relative to the three pizzas are generated from windows that overlap, therefore they share words usage and thus they are “similar”. As second contribution we exploited this fact to define a novel generative kernel, whose performance largely outperformed similar classification strategies based on LDA’s topic usage [1,2]. We evaluated componential counting grids and in particular the kernel, on the 20-Newsgroup dataset [6], on a novel dataset of recipes which we will make available to the community, and on the recent “Wikipedia picture of the day” dataset [7]. In all the experiments, CCGs set a new state of the art. Finally, for the first time we explore visualization through examples and videos available in the additional material. 2 Counting Grids and Componential Counting Grids U w /T w c) T ln kn wn S D N T D Z = |Vocabulary| wn = ‘Pizza’ Skn ln=(5,3) kn=ln +(0,3) Pick a window W from T Pick a location within the window W Pick a word from the distribution Sk b) a) Figure 2: a) Plate notation representing the CCG model. b) CCG generative process for one word: Pick a window from ✓, Pick a position within the window, Pick a word. c) Illustration of U W and ⇤W ✓relative to the particular ✓shown in plate b). The basic Counting Grid ⇡i is a set of distributions over the vocabulary on the N-dimensional discrete grid indexed by i where each id 2 [1 . . . Ed] and E describes the extent of the counting grid in d dimensions. The index z indexes a particular word in the vocabulary z = [1 . . . Z] being Z the size of the vocabulary. For example, ⇡i(0Pizza0) is the probability of the word “Pizza” at the location i. Since ⇡is a grid of distributions, P z ⇡i(z) = 1 everywhere on the grid. Each bag of words is represented by a list of words {wt}T t=1 and each word wt n takes a value between 1 and Z. In the rest of the paper, we will assume that all the samples have N words. Counting Grids assume that each bags follow a word distribution found somewhere in the counting grid; in particular, using windows of dimensions W, a bag can be generated by first averaging all counts in the window Wi starting at grid location i and extending in each direction d by Wd grid positions to form the histogram hi(z) = 1 Q d Wd P j2Wi ⇡j(z), and then generating a set of features in the bag (see Fig.1a where we used a 3 ⇥4 window). In other words, the position of the window i in the grid is a latent variable given which we can write the probability of the bag as p({w}|i) = Y n hi,z = Y n # 1 Q d Wd · X j2Wi ⇡j(wn) & , Relaxing the terminology, E and W are referred to as, respectively, the counting grid and the window size. The ratio of the two volumes, , is called the capacity of the model in terms of an equivalent number of topics, as this is how many non-overlapping windows can be fit onto the grid. Finally, with Wi we indicate the particular window placed at location i. Componential Counting Grids As seen in the previous section, counting grids generate words from a distribution in a window W, placed at location i in the grid. Windows close in the grid generate similar features because they share many cells: As we move the window on the grid, some new features appear while others are dropped. On the other hand componential models, like [1], represent the standard way of modeling of text corpora. In these models each feature can be generated by a different source or topic, and documents are then seen as admixtures of topics. Componential counting grids get the best of both worlds: being based on the counting grid geometry they capture smooth shifts of topics, plus their componential nature, which allows documents to be generated by several windows (akin to LDA’s topics). The number of windows need not be specified a-priori. Componential Counting Grids assumes the following generative process (also illustrated by Fig.2b.) for each document in a corpus: 3 1. Sample the multinomial over the locations ✓⇠Dir(↵) 2. For each of the N words wn a) Choose a at location ln ⇠Multinomial(✓) for a window of size W b) Choose a location within the window Wln; kn c) Choose a word wn from ⇡kn As visible, each word wn is generated from a different window, placed at location ln, but the choice of the window follows the same prior distributions ✓for all words. It worth noticing that when W = 1 ⇥1, ln = kn and the model becomes Latent Dirichlet Allocation. The Bayesian network is shown in Fig.2a) and it defines the following joint probability distribution P = Y t,n X ln X kn p(wn|kn, ⇡) · p(kn|ln) · p(ln|✓) · p(✓|↵) (1) where p(wn = z|kn = i, ⇡) = ⇡i(z) is a multinomial over the vocabulary, p(kn = i|ln = k) = U W (i −k) is a distribution over the grid locations, with U W uniform and equal to ( 1 |W |) in the upper left window of size W and 0 elsewhere (See Fig.2c). Finally p(ln|✓) = ✓(l) is the prior distribution over the windows location, and p(✓|↵) = Dir(✓; ↵) is a Dirichlet distribution of parameters ↵. Since the posterior distribution p(k, l, ✓|w, ⇡, ↵) is intractable for exact inference, we learned the model using variational inference [8]. We firstly introduced the posterior distributions q, approximating the true posterior as qt(k, l, ✓) = qt(✓)·Q n # qt(kn)·qt(ln) & being q(kn) and q(ln) multinomials over the locations, and q(✓) a Dirac function centered at the optimal value ˆ✓. Then by bounding (variationally) the non-constant part of log P, we can write the negative free energy F, and use the iterative variational EM algorithm to optimize it. log P ≥−F = X t ⇣X n # X ln,kn qt(kn)·qt(ln)·log ⇡kn(wn)·U W (kn −ln)·✓ln ·p(✓|↵) & −H(qt) ⌘ (2) where H(q) is the entropy of the distribution q. Minimization of Eq. 2 reduces in the following update rules: qt(kn = i) / ⇡i(wn) · exp ⇣X ln=j qt(ln = j) · log U W (i −j) ⌘ (3) qt(ln = i) / ✓t(i) · exp ⇣X kn=j qt(kn = j) · log U W (j −i) ⌘ (4) ✓t(i) / ↵i −1 + X n qt(ln = i) (5) ⇡i(z) / X t X n qt(kn = i)[wn=z] (6) where [wn = z] is an indicator function, equal to 1 when wn is equal to z. Finally, the parameters ↵ of the Dirichlet prior can be either kept fixed [9] or learned using standard techniques [10]. The minimization procedure described by Eqs.3-6 can be carried out efficiently in O(N log N) time using FFTs [11]. Some simple mathematical manipulations of Eq.1 can yield to a speed up. In fact, from Eq.1 one can marginalize the variable ln P = Y t,n X ln=i,kn=j p(wn|kn = j) · p(kn = j|ln = i) · p(ln = i|✓) · p(✓|↵) = Y t,n X ln=i,kn=j ⇡j(wn) · U W (j −i) · ✓(i) · p(✓(i)|↵i) = Y t,n X kn=j ⇡j(wn) · ⇣X ln=i U W (j −i) · ✓(i) ⌘ · p(✓(i)|↵i) = Y t,n X kn=j ⇡j(wn) · ⇤W ✓t · p(✓(i)|↵i) (7) 4 where ⇤W ✓ is a distribution over the grid locations, equal to the convolution of U W with ✓. The update for q(k) becomes qt(kn = i) / ⇡i(wn) · ⇤W ✓(i) (8) In the same way, we can marginalize the variable kn P = Y t,n X ln=i ✓(i) · ⇣X kn=j U W (j −i) · ⇡j(wn) ⌘ · p(✓(i)|↵i) = Y t,n X ln=i ✓(i) · hi(wn) · p(✓(i)|↵i) (9) to obtain the new update for qt(ln) qt(ln = i) / hi(wn) · ✓t(i) (10) where hi is the feature distribution in a window centered at location i, which can be efficiently computed in linear time using cumulative sums [3]. Eq.10 highlights further relationships between CCGs and LDA: CCGs can be thought as an LDA model whose topics live on the space defined by the counting grids geometry. The new updates for the cell distribution q(k) and the window distribution q(l), require only a single convolution and, more importantly, they don’t directly depend on each other. The model becomes more efficient and has a faster convergence. This is very critical especially when we are analyzing big text corpora. The most similar generative model to CCG comes from the statistic community. Dunson et al. [12] worked on sources positioned in a plane at real-valued locations, with the idea that sources within a radius would be combined to produce topics in an LDA-like model. They used an expensive sampling algorithm that aimed at moving the sources in the plane and determining the circular window size. The grid placement of sources of CCG yields much more efficient algorithms and denser packing. 2.1 A Kernel based on CCG embedding Hybrid generative discriminative classification paradigms have been shown to be a practical and effective way to get the best of both worlds in approaching classification [13–15]. In the context of topic models a simple but effective kernel is defined as the product of the topic proportions of each document. This kernel measures the similarity between topic usage of each sample and it proved to be effective on several tasks [15–17]. Despite CCG’s ✓s, the locations proportions, can be thought as LDA’s, we propose another kernel, which exploits exactly the same geometric reasoning of the underlying generative model. We observe in fact that by construction, each point in the grid depends by its neighborhood, defined by W and this information is not captured using ✓, but using ⇤W ✓ which is defined by spreading ✓in the appropriate window (Eq.7). More formally, given two samples t and u, we define a kernel based on CCG embedding as K(t, u) = X i S(⇤W ✓t (i), ⇤W ✓u(i)) where ⇤W ✓(i) = X j U W (i −j) · ✓(j) (11) where S(·, ·) is any similarity measure which defines a kernel. In our experiments we considered the simple product, even if other measures, such as histogram intersection can be used. The final kernel turns to be (⇥is the dot-product) KLN(t, u) = X i ⇤W ✓t (i) · ⇤W ✓u(i) = Tr # ⇤W ✓t ⇥⇤W ✓u & (12) 3 Experiments Although our model is fairly simple, it is still has multiple aspects that can be evaluated. As a generative model, it can be evaluated in left-out likelihood tests. Its latent structure, as in other generative models, can be evaluated as input to classification algorithms. Finally, as both its parameters and the latent variables live in a compact space of dimensionality and size chosen by the user, our learning algorithm can be evaluated as an embedding method that yields itself to data visualization applications. As the latter two have been by far the more important sets of metrics when it comes to real-world applications, our experiments focus on them. In all the tests we considered squared grids of size E = [40 ⇥40, 50 ⇥50, . . . , 90 ⇥90] and windows of size W = [2 ⇥2, 4 ⇥4, . . . , 8 ⇥8]. A variety of other methods are occasionally compared to, with slightly different evaluation methods described in individual subsections, when appropriate. 5 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Percentage Error rate Capacity N/ No. Topics Classification Accuracy Classification Accuracy Correspondence LDA LDA + Discr. Classifier Multimodal Random Field model Componential Counting Grid a) “Same”-20 NewsGroup Results b) Mastercook Recipes Results c) Wikipedia Picture of the Day Results 10 1 10 2 65 70 75 80 85 90 10 1 10 2 20 30 40 50 60 70 80 Counting Grid (q(l) ) LDA (T) Componential Counting Grid (/) Componential Counting Grid (T) Capacity N/ No. Topics Figure 3: a-b) Results for the text classification tasks. The Mastercook recipes dataset is available on www.alessandroperina.com. We represented the grid size E using gray levels (see the text). c) Wikipedia Picture of the day result: average Error rate as a function of the percentage of the ranked list considered for retrieval. Curves closer to the axes represents better performances. Document Classification We compared componential counting grids (CCGs) with counting grids [3] (CGs), latent Dirichlet allocation [1] (LDA) and the spherical admixture model [2] (SAM), following the validation paradigm previously used in [2,3]. Each data sample consists of a bag of words and a label. The bags were used without labels to train a model that capture covariation in word occurrences, with CGs mostly modeling thematic shifts, LDA and SAM modeling topic mixing and CCGs both aspects. Then, the label prediction task is performed in a 10-folds crossevaluation setting, using the linear kernel presented in Eq.12 which for LDA reduces in using a linear kernel on the topic proportions. To show the effectiveness of the spreading in the kernel definition, we also report results by employing CCG’s ✓s instead of ⇤W ✓. For CGs we used the original strategy [3], Nearest Neighbor in the embedding space, while for SAM we reported the results from the original paper. To the best of our knowledge the strategies just described, based on [3] and [2], are two of the most effective methods to classify text documents. SAM is characterized by the same hierarchical nature of LDA, but it represents bags using directional distributions on a spherical manifold modeling features frequency, presence and absence. The model captures fine-grained semantic structure and performs better when small semantic distinctions are important. CCGs map documents on a probabilistic simplex (e.g., ✓) and for W > [1 ⇥1] can be thought as an LDA model whose topics, hi, are much finer as computed from overlapping windows (see also Eq.10); a comparison is therefore natural. As first dataset we considered the CMU newsgroup dataset2. Following previous work [2, 3, 6] we reduced the dataset into subsets with varying similarities among the news groups; news20-different, with posts from rec.sport.baseball, sci.space and alt.atheism, news-20-similar, with posts from rec.talk.baseball, talk.politics.gun and talk.politics.misc and news-20-same, with posts from comp.os.ms-windows, comp.windows.x and comp.graphics. For the news-20-same subset (the hardest), in Fig.3a we show the accuracies of CCGs and LDA across the complexities. On the x-axis we have the different model size, in term of capacity , whereas in the y-axis we reported the accuracy. The same can be obtained with different choices of E and W therefore we represented the grid size E using gray levels, the lighter the marker the bigger the grid. The capacity is roughly equivalent to the number of LDA topics as it represents the number of independent windows that can be fit in the grid and we compared the with LDA using this parallelism [18]. Componential counting grids outperform Latent Dirichlet Allocation across all the spectrum and the accuracy regularly raises with independently from the Grid size3. The priors helped to prevent overtraining for big capacities . When using CCG’s ✓s to define the kernel, as expected the accu2http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo-20/www/data/news20.html 3This happens for “reasonable” window sizes. For small windows (e.g, 2 ⇥2), the model doesn’t have enough overlapping power and performs similarly a mixture model. 6 Table 1: Document classification. The improvement on Similar and Same are statistically significant. The accuracies for SAM are taken from [2] and they represent the best results obtained across the choice of number of topics. BOW stands for classification with a linear SVM on the counts matrices. Dataset CCG 2D CG 3D CG LDA BOW SAM⇤ [3] [3] [1] [2] Different 96,49% 96,51% 96,34% 91,8% 91,43% 94,1% Similar 92,81% 89,72% 90,11% 85,7% 81,52% 88,1% Same 83,63% 81,28% 81,03% 75,6% 71,81% 78,1% e tofu wok stirfry cornstarch wok mix cornstarch light coat apply done tawa sizzler stirfry chow shoot tbs scallion ginger sherry soya chestnut piece white cut noodle vein set aside garlic sauce aside bite peppercorn devein pink chicken stock remain carrot celery removable add fryer tongue reduce bringing boil boil simmer bringing cover return pot slotted lower marination piece panfry shallow afghan provide grill refrigeration brush muslin two curd least cloth paneer put pour leave breast wings skin marinad sauerkraut save coal baste skewer cheesecloth tie charcoal outside wood thread leave length bone piece drip skim hour overnight marinade cavity carcasses turn secure preferable smoker cube cube away terrine pack length roughly freshly chop duck cut turnip fat render excessive pork rib hare meat hour kabob turn push crock inch long order tightly crockpot inch shredding jack refry removable pot kidney large removable fat sausage goose cassoulet case stuff together spice mix wide mix ground lamb six burrito brown cook slightly salt cook pumpkin mixture spice tava grinder ketchup rest ground electric mix owner saint chicken chicken chicken wing keo snow lettuce beds thin thin beef couple pork rib sauce sweet optional msg pound asian beef peanut wok condiment cuisine root paste ginger thai prik aromatic grass lemongrass table tom curry chili coconut galangal shrimp devein chili soupe shallot soupe tureen mortar pestle sambal broth ladleful soupe nectar intend gentle bringing broccoli roux boil a) b) c) Zoom Si Figure 4: A simple interface built upon the word embedding ⇡. racy dropped (blue dots in Fig.3). Results for all the datasets and for a variety of methods, are reported in Tab.1 where we employed 10% of the training data as validation set to pick a complexity (a different complexity have been chosen for each fold). As visible, CCG outperforms other models, with a larger margin on the more challenging same and similar datasets, where we would indeed expect that quilting the topics to capture fine-grained similarities and differences would be most helpful. As second dataset, we downloaded 10K Mastercook recipes, which are freely available on the web in plain text format. Then we extracted the words of each recipe from its ingredients and cooking instructions and we used the origin of the recipe, to divide the dataset in 15 classes4. The resulting dataset has a vocabulary size of 12538 unique words and a total of ⇠1M tokens. To classify the recipes we used 10-fold crossevaluation with 5 repetitions, picking 80 random recipes per-class for each repetition. Classification results are illustrated in Fig. 3b. As for the previous test, CCG classification accuracies grows regularly with independently from the grid size E. Componential models (e.g., LDA and CCGs) performed significantly better as to correctly classify the origin of a recipe, spice palettes, cooking style and procedures must be identified. For example while most Asian cuisines uses similar ingredients and cooking procedures they definitely have different spice palettes. Counting Grids, being mixtures, cannot capture that as they map a recipe in a single location which heavily depends on the ingredients used. Among componential models, CCGs work the best. Multimodal Retrieval We considered the Wikipedia Picture of the Day dataset [7], where the task is multi-modal image retrieval: given a text query, we aim to find images that are most relevant to it. To accomplish this, we firstly learned a model using the visual words of the training data {wt,V }, obtaining ✓t, ⇡V i . Then, keeping ✓t fixed and iterating the M-step, we embedded the textual words {wt,T } obtaining ⇡W i . For each test sample we inferred the values of ✓t,V and ✓t,W respectively from ⇡V i and ⇡W i and we used Eq.12 to compute the retrieval scores. As in [7] we split the data in 10 4We considered the following cuisines: Afghan, Cajun, Chinese, English, French, German, Greek, Indian, Indonesian, Italian, Japanese, Mexican, Middle Eastern, Spanish and Thai. 7 folds and we used a validation set to pick a complexity. Results are illustrated in Fig.3c. Although we used this simple procedure without directly training a multimodal model, CCGs outperform LDA, CorrLDA [19] and the multimodal document random field model presented in [7] and sets a new state of the art. The area under the curve (AUC) for our method is 21.92±0.6, while for [7] is 23.14±1.49 (Smaller values indicate better performance). Counting Grids and LDA both fail with AUCs around 40. Visualization Important benefits of CCGs are that 1) they lay down sources ⇡i on a 2-D dimensional grid, which are ready for visualization, and 2) they enforce that close locations generate similar topics, which leads to smooth thematic shifts that provide connections among distant topics on the grid. This is very useful for sensemaking [20]. To demonstrate this we developed a simple interface. A particular is shown in Fig.4b, relative to the extract of the counting grid shown in Fig.4a. The interface is pannable and zoomable and, at any moment, on the screen only the top N = 500 words are shown. To define the importance of each word in each position we weighted ⇡i(z) with the inverse document frequency. Fig.4b shows the lowest level of zoom: only words from few cells are visible and the font size resembles their weight. A user can zoom in to see the content of particular cells/areas, until he reaches the highest level of zoom when most of the words generated in a position are visible, Fig.4c. FRY DEEP FRY STIR FRY Figure 5: Search result for the word “fry”. We also propose a simple search strategy: once a keyword ˆz is selected, each word z in each position j, is weighted with a word and position dependent weights. The first is equal to 1 if z co-occur with ˆz in some document, and 0 otherwise, while the latter is the sum of ⇡i(ˆz) in all the js given that there exists a window Wk that contains both i and j. Other strategies are of course possible. As result, this strategy highlights some areas and words, related to ˆz on the grid and in each areas words related (similar topic) to ˆz appears. Interestingly, if a search term is used in different contexts, few islands may appear on the grid. For example Fig.5 shows the result of the search for ˆz =“fry”: The general frying is well separated from “deep frying” and “stir frying” which appears at the extremes of the same island. Presenting search results as islands on a 2-dimensional grid, apparently improves the standard strategy, a linear list of hits, in which recipes relative to the three frying styles would have be mixed, while tempura have little to do with pan fried noodles. 4 Conclusion In this paper we presented the componential counting grid model – which bridges the topic model and counting grid worlds – together with a similarity measure based on it. We demonstrated that the hidden mapping variables associated with each document can naturally be used in classification tasks, leading to the state of the art performance on a couple of datasets. By means of proposing a simple interface, we have also shown the great potential of CCGs to visualize a corpora. Although the same holds for CGs, this is the first paper that investigate this aspect. Moreover CCGs subsume CGs as the components are used only when needed. For every restart, the grids qualitatively always appeared very similar, and some of the more salient similarity relationships were captured by all the runs. The word embedding produced by CCG has also advantages w.r.t. other Euclidean embedding methods such as ISOMAP [21], CODE [22] or LLE [23], which are often used for data visualization. In fact CCG’s computational complexity is linear in the dataset size, as opposed to the quadratic complexity of [21, 21–23] which all are based on pairwise distances. Then [21, 23] only embed documents or words while CG/CCGs provide both embeddings. Finally as opposed to previous co-occurrence embedding methods that consider all pairs of words, our representation naturally captures the same word appearing in multiple locations where it has a different meaning based on context. The word “memory” in the Science magazine corpus is a striking example (memory in neruoscience, memory in electronic devices, immunologic memory). 8 References [1] Blei, D., Ng, A., Jordan, M.: Latent dirichlet allocation. Journal of machine Learning Research 3 (2003) 993–1022 [2] Reisinger, J., Waters, A., Silverthorn, B., Mooney, R.J.: Spherical topic models. In: ICML ’10: Proceedings of the 27th international conference on Machine learning. (2010) [3] Jojic, N., Perina, A.: Multidimensional counting grids: Inferring word order from disordered bags of words. In: Proceedings of conference on Uncertainty in artificial intelligence (UAI). (2011) 547–556 [4] Hofmann, T.: Unsupervised learning by probabilistic latent semantic analysis. Machine Learning Journal 42 (2001) 177–196 [5] Blei, D.M., Lafferty, J.D.: Correlated topic models. In: NIPS. (2005) [6] Banerjee, A., Basu, S.: Topic models over text streams: a study of batch and online unsupervised learning. In: In Proc. 7th SIAM Intl. Conf. on Data Mining. (2007) [7] Jia, Y., Salzmann, M., Darrell, T.: Learning cross-modality similarity for multinomial data. In: Proceedings of the 2011 International Conference on Computer Vision. ICCV ’11, Washington, DC, USA, IEEE Computer Society (2011) 2407–2414 [8] Neal, R.M., Hinton, G.E.: A view of the em algorithm that justifies incremental, sparse, and other variants. Learning in graphical models (1999) 355–368 [9] Asuncion, A., Welling, M., Smyth, P., Teh, Y.W.: On smoothing and inference for topic models. In: In Proceedings of Uncertainty in Artificial Intelligence. (2009) [10] Minka, T.P.: Estimating a Dirichlet distribution. Technical report, Microsoft Research (2012) [11] Frey, B.J., Jojic, N.: Transformation-invariant clustering using the em algorithm. IEEE Trans. Pattern Anal. Mach. Intell. 25 (2003) 1–17 [12] Dunson, D.B., Park, J.H.: Kernel stick-breaking processes. Biometrika 95 (2008) 307–323 [13] Perina, A., Cristani, M., Castellani, U., Murino, V., Jojic, N.: Free energy score spaces: Using generative information in discriminative classifiers. IEEE Trans. Pattern Anal. Mach. Intell. 34 (2012) 1249–1262 [14] Raina, R., Shen, Y., Ng, A.Y., Mccallum, A.: Classification with hybrid generative/discriminative models. In: In Advances in Neural Information Processing Systems 16, MIT Press (2003) [15] Jebara, T., Kondor, R., Howard, A.: Probability product kernels. J. Mach. Learn. Res. 5 (2004) 819–844 [16] Bosch, A., Zisserman, A., Mu˜noz, X.: Scene classification using a hybrid generative/discriminative approach. IEEE Trans. Pattern Anal. Mach. Intell. 30 (2008) 712–727 [17] Bicego, M., Lovato, P., Perina, A., Fasoli, M., Delledonne, M., Pezzotti, M., Polverari, A., Murino, V.: Investigating topic models’ capabilities in expression microarray data classification. IEEE/ACM Trans. Comput. Biology Bioinform. 9 (2012) 1831–1836 [18] Perina, A., Jojic, N.: Image analysis by counting on a grid. In: Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR). (2011) 1985–1992 [19] Blei, D.M., Jordan, M.I.: Modeling annotated data. In: Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval. SIGIR ’03 (2003) 127–134 [20] Thomas, J., Cook, K.: Illuminating the Path: The Research and Development Agenda for Visual Analytics. IEEE Press (2005) [21] Tenenbaum, J.B., de Silva, V., Langford, J.C.: A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science 290 (2000) 2319–2323 [22] Globerson, A., Chechik, G., Pereira, F., Tishby, N.: Euclidean embedding of co-occurrence data. Journal of Machine Learning Research 8 (2007) 2265–2295 [23] Roweis, S.T., Saul, L.K.: Nonlinear dimensionality reduction by locally linear embedding. SCIENCE 290 (2000) 2323–2326 9
2013
216
4,950
Robust Sparse Principal Component Regression under the High Dimensional Elliptical Model Fang Han Department of Biostatistics Johns Hopkins University Baltimore, MD 21210 fhan@jhsph.edu Han Liu Department of Operations Research and Financial Engineering Princeton University Princeton, NJ 08544 hanliu@princeton.edu Abstract In this paper we focus on the principal component regression and its application to high dimension non-Gaussian data. The major contributions are two folds. First, in low dimensions and under the Gaussian model, by borrowing the strength from recent development in minimax optimal principal component estimation, we first time sharply characterize the potential advantage of classical principal component regression over least square estimation. Secondly, we propose and analyze a new robust sparse principal component regression on high dimensional elliptically distributed data. The elliptical distribution is a semiparametric generalization of the Gaussian, including many well known distributions such as multivariate Gaussian, rank-deficient Gaussian, t, Cauchy, and logistic. It allows the random vector to be heavy tailed and have tail dependence. These extra flexibilities make it very suitable for modeling finance and biomedical imaging data. Under the elliptical model, we prove that our method can estimate the regression coefficients in the optimal parametric rate and therefore is a good alternative to the Gaussian based methods. Experiments on synthetic and real world data are conducted to illustrate the empirical usefulness of the proposed method. 1 Introduction Principal component regression (PCR) has been widely used in statistics for years (Kendall, 1968). Take the classical linear regression with random design for example. Let x1, . . . , xn ∈Rd be n independent realizations of a random vector X ∈Rd with mean 0 and covariance matrix Σ. The classical linear regression model and simple principal component regression model can be elaborated as follows: (Classical linear regression model) Y = Xβ + ϵ; (Principal Component Regression Model) Y = αXu1 + ϵ, (1.1) where X = (x1, . . . , xn)T ∈Rn×d, Y ∈Rn, ui is the i-th leading eigenvector of Σ, and ϵ ∈ Nn(0, σ2Id) is independent of X, β ∈Rd and α ∈R. Here Id ∈Rd×d is the identity matrix. The principal component regression then can be conducted in two steps: First we obtain an estimator bu1 of u1; Secondly we project the data in the direction of bu1 and solve a simple linear regression in estimating α. By checking Equation (1.1), it is easy to observe that the principal component regression model is a subset of the general linear regression (LR) model with the constraint that the regression coefficient β is proportional to u1. There has been a lot of discussions on the advantage of principal component regression over classical linear regression. In low dimensional settings, Massy (1965) pointed out that principal component regression can be much more efficient in handling collinearity among predictors compared to the linear regression. More recently, Cook (2007) and Artemiou and Li (2009) argued that principal component regression has potential to play a more important role. In particular, letting buj be the j-th leading eigenvector of the sample covariance matrix bΣ of x1, . . . , xn, 1 Artemiou and Li (2009) show that under mild conditions with high probability the correlation between the response Y and Xbui is higher than or equal to the correlation between Y and Xbuj when i < j. This indicates, although not rigorous, there is possibility that principal component regression can borrow strength from the low rank structure of Σ, which motivates our work. Even though the statistical performance of principal component regression in low dimensions is not fully understood, there is even less analysis on principal component regression in high dimensions where the dimension d can be even exponentially larger than the sample size n. This is partially due to the fact that estimating the leading eigenvectors of Σ itself has been difficult enough. For example, Johnstone and Lu (2009) show that, even under the Gaussian model, when d/n →γ for some γ > 0, there exist multiple settings under which bu1 can be an inconsistent estimator of u1. To attack this “curse of dimensionality”, one solution is adding a sparsity assumption on u1, leading to various versions of the sparse PCA. See, Zou et al. (2006); d’Aspremont et al. (2007); Moghaddam et al. (2006), among others. Under the (sub)Gaussian settings, minimax optimal rates are being established in estimating u1, . . . , um (Vu and Lei, 2012; Ma, 2013; Cai et al., 2013). Very recently, Han and Liu (2013b) relax the Gaussian assumption in conducting a scale invariant version of the sparse PCA (i.e., estimating the leading eigenvector of the correlation instead of the covariance matrix). However, it can not be easily applied to estimate u1 and the rate of convergence they proved is not the parametric rate. This paper improves upon the aforementioned results in two directions. First, with regard to the classical principal component regression, under a double asymptotic framework in which d is allowed to increase with n, by borrowing the very recent development in principal component analysis (Vershynin, 2010; Lounici, 2012; Bunea and Xiao, 2012), we for the first time explicitly show the advantage of principal component regression over the classical linear regression. We explicitly confirm the following two advantages of principal component regression: (i) Principal component regression is insensitive to collinearity, while linear regression is very sensitive to; (ii) Principal component regression can utilize the low rank structure of the covariance matrix Σ, while linear regression cannot. Secondly, in high dimensions where d can increase much faster, even exponentially faster, than n, we propose a robust method in conducting (sparse) principal component regression under a nonGaussian elliptical model. The elliptical distribution is a semiparametric generalization to the Gaussian, relaxing the light tail and zero tail dependence constraints, but preserving the symmetry property. We refer to Kl¨uppelberg et al. (2007) for more details. This distribution family includes many well known distributions such as multivariate Gaussian, rank deficient Gaussian, t, logistic, and many others. Under the elliptical model, we exploit the result in Han and Liu (2013a), who showed that by utilizing a robust covariance matrix estimator, the multivariate Kendall’s tau, we can obtain an estimator eu1, which can recover u1 in the optimal parametric rate as shown in Vu and Lei (2012). We then exploit eu1 in conducting principal component regression and show that the obtained estimator ˇβ can estimate β in the optimal p s log d/n rate. The optimal rate in estimating u1 and β, combined with the discussion in the classical principal component regression, indicates that the proposed method has potential to handle high dimensional complex data and has its advantage over high dimensional linear regression methods, such as ridge regression and lasso. These theoretical results are also backed up by numerical experiments on both synthetic and real world equity data. 2 Classical Principal Component Regression This section is devoted to the discussion on the advantage of classical principal component regression over the classical linear regression. We start with a brief introduction of notations. Let M = [Mij] ∈Rd×d and v = (v1, ..., vd)T ∈Rd. We denote vI to be the subvector of v whose entries are indexed by a set I. We also denote MI,J to be the submatrix of M whose rows are indexed by I and columns are indexed by J. Let MI∗and M∗J be the submatrix of M with rows indexed by I, and the submatrix of M with columns indexed by J. Let supp(v) := {j : vj ̸= 0}. For 0 < q < ∞, we define the ℓ0, ℓq and ℓ∞vector norms as ∥v∥0 := card(supp(v)), ∥v∥q := ( d X i=1 |vi|q)1/q and ∥v∥∞:= max 1≤i≤d |vi|. Let Tr(M) be the trace of M. Let λj(M) be the j-th largest eigenvalue of M and Θj(M) be the corresponding leading eigenvector. In particular, we let λmax(M) := λ1(M) and λmin(M) := 2 λd(M). We define Sd−1 := {v ∈Rd : ∥v∥2 = 1} to be the d-dimensional unit sphere. We define the matrix ℓmax norm and ℓ2 norm as ∥M∥max := max{|Mij|} and ∥M∥2 := supv∈Sd−1 ∥Mv∥2. We define diag(M) to be a diagonal matrix with [diag(M)]jj = Mjj for j = 1, . . . , d. We denote vec(M) := (MT ∗1, . . . , MT ∗d)T . For any two sequence {an} and {bn}, we denote an c,C ≍bn if there exist two fixed constants c, C such that c ≤an/bn ≤C. Let x1, . . . , xn ∈Rd be n independent observations of a d-dimensional random vector X ∼ Nd(0, Σ), u1 := Θ1(Σ) and ϵ1, . . . , ϵn ∼N1(0, σ2) are independent from each other and {Xi}n i=1. We suppose that the following principal component regression model holds: Y = αXu1 + ϵ, (2.1) where Y = (Y1, . . . , Yn)T ∈Rn, X = [x1, . . . , xn]T ∈Rn×d and ϵ = (ϵ1, . . . , ϵn)T ∈Rn. We are interested in estimating the regression coefficient β := αu1. Let bβ represent the solution of the classical least square estimator without taking the information that β is proportional to u1 into account. bβ can be expressed as follows: bβ := (XT X)−1XT Y . (2.2) We then have the following proposition, which shows that the mean square error of bβ −β is highly related to the scale of λmin(Σ). Proposition 2.1. Under the principal component regression model shown in (2.1), we have E∥bβ −β∥2 2 = σ2 n −d −1  1 λ1(Σ) + · · · + 1 λd(Σ)  . Proposition 2.1 reflects the vulnerability of least square estimator on the collinearity. More specifically, when λd(Σ) is extremely small, going to zero in the scale of O(1/n), bβ can be an inconsistent estimator even when d is fixed. On the other hand, using the Markov inequality, when λd(Σ) is lower bounded by a fixed constant and d = o(n), the rate of convergence of bβ is well known to be OP ( p d/n). Motivated from Equation (2.1), the classical principal component regression estimator can be elaborated as follows. (1) We first estimate u1 using the leading eigenvector bu1 of the sample covariance bΣ := 1 n P xixT i . (2) We then estimate α ∈R in Equation (2.1) by the standard least square estimation on the projected data bZ := Xbu1 ∈Rn: eα := ( bZT bZ)−1 bZT Y , The final principal component regression estimator eβ is then obtained as eβ = eαbu1. We then have the following important theorem, which provides a rate of convergence for eβ to approximate β. Theorem 2.2. Let r∗(Σ) := Tr(Σ)/λmax(Σ) represent the effective rank of Σ (Vershynin, 2010). Suppose that ∥Σ∥2 · r r∗(Σ) log d n = o(1). Under the Model (2.1), when λmax(Σ) > c1 and λ2(Σ)/λ1(Σ) < C1 < 1 for some fixed constants C1 and c1, we have ∥eβ −β∥2 = OP (r 1 n + α + 1 p λmax(Σ) ! · r r∗(Σ) log d n ) . (2.3) Theorem 2.2, compared to Proposition 2.1, provides several important messages on the performance of principal component regression. First, compared to the least square estimator bβ, eβ is insensitive to collinearity in the sense that λmin(Σ) plays no role in the rate of convergence of eβ. Secondly, when λmin(Σ) is lower bounded by a fixed constant and α is upper bounded by a fixed constant, the rate of convergence for bβ is OP ( p d/n) and for eβ is OP ( p r∗(Σ) log d/n), while r∗(Σ) := 3 Tr(Σ)/λmax(Σ) ≤d and is of order o(d) when there exists a low rank structure for Σ. These two observations, combined together, illustrate the advantages of the classical principal component regression over least square estimation. These advantages justify the use of principal component regression. There is one more thing to be noted: the performance of eβ, unlike bβ, depends on α. When α is small, eβ can predict β more accurately. These three observations are verified in Figure 1. Here the data are generated according to Equation (2.1) and we set n = 100, d = 10, Σ to be a diagonal matrix with descending diagonal values Σii = λi and σ2 = 1. In Figure 1(A), we set α = 1, λ1 = 10, λj = 1 for j = 2, . . . , d −1, and changing λd from 1 to 1/100; In Figure 1(B), we set α = 1, λj = 1 for j = 2, . . . , d and changing λ1 from 1 to 100; In Figure 1(C), we set λ1 = 10, λj = 1 for j = 2, . . . , d, and changing α from 0.1 to 10. In the three figures, the empirical mean square error is plotted against 1/λd, λ1, and α. It can be observed that the results, each by each, matches the theory. 0 20 40 60 80 100 0.2 0.4 0.6 0.8 1.0 1/lambda_min Mean Square Error LR PCR 0 20 40 60 80 100 0.0 0.2 0.4 0.6 0.8 lambda_max Mean Square Error LR PCR 0 2 4 6 8 10 0.0 0.2 0.4 0.6 0.8 1.0 alpha Mean Square Error LR PCR A B C Figure 1: Justification of Proposition 2.1 and Theorem 2.2. The empirical mean square errors are plotted against 1/λd, λ1, and α separately in (A), (B), and (C). Here the results of classical linear regression and principal component regression are marked in black solid line and red dotted line. 3 Robust Sparse Principal Component Regression under Elliptical Model In this section, we propose a new principal component regression method. We generalize the settings in classical principal component regression discussed in the last section in two directions: (i) We consider the high dimensional settings where the dimension d can be much larger than the sample size n; (ii) In modeling the predictors x1, . . . , xn, we consider a more general elliptical, instead of the Gaussian distribution family. The elliptical family can capture characteristics such as heavy tails and tail dependence, making it more suitable for analyzing complex datasets in finance, genomics, and biomedical imaging. 3.1 Elliptical Distribution In this section we define the elliptical distribution and introduce the basic property of the elliptical distribution. We denote by X d= Y if random vectors X and Y have the same distribution. Here we only consider the continuous random vectors with density existing. To our knowledge, there are essentially four ways to define the continuous elliptical distribution with density. The most intuitive way is as follows: A random vector X ∈Rd is said to follow an elliptical distribution ECd(µ, Σ, ξ) if and only there exists a random variable ξ > 0 (a.s.) and a Gaussian distribution Z ∼Nd(0, Σ) such that X d= µ + ξZ. (3.1) Note that here ξ is not necessarily independent of Z. Accordingly, elliptical distribution can be regarded as a semiparametric generalization to the Gaussian distribution, with the nonparametric part ξ. Because ξ can be very heavy tailed, X can also be very heavy tailed. Moreover, when Eξ2 exists, we have Cov(X) = Eξ2Σ and Θj(Cov(X)) = Θj(Σ) for j = 1, . . . , d. This implies that, when Eξ2 exists, to recover u1 := Θ1(Cov(X)), we only need to recover Θ1(Σ). Here Σ is conventionally called the scatter matrix. 4 We would like to point out that the elliptical family is significantly larger than the Gaussian. In fact, Gaussian is fully parameterized by finite dimensional parameters (mean and variance). In contrast, the elliptical is a semiparametric family (since the elliptical density can be represented as g((x−µ)T Σ−1(x−µ)) where the function g(·) function is completely unspecified.). If we consider the “volumes” of the family of the elliptical family and the Gaussian family with respect to the Lebesgue reference measure, the volume of Gaussian family is zero (like a line in a 3-dimensional space), while the volume of the elliptical family is positive (like a ball in a 3-dimensional space). 3.2 Multivariate Kendall’s tau As a important step in conducting the principal component regression, we need to estimate u1 = Θ1(Cov(X)) = Θ1(Σ) as accurately as possible. Since the random variable ξ in Equation (3.1) can be very heavy tailed, the according elliptical distributed random vector can be heavy tailed. Therefore, as has been pointed out by various authors (Tyler, 1987; Croux et al., 2002; Han and Liu, 2013b), the leading eigenvector of the sample covariance matrix bΣ can be a bad estimator in estimating u1 = Θ1(Σ) under the elliptical distribution. This motivates developing robust estimator. In particular, in this paper we consider using the multivariate Kendall’s tau (Choi and Marden, 1998) and recently deeply studied by Han and Liu (2013a). In the following we give a brief description of this estimator. Let X ∼ECd(µ, Σ, ξ) and f X be an independent copy of X. The population multivariate Kendall’s tau matrix, denoted by K ∈Rd×d, is defined as: K := E (X −f X)(X −f X)T ∥X −f X∥2 2 ! . (3.2) Let x1, . . . , xn be n independent observations of X. The sample version of multivariate Kendall’s tau is accordingly defined as bK = 1 n(n −1) X i̸=j (xi −xj)(xi −xj)T ∥xi −xj∥2 2 , (3.3) and we have that E( bK) = K. bK is a matrix version U statistic and it is easy to see that maxjk |Kjk| ≤1, maxjk | bKjk| ≤1. Therefore, bK is a bounded matrix and hence can be a nicer statistic than the sample covariance matrix. Moreover, we have the following important proposition, coming from Oja (2010), showing that K has the same eigenspace as Σ and Cov(X). Proposition 3.1 (Oja (2010)). Let X ∼ECd(µ, Σ, ξ) be a continuous distribution and K be the population multivariate Kendall’s tau statistic. Then if λj(Σ) ̸= λk(Σ) for any k ̸= j, we have Θj(Σ) = Θj(K) and λj(K) = E λj(Σ)U 2 j λ1(Σ)U 2 1 + . . . + λd(Σ)U 2 d ! , (3.4) where U := (U1, . . . , Ud)T follows a uniform distribution in Sd−1. In particular, when Eξ2 exists, Θj(Cov(X)) = Θj(K). 3.3 Model and Method In this section we discuss the model we build and the accordingly proposed method in conducting high dimensional (sparse) principal component regression on non-Gaussian data. Similar as in Section 2, we consider the classical simple principal component regression model: Y = αXu1 + ϵ = α[x1, . . . , xn]T u1 + ϵ. To relax the Gaussian assumption, we assume that both x1, . . . , xn ∈Rd and ϵ1, . . . , ϵn ∈R be elliptically distributed. We assume that xi ∈ECd(0, Σ, ξ). To allow the dimension d increasing much faster than n, we impose a sparsity structure on u1 = Θ1(Σ). Moreover, to make u1 identifiable, we assume that λ1(Σ) ̸= λ2(Σ). Thusly, the formal model of the robust sparse principal component regression considered in this paper is as follows: Md(Y , ϵ; Σ, ξ, s) :  Y = αXu1 + ϵ, x1, . . . , xn ∼ECd(0, Σ, ξ), ∥Θ1(Σ)∥0 ≤s, λ1(Σ) ̸= λ2(Σ). (3.5) 5 Then the robust sparse principal component regression can be elaborated as a two step procedure: (i) Inspired by the model Md(Y , ϵ; Σ, ξ, s) and Proposition 3.1, we consider the following optimization problem to estimate u1 := Θ1(Σ): eu1 = arg max v∈Rd vT bKv, subject to v ∈Sd−1 ∩B0(s), (3.6) where B0(s) := {v ∈Rd : ∥v∥0 ≤s} and bK is the estimated multivariate Kendall’s tau matrix. The corresponding global optimum is denoted by eu1. Using Proposition 3.1, eu1 is also an estimator of Θ1(Cov(X)), whenever the covariance matrix exists. (ii) We then estimate α ∈R in Equation (3.5) by the standard least square estimation on the projected data eZ := Xeu1 ∈Rn: ˇα := ( eZT eZ)−1 eZT Y , The final principal component regression estimator ˇβ is then obtained as ˇβ = ˇαeu1. 3.4 Theoretical Property In Theorem 2.2, we show that how to estimate u1 accurately plays an important role in conducting the principal component regression. Following this discussion and the very recent results in Han and Liu (2013a), the following “easiest” and “hardest” conditions are considered. Here κL, κU are two constants larger than 1. Condition 1 (“Easiest”): λ1(Σ) 1,κU ≍dλj(Σ) for any j ∈{2, . . . , d} and λ2(Σ) 1,κU ≍λj(Σ) for any j ∈{3, . . . , d}; Condition 2 (“Hardest”): λ1(Σ) κL,κU ≍ λj(Σ) for any j ∈{2, . . . , d}. In the sequel, we say that the model Md(Y , ϵ; Σ, ξ, s) holds if the data (Y , X) are generated using the model Md(Y , ϵ; Σ, ξ, s). Under Conditions 1 and 2, we then have the following theorem, which shows that under certain conditions, ∥ˇβ −β∥2 = OP ( p s log d/n), which is the optimal parametric rate in estimating the regression coefficient (Ravikumar et al., 2008). Theorem 3.2. Let the model Md(Y , ϵ; Σ, ξ, s) hold and |α| in Equation (3.5) are upper bounded by a constant and ∥Σ∥2 is lower bounded by a constant. Then under Condition 1 or Condition 2 and for all random vector X such that max v∈Sd−1,∥v∥0≤2s |vT (bΣ −Σ)v| = oP (1), we have the robust principal component regression estimator ˇβ satisfies that ∥ˇβ −β∥2 = OP r s log d n ! . Normal multivariate-t EC1 EC2 0 20 40 60 80 0.0 0.2 0.4 0.6 0.8 1.0 1.2 number of selected features averaged error PCR RPCR 0 20 40 60 80 0.0 0.2 0.4 0.6 0.8 1.0 1.2 number of selected features averaged error PCR RPCR 0 20 40 60 80 0.0 0.5 1.0 1.5 number of selected features averaged error PCR RPCR 0 20 40 60 80 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 number of selected features averaged error PCR RPCR Figure 2: Curves of averaged estimation errors between the estimates and true parameters for different distributions (normal, multivariate-t, EC1, and EC2, from left to right) using the truncated power method. Here n = 100, d = 200, and we are interested in estimating the regression coefficient β. The horizontal-axis represents the cardinalities of the estimates’ support sets and the vertical-axis represents the empirical mean square error. Here from the left to the right, the minimum mean square errors for lasso are 0.53, 0.55, 1, and 1. 6 4 Experiments In this section we conduct study on both synthetic and real-world data to investigate the empirical performance of the robust sparse principal component regression proposed in this paper. We use the truncated power algorithm proposed in Yuan and Zhang (2013) to approximate the global optimums eu1 to (3.6). Here the cardinalities of the support sets of the leading eigenvectors are treated as tuning parameters. The following three methods are considered: lasso: the classical L1 penalized regression; PCR: The sparse principal component regression using the sample covariance matrix as the sufficient statistic and exploiting the truncated power algorithm in estimating u1; RPCR: The robust sparse principal component regression proposed in this paper, using the multivariate Kendall’s tau as the sufficient statistic and exploiting the truncated power algorithm to estimate u1. 4.1 Simulation Study In this section, we conduct simulation study to back up the theoretical results and further investigate the empirical performance of the proposed robust sparse principal component regression method. To illustrate the empirical usefulness of the proposed method, we first consider generating the data matrix X. To generate X, we need to consider how to generate Σ and ξ. In detail, let ω1 > ω2 > ω3 = . . . = ωd be the eigenvalues and u1, . . . , ud be the eigenvectors of Σ with uj := (uj1, . . . , ujd)T . The top 2 leading eigenvectors u1, u2 of Σ are specified to be sparse with sj := ∥uj∥0 and ujk = 1/√sj for k ∈[1 + Pj−1 i=1 si, Pj i=1 si] and zero for all the others. Σ is generated as Σ = P2 j=1(ωj −ωd)ujuT j +ωdId. Across all settings, we let s1 = s2 = 10, ω1 = 5.5, ω2 = 2.5, and ωj = 0.5 for all j = 3, . . . , d. With Σ, we then consider the following four different elliptical distributions: (Normal) X ∼ECd(0, Σ, ζ1) with ζ1 d= χd. Here χd is the chi-distribution with degree of freedom d. For Y1, . . . , Yd i.i.d. ∼ N(0, 1), p Y 2 1 + . . . + Y 2 d d= χd. In this setting, X follows the Gaussian distribution (Fang et al., 1990). (Multivariate-t) X ∼ECd(0, Σ, ζ2) with ζ2 d= √κξ∗ 1/ξ∗ 2. Here ξ∗ 1 d= χd and ξ∗ 2 d= χκ with κ ∈Z+. In this setting, X follows a multivariate-t distribution with degree of freedom κ (Fang et al., 1990). Here we consider κ = 3. (EC1) X ∼ECd(0, Σ, ζ3) with ζ3 ∼F(d, 1), an F distribution. (EC2) X ∼ECd(0, Σ, ζ4) with ζ4 ∼Exp(1), an exponential distribution. We then simulate x1, . . . , xn from X. This forms a data matrix X. Secondly, we let Y = Xu1 +ϵ, where ϵ ∼Nn(0, In). This produces the data (Y , X). We repeatedly generate n data according to the four distributions discussed above for 1,000 times. To show the estimation accuracy, Figure 2 plots the empirical mean square error between the estimate ˇu1 and true regression coefficient β against the numbers of estimated nonzero entries (defined as ∥ˇu1∥0), for PCR and RPCR, under different schemes of (n, d), Σ and different distributions. Here we considered n = 100 and d = 200. It can be seen that we do not plot the results of lasso in Figure 2. As discussed in Section 2, especially as shown in Figure 1, linear regression and principal component regression have their own advantages in different settings. More specifically, we do not plot the results of lasso here simply because it performs so bad under our simulation settings. For example, under the Gaussian settings with n = 100 and d = 200, the lowest mean square error for lasso is 0.53 and the errors are averagely above 1.5, while for RPCR is 0.13 and is averagely below 1. Figure 2 shows when the data are non-Gaussian but follow an elliptically distribution, RPCR outperforms PCR constantly in terms of estimation accuracy. Moreover, when the data are indeed normally distributed, there is no obvious difference between RPCR and PCR, indicating that RPCR is a safe alternative to the classical sparse principal component regression. 7 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G GG G G G G GG G GG G G G G G G G G G GG G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G GG G G G G G G G G G G G G G G G GG G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G GG G G GG G G G G G G G G G G G G G G G G G G G GG G G G G GG G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG GG G G G G G G G G G G G G G G G G G GG G G G G G G G G G G GG G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G GG G G G G G G G G GG G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G GG G G G G G G G G G G G GG G G G G G G G G GG G G G G G G G G G G GG G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G GG G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G −3 −2 −1 0 1 2 3 −6 −4 −2 0 2 4 Theoretical Quantiles Sample Quantiles 0 50 100 150 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 number of selected features averaged prediction error lasso PCR RPCR A B Figure 3: (A) Quantile vs. quantile plot of the log-return values for one stock ”Goldman Sachs”. (B) Prediction error against the number of features selected. The scale of the prediction errors is enlarged by 100 times for better visualization. 4.2 Application to Equity Data In this section we apply the proposed robust sparse principal component regression and the other two methods to the stock price data from Yahoo! Finance (finance.yahoo.com). We collect the daily closing prices for 452 stocks that are consistently in the S&P 500 index between January 1, 2003 through January 1, 2008. This gives us altogether T=1,257 data points, each data point corresponds to the vector of closing prices on a trading day. Let St = [Stt,j] denote by the closing price of stock j on day t. We are interested in the log return data X = [Xtj] with Xtj = log(Stt,j/Stt−1,j). We first show that this data set is non-Gaussian and heavy tailed. This is done first by conducting marginal normality tests (Kolmogorove-Smirnov, Shapiro-Wilk, and Lillifors) on the data. We find that at most 24 out of 452 stocks would pass any of three normality test. With Bonferroni correction there are still over half stocks that fail to pass any normality tests. Moreover, to illustrate the heavy tailed issue, we plot the quantile vs. quantile plot for one stock, “Goldman Sachs”, in Figure 3(A). It can be observed that the log return values for this stock is heavy tailed compared to the Gaussian. To illustrate the power of the proposed method, we pick a subset of the data first. The stocks can be summarized into 10 Global Industry Classification Standard (GICS) sectors and we are focusing on the subcategory “Financial”. This leave us 74 stocks and we denote the resulting data to be F ∈R1257×74. We are interested in predicting the log return value in day t for each stock indexed by k (i.e., treating Ft,k as the response) using the log return values for all the stocks in day t −1 to day t −7 (i.e., treating vec(Ft−7≤t′≤t−1,·) as the predictor). The dimension for the regressor is accordingly 7 × 74 = 518. For each stock indexed by k, to learn the regression coefficient βk, we use Ft′∈{1,...,1256},· as the training data and applying the three different methods on this dataset. For each method, after obtaining an estimator bβk, we use vec(Ft′∈{1250,...,1256},·) bβ to estimate F1257,k. This procedure is repeated for each k and the averaged prediction errors are plotted against the number of features selected (i.e., ∥bβ∥0) in Figure 3(B). To visualize the difference more clearly, in the figures we enlarge the scale of the prediction errors by 100 times. It can be observed that RPCR has the universally lowest prediction error with regard to different number of features. Acknowledgement Han’s research is supported by a Google fellowship. Liu is supported by NSF Grants III-1116730 and NSF III-1332109, an NIH sub-award and a FDA sub-award from Johns Hopkins University. 8 References Artemiou, A. and Li, B. (2009). On principal components and regression: a statistical explanation of a natural phenomenon. Statistica Sinica, 19(4):1557. Bunea, F. and Xiao, L. (2012). On the sample covariance matrix estimator of reduced effective rank population matrices, with applications to fPCA. arXiv preprint arXiv:1212.5321. Cai, T. T., Ma, Z., and Wu, Y. (2013). Sparse PCA: Optimal rates and adaptive estimation. The Annals of Statistics (to appear). Choi, K. and Marden, J. (1998). A multivariate version of kendall’s τ. Journal of Nonparametric Statistics, 9(3):261–293. Cook, R. D. (2007). Fisher lecture: Dimension reduction in regression. Statistical Science, 22(1):1–26. Croux, C., Ollila, E., and Oja, H. (2002). Sign and rank covariance matrices: statistical properties and application to principal components analysis. In Statistical data analysis based on the L1-norm and related methods, pages 257–269. Springer. d’Aspremont, A., El Ghaoui, L., Jordan, M. I., and Lanckriet, G. R. (2007). A direct formulation for sparse PCA using semidefinite programming. SIAM review, 49(3):434–448. Fang, K., Kotz, S., and Ng, K. (1990). Symmetric multivariate and related distributions. Chapman&Hall, London. Han, F. and Liu, H. (2013a). Optimal sparse principal component analysis in high dimensional elliptical model. arXiv preprint arXiv:1310.3561. Han, F. and Liu, H. (2013b). Scale-invariant sparse PCA on high dimensional meta-elliptical data. Journal of the American Statistical Association (in press). Johnstone, I. M. and Lu, A. Y. (2009). On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 104(486). Kendall, M. G. (1968). A course in multivariate analysis. Kl¨uppelberg, C., Kuhn, G., and Peng, L. (2007). Estimating the tail dependence function of an elliptical distribution. Bernoulli, 13(1):229–251. Lounici, K. (2012). Sparse principal component analysis with missing observations. arXiv preprint arXiv:1205.7060. Ma, Z. (2013). Sparse principal component analysis and iterative thresholding. to appear Annals of Statistics. Massy, W. F. (1965). Principal components regression in exploratory statistical research. Journal of the American Statistical Association, 60(309):234–256. Moghaddam, B., Weiss, Y., and Avidan, S. (2006). Spectral bounds for sparse PCA: Exact and greedy algorithms. Advances in neural information processing systems, 18:915. Oja, H. (2010). Multivariate Nonparametric Methods with R: An approach based on spatial signs and ranks, volume 199. Springer. Ravikumar, P., Raskutti, G., Wainwright, M., and Yu, B. (2008). Model selection in gaussian graphical models: High-dimensional consistency of l1-regularized mle. Advances in Neural Information Processing Systems (NIPS), 21. Tyler, D. E. (1987). A distribution-free m-estimator of multivariate scatter. The Annals of Statistics, 15(1):234– 251. Vershynin, R. (2010). Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027. Vu, V. Q. and Lei, J. (2012). Minimax rates of estimation for sparse pca in high dimensions. Journal of Machine Learning Research (AIStats Track). Yuan, X. and Zhang, T. (2013). Truncated power method for sparse eigenvalue problems. Journal of Machine Learning Research, 14:899–925. Zou, H., Hastie, T., and Tibshirani, R. (2006). Sparse principal component analysis. Journal of computational and graphical statistics, 15(2):265–286. 9
2013
217
4,951
Optimizing Instructional Policies Robert V. Lindsey⋆, Michael C. Mozer⋆, William J. Huggins⋆, Harold Pashler† ⋆Department of Computer Science, University of Colorado, Boulder † Department of Psychology, University of California, San Diego Abstract Psychologists are interested in developing instructional policies that boost student learning. An instructional policy specifies the manner and content of instruction. For example, in the domain of concept learning, a policy might specify the nature of exemplars chosen over a training sequence. Traditional psychological studies compare several hand-selected policies, e.g., contrasting a policy that selects only difficult-to-classify exemplars with a policy that gradually progresses over the training sequence from easy exemplars to more difficult (known as fading). We propose an alternative to the traditional methodology in which we define a parameterized space of policies and search this space to identify the optimal policy. For example, in concept learning, policies might be described by a fading function that specifies exemplar difficulty over time. We propose an experimental technique for searching policy spaces using Gaussian process surrogate-based optimization and a generative model of student performance. Instead of evaluating a few experimental conditions each with many human subjects, as the traditional methodology does, our technique evaluates many experimental conditions each with a few subjects. Even though individual subjects provide only a noisy estimate of the population mean, the optimization method allows us to determine the shape of the policy space and to identify the global optimum, and is as efficient in its subject budget as a traditional A-B comparison. We evaluate the method via two behavioral studies, and suggest that the method has broad applicability to optimization problems involving humans outside the educational arena. 1 Introduction What makes a teacher effective? A critical factor is their instructional policy, which specifies the manner and content of instruction. Electronic tutoring systems have been constructed that implement domain-specific instructional policies (e.g., J. R. Anderson, Conrad, & Corbett, 1989; Koedinger & Corbett, 2006; Martin & VanLehn, 1995). A tutoring system decides at every point in a session whether to present some new material, provide a detailed example to illustrate a concept, pose new problems or questions, or lead the student step-by-step to discover an answer. Prior efforts have focused on higher cognitive domains (e.g., algebra) in which policies result from an expert-systems approach involving careful handcrafted analysis and design followed by iterative evaluation and refinement. As a complement to these efforts, we are interested in addressing fundamental questions in the design of instructional policies that pertain to basic cognitive skills. Consider a concrete example: training individuals to discriminate between two perceptual or conceptual categories, such as determining whether mammogram x-ray images are negative or positive for an abnormality. In training from examples, should the instructor tend to alternate between categories—as in pnpnpnpn for positive and negative examples—or present a series of instances from the same category—ppppnnnn (Goldstone & Steyvers, 1 2001)? Both of these strategies—interleaving and blocking, respectively—are adopted by human instructors (Khan, Zhu, & Mutlu, 2011). Reliable advantages between strategies has been observed (Kang & Pashler, 2011; Kornell & Bjork, 2008) and factors influencing the relative effectiveness of each have been explored (Carvalho & Goldstone, 2011). Empirical evaluation of blocking and interleaving policies involves training a set of human subjects with a fixed-length sequence of exemplars drawn from one policy or the other. During training, exemplars are presented one at a time, and typically subjects are asked to guess the category label associated with the exemplar, after which they are told the correct label. Following training, mean classification accuracy is evaluated over a set of test exemplars. Such an experiment yields an intrinsically noisy evaluation of the two policies, limited by the number of subjects and inter-individual variability. Consequently, the goal of a typical psychological experiment is to find a statistically reliable difference between the training conditions, allowing the experimenter to conclude that one policy is superior. Blocking and interleaving are but two points in a space of policies that could be parameterized by the probability, ρ, that the exemplar presented on trial t + 1 is drawn from the same category as the exemplar on trial t. Blocking and interleaving correspond to ρ near 1 and 0, respectively. (There are many more interesting ways of constructing a policy space that includes blocking and interleaving, e.g., ρ might vary with t or with a student’s running-average classification accuracy, but we will use the simple fixed-ρ policy space for illustration.) Although one would ideally like to explore the policy space exhaustively, limits on the availability of experimental subjects and laboratory resources make it challenging to conduct studies evaluating more than a few candidate policies to the degree necessary to obtain statistically significant differences. 2 Optimizing an instructional policy Our goal is to discover the optimum in policy space—the policy that maximizes mean accuracy or another measure of performance over a population of students. (We focus on optimizing for a population but later discuss how our approach might be used to address individual differences.) Our challenge is performing optimization on a budget: each subject tested imposes a time or financial cost. Evaluating a single policy with a degree of certainty requires testing many subjects to reduce sampling variance due to individual differences, factors outside of experimental control (e.g., alertness), and imprecise measurement obtained from brief evaluations and discrete (e.g., correct or incorrect) responses. Consequently, exhaustive search over the set of distinguishable policies is not feasible. Past research on optimal teaching (Chi, VanLehn, Litman, & Jordan, 2011; Rafferty, Brunskill, Griffiths, & Shafto, 2011; Whitehill & Movellan, 2010) has investigated reinforcement learning and POMDP approaches. These approaches are intriguing but are not typically touted for their data efficiency. To avoid exceeding a subject budget, the flexibility of the POMDP framework demands additional bias, imposed via restrictions on the class of candidate policies and strong assumptions about the learner. The approach we will propose likewise requires specification of a constrained policy space, but does not make assumptions about the internal state of the learner or the temporal dynamics of learning. In contrast to POMDP approaches, the cognitive agnosticism of our approach allows it to be readily applied to arbitrary policy optimization problems. Direct optimization methods that accommodate noisy function evaluations have also been proposed, but experimentation with one such technique (E. J. Anderson & Ferris, 2001) convinced us that the method we propose here is orders of magnitude more efficient in its required subject budget. Neither POMDP nor direct-optimization approaches models the policy space explicitly. In contrast, we propose an approach based on function approximation. From a functionapproximation perspective, the goal is to determine the shape and optimum of the function that maps policies to performance—call this the policy performance function or PPF. What sort of experimental design should be used to approximate the PPF? Traditional experimental design—which aims to show a statistically reliable difference between two alternative policies—requires testing many subjects for each policy. However, if our goal is to determine the shape of the PPF, we may get better value from data collection by evaluating a large 2 Instructional Policy Performance 0 0.2 0.4 0.6 0.8 Figure 1: A hypothetical 1D instructional policy space. The solid black line represents an (unknown) policy performance function. The grey disks indicate the noisy outcome of singlesubject experiments conducted at specified points in policy space. (The diameter of the disk represents the number of data points occuring at the disk’s location.) The dashed black line depicts the GP posterior mean, and the coloring of each vertical strip represents the cumulative density function for the posterior. number of points in policy space each with few subjects instead of a small number of points each with many subjects. This possibility suggests a new paradigm for experimental design in psychological science. Our vision is a completely automated system that selects points in policy space to evaluate, runs an experiment—an evaluation of some policy with one or a small number of subjects—and repeats until a budget for data collection is exhausted. 2.1 Surrogate-based optimization using Gaussian process regression In surrogate-based optimization (e.g., Forrester & Keane, 2009), experimental observations serve to constrain a surrogate model that approximates the function being optimized. This surrogate is used both to select additional experiments to run and to estimate the optimum. Gaussian process regression (GPR) has long been used as the surrogate for solving low-dimensional stochastic optimization problems in engineering fields (Forrester & Keane, 2009; Sacks, Welch, Mitchell, & Wynn, 1989). Like other Bayesian models, GPR makes efficient use of limited data, which is particularly critical to us because our budget is expressed in terms of the number of subjects required. Further, GPR provides a principled approach to handling measurement uncertainty, which is a problem any experimental context but is particularly striking in human experimentation due to the range of factors influencing performance. The primary constraint imposed by the Gaussian Process prior—that of function smoothness—can readily be ensured with the appropriate design of policy spaces. To illustrate GPR in surrogate-based optimization, Figure 1 depicts a hypothetical 1D instructional policy space, along with the true PPF and the GPR posterior conditioned on the outcome of a set of single-subject experiments at various points in policy space. 2.2 Generative model of student performance Each instructional policy is presumed to have an inherent effectiveness for a population of individuals. However, a policy’s effectiveness can be observed only indirectly through measurements of subject performance such as the number of correct responses. To determine the most effective policy from noisy observations, we must specify a generative model of student performance which relates the inherent effectiveness of instruction to observed performance. Formally, each subject s is trained under a policy xs and then tested to evaluate their performance. We posit that each training policy x has a latent population-wide effectiveness fx ∈R and that how well a subject performs on the test is a noisy function of fxs. We are interested in predicting the effectiveness of a policy x′ across a population of students given the observed test scores of S subjects trained under the policies x1:S. Conceptually, this involves first inferring the effectiveness f of policies x1:S from the noisy test data, then interpolating from f to fx′. Using a standard Bayesian nonparametric approach, we place a mean-zero Gaussian Process prior over the function fx. For the finite set of S observations, this corresponds to the multivariate normal distribution f ∼MVN(0, Σ), where Σ is a covariance matrix prescribing how smoothly varying we expect f to be across policies. We use the squared-exponential covariance function, so that Σs,s′ = σ2 exp(−||xs−xs′||2 2ℓ2 ), and σ2 and ℓas free parameters. Having specified a prior over policy effectiveness, we turn to specifying a distribution over observable measures of subject learning conditioned on effectiveness. In this paper, we measure learning by administering a multiple-choice test to each subject s and observing 3 the number of correct responses s made, cs, out of ns questions. We assume the probability that subject s answers any question correctly is a random variable µs whose expected value is related to the policy’s effectiveness via the logistic transform: E [µs] = logistic(o + fxs) where o is a constant. This is consistent with the observation model µs | fxs, o, γ ∼Beta(γ, γe−(o+fxs)) cs | µs ∼Binomial(g + (1 −g)µs; ns) (1) where γ controls inter-subject variability in µs and g is the probability of answering a question correctly by random guessing. In this paper, we assume g = .5. For this special case, the analytic marginalization over µs yields P(cs | fxs, γ, o, g = .5) = 2−ns ns cs  cs X i=0 cs i B(γ + i, ns −cs + γe−(o+fxs)) B(γ, γe−(o+fxs)) (2) where B(a, b) = Γ(a)Γ(b)/Γ(a + b) is the beta function. Parameters θ ≡  γ, o, σ2, ℓ are given vague uniform priors. The effectiveness of a policy x′ is estimated via p(fx′ | c) ≈ 1 M PM m=1 p(fx′ | f (m), θ(m)), where p(fx′ | f (m), θ(m)) is Gaussian with mean and variance determined by the mth sample from the posterior p(f, θ | c). Posterior samples are drawn via elliptical slice sampling, a technique well-suited for models with highly correlated latent Gaussian variables (Murray, Adams, & MacKay, 2010). We have also explored a more general framework that relaxes the relationship between chance-guessing and test performance and allows for multiple policies to be evaluated per subject. With regard to the latter, subjects may undergo multiple randomly ordered blocks of trials where in each block b a subject s is trained under a policy fxbs and then tested. The observation model is altered so that the score in a block is given by cb s ∼Binomial(µb s; nb s) where µb s ≡logistic(o′ + αs + fxbs), the factor αs ∼Normal(0, τ −1 α ) represents the ability of subject s across blocks, and the constant o′ subsumes the role of o and g from the original model. In the spirit of item-response theory (Boeck & Wilson, 2004), the model could be extended further to include factors that represent the difficulty of individual test questions and interactions between subject ability and question difficulty. 2.3 Active selection GP optimization requires a strategy for actively selecting the next experiment. (We refer to this as a ‘strategy’ instead of as a ‘policy’ to avoid confusion with instructional policies.) Many heuristic strategies have been proposed (Forrester & Keane, 2009), including: grid sampling over the policy space; expanding or contracting a trust region; and goal-setting approaches that identify regions of policy space where performance is likely to attain some target level or beat out the current best experiment result. In addition, greedy versus k-step predictive planning has been considered (Osborne, Garnett, & Roberts, 2009). Every strategy faces an exploration/exploitation trade off. Exploration involves searching regions of the function with the maximum uncertainty; exploitation involves concentrating on the regions of the function that currently appear to be most promising. Each has a cost. A focus on exploration rapidly exhausts the subject budget for subjects. A focus on exploitation leads to selection of local optima. The upper-confidence bound (UCB) strategy (Forrester & Keane, 2009; Srinivas, Krause, Kakade, & Seeger, 2010) attempts to avoid these two costs by starting in an exploratory mode and shifting to exploitation. This strategy chooses the most-promising experiment from an upper-confidence bound on the GPR: xt = argmaxx ˆµt−1(x) + ηtˆσt−1(x), where t is a time index, ˆµ and ˆσ are the mean and standard deviation of the GPR, and ηt controls the exploration/exploitation trade off. Large ηt focus on regions with the greatest uncertainty, but as ηt →0, the focus shifts to exploitation in the neighborhood of the current best policy. Annealing ηt as a function of t will yield exploration initially shifting toward exploitation. We adapt the UCB strategy by transforming the UCB based on the GPR to an expression based on the the population accuracy (proportion correct) via xt = argmaxxP( cs ns > νt | fx), where νt is an accuracy level determining the exploration/exploitation trade off. In simulations, we found that setting νt = .999 was effective. Note that in applying the UCB selection 4 (a) (b) (a) (b) 5 10 15 20 25 near far training trial relative distance to category boundary Figure 2: (a) Some objects and their graspability ratings: 1 means not graspable and 5 means highly graspable; choosing the category of training examplars over a sequence of trials; (b) Examples of fading policies drawn from the 1D fading policy space used in our study red line depicts the GP posterior mean, µ(x) for policy x, and the pink shading is ±2σ(x), where σ(x) is the GP posterior standard deviation. GP optimization requires a strategy for selecting the next experiment. (We refer to this as a ’strategy’ instead of a ’policy’ to avoid confusion with instructional policies.) Many heuristic strategies have been proposed (Forrester & Keane, 2009), including: grid sampling over the policy space; expanding or contracting a trust region; and goal-setting approaches that identify regions of policy space where performance is likely to attain some target level or beat out the current best experiment result. In addition, greedy versus k-step predictive planning has been considered (Osborne, Garnett, & Roberts, 2009). Every strategy faces an exploration/exploitation trade off. Exploration involves searching regions of the function with the maximum uncertainty; exploitation involves concentrating on the regions of the function that currently appear to be most promising. Each has a cost. A focus on exploration rapidly exhausts the budget for participants. A focus on exploitation leads to selection of local optima. The upper-confidence bound (UCB) strategy (Forrester & Keane, 2009; Srinivas, Krause, Kakade, & Seeger, 2010) attempts to avoid these two costs by starting in an exploratory mode and shifting to exploitation. This strategy chooses the most-promising experiment from an upper-confidence bound on the function xt = argmaxx µt−1(x) + ηtσt−1(x), where t is an index over time and ηt controls the exploration/exploitation trade off. Large ηt focus on regions with the greatest uncertainty, but as ηt →0, the focus shifts to exploitation in the neighborhood of the current best policy. Annealing ηt as a function of t will yield exploration initially shifting toward exploitation. 3 Experimental task To test our approach to optimization of instructional policies, we use a challenging problem in the domain of concept or category learning. Salmon, McMullen, and Filliter (2010) have obtained rating norms for a set of 320 objects in terms of their graspability, i.e., how manipulable an object is according to how easy it is to grasp and use the object with one hand. They polled 57 individuals, each of whom rated each of the objects multiple times using a 1–5 scale, where 1 means not graspable and 5 means highly graspable. Figure 2a shows several objects and their ratings. We divided the objects into two groups by their mean rating, with the not-glopnor group having ratings in [1, 2.75] and the glopnor group having ratings in [3.25, 5]. (We discarded objects with ratings in [2.75, 3.25]). Our goal was to teach the concept of glopnor, using the following instructions: 4 Figure 2: (a) Experiment 1 training display; (b) Selected Experiment 2 stimuli and their graspability ratings Duration (Log Scale) % Correct (a) 250 500 750 1000 2000 3000 5000 50 60 70 80 90 100 250 500 750 1000 2000 3000 5000 10 20 30 40 50 60 70 80 90 100 Subject Number Estimated Optimal Duration (Log Scale) (b) Figure 3: Experiment 1 results. (a) Posterior density of the PPF with 100 subjects. Light grey squares with error bars indicate the results of a traditional comparison among conditions. (b) Prediction of optimum presentation duration as more subjects are run; dashed line is asymptotic value. strategy, we must search over a set of candidate policies. We applied a fine uniform grid search over policy space to perform this selection. 3 Experiment 1: Optimizing presentation rate de Jonge, Tabbers, Pecher, and Zeelenberg (2012) studied the effect of presentation rate on word-pair learning. During training, each pair was viewed for a total of 16 sec. Viewing was divided into 16/d trials each with a duration of d sec, where d ranged from 1 sec (viewing the pair 16 times) to 16 sec (viewing the pair once). de Jong et al. found that an intermediate duration yielded better cued recall performance both immediately and following a delay. We explored a variant of this experiment in which subjects were asked to learn the favorite sporting team of six individuals. During training, each individual’s face was shown along with their favorite team—either Jets or Sharks (Figure 2a). The training policy specifies the duration d of each face-team pair. Training was over a 30 second period, with a total of 30/d trials and an average of 5/d presentations per face-team pair. Presentation sequences were blocked, where a block consists of all six individuals in random order. Immediately following training, subjects were tested on each of the six faces in random order and were asked to select the corresponding team. The training/testing procedure was repeated for eight rounds each using different faces. In total, each subject responded to 48 faces. The faces were balanced across ethnicity, age, and gender (provided by Minear & Park, 2004). Using Mechanical Turk, we recruited 100 subjects who were paid $0.30 for their participation. The policy space was defined to be in the logarithm of the duration, i.e., d = ex, where x ∈[ln(.25) ln(5)]. The space included only values of x such that 30/d is an integer; i.e., we ensured that no trials were cut short by the 30 second time limit. Subject 1’s training policy, x1, was set to the median of the range of admissable values (857 ms). After each subject t completed the experiment, the PPF posterior was reestimated, and the upper-confidence bound strategy was used to select the policy for subject t + 1, xt+1. Figure 3a shows the PPF posterior based on 100 subjects. (We include a movie showing the evolution of the PPF over subjects in the Supplementary Materials.) The diameter of the grey disks indicate the number of data points observed at that location in the space. The optimum of the PPF mean is at 1.15 sec, at which duration each face-team pair will be shown on expectation 4.33 times during training. Though the result seems intuitive, we’ve polled colleagues, and predictions for the peak ranged from below 1 sec to 2.5 sec. Figure 3b uses the PPF mean to estimate the optimum duration, and this duration is plotted against 5 (b) 5 10 15 20 25 near far training trial relative distance to category boundary Some objects and their graspability ratings: 1 means not graspable and 5 graspable; choosing the category of training examplars over a sequence of mples of fading policies drawn from the 1D fading policy space used in our s the GP posterior mean, µ(x) for policy x, and the pink shading is ±2σ(x), he GP posterior standard deviation. on requires a strategy for selecting the next experiment. (We refer to this instead of a ’policy’ to avoid confusion with instructional policies.) Many gies have been proposed (Forrester & Keane, 2009), including: grid sampling space; expanding or contracting a trust region; and goal-setting approaches egions of policy space where performance is likely to attain some target level current best experiment result. In addition, greedy versus k-step predictive een considered (Osborne, Garnett, & Roberts, 2009). faces an exploration/exploitation trade off. Exploration involves searching unction with the maximum uncertainty; exploitation involves concentrating of the function that currently appear to be most promising. Each has a cost. loration rapidly exhausts the budget for participants. A focus on exploitation on of local optima. fidence bound (UCB) strategy (Forrester & Keane, 2009; Srinivas, Krause, ger, 2010) attempts to avoid these two costs by starting in an exploratory ting to exploitation. This strategy chooses the most-promising experiment confidence bound on the function xt = argmaxx µt−1(x) + ηtσt−1(x), dex over time and ηt controls the exploration/exploitation trade off. Large ηt s with the greatest uncertainty, but as ηt →0, the focus shifts to exploitation rhood of the current best policy. Annealing ηt as a function of t will yield tially shifting toward exploitation. mental task proach to optimization of instructional policies, we use a challenging problem of concept or category learning. Salmon, McMullen, and Filliter (2010) rating norms for a set of 320 objects in terms of their graspability, i.e., how n object is according to how easy it is to grasp and use the object with one olled 57 individuals, each of whom rated each of the objects multiple times ale, where 1 means not graspable and 5 means highly graspable. Figure 2a objects and their ratings. objects into two groups by their mean rating, with the not-glopnor group in [1, 2.75] and the glopnor group having ratings in [3.25, 5]. (We discarded tings in [2.75, 3.25]). Our goal was to teach the concept of glopnor, using nstructions: 4 5 10 15 20 25 0 0.5 1 training trial repetition probability Figure 4: Expt. 2, trial dependent fading and repetition policies (left and right, respectively). Colored lines represent specific policies. the number of subjects. Our procedure yields an estimate for the optimum duration that is quite stable after about 40 subjects. Ideally, one would like to compare the PPF posterior to ground truth. However, obtaining ground truth requires a massive data collection effort. As an alternative, we contrast our result with a more traditional experimental study based on the same number of subjects. We ran 100 additional subjects in a standard experimental design involving evaluation of five alternative policies, d ∈{1, 1.25, 1.667, 2.5, 5}, 20 subjects per policy. (These durations correspond to 1-5 presentations of each face-team pair during training.) The mean score for each policy is plotted in Figure 3a as light grey squares with bars indicating ±2 standard errors of the mean. The result of the traditional experiment is coarsely consistent with the PPF posterior, but the budget of 100 subjects places a limitation on the interpretability of the results. When matched on budget, the optimization procedure appears to produce results that are more interpretable and less sensitive to noise in the data. Note that we have biased this comparison in favor of the traditional design by restricting the exploration of the policy space to the region 1 sec ≤d ≤5 sec. Nonetheless, no clear pattern emerges in the shape of the PPF based on the outcome of the traditional design. 4 Experiment 2: Optimizing training example sequence In Experiment 2, we study concept learning from examples. Subjects are told that martians will teach them the meaning of a martian adjective, glopnor, by presenting a series of example objects, some of which have the property glopnor and others do not. During a training phase, objects are presented one at a time and subjects must classify the object as glopnor or not-glopnor. They then receive feedback as to the correctness of their response. On each trial, the object from the previous trial is shown in the corner of the display along with its correct classification, the reason for which is to facilitate comparison and contrasting of objects. Following 25 training trials, 24 test trials are administered in which the subject makes a classification but receives no feedback. The training and test trials are roughly balanced in number of positive and negative examples. The stimuli in this experiment are drawn from a set of 320 objects normed by Salmon, McMullen, and Filliter (2010) for graspability, i.e., how manipulable an object is according to how easy it is to grasp and use the object with one hand. They polled 57 individuals, each of whom rated each of the objects multiple times using a 1–5 scale, where 1 means not graspable and 5 means highly graspable. Figure 2b shows several objects and their ratings. We divided the objects into two groups by their mean rating, with the notglopnor group having ratings in [1, 2.75] and the glopnor group having ratings in [3.25, 5]. (We discarded objects with ratings in [2.75, 3.25] because they are too difficult even if one knows the concept). The classification task is easy if one knows that the concept is graspability. However, the challenge of inferring the concept is extremely difficult because there are many dimensions along which these objects vary and any one—or more—could be the classification dimension(s). We defined an instructional policy space characterized by two dimensions: fading and blocking. Fading refers to the notion from the animal learning literature that learning is facilitated by presenting exemplars far from the category boundary initially, and gradually transitioning toward more difficult exemplars over time. Exemplars far from the boundary may help individuals to attend to the dimension of interest; exemplars near the boundary may help individuals determine where the boundary lies (Pashler & Mozer, in press). Theorists have 6 also made computational arguments for the benefit of fading (Bengio, Louradour, Collobert, & Weston, 2009; Khan et al., 2011). Blocking refers to the issue discussed in the Introduction concerning the sequence of category labels: Should training exemplars be blocked or interleaved? That is, should the category label on one trial tend to be the same as or different than the label on the previous trial? For fading, we considered a family of trial-dependent functions that specify the distance of the chosen exemplar to the category boundary (left panel of Figure 4). This family is parameterized by a single policy variable x2, 0 ≤x2 ≤1 that relates to the distance of an exemplar to the category boundary, d, as follows: d(t, x2) = min(1, 2x2)−(1−|2x2−1|) t−1 T −1, where T is the total number of training trials and t is the current trial. For blocking, we also considered a family of trial-dependent functions that vary the probability of a category label repetition over trials (right panel of Figure 4). This family is parameterized by the policy variable x1, 0 ≤x1 ≤1, that relates to the probability of repeating the category label of the previous trial, r, as follows: r(t, x1) = x1 + (1 −2x1) t−1 T −1. Figure 5a provides a visualization of sample training trial sequences for different points in the 2D policy space. Each graph represents an instance of a specific (probabilistic) policy. The abscissa of each graph is an index over the 25 training trials; the ordinate represents the category label and its distance from the category boundary. Policies in the top and bottom rows show sequences of all-easy and all-hard examples, respectively; intermediate rows achieve fading in various forms. Policies in the leftmost column begin training with many repetitions and end training with many alternations; policies in the rightmost column begin with alternations and end with repetitions; policies in the middle column have a time-invariant repetition probability of 0.5. Regardless of the training sequence, the set of test objects was the same for all subjects. The test objects spanned the spectrum of distances from the category boundary. During test, subjects were required to make a forced choice glopnor/not-glopnor judgment. We seeded the optimization process by running 10 subjects in each of four corners of policy space as well as in the center point of the space. We then ran 150 additional subjects using GP-based optimization. Figure 5 shows the PPF posterior mean over the 2D policy space, along with the selection in policy space of the 200 subjects. Contour map colors indicate the expected accuracy of the corresponding policy (in contrast to the earlier colored graphs in which the coloring indicates the cdf). The optimal policy is located at x∗= (1, .66). To validate the outcome of this exploration, we ran 50 subjects at x∗as well as policies in the upper corners and the center of Figure 5. Consistent with the prediction of the PPF posterior, mean accuracy at x∗is 68.6%, compared to 60.9% for (0, 1), 65.7% for (1, 0), and 66.6% for (.5, .5). Unfortunately, only one of the paired comparisons was statistically reliable by a two-tailed Bonferroni corrected t-test: (0, 1) versus x∗(p = .027). However, post-hoc power computation revealed that with 50 subjects and the variability inherent in the data, the odds of observing a reliable 2% difference in the mean is only .10. Running an additional 50 subjects would raise the power to only .17. Thus, although we did not observe a statistically significant improvement at the inferred optimum compared to sensible alternative policies, the results are consistent with our inferred optimum being an improvement over the type of policies one might have proposed a priori. 5 Discussion The traditional experimental paradigm in psychology involves comparing a few alternative conditions by testing a large number of subjects in each condition. We’ve described a novel paradigm in which a large number of conditions are evaluated, each with only one or a few subjects. Our approach achieves an understanding of the functional relationship between conditions and performance, and it lends itself to discovering the conditions that attain optimal performance. We’ve focused on the problem of optimizing instruction, but the method described here has broad applicability across issues in the behavioral sciences. For example, one might attempt to maximize a worker’s motivation by manipulating rewards, task difficulty, or time pressure. 7 − + − + − + − + − + − + − + − + − + − + − + Fading Policy − + − + − + − + − + − + − + − + − + − + − + − + Blocking Policy − + − + Blocking Policy Fading Policy Repetition/Alternation Policy Fading Policy 56% 58% 60% 62% 64% 66% Figure 5: Experiment 2 (a) policy space and (b) policy performance function at 200 subjects Motivation might be studied in an experimental context with voluntary time on task as a measure of intrinsic interest level. Consider problems in a quite different domain, human vision. Optimization approaches might be used to determine optimal color combinations in a manner more efficient and feasible than exhaustive search (Schloss & Palmer, 2011). Also in the vision domain, one might search for optimal sequences and parameterizations of image transformations that would support complex visual tasks performed by experts (e.g., x-ray mammography screening) or ordinary visual tasks performed by the visually impaired. From a more applied angle, A-B testing has become an extremely popular technique for fine tuning web site layout, marketing, and sales (Christian, 2012). With a large web population, two competing alternatives can quickly be evaluated. Our approach offers a more systematic alternative in which a space of alternatives can be explored efficiently, leading to discovery of solutions that might not have been conceived of as candidates a priori. The present work did not address individual differences or high-dimensional policy spaces, but our framework can readily be extended. Individual differences can be accommodated via policies that are parameterized by individual variables (e.g., age, education level, performance on related tasks, recent performance on the present task). For example, one might adopt a fading policy in which the rate of fading depends in a parametric manner on a running average of performance. High dimensional spaces are in principle no challenge for GPR given a sensible distance metric. The challenge of high-dimensional spaces comes primarily from computational overhead in selecting the next policy to evaluate. However, this computational burden can be greatly relaxed by switching from a global optimization perspective to a local perspective: instead of considering candidate policies in the entire space, active selection might consider only policies in the neighborhood of previously explored policies. Acknowledgments This research was supported by NSF grants BCS-0339103 and BCS-720375 and by an NSF Graduate Research Fellowship to R. L. We thank Ron Kneusel and Ali Alzabarah for their invaluable assistance with IT support, and Ponesadat Mortazavi, Vanja Dukic, and Rosie Cowell for helpful discussions and advice on this work. References Anderson, E. J., & Ferris, M. C. (2001). A direct search algorithm for optimization with noisy function evaluations. SIAM Journal of Optimization, 11, 837–857. 8 Anderson, J. R., Conrad, F. G., & Corbett, A. T. (1989). Skill acquisition and the LISP tutor. Cognitive Science, 13, 467–506. Bengio, Y., Louradour, J., Collobert, R., & Weston, J. (2009, June). Curriculum learning. In L. Bottou & M. Littman (Eds.), Proceedings of the 26th international conference on machine learning (pp. 41–48). Montreal: Omnipress. Boeck, P. D., & Wilson, M. (2004). Explanatory item response models. a generalized linear and nonlinear approach. New York: Springer. Carvalho, P. F., & Goldstone, R. L. (2011, November). Stimulus similarity relations modulate benefits for blocking versus interleaving during category learning. (Presentation at the 52nd Annual Meeting of the Psychonomics Society, Seattle, WA) Chi, M., VanLehn, K., Litman, D., & Jordan, P. (2011). Empirically evaluating the application of reinforcement learning to the induction of effective and adaptive pedagogical strategies. User Modeling and User-Adapted Interaction. Special Issue on Data Mining for Personalized Educational Systems, 21, 137–180. Christian, B. (2012). The A/B test: Inside the technology that’s changing the rules of business. Wired, 20(4). de Jonge, M., Tabbers, H. K., Pecher, D., & Zeelenberg, R. (2012). The effect of study time distribution on learning and retention: A goldilocks principle for presentation rate. J. Exp. Psych.: Learning, Mem., & Cog., 38, 405–412. Forrester, A. I. J., & Keane, A. J. (2009). Recent advances in surrogate-based optimization. Progress in Aerospace Sciences, 45, 50–79. Goldstone, R. L., & Steyvers, M. (2001). The sensitization and differentiation of dimensions during category learning. Journal of Experimental Psychology: General, 130, 116–139. Kang, S. H. K., & Pashler, H. (2011). Learning painting styles: Spacing is advantageous when it promotes discriminative contrast. Applied Cognitive Psychology, 26, 97–103. Khan, F., Zhu, X. J., & Mutlu, B. (2011). How do humans teach: On curriculum learning and teaching dimension. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. Pereira, & K. Weinberger (Eds.), Adv. in NIPS 24 (pp. 1449–1457). La Jolla, CA: NIPS Found. Koedinger, K. R., & Corbett, A. T. (2006). Cognitive tutors: Technology bringing learning science to the classroom. In K. Sawyer (Ed.), The cambridge handbook of the learning sciences (pp. 61–78). Cambridge UK: Cambridge University Press. Kornell, N., & Bjork, R. A. (2008). Learning concepts and categories: Is spacing the enemy of induction? Psychological Science, 19, 585–592. Martin, J., & VanLehn, K. (1995). Student assessment using bayesian nets. International Journal of Human-Computer Studies, 42, 575–591. Minear, M., & Park, D. C. (2004). A lifespan database of adult facial stimuli. Behavior Research Methods, Instruments, and Computers, 36, 630–633. Murray, I., Adams, R. P., & MacKay, D. J. (2010). Elliptical slice sampling. J. of Machine Learn. Res., 9, 541–548. Osborne, M. A., Garnett, R., & Roberts, S. J. (2009, January). Gaussian processes for global optimization. In 3d intl. conf. on learning and intell. opt. Trento, Italy. Pashler, H., & Mozer, M. C. (in press). Enhancing perceptual category learning through fading: When does it help? J. of Exptl. Psych.: Learning, Mem., & Cog.. Rafferty, A. N., Brunskill, E. B., Griffiths, T. L., & Shafto, P. (2011). Faster teaching by POMDP planning. In Proc. of the 15th intl. conf. on AI in education. Sacks, J., Welch, W. J., Mitchell, T. J., & Wynn, H. P. (1989). Design and analysis of computer experiments. Statistical Science, 4, 409–435. Salmon, J. P., McMullen, P. A., & Filliter, J. H. (2010). Norms for two types of manipulability (graspability and functional usage), familiarity, and age of acquisition for 320 photographs of objects. Behavioral Research Methods, 42, 82–95. Schloss, K. B., & Palmer, S. E. (2011). Aesthetic response to color combinations: preference, harmony, and similarity. Attention, Perception, & Psychophysics, 73, 551–571. Srinivas, N., Krause, A., Kakade, S., & Seeger, M. (2010). Gaussian process optimization in the bandit setting: No regret and experimental design. In Proceedings of the 27th international conference on machine learning. Haifa, Israel. Whitehill, J., & Movellan, J. R. (2010). Optimal teaching machines (Tech. Rep.). La Jolla, CA: Department of Computer Science, UCSD. 9
2013
218
4,952
Adaptive Market Making via Online Learning Jacob Abernethy⇤ Computer Science and Engineering University of Michigan jabernet@umich.edu Satyen Kale IBM T. J. Watson Research Center sckale@us.ibm.com Abstract We consider the design of strategies for market making in an exchange. A market maker generally seeks to profit from the difference between the buy and sell price of an asset, yet the market maker also takes exposure risk in the event of large price movements. Profit guarantees for market making strategies have typically required certain stochastic assumptions on the price fluctuations of the asset in question; for example, assuming a model in which the price process is mean reverting. We propose a class of “spread-based” market making strategies whose performance can be controlled even under worst-case (adversarial) settings. We prove structural properties of these strategies which allows us to design a master algorithm which obtains low regret relative to the best such strategy in hindsight. We run a set of experiments showing favorable performance on recent real-world stock price data. 1 Introduction When a trader enters a market, say a stock or commodity market, with the desire to buy or sell a certain quantity of an asset, how is this trader guaranteed to find a counterparty to agree to transact at a reasonable price? This is not a problem in a liquid market, with a deep pool of traders ready to buy or sell at any time, but in a thin market the lack of counterparties can be troublesome. A rushed trader may even be willing to transact at a worse price in exchange for immediate execution. This is where a market maker (MM) can be quite useful. A MM is any agent that participates in a market by offering to both buy and sell the underlying asset at any time. To put it simply, a MM consistently guarantees liquidity to the marketplace by promising to be a counterparty to any trader. The act of market making has both potential benefits and risks. For one, the MM bears the risk of transacting with better-informed traders that may know much more about the movement of the asset’s price, and in such scenarios the MM can take on a large inventory of shares that it may have to offload at a worse price. On the positive side, the MM can profit as a result of the bid-ask spread, the difference between the MM’s buy price and sell price. In other words, if the MM buys 100 shares of a stock from one trader at a price of p, and then immediately sells 100 shares of stock to another trader at a price of p + ∆, the MM records a profit of 100∆. This describes the central goal of a profitable market making strategy: minimize the inventory risk of large movements in the price while simultaneously aiming to benefit from the bid-ask spread. The MM strategy has a state, which is the current inventory or holdings, receives as input order and price data, and must decide what quantities and at what prices to offer in the market. In the present paper we assume that the MM interacts with a continuous double auction via an order book, and the MM can place both market and limit orders to the order book. A number of MM strategies have been proposed, and in many cases certain profit/loss guarantees have been given. But to the best of our knowledge all such guarantees (aside from [4]) have required ⇤Work performed while the author was in the CIS Department at the University of Pennsylvania and funded by a Simons Postdoctoral Fellowship 1 stochastic assumptions on the traders or the sequence of price fluctuations. Often, e.g., one needs to assume that the underlying price process exhibits a mean reverting behavior to guarantee profit. In this paper we focus on constructing MM strategies that achieve non-stochastic guarantees on profit and loss. We begin by proposing a class of market making strategies, parameterized by the choice of bid-ask spread and liquidity, and we establish a data-dependent expression for the profit and loss of each strategy at the end of a sequence of price fluctuations. The model we consider, as well as the aforementioned class of strategies, builds off of the work of Chakraborty and Kearns [4]. In particular, we assume the MM is given an exogenously-specified price time series that is revealed online. We also assume that the MM is able to make and cancel orders after every price fluctuation. We extend the prior work [4] by considering the problem of online learning among this parameterized class of strategies. Performance is measured in terms of regret, which is the difference between the total value of the learner’s algorithm and that of the best strategy in hindsight. While this problem is related to the problem of learning from expert advice, standard algorithms assume that the experts have no state; i.e. in each round, the cost of following any given expert’s advice is the same as the cost to that expert. This is not the case for online learning of the bid-ask spread, where the state, represented by the inventory of each strategy, affects the payoffs. We can prove however that due to the combinatorial structure of these strategies, one can afford to switch state with bounded cost. Using these structural properties we prove the following main result of this paper: Theorem 1 There is an online learning algorithm, that, under a bounded price volatility assumption (see Defintion 1) has O( p T) regret after T trading periods to the best spread-based strategy. Experimental simulations of our online learning algorithms with real-world price data suggest that this approach is quite promising; our algorithm frequently performs nearly as well as the best strategy, and is often superior. Such empirical results provides some evidence that regret minimization techniques are well-suited for adaptively setting the bid-ask spread. Related Work Perhaps the most popular model to study market making has been the GlostenMilgrom model [11]. In this setting the market is facilitated by a specialist, a monopolistic market maker that acts as the middle man for all trades. There has been some work in the Computer Science literature that has considered the sequential decision problem of the specialist [8, 10], and this work was extended to look at the more modern order book mechanism [9]. In our model traders interact directly with an order book, not via a specialist, and the prices are set exogenously as in [4]. Over the past ten years that has been a burst of research within the AI and EconCS community on the design of prediction markets in which traders can bet on the likelihood of future uncertain events (like horse races, or elections). Much of this started with a couple of key results of Robin Hanson [12, 13] who described how to design subsidized prediction markets via the use of proper scoring rules. The key technique was a method to design an automated market maker, and there has been much work on facilitating this using mechanisms based on shares (i.e. Arrow-Debreu securities). There is a medium-sized literature on this topic by now [6, 5, 1, 2] and we mention only a selection. The key difference between the present paper and the work on designing prediction markets is that our techniques are solely focused on profit and risk, and not on other issues like price discovery or information aggregation. Recent work by Della Penna and Reid [19] considered market making as a the multi-armed bandit problem, and this is a notable exception where profit was the focus. This “non-stochastic” approach we take to the market making problem echos many of the ideas of Cover’s results on Universal Portfolio algorithms [20], an area that has received much followup work [16, 15, 14, 3, 7] given its robustness to adversarially-chosen price fluctuations. But these algorithms are of the “market taking” variety, that is they actively rebalance their portfolio on a daily basis. Moreover, the goal of the Universal Portfolio is to get low regret with respect to the best fixed mixture of investments, rather than the best bid-ask spread which is aim of the present work. 2 The Market Execution Framework We now present our market model formally. We will consider the buying and selling of a single security, say the stock of Microsoft, over the course of some time interval. We assume that all events in the market take place at discrete points in time throughout this day. At each time period t a 2 market price pt is announced to the world. In a typical stock exchange this price will be rounded to a discrete value; historically stock prices were quoted in 1 8’s of a dollar, although now they are quoted in pennies. We let δ be the discretization parameter of the exchange, and for simplicity assume δ = 1/m for some positive integer m. Now let ⇧be the set of discrete prices within some feasible range, ⇧:= {δ, 2δ, 3δ, . . . , ( M δ −1)δ, M}, where M is some reasonable bound on the largest price. A trading strategy maintains two state variables at the beginning of every time period t: (a) the holdings or inventory Ht 2 R, representing the amount of stock that the strategy is long or short at the beginning of time period t (Ht will be negative if the strategy is short); (b) the cash Ct 2 R of the strategy, representing the money earned or lost by the investor at that time. Initially we have C1 = H1 = 0. Note that when Ct < 0 this is not necessarily bad, it simply means the investor has borrowed money to purchase holdings, often referred to as “trading on margin”. Let us now consider the trading mechanism at time t. For simplicity we assume there are two types of trades that can be executed, and each will change the cash and holdings at the following time period. By default, set Ht+1 Ht and Ct+1 Ct. Then the trading strategy can execute any subset of the following two actions: • Market Order: At time t the posted price is pt and the trader executes a trade of X shares, with X 2 R. In this case we update the cash as Ct+1 Ct+1 −ptX and Ht+1 Ht+1 + X. Note that if X < 0 then this is a short sale in which case the trader’s cash increases1 • Limit Order: Before time period t, the trader submits a demand schedule Lt : ⇧! R+, where it is assumed that Lt(pt−1) = 0. For every price p 2 ⇧with p < pt−1, the value Lt(p) is the number of shares the trader would like to buy at a price of p. For every p > pt−1 the value Lt(p) is the number of shares the trader would like to sell at a price of p. One should interpret a limit order in terms of “posting shares to the order book”: these shares are up for sale (and/or purchase) but the order will only be executed if the price moves. In round t the posted price becomes pt and it is assumed that all shares offered at any price between pt−1 and pt are transacted. More specifically, we have two cases: – If pt > pt−1 then for each p 2 ⇧with pt−1 < p pt we update Ct+1 Ct+1 + pLt(p) and Ht+1 Ht+1 −Lt(p); – Else if pt < pt−1 then for each p 2 ⇧with pt p < pt−1 we update Ct+1 Ct+1 −pLt(p) and Ht+1 Ht+1 + Lt(p). It is worth noting market orders are quite different from limit orders. A limit order is a passive action in the market, the trader simply states that he would be willing to trade a number of shares at a range of different prices. But if the market does not move then no transactions occur. The market order is a much more direct action to take, the transaction is guaranteed to execute at the current market price. The market order has the downside that the trader does not get to specify the price at which he would like to trade, contrary to the limit order. Roughly speaking, an MM strategy will generally interact with the market via limit orders, since the MM is simply hoping to profit from liquidity provision. But the MM may at times have to place market orders to balance inventory to control risk. We include one more piece of notation, the value of the strategy’s portfolio Vt+1 at the end of time period t, which can be defined explicitly in terms of the cash, holdings, and current market price: Vt+1 := Ct+1 + ptHt+1. In other words, Vt+1 is the amount of cash the strategy would have if it liquidated all holdings at the current market price. Assumptions of our model. In the described framework we make several simplifying assumptions on the trading execution mechanism, which we note here. (1) The trader pays neither transaction fees nor borrowing costs when his cash balance is negative. (2) Market orders are executed at exactly the posted market price, without “slippage” of any kind. This suggests that the market is very liquid relative to the actions of the MM. (3) The market allows the buying and selling of fractional shares. 1Technically speaking, a brokerage firm won’t give the short-seller the cash to spend since this money will be used to backup losses when the short position is closed. But for the purpose of accounting it is perfectly reasonably to record cash in this way, assuming that the strategy ends up holdings at 0. 3 (4) The price sequence is “exogenously” determined, meaning that the trades we make do not affect the current and future prices. This assumption has been made in previous results [4] and it is perhaps quite strong, especially if the MM is providing the bulk of the liquidity. We leave it for future work to consider the setting with a non-exogenous price process. (5) Unexecuted limited orders are cancelled before the next period. That is, for any p not lying between pt−1 to pt it is assumed that the Lt(p) untransacted shares at price p are removed from the order book. This is just notational convenience: the MM can resubmit these shares via Lt+1. 3 Spread-based Strategies In this section we present a class of simple market making strategies which we refer to as spreadbased strategies since they maintain a fixed bid-ask spread throughout. We then prove some structural properties on this class of strategies. We only give proof sketches for lack of space; all proofs can be found in an appendix in the supplementary material. 3.1 Spread-based strategies. We consider market making strategies parameterized by a window size b 2 {δ, 2δ, . . . , B}, where B is a multiple of δ. Before round t, the strategy S(b) selects a window of size b, viz. [at, at + b], starting with a1 = p1. For some fixed liquidity density parameter ↵, it submits a buy order of ↵ shares at every price p 2 ⇧such that p < at and a sell order ↵shares at every price p 2 ⇧such that p > at + b. Depending on the price in the trading period pt, the strategy adjusts the next window by the smallest amount necessary to include pt. Algorithm 1 Spread-Based Strategy S(b) 1: Receive parameters b > 0, liquidity density ↵> 0, inital price p1 as input. Initialize a1 := p1. 2: for t = 1, 2, . . . , T do 3: Observe market price pt 4: If pt < at then at+1 pt 5: Else If pt > at + b then at+1 pt −b 6: Else at+1 at 7: Submit limit order Lt+1: Lt+1(p) = 0 if p 2 [at+1, at+1 + b], else Lt+1(p) = ↵. 8: end for The intuition behind a spread-based strategy is that the MM waits for the price to deviate in such a way that it leaves the window [at, at + b]. Let’s say the price suddenly drops below at and we get pt = at−kδ for some positive integer k such that kδ < b. As soon as this happens some transactions occur and the MM now has holdings of k↵shares. That is, the MM will have purchased ↵shares at each of the prices at −δ, at −2δ, . . . , at −kδ. On the following round the MM updates his limit order Lt+1 to offer to sell ↵shares at each of the price levels at +b−(k −1)δ, at +b−(k −2)δ, . . .. This gives a natural matching between shares that were bought and shares that are offered for sale, with the sale price being exactly b higher than the purchased price. If, at a later time t0 > t, the price rises so that pt0 ≥at + b + δ then all shares bought previously are sold at a profit of kb↵. We now give a very useful lemma, that essentially shows that we can calculate the profit and loss of a spread-based strategy on two factors: (a) how much the spread window moves throughout the trading period, and (b) how far away the final price is from the initial price. A sketch of the proof is provided, but the complete version is in the Appendix. Lemma 1 The value of the portfolio of S(b) at time T can be bounded as VT +1 ≥ ↵ δ T X t=1 b 2|at+1 −at| −(|aT +1 −a1| + b)2 ! PROOF:[Sketch] The proof of this lemma is quite similar to the proof of Theorem 2.1 in [4]. The main idea is given in the intuitive explanation above: we can match pairs of shares that are bought 4 and sold at prices that are b apart, thus registering a profit of b for each such pair. We can relate these matched pairs to the at’s, and the unmatched stock transactions to the difference |aT +1 −a1|, yielding the stated bound. 2 In other words, the risk taken by all strategies is roughly the same ( 1 2|pT +1 −p1|2 up to an additive constant in the quadratic term). But the revenue of the spread-based strategy scales with two quantities: the size of the window b but also the total movement of the window. This raises an interesting tradeoff in setting the b parameter, since we would like to make as much as possible on the movement of the window, but by increasing b the window will get “pushed around” a lot less by the fluctuating price. We now make some convenient normalization. Since for every unit price change, the strategies trade ↵/δ shares, in the rest of the paper, without loss of generality, we may assume that ↵= 1 and δ = 1 (by appropriately changing the unit of currency). The regret bounds for general ↵and δ scale up by a factor of ↵ δ . 3.2 Structural properties of spread-based strategies. It is useful to prove certain properties about the proposed spread-based strategies. Lemma 2 Consider any two strategies S(b) and S(b0) with b0 < b. Let [a0 t, a0 t + b0] and [at, at + b] denote the intervals chosen by S(b) and S(b0) at time t respectively. Then for all t, we have [a0 t, a0 t + b0] ⇢[at, at + b]. PROOF:[Sketch] This is easy to prove by induction on t, via a simple case analysis on where pt lies in relation to the windows [a0 t, a0 t + b0] and [at, at + b]. 2 Lemma 3 For any strategy S(b), its inventory at time t, Ht, equals a1 −at. PROOF:[Sketch] Again using case analysis on where pt lies in relation to the window [at, at + b], we can show that Ht + at is an invariant. Thus, Ht + at = H1 + a1 = a1, and hence Ht = a1 −at. 2 The following corollary follows easily: Corollary 1 For any round t, consider any two strategies S(b) and S(b0) with b0 < b, with inventories Ht and H0 t respectively. Then |Ht −H0 t| b −b0. PROOF: By Lemma 3 we have |Ht−H0 t| = |a1−a0 1+a0 t−at| b−b0, since [a0 1, a0 1+b0] ⇢[a1, a1+b] and by Lemma 2 [a0 t, a0 t + b0] ⇢[at, at + b]. 2 Definition 1 (∆-bounded volatility) A price sequence p1, p2, . . . , pT is said to have ∆-bounded volatility if for all t ≥2, we have |pt −pt−1| ∆. We assume from now that the price sequence has ∆-bounded volatility. Suppose now that we have a set B of N window sizes b, all bounded by B. In the rest of the paper, all vectors are in RN with coordinates indexed by b 2 B. For every b 2 B, at the end of time period t, let its inventory be Ht+1(b), cash value be Ct+1(b), and total value be Vt+1(b). These quantities define the vectors Ht+1, Ct+1 and Vt+1. The following lemma shows that the change in the total value of different strategies in any round is similar. Lemma 4 Define G = 2∆B + ∆2. In round t, H = minb2B{Ht(b)}. Then for any strategy S(b), we have |(Vt+1(b) −Vt(b)) −(H(pt −pt−1))| G. Thus, for any two window sizes b and b0, we have |(Vt+1(b) −Vt(b)) −(Vt+1(b0) −Vt(b0))| 2G. PROOF:[Sketch] Since |pt −pt−1| ∆, each strategy trades at most ∆shares, at prices between pt−1 and pt. Next, by Corollary 1, for any strategy |Ht(b) −H| B. Using these bounds, and the definitions of the total value, some calculations give the stated bounds. 2 5 4 A low regret meta-algorithm Recall that we have a set B of N window sizes b, all bounded by B. We want to design a low-regret algorithm that achieves almost as much payoff as that of the best strategy S(b) for b 2 B. Consider the following meta-algorithm. Treat every strategy S(b) as an expert and run a regret minimizing algorithm for learning with expert advice (such as Multiplicative Weights [18] or FollowThe-Perturbed-Leader [17]). The distributions generated by the regret minimizing algorithm are treated as mixing weights for the different strategies, essentially executing each strategy scaled by its current weight. In each round, the meta-algorithm restores the inventory of each strategy to the correct state by additionally buying or selling enough shares so that its inventory is exactly what it would have been had it run the different strategies with their present weights throughout. The specific algorithm is given below. Algorithm 2 Low regret meta-algorithm 1: Run every strategy S(b) in parallel so that at the end of each time period t, all trades made by the strategies and the vectors Ht+1, Ct+1 and Vt+1 2 RN can be computed. 2: Start a regret-minimizing algorithm A for learning from expert advice with one expert corresponding to each strategy S(b) for b 2 B. Let the distribution over strategies generated by A at time t be wt. 3: for t = 1, 2, . . . , T do 4: Execute any market orders from the previous period at the current market price pt so that the inventory now equals Ht · wt. The cash value changes by −(Ht · (wt −wt−1))pt. 5: Execute any limit orders from the previous period: a wt weighted combination of the limit orders of the strategies S(b). The holdings change to Ht+1 · wt, and the cash value changes by (Ct+1 −Ct) · wt. 6: For each strategy S(b) for b 2 B, set its payoff in round t to be Vt+1(b) −Vt(b) and send these payoffs to A. 7: Obtain the updated distribution wt+1 from A. 8: Place a market order to buy Ht+1·(wt+1−wt) shares in the next period, and a wt+1 weighted combination of the limit orders of the strategies S(b). 9: end for We now prove the following bound on the regret of the algorithm based on the regret of the underlying algorithm A. Recall from Lemma 4 the definition of G := 2∆B + ∆2. Theorem 2 Assume that the price sequence has ∆-bounded volatity. The regret of the metaalgorithm is bounded by Regret(A) + G 2 T X t=1 kwt −wt+1k1. PROOF: The regret bound for A implies that PT t=1(Vt+1 −Vt)·wt ≥maxb2B VT (b)−Regret(A). Lemma 5 shows that the final total value of the meta-algorithm is at least PT t=1(Vt+1 −Vt) · wt − G 2 PT t=1 kwt −wt+1k1. Thus, the regret of the algorithm is bounded as stated. 2 Lemma 5 In round t, the change in total value of the meta-algorithm equals (Vt+1 −Vt) · wt + Ht · (wt −wt−1)(pt−1 −pt). Furthermore, |Ht · (wt −wt−1)(pt−1 −pt)|  G 2 kwt −wt+1k1. PROOF:[Sketch] The expression for the change in the total value of the meta-algorithm is a simple calculation using the definitions. The second bound is obtained by noting that all the Ht(b)’s are within B of each other by Corollary 1, and thus |Ht · (wt −wt−1)| Bkwt −wt−1k1, and |pt−1 −pt| ∆by the bounded volatility assumption. 2 6 4.1 A low regret algorithm based on Mutiplicative Weights Now we give a low regret algorithm based on the classic Multiplicative Weights (MW) algorithm [18]. Call this algorithm MMMW (Market Making using Multiplicative Weights). The algorithm takes parameters ⌘t, for t = 1, 2, . . . , T. It starts by initializing weights w1(b) = 1/N for every b 2 B. In round t, the algorithm updates the weights using the rule wt+1(b) := wt(b) exp(⌘t(Vt+1(b) −Vt(b)))/Zt, for every b 2 B, where Zt is the normalization constant to make wt+1 a distribution. Using Theorem 2, we can give the following bound on the regret of MMMW: Theorem 3 Suppose we set ⌘t = 1 2G min ⇢q log(N) t , 1 # , for t = 1, 2, . . . , T. Then MMMW has regret bounded by 13G p log(N)T. PROOF:[Sketch] By Theorem 2, we need to bound kwt+1 −wtk1. The multiplicative update rule, wt+1(b) = wt(b) exp(⌘t(Vt+1(b) −Vt(b)))/Zt, and the fact that by Lemma 4, the range of the entries of Vt+1 −Vt is bounded by 2G implies that kwt+1 −wtk1 4⌘tG. Standard analysis for the regret of the MW algorithm then gives the stated regret bound for MMMW. 2 4.2 A low regret algorithm based on Follow-The-Perturbed-Leader Now we give a low regret algorithm based on the Follow-The-Perturbed-Leader (FPL) algorithm [17]. Call this algorithm MMFPL (Market Making using Follow-The-Perturbed-Leader). We actually use a deterministic version of the algorithm which has the same regret bound. The algorithm requires a parameter ⌘. For every b 2 B, let p(b) be a sample from the exponential distribution with mean 1/⌘. The distribution wt is then set to be the distribution of the “perturbed leader”, i.e. wt(b) = Pr p [Vt(b) + p(b) ≥Vt(b0) + p(b0) 8 b0 2 B]. Using Theorem 2, we can give the following bound on the regret of MMFPL: Theorem 4 Choose ⌘= 1 2G q log(N) T . Then the regret of MMFPL is bounded by 7G p log(N)T. PROOF:[Sketch] Again we need to bound kwt+1 −wtk1. Kalai and Vempala [17] show that in the randomized FPL algorithm, probability that the leader changes from round t to t + 1 is bounded by 2⌘G. This implies that kwt+1 −wtk1 4⌘G. Standard analysis for the regret of the FPL algorithm then gives the stated regret bound for MMFPL. 2 5 Experiments We conducted experiments with stock price data obtained from http://www.netfonds.no/. We downloaded data for the following stocks: MSFT, HPQ and WMT. The data consists of trades made throughout a given date in chronological order. We obtained data for these stocks for each of the 5 days in the range May 6-10, 2013. The number of trades ranged from roughly 7,000 to 38,000. The quoted prices are rounded to the nearest cent. Our spread-based strategies operate at the level of a cent: i.e. the windows are specified in terms of cents, and the buy/sell orders are set to 1 share per cent outside the window. The class of spread-based strategies we used in our experiments correspond to the following set of window sizes, quoted in cents: B = {1, 2, 3, 4, 5, 10, 20, 40, 80, 100}, so that N = 10 and B = 100. We implemented MMMW, MMFPL, simple Follow-The-Leader2 (FTL), and simple uniform averaging over all strategies. We compared their performance to the best strategy in hindsight. For MMFPL, wt was approximated by averaging 100 independently drawn initial perturbations. 2This algorithm simply chooses the best strategy in each round based on past performance without perturbations. 7 Symbol Date T Best MMMW MMFPL FTL Uniform HPQ 05/06/2013 7128 668.00 370.07 433.99 638.00 301.10 HPQ 05/07/2013 13194 558.00 620.18 -41.54 19.00 100.80 HPQ 05/08/2013 12016 186.00 340.11 -568.04 -242.00 -719.80 HPQ 05/09/2013 14804 1058.00 890.99 327.05 214.00 591.40 HPQ 05/10/2013 14005 512.00 638.53 -446.42 -554.00 345.60 MSFT 05/06/2013 29481 1072.00 1062.65 -1547.01 -1300.00 542.60 MSFT 05/07/2013 34017 1260.00 1157.38 1048.46 1247.00 63.80 MSFT 05/08/2013 38664 2074.00 2064.83 1669.30 2074.00 939.10 MSFT 05/09/2013 34386 1813.00 1802.91 1534.68 1811.00 656.10 MSFT 05/10/2013 27641 1236.00 1250.27 556.08 590.00 750.90 WMT 05/06/2013 8887 929.00 694.48 760.70 785.00 235.20 WMT 05/07/2013 11309 1333.00 579.88 995.43 918.00 535.40 WMT 05/08/2013 12966 1372.00 1300.47 832.80 974.00 926.40 WMT 05/09/2013 10431 2415.00 2329.78 1882.90 1991.00 1654.10 WMT 05/10/2013 9567 1150.00 1001.31 7.03 209.00 707.70 Table 1: Final performance of various algorithms in cents. Bolded values indicate best performance. Italicized values indicate runs where the MMMW algorithm beat the best in hindsight. Figure 1: Performance of various algorithms and strategies for HPQ on May 8 and 9, 2013. For clarity, the total value every 100 periods is shown. Top row: On May 8, MMMW outperforms the best strategy, and on May 9 the reverse happens. Bottom row: performance of different strategies. On May 8, b = 100 performs best, while on May 9, b = 40 performs best. Experimentally, having slightly larger learning rates seemed to help. For MMMW, we used the specification ⌘t = min ⇢q log(N) t , 1 Gt # , where Gt = max⌧t,b,b02B |V⌧(b) −V⌧(b0)|, and for MMFPL, we used the specification ⌘= q log(N) T . These specifications ensures that the theory goes through and the regret is bounded by O( p T) as before. Table 5 shows the performance of the algorithms in the 15 runs (3 stocks times 5 days). In all the runs, the MMMW algorithm performed nearly as well as the best strategy, at times even outperforming it. MMFPL didn’t perform as well however. As an illustration of how closely MMMW tracks the best performance achievable using the spread-based strategies in the class, in Figure 5 we show the performance of all algorithms for 2 consecutive trading days, May 8 and 9, 2013, for the stock HPQ. We also show the performance of different strategies on these two days - it can be seen that the best strategy differs, thus motivating the need for an adaptive learning algorithm. 8 References [1] J. Abernethy, Y. Chen, and J. Wortman Vaughan. An optimization-based framework for automated market-making. In Proceedings of the 12th ACM Conference on Electronic Commerce, pages 297–306, 2011. [2] S. Agrawal, E. Delag, M. Peters, Z. Wang, and Y. Ye. A unified framework for dynamic prediction market design. Operations research, 59(3):550–568, 2011. [3] A. Blum and A. Kalai. Universal portfolios with and without transaction costs. Machine Learning, 35(3):193–205, 1999. [4] T. Chakraborty and M. Kearns. Market making and mean reversion. In Proceedings of the 12th ACM conference on Electronic commerce, pages 307–314. ACM, 2011. [5] Y. Chen and D. M. Pennock. A utility framework for bounded-loss market makers. In Proceedings of the 23rd Conference on Uncertainty in Artificial Intelligence, pages 49–56, 2007. [6] Y. Chen and J. Wortman Vaughan. A new understanding of prediction markets via no-regret learning. In Proceedings of the 11th ACM Conference on Electronic Commerce, pages 189– 198, 2010. [7] T. M. Cover and E. Ordentlich. Universal portfolios with side information. IEEE Transactions on Information Theory, 42(2):348–363, 1996. [8] S. Das. A learning market-maker in the glosten–milgrom model. Quantitative Finance, 5(2):169–180, 2005. [9] S. Das. The effects of market-making on price dynamics. In Proceedings of the 7th International Joint Conference on Autonomous Agents and Multiagent Systems, pages 887–894, 2008. [10] S. Das and M. Magdon-Ismail. Adapting to a market shock: Optimal sequential marketmaking. In Proceedings of the 21th Annual Conference on Neural Information Processing Systems, pages 361–368, 2008. [11] L. R. Glosten and P. R. Milgrom. Bid, ask and transaction prices in a specialist market with heterogeneously informed traders. Journal of financial economics, 14(1):71–100, 1985. [12] R. Hanson. Combinatorial information market design. Information Systems Frontiers, 5(1):105–119, 2003. [13] R. Hanson. Logarithmic market scoring rules for modular combinatorial information aggregation. Journal of Prediction Markets, 1(1):3–15, 2007. [14] E. Hazan, A. Kalai, S. Kale, and A. Agarwal. Logarithmic regret algorithms for online convex optimization. In Learning Theory, pages 499–513. Springer, 2006. [15] D. P. Helmbold, R. E. Schapire, Y. Singer, and M. K. Warmuth. On-line portfolio selection using multiplicative updates. Mathematical Finance, 8(4):325–347, 1998. [16] A. T. Kalai and S. Vempala. Efficient algorithms for universal portfolios. The Journal of Machine Learning Research, 3:423–440, 2003. [17] A. T. Kalai and S. Vempala. Efficient algorithms for online decision problems. J. Comput. Syst. Sci., 71(3):291–307, 2005. [18] N. Littlestone and M. K. Warmuth. The weighted majority algorithm. Inf. Comput., 108(2):212–261, 1994. [19] N. Della Penna and M. D. Reid. Bandit market makers. arXiv preprint arXiv:1112.0076, 2011. [20] T. M. Cover. Universal portfolios. Mathematical Finance, 1(1):1–29, January 1991. 9
2013
219
4,953
Convergence of Monte Carlo Tree Search in Simultaneous Move Games Viliam Lis´y1 Vojtˇech Kovaˇr´ık1 Marc Lanctot2 Branislav Boˇsansk´y1 1Agent Technology Center Dept. of Computer Science and Engineering FEE, Czech Technical University in Prague <name>.<surname> @agents.fel.cvut.cz 2Department of Knowledge Engineering Maastricht University, The Netherlands marc.lanctot @maastrichtuniversity.nl Abstract We study Monte Carlo tree search (MCTS) in zero-sum extensive-form games with perfect information and simultaneous moves. We present a general template of MCTS algorithms for these games, which can be instantiated by various selection methods. We formally prove that if a selection method is ϵ-Hannan consistent in a matrix game and satisfies additional requirements on exploration, then the MCTS algorithm eventually converges to an approximate Nash equilibrium (NE) of the extensive-form game. We empirically evaluate this claim using regret matching and Exp3 as the selection methods on randomly generated games and empirically selected worst case games. We confirm the formal result and show that additional MCTS variants also converge to approximate NE on the evaluated games. 1 Introduction Non-cooperative game theory is a formal mathematical framework for describing behavior of interacting self-interested agents. Recent interest has brought significant advancements from the algorithmic perspective and new algorithms have led to many successful applications of game-theoretic models in security domains [1] and to near-optimal play of very large games [2]. We focus on an important class of two-player, zero-sum extensive-form games (EFGs) with perfect information and simultaneous moves. Games in this class capture sequential interactions that can be visualized as a game tree. The nodes correspond to the states of the game, in which both players act simultaneously. We can represent these situations using the normal form (i.e., as matrix games), where the values are computed from the successor sub-games. Many well-known games are instances of this class, including card games such as Goofspiel [3, 4], variants of pursuit-evasion games [5], and several games from general game-playing competition [6]. Simultaneous-move games can be solved exactly in polynomial time using the backward induction algorithm [7, 4], recently improved with alpha-beta pruning [8, 9]. However, the depth-limited search algorithms based on the backward induction require domain knowledge (an evaluation function) and computing the cutoff conditions requires linear programming [8] or using a double-oracle method [9], both of which are computationally expensive. For practical applications and in situations with limited domain knowledge, variants of simulation-based algorithms such as Monte Carlo Tree Search (MCTS) are typically used in practice [10, 11, 12, 13]. In spite of the success of MCTS and namely its variant UCT [14] in practice, there is a lack of theory analyzing MCTS outside two-player perfect-information sequential games. To the best of our knowledge, no convergence guarantees are known for MCTS in games with simultaneous moves or general EFGs. 1 Figure 1: A game tree of a game with perfect information and simultaneous moves. Only the leaves contain the actual rewards; the remaining numbers are the expected reward for the optimal strategy. In this paper, we present a general template of MCTS algorithms for zero-sum perfect-information simultaneous move games. It can be instantiated using any regret minimizing procedure for matrix games as a function for selecting the next actions to be sampled. We formally prove that if the algorithm uses an ϵ-Hannan consistent selection function, which assures attempting each action infinitely many times, the MCTS algorithm eventually converges to a subgame perfect ϵ-Nash equilibrium of the extensive form game. We empirically evaluate this claim using two different ϵ-Hannan consistent procedures: regret matching [15] and Exp3 [16]. In the experiments on randomly generated and worst case games, we show that the empirical speed of convergence of the algorithms based on our template is comparable to recently proposed MCTS algorithms for these games. We conjecture that many of these algorithms also converge to ϵ-Nash equilibrium and that our formal analysis could be extended to include them. 2 Definitions and background A finite zero-sum game with perfect information and simultaneous moves can be described by a tuple (N, H, Z, A, T , u1, h0), where N = {1, 2} contains player labels, H is a set of inner states and Z denotes the terminal states. A = A1 × A2 is the set of joint actions of individual players and we denote A1(h) = {1 . . . mh} and A2(h) = {1 . . . nh} the actions available to individual players in state h ∈H. The transition function T : H×A1 ×A2 7→H∪Z defines the successor state given a current state and actions for both players. For brevity, we sometimes denote T (h, i, j) ≡hij. The utility function u1 : Z 7→[vmin, vmax] ⊆R gives the utility of player 1, with vmin and vmax denoting the minimum and maximum possible utility respectively. Without loss of generality we assume vmin = 0, vmax = 1, and ∀z ∈Z, u2(z) = 1 −u1(z). The game starts in an initial state h0. A matrix game is a single-stage simultaneous move game with action sets A1 and A2. Each entry in the matrix M = (aij) where (i, j) ∈A1 × A2 and aij ∈[0, 1] corresponds to a payoff (to player 1) if row i is chosen by player 1 and column j by player 2. A strategy σq ∈∆(Aq) is a distribution over the actions in Aq. If σ1 is represented as a row vector and σ2 as a column vector, then the expected value to player 1 when both players play with these strategies is u1(σ1, σ2) = σ1Mσ2. Given a profile σ = (σ1, σ2), define the utilities against best response strategies to be u1(br, σ2) = maxσ′ 1∈∆(A1) σ′ 1Mσ2 and u1(σ1, br) = minσ′ 2∈∆(A2) σ1Mσ′ 2. A strategy profile (σ1, σ2) is an ϵ-Nash equilibrium of the matrix game M if and only if u1(br, σ2) −u1(σ1, σ2) ≤ϵ and u1(σ1, σ2) −u1(σ1, br) ≤ϵ (1) Two-player perfect information games with simultaneous moves are sometimes appropriately called stacked matrix games because at every state h each joint action from set A1(h)×A2(h) either leads to a terminal state or to a subgame which is itself another stacked matrix game (see Figure 1). A behavioral strategy for player q is a mapping from states h ∈H to a probability distribution over the actions Aq(h), denoted σq(h). Given a profile σ = (σ1, σ2), define the probability of reaching a terminal state z under σ as πσ(z) = π1(z)π2(z), where each πq(z) is a product of probabilities of the actions taken by player q along the path to z. Define Σq to be the set of behavioral strategies for player q. Then for any strategy profile σ = (σ1, σ2) ∈Σ1 × Σ2 we define the expected utility of the strategy profile (for player 1) as u(σ) = u(σ1, σ2) = X z∈Z πσ(z)u1(z) (2) 2 An ϵ-Nash equilibrium profile (σ1, σ2) in this case is defined analogously to (1). In other words, none of the players can improve their utility by more than ϵ by deviating unilaterally. If the strategies are an ϵ-NE in each subgame starting in an arbitrary game state, the equilibrium strategy is termed subgame perfect. If σ = (σ1, σ2) is an exact Nash equilibrium (i.e., ϵ-NE with ϵ = 0), then we denote the unique value of the game vh0 = u(σ1, σ2). For any h ∈H, we denote vh the value of the subgame rooted in state h. 3 Simultaneous move Monte-Carlo Tree Search Monte Carlo Tree Search (MCTS) is a simulation-based state space search algorithm often used in game trees. The nodes in the tree represent game states. The main idea is to iteratively run simulations to a terminal state, incrementally growing a tree rooted at the initial state of the game. In its simplest form, the tree is initially empty and a single leaf is added each iteration. Each simulation starts by visiting nodes in the tree, selecting which actions to take based on a selection function and information maintained in the node. Consequently, it transitions to the successor states. When a node is visited whose immediate children are not all in the tree, the node is expanded by adding a new leaf to the tree. Then, a rollout policy (e.g., random action selection) is applied from the new leaf to a terminal state. The outcome of the simulation is then returned as a reward to the new leaf and the information stored in the tree is updated. In Simultaneous Move MCTS (SM-MCTS), the main difference is that a joint action of both players is selected. The algorithm has been previously applied, for example in the game of Tron [12], Urban Rivals [11], and in general game-playing [10]. However, guarantees of convergence to NE remain unknown. The convergence to a NE depends critically on the selection and update policies applied, which are even more non-trivial than in purely sequential games. The most popular selection policy in this context (UCB) performs very well in some games [12], but Shafiei et al. [17] show that it does not converge to Nash equilibrium, even in a simple one-stage simultaneous move game. In this paper, we focus on variants of MCTS, which provably converge to (approximate) NE; hence we do not discuss UCB any further. Instead, we describe variants of two other selection algorithms after explaining the abstract SM-MCTS algorithm. Algorithm 1 describes a single simulation of SM-MCTS. T represents the MCTS tree in which each state is represented by one node. Every node h maintains a cumulative reward sum over all simulations through it, Xh, and a visit count nh, both initially set to 0. As depicted in Figure 1, a matrix of references to the children is maintained at each inner node. The critical parts of the algorithm are the updates on lines 8 and 14 and the selection on line 10. Each variant below will describe a different way to select an action and update a node. The standard way of defining the value to send back is RetVal(u1, Xh, nh) = u1, but we discuss also RetVal(u1, Xh, nh) = Xh/nh, which is required for the formal analysis in Section 4. We denote this variant of the algorithms SM-MCTS(node h) 1 if h ∈Z then return u1(h) 2 else if h ∈T and ∃(i, j) ∈A1(h) × A2(h) not previously selected then 3 Choose one of the previously unselected (i, j) and h′ ←T (h, i, j) 4 Add h′ to T 5 u1 ←Rollout(h′) 6 Xh′ ←Xh′ + u1; nh′ ←nh′ + 1 7 Update(h, i, j, u1) 8 return RetVal(u1, Xh′, nh′) 9 (i, j) ←Select(h) 10 h′ ←T (h, i, j) 11 u1 ←SM-MCTS(h′) 12 Xh ←Xh + u1; nh ←nh + 1 13 Update(h, i, j, u1) 14 return RetVal(u1, Xh, nh) 15 Algorithm 1: Simultaneous Move Monte Carlo Tree Search 3 with additional “M” for mean. Algorithm 1 and the variants below are expressed from player 1’s perspective. Player 2 does the same except using negated utilities. 3.1 Regret matching This variant applies regret-matching [15] to the current estimated matrix game at each stage. Suppose iterations are numbered from s ∈{1, 2, 3, · · · } and at each iteration and each inner node h there is a mixed strategy σs(h) used by each player, initially set to uniform random: σ0(h, i) = 1/|A(h)|. Each player maintains a cumulative regret rh[i] for having played σs(h) instead of i ∈A1(h). The values are initially set to 0. On iteration s, the Select function (line 10 in Algorithm 1) first builds the player’s current strategies from the cumulative regret. Define x+ = max(x, 0), σs(h, a) = r+ h [a] R+ sum if R+ sum > 0 oth. 1 |A1(h)|, where R+ sum = X i∈A1(h) r+ h [i]. (3) The strategy is computed by assigning higher weight proportionally to actions based on the regret of having not taken them over the long-term. To ensure exploration, an γ-on-policy sampling procedure is used choosing action i with probability γ/|A(h)| + (1 −γ)σs(h, i), for some γ > 0. The Updates on lines 8 and 14 add regret accumulated at the iteration to the regret tables rh. Suppose joint action (i1, j2) is sampled from the selection policy and utility u1 is returned from the recursive call on line 12. Define x(h, i, j) = Xhij if (i, j) ̸= (i1, j2), or u1 otherwise. The updates to the regret are: ∀i′ ∈A1(h), rh[i′] ←rh[i′] + (x(h, i′, j) −u1). 3.2 Exp3 In Exp3 [16], a player maintains an estimate of the sum of rewards, denoted xh,i, and visit counts nh,i for each of their actions i ∈A1. The joint action selected on line 10 is composed of an action independently selected for each player. The probability of sampling action a in Select is σs(h, a) = (1 −γ) exp(ηwh,a) P i∈A1(h) exp(ηwh,i) + γ |A1(h)|, where η = γ |A1(h)| and wh,i = xh,i1. (4) The Update after selecting actions (i, j) and obtaining a result (u1, u2) updates the visits count (nh,i ←nh,i + 1) and adds to the corresponding reward sum estimates the reward divided by the probability that the action was played by the player (xh,i ←xh,i + u1/σs(h, i)). Dividing the value by the probability of selecting the corresponding action makes xh,i estimate the sum of rewards over all iterations, not only the once where action i was selected. 4 Formal analysis We focus on the eventual convergence to approximate NE, which allows us to make an important simplification: We disregard the incremental building of the tree and assume we have built the complete tree. We show that this will eventually happen with probability 1 and that the statistics collected during the tree building phase cannot prevent the eventual convergence. The main idea of the proof is to show that the algorithm will eventually converge close to the optimal strategy in the leaf nodes and inductively prove that it will converge also in higher levels of the tree. In order to do that, after introducing the necessary notation, we start by analyzing the situation in simple matrix games, which corresponds mainly to the leaf nodes of the tree. In the inner nodes of the tree, the observed payoffs are imprecise because of the stochastic nature of the selection functions and bias caused by exploration, but the error can be bounded. Hence, we continue with analysis of repeated matrix games with bounded error. Finally, we compose the matrices with bounded errors in 1In practice, we set wh,i = xh,i−maxi′∈A1(h) xh,i′ since exp(xh,i) can easily cause numerical overflows. This reformulation computes the same values as the original algorithm but is more numerically stable. 4 a multi-stage setting to prove convergence guarantees of SM-MCTS. Any proofs that are omitted in the paper are included in the appendix available in the supplementary material and on http://arxiv.org (arXiv:1310.8613). 4.1 Notation and definitions Consider a repeatedly played matrix game where at time s players 1 and 2 choose actions is and js respectively. We will use the convention (|A1|, |A2|) = (m, n). Define G(t) = t X s=1 aisjs, g(t) = 1 t G(t), and Gmax(t) = max i∈A1 t X s=1 aijs, where G(t) is the cumulative payoff, g(t) is the average payoff, and Gmax is the maximum cumulative payoff over all actions, each to player 1 and at time t. We also denote gmax(t) = Gmax(t)/t and by R(t) = Gmax(t) −G(t) and r(t) = gmax(t) −g(t) the cumulative and average regrets. For actions i of player 1 and j of player 2, we denote ti, tj the number of times these actions were chosen up to the time t and tij the number of times both of these actions has been chosen at once. By empirical frequencies we mean the strategy profile (ˆσ1(t), ˆσ2(t)) ∈⟨0, 1⟩m×⟨0, 1⟩n given by the formulas ˆσ1(t, i) = ti/t, ˆσ2(t, j) = tj/t. By average strategies, we mean the strategy profile (¯σ1(t), ¯σ2(t)) given by the formulas ¯σ1(t, i) = Pt s=1 σs 1(i)/t, ¯σ2(t, j) = Pt s=1 σs 2(j)/t, where σs 1, σs 2 are the strategies used at time s. Definition 4.1. We say that a player is ϵ-Hannan-consistent if, for any payoff sequences (e.g., against any opponent strategy), lim supt→∞, r(t) ≤ϵ holds almost surely. An algorithm A is ϵHannan consistent, if a player who chooses his actions based on A is ϵ-Hannan consistent. Hannan consistency (HC) is a commonly studied property in the context of online learning in repeated (single stage) decisions. In particular, RM and variants of Exp3 has been shown to be Hannan consistent in matrix games [15, 16]. In order to ensure that the MCTS algorithm will eventually visit each node infinitely many times, we need the selection function to satisfy the following property. Definition 4.2. We say that A is an algorithm with guaranteed exploration, if for players 1 and 2 both using A for action selection limt→∞tij = ∞holds almost surely ∀(i, j) ∈A1 × A2. Note that most of the HC algorithms, namely RM and Exp3, guarantee exploration without any modification. If there is an algorithm without this property, it can be adjusted the following way. Definition 4.3. Let A be an algorithm used for choosing action in a matrix game M. For fixed exploration parameter γ ∈(0, 1) we define a modified algorithm A∗as follows: In each time, with probability (1 −γ) run one iteration of A and with probability γ choose the action randomly uniformly over available actions, without updating any of the variables belonging to A. 4.2 Repeated matrix games First we show that the ϵ-Hannan consistency is not lost due to the additional exploration. Lemma 4.4. Let A be an ϵ-Hannan consistent algorithm. Then A∗is an (ϵ + γ)-Hannan consistent algorithm with guaranteed exploration. In previous works on MCTS in our class of games, RM variants generally suggested using the average strategy and Exp3 variants the empirical frequencies to obtain the strategy to be played. The following lemma says there eventually is no difference between the two. Lemma 4.5. As t approaches infinity, the empirical frequencies and average strategies will almost surely be equal. That is, lim supt→∞maxi∈A1 |ˆσ1(t, i) −¯σ1(t, i)| = 0 holds with probability 1. The proof is a consequence of the martingale version of Strong Law of Large Numbers. It is well known that two Hannan consistent players will eventually converge to NE (see [18, p. 11] and [19]). We prove a similar result for the approximate versions of the notions. Lemma 4.6. Let ϵ > 0 be a real number. If both players in a matrix game with value v are ϵ-Hannan consistent, then the following inequalities hold for the empirical frequencies almost surely: lim sup t→∞u (br, ˆσ2(t)) ≤v + 2ϵ and lim inf t→∞u (ˆσ1(t), br) ≥v −2ϵ. (5) 5 The proof shows that if the value caused by the empirical frequencies was outside of the interval infinitely many times with positive probability, it would be in contradiction with definition of ϵ-HC. The following corollary is than a direct consequence of this lemma. Corollary 4.7. If both players in a matrix game are ϵ-Hannan consistent, then there almost surely exists t0 ∈N, such that for every t ≥t0 the empirical frequencies and average strategies form (4ϵ + δ)-equilibrium for arbitrarly small δ > 0. The constant 4 is caused by going from a pair of strategies with best responses within 2ϵ of the game value guaranteed by Lemma 4.6 to the approximate NE, which multiplies the distance by two. 4.3 Repeated matrix games with bounded error After defining the repeated games with error, we present a variant of Lemma 4.6 for these games. Definition 4.8. We define M(t) = (aij(t)) to be a game, in which if players chose actions i and j, they receive randomized payoffs aij (t, (i1, ...it−1), (j1, ...jt−1)). We will denote these simply as aij(t), but in fact they are random variables with values in [0, 1] and their distribution in time t depends on the previous choices of actions. We say that M(t) = (aij(t)) is a repeated game with error η, if there is a matrix game M = (aij) and almost surely exists t0 ∈N, such that |aij(t) −aij| < η holds for all t ≥t0. In this context, we will denote G(t) = P s∈{1...t} aisjs(s) etc. and use tilde for the corresponding variables without errors ( ˜G(t) = P aisjs etc.). Symbols v and u (·, ·) will still be used with respect to M without errors. The following lemma states that even with the errors, ϵ-HC algorithms still converge to an approximate NE of the game. Lemma 4.9. Let ϵ > 0 and c ≥0. If M(t) is a repeated game with error cϵ and both players are ϵ-Hannan consistent then the following inequalities hold almost surely: lim sup t→∞u (br, ˆσ2) ≤v + 2(c + 1)ϵ, lim inf t→∞u (ˆσ1, br) ≥v −2(c + 1)ϵ (6) and v −(c + 1)ϵ ≤lim inf t→∞g(t) ≤lim sup t→∞g(t) ≤v + (c + 1)ϵ. (7) The proof is similar to the proof of Lemma 4.6. It needs an additional claim that if the algorithm is ϵ-HC with respect to the observed values with errors, it still has a bounded regret with respect to the exact values. In the same way as in the previous subsection, a direct consequence of the lemma is the convergence to an approximate Nash equilibrium. Theorem 4.10. Let ϵ, c > 0 be real numbers. If M(t) is a repeated game with error cϵ and both players are ϵ-Hannan consistent, then for any δ > 0 there almost surely exists t0 ∈N, such that for all t ≥t0 the empirical frequencies form (4(c + 1)ϵ + δ)-equilibrium of the game M. 4.4 Perfect-information extensive-form games with simultaneous moves Now we have all the necessary components to prove the main theorem. Theorem 4.11. Let M h h∈H be a game with perfect information and simultaneous moves with maximal depth D. Then for every ϵ-Hannan consistent algorithm A with guaranteed exploration and arbitrary small δ > 0, there almost surely exists t0, so that the average strategies (ˆσ1(t), ˆσ2(t)) form a subgame perfect 2D2 + δ  ϵ-Nash equilibrium for all t ≥t0. Once we have established the convergence of the ϵ-HC algorithms in games with errors, we can proceed by induction. The games in the leaf nodes are simple matrix game so they will eventually converge and they will return the mean reward values in a bounded distance from the actual value of the game (Lemma 4.9 with c = 0). As a result, in the level just above the leaf nodes, the ϵHC algorithms are playing a matrix game with a bounded error and by Lemma 4.9, they will also eventually return the mean values within a bounded interval. On level d from the leaf nodes, the errors of returned values will be in the order of dϵ and players can gain 2dϵ by deviating. Summing the possible gain of deviations on each level leads to the bound in the theorem. The subgame perfection of the equilibrium results from the fact that for proving the bound on approximation in the whole game (i.e., in the root of the game tree), a smaller bound on approximation of the equilibrium is proven for all subgames in the induction. The formal proof is presented in the appendix. 6 BF = 2 BF = 3 BF = 5 0.01 0.10 0.01 0.10 0.01 0.10 0.05 0.1 0.2 10 1000 10 1000 10 1000 t Exploitability Depth = 2 Depth = 3 Depth = 4 0.400 0.200 0.100 0.050 0.025 0.1 100 10000 100 10000 100 10000 t Exploitability Method RM RMM Figure 2: Exploitability of strategies given by the empirical frequencies of Regret matching with propagating values (RM) and means (RMM) for various depths and branching factors. 5 Empirical analysis In this section, we first evaluate the influence of propagating the mean values instead of the current sample value in MCTS to the speed of convergence to Nash equilibrium. Afterwards, we try to assess the convergence rate of the algorithms in the worst case. In most of the experiments, we use as the bases of the SM-MCTS algorithm Regret matching as the selection strategy, because a superior convergence rate bound is known for this algorithm and it has been reported to be very successful also empirically in [20]. We always use the empirical frequencies to create the evaluated strategy and measure the exploitability of the first player’s strategy (i.e., vh0 −u(ˆσ1, br)). 5.1 Influence of propagation of the mean The formal analysis presented in the previous section requires the algorithms to return the mean of all the previous samples instead of the value of the current sample. The latter is generally the case in previous works on SM-MCTS [20, 11]. We run both variants with the Regret matching algorithm on a set of randomly generated games parameterized by depth and branching factor. Branching factor was always the same for both players. For the following experiments, the utility values are randomly selected uniformly from interval ⟨0, 1⟩. Each experiment uses 100 random games and 100 runs of the algorithm. Figure 2 presents how the exploitability of the strategies produced by Regret matching with propagation of the mean (RMM) and current sample value (RM) develops with increasing number of iterations. Note that both axes are in logarithmic scale. The top graph is for depth of 2, different branching factors (BF) and γ ∈{0.05, 0.1, 0.2}. The bottom one presents different depths for BF = 2. The results show that both methods converge to the approximate Nash equilibrium of the game. RMM converges slightly slower in all cases. The difference is very small in small games, but becomes more apparent in games with larger depth. 5.2 Empirical convergence rate Although the formal analysis guarantees the convergence to an ϵ-NE of the game, the rate of the convergence is not given. Therefore, we give an empirical analysis of the convergence and specifically focus on the cases that reached the slowest convergence from a set of evaluated games. 7 WC_RM WC_RMM 0.0125 0.0250 0.0500 0.1000 0.2000 0.4000 0.8000 1e+02 1e+04 1e+06 1e+02 1e+04 1e+06 t Exploitability Method Exp3 Exp3M RM RMM Figure 3: The games with maximal exploitability after 1000 iterations with RM (left) and RMM (right) and the corresponding exploitabililty for all evaluated methods. We have performed a brute force search through all games of depth 2 with branching factor 2 and utilities form the set {0, 0.5, 1}. We made 100 runs of RM and RMM with exploration set to γ = 0.05 for 1000 iterations and computed the mean exploitability of the strategy. The games with the highest exploitability for each method are presented in Figure 3. These games are not guaranteed to be the exact worst case, because of possible error caused by only 100 runs of the algorithm, but they are representatives of particularly difficult cases for the algorithms. In general, the games that are most difficult for one method are difficult also for the other. Note that we systematically searched also for games in which RMM performs better than RM, but this was never the case with sufficient number of runs of the algorithms in the selected games. Figure 3 shows the convergence of RM and Exp3 with propagating the current sample values and the mean values (RMM and Exp3M) on the empirically worst games for the RM variants. The RM variants converge to the minimal achievable values (0.0119 and 0.0367) after a million iterations. This values corresponds exactly to the exploitability of the optimal strategy combined with the uniform exploration with probability 0.05. The Exp3 variants most likely converge to the same values, however, they did not fully make it in the first million iterations in WC RM. The convergence rate of all the variants is similar and the variants with propagating means always converge a little slower. 6 Conclusion We present the first formal analysis of convergence of MCTS algorithms in zero-sum extensive-form games with perfect information and simultaneous moves. We show that any ϵ-Hannan consistent algorithm can be used to create a MCTS algorithm that provably converges to an approximate Nash equilibrium of the game. This justifies the usage of the MCTS as an approximation algorithm for this class of games from the perspective of algorithmic game theory. We complement the formal analysis with experimental evaluation that shows that other MCTS variants for this class of games, which are not covered by the proof, also converge to the approximate NE of the game. Hence, we believe that the presented proofs can be generalized to include these cases as well. Besides this, we will focus our future research on providing finite time convergence bounds for these algorithms and generalizing the results to more general classes of extensive-form games with imperfect information. Acknowledgments This work is partially funded by the Czech Science Foundation (grant no. P202/12/2054), the Grant Agency of the Czech Technical University in Prague (grant no. OHK3-060/12), and the Netherlands Organisation for Scientific Research (NWO) in the framework of the project Go4Nature, grant number 612.000.938. The access to computing and storage facilities owned by parties and projects contributing to the National Grid Infrastructure MetaCentrum, provided under the programme “Projects of Large Infrastructure for Research, Development, and Innovations” (LM2010005) is appreciated. 8 References [1] Manish Jain, Dmytro Korzhyk, Ondrej Vanek, Vincent Conitzer, Michal Pechoucek, and Milind Tambe. A double oracle algorithm for zero-sum security games. In Tenth International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2011), pages 327–334, 2011. [2] Michael Johanson, Nolan Bard, Neil Burch, and Michael Bowling. Finding optimal abstract strategies in extensive-form games. In Proceedings of the Twenty-Sixth Conference on Artificial Intelligence (AAAI12), pages 1371–1379, 2012. [3] S. M. Ross. Goofspiel — the game of pure strategy. Journal of Applied Probability, 8(3):621–625, 1971. [4] Glenn C. Rhoads and Laurent Bartholdi. Computer solution to the game of pure strategy. Games, 3(4):150–156, 2012. [5] Michael L. Littman. Markov games as a framework for multi-agent reinforcement learning. In In Proceedings of the Eleventh International Conference on Machine Learning (ICML-1994), pages 157–163. Morgan Kaufmann, 1994. [6] M. Genesereth and N. Love. General game-playing: Overview of the AAAI competition. AI Magazine, 26:62–72, 2005. [7] Michael Buro. Solving the Oshi-Zumo game. In Proceedings of Advances in Computer Games 10, pages 361–366, 2003. [8] Abdallah Saffidine, Hilmar Finnsson, and Michael Buro. Alpha-beta pruning for games with simultaneous moves. In Proceedings of the Thirty-Second Conference on Artificial Intelligence (AAAI-12), pages 556– 562, 2012. [9] Branislav Bosansky, Viliam Lisy, Jiri Cermak, Roman Vitek, and Michal Pechoucek. Using double-oracle method and serialized alpha-beta search for pruning in simultaneous moves games. In Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence (IJCAI), pages 48–54, 2013. [10] H. Finnsson and Y. Bj¨ornsson. Simulation-based approach to general game-playing. In The Twenty-Third AAAI Conference on Artificial Intelligence, pages 259–264. AAAI Press, 2008. [11] Olivier Teytaud and S´ebastien Flory. Upper confidence trees with short term partial information. In Applications of Eolutionary Computation (EvoApplications 2011), Part I, volume 6624 of LNCS, pages 153–162, Berlin, Heidelberg, 2011. Springer-Verlag. [12] Pierre Perick, David L. St-Pierre, Francis Maes, and Damien Ernst. Comparison of different selection strategies in monte-carlo tree search for the game of Tron. In Proceedings of the IEEE Conference on Computational Intelligence and Games (CIG), pages 242–249, 2012. [13] Hilmar Finnsson. Simulation-Based General Game Playing. PhD thesis, Reykjavik University, 2012. [14] L. Kocsis and C. Szepesv´ari. Bandit-based Monte Carlo planning. In 15th European Conference on Machine Learning, volume 4212 of LNCS, pages 282–293, 2006. [15] S. Hart and A. Mas-Colell. A simple adaptive procedure leading to correlated equilibrium. Econometrica, 68(5):1127–1150, 2000. [16] Peter Auer, Nicol`o Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [17] M. Shafiei, N. R. Sturtevant, and J. Schaeffer. Comparing UCT versus CFR in simultaneous games. In Proceeding of the IJCAI Workshop on General Game-Playing (GIGA), pages 75–82, 2009. [18] Kevin Waugh. Abstraction in large extensive games. Master’s thesis, University of Alberta, 2009. [19] A. Blum and Y. Mansour. Learning, regret minimization, and equilibria. In Noam Nisan, Tim Roughgarden, Eva Tardos, and Vijay V. Vazirani, editors, Algorithmic Game Theory, chapter 4. Cambridge University Press, 2007. [20] Marc Lanctot, Viliam Lis´y, and Mark H.M. Winands. Monte Carlo tree search in simultaneous move games with applications to Goofspiel. In Workshop on Computer Games at IJCAI, 2013. 9
2013
22
4,954
Learning Prices for Repeated Auctions with Strategic Buyers Kareem Amin University of Pennsylvania akareem@cis.upenn.edu Afshin Rostamizadeh Google Research rostami@google.com Umar Syed Google Research usyed@google.com Abstract Inspired by real-time ad exchanges for online display advertising, we consider the problem of inferring a buyer’s value distribution for a good when the buyer is repeatedly interacting with a seller through a posted-price mechanism. We model the buyer as a strategic agent, whose goal is to maximize her long-term surplus, and we are interested in mechanisms that maximize the seller’s long-term revenue. We define the natural notion of strategic regret — the lost revenue as measured against a truthful (non-strategic) buyer. We present seller algorithms that are no(strategic)-regret when the buyer discounts her future surplus — i.e. the buyer prefers showing advertisements to users sooner rather than later. We also give a lower bound on strategic regret that increases as the buyer’s discounting weakens and shows, in particular, that any seller algorithm will suffer linear strategic regret if there is no discounting. 1 Introduction Online display advertising inventory — e.g., space for banner ads on web pages — is often sold via automated transactions on real-time ad exchanges. When a user visits a web page whose advertising inventory is managed by an ad exchange, a description of the web page, the user, and other relevant properties of the impression, along with a reserve price for the impression, is transmitted to bidding servers operating on behalf of advertisers. These servers process the data about the impression and respond to the exchange with a bid. The highest bidder wins the right to display an advertisement on the web page to the user, provided that the bid is above the reserve price. The amount charged the winner, if there is one, is settled according to a second-price auction. The winner is charged the maximum of the second-highest bid and the reserve price. Ad exchanges have been a boon for advertisers, since rich and real-time data about impressions allow them to target their bids to only those impressions that they value. However, this precise targeting has an unfortunate side effect for web page publishers. A nontrivial fraction of ad exchange auctions involve only a single bidder. Without competitive pressure from other bidders, the task of maximizing the publisher’s revenue falls entirely to the reserve price setting mechanism. Secondprice auctions with a single bidder are equivalent to posted-price auctions. The seller offers a price for a good, and a buyer decides whether to accept or reject the price (i.e., whether to bid above or below the reserve price). In this paper, we consider online learning algorithms for setting prices in posted-price auctions where the seller repeatedly interacts with the same buyer over a number of rounds, a common occurrence in ad exchanges where the same buyer might be interested in buying thousands of user impressions daily. In each round t, the seller offers a good to a buyer for price pt. The buyer’s value vt for the good is drawn independently from a fixed value distribution. Both vt and the value distribution are known to the buyer, but neither is observed by the seller. If the buyer accepts price pt, the seller receives revenue pt, and the buyer receives surplus vt −pt. Since the same buyer participates in 1 the auction in each round, the seller has the opportunity to learn about the buyer’s value distribution and set prices accordingly. Notice that in worst-case repeated auctions there is no such opportunity to learn, while standard Bayesian auctions assume knowledge of a value distribution, but avoid addressing how or why the auctioneer was ever able to estimate this distribution. Taken as an online learning problem, we can view this as a ‘bandit’ problem [18, 16], since the revenue for any price not offered is not observed (e.g., even if a buyer rejects a price, she may well have accepted a lower price). The seller’s goal is to maximize his expected revenue over all T rounds. One straightforward way for the seller to set prices would therefore be to use a noregret bandit algorithm, which minimizes the difference between seller’s revenue and the revenue that would have been earned by offering the best fixed price p∗in hindsight for all T rounds; for a no-regret algorithm (such as UCB [3] or EXP3 [4]), this difference is o(T). However, we argue that traditional no-regret algorithms are inadequate for this problem. Consider the motivations of a buyer interacting with an ad exchange where the prices are set by a no-regret algorithm, and suppose for simplicity that the buyer has a fixed value vt = v for all t. The goal of the buyer is to acquire the most valuable advertising inventory for the least total cost, i.e., to maximize her total surplus ! t v −pt, where the sum is over rounds where the buyer accepts the seller’s price. A naive buyer might simply accept the seller’s price pt if and only if vt ≥pt; a buyer who behaves this way is called truthful. Against a truthful buyer any no-regret algorithm will eventually learn to offer prices pt ≈v on nearly all rounds. But a more savvy buyer will notice that if she rejects prices in earlier rounds, then she will tend to see lower prices in later rounds. Indeed, suppose the buyer only accepts prices below some small amount ϵ. Then any no-regret algorithm will learn that offering prices above ϵ results in zero revenue, and will eventually offer prices below that threshold on nearly all rounds. In fact, the smaller the learner’s regret, the faster this convergence occurs. If v ≫ϵ then the deceptive buyer strategy results in a large gain in total surplus for the buyer, and a large loss in total revenue for the seller, relative to the truthful buyer. While the no-regret guarantee certainly holds — in hindsight, the best price is indeed ϵ — it seems fairly useless. In this paper, we propose a definition of strategic regret that accounts for the buyer’s incentives, and give algorithms that are no-regret with respect to this definition. In our setting, the seller chooses a learning algorithm for selecting prices and announces this algorithm to the buyer. We assume that the buyer will examine this algorithm and adopt whatever strategy maximizes her expected surplus over all T rounds. We define the seller’s strategic regret to be the difference between his expected revenue and the expected revenue he would have earned if, rather than using his chosen algorithm to set prices, he had instead offered the best fixed price p∗on all rounds and the buyer had been truthful. As we have seen, this revenue can be much higher than the revenue of the best fixed price in hindsight (in the example above, p∗= v). Unless noted otherwise, throughout the remainder of the paper the term “regret” will refer to strategic regret. We make one further assumption about buyer behavior, which is based on the observation that in many important real-world markets — and particularly in online advertising — sellers are far more willing to wait for revenue than buyers are willing to wait for goods. For example, advertisers are often interested in showing ads to users who have recently viewed their products online (this practice is called ‘retargeting’), and the value of these user impressions decays rapidly over time. Or consider an advertising campaign that is tied to a product launch. A user impression that is purchased long after the launch (such as the release of a movie) is almost worthless. To model this phenomenon we multiply the buyer’s surplus in each round by a discount factor: If the buyer accepts the seller’s price pt in round t, she receives surplus γt(vt −pt), where {γt} is a nonincreasing sequence contained in the interval (0, 1]. We call Tγ = !T t=1 γt the buyer’s ‘horizon’, since it is analogous to the seller’s horizon T. The buyer’s horizon plays a central role in our analysis. Summary of results: In Sections 4 and 5 we assume that discount rates decrease geometrically: γt = γt−1 for some γ ∈(0, 1]. In Section 4 we consider the special case that the buyer has a fixed value vt = v for all rounds t, and give an algorithm with regret at most O(Tγ √ T). In Section 5 we allow the vt to be drawn from any distribution that satisfies a certain smoothness assumption, and give an algorithm with regret at most ˜O(T α + T 1/α γ ) where α ∈(0, 1) is a user-selected parameter. Note that for either algorithm to be no-regret (i.e., for regret to be o(T)), we need that Tγ = o(T). In Section 6 we prove that this requirement is necessary for no-regret: any seller algorithm has regret at least Ω(Tγ). The lower bound is proved via a reduction to a non-repeated, or ‘single-shot’, auction. That our regret bounds should depend so crucially on Tγ is foreshadowed by the example above, in 2 which a deceptive buyer foregoes surplus in early rounds to obtain even more surplus is later rounds. A buyer with a short horizon Tγ will be unable to execute this strategy, as she will not be capable of bearing the short-term costs required to manipulate the seller. 2 Related work Kleinberg and Leighton study a posted price repeated auction with goods sold sequentially to T bidders who either all have the same fixed private value, private values drawn from a fixed distribution, or private values that are chosen by an oblivious adversary (an adversary that acts independently of observed seller behavior) [15] (see also [7, 8, 14]). Cesa-Bianchi et al. study a related problem of setting the reserve price in a second price auction with multiple (but not repeated) bidders at each round [9]. Note that none of these previous works allow for the possibility of a strategic buyer, i.e. one that acts non-truthfully in order to maximize its surplus. This is because a new buyer is considered at each time step and if the seller behavior depends only on previous buyers, then the setting immediately becomes strategyproof. Contrary to what is studied in these previous theoretical settings, electronic exchanges in practice see the same buyer appearing in multiple auctions and, thus, the buyer has incentive to act strategically. In fact, [12] finds empirical evidence of buyers’ strategic behavior in sponsored search auctions, which in turn negatively affects the seller’s revenue. In the economics literature, ‘intertemporal price discrimination’ refers to the practice of using a buyer’s past purchasing behavior to set future prices. Previous work [1, 13] has shown, as we do in Section 6, that a seller cannot benefit from conditioning prices on past behavior if the buyer is not myopic and can respond strategically. However, in contrast to our work, these results assume that the seller knows the buyer’s value distribution. Our setting can be modeled as a nonzero sum repeated game of incomplete information, and there is extensive literature on this topic. However, most previous work has focused only on characterizing the equilibria of these games. Further, our game has a particular structure that allows us to design seller algorithms that are much more efficient than generic algorithms for solving repeated games. Two settings that are distinct from what we consider in this paper, but where mechanism design and learning are combined, are the multi-armed bandit mechanism design problem [6, 5, 11] and the incentive compatible regression/classification problem [10, 17]. The former problem is motivated by sponsored search auctions, where the challenge is to elicit truthful values from multiple bidding advertisers while also efficiently estimating the click-through rate of the set of ads that are to be allocated. The latter problem involves learning a discriminative classifier or regression function in the batch setting with training examples that are labeled by selfish agents. The goal is then to minimize error with respect to the truthful labels. Finally, Arora et al. proposed a notion of regret for online learning algorithms, called policy regret, that accounts for the possibility that the adversary may adapt to the learning algorithm’s behavior [2]. This resembles the ability, in our setting, of a strategic buyer to adapt to the seller algorithm’s behavior. However, even this stronger definition of regret is inadequate for our setting. This is because policy regret is equivalent to standard regret when the adversary is oblivious, and as we explained in the previous section, there is an oblivious buyer strategy such that the seller’s standard regret is small, but his regret with respect to the best fixed price against a truthful buyer is large. 3 Preliminaries and Model We consider a posted-price model for a single buyer repeatedly purchasing items from a single seller. Associated with the buyer is a fixed distribution D over the interval [0, 1], which is known only to the buyer. On each round t, the buyer receives a value vt ∈V ⊆[0, 1] from the distribution D. The seller, without observing this value, then posts a price pt ∈P ⊆[0, 1]. Finally, the buyer selects an allocation decision at ∈{0, 1}. On each round t, the buyer receives an instantaneous surplus of at(vt −pt), and the seller receives an instantaneous revenue of atpt. We will be primarily interested in designing the seller’s learning algorithm, which we will denote A. Let v1:t denote the sequence of values observed on the first t rounds, (v1, ..., vt), defining p1:t and a1:t analogously. A is an algorithm that selects each price pt as a (possibly randomized) function of (p1:t−1, a1:t−1). As is common in mechanism design, we assume that the seller announces his 3 choice of algorithm A in advance. The buyer then selects her allocation strategy in response. The buyer’s allocation strategy B generates allocation decisions at as a (possibly randomized) function of (D, v1:t, p1:t, a1:t−1). Notice that a choice of A, B and D fixes a distribution over the sequences a1:T and p1:T . This in turn defines the seller’s total expected revenue: SellerRevenue(A, B, D, T) = E "!T t=1 atpt ## A, B, D $ . In the most general setting, we will consider a buyer whose surplus may be discounted through time. In fact, our lower bounds will demonstrate that a sufficiently decaying discount rate is necessary for a no-regret learning algorithm. We will imagine therefore that there exists a nonincreasing sequence {γt ∈(0, 1]} for the buyer. For a choice of T, we will define the effective “time-horizon” for the buyer as Tγ = !T t=1 γt. The buyer’s expected total discounted surplus is given by: BuyerSurplus(A, B, D, T) = E "!T t=1 γtat(vt −pt) ## A, B, D $ . We assume that the seller is faced with a strategic buyer who adapts to the choice of A. Thus, let B∗(A, D) be a surplus-maximizing buyer for seller algorithm A and value distribution is D. In other words, for all strategies B we have BuyerSurplus(A, B∗(A, D), D, T) ≥BuyerSurplus(A, B, D, T). We are now prepared to define the seller’s regret. Let p∗= arg maxp∈P p PrD[v ≥p], the revenuemaximizing choice of price for a seller that knows the distribution D, and simply posts a price of p∗on every round. Against such a pricing strategy, it is in the buyer’s best interest to be truthful, accepting if and only if vt ≥p∗, and the seller would receive a revenue of Tp∗Prv∼D[v ≥p∗]. Informally, a no-regret algorithm is able to learn D from previous interactions with the buyer, and converge to selecting a price close to p∗. We therefore define regret as: Regret(A, D, T) = Tp∗Prv∼D[v ≥p∗] −SellerRevenue(A, B∗(A, D), D, T). Finally, we will be interested in algorithms that attain o(T) regret (meaning the averaged regret goes to zero as T →∞) for the worst-case D. In other words, we say A is no-regret if supD Regret(A, D, T) = o(T). Note that this definition of worst-case regret only assumes that Nature’s behavior (i.e., the value distribution) is worst-case; the buyer’s behavior is always presumed to be surplus maximizing. 4 Fixed Value Setting In this section we consider the case of a single unknown fixed buyer value, that is V = {v} for some v ∈(0, 1]. We show that in this setting a very simple pricing algorithm with monotonically decreasing price offerings is able to achieve O(Tγ √ T) when the buyer discount is γt = γt−1. Due to space constraints many of the proofs for this section appear in Appendix A. Monotone algorithm: Choose parameter β ∈(0, 1), and initialize a0 = 1 and p0 = 1. In each round t ≥1 let pt = β1−at−1pt−1. In the Monotone algorithm, the seller starts at the maximum price of 1, and decreases the price by a factor of β whenever the buyer rejects the price, and otherwise leaves it unchanged. Since Monotone is deterministic and the buyer’s value v is fixed, the surplus-maximizing buyer algorithm B∗(Monotone, v) is characterized by a deterministic allocation sequence a∗ 1:T ∈{0, 1}T .1 The following lemma partially characterizes the optimal buyer allocation sequence. Lemma 1. The sequence a∗ 1, . . . , a∗ T is monotonically nondecreasing. 1If there are multiple optimal sequences, the buyer can then choose to randomize over the set of sequences. In such a case, the worst case distribution (for the seller) is the one that always selects the revenue minimizing optimal sequence. In that case, let a∗ 1:T denote the revenue-minimizing buyer-optimal sequence. 4 In other words, once a buyer decides to start accepting the offered price at a certain time step, she will keep accepting from that point on. The main idea behind the proof is to show that if there does exist some time step t′ where a∗ t′ = 1 and a∗ t′+1 = 0, then swapping the values so that a∗ t′ = 0 and a∗ t′+1 = 1 (as well potentially swapping another pair of values) will result in a sequence with strictly better surplus, thereby contradicting the optimality of a∗ 1:T . The full proof is shown in Section A.1. Now, to finish characterizing the optimal allocation sequence, we provide the following lemma, which describes time steps where the buyer has with certainty begun to accept the offered price. Lemma 2. Let cβ,γ = 1 + (1 −β)Tγ and dβ,γ = log( cβ,γ v ) log(1/β) , then for any t > dβ,γ we have a∗ t+1 = 1. A detailed proof is presented in Section A.2. These lemmas imply the following regret bound. Theorem 1. Regret(Monotone, v, T) ≤vT % 1 − β cβ,γ & + vβ % dβ,γ cβ,γ + 1 cβ,γ & . Proof. By Lemmas 1 and 2 we receive no revenue until at most round ⌈dβ,γ⌉+ 1, and from that round onwards we receive at least revenue β⌈dβ,γ⌉per round. Thus Regret(Monotone, v, T) = vT − T ' t=⌈dβ,γ⌉+1 β⌈dβ,γ⌉≤vT −(T −dβ,γ −1)βdβ,γ+1 Noting that βdβ,γ = v cβ,γ and rearranging proves the theorem. Tuning the learning parameter simplifies the bound further and provides a O(Tγ √ T) regret bound. Note that this tuning parameter does not assume knowledge of the buyer’s discount parameter γ. Corollary 1. If β = √ T 1+ √ T then Regret(Monotone, v, T) ≤ √ T ( 4vTγ + 2v log ( 1 v )) + v . The computation used to derive this corollary are found in Section A.3. This corollary shows that it is indeed possible to achieve no-regret against a strategic buyer with a unknown fixed value as long as Tγ = o( √ T). That is, the effective buyer horizon must be more than a constant factor smaller than the square-root of the game’s finite horizon. 5 Stochastic Value Setting We next give a seller algorithm that attains no-regret when the set of prices P is finite, the buyer’s discount is γt = γt−1, and the buyer’s value vt for each round is drawn from a fixed distribution D that satistfies a certain continuity assumption, detailed below. Phased algorithm: Choose parameter α ∈(0, 1). Define Ti ≡2i and Si ≡ min % Ti |P|, T α i & . For each phase i = 1, 2, 3, . . . of length Ti rounds: Offer each price p ∈P for Si rounds, in some fixed order; these are the explore rounds. Let Ap,i = Number of explore rounds in phase i where price p was offered and the buyer accepted. For the remaining Ti−|P|Si rounds of phase i, offer price ˜pi = arg maxp∈P p Ap,i Si in each round; these are the exploit rounds. The Phased algorithm proceeds across a number of phases. Each phase consists of explore rounds followed by exploit rounds. During explore rounds, the algorithm selects each price in some fixed order. During exploit rounds, the algorithm repeatedly selects the price that realized the greatest revenue during the immediately preceding explore rounds. First notice that a strategic buyer has no incentive to lie during exploit rounds (i.e. it will accept any price pt < vt and reject any price pt > vt), since its decisions there do not affect any of its future prices. Thus, the exploit rounds are the time at which the seller can exploit what it has learned from the buyer during exploration. Alternatively, if the buyer has successfully manipulated the seller into offering a low price, we can view the buyer as “exploiting” the seller. 5 During explore rounds, on the other hand, the strategic buyer can benefit by telling lies which will cause it to witness better prices during the corresponding exploit rounds. However, the value of these lies to the buyer will depend on the fraction of the phase consisting of explore rounds. Taken to the extreme, if the entire phase consists of explore rounds, the buyer is not interested in lying. In general, the more explore rounds, the more revenue has to be sacrificed by a buyer that is lying during the explore rounds. For the myopic buyer, the loss of enough immediate revenue at some point ceases to justify her potential gains in the future exploit rounds. Thus, while traditional algorithms like UCB balance exploration and exploitation to ensure confidence in the observed payoffs of sampled arms, our Phased algorithm explores for two purposes: to ensure accurate estimates, and to dampen the buyer’s incentive to mislead the seller. The seller’s balancing act is to explore for long enough to learn the buyer’s value distribution, but leave enough exploit rounds to benefit from the knowledge. Continuity of the value distribution The preceding argument required that the distribution D does not exhibit a certain pathology. There cannot be two prices p, p′ that are very close but p Prv∼D[v ≥p] and p′ Prv∼D[v ≥p′] are very different. Otherwise, the buyer is largely indifferent to being offered prices p or p′, but distinguishing between the two prices is essential for the seller during exploit rounds. Thus, we assume that the value distribution D is K-Lipschitz, which eliminates this problem: Defining F(p) ≡Prv∼D[v ≥p], we assume there exists K > 0 such that |F(p) −F(p′)| ≤K|p −p′| for all p, p′ ∈[0, 1]. This assumption is quite mild, as our Phased algorithm does not need to know K, and the dependence of the regret rate on K will be logarithmic. Theorem 2. Assume F(p) ≡Prv∼D[v ≥p] is K-Lipschitz. Let ∆= minp∈P\{p∗} p∗F(p∗) − pF(p), where p∗= arg maxp∈P pF(p). For any parameter α ∈(0, 1) of the Phased algorithm there exist constants c1, c2, c3, c4 such that Regret(Phased, D, T) ≤c1|P|T α + c2 |P| ∆2/α (log T)1/α + c3 |P| ∆1/α T 1/α γ (log T + log(K/∆))1/α + c4|P| = ˜O(T α + T 1/α γ ). The complete proof of Theorem 2 is rather technical, and is provided in Appendix B. To gain further intuition about the upper bounds proved in this section and the previous section, it helps to parametrize the buyer’s horizon Tγ as a function of T, e.g. Tγ = T c for 0 ≤c ≤1. Writing it in this fashion, we see that the Monotone algorithm has regret at most O(T c+ 1 2 ), and the Phased algorithm has regret at most ˜O(T √c) if we choose α = √c. The lower bound proved in the next section states that, in the worst case, any seller algorithm will incur a regret of at least Ω(T c). 6 Lower Bound In this section we state the main lower bound, which establishes a connection between the regret of any seller algorithm and the buyer’s discounting. Specifically, we prove that the regret of any seller algorithm is Ω(Tγ). Note that when T = Tγ — i.e., the buyer does not discount her future surplus — our lower bound proves that no-regret seller algorithms do not exist, and thus it is impossible for the seller to take advantage of learned information. For example, consider the seller algorithm that uniformly selects prices pt from [0, 1]. The optimal buyer algorithm is truthful, accepting if pt < vt, as the seller algorithm is non-adaptive, and the buyer does not gain any advantage by being more strategic. In such a scenario the seller would quickly learn a good estimate of the value distribution D. What is surprising is that a seller cannot use this information if the buyer does not discount her future surplus. If the seller attempts to leverage information learned through interactions with the buyer, the buyer can react accordingly to negate this advantage. The lower bound further relates regret in the repeated setting to regret in a particular single-shot game between the buyer and the seller. This demonstrates that, against a non-discounted buyer, the seller is no better off in the repeated setting than he would be by repeatedly implementing such a single-shot mechanism (ignoring previous interactions with the buyer). In the following section we describe the simple single-shot game. 6 6.1 Single-Shot Auction We call the following game the single-shot auction. A seller selects a family of distributions S indexed by b ∈[0, 1], where each Sb is a distribution on [0, 1] × {0, 1}. The family S is revealed to a buyer with unknown value v ∈[0, 1], who then must select a bid b ∈[0, 1], and then (p, a) ∼Sb is drawn from the corresponding distribution. As usual, the buyer gets a surplus of a(v −p), while the seller enjoys a revenue of ap. We restrict the set of seller strategies to distributions that are incentive compatible and rational. S is incentive compatible if for all b, v ∈[0, 1], E(p,a)∼Sb[a(v−p)] ≤E(p,a)∼Sv[a(v−p)]. It is rational if for all v, E(p,a)∼Sv[a(v−p)] ≥0 (i.e. any buyer maximizing expected surplus is actually incentivised to play the game). Incentive compatible and rational strategies exist: drawing p from a fixed distribution (i.e. all Sb are the same), and letting a = 1{b ≥p} suffices.2 We define the regret in the single-shot setting of any incentive-compatible and rational strategy S with respect to value v as SSRegret(S, v) = v −E(p,a)∼Sv[ap]. The following loose lower bound on SSRegret(S, v) is straightforward, and establishes that a seller’s revenue cannot be a constant fraction of the buyer’s value for all v. The full proof is provided in the appendix (Section C.1). Lemma 3. For any incentive compatible and rational strategy S there exists v ∈[0, 1] such that SSRegret(S, v) ≥ 1 12. 6.2 Repeated Auction Returning to the repeated setting, our main lower bound will make use of the following technical lemma, the full proof of which is provided in the appendix (Section C.1). Informally, the Lemma states that the surplus enjoyed by an optimal buyer algorithm would only increase if this surplus were viewed without discounting. Lemma 4. Let the buyer’s discount sequence {γt} be positive and nonincreasing. For any seller algorithm A, value distribution D, and surplus-maximizing buyer algorithm B∗(A, D), E "!T t=1 γtat(vt −pt) $ ≤E "!T t=1 at(vt −pt) $ Notice if at(vt −pt) ≥0 for all t, then the Lemma 4 is trivial. This would occur if the buyer only ever accepts prices less than its value (at = 1 only if pt ≤vt). However, Lemma 4 is interesting in that it holds for any seller algorithm A. It’s easy to imagine a seller algorithm that incentivizes the buyer to sometimes accept a price pt > vt with the promise that this will generate better prices in the future (e.g. setting pt′ = 1 and offering pt = 0 for all t > t′ only if at′ = 1 and otherwise setting pt = 1 for all t > t′). Lemmas 3 and 4 let us prove our main lower bound. Theorem 3. Fix a positive, nonincreasing, discount sequence {γt}. Let A be any seller algorithm for the repeated setting. There exists a buyer value distribution D such that Regret(A, D, T) ≥ 1 12Tγ. In particular, if Tγ = Ω(T), no-regret is impossible. Proof. Let {ab,t, pb,t} be the sequence of prices and allocations generated by playing B∗(A, b) against A. For each b ∈[0, 1] and p ∈[0, 1) × {0, 1}, let µb(p, a) = 1 Tγ !T t=1 γt1{ab,t = a}1{pb,t = p}. Notice that µb(p, a) > 0 for countably many (p, a) and let Ωb = {(p, a) ∈ [0, 1] × {0, 1} : µb(p, a) > 0}. We think of µb as being a distribution. It’s in fact a random measure since the {ab,t, pb,t} are themselves random. One could imagine generating µb by playing B∗(A, b) against A and observing the sequence {ab,t, pb,t}. Every time we observe a price pb,t = p and allocation ab,t = a, we assign 1 Tγ γt additional mass to (p, a) in µb. This is impossible in practice, but the random measure µb has a well-defined distribution. Now consider the following strategy S for the single-shot setting. Sb is induced by drawing a µb, then drawing (p, a) ∼µb. Note that for any b ∈[0, 1] and any measurable function f 2This subclass of auctions is even ex post rational. 7 E(p,a)∼Sb[f(a, p)] = Eµb∼Sb * E(p,a)∼µb[f(a, b) | µb] + = 1 Tγ E " !T t=1 γtf(ab,t, pb,t) $ . Thus the strategy S is incentive compatible, since for any b, v ∈[0, 1] E(p,a)∼Sb[a(v −p)] = 1 Tγ E , T ' t=1 γtab,t(v −pb,t) = 1 Tγ BuyerSurplus(A, B∗(A, b), v, T) ≤1 Tγ BuyerSurplus(A, B∗(A, v), v, T) = 1 Tγ E , T ' t=1 γtav,t(v −pv,t) = E(p,a)∼Sv[a(v −p)] where the inequality follows from the fact that B∗(A, v) is a surplus-maximizing algorithm for a buyer whose value is v. The strategy S is also rational, since for any v ∈[0, 1] E(p,a)∼Sv[a(v −p)] = 1 Tγ E , T ' t=1 γtav,t(v −pv,t) = 1 Tγ BuyerSurplus(A, B∗(A, v), v, T) ≥0 where the inequality follows from the fact that a surplus-maximizing buyer algorithm cannot earn negative surplus, as a buyer can always reject every price and earn zero surplus. Let rt = 1 −γt and Tr = !T t=1 rt. Note that rt ≥0. We have the following for any v ∈[0, 1]: TγSSRegret(S, v) = Tγ ( v −E(p,a)∼Sv[ap] ) = Tγ . v −1 Tγ E , T ' t=1 γtav,tpv,t -/ = Tγv −E , T ' t=1 γtav,tpv,t = (T −Tr)v −E , T ' t=1 (1 −rt)av,tpv,t = Tv −E , T ' t=1 av,tpv,t + E , T ' t=1 rtav,tpv,t −Trv = Regret(A, v, T)+E , T ' t=1 rtav,tpv,t −Trv = Regret(A, v, T)+E , T ' t=1 rt(av,tpv,t −v) A closer look at the quantity E "!T t=1 rt(av,tpv,t −v) $ , tells us that: E "!T t=1 rt(av,tpv,t −v) $ ≤ E "!T t=1 rtav,t(pv,t −v) $ = −E "!T t=1(1 −γt)av,t(v −pv,t) $ ≤0, where the last inequality follows from Lemma 4. Therefore TγSSRegret(S, v) ≤Regret(A, v, T) and taking D to be the point-mass on the value v ∈[0, 1] which realizes Lemma 3 proves the statement of the theorem. 7 Conclusion In this work, we have analyzed the performance of revenue maximizing algorithms in the setting of a repeated posted-price auction with a strategic buyer. We show that if the buyer values inventory in the present more than in the far future, no-regret (with respect to revenue gained against a truthful buyer) learning is possible. Furthermore, we provide lower bounds that show such an assumption is in fact necessary. These are the first bounds of this type for the presented setting. Future directions of study include studying buyer behavior under weaker polynomial discounting rates as well understanding when existing “off-the-shelf” bandit-algorithm (UCB, or EXP3), perhaps with slight modifications, are able to perform well against strategic buyers. Acknowledgements We thank Corinna Cortes, Gagan Goel, Yishay Mansour, Hamid Nazerzadeh and Noam Nisan for early comments on this work and pointers to relevent literature. 8 References [1] Alessandro Acquisti and Hal R. Varian. Conditioning prices on purchase history. Marketing Science, 24(3):367–381, 2005. [2] Raman Arora, Ofer Dekel, and Ambuj Tewari. Online bandit learning against an adaptive adversary: from regret to policy regret. In ICML, 2012. [3] Peter Auer, Nicol`o Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002. [4] Peter Auer, Nicolo Cesa-Bianchi, Yoav Freund, and Robert E Schapire. The nonstochastic multiarmed bandit problem. Journal on Computing, 32(1):48–77, 2002. [5] Moshe Babaioff, Robert D Kleinberg, and Aleksandrs Slivkins. Truthful mechanisms with implicit payment computation. In Proceedings of the Conference on Electronic Commerce, pages 43–52. ACM, 2010. [6] Moshe Babaioff, Yogeshwer Sharma, and Aleksandrs Slivkins. Characterizing truthful multiarmed bandit mechanisms. In Proceedings of Conference on Electronic Commerce, pages 79–88. ACM, 2009. [7] Ziv Bar-Yossef, Kirsten Hildrum, and Felix Wu. Incentive-compatible online auctions for digital goods. In Proceedings of Symposium on Discrete Algorithms, pages 964–970. SIAM, 2002. [8] Avrim Blum, Vijay Kumar, Atri Rudra, and Felix Wu. Online learning in online auctions. In Proceedings Symposium on Discrete algorithms, pages 202–204. SIAM, 2003. [9] Nicolo Cesa-Bianchi, Claudio Gentile, and Yishay Mansour. Regret minimization for reserve prices in second-price auctions. In Proceedings of the Symposium on Discrete Algorithms. SIAM, 2013. [10] Ofer Dekel, Felix Fischer, and Ariel D Procaccia. Incentive compatible regression learning. Journal of Computer and System Sciences, 76(8):759–777, 2010. [11] Nikhil R Devanur and Sham M Kakade. The price of truthfulness for pay-per-click auctions. In Proceedings of the Conference on Electronic commerce, pages 99–106. ACM, 2009. [12] Benjamin Edelman and Michael Ostrovsky. Strategic bidder behavior in sponsored search auctions. Decision support systems, 43(1):192–198, 2007. [13] Drew Fudenberg and J. Miguel Villas-Boas. Behavior-Based Price Discrimination and Customer Recognition. Elsevier Science, Oxford, 2007. [14] Jason Hartline. Dynamic posted price mechanisms, 2001. [15] Robert Kleinberg and Tom Leighton. The value of knowing a demand curve: Bounds on regret for online posted-price auctions. In Symposium on Foundations of Computer Science, pages 594–605. IEEE, 2003. [16] Volodymyr Kuleshov and Doina Precup. Algorithms for the multi-armed bandit problem. Journal of Machine Learning, 2010. [17] Reshef Meir, Ariel D Procaccia, and Jeffrey S Rosenschein. Strategyproof classification with shared inputs. Proc. of 21st IJCAI, pages 220–225, 2009. [18] Herbert Robbins. Some aspects of the sequential design of experiments. In Herbert Robbins Selected Papers, pages 169–177. Springer, 1985. 9
2013
220
4,955
Multilinear Dynamical Systems for Tensor Time Series Mark Rogers Lei Li Stuart Russell EECS Department, University of California, Berkeley markrogersjr@berkeley.edu, {leili,russell}@cs.berkeley.edu Abstract Data in the sciences frequently occur as sequences of multidimensional arrays called tensors. How can hidden, evolving trends in such data be extracted while preserving the tensor structure? The model that is traditionally used is the linear dynamical system (LDS) with Gaussian noise, which treats the latent state and observation at each time slice as a vector. We present the multilinear dynamical system (MLDS) for modeling tensor time series and an expectation–maximization (EM) algorithm to estimate the parameters. The MLDS models each tensor observation in the time series as the multilinear projection of the corresponding member of a sequence of latent tensors. The latent tensors are again evolving with respect to a multilinear projection. Compared to the LDS with an equal number of parameters, the MLDS achieves higher prediction accuracy and marginal likelihood for both artificial and real datasets. 1 Introduction A tenet of mathematical modeling is to faithfully match the structural properties of the data; yet, on occasion, the available tools are inadequate to perform the task. This scenario is especially common when the data are tensors, i.e., multidimensional arrays: vector and matrix models are fitted to them without justification. This is, perhaps, due to the lack of an agreed-upon tensor model. There are many examples that seem to require such a model: The spatiotemporal grid of atmospheric data in climate modeling is a time series of n×m×l tensors, where n, m and l are the numbers of latitude, longitude, and elevation grid points. If k measurements—e.g., temperature, humidity, and wind speed for k=3—are made, then a time series of n×m×l ×k tensors is constructed. The daily high, low, opening, closing, adjusted closing, and volume of the stock prices of n multiple companies comprise a time series of 6 × n tensors. A grayscale video sequence is a two-dimensional tensor time series because each frame is a two-dimensional array of pixels. Several queries can be made when one is presented with a tensor time series. As with any time series, a forecast of future data may be requested. For climate data, successful prediction may spell out whether the overall ocean temperatures will increase. Prediction of stock prices may not only inform investors but also help to stabilize the economy and prevent market collapse. The relationships between particular subsets of tensor elements could be of significance. How does the temperature of the ocean at 8◦N, 165◦E affect the temperature at 5◦S, 125◦W? For stock price data, one may investigate how the stock prices of electric car companies affect those of oil companies. For a video sequence, one might expect adjacent pixels to be more correlated than those far away from each other. Another way to describe the relationships among tensor elements is in terms of their covariances. Equipped with a tabulation of the covariances, one may read off how a given tensor element affects others. Later in this paper, we will define a tensor time series model and a covariance tensor that permits the modeling of general noise relationships among tensor elements. More formally, a tensor X ∈RI1×···×IM is a multidimensional array with elements that can each be indexed by a vector of positive integers. That is, every element Xi1···iM ∈R is uniquely addressed 1 by a vector (i1, · · · , iM) such that 1 ≤im ≤Im for all m. Each of the M dimensions of X is called a mode and represents a particular component of the data. The simplest tensors are vectors and matrices: vectors are tensors with only a single mode, while matrices are tensors with two modes. We will consider the tensor time series, which is an ordered, finite collection of tensors that all share the same dimensionality. In practice, each member of an observed tensor time series reflects the state of a dynamical system that is measured at discrete epochs. We propose a novel model for tensor time series: the multilinear dynamical system (MLDS). The MLDS explicitly incorporates the dynamics, noise, and tensor structure of the data by juxtaposing concepts in probabilistic graphical models and multilinear algebra. Specifically, the MLDS generalizes the states of the linear dynamical system (LDS) to tensors via a probabilistic variant of the Tucker decomposition. The LDS tracks latent vector states and observed vector sequences; this permits forecasting, estimation of latent states, and modeling of noise but only for vector objects. Meanwhile, the Tucker decomposition of a single tensor computes a latent “core” tensor but has no dynamics or noise capabilities. Thus, the MLDS achieves the best of both worlds by uniting the two models in a common framework. We show that the MLDS, in fact, generalizes LDS and other well-known vector models to tensors of arbitrary dimensionality. In our experiments on both synthetic and real data, we demonstrate that the MLDS outperforms the LDS with an equal number of parameters. 2 Tensor algebra Let N be the set of all positive integers and R be the set of all real numbers. Given I ∈NM, where M ∈N, we assemble a tensor-product space RI1×···×IM , which will sometimes be written as RI = R(I1,...,IM) for shorthand. Then a tensor X ∈RI1×···×IM is an element of a tensor-product space. A tensor X may be referenced by either a full vector (i1, . . . , iM) or a by subvector, using the • symbol to indicate coordinates that are not fixed. For example, let X ∈RI1×I2×I3. Then Xi1i2i3 is a scalar, X•i2i3 ∈RI1 is the vector obtained by setting the second and third coordinates to i2 and i3, and X••i3 ∈RI1×I2 is the matrix obtained by setting the third coordinate to i3. The concatenation of two M-dimensional vectors I = (I1, . . . , IM) and J = (J1, . . . , JM) is given by IJ = (I1, . . . , IM, J1, . . . , JM), a vector with 2M entries. Let X ∈RI1×···×IM , M ∈N. The vectorization vec(X) ∈RI1···IM is obtained by shaping the tensor into a vector. In particular, the elements of vec(X) are given by vec(X)k = Xi1···iM , where k = 1 + PM m=1 Qm−1 n=1 In(im −1). For example, if X ∈R2×3×2 is given by X••1 =  1 3 5 2 4 6  , X••2 =  7 9 11 8 10 12  , then vec(X) = (1 2 3 4 5 6 7 8 9 10 11 12)T . Let I, J ∈NM, M ∈N. The matricization mat(A) ∈RI1···IM×J1···JM of a tensor A ∈RIJ is given by mat(A)kl = Ai1···iMj1···jM , where k = 1 + PM m=1 Qm−1 n=1 In(im −1) and l = 1 + PM m=1 Qm−1 n=1 Jn(jm −1). The matricization “flattens” a tensor into a matrix. For example, define A ∈R2×2×2×2 by A••11 =  1 3 2 4  , A••21 =  5 7 6 8  , A••12 =  9 11 10 12  , A••22 =  13 15 14 16  . Then we have mat(A) =    1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16   . The vec and mat operators put tensors in bijective correspondence with vectors and matrices. To define the inverse of each of these operators, a reference must be made to the dimensionality of the original tensor. In other words, given X ∈RI and A ∈RIJ, where I, J ∈NM, M ∈N, we have X = vec−1 I (vec(X)) and A = mat−1 IJ (mat(A)). Let I, J ∈NM, M ∈N. The factorization of a tensor A ∈RIJ is given by Ai1···iMj1···jM = QM m=1 A(m) imjm, where A(m) ∈RIm×Jm for all m. The factorization exponentially reduces the 2 number of parameters needed to express A from QM m=1 ImJm to PM m=1 ImJm. In matrix form, we have mat(A) = A(M) ⊗A(M−1) ⊗· · · ⊗A(1), where ⊗is the Kronecker matrix product [1]. Note that tensors in RIJ are not factorizable in general [2]. The product A ⊛X of two tensors A ∈RIJ and X ∈RJ, where I, J ∈NM, M ∈N, is given by (A ⊛X)i1···iM = P j1···jM Ai1···iMj1···jM Xj1···jM . The tensor A is called a multilinear operator when it appears in a tensor product as above. The product is only defined if the dimensionalities of the last M modes of A match the dimensionalities of X. Note that this tensor product generalizes the standard matrix-vector product in the case M = 1. We shall primarily work with tensors in their vector and matrix representations. Hence, we appeal to the following Lemma 1. Let I, J ∈NM, M ∈N, A ∈RIJ, X ∈RJ. Then vec(A ⊛X) = mat(A) vec(X) . (1) Furthermore, if A is factorizable with matrices A(m), then vec(A ⊛X) = h A(M) ⊗· · · ⊗A(1)i vec(X) . (2) Proof. Let k = 1 + PM m=1 Qm−1 n=1 In(im −1) and l = 1 + PM m=1 Qm−1 n=1 Jn(jm −1) for some (j1, . . . , jM). We have vec(A ⊛X)k = X j1···jM Ai1···iMj1···jM Xj1···jM = X l mat(A)kl vec(X)l = (mat(A) vec(X))k , which holds for all 1 ≤im ≤Im, 1 ≤m ≤M. Thus, (1) holds. To prove (2), we express mat(A) as the Kronecker product of M matrices A(1), . . . , A(M). The Tucker decomposition can be expressed using the product ⊛defined above. The Tucker decomposition models a given tensor X ∈RI1×···×IM as the result of a multilinear transformation that is applied to a latent core tensor Z ∈RJ1×···×JM : X = A ⊛Z. Z X = A(2) A(3) A(1) Figure 1: The Tucker decomposition of a third-order tensor X. The multilinear operator A is a factorizable tensor such that mat(A) = A(M)⊗A(M−1)⊗· · ·⊗A(1),. where A(1), . . . , A(M) are projection matrices (Figure 1). The canonical decomposition/parallel factors (CP) decomposition is a special case of the Tucker decomposition in which Z is “superdiagonal”, i.e., J1 = · · · = JM = R and only the Zj1···jM such that j1 = · · · = jM can be nonzero. The CP decomposition expresses X as a sum X = PR r=1 u(1) r ◦· · · ◦u(M) r , where u(m) r ∈RIm for all m and r and ◦denotes the tensor outer product [3]. To illustrate, consider the case M = 2 and let X = A⊛Z, where X ∈Rn×m and Z ∈Rp×q. Then X = AZBT, where mat(A) = B ⊗A. If p ≤n and q ≤m, then Z is a dimensionality-reduced version of X: the matrix A increases the number of rows of Z from p to n via left-multiplication, while the matrix B increases the number of columns of Z from q to m via right-multiplication. To reconstruct X, we simply apply A ⊛Z. See Figure 1 for an illustration of the case M = 3. 3 Random tensors Given I ∈NM, M ∈N, we define a random tensor X ∈RI1×···×IM as follows. Suppose vec(X) is normally distributed with expectation vec(U) and positive-definite covariance mat(S), where U ∈ RI and S ∈RII. Then we say that X has the normal distribution with expectation U ∈RI and covariance S ∈RII and write X ∼N (U, S). The definition of the normal distribution on tensors can thus be restated more succinctly as X ∼N (U, S) ⇐⇒vec(X) ∼N (vec U, mat S) . (3) Our formulation extends the normal distribution defined in [4], which is restricted to symmetric, second-order tensors. 3 We will make use of an important special case of the normal distribution defined on tensors: the multilinear Gaussian distribution. Let I, J ∈NM, M ∈N, and suppose X ∈RI and Z ∈RJ are jointly distributed as Z ∼N (U, G) and X | Z ∼N (C ⊛Z, S) , (4) where C ∈RIJ. The marginal distribution of X and the posterior distribution of Z given X are given by the following result. Lemma 2. Let I, J ∈NM, M ∈N, and suppose the joint distribution of random tensors X ∈RI and Z ∈RJ is given by (4). Then the marginal distribution of X is X ∼N C ⊛U, C ⊛G ⊛CT + S  , (5) where CT ∈RJI and CT j1···jMi1···iM = Ci1···iMj1···jM . The conditional distribution of Z given X is Z | X ∼N  ˆU, ˆG  , (6) where ˆU = vec−1 J (µ + W (vec(X) −mat(C) µ)), ˆG = mat−1 JJ (Γ −Wmat(C) Γ), µ = vec(U), Γ = mat(G), Σ = mat(S), and W = Γmat(C)T h mat(C) Γmat(C)T + Σ i−1 . Proof. Lemma 1, (3), and (4) imply that the vectorizations of Z and X given Z follow vec(Z) ∼ N (µ, Γ) and vec(X) | vec(Z) ∼N (mat(C) vec(Z) , Σ). By the properties of the multivariate normal distribution, the marginal distribution of vec(X) and the conditional distribution of vec(Z) given vec(X) are vec(X) ∼N(mat(C) vec(U), mat(C) Γmat(C)T + Σ) and vec(Z) | vec(X) ∼ N(vec(ˆU), mat(ˆG)). The associativity of ⊛implies that mat(C ⊛G ⊛CT) = mat(C) Γmat(C)T. Finally, we apply Lemma 1 once more to obtain (5) and (6). 4 Multilinear dynamical system The aim is to develop a model of a tensor time series X1, . . . , XN that takes into account tensor structure. In defining the MLDS, we build upon the results of previous sections by treating each Xn as a random tensor and relating the model components with multilinear transformations. When the MLDS components are vectorized and matricized, an LDS with factorized transition and projection matrices is revealed. Hence, the strategy for fitting the MLDS is to vectorize each Xn, run the expectation-maximization (EM) algorithm of the LDS for all components but the matricized transition and projection tensors–which are learned via an alternative gradient method–and finally convert all model components back to tensor form. 4.1 Definition Let I, J ∈NM, M ∈N. The MLDS model consists of a sequence Z1, . . . , ZN of latent tensors, where Zn ∈RJ1×···×JM for all n. Each latent tensor Zn emits an observation Xn ∈RI1×···×IM . The system is initialized by a latent tensor Z1 distributed as Z1 ∼N (U0, Q0) . (7) Given Zn, 1 ≤n ≤N −1, we generate Zn+1 according to the conditional distribution Zn+1 | Zn ∼N (A ⊛Zn, Q) , (8) where Q is the conditional covariance shared by all Zn, 2 ≤n ≤N, and A is the transition tensor which describes the dynamics of the evolving sequence Z1, . . . , ZN. The transition tensor A is factorized into M matrices A(m), each of which acts on a mode of Zn. In matrix form, we have mat(A) = A(M) ⊗· · · ⊗A(1). To each Zn there corresponds an observation Xn generated by Xn | Zn ∼N (C ⊛Zn, R) , (9) 4 ... ... X1 Z1 Z2 X2 Xn Zn Xn+1 Zn+1 XN ZN Figure 2: Schematic of the MLDS with three modes. where R is the covariance shared by all Xn and C is the projection tensor which multilinearly transforms the latent tensor Zn. Like the transition tensor A, the projection tensor C is factorizable, i.e., mat(C) = C(M) ⊗· · · ⊗C(1). See Figure 2 for an illustration of the MLDS. By vectorizing each Xn and Zn, the MLDS becomes an LDS with factorized transition and projection matrices mat(A) and mat(C). For the LDS, the transition and projection operators are not factorizable in general [2]. The factorizations of A and C for the MLDS not only allow for a generalized dimensionality reduction of tensors but exponentially reduce the number of parameters of the transition and projection operators from |ALDS| + |CLDS| = QM m=1 J2 m + QM m=1 ImJm down to |AMLDS| + |CMLDS| = PM m=1 J2 m + PM m=1 ImJm. 4.2 Parameter estimation Given a sequence of observations X1, . . . , XN, we wish to fit the MLDS model by estimating θ = (U0, Q0, Q, A, R, C). Because the MLDS model contains latent variables Zn, we cannot directly maximize the likelihood of the data with respect to θ. The EM algorithm circumvents this difficulty by iteratively updating (E(Z1), . . . , E(ZN)) and θ in an alternating manner until the expected, complete likelihood of the data converges [5]. The normal distribution of tensors (3) will facilitate matrix and vector computations rather than compel us to work directly with tensors. In particular, we can express the complete likelihood of the MLDS model as L (θ | Z1, X1, . . . , ZN, XN) = L (vec θ | vec Z1, vec X1, . . . , vec ZN, vec XN) , (10) where vec θ = (vec U0, mat Q0, mat Q, mat A, mat R, mat C). It follows that the vectorized MLDS is an LDS that inherits the Kalman filter updates for the E-step and the M-step for all parameters except mat A and mat C. See [6] for the EM algorithm of the LDS. Because A and C are factorizable, an alternative to the standard LDS updates is required. We locally maximize the expected, complete log-likelihood by computing the gradient with respect to the vector v = [vec C(1)T · · · vec C(M)T]T ∈R P m ImJm, which is obtained by concatenating the vectorizations of the projection matrices C(m). The expected, complete log-likelihood (with terms constant with respect to C deleted) can be written as l(v) =tr n Ωmat(C) h Ψmat(C)T −2ΦTio , (11) where Ω= mat(ˆR)−1, Ψ = PN n=1 E(vec Znvec ZT n), and Φ = PN n=1 vec (Xn)E(vec Zn)T. Now let k correspond to some C(m) ij and let ∆ij ∈RIm×Jm be the indicator matrix that is one at the (i, j)th entry and zero elsewhere. The gradient ∇l(v) ∈R P m ImJm is given elementwise by ∇l(v)k = 2tr n Ω∂vkmat(C) h Ψmat(C)T −ΦTio , (12) where ∂vkmat(C) = C(M) ⊗· · ·⊗∆ij ⊗· · ·⊗C(1) [1]. If m = M, then we can exploit the sparsity of ∂vkmat(C) by computing the trace of the product of two submatrices each with Q n̸=M In rows and Q n̸=M Jn columns: ∇l(v)k = 2tr h C(M−1) ⊗· · · ⊗C(1)iT Λij  , (13) where Λij is the submatrix of Ω[mat(C) Ψ −Φ] with row indices (1, . . . , Q n̸=M In) shifted by Q n̸=M In(i −1) and column indices (1, . . . , Q n̸=M Jn) shifted by Q n̸=M Jn(j −1). If m ̸= M, then the ordering of the modes can be replaced by 1, . . . , m −1, m + 1, . . . , M, m and the rows and columns of Ω[mat(C) Ψ −Φ] can be permuted accordingly. In other words, the original tensors Xn are “rotated” so that the mth mode becomes the M th mode. The M-step for A can be computed in a manner analogous to that of C by replacing I by J, replacing mat(C) by mat(A), and substituting v = [vec(A(1))T · · · vec(A(M))T]T, Ω= mat(Q)−1, Ψ = PN−1 n=1 E h vec(Zn) vec(Zn)Ti , and Φ = PN−1 n=1 E h vec(Zn+1) vec(Zn)Ti into (11). 5 4.3 Special cases of the MLDS and their relationships to existing models It is clear that the MLDS is exactly an LDS in the case M = 1. Certain constraints on the MLDS also lead to generalizations of factor analysis, probabilistic principal components analysis (PPCA), the CP decomposition, and the matrix factorization model of collaborative filtering (MF). Let p = QM m=1 Im and q = QM m=1 Jm. If A = 0, U0 = 0, and Q0 = Q, then the Xn of the MLDS become independent and identically distributed draws from the multilinear Gaussian distribution. Setting mat(Q) = Idq and mat(R) to a diagonal matrix results in a model that reduces to factor analysis in the case M = 1. A further constraint on R, mat(R) = ρ2Idp, yields a multilinear extension of PPCA. Removing the constraints on R and forcing mat(Zn) = Idq for all n results in a probabilistic CP decomposition in which the tensor elements have general covariances. Finally, the constraint M = 2 yields a probabilistic MF. 5 Experimental results To determine how well the MLDS could model tensor time series, the fits of the MLDS were compared to those of the LDS for both synthetic and real data. To avoid unnecessary complexity and highlight the difference between the two models—namely, how the transition and projection operators are defined—the noises in the models are isotropic. The MLDS parameters are initialized so that U0 is drawn from the standard normal distribution, the matricizations of the covariance tensors are identity matrices, and the columns of each A(m) and C(m) are the first Jm eigenvectors of singular-value-decomposed matrices with entries drawn from the standard normal distribution. The LDS parameters are initialized in the same way by setting M = 1. The prediction error and convergence in likelihood were measured for each dataset. For the synthetic dataset, model complexity was also measured. The prediction error ϵM n of a given model M for the nth member of a tensor time series X1, . . . , XN is the relative Euclidean distance Xn −XM n / ||Xn||, where ||·|| = ||vec(·)||2. Each estimate XM n is given by XM n = vec−1 I mat CM mat AMn vec E  ZM Ntrain  , where E  ZM Ntrain  is the estimate of the latent state of the last member of the training sequence. The convergence in likelihood of each model is determined by monitoring the marginal likelihood as the number of EM iterations increases. Each model is allowed to run until the difference between consecutive log-likelihood values is less than 0.1% of the latter value. Lastly, the model complexity is determined by observing how the likelihood and prediction error of each model vary as the model size |θM| increases. Aside from the model complexity experiment, the LDS latent dimensionality is always set to the smallest value such that the number of parameters of the LDS is greater than or equal to that of the MLDS. 5.1 Results for synthetic data The synthetic dataset is an MLDS with dimensions I = (7, 11), J = (3, 5), and N = 1100 and parameters initialized as described in the first paragraph of this section. For the prediction error and convergence analyses, the latent dimensionality of the MLDS for fitting was set to J = (3, 5) as well. Each model was trained on the first 1000 elements and tested on the last 100 elements of the sequence. The results are shown in Figure 3. According to Figure 3(a), the prediction error of MLDS matches that of the true model and is below that of the LDS. Furthermore, the MLDS converges to the likelihood of the true model, which is greater than that of the LDS (see Figure 3(b)). As for model complexity, the model size needed for the MLDS to match the likelihood and prediction error of the true model is much smaller than that of the LDS (see Figure 3(c) and (d)). 5.2 Results for real data We consider the following datasets: SST: A 5-by-6 grid of sea-surface temperatures from 5◦N, 180◦W to 5◦S, 110◦W recorded hourly from 7:00PM on 4/26/94 to 3:00AM on 7/19/94, yielding 2000 epochs [7]. Tesla: Opening, closing, high, low, and volume of the stock prices of 12 car and oil companies (e.g., Tesla Motors Inc.), from 6/29/10 to 5/10/13 (724 epochs). NASDAQ-100: Opening, closing, adjusted-closing, high, low, and volume for 20 randomlychosen NASDAQ-100 companies, from 1/1/05 to 12/31/09 (1259 epochs). 6 1020 1060 1100 0 0.5 1 Time slice Error LDS MLDS true (a) 5 10 15 20 −4 −2 0x 10 6 Number of EM iterations Log−likelihood LDS MLDS true (b) 0 1000 2000 −3 −2 −1x 10 5 Number of parameters Log−likelihood LDS MLDS true (c) 0 1000 2000 0 50 100 Number of parameters Cumulative error LDS MLDS true (d) Figure 3: Results for synthetic data. Prediction error ϵM n = Xn −XM n / ||Xn|| is shown as a function of the time slice n in (a), convergence of marginal log-likelihood is shown in (b), marginal log-likelihood as a function of model size is shown in (c), and cumulative prediction error PNtrain+Ntest n=Ntrain+1 ϵM n as a function of model size is shown in (d) for LDS, MLDS, and the true model. 1850 1900 1950 2000 0 20 40 60 Time slice Error LDS MLDS (a) SST 705 710 715 720 0.2 0.4 0.6 0.8 1 Time slice Error LDS MLDS (b) Tesla 1210 1230 1250 0.2 0.4 0.6 0.8 1 Time slice Error LDS MLDS (c) NASDAQ-100 1050 1100 1150 0 50 100 150 Time slice Error LDS MLDS (d) Video 5 10 15 20 25 −8 −6 −4x 10 4 Number of EM iterations Log−likelihood LDS MLDS (e) SST 10 20 30 40 −8 −6 −4 −2x 10 4 Number of EM iterations Log−likelihood LDS MLDS (f) Tesla 20 40 60 −3 −2 −1 0x 10 5 Number of EM iterations Log−likelihood LDS MLDS (g) NASDAQ-100 20 40 60 −1.5 −1 −0.5x 10 5 Number of EM iterations Log−likelihood LDS MLDS (h) Video Figure 4: Results for LDS and MLDS applied to real data. The first row corresponds to prediction error ϵM n as a function of the time slice n, while the second corresponds to convergence in log-likelihood. Sea-surface temperature, Tesla, NASDAQ-100, and Video results are given by the respective columns. Video: 1171 grayscale frames of ocean surf during low tide. This dataset was chosen because it records a quasiperiodic natural scene. For each dataset, MLDS achieved higher prediction accuracy and likelihood than LDS. For the SST dataset, each model was trained on the first 1800 epochs; occlusions were filled in using linear interpolation and refined with an extra step during the learning that replaced the estimates of the occluded values by the conditional expectation given all the training data. For results when the MLDS dimensionality is set to (3, 3), see Figure 4(a) and (e). For the Tesla dataset, each time series ((X1)ij, . . . , (XN)ij) were normalized prior to learning by subtracting by the mean and dividing by the standard deviation. Each model was trained on the first 700 epochs. See Figure 4(b) and (f) for results when the MLDS dimensionality is set to (5, 2). For the NASDAQ-100 dataset, each model was trained on the first 1200 epochs. The data were normalized in the same way as with the Tesla dataset. For results when the MLDS dimensionality is set to (10, 3), see Figure 4(c) and (g). For the Video dataset, a 100-by-100 patch was selected, spatially downsampled to a 10-by-10 patch for each frame, and normalized as before. Each model was trained on the first 1000 frames. See Figure 4(d) and (h) for results when the MLDS dimensionality is set to (5, 5). 6 Related work Several existing models can be fitted to tensor time series. If each tensor is “vectorized”, i.e., reexpressed as a vector so that each element is indexed by a single positive integer, then an LDS can be applied [8, 6]. An obvious limitation of the LDS for modeling tensor time series is that the tensor structure is not preserved. Thus, it is less clear how the latent vector space of the LDS relates to the various tensor modes. Further, one cannot postulate a latent dimension for each mode as with the MLDS. The net result, as we have shown, is that the LDS requires more parameters than the MLDS to model a given system (assuming it does have tensor structure). 7 Dynamic tensor analysis (DTA) and Bayesian probabilistic tensor factorization (BPTF) are explicit models of tensor time series [9, 10]. For DTA, a latent, low-dimensional “core” tensor and a set of projection matrices are learned by processing each member Xn ∈RI1×···×IM of the sequence as follows. For each mode m, the tensor is flattened into a matrix X(m) n ∈R(Q k̸=m Ik)×Im and then multiplied by its transpose. The result X(m)T n X(m) n is added to a matrix S(m) that has accumulated the flattenings of the previous n −1 tensors. The eigenvalue decomposition UΛU T of the updated S(m) is then computed and the mth projection matrix is given by the first rank S(m) columns of U. After this procedure is carried out for each mode, the core tensor is updated via the multilinear transformation given by the Tucker decomposition. Like the LDS, DTA is a sequential model. An advantage of DTA over the LDS is that the tensor structure of the data is preserved. A disadvantage is that there is no straightforward way to predict future terms of the tensor time series. Another disadvantage is that there is no mechanism that allows for arbitrary noise relationships among the tensor elements. In other words, the noise in the system is assumed to be isotropic. Other families of isotropic models have been devised that “tensorize” the time dimension by concatenating the tensors in the time series to yield a single new tensor with an additional temporal mode. These models include multilinear principal components analysis [11], the memory-efficient Tucker algorithm [12], and Bayesian tensor analysis [13]. For fitting to data, such models rely on alternating optimization methods, such as alternating least squares, which are applied to each mode. BPTF allows for prediction and more general noise modeling than DTA. BPTF is a multilinear extension of collaborative filtering models [14, 15, 16] that concatenates the members of the tensor time series (Xn), Xn ∈RI1×···×IM , to yield a higher-order tensor R ∈ RI1×···×IM×K, where K is the sequence length. Each element of R is independently distributed as Ri1···iMk ∼N(⟨u(1) i1 , . . . , u(M) iM , Tk⟩, α−1), where ⟨·, . . . , ·⟩denotes the tensor inner product and α is a global precision parameter. Bayesian methods are then used to compute the canonicaldecomposition/parallel-factors (CP) decomposition of R: R = PR r=1 u(1) r ◦· · ·◦u(M) r ◦Tr, where ◦is the tensor outer product. Each u(m) r is independently drawn from a normal distribution with expectation µm and precision matrix Λm, while each Tr is recursively drawn from a normal distribution with expectation Tr−1 and precision matrix ΛT . The parameters, in turn, have conjugate prior distributions whose posterior distributions are sampled via Markov-chain Monte Carlo for model fitting. Though BPTF supports prediction and general noise models, the latent tensor structure is limited. Other models with anisotropic noise include probabilistic tensor factorization (PTF) [17], tensor probabilistic independent component analysis (TPICA) [18], and generalized coupled tensor factorization (GCTF) [19]. As with BPTF, PTF and TPICA utilize the CP decomposition of tensors. PTF is fit to tensor data by minimizing a heuristic loss function that is expressed as a sum of tensor inner products. TPICA iteratively flattens the tensor of data, executes a matrix model called probabilistic ICA (PICA) as a subroutine, and decouples the factor matrices of the CP decomposition that are embedded in the “mixing matrix” of PICA. GCTF relates a collection of tensors by a hidden layer of disconnected tensors via tensor inner products, drawing analogies to probabilistic graphical models. 7 Conclusion We have proposed a novel probabilistic model of tensor time series called the multilinear dynamical system (MLDS), based on a tensor normal distribution. By putting tensors and multilinear operators in bijective correspondence with vectors and matrices in a way that preserves tensor structure, the MLDS is formulated so that it becomes an LDS when its components are vectorized and matricized. In matrix form, the transition and projection tensors can each be written as the Kronecker product of M smaller matrices and thus yield an exponential reduction in model complexity compared to the unfactorized transition and projection matrices of the LDS. As noted in Section 4.3, the MLDS generalizes the LDS, factor analysis, PPCA, the CP decomposition, and low-rank matrix factorization. The results of multiple experiments that assess prediction accuracy, convergence in likelihood, and model complexity suggest that the MLDS achieves a better fit than the LDS on both synthetic and real datasets, given that the LDS has the same number of parameters as the MLDS. 8 References [1] Jan R. Magnus and Heinz Neudecker. Matrix Differential Calculus with Applications in Statistics and Econometrics. Wiley, revised edition, 1999. [2] Vin De Silva and Lek-Heng Lim. Tensor rank and the ill-posedness of the best low-rank approximation problem. SIAM Journal on Matrix Analysis and Applications, 30(3):1084–1127, 2008. [3] Tamara G. Kolda. Tensor decompositions and applications. SIAM Review, 51(3):455–500, 2009. [4] Peter J. Basser and Sinisa Pajevic. A normal distribution for tensor-valued random variables: applications to diffusion tensor MRI. IEEE Transactions on Medical Imaging, 22(7):785–794, 2003. [5] Arthur P. Dempster, Nan M. Laird, and Donald B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological), 39(1):1–38, 1977. [6] Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer, 1st edition, 2006. [7] NOAA/Pacific Marine Environmental Laboratory. Tropical Atmosphere Ocean Project. http://www. pmel.noaa.gov/tao/data_deliv/deliv.html. Accessed: May 23, 2013. [8] Zoubin Ghahramani and Geoffrey E. Hinton. Parameter estimation for linear dynamical systems. Technical Report CRG-TR-96-2, University of Toronto Department of Computer Science, 1996. [9] Jimeng Sun, Dacheng Tao, and Christos Faloutsos. Beyond streams and graphs: dynamic tensor analysis. In Proceedings of the 12th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 374–383. ACM, 2006. [10] Liang Xiong, Xi Chen, Tzu-Kuo Huang, Jeff Schneider, and Jaime G. Carbonell. Temporal collaborative filtering with Bayesian probabilistic tensor factorization. In Proceedings of SIAM Data Mining, 2010. [11] Haipin Lu, Konstantinos N. Plataniotis, and Anastasios N. Venetsanopoulos. MPCA: Multilinear principal components analysis of tensor objects. IEEE Transactions on Neural Networks, 19(1), 2008. [12] Tamara Kolda and Jimeng Sun. Scalable tensor decompositions for multi-aspect data mining. In Eighth IEEE International Conference on Data Mining. IEEE, 2008. [13] Dacheng Tao, Mingli Song, Xuelong Li, Jialie Shen, Jimeng Sun, Xindong Wu, Christos Faloutsos, and Stephen J. Maybank. Bayesian tensor approach for 3-D face modeling. IEEE Transactions on Circuits and Systems for Video Technology, 18(10):1397–1410, 2008. [14] Yehuda Koren, Robert Bell, and Chris Volinsky. Matrix factorization techniques for recommender systems. Computer, 42(8):30–37, 2009. [15] Ruslan Salakhutdinov and Andriy Mnih. Probabilistic matrix factorization. In Advances in Neural Information Processing Systems, volume 20, pages 1257–1264, 2008. [16] Ruslan Salakhutdinov and Andriy Mnih. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In Proceedings of the 25th International Conference on Machine Learning. ACM, 2008. [17] Cyril Goutte and Massih-Reza Amini. Probabilistic tensor factorization and model selection. In Tensors, Kernels, and Machine Learning (TKLM 2010), pages 1–4, 2010. [18] Christian F. Beckmann and Stephen M. Smith. Tensorial extensions of independent component analysis for multisubject FMRI analysis. Neuroimage, 25(1):294–311, 2005. [19] Y. Kenan Yilmaz, A. Taylan Cemgil, and Umut Simsekli. Generalized coupled tensor factorization. In Neural Information Processing Systems. MIT Press, 2011. 9
2013
221
4,956
Computing the Stationary Distribution, Locally Christina E. Lee LIDS, Department of EECS Massachusetts Institute of Technology celee@mit.edu Asuman Ozdaglar LIDS, Department of EECS Massachusetts Institute of Technology asuman@mit.edu Devavrat Shah Department of EECS Massachusetts Institute of Technology devavrat@mit.edu Abstract Computing the stationary distribution of a large finite or countably infinite state space Markov Chain (MC) has become central in many problems such as statistical inference and network analysis. Standard methods involve large matrix multiplications as in power iteration, or simulations of long random walks, as in Markov Chain Monte Carlo (MCMC). Power iteration is costly, as it involves computation at every state. For MCMC, it is difficult to determine whether the random walks are long enough to guarantee convergence. In this paper, we provide a novel algorithm that answers whether a chosen state in a MC has stationary probability larger than some ∆∈(0, 1), and outputs an estimate of the stationary probability. Our algorithm is constant time, using information from a local neighborhood of the state on the graph induced by the MC, which has constant size relative to the state space. The multiplicative error of the estimate is upper bounded by a function of the mixing properties of the MC. Simulation results show MCs for which this method gives tight estimates. 1 Introduction Computing the stationary distribution of a Markov chain (MC) with a very large state space (finite, or countably infinite) has become central to statistical inference. The ability to tractably simulate MCs along with the generic applicability has made Markov Chain Monte Carlo (MCMC) a method of choice and arguably the top algorithm of the twentieth century [1]. However, MCMC and its variations suffer from limitations in large state spaces, motivating the development of super-computation capabilities – be it nuclear physics [2, Chapter 8], Google’s computation of PageRank [3], or stochastic simulation at-large [4]. MCMC methods involve sampling states from a long random walk over the entire state space [5, 6]. It is difficult to determine when the algorithm has walked “long enough” to produce reasonable approximations for the stationary distribution. Power iteration is another method commonly used for computing leading eigenvectors and stationary distributions of MCs. The method involves iterative multiplication of the transition matrix of the MC [7]. However, there is no clearly defined stopping condition in general settings, and computations must be performed at every state of the MC. In this paper, we provide a novel algorithm that addresses these limitations. Our algorithm answers the following question: for a given node i of a countable state space MC, is the stationary probability of i larger than a given threshold ∆∈(0, 1), and can we approximate it? For chosen parameters ∆, ϵ, and α, our algorithm guarantees that for nodes such that the estimate ˆπi < ∆/(1 + ϵ), the true 1 value πi is also less than ∆with probability at least 1 −α. In addition, if ˆπi ≥∆/(1 + ϵ), with probability at least 1 −α, the estimate is within an ϵ times Zmax(i) multiplicative factor away from the true πi, where Zmax(i) is effectively a “local mixing time” for i derived from the fundamental matrix of the transition probability matrix P. The running time of the algorithm is upper bounded by ˜O  ln( 1 α ) ϵ3∆  , which is constant with respect to the MC. Our algorithm uses only a“local” neighborhood of the state i, defined with respect to the Markov graph. Stopping conditions are easy to verify and have provable performance guarantees. Its correctness relies on a basic property: the stationary probability of each node is inversely proportional to the mean of its “return time.” Therefore, we sample return times to the node and use the empirical average as an estimate. Since return times can be arbitrarily long, we truncate sample return times at a chosen threshold. Hence, our algorithm is a truncated Monte Carlo method. We utilize the exponential concentration of return times in Markov chains to establish theoretical guarantees for the algorithm. For finite state Markov chains, we use results from Aldous and Fill [8]. For countably infinite state space Markov chains, we build upon a result by Hajek [9] on the concentration of certain types of hitting times to derive concentration of return times to a given node. We use these concentration results to upper bound the estimation error and the algorithm runtime as a function of the truncation threshold and the mixing properties of the graph. For graphs that mix quickly, the distribution over return times concentrates more sharply around its mean, resulting in tighter performance guarantees. We illustrate the wide applicability of our local algorithm for computing network centralities and stationary distributions of queuing models. Related Work. MCMC was originally proposed in [5], and a tractable way to design a random walk for a target distribution was proposed by Hastings [6]. Given a distribution π(x), the method designs a Markov chain such that the stationary distribution of the Markov chain is equal to the target distribution. Without using the full transition matrix of the Markov chain, Monte Carlo sampling techniques estimate the distribution by sampling random walks via the transition probabilities at each node. As the length of the random walk approaches infinity, the distribution over possible states of the random walk approaches stationary distribution. Articles by Diaconis and Saloff-Coste [10] and Diaconis [11] provide a summary of major developments from a probability theoretic perspective. The majority of work following the initial introduction of the algorithm involves analyzing the convergence rates and mixing times of this random walk [8, 12]. Techniques involve spectral analysis or coupling arguments. Graph properties such as conductance help characterize the graph spectrum for reversible Markov chains. For general non-reversible countably infinite state space Markov chains, little is known about the mixing time. Thus, it is difficult to verify if the random walk has sufficiently converged to the stationary distribution, and before that point there is no guarantee whether the estimate obtained from the random walk is larger or smaller than the true stationary probability. Power iteration is an equally old and well-established method for computing leading eigenvectors of matrices [7]. Given a matrix A and a seed vector x0, power iteration recursively computes xt+1 = Axt ∥Axt∥. The convergence rate of xt to the leading eigenvector is governed by the spectral gap. As mentioned above, techniques for analyzing the spectrum are not well developed for general nonreversible MCs, thus it is difficult to know how many iterations are sufficient. Although power iteration can be implemented in a distributed manner, each iteration requires computation to be performed by every state in the MC, which is expensive for large state space MCs. For countably infinite state space MCs, there is no clear analog to matrix multiplication. In the specialized setting of PageRank, the goal is to compute the stationary distribution of a specific Markov chain described by a transition matrix P = (1 −β)Q + β1 · rT , where Q is a stochastic transition probability matrix, and β is a scalar in (0, 1). This can be interpreted as random walk in which every step either follows Q with probability 1 −β, or with probability β jumps to a node according to the distribution specified by vector r. By exploiting this special structure, numerous recent results have provided local algorithms for computing PageRank efficiently. This includes work by Jeh and Widom [13], Fogaras et al. [14], Avrachenkov et al. [15], Bahmani et al. [16] and most recently, Borgs et al. [17]: it outputs a set of “important” nodes – with probability 1 −o(1), it includes all nodes with PageRank greater than a given threshold ∆, and does not include nodes with PageRank less than ∆/c for a given c > 1. The algorithm runs in time O 1 ∆polylog(n)  . Unfortunately, these approaches are specific to PageRank and do not extend to general MCs. 2 2 Setup, problem statement & algorithm Consider a discrete time, irreducible, positive-recurrent MC {Xt}t≥0 on a countable state space Σ having transition probability matrix P. Let P (n) ij be the (i, j)-coordinate of P n such that P (n) ij ≜P(Xn = j|X0 = i). Throughout the paper, we will use the notation Ei[·] = E[·|X0 = i], and Pi(·) = P(·|X0 = i). Let Ti be the return time to a node i, and let Hi be the maximal hitting time to a node i such that Ti = inf{t ≥1 | Xt = i} and Hi = max j∈Σ Ej[Ti]. (1) The stationary distribution is a function π : Σ →[0, 1] such that P i∈Σ πi = 1 and πi = P j∈Σ πjPji for all i ∈Σ. An irreducible positive recurrent Markov chain has a unique stationary distribution satisfying [18, 8]: πi = Ei hPTi t=1 1{Xt=i} i Ei[Ti] = 1 Ei[Ti] for all i ∈Σ. (2) The Markov chain can be visualized as a random walk over a weighted directed graph G = (Σ, E, P), where Σ is the set of nodes, E = {(i, j) ∈Σ × Σ : Pij > 0} is the set of edges, and P describes the weights of the edges.1 The local neighborhood of size r around node i ∈Σ is defined as {j ∈Σ | dG(i, j) ≤r}, where dG(i, j) is the length of the shortest directed path (in terms of number of edges) from i to j in G. An algorithm is local if it only uses information within a local neighborhood of size r around i, where r is constant with respect to the size of the state space. The fundamental matrix Z of a finite state space Markov chain is Z ≜ ∞ X t=0  P (t) −1πT  = I −P + 1πT −1 , such that Zjk ≜ ∞ X t=0  P (t) jk −πk  . Since P (t) jk denotes the probability that a random walk beginning at node j is at node k after t steps, Zjk represents how quickly the probability mass at node k from a random walk beginning at node j converges to πk. We will use this to provide bounds for the performance of our algorithm. 2.1 Problem Statement Consider a discrete time, irreducible, aperiodic, positive recurrent MC {Xt}t≥0 on a countable state space Σ with transition probability matrix P : Σ × Σ →[0, 1]. Given node i and threshold ∆, is πi > ∆? If so, what is πi? We answer this with a local algorithm, which uses only edges within a local neighborhood around i of constant size with respect to the state space. We illustrate the limitations of using a local algorithm for answering this question. Consider the Clique-Cycle Markov chain shown in Figure 1(a) with n nodes, composed of a size k clique connected to a size (n −k + 1) cycle. For node j in the clique excluding i, with probability 1/2, the random walk stays at node j, and with probability 1/2 the random walk chooses a random neighbor uniformly. For node j in the cycle, with probability 1/2, the random walk stays at node j, and with probability 1/2 the random walk travels counterclockwise to the subsequent node in the cycle. For node i, with probability ϵ the random walk enters the cycle, with probability 1/2 the random walk chooses any neighbor in the clique; and with probability 1/2 −ϵ the random walk stays at node i. We can show that the expected return time to node i is (1 −2ϵ)k + 2ϵn. Therefore, Ei[Ti] scales linearly in n and k. Suppose we observe only the local neighborhood of constant size r around node i. All Clique-Cycle Markov chains with more than k + 2r nodes have identical local neighborhoods. Therefore, for any ∆∈(0, 1), there exists two Clique-Cycle Markov chains which have the same ϵ and k, but two different values for n, such that even though their local neighborhoods are identical, πi > ∆in the MC with a smaller n, while πi < ∆in the MC with a larger n. Therefore, by restricting ourselves to a local neighborhood around i of constant size, we will not be able to correctly determine whether πi > ∆for every node i in any arbitrary MC. 1Throughout the paper, Markov chain and random walk on a network are used interchangeably; similarly, nodes and states are used interchangeably. 3 i (a) Clique-Cycle Markov chain 1 2 3 4 5 (b) MM1 Queue Figure 1: Examples of Markov Chains 2.2 Algorithm Given a threshold ∆∈(0, 1) and a node i ∈Σ, the algorithm obtains an estimate ˆπi of πi, and uses ˆπi to determine whether to output 0 (πi ≤∆) or 1 (πi > ∆). The algorithm relies on the characterization of πi given in Eq. (2): πi = 1/Ei[Ti]. It takes many independent samples of a truncated random walk that begins at node i and stops either when the random walk returns to node i, or when the length exceeds a predetermined maximum denoted by θ. Each sample is generated by simulating the random walk using “crawl” operations over the MC. The expected length of each random walk sample is Ei[min(Ti, θ)], which is close to Ei[Ti] when θ is large. As the number of samples and θ go to infinity, the estimate will converge almost surely to πi, due to the strong law of large numbers and positive recurrence of the MC. We use Chernoff’s bound to choose a sufficiently large number of samples as a function of θ to guarantee that with probability 1 −α, the average length of the sample random walks will lie within (1 ± ϵ) of Ei[min(Ti, θ)]. We also need to choose an suitable value for θ that balances between accuracy and computation cost. The algorithm searches for an appropriate size for the local neighborhood by beginning small and increasing the size geometrically. In our analysis, we will show that the total computation summed over all iterations is only a constant factor more than the computation in the final iteration. Input: Anchor node i ∈Σ and parameters ∆= threshold for importance, ϵ = closeness of the estimate, and α = probability of failure. Initialize: Set t = 1, θ(1) = 2, N (1) = 6(1 + ϵ) ln(8/α) ϵ2  . Step 1 (Gather Samples) For each k in {1, 2, 3, . . . , N (t)}, generate independent samples sk ∼min(Ti, θ(t)) by simulating paths of the MC beginning at node i, and setting sk to be the length of the kth sample path. Let ˆp(t) = fraction of samples truncated at θ(t), ˆT (t) i = 1 N (t) N (t) X k=1 sk, ˆπ(t) i = 1 ˆT (t) i , and ˜π(t) i = 1 −ˆp(t) ˆT (t) i . Step 2 (Termination Conditions) • If (a) ˆπ(t) i < ∆ (1+ϵ), then stop and return 0, and estimates ˆπ(t) i and ˜π(t) i . • Else if (b) ˆp(t) · ˆπ(t) i < ϵ∆, then stop and return 1, and estimates ˆπ(t) i and ˜π(t) i . • Else continue. Step 3 (Update Rules) Set θ(t+1) ←2 · θ(t), N (t+1) ← & 3(1 + ϵ)θ(t+1) ln(4θ(t+1)/α) ˆT (t) i ϵ2 ' , and t ←t + 1. Return to Step 1. Output: 0 or 1 indicating whether πi > ∆, and estimates ˆπ(t) i and ˜π(t) i . 4 This algorithm outputs two estimates for the anchor node i: ˆπi, which relies on the second expression in Eq. (2), and ˜πi, which relies on the first expression in Eq. (2). We refer to the total number of iterations used in the algorithm as the value of t at the time of termination, denoted by tmax. The total number of random walk steps taken within the first t iterations is Pt k=1 N (t) · ˆT (t) i . The algorithm will always terminate within ln 1 ϵ∆  iterations. Since θ(t) governs the radius of the local neighborhood that the algorithm utilizes, this implies that our algorithm is local, since the maximum distance is strictly upper bounded by 1 ϵ∆, which is constant with respect to the MC. With high probability, the estimate ˆπ(t) i is larger than πi 1+ϵ due to the truncation. Thus when the algorithm terminates at stopping condition (a), πi < ∆with high probability. When the algorithm terminates at condition (b), the fraction of samples truncated is small, which will imply that the percentage error of estimate ˆπ(t) i is upper bounded as a function of ϵ and properties of the MC. 3 Theoretical guarantees The following theorems give correctness and convergence guarantees for the algorithm. The proofs have been omitted and can be found in the extended version of this paper [19]. Theorem 3.1. For an aperiodic, irreducible, positive recurrent, countable state space Markov chain, and for any i ∈Σ, with probability greater than 1 −α: 1. Correctness. For all iterations t, ˆπ(t) i ≥ πi 1+ϵ. Therefore, if the algorithm terminates at condition (a) and outputs 0, then πi < ∆. 2. Convergence. The number of iterations tmax and the total number of steps (or neighbor queries) used by the algorithm are bounded above by2 3 tmax ≤ln  1 ϵ∆  , and tmax X k=1 N (t) · ˆT (t) i ≤˜O ln( 1 α) ϵ3∆  . Part 1 is proved by using Chernoff’s bound to show that N (t) is large enough to guarantee that with probability greater than 1 −α, for all iterations t, ˆT (t) i concentrates around its mean. Part 2 asserts that the algorithm terminates in finite time as a function of the parameters of the algorithm, independent from the size of the MC state space. Therefore this implies that our algorithm is local. This theorem holds for all aperiodic, irreducible, positive recurrent MCs. This is proved by observing that ˆT (t) i > ˆp(t)θ(t). Therefore when θ(t) > 1 ϵ∆, termination condition (b) must be satisfied. 3.1 Finite-state space Markov Chain We can obtain characterizations for the approximation error and the running time as functions of specific properties of the MC. The analysis depends on how sharply the distribution over return times concentrates around the mean. Theorem 3.2. For an irreducible Markov chain {Xt} with finite state space Σ and transition probability matrix P, for any i ∈Σ, with probability greater than 1 −α, for all iterations t, ˆπ(t) i −πi ˆπ(t) i ≤2(1 −ϵ)Pi(Ti > θ(t))Zmax(i) + ϵ ≤4(1 −ϵ)2−θ(t)/2HiZmax(i) + ϵ, where Hi is defined in Eq (1), and Zmax(i) = maxj |Zji|. Therefore, with probability greater than 1 −α, if the algorithm terminates at condition (b), then ˆπ(t) i −πi ˆπ(t) i ≤ϵ (3Zmax(i) + 1) . 2We use the notation ˜O(f(a)g(b)) to mean ˜O(f(a)) ˜O(g(b)) = ˜O(f(a)polylogf(a)) ˜O(g(b)polylogg(b)). 3The bound for tmax is always true (stronger than with high probability). 5 Theorem 3.2 shows that the percentage error in the estimate ˆπ(t) i decays exponentially in θ(t), which doubles in each iteration. The proof relies on the fact that the distribution of the return time Ti has an exponentially decaying tail [8], ensuring that the return time Ti concentrates around its mean Ei[Ti]. When the algorithm terminates at stopping condition (b), P(Ti > θ) ≤ϵ( 4 3 + ϵ) with high probability, thus the percentage error is bounded by O(ϵZmax(i)). Similarly, we can analyze the error between the second estimate ˜π(t) i and πi, in the case when θ(t) is large enough such that P(Ti > θ(t)) < 1 2. This is required to guarantee that (1−ˆp(t)) lies within an ϵ multiplicative interval around its mean with high probability. Observe than 2Zmax(i) is replaced by max(2Zmax(i) −1, 1). Thus for some values of Zmax(i), the error bound for ˜πi is smaller than the equivalent bound for ˆπi. We will show simulations of computing PageRank, in which ˜πi estimates πi more closely than ˆπi. Theorem 3.3. For an irreducible Markov chain {Xt} with finite state space Σ and transition probability matrix P, for any i ∈Σ, with probability greater than 1 −α, for all iterations t such that P(Ti > θ(t)) < 1 2, ˜π(t) i −πi ˜π(t) i ≤ 1 + ϵ 1 −ϵ   Pi(Ti > θ(t)) 1 −Pi(Ti > θ(t))  max(2Zmax(i) −1, 1) + 2ϵ 1 −ϵ. Theorem 3.4 also uses the property of an exponentially decaying tail as a function of Hi to show that for large θ(t), with high probability, Pi Ti > θ(t) will be small and ˆπ(t) i will be close to πi, and thus the algorithm will terminate at one of the stopping conditions. The bound is a function of how sharply the distribution over return times concentrates around the mean. Theorem 3.4(a) states that for low probability nodes, the algorithm will terminate at stopping condition (a) for large enough iterations. Theorem 3.4(b) states that for all nodes, the algorithm will terminate at stopping condition (b) for large enough iterations. Theorem 3.4. For an irreducible Markov chain {Xt} with finite state space Σ, (a) For any node i ∈Σ such that πi < (1 −ϵ)∆/(1 + ϵ), with probability greater than 1 −α, the total number of steps used by the algorithm is bounded above by tmax X k=1 N (t) · ˆT (t) i ≤˜O ln( 1 α) ϵ2 Hi ln  1 1 −2−1/2Hi   1 πi − 1 + ϵ (1 −ϵ)∆ −1!!! . (b) For all nodes i ∈Σ, with probability greater than 1 −α, the total number of steps used by the algorithm is bounded above by tmax X k=1 N (t) · ˆT (t) i ≤˜O ln( 1 α) ϵ2 Hi α ln  πi  1 ϵ∆+ 1 1 −2−1/2Hi  . 3.2 Countable-state space Markov Chain The proofs of Theorems 3.2 and 3.4 require the state space of the MC to be finite, so we can upper bound the tail of the distribution of Ti using the maximal hitting time Hi. In fact, these results can be extended to many countably infinite state space Markov chains, as well. We prove that the tail of the distribution of Ti decays exponentially for any node i in any countable state space Markov chain that satisfies Assumption 3.5. Assumption 3.5. The Markov chain {Xt} is aperiodic and irreducible. There exists a Lyapunov function V : Σ →R+ and constants νmax, γ > 0, and b ≥0, that satisfy the following conditions: 1. The set B = {x ∈Σ : V (x) ≤b} is finite, 2. For all x, y ∈Σ such that P Xt+1 = j|Xt = i  > 0, |V (j) −V (i)| ≤νmax, 3. For all x ∈Σ such that V (x) > b, E  V (Xt+1) −V (Xt)|Xt = x  < −γ. At first glance, this assumption may seem very restrictive. But in fact, this is quite reasonable: by the Foster-Lyapunov criteria [20], a countable state space Markov chain is positive recurrent if and 6 only if there exists a Lyapunov function V : Σ →R+ that satisfies condition (1) and (3), as well as (2’): E[V (Xt+1)|Xt = x] < ∞for all x ∈Σ. Assumption 3.5 has (2), which is a restriction of the condition (2’). The existence of the Lyapunov function allows us to decompose the state space into sets B and Bc such that for all nodes x ∈Bc, there is an expected decrease in the Lyapunov function in the next step or transition. Therefore, for all nodes in Bc, there is a negative drift towards set B. In addition, in any single step, the random walk cannot escape “too far”. Using the concentration bounds for the countable state space settings, we can prove the following theorems that parallel the theorems stated for the finite state space setting. The formal statements are restricted to nodes in B = {i ∈Σ : V (i) ≤b}. This is not actually restrictive, as for any i such that V (i) > b, we can define a new Lyapunov function where V ′(i) = b, and V ′(j) = V (j) for all j ̸= i. Then B′ = B ∪{i}, and V ′ still satisfies assumption 3.5 for new values of νmax, γ, and b. Theorem 3.6. For a Markov chain satisfying Assumption 3.5, for any i ∈B, with probability greater than 1 −α, for all iterations t, ˆπ(t) i −πi ˆπ(t) i ≤4(1 −ϵ) 2−θ(t)/Ri 1 −2−1/Ri ! πi + ϵ, where Ri is defined such that Ri = O  HB i e2ηνmax (1 −ρ)(eηνmax −ρ)  , and HB i is the maximal hitting time over the Markov chain with its state space restricted to the subset B. The scalars η and ρ are functions of γ and νmax (defined in [9]). Theorem 3.7. For a Markov chain satisfying Assumption 3.5, (a) For any node i ∈B such that πi < (1 −ϵ)∆/(1 + ϵ), with probability greater than 1 −α, the total number of steps used by the algorithm is bounded above by tmax X k=1 N (t) · ˆT (t) i ˜O ln( 1 α) ϵ2 Ri ln  1 1 −2−1/Ri   1 πi − 1 + ϵ (1 −ϵ)∆ −1!!! . (b) For all nodes i ∈B, with probability greater than 1 −α, the total number of steps used by the algorithm is bounded above by tmax X k=1 N (t) · ˆT (t) i ≤˜O ln( 1 α) ϵ2 Ri α ln  πi  1 ϵ∆+ 1 1 −2−1/Ri  . In order to prove these theorems, we build upon results of [9], and establish that return times have exponentially decaying tails for countable state space MCs that satisfy Assumption 3.5. 4 Example applications: PageRank and MM1 Queue PageRank is frequently used to compute the importance of web pages in the web graph. Given a scalar parameter β and a stochastic transition matrix P, let {Xt} be the Markov chain with transition matrix β n1 · 1T + (1 −β)P. In every step, there is an β probability of jumping uniformly randomly to any other node in the network. PageRank is defined as the stationary distribution of this Markov chain. We apply our algorithm to compute PageRank on a random graph generated according to the configuration model with a power law degree distribution for β = 0.15. In queuing theory, Markov chains are used to model the queue length at a server, which evolves over time as requests arrive and are processed. We use the basic MM1 queue, equivalent to a random walk on Z+. Assume we have a single server where the requests arrive according to a Poisson process, and the processing time for a single request is distributed exponentially. The queue length is modeled with the Markov chain shown in Figure 1(b), where p is the probability that a new request arrives before the current request is fully processed. Figures 2(a) and 2(b) plot ˆπ(tmax) i and ˜π(tmax) i for each node in the PageRank or MM1 queue MC, respectively. For both examples, we choose algorithm parameters ∆= 0.02, ϵ = 0.15, and α = 0.2. 7 0 20 40 60 80 100 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Anchor Node ID Stationary Probability True value (π) Estimate (πhat) Estimate (πtilde) (a) PageRank Estimates 0 10 20 30 40 50 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Anchor Node ID Stationary Probability True value (π) Estimate (πhat) Estimate (πtilde) (b) MM1 Estimates 10 −4 10 −3 10 −2 10 −1 10 0 10 4 10 5 10 6 10 7 ∆ Total Steps Taken Node 1 Node 2 Node 3 (c) PageRank —Total Steps vs. ∆ 10 −4 10 −3 10 −2 10 −1 10 0 10 3 10 4 10 5 10 6 10 7 10 8 ∆ Total Steps Taken Node 1 Node 2 Node 3 (d) MM1 Queue —Total Steps vs. ∆ Figure 2: Simulations showing results of our algorithm applied to PageRank and MM1 Queue setting Observe that the algorithm indeed obtains close estimates for nodes such that πi > ∆, and for nodes such that πi ≤∆, the algorithm successfully outputs 0 (i.e., πi ≤∆). We observe that the method for bias correction makes significant improvements for estimating PageRank. We computed the fundamental matrix for the PageRank MC and observed that that Zmax(i) ≈1 for all i. Figures 2(c) and 2(d) show the computation time, or total number of random walk steps taken by our algorithm, as a function of ∆. Each figure shows the results from three different nodes, chosen to illustrate the behavior on nodes with varying πi. The figures are shown on a log-log scale. The results confirm that the computation time of the algorithm is upper bounded by O( 1 ∆), which is linear when plotted in log-log scale. When ∆> πi, the computation time behaves as 1 ∆. When ∆< πi, the computation time grows slower than O( 1 ∆), and is close to constant with respect to ∆. 5 Summary We proposed a local algorithm for estimating the stationary probability of a node in a MC. The algorithm is a truncated Monte Carlo method, sampling return paths to the node of interest. The algorithm has many practical benefits. First, it can be implemented easily in a distributed and parallelized fashion, as it only involves sampling random walks using neighbor queries. Second, it only uses a constant size neighborhood around the node of interest, upper bounded by 1 ϵ∆. Third, it only performs computation at the node of interest. The computation only involves counting and taking an average, thus it is simple and memory efficient. We guarantee that the estimate ˆπ(t) i , is an upper bound for πi with high probability. For MCs that mix well, the estimate will be tight with high probability for nodes such that πi > ∆. The computation time of the algorithm is upper bounded by parameters of the algorithm, and constant with respect to the size of the state space. Therefore, this algorithm is suitable for MCs with large state spaces. Acknowledgements: This work is supported in parts by ARO under MURI awards 58153-MA-MUR and W911NF-11-1-0036, and grant 56549-NS, and by NSF under grant CIF 1217043 and a Graduate Fellowship. 8 References [1] B. Cipra. The best of the 20th century: Editors name top 10 algorithms. SIAM News, 33(4):1, May 2000. [2] T.M. Semkow, S. Pomm, S. Jerome, and D.J. Strom, editors. Applied Modeling and Computations in Nuclear Science. American Chemical Society, Washington, DC, 2006. [3] L. Page, S. Brin, R. Motwani, and T. Winograd. The PageRank citation ranking: Bringing order to the web. Technical Report 1999-66, November 1999. [4] S. Assmussen and P. Glynn. Stochastic Simulation: Algorithms and Analysis (Stochastic Modelling and Applied Probability). Springer, 2010. [5] N. Metropolis, A.W. Rosenbluth, M.N. Rosenbluth, A.H. Teller, and E. Teller. Equation of state calculations by fast computing machines. The Journal of Chemical Physics, 21:1087, 1953. [6] W.K. Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57(1):97–109, 1970. [7] G.H. Golub and C.F. Van Loan. Matrix Computations. Johns Hopkins Studies in the Mathematical Sciences. Johns Hopkins University Press, 1996. [8] D. Aldous and J. Fill. Reversible Markov chains and random walks on graphs: Chapter 2 (General Markov chains). book in preparation. URL: http://www.stat.berkeley.edu/ ∼aldous/ RWG/Chap2.pdf, pages 7, 19–20, 1999. [9] B. Hajek. Hitting-time and occupation-time bounds implied by drift analysis with applications. Advances in Applied probability, pages 502–525, 1982. [10] P. Diaconis and L. Saloff-Coste. What do we know about the Metropolis algorithm? Journal of Computer and System Sciences, 57(1):20–36, 1998. [11] P. Diaconis. The Markov chain Monte Carlo revolution. Bulletin of the American Mathematical Society, 46(2):179–205, 2009. [12] D.A. Levin, Y. Peres, and E.L. Wilmer. Markov chains and mixing times. Amer Mathematical Society, 2009. [13] G. Jeh and J. Widom. Scaling personalized web search. In Proceedings of the 12th international conference on World Wide Web, pages 271–279, New York, NY, USA, 2003. [14] D. Fogaras, B. Racz, K. Csalogany, and T. Sarlos. Towards scaling fully personalized PageRank: Algorithms, lower bounds, and experiments. Internet Mathematics, 2(3):333–358, 2005. [15] K. Avrachenkov, N. Litvak, D. Nemirovsky, and N. Osipova. Monte Carlo methods in PageRank computation: When one iteration is sufficient. SIAM Journal on Numerical Analysis, 45(2):890–904, 2007. [16] B. Bahmani, A. Chowdhury, and A. Goel. Fast incremental and personalized PageRank. Proc. VLDB Endow., 4(3):173–184, December 2010. [17] C. Borgs, M. Brautbar, J. Chayes, and S.-H. Teng. Sublinear time algorithm for PageRank computations and related applications. CoRR, abs/1202.2771, 2012. [18] SP. Meyn and RL. Tweedie. Markov chains and stochastic stability. Springer-Verlag, 1993. [19] C.E. Lee, A. Ozdaglar, and D. Shah. Computing the stationary distribution locally. MIT LIDS Report 2914, Nov 2013. URL: http://www.mit.edu/∼celee/LocalStationaryDistribution.pdf. [20] F.G. Foster. On the stochastic matrices associated with certain queuing processes. The Annals of Mathematical Statistics, 24(3):355–360, 1953. 9
2013
222
4,957
Latent Maximum Margin Clustering Guang-Tong Zhou, Tian Lan, Arash Vahdat, and Greg Mori School of Computing Science Simon Fraser University {gza11,tla58,avahdat,mori}@cs.sfu.ca Abstract We present a maximum margin framework that clusters data using latent variables. Using latent representations enables our framework to model unobserved information embedded in the data. We implement our idea by large margin learning, and develop an alternating descent algorithm to effectively solve the resultant non-convex optimization problem. We instantiate our latent maximum margin clustering framework with tag-based video clustering tasks, where each video is represented by a latent tag model describing the presence or absence of video tags. Experimental results obtained on three standard datasets show that the proposed method outperforms non-latent maximum margin clustering as well as conventional clustering approaches. 1 Introduction Clustering is a major task in machine learning and has been extensively studied over decades of research [11]. Given a set of observations, clustering aims to group data instances of similar structures or patterns together. Popular clustering approaches include the k-means algorithm [7], mixture models [22], normalized cuts [27], and spectral clustering [18]. Recent progress has been made using maximum margin clustering (MMC) [32], which extends the supervised large margin theory (e.g. SVM) to the unsupervised scenario. MMC performs clustering by simultaneously optimizing cluster-specific models and instance-specific labeling assignments, and often generates better performance than conventional methods [33, 29, 37, 38, 16, 6]. Modeling data with latent variables is common in many applications. Latent variables are often defined to have intuitive meaning, and are used to capture unobserved semantics in the data. As compared with ordinary linear models, latent variable models feature the ability to exploit a richer representation of the space of instances. Thus, they often achieve superior performance in practice. In computer vision, this is best exemplified by the success of deformable part models (DPMs) [5] for object detection. DPMs enhance the representation of an object class by capturing viewpoint and pose variations. They utilize a root template describing the entire object appearance and several part templates. Latent variables are used to capture deformations and appearance variations of the root template and parts. DPMs perform object detection via search for the best locations of the root and part templates. Latent variable models are often coupled with supervised learning to learn models incorporating the unobserved variables. For example, DPMs are learned in a latent SVM framework [5] for object detection; similar models have been shown to improve human action recognition [31]. A host of other applications of latent SVMs have obtained state-of-the-art performance in computer vision. Motivated by their success in supervised learning, we believe latent variable models can also help in unsupervised clustering – data instances with similar latent representations should be grouped together in one cluster. As the latent variables are unobserved in the original data, we need a learning framework to handle this latent knowledge. To implement this idea, we develop a novel clustering algorithm based on MMC that incorporates latent variables – we call this latent maximum margin clustering (LMMC). The LMMC algorithm results in a non-convex optimization problem, for which we introduce an 1 iterative alternating descent algorithm. Each iteration involves three steps: inferring latent variables for each sample point, optimizing cluster assignments, and updating cluster model parameters. To evaluate the efficacy of this clustering algorithm, we instantiate LMMC for tag-based video clustering, where each video is modeled with latent variables controlling the presence or absence of a set of descriptive tags. We conduct experiments on three standard datasets: TRECVID MED 11 [19], KTH Actions [26] and UCF Sports [23], and show that LMMC outperforms non-latent MMC and conventional clustering methods. The rest of this paper is organized as follows. Section 2 reviews related work. Section 3 formulates the LMMC framework in detail. We describe tag-based video clustering in Section 4, followed by experimental results reported in Section 5. Finally, Section 6 concludes this paper. 2 Related Work Latent variable models. There has been much work in recent years using latent variable models. The definition of latent variables are usually task-dependent. Here we focus on the learning part only. Andrews et al. [1] propose multiple-instance SVM to learn latent variables in positive bags. Felzenszwalb et al. [5] formulate latent SVM by extending binary linear SVM with latent variables. Yu and Joachims [36] handle structural outputs with latent structural SVM. This model is also known as maximum margin hidden conditional random fields (MMHCRF) [31]. Kumar et al. [14] propose self-paced learning, an optimization strategy that focuses on simple models first. Yang et al. [35] kernelize latent SVM for better performance. All of this work demonstrates the power of max-margin latent variable models for supervised learning; our framework conducts unsupervised clustering while modeling data with latent variables. Maximum margin clustering. MMC was first proposed by Xu et al. [32] to extend supervised large margin methods to unsupervised clustering. Different from the supervised case, where the optimization is convex, MMC results in non-convex problems. To solve it, Xu et al. [32] and Valizadegan and Rong [29] reformulate the original problem as a semi-definite programming (SDP) problem. Zhang et al. [37] employ alternating optimization – finding labels and optimizing a support vector regression (SVR). Li et al. [16] iteratively generate the most violated labels, and combine them via multiple kernel learning. Note that the above methods can only solve binary-cluster clustering problems. To handle the multi-cluster case, Xu and Schuurmans [33] extends the SDP method in [32]. Zhao et al. [38] propose a cutting-plane method which uses the constrained convex-concave procedure (CCCP) to relax the non-convex constraint. Gopalan and Sankaranarayanan [6] examine data projections to identify the maximum margin. Our framework deals with multi-cluster clustering, and we model data instances with latent variables to exploit rich representations. It is also worth mentioning that MMC leads naturally to the semi-supervised SVM framework [12] by assuming a training set of labeled instances [32, 33]. Using the same idea, we could extend LMMC to semisupervised learning. MMC has also shown its success in various computer vision applications. For example, Zhang et al. [37] conduct MMC based image segmentation. Farhadi and Tabrizi [4] find different view points of human activities via MMC. Wang and Cao [30] incorporate MMC to discover geographical clusters of beach images. Hoai and Zisserman [8] form a joint framework of maximum margin classification and clustering to improve sub-categorization. Tag-based video analysis. Tagging videos with relevant concepts or attributes is common in video analysis. Qi et al. [20] predict multiple correlative tags in a structural SVM framework. Yang and Toderici [34] exploit latent sub-categories of tags in large-scale videos. The obtained tags can assist in recognition. For example, Liu et al. [17] use semantic attributes (e.g. up-down motion, torso motion, twist) to recognize human actions (e.g. walking, hand clapping). Izadinia and Shah [10] model low-level event tags (e.g. people dancing, animal eating) as latent variables to recognize complex video events (e.g. wedding ceremony, grooming animal). Instead of supervised recognition of tags or video categories, we focus on unsupervised tag-based video clustering. In fact, recently research collects various sources of tags for video clustering. Schroff et al. [25] cluster videos by the capturing locations. Hsu et al. [9] build hierarchical clustering using user-contributed comments. Our paper uses latent tag models, and our LMMC framework is general enough to handle various types of tags. 2 3 Latent Maximum Margin Clustering As stated above, modeling data with latent variables can be beneficial in a variety of supervised applications. For unsupervised clustering, we believe it also helps to group data instances based on latent representations. To implement this idea, we propose the LMMC framework. LMMC models instances with latent variables. When fitting an instance to a cluster, we find the optimal values for latent variables and use the corresponding latent representation of the instance. To best fit different clusters, an instance is allowed to flexibly take different latent variable values when being compared to different clusters. This enables LMMC to explore a rich latent space when forming clusters. Note that in conventional clustering algorithms, an instance is usually restricted to have the same representation in all clusters. Furthermore, as the latent variables are unobserved in the original data, we need a learning framework to exploit this latent knowledge. Here we develop a large margin learning framework based on MMC, and learn a discriminative model for each cluster. The resultant LMMC optimization is non-convex, and we design an alternating descent algorithm to approximate the solution. Next we will briefly introduce MMC in Section 3.1, followed by detailed descriptions of the LMMC framework and optimization respectively in Sections 3.2 and 3.3. 3.1 Maximum Margin Clustering MMC [32, 37, 38] extends the maximum margin principle popularized by supervised SVMs to unsupervised clustering, where the input instances are unlabeled. The idea of MMC is to find a labeling so that the margin obtained would be maximal over all possible labelings. Suppose there are N instances {xi}N i=1 to be clustered into K clusters, MMC is formulated as follows [33, 38]: min W,Y,ξ≥0 1 2 K X t=1 ||wt||2 + C K N X i=1 K X r=1 ξir (1) s.t. K X t=1 yitw⊤ t xi −w⊤ r xi ≥1 −yir −ξir, ∀i, r yit ∈{0, 1}, ∀i, t K X t=1 yit = 1, ∀i where W = {wt}K t=1 are the linear model parameters for each cluster, ξ = {ξir} (i ∈{1, . . . , N}, t ∈{1, . . . , K}) are the slack variables to allow soft margin, and C is a trade-off parameter. We denote the labeling assignment by Y = {yit} (i ∈{1, . . . , N}, t ∈{1, . . . , K}), where yit = 1 indicates that the instance xi is clustered into the t-th cluster, and yit = 0 otherwise. By convention, we require that each instance is assigned to one and only one cluster, i.e. the last constraint in Eq. 1. Moreover, the first constraint in Eq. 1 enforces a large margin between clusters by constraining that the score of xi to the assigned cluster is sufficiently larger than the score of xi to any other clusters. Note that MMC is an unsupervised clustering method, which jointly estimates the model parameters W and finds the best labeling Y. Enforcing balanced clusters. Unfortunately, solving Eq. 1 could end up with trivial solutions where all instances are simply assigned to the same cluster, and we obtain an unbounded margin. To address this problem, we add cluster balance constraints to Eq. 1 that require Y to satisfy L ≤ N X i=1 yit ≤U, ∀t (2) where L and U are the lower and upper bounds controlling the size of a cluster. Note that we explicitly enforce cluster balance using a hard constraint on the cluster sizes. This is different from [38], a representative multi-cluster MMC method, where the cluster balance constraints are implicitly imposed on the accumulated model scores (i.e. PN i=1 w⊤ t xi). We found empirically that explicitly enforcing balanced cluster sizes led to better results. 3.2 Latent Maximum Margin Clustering We now extend MMC to include latent variables. The latent variable of an instance is clusterspecific. Formally, we denote h as the latent variable of an instance x associated to a cluster parameterized by w. Following the latent SVM formulation [5, 36, 31], scoring x w.r.t. w is to solve an 3 inference problem of the form: fw(x) = max h w⊤Φ(x, h) (3) where Φ(x, h) is the feature vector defined for the pair of (x, h). To simplify the notation, we assume the latent variable h takes its value from a discrete set of labels. However, our formulation can be easily generalized to handle more complex latent variables (e.g. graph structures [36, 31]). To incorporate the latent variable models into clustering, we replace the linear model w⊤x in Eq. 1 by the latent variable model fw(x). We call the resultant framework latent maximum margin clustering (LMMC). LMMC finds clusters via the following optimization: min W,Y,ξ≥0 1 2 K X t=1 ||wt||2 + C K N X i=1 K X r=1 ξir (4) s.t. K X t=1 yitfwt(xi) −fwr(xi) ≥1 −yir −ξir, ∀i, r yit ∈{0, 1}, ∀i, t K X t=1 yit = 1, ∀i L ≤ N X i=1 yit ≤U, ∀t We adopt the notation Y from the MMC formulation to denote the labeling assignment. Similar to MMC, the first constraint in Eq. 4 enforces the large margin criterion where the score of fitting xi to the assigned cluster is marginally larger than the score of fitting xi to any other clusters. Cluster balance is enforced by the last constraint in Eq. 4. Note that LMMC jointly optimizes the model parameters W and finds the best labeling assignment Y, while inferring the optimal latent variables. 3.3 Optimization It is easy to verify that the optimization problem described in Eq. 4 is non-convex due to the optimization over the labeling assignment variables Y and the latent variables H = {hit} (i ∈ {1, . . . , N}, t ∈{1, . . . , K}). To solve it, we first eliminate the slack variables ξ, and rewrite Eq. 4 equivalently as: min W 1 2 K X t=1 ||wt||2 + C K R(W) (5) where R(W) is the risk function defined by: R(W) = min Y N X i=1 K X r=1 max 0, 1 −yir + fwr(xi) − K X t=1 yitfwt(xi)  (6) s.t. yit ∈{0, 1}, ∀i, t K X t=1 yit = 1, ∀i L ≤ N X i=1 yit ≤U, ∀t Note that Eq. 5 minimizes over the model parameters W, and Eq. 6 minimizes over the labeling assignment variables Y while inferring the latent variables H. We develop an alternating descent algorithm to find an approximate solution. In each iteration, we first evaluate the risk function R(W) given the current model parameters W, and then update W with the obtained risk value. Next we describe each step in detail. Risk evaluation: The first step of learning is to compute the risk function R(W) with the model parameters W fixed. We first infer the latent variables H and then optimize the labeling assignment Y. According to Eq. 3, the latent variable hit of an instance xi associated to cluster t can be obtained via: argmaxhit w⊤ t Φ(xi, hit). Note that the inference problem is task-dependent. For our latent tag model, we present an efficient inference method in Section 4. After obtaining the latent variables H, we optimize the labeling assignment Y from Eq. 6. Intuitively, this is to minimize the total risk of labeling all instances yet maintaining the cluster balance constraints. We reformulate Eq. 6 as an integer linear programming (ILP) problem by introducing a variable ψit to capture the risk of assigning an instance xi to a cluster t. The ILP can be written as: R(W) = min Y N X i=1 K X t=1 ψityit s.t. yit ∈{0, 1}, ∀i, t K X t=1 yit = 1, ∀i L ≤ N X i=1 yit ≤U, ∀t (7) 4 Cluster: feeding animal Cluster: board trick video T : board car dog food grass man snow tree · · · board car dog food grass man snow tree · · · h: 0 0 1 1 1 1 0 1 · · · 1 0 0 0 1 1 0 0 · · · Figure 1: Two videos represented by the latent tag model. Please refer to the text for details about T and h. Note that the cluster labels (i.e. “feeding animal”, “board trick”) are unknown beforehand. They are added for a better understanding of the video content and the latent tag representations. where ψit = PK r=1,r̸=t max(0, 1 + fwr(xi) −fwt(xi)). This captures the total “mis-clustering” penalties - suppose that we regard t as the “ground truth” cluster label for an instance xi, then ψit measures the sum of hinge losses for all incorrect predictions r (r ̸= t), which is consistent with the supervised multi-class SVM at a higher level [2]. Eq. 7 is a standard ILP problem with N × K variables and N + K constraints. We use the GNU Linear Programming Kit (GLPK) to obtain an approximate solution to this problem. Updating W: The next step of learning is the optimization over the model parameters W (Eq. 5). The learning problem is non-convex and we use the the non-convex bundle optimization solver in [3]. In a nutshell, this method builds a piecewise quadratic approximation to the objective function of Eq. 5 by iteratively adding a linear cutting plane at the current optimum and updating the optimum. Now the key issue is to compute the subgradient ∂wtfwt(xi) for a particular wt. Let h∗ it be the optimal solution to the inference problem: h∗ it = argmaxhit w⊤ t Φ(xi, hit). Then the subgradient can be calculated as ∂wtfwt(xi) = Φ(xi, h∗ it). Using the subgradient ∂wtfwt(xi), we optimize Eq. 5 by the algorithm in [3]. 4 Tag-Based Video Clustering In this section, we introduce an application of LMMC: tag-based video clustering. Our goal is to jointly learn video clusters and tags in a single framework. We treat tags of a video as latent variables and capture the correlations between clusters and tags. Intuitively, videos with a similar set of tags should be assigned to the same cluster. We assume a separate training dataset consisting of videos with ground-truth tag labels exists, from which we train tag detectors independently. During clustering, we are given a set of new videos without the ground-truth tag labels, and our goal is to assign cluster labels to these videos. We employ a latent tag model to represent videos. We are particularly interested in tags which describe different aspects of videos. For example, a video from the cluster “feeding animal” (see Figure 1) may be annotated with “dog”, “food”, “man”, etc. Assume we collect all the tags in a set T . For a video being assigned to a particular cluster, we know it could have a number of tags from T describing its visual content related to the cluster. However, we do not know which tags are present in the video. To address this problem, we associate latent variables to the video to denote the presence and absence of tags. Formally, given a cluster parameterized by w, we associate a latent variable h to a video x, where h = {ht}t∈T and ht ∈{0, 1} is a binary variable denoting the presence/absence of each tag t. ht = 1 means x has the tag t, while ht = 0 means x does not have the tag t. Figure 1 shows the latent tag representations of two sample videos. We score the video x according to the model in Eq. 3: fw(x) = maxh w⊤Φ(x, h), where the potential function w⊤Φ(x, h) is defined as follows: w⊤Φ(x, h) = 1 |T | X t∈T ht · ω⊤ t φt(x) (8) This potential function measures the compatibility between the video x and tag t associated with the current cluster. Note that w = {ωt}t∈T are the cluster-specific model parameters, and Φ = {ht · φt(x)}t∈T is the feature vector depending on the video x and its tags h. Here φt(x) ∈Rd is the feature vector extracted from the video x, and the parameter ωt is a template for tag t. In our current implementation, instead of keeping φt(x) as a high dimensional vector of video features, we 5 simply represent it as a scalar score of detecting tag t on x by a pre-trained binary tag detector. To learn biases between different clusters, we append a constant 1 to make φt(x) two-dimensional. Now we describe how to infer the latent variable h∗= argmaxh w⊤Φ(x, h). As there is no dependency between tags, we can infer each latent variable separately. According to Eq. 8, the term corresponding to tag t is ht ·ω⊤ t φt(x). Considering that ht is binary, we set ht to 1 if ω⊤ t φt(x) > 0; otherwise, we set ht to 0. 5 Experiments We evaluate the performance of our method on three standard video datasets: TRECVID MED 11 [19], KTH Actions [26] and UCF Sports [23]. We briefly describe our experimental setup before reporting the experimental results in Section 5.1. TRECVID MED 11 dataset [19]: This dataset contains web videos collected by the Linguistic Data Consortium from various web video hosting sites. There are 15 complex event categories including “board trick”, “feeding animal”, “landing fish”, “wedding ceremony”, “woodworking project”, “birthday party”, “changing tire”, “flash mob”, “getting vehicle unstuck”, “grooming animal”, “making sandwich”, “parade”, “parkour”, “repairing appliance”, and “sewing project”. TRECVID MED 11 has three data collections: Event-Kit, DEV-T and DEV-O. DEV-T and DEV-O are dominated by videos of the null category, i.e. background videos that do not contain the events of interest. Thus, we use the Event-Kit data collection in the experiments. By removing 13 short videos that contain no visual content, we finally have a total of 2,379 videos for clustering. We use tags that were generated in Vahdat and Mori [28] for the TRECVID MED 11 dataset. Specifically, this dataset includes “judgment files” that contain a short one-sentence description for each video. A sample description is: “A man and a little boy lie on the ground after the boy has fallen off his bike”. This sentence provides us with information about presence of objects such as “man”, “boy”, “ground” and “bike”, which could be used as tags. In [28], text analysis tools are employed to extract binary tags based on frequent nouns in the judgment files. Examples of 74 frequent tags used in this work are: “music”, “person”, “food”, “kitchen”, “bird”, “bike”, “car”, “street”, “boat”, “water”, etc. The complete list of tags are available on our website. To train tag detectors, we use the DEV-T and DEV-O videos that belong to the 15 event categories. There are 1675 videos in total. We extract HOG3D descriptors [13] and form a 1,000 word codebook. Each video is then represented by a 1,000-dimensional feature vector. We train a linear SVM for each tag, and predict the detection scores on the Event-Kit videos. To remove biases between tag detectors, we normalize the detection scores by z-score normalization. Note that we make no use of the ground-truth tags on the Event-Kit videos that are to be clustered. KTH Actions dataset [26]: This dataset contains a total of 599 videos of 6 human actions: “walking”, “jogging”, “running”, “boxing”, “hand waving”, and “hand clapping”. Our experiments use all the videos for clustering. We use Action Bank [24] to generate tags for this dataset. Action Bank has 205 template actions with various action semantics and viewpoints. Randomly selected examples of template actions are: “hula1”, “ski5”, “clap3”, “fence2”, “violin6”, etc. In our experiments, we treat the template actions as tags. Specifically, on each video and for each template action, we use the set of Action Bank action detection scores collected at different spatiotemporal scales and correlation volumes. We perform max-pooling on the scores to obtain the corresponding tag detection score. Again, for each tag, we normalize the detection scores by z-score normalization. UCF Sports dataset [23]: This dataset consists of 140 videos from 10 action classes: “diving”, “golf swinging”, “kicking”, “lifting”, “horse riding”, “running”, “skating”, “swinging (on the pommel horse)”, “swinging (at the high bar)”, and “walking”. We use all the videos for clustering. The tags and tag detection scores are generated from Action Bank, in the same way as KTH Actions. Baselines: To evaluate the efficacy of LMMC, we implement three conventional clustering methods for comparison, including the k-means algorithm (KM), normalized cut (NC) [27], and spectral clustering (SC) [18]. For NC, the implementation and parameter settings are the same as [27], which uses a Gaussian similarity function with all the instances considered as neighbors. For SC, we use a 5-nearest neighborhood graph and set the width of the Gaussian similarity function as the 6 TRECVID MED 11 KTH Actions UCF Sports PUR NMI RI FM PUR NMI RI FM PUR NMI RI FM LMMC 39.0 28.7 89.5 22.1 92.5 87.0 95.8 87.2 76.4 71.2 92.0 60.0 MMC 36.0 26.6 89.3 20.3 91.3 86.5 95.2 85.5 63.6 62.2 89.2 46.1 SC 28.6 23.6 87.1 20.3 61.0 60.8 75.6 58.2 69.9 70.8 90.6 58.1 KM 27.0 23.8 85.9 20.4 64.8 60.7 84.0 60.6 63.1 66.2 87.9 58.7 NC 12.9 5.7 31.6 12.7 48.0 33.9 72.9 35.1 60.7 55.8 83.4 41.8 Table 1: Clustering results (in %) on the three datasets. The figures boldfaced are the best performance among all the compared methods. average distance over all the 5-nearest neighbors. Note that these three methods do not use latent variable models. Therefore, for a fair comparison with LMMC, they are directly performed on the data where each video is represented by a vector of tag detection scores. We have also tried KM, NC and SC on the 1,000-dimensional HOG3D features. However, the performance is worse and is not reported here. Furthermore, to mitigate the effect of randomness, KM, NC and SC are run 10 times with different initial seeds and the average results are recorded in the experiments. In order to show the benefits of incorporating latent variables, we further develop a baseline called MMC by replacing the latent variable model fw(x) in Eq. 4 with a linear model w⊤x. This is equivalent to running an ordinary maximum margin clustering algorithm on the video data represented by tag detection scores. For a fair comparison, we use the same solver for learning MMC and LMMC. The trade-off parameter C in Eq. 4 is selected as the best from the range {101, 102, 103}. The lower bound and upper bounds of the cluster-balance constraint (i.e. L and U in Eq. 4) are set as 0.9 N K and 1.1 N K respectively to enforce balanced clusters. Performance measures: Following the convention of maximum margin clustering [32, 33, 29, 37, 38, 16, 6], we set the number of clusters to be the ground-truth number of classes for all the compared methods. The clustering quality is evaluated by four standard measurements including purity (PUR) [32], normalized mutual information (NMI) [15], Rand index (RI) [21] and balanced F-measure (FM). They are employed to assess different aspects of a given clustering: PUR measures the accuracy of the dominating class in each cluster; NMI is from the information-theoretic perspective and calculates the mutual dependence of the predicted clustering and the ground-truth partitions; RI evaluates true positives within clusters and true negatives between clusters; and FM considers both precision and recall. The higher the four measures, the better the performance. 5.1 Results The clustering results are listed in Table 1. It shows that LMMC consistently outperforms the MMC baseline and conventional clustering methods on all three datasets. Specifically, by incorporating latent variables, LMMC improves the MMC baseline by 3% on TRECVID MED 11, 1% on KTH Actions, and 13% on UCF Sports respectively, in terms of PUR. This demonstrates that learning the latent presence and absence of tags can exploit rich representations of videos, and boost clustering performance. Moreover, LMMC performs better than the three conventional methods, SC, KM and NC, showing the efficacy of the proposed LMMC framework for unsupervised data clustering. Note that MMC runs on the same non-latent representation as the three conventional methods, SC, KM and NC. However, MMC outperforms them on the two largest datasets, TRECVID MED 11 and KTH Actions, and is comparable with them on UCF Sports. This provides evidence for the effectiveness of maximum margin clustering as well as the proposed alternating descent algorithm for optimizing the non-convex objective. Visualization: We select four clusters from TRECVID MED 11, and visualize the results in Figure 2. Please refer to the caption for more details. 6 Conclusion We have presented a latent maximum margin framework for unsupervised clustering. By representing instances with latent variables, our method features the ability to exploit the unobserved information embedded in data. We formulate our framework by large margin learning, and an alter7 Cluster: woodworking project Cluster: birthday party   Tags: piece, wood, machine, lady, indoors, man, kitchen, baby Tags: party, birthday, restaurant, couple, wedding ceremony, wedding, ceremony, indoors   Tags: piece, man, wood, baby, hand, machine, lady, kitchen Tags: birthday, party, restaurant, family, child, wedding ceremony, wedding, couple   Tags: wood, piece, baby, indoors, hand, man, lady, bike Tags: party, birthday, restaurant, child, family, wedding ceremony, chicken, couple Cluster: parade Cluster: landing fish   Tags: city, day, year, Chinese, Christmas, people, lot, group Tags: fish, fishing, boat, man, beach, line, water, woman   Tags: day, street, lot, Chinese, year, line, Christmas, dance Tags: boat, beach, fish, man, men, group, water, woman   Tags: street, day, lot, Chinese, line, year, dancing, dance Tags: fish, beach, boat, men, man, chicken, truck, move Figure 2: Four sample clusters from TRECVID MED 11. We label each cluster by the dominating video class, e.g. “woodworking project”, “parade”, and visualize the top-3 scored videos. A “” sign indicates that the video label is consistent with the cluster label; otherwise, a “” sign is used. The two “mis-clustered” videos are on “parkour” (left) and “feeding animal” (right). Below each video, we show the top eight inferred tags sorted by the potential calculated from Eq. 8. nating descent algorithm is developed to solve the resultant non-convex objective. We instantiate our framework with tag-based video clustering, where each video is represented by a latent tag model with latent presence and absence of video tags. Our experiments conducted on three standard video datasets validate the efficacy of the proposed framework. We believe our solution is general enough to be applied in other applications with latent representations, e.g. video clustering with latent key segments, image clustering with latent region-of-interest, etc. It would also be interesting to extend our framework to semi-supervised learning by assuming a training set of labeled instances. Acknowledgments This work was supported by a Google Research Award, NSERC, and the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior National Business Center contract number D11PC20069. 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/NBC, or the U.S. Government. 8 References [1] S. Andrews, I. Tsochantaridis, and T. Hofmann. Support vector machines for multiple-instance learning. In NIPS, 2002. [2] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. Journal of Machine Learning Research, 2:265–292, 2001. [3] T. M. T. Do and T. Arti`eres. Large margin training for hidden Markov models with partially observed states. In ICML, 2009. [4] A. Farhadi and M. K. Tabrizi. Learning to recognize activities from the wrong view point. In ECCV, 2008. [5] P. F. Felzenszwalb, D. A. McAllester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model. In CVPR, 2008. [6] R. Gopalan and J. Sankaranarayanan. Max-margin clustering: Detecting margins from projections of points on lines. In CVPR, 2011. [7] J. A. Hartigan and M. A. Wong. A k-means clustering algorithm. Applied Statistics, 28:100–108, 1979. [8] M. Hoai and A. Zisserman. Discriminative sub-categorization. In CVPR, 2013. [9] C.-F. Hsu, J. Caverlee, and E. Khabiri. Hierarchical comments-based clustering. In SAC, 2011. [10] H. Izadinia and M. Shah. Recognizing complex events using large margin joint low-level event model. In ECCV, 2012. [11] A. Jain and R. Dubes. Algorithms for Clustering Data. Prentice Hall, 1988. [12] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, 1999. [13] A. Kl¨aser, M. Marszalek, and C. Schmid. A spatio-temporal descriptor based on 3d-gradients. In BMVC, 2008. [14] M. P. Kumar, B. Packer, and D. Koller. Self-paced learning for latent variable models. In NIPS, 2010. [15] T. O. Kvalseth. Entropy and correlation: Some comments. IEEE Transactions on Systems, Man and Cybernetics, 17(3):517–519, 1987. [16] Y.-F. Li, I. W. Tsang, J. T.-Y. Kwok, and Z.-H. Zhou. Tighter and convex maximum margin clustering. In AISTATS, 2009. [17] J. Liu, B. Kuipers, and S. Savarese. Recognizing human actions by attributes. In CVPR, 2011. [18] A. Y. Ng, M. I. Jordan, and Y. Weiss. On spectral clustering: Analysis and an algorithm. In NIPS, 2001. [19] P. Over, G. Awad, J. Fiscus, A. F. Smeaton, W. Kraaij, and G. Quenot. TRECVID 2011 – an overview of the goals, tasks, data, evaluation mechanisms and metrics. In TRECVID, 2011. [20] G.-J. Qi, X.-S. Hua, Y. Rui, J. Tang, T. Mei, and H.-J. Zhang. Correlative multi-label video annotation. In ACM Multimedia, 2007. [21] W. M. Rand. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical Association, 66(336):846–850, 1971. [22] R. Redner and H. Walker. Mixture densities, maximum likelihood and the EM algorithm. SIAM Review, 26(2):195–239, 1984. [23] M. D. Rodriguez, J. Ahmed, and M. Shah. Action MACH a spatio-temporal maximum average correlation height filter for action recognition. In CVPR, 2008. [24] S. Sadanand and J. J. Corso. Action Bank: A high-level representation of activity in video. In CVPR, 2012. [25] F. Schroff, C. L. Zitnick, and S. Baker. Clustering videos by location. In BMVC, 2009. [26] C. Sch¨uldt, I. Laptev, and B. Caputo. Recognizing human actions: A local SVM approach. In ICPR, 2004. [27] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000. [28] A. Vahdat and G. Mori. Handling uncertain tags in visual recognition. In ICCV, 2013. [29] H. Valizadegan and R. Jin. Generalized maximum margin clustering and unsupervised kernel learning. In NIPS, 2006. [30] Y. Wang and L. Cao. Discovering latent clusters from geotagged beach images. In MMM, 2013. [31] Y. Wang and G. Mori. Max-margin hidden conditional random fields for human action recognition. In CVPR, 2009. [32] L. Xu, J. Neufeld, B. Larson, and D. Schuurmans. Maximum margin clustering. In NIPS, 2004. [33] L. Xu and D. Schuurmans. Unsupervised and semi-supervised multi-class support vector machines. In AAAI, 2005. [34] W. Yang and G. Toderici. Discriminative tag learning on YouTube videos with latent sub-tags. In CVPR, 2011. [35] W. Yang, Y. Wang, A. Vahdat, and G. Mori. Kernel latent SVM for visual recognition. In NIPS, 2012. [36] C.-N. J. Yu and T. Joachims. Learning structural SVMs with latent variables. In ICML, 2009. [37] K. Zhang, I. W. Tsang, and J. T. Kwok. Maximum margin clustering made practical. In ICML, 2007. [38] B. Zhao, F. Wang, and C. Zhang. Efficient multiclass maximum margin clustering. In ICML, 2008. 9
2013
223
4,958
Hierarchical Modular Optimization of Convolutional Networks Achieves Representations Similar to Macaque IT and Human Ventral Stream Daniel Yamins∗ McGovern Institute of Brain Research Massachusetts Institute of Technology Cambridge, MA 02139 yamins@mit.edu Ha Hong∗ McGovern Institute of Brain Research Massachusetts Institute of Technology Cambridge, MA 02139 hahong@mit.edu Charles Cadieu McGovern Institute of Brain Research Massachusetts Institute of Technology Cambridge, MA 02139 hahong@mit.edu James J. Dicarlo McGovern Institute of Brain Research Massachusetts Institute of Technology Cambridge, MA 02139 dicarlo@mit.edu Abstract Humans recognize visually-presented objects rapidly and accurately. To understand this ability, we seek to construct models of the ventral stream, the series of cortical areas thought to subserve object recognition. One tool to assess the quality of a model of the ventral stream is the Representational Dissimilarity Matrix (RDM), which uses a set of visual stimuli and measures the distances produced in either the brain (i.e. fMRI voxel responses, neural firing rates) or in models (features). Previous work has shown that all known models of the ventral stream fail to capture the RDM pattern observed in either IT cortex, the highest ventral area, or in the human ventral stream. In this work, we construct models of the ventral stream using a novel optimization procedure for category-level object recognition problems, and produce RDMs resembling both macaque IT and human ventral stream. The model, while novel in the optimization procedure, further develops a long-standing functional hypothesis that the ventral visual stream is a hierarchically arranged series of processing stages optimized for visual object recognition. 1 Introduction Humans recognize visually-presented objects rapidly and accurately even under image distortions and variations that make this a computationally challenging problem [27]. There is substantial evidence that the human brain solves this invariant object recognition challenge via a hierarchical cortical neuronal network called the ventral visual stream [13, 17], which has highly homologous areas in non-human primates [19, 9]. A core, long-standing hypothesis is that the visual input captured by the retina is rapidly processed through the ventral stream into an effective, “invariant” representation of object shape and identity [11, 9, 8]. This hypothesis has been bolstered by recent developments in neuroscience which have shown that abstract category-level visual information is accessible in IT (inferotemporal) cortex, the highest ventral cortical area, but much less effectively accessible in lower areas such as V1, V2 or V4 [23]. This observation has been confirmed both at the individual neural level, where single-unit responses can be decoded using linear classifiers ∗web.mit.edu/ yamins; ∗These authors contributed equally to this work. 1 B) ... Φ1 Φ2 Φk ⊗ ⊗ ⊗ Normalize Pool Filter Threshold & Saturate Basic computatationsl are neural-like operations. A) Basic operations Hierarchical stacking L1 L2 L3 L1 L1 L1 L1 L1 A1 A2 A3 A4 Heterogeneity L3 L1 L3 L2 L3 L1 L2 Convolution Figure 1: A) Heterogenous hierarchical convolutional neural networks are composed of basic operations that are simple and neurally plausibly, including linear reweighting (filtering), thresholding, pooling and normalization. These simple elements are convolutional and are stacked hierarchically to construct non-linear computations of increasingly greater power, ranging through low (L1), medium (L2), and high (L3) complexity structures. B) Several of these elements are combined to produce mixtures capturing heterogenous neural populations. Each processing stage across the heterogeneous networks (A1, A2, ...) can be considered an analogous to a neural visual area. to to yield category predictions [14, 23] and at the population code level, where response vector correlation matrices evidence clear semantic structure [19]. Developing encoding models, models that map the stimulus to the neural response, of visual area IT would likely help us to understand object recognition in humans. Encoding models of lower-level visual responses (RGC, LGN, V1, V2) have been relatively successful [21, 4] (but cf. [26]). In higher-visual areas, particularly IT, theoretical work has described a compelling framework which we ascribe to in this work [29]. However, to this point it has not been possible to produce effective encoding models of IT. This explanatory gap, between model responses and IT responses, is present at both the level of the individual neuron responses and at the population code level. Of particular interest for our analysis in this paper, current models of IT, such as HMAX, have been shown to fail to achieve the specific categorical structures present in neural populations [18]. In other related work, descriptions of higher areas (V4, IT) responses have been made for very narrow classes of artificial stimuli and do not define responses to arbitrary natural images [6, 3]. In a step toward bridging this explanatory gap, we describe advances in constructing models that capture the categorical structures present in IT neural populations and fMRI measurements of humans. We take a top-down functional approach focused on building invariant object representations, optimizing biologically-plausible computational architectures for high performance on a challenging object recognition screening task. We then show that these models capture key response properties of IT, both at the level of individual neuronal responses as well as the neuronal population code – even for entirely new objects and categories never seen in model selection. 2 Methods 2.1 Heterogenous Hierarchical Convolutional Models Inspired by previous neuronal modeling work [7, 6], we constructed a model class based on three basic principles: (i) single layers composed of neurally-plausible basic operations, including filtering, nonlinear activation, pooling and normalization (ii) using hierarchical stacking to construct more complex operations, and (iii) convolutional weight sharing (fig. 1A). This general type of model has been successful in describing a variety of phenomenology throughout the ventral stream [30]. In addition, we allow combinations of multiple hierarchical components each with different 2 parameters (such as pooling size, number of filters, etc.), representing different types of units with different response properties [5] and refer to this concept as (iv) heterogeneity (fig. 1B). We will now formally define the class of heterogeneous hierarchical convolutional neural networks, N. First consider a simple neural network function defined by NΘ = Poolθp(NormalizeθN (ThresholdθT (FilterθF (Input)))) (1) where the pooling, normalization, thresholding and filterbank convolution operations are as described in [28]. The parameters Θ = (θp, θN, θT , θF ) control the structure of the constituent operations. Each model stage therefore actually represents a large family of possible operations, specified by a set of parameters controlling e.g. fan-in, activation thresholds, pooling exponents, spatial interaction radii, and template structure. Like [28], we use randomly chosen filterbank templates in all models, but additionally allow the mean and variance of the filterbank to vary as parameters. To produce deep feedforward networks, single layers are stacked: Pℓ−1 ΘP,l−1 F ilter −−−−→Fℓ ΘF,l T hreshold −−−−−−−→Tℓ ΘT,l Normalize −−−−−−−→Nℓ ΘN,l P ool −−−→Pℓ ΘP,l (2) We denote such a stacking operation as N(Θ1, . . . , Θk), where the Θl are parameters chosen separately for each layer, and will refer to networks of this fork as “single-stack” networks. Let the set of all depth-k single-stack networks be denoted Nk. Given a sequence of such single-stack networks N(Θi1, Θ12, . . . , Θini) (possibly of different depths), the combination N ≡ ⊕k i=1N(Θi1, Θ12, . . . , Θini) is formed by aligning the output layers of these models along the spatial convolutional dimension. These networks N can, of course, also be stacked, just like their singlestack constituents, to form more complicated, deeper heterogenous hierarchies. By definition, the class N consists of all the iterative chainings and combinations of such networks. 2.2 High-Throughput Screening via Hierarchical Modular Optimization Our goal is to find models within N that are effective at modeling neural responses to a wide variety of images. To do this, our basic strategy is to perform high-throughput optimization on a screening task [28]. By choosing a screening task that is sufficiently representative of the aspects that make the object recognition problem challenging, we should be able to find network architectures that are generally applicable. For our screening set, we created a set of 4500 synthetic images composed of 125 images each containing one of 36 three-dimensional mesh models of everyday objects, placed on naturalistic backgrounds. The screening task we evaluated was 36-way object recognition. We trained Maximum Correlation Classifiers (MCC) with 3-fold cross-validated 50%/50% train/test splits, using testing classification percent-correct as the screening objective function. Because N is a very large space, determining among the vast space of possibilities which parameter setting(s) produce visual representations that are high performing on the screening set, is a challenge. We addressed this by applying a novel method we call Hierarchical Modular Optimization (HMO). The intuitive idea of the HMO optimization procedure is that a good multi-stack heterogeneous network will be found by creating mixtures of single-stack components each of which specializes in a portion of an overall problem. To achieve this, we implemented a version of adaptive hyperparameter boosting, in which rounds of optimization are interleaved with boosting and hierarchical stacking. Specifically, suppose that N ∈N and S is a screening stimulus set. Let E be the binary-valued classification correctness indicator, assigning to each stimulus image s 1 or 0 according to whether the screening task prediction was right or wrong. Let score(N, S) = P s∈S N(F(s)). To efficiently find N that maximizes score(N, S), the HMO procedure follows these steps: 1. Optimization: Optimize the score function within the class of single-stack networks, obtaining an optimization trajectory of networks in N (fig 2A, left). The optimization procedure that we use is Hyperparameter Tree Parzen Estimator, as described in [1]. This procedure is effective in large parameter spaces that include discrete and continuous parameters. 2. Boosting: Consider the set of networks explored during step 1 as a set of weak learners, and apply a standard boosting algorithm (Adaboost) to identify some number of networks N11, . . . , N1l1 whose error patterns are complementary (fig 2A, right). 3. Combination: Form the multi-stack network N1 = ⊕iN1i and evaluate E(N1(s)) for all s ∈S. 3 Error-based reweighting Combined Model Optimization of single-stack networks Hierarchical Layering 1000 0 Optimization Step Parameter 1 Parameter 2 Round 1 Error Pattern Combined Error Pattern Round 2 Error Pattern Faces . . . Performance θ filter (1) θ thr (1) θ sat (1) θ pool (3) N11 N12 N13 N14 N21 N22 N23 N24 . . . Performance θ filter (1) θ thr (1) θ sat (1) θ pool (3) θ norm (3) } } Optimizing reweighted objective Adaboost Combination A) B) Screening set Figure 2: A) The Hierarchical Modular Optimization is a mechanism for efficiently optimizing neural networks for object recognition performance. The intuitive idea of HMO is that a good multistack hetergenous network will be found by creating mixtures of single-stack components each of which specializes in a portion of an overall problem. The process first identifies complementary performance gradients in the space of single-stack (non-heterogenous) convolutional neural networks by using version of adaptive boosting interleaved with hyperparameter optimization. The components identified in this process are then composed nonlinearly using a second convolutional layer to produce a combined output model. B) Top: the 36-way confusion matrices associated with two complementary components identified in the HMO process. Bottom Left: The two optimization trajectories from which the single-stack models were drawn that produced the confusion matrices in the top panels. The optimization criterion for the second round (red dots) was defined relative to the errors of the first round (blue dots). Bottom Right: The confusion matrix of the heterogenous model produced by combining the round 1 and round 2 networks. 4. Error-based Reweighting: Repeat step 1, but reweight the scoring to give the j-th stimulus sj weight 0 if N1 is correct in sj, and 1 otherwise. That is, the performance function to be optimized for N is now P s∈S E(N1(s))·E(N(s)). Repeat the step 2 on the results of the optimization trajectory obtained to get models N21, . . . N2k2, and repeat step 3. Steps 1, 2, 3 are repeated K times. After K repeats, we will have obtained a multi-stack network N = ⊕i≤K,j≤kiNij. The process can then simply be terminated, or repeated with the output of N as the input to another stacked network. In the latter case, the next layer is chosen using the same model class N to draw from, and using the same adaptive hyperparameter boosting procedure. The meta-parameters of the HMO procedure include the numbers of components l1, l2, . . . to be selected at each boosting round, the number of times K that the interleaved boosting and optimization is repeated and the number of times M this procedure is stacked. To constrain this space we fix the metaparameters l1 = l2 . . . .. = 10, K = 3, and M ≤2. With the fixed screening set described above, and these metaparameter settings, we generated a network NHMO. We will refer back to this model throughout the rest of the paper. NHMO produces 1250-dimensional feature vectors for any input stimulus; we will denote NHMO(s) as the resulting feature vector for stimulus s and NHMO(s)k as its k-th component in 1250-dimensional space. 2.3 Predicting IT Neural Responses Utilizing the NHMO network, we construct models of IT in one of two ways: 1) we estimate a GLM model predicting individual neural responses or 2) we estimate linear classifiers of object categories to produce a candidate IT neural space. To construct models of individual neural responses we estimate a linear mapping from a non-linear space produced by a model. This procedure is a standard GLM of individual neural responses. Because IT responses are highly non-linear functions of the input image, successful models must 4 capture the non-linearity of the IT response. The NHMO network produces a highly-nonlinear transformation of the input image and we compare the efficacy of this non-linearity against those produced by other models. Specifically for a neuron ni, we estimate a vector wi to minimize the regression error from NHMO features to ni’s responses, over a training set of stimuli. We evaluate goodness of fit of by measuring the regression r2 values between the neural response and the GLM predictions on held-out images, averaged over several train/test splits. Taken over the set of predicted neurons n1, n2, ... nk, the collection of regression weight vectors wi comprise a matrix W that can be thought of as a final linear top level that forms part of the model of IT. This method evidently requires the presence of low-level neural data on which to train. We also produce a candidate IT neural space by estimating linear classifiers on an object recognition task. As we might expect different subregions of IT cortex to have different selectivities for object categories (for example face, body, and place patches [15, 10]), the output of the linear classifiers will also respond preferentially to different object categories. We may be able to leverage some understanding of what a subregion’s task specialization might be to produce the weighting matrix W. Specifically, we estimate a linear mapping W to be the weights of a set of linear classifiers trained from the NHMO features on a specific set of object recognition tasks. We can then evaluate this mapping on a novel set of images and compare to measured IT or human ventral stream data. This method may have traction even when individual neural response data are not available. 2.4 Representational Dissimilarity Matrices Implicit in this discussion is the idea of comparing two different representations (in this case, the model’s predicted population versus the real neural population) on a fixed stimulus set. The Representational Dissimilarity Matrix (RDM) is a convenient tool for this comparison [19]. Formally, given a stimulus set S = s1, . . . , sk and vectors of neural population responses R = ⃗r1, . . . ,⃗rk in which rij is the response of the j-th neuron to the i-th stimulus, define RDM(R)ij = 1 − cov(ri, rj) var(ri) · var(rj). The RDM characterizes the layout of the stimuli in high-dimensional neural population space. Following [19], we measured similarity between population representations as the Spearman rank correlations between the RDMs for two populations, in which both RDMs are treated as vectors in k(k −1)/2-dimensional space. Two populations can have similar RDMs on a given stimulus set, even if details of the neural responses are different. 3 Results To test the NHMO model, we took two routes, corresponding to the two methods for prediction described above. First (sec. 3.1), we obtained our own neural data on a testing set of our own design and tested the NHMO model’s ability to predict individual-level neural responses using the linear regression methodology described above. This approach allowed us to directly test the NHMO models’ power in a setting were we had acess to low-level neural information. Second (sec. 3.2), we also compared to neural data collected by a different group, but only released at a very coarse level of detail – the RDMs of their measured population. This constraint required us to additionally posit a task blend, and to make the comparison at the population RDM level. 3.1 The Neural Representation Benchmark Image Set We analyzed neural data collected on the Neural Representation Benchmark (NRB) dataset, which was originally developed to compare monkey neural and human behavioral responses [23, 2]. The NRB dataset consists of 5760 images of 64 distinct objects. The objects come from eight “basic” categories (animals, boats, cars, chairs, faces, fruits, planes, tables), with eight exemplars per category (e.g., BMW, Z3, Ford, &c for cars) (see fig 3B bottom left), with objects varying in position, size, and 3d-pose, and placed on a variety uncorrelated natural backgrounds. These parameters were varied concomitantly, picked randomly from a uniform ranges at three levels of object identity-preserving variation (low, medium, and high). The NRB set was designed to test explicitly the transformations of pose, position and size that are at the crux of the invariant object recognition problem. None of the 5 IT Neurons V2-like V4 Neurons HMO Model V1like Pixels HMAX D) SIFT A) Pixels Low Variation High Variation All Controls HMO V4 IT Split-Half Animals Boats Cars Chairs Faces Fruits Planes Tables 8-way Categorization Task Animals Boats Cars Chairs Faces Fruits Planes Tables V1like SIFT HMAX V2like HMO IT Split Half Median Cross-Validated R2 Spearman of RDM to IT B) C) Unit 104 Response level Performance Ratio (relative to human) Figure 3: A) 8-way categorization performances. Comparison was made between several existing models from the literature (cyan bars), the HMO model features, and data from V4 and IT neural populations. Performances are normalized relative to human behavioral data collected from Amazon Mechanical Turk experiments. High levels variation strongly separates the HMO model and the high-level IT neural features from the other representations. B) Top: Actual neural response (black) vs. prediction (red) for a single sample IT unit. This neuron shows high functional selectivity for faces, which is effectively mirrored by the predicted unit. Bottom Left: Sample Neural Representation Benchmark images. C) Comparison of Representational Dissimilarity Matrices (RDMs) for NRB dataset. D) As populations increase in complexity and abstraction power, they become progressively more like that of IT, as category structure that was blurred out at lower levels by variability becomes abstracted at the higher levels. The HMO model shows similarity to IT both on the block diagonal structure associated with categorization performance, but also on the off-diagonal comparisons that characterize the neural representation more precisely. objects, categories or backgrounds used in the HMO screening set appeared in the NRB set; moreover, the NRB image set was created with different image and lighting parameters, with different rendering software. Neural data was obtained via large-scale parallel array electrophysiology recordings in the visual cortex of awake behaving macaques. Testing set images were presented foveally (central 10 deg) with a Rapid Serial Visual Presentation (RSVP) paradigm, involving passively viewing animals shown random stimulus sequences with durations comparable to those in natural primate fixations (e.g. 200 ms). Electrode arrays were surgically implanted in V4 and IT, and recordings took place daily over a period of several months. A total of 296 multi-unit responses were recorded from two animals. For each testing stimulus and neuron, final neuron output responses were obtained by averaging data from between 25 and 50 repeated trials. With this dataset, we addressed two questions: how well the HMO model was able to perform on the categorization tasks supported by the dataset, how well the HMO predicted the neural data. 6 Performance was assessed for three types of tasks, including 8-way basic category classification, 8-way car object identification, and 8-way face object identification. We computed the model’s predicted outputs in response to each of the testing images, and then tested simple, cross-validated linear classifiers based on these features. As performance controls, we also computed features on the test images for a number of models from the literature, including a V1-like model [27], a V2like model [12], and an HMAX variant [25]. We also compared to a simple computer vision model, SIFT[22], as well as the basic pixel control. Performances were also measured for neural output features, building on previous results showing that V4 neurons performed less well than IT neurons at higher variation levels[23], and confirming that the testing tasks meaningfully engaged higherlevel vision processing. Figure 3A) compares overall performances, showing that the HMO-selected model is able to achieve human-level performance at all levels of variation. Critically, the HMO model performs well not just in low-variation settings in which simple lower-level models can do so, but is able to achieve near-human performance (within 1 std of the average human) even when faced with large amounts of variation which caused the other models to perform near chance. Since the testing set contains entirely different objects in non-overlapping basic categories, with none of the same backgrounds, this suggests that the nonlinearity identified in the HMO screening phase is able to achieve significant generalization across image domains. Given that the model evidenced high transferable performance, we next determined the ability of the model to explain low-level neuronal responses using regression. The HMO model is able to predict approximately 48% of the explainable variance in the neural data, more than twice as much as any competing model (fig. 3B). Using the same transformation matrices W obtained from the regression fitting, we also computed RDMs, which show significant similarity to IT populations at both nearly comparable to the split-half similarity range of the IT population itself (fig. 3C). A key comparison between models and data shows that as populations ascend the ventral hierarchy and increase in complexity, they become progressively closer to IT, with category structure that was blurred out at lower levels by variation becoming properly abstracted away at the higher levels (fig. 3D). 3.2 The Monkeys & Man Image Set Kriegeskorte et. al. analyzed neural recordings made in an anterior patch of macaque IT on a small number of widely varying naturalistic images of every-day objects, and additionally obtained fMRI recordings from the analogous region of human visual cortex [19]. These objects included human and animal faces and body parts, as well as a variety of natural and man-made inanimate objects. Three striking findings of this work were that (i) the population code (as measured by RDMs) of the macaque neurons strongly mirrors the structure present in the human fMRI data, (ii) this structure appears to be dominated by the separation of animate vs inanimate object classes (fig. 4B, lower right) and (iii) that none of a variety of computational models produced RDMs with this structure. Individual unit neural response data from these experiments is not publicly available. However, we were able to obtain a set of approximately 1000 additional training images with roughly similar categorical distinctions to that of the original target images, including distributions of human and animal faces and body parts, and a variety of other non-animal objects [16]. We posited that the population code structure present in the anterior region of IT recorded in the original experiment is guided by functional goals similar to the task distinctions supported by this dataset. To test this, we computed linear classifiers from NHMO features for all the binary distinctions possible in the training set (e.g. “human/non-human”, “animate/inanimate”, “hand/non-hand”, “bird/non-bird”, &c). The linear weighting matrix W derived from these linear classifiers was then used to produce an RDM matrix which could be compared to that measured originally. In fact, the HMO-based population RDM strongly qualitatively matches that of the monkey IT RDM and, to a significant but lesser extent, that of the human IT RDM (fig. 4B). This fit is significantly better than that of all models evaluated by Kriegeskorte, and approaches the human/monkey fit value itself (fig. 4A). 4 Discussion High consistency with neural data at individual neuronal response and population code levels across several diverse datasets suggests that the HMO model is a good candidate model of the higher ventral stream processing. That fact that the model was optimized only for performance, and not directly for consistency with neural responses, highlights the power of functionally-driven computa7 HMO Monkey IT (Kriegeskorte, 2008) Human (Kriegeskorte, 2008) Pixels HMAX V1-like Pixels HMAX V1-like HMO Monkey/ Human A) B) Spearman Rank Correlation Figure 4: A) Comparison of model representations to Monkey IT (solid bars) and Human ventral stream (hatched bars). The HMO model followed by a simple task-blend based linear reweighting (red bars) quantitatively approximates the human/monkey fit value (black bar), and captures both monkey and human ventral stream structure more effectively than any of the large number of models shown in [18], or any of the additional comparison models we evaluated here (cyan bars). B) Representational Dissimilarity Matrices show a clear qualitative similarity between monkey IT and human IT on the one hand [19] and between these and the HMO model representation. tional approaches in understanding cortical processing. These results further develop a long-standing functional hypothesis about the ventral visual stream, and show that more rigorous versions of its architecture and functional constraints can be leveraged using modern computational tools to expose the transformation of visual information in the ventral stream. The picture that emerges is of a general-purpose object recognition architecture – approximated by the NHMO network – situtated just posterior to a set of several downstream regions that can be thought of as specialized linear projections – the matrices W – from the more general upstream region. These linear projections can, at least in some cases, be characterized effectively as the signature of interpretable functional tasks in which the system is thought to have gained expertise. This two-step arrangement makes sense if there is a core set of object recognition primitives that are comparatively difficult to discover, but which, once found, underlie many recognition tasks. The particular recognition tasks that the system learns to solve can all draw from this upstream “non-linear reservoir”, creating downstream specialists that trade off generality for the ability to make more efficient judgements on new visual data relative to the particular problems on which they specialize. This hypothesis makes testable predictions about how monkey and human visual systems should both respond to certain real-time training interventions (e.g. the effects of “nurture”), while being circumscribed within a range of possible behaviors allowed by the (presumably) harder-to-change upstream network (e.g. the constraints of “nature”). It also suggests that it will be important to explore recent high-performing computer vision systems, e.g. [20], to determine whether these algorithms provide further insight into ventral stream mechanisms. Our results show that behaviorally-driven computational approaches have an important role in understanding the details of cortical processing[24]. This is a fruitful direction of future investigation for such models to engage with additional neural and behavior experiments. References [1] J. Bergstra, D. Yamins, and D.D. Cox. Making a Science of Model Search, 2012. [2] C. Cadieu, H. Hong, D. Yamins, N. Pinto, N. Majaj, and J.J. DiCarlo. The neural representation benchmark and its evaluation on brain and machine. In International Conference on Learning Representations, May 2013. [3] C. Cadieu, M. Kouh, A. Pasupathy, C. E. Connor, M. Riesenhuber, and T. Poggio. A model of v4 shape selectivity and invariance. J Neurophysiol, 98(3):1733–50, 2007. [4] M. Carandini, J. B. Demb, V. Mante, D. J. Tolhurst, Y. Dan, B. A. Olshausen, J. L. Gallant, and N. C. Rust. Do we know what the early visual system does? J Neurosci, 25(46):10577–97, 2005. 8 [5] M. Churchland and K. Shenoy. Temporal complexity and heterogeneity of single-neuron activity in premotor and motor cortex. Journal of Neurophysiology, 97(6):4235–4257, 2007. [6] C. E. Connor, S. L. Brincat, and A. Pasupathy. Transformation of shape information in the ventral pathway. Curr Opin Neurobiol, 17(2):140–7, 2007. [7] S. V. David, B. Y. Hayden, and J. L. Gallant. Spectral receptive field properties explain shape selectivity in area v4. J Neurophysiol, 96(6):3492–505, 2006. [8] R. Desimone, T. D. Albright, C. G. Gross, and C. Bruce. Stimulus-selective properties of inferior temporal neurons in the macaque. J Neurosci, 4(8):2051–62, 1984. [9] J. J. DiCarlo, D. Zoccolan, and N. C. Rust. How does the brain solve visual object recognition? Neuron, 73(3):415–34, 2012. [10] P.E. Downing, Y. Jiang, M. Shuman, and N. Kanwisher. A cortical area selective for visual processing of the human body. Science, 293:2470–2473, 2001. [11] D.J. Felleman and D.C. Van Essen. Distributed hierarchical processing in the primate cerebral cortex. Cerebral Cortex, 1:1–47, 1991. [12] J. Freeman and E. Simoncelli. Metamers of the ventral stream. Nature Neuroscience, 14(9):1195–1201, 2011. [13] K. Grill-Spector, Z. Kourtzi, and N. Kanwisher. The lateral occipital complex and its role in object recognition. Vision research, 41(10-11):1409–1422, 2001. [14] C. P. Hung, G. Kreiman, T. Poggio, and J. J. DiCarlo. Fast readout of object identity from macaque inferior temporal cortex. Science, 310(5749):863–6, 2005. [15] N. Kanwisher, J. McDermott, and M. M. Chun. The fusiform face area: a module in human extrastriate cortex specialized for face perception. J Neurosci, 17(11):4302–11, 1997. [16] R. Kiani, H. Esteky, K. Mirpour, and K. Tanaka. Object category structure in response patterns of neuronal population in monkey inferior temporal cortex. J Neurophysiol, 97(6):4296–309, 2007. [17] Z. Kourtzi and N. Kanwisher. Representation of perceived object shape by the human lateral occipital complex. Science, 293(5534):1506–1509, 2001. [18] N. Kriegeskorte. Relating population-code representations between man, monkey, and computational models. Frontiers in Neuroscience, 3(3):363, 2009. [19] N. Kriegeskorte, M. Mur, D. A. Ruff, R. Kiani, J. Bodurka, H. Esteky, K. Tanaka, and P. A. Bandettini. Matching categorical object representations in inferior temporal cortex of man and monkey. Neuron, 60(6):1126–41, 2008. [20] A Krizhevsky, I Sutskever, and G Hinton. ImageNet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems, 2012. [21] P. Lennie and J. A. Movshon. Coding of color and form in the geniculostriate visual pathway (invited review). J Opt Soc Am A Opt Image Sci Vis, 22(10):2013–33, 2005. [22] D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 2004. [23] N. Majaj, H. Najib, E. Solomon, and J.J. DiCarlo. A unified neuronal population code fully explains human object recognition. In Computational and Systems Neuroscience (COSYNE), 2012. [24] David Marr, Tomaso Poggio, and Shimon Ullman. Vision. A Computational Investigation Into the Human Representation and Processing of Visual Information. MIT Press, July 2010. [25] J. Mutch and D. G. Lowe. Object class recognition and localization using sparse features with limited receptive fields. IJCV, 2008. [26] Bruno A Olshausen and David J Field. How close are we to understanding v1? Neural computation, 17(8):1665–1699, 2005. [27] N. Pinto, D. D. Cox, and J. J. DiCarlo. Why is Real-World Visual Object Recognition Hard. PLoS Comput Biol, 2008. [28] N. Pinto, D. Doukhan, J. J. DiCarlo, and D. D. Cox. A High-Throughput Screening Approach to Discovering Good Forms of Biologically Inspired Visual Representation. PLoS Computational Biology, 5(11), 2009. [29] T. Serre, A. Oliva, and T. Poggio. A feedforward architecture accounts for rapid categorization. Proc Natl Acad Sci U S A, 104(15):6424–9, 2007. 0027-8424 (Print) Journal Article. [30] Thomas Serre, Gabriel Kreiman, Minjoon Kouh, Charles Cadieu, Ulf Knoblich, and Tomaso Poggio. A quantitative theory of immediate visual recognition. In Prog. Brain Res., volume 165, pages 33–56. Elsevier, 2007. 9
2013
224
4,959
Online PCA for Contaminated Data Jiashi Feng ECE Department National University of Singapore jiashi@nus.edu.sg Huan Xu ME Department National University of Singapore mpexuh@nus.edu.sg Shie Mannor EE Department Technion shie@ee.technion.ac.il Shuicheng Yan ECE Department National University of Singapore eleyans@nus.edu.sg Abstract We consider the online Principal Component Analysis (PCA) where contaminated samples (containing outliers) are revealed sequentially to the Principal Components (PCs) estimator. Due to their sensitiveness to outliers, previous online PCA algorithms fail in this case and their results can be arbitrarily skewed by the outliers. Here we propose the online robust PCA algorithm, which is able to improve the PCs estimation upon an initial one steadily, even when faced with a constant fraction of outliers. We show that the final result of the proposed online RPCA has an acceptable degradation from the optimum. Actually, under mild conditions, online RPCA achieves the maximal robustness with a 50% breakdown point. Moreover, online RPCA is shown to be efficient for both storage and computation, since it need not re-explore the previous samples as in traditional robust PCA algorithms. This endows online RPCA with scalability for large scale data. 1 Introduction In this paper, we investigate the problem of robust Principal Component Analysis (PCA) in an online fashion. PCA aims to construct a low-dimensional subspace based on a set of principal components (PCs) to approximate all the observed samples in the least-square sense [19]. Conventionally, it computes PCs as the eigenvectors of the sample covariance matrix in batch mode, which is both computationally expensive and in particular memory exhausting, when dealing with large scale data. To address this problem, several online PCA algorithms have been developed in literature [15, 23, 10]. For online PCA, at each time instance, a new sample is revealed, and the PCs estimation is updated accordingly without having to re-explore all previous samples. Significant advantages of online PCA algorithms include independence of their storage space requirement of the number of samples, and handling newly revealed samples quite efficiently. Due to the quadratic loss used, PCA is notoriously sensitive to corrupted observations (outliers), and the quality of its output can suffer severely in the face of even a few outliers. Therefore, much work has been dedicated to robustifying PCA [12, 2, 24, 6]. However, all of these methods work in batch mode and cannot handle sequentially revealed samples in the online learning framework. For instance, [24] proposed a high-dimensional robust PCA (HR-PCA) algorithm that is based on iterative performing PCA and randomized removal. Notice that the random removal process involves calculating the order statistics over all the samples to obtain the removal probability. Therefore, all samples must be stored in memory throughout the process. This hinders its application to large scale data, for which storing all data is impractical. 1 In this work, we propose a novel online Robust PCA algorithm to handle contaminated sample set, i.e., sample set that comprises both authentic samples (non-corrupted samples) and outliers (corrupted samples), which are revealed sequentially to the algorithm. Previous online PCA algorithms generally fail in this case, since they update the PCs estimation through minimizing the quadratic error w.r.t. every new sample and are thus sensitive to outliers. The outliers may manipulate the PCs estimation severely and the result can be arbitrarily bad. In contrast, the proposed online RPCA is shown to be robust to the outliers. This is achieved by a probabilistic admiting/rejection procedure when a new sample comes. This is different from previous online PCA methods, where each and every new sample is admitted. The probabilistic admittion/rejection procedure endows online RPCA with the ability to reject more outliers than authentic samples and thus alleviates the affect of outliers and robustifies the PCs estimation. Indeed, we show that given a proper initial estimation, online RPCA is able to steadily improve its output until convergence. We further bound the deviation of the final output from the optimal solution. In fact, under mild conditions, online RPCA can be resistent to 50% outliers, namely having a 50% breakdown point. This is the maximal robustness that can be achieved by any method. Compared with previous robust PCA methods (typically works in batch mode), online RPCA only needs to maintain a covariance matrix whose size is independent of the number of data points. Upon accepting a newly revealed sample, online RPCA updates the PCs estimation accordingly without re-exploring the previous samples. Thus, online RPCA can deal with large amounts of data with low storage expense. This is in stark contrast with previous robust PCA methods which typically requires to remember all samples. To the best of our knowledge, this is the first attempt to make online PCA work for outlier-corrupted data, with theoretical performance guarantees. 2 Related Work Standard PCA is performed in batch mode, and its high computational complexity may become cumbersome for the large datasets. To address this issue, different online learning techniques have been proposed, for example [1, 8], and many others. Most of current online PCA methods perform the PCs estimation in an incremental manner [8, 18, 25]. They maintain a covariance matrix or current PCs estimation, and update it according to the new sample incrementally. Those methods provide similar PCs estimation accuracy. Recently, a randomized online PCA algorithm was proposed by [23], whose objective is to minimize the total expected quadratic error minus the total error of the batch algorithm (i.e., the regret). However, none of these online PCA algorithms is robust to the outliers. To overcome the sensitiveness of PCA to outliers, many robust PCA algorithms have been proposed [21, 4, 12], which can be roughly categorized into two groups. They either pursue robust estimation of the covariance matrix, e.g., M-estimator [17], S-estimator [22], and Minimum Covariance Determinant (MCD) estimator [21], or directly maximize certain robust estimation of univariate variance for the projected observations [14, 3, 4, 13]. These algorithms inherit the robustness characteristics of the adopted estimators and are qualitatively robust. However, none of them can be directly applied in online learning setting. Recently, [24] and the following work [6] propose high-dimensional robust PCA, which can achieve maximum 50% breakdown point. However, these methods iteratively remove the observations or tunes the observations weights based on statistics obtained from the whole data set. Thus, when a new data point is revealed, these methods need to re-explore all of the data and become quite expensive in computation and in storage. The most related works to ours are the following two works. In [15], an incremental and robust subspace learning method is proposed. The method proposes to integrate the M-estimation into the standard incremental PCA calculation. Specifically, each newly coming data point is re-weighted by a pre-defined influence function [11] of its residual to the current estimated subspace. However, no performance guarantee is provided in this work. Moreover, the performance of the proposed algorithm relies on the accuracy of PCs obtained previously. And the error will be cumulated inevitably. Recently, a compressive sensing based recursive robust PCA algorithm was proposed in [20]. In this work, the authors focused on the case where the outliers can be modeled as sparse vectors. In contrast, we do not impose any structural assumption on the outliers. Moreover, the proposed method in [20] essentially solves compressive sensing optimization over a small batch of data to update the PCs estimation instead of using a single sample, and it is not clear how to extend the method to the 2 latter case. Recently, He et al. propose an incremental gradient descent method on Grassmannian manifold for solving the robust PCA problem, named GRASTA [9]. However, they also focus on a different case from ours where the outliers are sparse vectors. 3 The Algorithm 3.1 Problem Setup Given a set of observations {y1, · · · , yT } (here T can be finite or infinite) which are revealed sequentially, the goal of online PCA is to estimate and update the principal components (PCs) based on the newly revealed sample yt at time instance t. Here, the observations are the mixture of authentic samples (non-corrupted samples) and outliers (corrupted samples). The authentic samples zi ∈Rp are generated through a linear mapping: zi = Axi + ni. Noise ni is sampled from normal distribution N(0, Ip); and the signal xi ∈Rd are i.i.d. samples of a random variable x with mean zero and variance Id. Let µ denote the distribution of x. The matrix A ∈Rp×d and the distribution µ are unknown. We assume µ is absolutely continuous w.r.t. the Borel measure and spherically symmetric. And µ has light tails, i.e., there exist constants C > 0 such that Pr(∥x∥≥x) ≤d exp(1−Cx/α √ d) for all x ≥0. The outliers are denoted as oi ∈Rp and in particular they are defined as follows. Definition 1 (Outlier). A sample oi ∈Rp is an outlier w.r.t. the subspace spanned by {wj}d j=1 if it deviates from the subspace, i.e., Pd j=1 |wT j oi|2 ≤Γo. In the above definition, we assume that the basis wj and outliers o are both normalized (see Algorithm 1 step 1)-a) where all the samples are ℓ2-normalized). Thus, we directly use inner product to define Γo. Namely a sample is called outlier if it is distant from the underlying subspace of the signal. Apart from this assumption, the outliers are arbitrary. In this work, we are interested in the case where the outliers are mixed with authentic samples uniformly in the data stream, i.e., taking any subset of the dataset, the outlier fraction is identical when the size of the subset is large enough. The input to the proposed online RPCA algorithm is the sequence of observations Y = {y1, y2, · · · , yT }, which is the union of authentic samples Z = {zi} generated by the aforementioned linear model and outliers O = {oi}. The outlier fraction in the observations is denoted as λ. Online RPCA aims at learning the PCs robustly and the learning process proceeds in time instances. At the time instance t, online RPCA chooses a set of principal components {w(t) j }d j=1. The performance of the estimation is measured by the Expressed Variance (E.V.) [24]: E.V. ≜ Pd j=1 w(t) j T AAT w(t) j Pd j=1 wT j AAT wj . Here, wj denotes the true principal components of matrix A. The E.V. represents the portion of signal Ax being expressed by {w(t) j }d j=1. Thus, 1 −E.V. is the reconstruction error of the signal. The E.V. is a commonly used evaluation metric for the PCA algorithms [24, 5]. It is always less than or equal to one, with equality achieved by a perfect recovery. 3.2 Online Robust PCA Algorithm The details of the proposed online RPCA algorithm are shown in Algorithm 1. In the algorithm, the observation sequence Y = {y1, y2, · · · , yT } is sequentially partitioned into (T ′ + 1) batches {B0, B1, B2, . . . , BT ′}. Each batch consists of b observations. Since the authentic samples and outliers are mixed uniformly, the outlier fraction in each batch is also λ. Namely, in each batch Bi, there are (1 −λ)b authentic samples and λb outliers. Note that such small batch partition is only for the ease of illustration and analysis. Since the algorithm only involves standard PCA computation, we can employ any incremental or online PCA method [8, 15] to update the PCs estimation upon accepting a new sample. The maintained sample covariance matrix, can be set to zero every b time instances. Thus the batch partition is by no means necessary in practical implementation. In the algorithm, the initial PC estimation can be obtained through standard PCA or robust PCA [24] on a mini batch of the samples. 3 Algorithm 1 Online Robust PCA Algorithm Input: Data sequence {y1, . . . , yT }, buffer size b. Initialization: Partition the data sequence into small batches {B0, B1, . . . , BT ′}. Each patch contains b data points. Perform PCA on the first batch B0 and obtain the initial principal component {w(0) j }d j=1. t = 1. w∗ j = w(0) j , ∀j = 1, . . . , d. while t ≤T ′ do 1) Initialize the sample covariance matrix: C(t) = 0. for i = 1 to b do a) Normalize the data point by its ℓ2-norm: y(t) i := y(t) i /∥y(t) i ∥ℓ2. b) Calculate the variance of y(t) i along the direction w(t−1): δi = Pd j=1 w(t−1) j T y(t) i 2 . c) Accept y(t) i with probability δi. d) Scale y(t) i as y(t) i ←y(t) i /b√δi. e) If y(t) i is accepted, update C(t) ←C(t) + y(t) i y(t) i T . end for 2) Perform eigen-decomposition on Ct and obtain the leading d eigenvector {w(t) j }d j=1. 3) Update the PC as w∗ j = w(t) j , ∀j = 1, . . . , d. 4) t := t + 1. end while Return w∗. We now explain the intuition of the proposed online RPCA algorithm. Given an initial solution w(0) which is “closer” to the true PC directions than to the outlier direction 1, the authentic samples will have larger variance along the current PC direction than outliers. Thus in the probabilistic data selection process (as shown in Algorithm 1 step b) to step d)), authentic samples are more likely to be accepted than outliers. Here the step d) of scaling the samples is important for obtaining an unbiased estimator (see details in the proof of Lemma 4 in supplementary material and [16]). Therefore, in the following PC updating based on standard PCA on the accepted data, authentic samples will contribute more than the outliers. The estimated PCs will be “moved” towards to the true PCs gradually. Such process is repeated until convergence. 4 Main Results In this section we present the theoretical performance guarantee of the proposed online RPCA algorithm (Algorithm 1). In the sequel, w(t) j is the solution at the t-th time instance. Here without loss of generality we assume the matrix A is normalized, such that the E.V. of the true principal component wj is Pd j=1 wT j AT Awj = 1. The following theorem provides the performance guarantee of Algorithm 1 under the noisy case. The performance of w(t) can be measured by H(w(t)) ≜Pd j=1 ∥w(t)T j A∥2. Let s = ∥x∥2/∥n∥2 be the signal noise ratio. Theorem 1 (Noisy Case Performance). There exist constants c′ 1, c′ 2 which depend on the signal noise ratio s and ϵ1, ϵ2 > 0 which approximate zero when s →∞or b →∞, such that if the initial solution w(0) j in Algorithm 1 satisfies: λb X i=1 d X j=1 w(0) j T oi 2 ≤(1 −λ)b(1 −ϵ2) c′ 2(1 −Γo) 1 4(c′ 1(1 −ϵ) −ϵ1)2 −ϵ2  , and H(w(0)) ≥1 2(c′ 1(1−2ϵ)−ϵ1)− v u u t(c′ 1(1 −ϵ) + ϵ1)2 −4ϵ2 4 − c′ 2 Pλb i=1 Pd j=1(w(0) j T oi)2(1 −Γo) (1 −λ)b(1 −ϵ2) , 1In the following section, we will provide a precise description of the required closeness. 4 then the performance of the solution from Algorithm 1 will be improved in each iteration, and eventually converges to: lim t→∞H(w(t)) ≥1 2(c′ 1(1 −2ϵ) −ϵ1) + v u u t(c′ 1(1 −2ϵ) −ϵ1)2 −4ϵ2 4 − c′ 2 Pλb i=1 Pd j=1(w(0) j T oi)2(1 −Γo) (1 −λ)b(1 −ϵ2) . Here ϵ1 and ϵ2 decay as ˜O(d 1 2 b−1 2 s−1), ϵ decays as ˜O(d 1 2 b−1 2 ), and c′ 1 = (s −1)2/(s + 1)2, c′ 2 = (1 + 1/s)4. Remark 1. From Theorem 1, we can observe followings: 1. When the outliers vanish, the second term in the square root of performance H(w(t)) is zero. H(w(t)) will converge to (c′ 1(1 −2ϵ) −ϵ1)/2 + p (c′ 1(1 −2ϵ) −ϵ1)2 −4ϵ2/2 < c′ 1(1 −2ϵ) −ϵ1 < c′ 1 < 1. Namely, the final performance is smaller than but approximates 1. Here c′ 1, ϵ1, ϵ2 explain the affect of noise. 2. When s →∞, the affect of noise is eliminated, ϵ1, ϵ2 →0, c′ 1 →1. H(w(t)) converges to 1 −2ϵ. Here ϵ depends on the ratio of intrinsic dimension over the sample size, and ϵ accounts for the statistical bias due to performing PCA on a small portion of the data. 3. When the batch size increases to infinity, ϵ →0, H(w(t)) converges to 1, meaning perfect recovery. To further investigate the behavior of the proposed online RPCA in presence of outliers, we consider the following noiseless case. For the noiseless case, the signal noise ratio s →∞, and thus c′ 1, c′ 2 → 1 and ϵ1, ϵ2 →0. Then we can immediately obtain the performance bound of Algorithm 1 for the noiseless case from Theorem 1. Theorem 2 (Noiseless Case Performance). Suppose there is no noise. If the initial solution w(0) in Algorithm 1 satisfies: λb X i=1 d X j=1 (w(0)T j oi)2 ≤(1 −λ)b 4(1 −Γo), and H(w(0)) ≥1 2 − v u u t1 4 − Pλb i=1 Pd j=1(w(0) j T oi)2(1 −Γo) (1 −λ)b , then the performance of the solution from Algorithm 1 will be improved in each updating and eventually converges to: lim t→∞H(w(t)) ≥1 2 + v u u t1 4 − Pλb i=1 Pd j=1(w(0) j T oi)2(1 −Γo) (1 −λ)b . Remark 2. Observe from Theorem 2 the followings: 1. When the outliers are distributed on the groundtruth subspace, i.e., Pd j=1 |wT j oi|2 = 1, the conditions become Pλb i=1 Pd j=1(w(0)T oi)2 < ∞and H(w(0)) ≥0. Namely, for whatever initial solution, the final performance will converge to 1. 2. When the outliers are orthogonal to the groundtruth subspace, i.e., Pd j=1 |wT j oi|2 = 0, the conditions for the initial solution becomes Pλb i=1 Pd j=1 |w(0)T j oi|2 ≤b(1 −λ)/4, and H0 ≥1/2 − r 1/4 −Pλb i=1 Pd j=1(w(0) j T oi)2/(1 −λ)b. Hence, when the outlier fraction λ increases, the initial solution should be further away from outliers. 5 3. When 0 < Pd j=1 |wT j oi|2 < 1, the performance of online RPCA is improved by at least 2 r 1/4 −Pλb i=1 Pd j=1(w(0) j T oi)2(1 −Γo)/(1 −λ)b from its initial solution. Hence, when the initial solution is further away from the outliers, the outlier fraction is smaller, or the outliers are closer to groundtruth subspace, the improvement is more significant. Moreover, observe that given a proper initial solution, even if λ = 0.5, the performance of online RPCA still has a positive lower bound. Therefore, the breakdown point of online RPCA is 50%, the highest that any algorithm can achieve. Discussion on the initial condition In Theorem 1 and Theorem 2, a mild condition is imposed on the initial estimate. In practice, the initial estimate can be obtained by applying batch RPCA [6] or HRPCA [24] on a small subset of the data. These batch methods are able to provide initial estimate with performance guarantee, which may satisfy the initial condition. 5 Proof of The Results We briefly explain the proof of Theorem 1: we first show that when the PCs estimation is being improved, the variance of outliers along the PCs will keep decreasing. Then we demonstrate that each PCs updating conducted by Algorithm 1 produces a better PCs estimation and decreases the impact of outliers. Such improvement will continue until convergence, and the final performance has bounded deviation from the optimum. We provide here some concentration lemmas which are used in the proof of Theorem 1. The proof of these lemmas is provided in the supplementary material. We first show that with high probability, both the largest and smallest eigenvalues of the signals xi in the original space converge to 1. This result is adopted from [24]. Lemma 1. There exists a constant c that only depends on µ and d, such that for all γ > 0 and b signals {xi}b i=1, the following holds with high probability: sup w∈Sd 1 b b X i=1 (wT xi)2 −1 ≤ϵ, where ϵ = cα q d log3 b/b. Next lemma is about the sampling process in the Algorithm 1 from step b) to step d). Though the sampling process is without replacement and the sampled observations are not i.i.d., the following lemma provides the concentration of the sampled observations. Lemma 2 (Operator-Bernstein inequality [7]). Let {z′ i}m i=1 be a subset of Z = {zi}t i=1, which is formed by randomly sampling without replacement from Z, as in Algorithm 1. Then the following statement holds m X i=1 wT z′ i −E m X i=1 wT z′ i ! ≤δ with probability larger than 1 −2 exp(−δ2/4m). Given the result in Lemma 1 , we obtain that the authentic samples concentration properties as stated in the following lemma [24]. Lemma 3. If there exists ϵ such that sup w∈Sd 1 t t X i=1 |wT xi|2 −1 ≤ϵ, 6 and the observations zi are normalized by ℓ2-norm, then for any w1, · · · , wd ∈Sp, the following holds: (1 −ϵ)H(w) −2 p (1 + ϵ)H(w)/s (1/s + 1)2 ≤ 1 t t X i=1 d X j=1 (wT j zi)2 ≤(1 + ϵ)H(w) + 2 p (1 + ϵ)H(w)/s + 1/s2 (1/s −1)2 , where H(w) = Pd j=1 ∥wT j A∥2 and s is the signal noise ratio. Based on Lemma 2 and Lemma 3, we obtain the following concentration results for the selected observations in the Algorithm 1. Lemma 4. If there exists ϵ such that sup w∈Sd 1 t t X i=1 |wT xi|2 −1 ≤ϵ, and the observations {z′ i}m i=1 are sampled from {zi}d i=1 as in Algorithm 1, then for any w1, . . . , wd ∈Sp, with large probability, the following holds: (1 −ϵ)H(w) −2 p (1 + ϵ)H(w)/s (1/s + 1)2b/m −δ ≤ 1 t t X i=1 d X j=1 (wT j z′ i)2 ≤(1 + ϵ)H(w) + 2 p (1 + ϵ)H(w)/s + 1/s2 (1/s −1)2b/m + δ, where H(w) ≜Pd j=1 ∥wT j A∥2, s is the signal noise ratio and m is the number of sampled observations in each batch and δ > 0 is a small constant. We denote the set of accepted authentic samples as Zt and the set of accepted outliers as Ot from the t-th small batch. In the following lemma, we provide the estimation of number of accepted authentic samples |Zt| and outliers |Ot|. Lemma 5. For the current obtained principal components {w(t−1) j }d j=1, the number of the accepted authentic samples |Zt| and outliers |Ot| satisfy |Zt| b −1 b (1−λ)b X i=1 d X j=1 (w(t−1) j T zi)2 ≤δ and |Ot| b −1 b λb X i=1 d X j=1 (w(t−1) j T oi)2 ≤δ with probability at least 1 −e−2δ2b. Here δ > 0 is a small constant, λ is the outlier fraction and b is the size of the small batch. From the above lemma, we can see that when the batch size b is sufficiently large, the above estimation for |Zt| and |Ot| holds with large probability. In the following lemma, we show that when the algorithm improves the PCs estimation, the impact of outliers will be decreased accordingly. Lemma 6. For an outlier oi, an arbitrary orthogonal basis {wj}d j=1 and the groundtruth basis {wj}d j=1 which satisfy that Pd j=1 wT j oi ≥Pd j=1 wT j oi and Pd j=1 wT j wj ≥Pd j=1 wT j oi, the value of Pd j=1 wT j oi is a monotonically decreasing function of Pd j=1 wT j wj. Being equipped by the above lemmas, we can proceed to prove Theorem 1. The details of the proof is deferred to the supplementary material due to the space limit. 6 Simulations The numerical study is aimed to illustrate the performance of online robust PCA algorithm. We follow the data generation method in [24] to randomly generate a p × d matrix A and then scale its 7 leading singular value to s, which is the signal noise ratio. A λ fraction of outliers are generated. Since it is hard to determine the most adversarial outlier distribution, in simulations, we generate the outliers concentrate on several directions deviating from the groundtruth subspace. This makes a rather adversarial case and is suitable for investigating the robustness of the proposed online RPCA algorithm. In the simulations, in total T = 10, 000 samples are generated to form the sample sequence. For each parameter setting, we report the average result of 20 tests and standard deviation. The initial solution is obtained by performing batch HRPCA [24] on the first batch. Simulation results for p = 100, d = 1, s = 2 and outliers distributed on one direction are shown in Figure 1. It takes around 0.5 seconds for the proposed online RPCA to process 10, 000 samples of 100 dimensional, on a PC with Quad CPU with 2.83GHz and RAM of 8GB. In contrast, HRPCA costs 237 seconds to achieve E.V. = 0.99. More simulation results for the d > 1 case are provided in the supplementary material due to the space limit. From the results, we can make the following observations. Firstly, online RPCA can improve the PC estimation steadily. With more samples being revealed, the E.V. of the online RPCA outputs keep increasing. Secondly, the performance of online RPCA is rather robust to outliers. For example, the final result converges to E.V. ≈0.95 (HRPCA achieves 0.99) even with λ = 0.3 for relatively low signal noise ratio s = 2 as shown in Figure 1. To more clearly demonstrate the robustness of online RPCA to outliers, we implement the online PCA proposed in [23] as baseline for the σ = 2 case. The results are presented in Figure 1, from which we can observe that the performance of online PCA drops due to the sensitiveness to newly coming outliers. When the outlier fraction λ ≥0.1, the online PCA cannot recover the true PC directions and the performance is as low as 0. 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.01 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.03 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.05 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.08 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.10 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.15 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.20 # batches E.V. Online RPCA Online PCA 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 λ= 0.30 # batches E.V. Online RPCA Online PCA Figure 1: Performance comparison of online RPCA (blue line) with online PCA (red line). Here s = 2, p = 100, T = 10, 000, d = 1. The outliers are distributed on a single direction. 7 Conclusions In this work, we proposed an online robust PCA (online RPCA) algorithm for samples corrupted by outliers. The online RPCA alternates between standard PCA for updating PCs and probabilistic selection of the new samples which alleviates the impact of outliers. Theoretical analysis showed that the online RPCA could improve the PC estimation steadily and provided results with bounded deviation from the optimum. To the best of our knowledge, this is the first work to investigate such online robust PCA problem with theoretical performance guarantee. The proposed online robust PCA algorithm can be applied to handle challenges imposed by the modern big data analysis. Acknowledgement J. Feng and S. Yan are supported by the Singapore National Research Foundation under its International Research Centre @Singapore Funding Initiative and administered by the IDM Programme Office. H. Xu is partially supported by the Ministry of Education of Singapore through AcRF Tier Two grant R-265-000-443-112 and NUS startup grant R-265-000-384-133. S. Mannor is partially supported by the Israel Science Foundation (under grant 920/12) and by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). 8 References [1] J.R. Bunch and C.P. Nielsen. Updating the singular value decomposition. Numerische Mathematik, 1978. [2] E.J. Candes, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? ArXiv:0912.3599, 2009. [3] C. Croux and A. Ruiz-Gazen. A fast algorithm for robust principal components based on projection pursuit. In COMPSTAT, 1996. [4] C. Croux and A. Ruiz-Gazen. High breakdown estimators for principal components: the projection-pursuit approach revisited. Journal of Multivariate Analysis, 2005. [5] A. d’Aspremont, F. Bach, and L. Ghaoui. Optimal solutions for sparse principal component analysis. JMLR, 2008. [6] J. Feng, H. Xu, and S. Yan. Robust PCA in high-dimension: A deterministic approach. In ICML, 2012. [7] David Gross and Vincent Nesme. Note on sampling without replacing from a finite collection of matrices. arXiv preprint arXiv:1001.2738, 2010. [8] P. Hall, D. Marshall, and R. Martin. Merging and splitting eigenspace models. TPAMI, 2000. [9] Jun He, Laura Balzano, and John Lui. Online robust subspace tracking from partial information. arXiv preprint arXiv:1109.3827, 2011. [10] P. Honeine. Online kernel principal component analysis: a reduced-order model. TPAMI, 2012. [11] P.J. Huber, E. Ronchetti, and MyiLibrary. Robust statistics. John Wiley & Sons, New York, 1981. [12] M. Hubert, P.J. Rousseeuw, and K.V. Branden. Robpca: a new approach to robust principal component analysis. Technometrics, 2005. [13] M. Hubert, P.J. Rousseeuw, and S. Verboven. A fast method for robust principal components with applications to chemometrics. Chemometrics and Intelligent Laboratory Systems, 2002. [14] G. Li and Z. Chen. Projection-pursuit approach to robust dispersion matrices and principal components: primary theory and monte carlo. Journal of the American Statistical Association, 1985. [15] Y. Li. On incremental and robust subspace learning. Pattern recognition, 2004. [16] Michael W Mahoney. Randomized algorithms for matrices and data. arXiv preprint arXiv:1104.5557, 2011. [17] R.A. Maronna. Robust m-estimators of multivariate location and scatter. The annals of statistics, 1976. [18] S. Ozawa, S. Pang, and N. Kasabov. A modified incremental principal component analysis for on-line learning of feature space and classifier. PRICAI, 2004. [19] K. Pearson. On lines and planes of closest fit to systems of points in space. Philosophical Magazine, 1901. [20] C. Qiu, N. Vaswani, and L. Hogben. Recursive robust pca or recursive sparse recovery in large but structured noise. arXiv preprint arXiv:1211.3754, 2012. [21] P.J. Rousseeuw. Least median of squares regression. Journal of the American statistical association, 1984. [22] P.J. Rousseeuw and A.M. Leroy. Robust regression and outlier detection. John Wiley & Sons Inc, 1987. [23] M.K. Warmuth and D. Kuzmin. Randomized online pca algorithms with regret bounds that are logarithmic in the dimension. JMLR, 2008. [24] H. Xu, C. Caramanis, and S. Mannor. Principal component analysis with contaminated data: The high dimensional case. In COLT, 2010. [25] H. Zhao, P.C. Yuen, and J.T. Kwok. A novel incremental principal component analysis and its application for face recognition. TSMC-B, 2006. 9
2013
225
4,960
Distributed Representations of Words and Phrases and their Compositionality Tomas Mikolov Google Inc. Mountain View mikolov@google.com Ilya Sutskever Google Inc. Mountain View ilyasu@google.com Kai Chen Google Inc. Mountain View kai@google.com Greg Corrado Google Inc. Mountain View gcorrado@google.com Jeffrey Dean Google Inc. Mountain View jeff@google.com Abstract The recently introduced continuous Skip-gram model is an efficient method for learning high-quality distributed vector representations that capture a large number of precise syntactic and semantic word relationships. In this paper we present several extensions that improve both the quality of the vectors and the training speed. By subsampling of the frequent words we obtain significant speedup and also learn more regular word representations. We also describe a simple alternative to the hierarchical softmax called negative sampling. An inherent limitation of word representations is their indifference to word order and their inability to represent idiomatic phrases. For example, the meanings of “Canada” and “Air” cannot be easily combined to obtain “Air Canada”. Motivated by this example, we present a simple method for finding phrases in text, and show that learning good vector representations for millions of phrases is possible. 1 Introduction Distributed representations of words in a vector space help learning algorithms to achieve better performance in natural language processing tasks by grouping similar words. One of the earliest use of word representations dates back to 1986 due to Rumelhart, Hinton, and Williams [13]. This idea has since been applied to statistical language modeling with considerable success [1]. The follow up work includes applications to automatic speech recognition and machine translation [14, 7], and a wide range of NLP tasks [2, 20, 15, 3, 18, 19, 9]. Recently, Mikolov et al. [8] introduced the Skip-gram model, an efficient method for learning highquality vector representations of words from large amounts of unstructured text data. Unlike most of the previously used neural network architectures for learning word vectors, training of the Skipgram model (see Figure 1) does not involve dense matrix multiplications. This makes the training extremely efficient: an optimized single-machine implementation can train on more than 100 billion words in one day. The word representations computed using neural networks are very interesting because the learned vectors explicitly encode many linguistic regularities and patterns. Somewhat surprisingly, many of these patterns can be represented as linear translations. For example, the result of a vector calculation vec(“Madrid”) - vec(“Spain”) + vec(“France”) is closer to vec(“Paris”) than to any other word vector [9, 8]. 1           Figure 1: The Skip-gram model architecture. The training objective is to learn word vector representations that are good at predicting the nearby words. In this paper we present several extensions of the original Skip-gram model. We show that subsampling of frequent words during training results in a significant speedup (around 2x - 10x), and improves accuracy of the representations of less frequent words. In addition, we present a simplified variant of Noise Contrastive Estimation (NCE) [4] for training the Skip-gram model that results in faster training and better vector representations for frequent words, compared to more complex hierarchical softmax that was used in the prior work [8]. Word representations are limited by their inability to represent idiomatic phrases that are not compositions of the individual words. For example, “Boston Globe” is a newspaper, and so it is not a natural combination of the meanings of “Boston” and “Globe”. Therefore, using vectors to represent the whole phrases makes the Skip-gram model considerably more expressive. Other techniques that aim to represent meaning of sentences by composing the word vectors, such as the recursive autoencoders [15], would also benefit from using phrase vectors instead of the word vectors. The extension from word based to phrase based models is relatively simple. First we identify a large number of phrases using a data-driven approach, and then we treat the phrases as individual tokens during the training. To evaluate the quality of the phrase vectors, we developed a test set of analogical reasoning tasks that contains both words and phrases. A typical analogy pair from our test set is “Montreal”:“Montreal Canadiens”::“Toronto”:“Toronto Maple Leafs”. It is considered to have been answered correctly if the nearest representation to vec(“Montreal Canadiens”) - vec(“Montreal”) + vec(“Toronto”) is vec(“Toronto Maple Leafs”). Finally, we describe another interesting property of the Skip-gram model. We found that simple vector addition can often produce meaningful results. For example, vec(“Russia”) + vec(“river”) is close to vec(“Volga River”), and vec(“Germany”) + vec(“capital”) is close to vec(“Berlin”). This compositionality suggests that a non-obvious degree of language understanding can be obtained by using basic mathematical operations on the word vector representations. 2 The Skip-gram Model The training objective of the Skip-gram model is to find word representations that are useful for predicting the surrounding words in a sentence or a document. More formally, given a sequence of training words w1, w2, w3, . . . , wT , the objective of the Skip-gram model is to maximize the average log probability 1 T T X t=1 X −c≤j≤c,j̸=0 log p(wt+j|wt) (1) where c is the size of the training context (which can be a function of the center word wt). Larger c results in more training examples and thus can lead to a higher accuracy, at the expense of the 2 training time. The basic Skip-gram formulation defines p(wt+j|wt) using the softmax function: p(wO|wI) = exp  v′ wO ⊤vwI  PW w=1 exp  v′w ⊤vwI  (2) where vw and v′ w are the “input” and “output” vector representations of w, and W is the number of words in the vocabulary. This formulation is impractical because the cost of computing ∇log p(wO|wI) is proportional to W, which is often large (105–107 terms). 2.1 Hierarchical Softmax A computationally efficient approximation of the full softmax is the hierarchical softmax. In the context of neural network language models, it was first introduced by Morin and Bengio [12]. The main advantage is that instead of evaluating W output nodes in the neural network to obtain the probability distribution, it is needed to evaluate only about log2(W) nodes. The hierarchical softmax uses a binary tree representation of the output layer with the W words as its leaves and, for each node, explicitly represents the relative probabilities of its child nodes. These define a random walk that assigns probabilities to words. More precisely, each word w can be reached by an appropriate path from the root of the tree. Let n(w, j) be the j-th node on the path from the root to w, and let L(w) be the length of this path, so n(w, 1) = root and n(w, L(w)) = w. In addition, for any inner node n, let ch(n) be an arbitrary fixed child of n and let [[x]] be 1 if x is true and -1 otherwise. Then the hierarchical softmax defines p(wO|wI) as follows: p(w|wI) = L(w)−1 Y j=1 σ  [[n(w, j + 1) = ch(n(w, j))]] · v′ n(w,j) ⊤vwI  (3) where σ(x) = 1/(1 + exp(−x)). It can be verified that PW w=1 p(w|wI) = 1. This implies that the cost of computing log p(wO|wI) and ∇log p(wO|wI) is proportional to L(wO), which on average is no greater than log W. Also, unlike the standard softmax formulation of the Skip-gram which assigns two representations vw and v′ w to each word w, the hierarchical softmax formulation has one representation vw for each word w and one representation v′ n for every inner node n of the binary tree. The structure of the tree used by the hierarchical softmax has a considerable effect on the performance. Mnih and Hinton explored a number of methods for constructing the tree structure and the effect on both the training time and the resulting model accuracy [10]. In our work we use a binary Huffman tree, as it assigns short codes to the frequent words which results in fast training. It has been observed before that grouping words together by their frequency works well as a very simple speedup technique for the neural network based language models [5, 8]. 2.2 Negative Sampling An alternative to the hierarchical softmax is Noise Contrastive Estimation (NCE), which was introduced by Gutmann and Hyvarinen [4] and applied to language modeling by Mnih and Teh [11]. NCE posits that a good model should be able to differentiate data from noise by means of logistic regression. This is similar to hinge loss used by Collobert and Weston [2] who trained the models by ranking the data above noise. While NCE can be shown to approximately maximize the log probability of the softmax, the Skipgram model is only concerned with learning high-quality vector representations, so we are free to simplify NCE as long as the vector representations retain their quality. We define Negative sampling (NEG) by the objective log σ(v′ wO ⊤vwI) + k X i=1 Ewi∼Pn(w) h log σ(−v′ wi ⊤vwI) i (4) 3 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Country and Capital Vectors Projected by PCA China Japan France Russia Germany Italy Spain Greece Turkey Beijing Paris Tokyo Poland Moscow Portugal Berlin Rome Athens Madrid Ankara Warsaw Lisbon Figure 2: Two-dimensional PCA projection of the 1000-dimensional Skip-gram vectors of countries and their capital cities. The figure illustrates ability of the model to automatically organize concepts and learn implicitly the relationships between them, as during the training we did not provide any supervised information about what a capital city means. which is used to replace every log P(wO|wI) term in the Skip-gram objective. Thus the task is to distinguish the target word wO from draws from the noise distribution Pn(w) using logistic regression, where there are k negative samples for each data sample. Our experiments indicate that values of k in the range 5–20 are useful for small training datasets, while for large datasets the k can be as small as 2–5. The main difference between the Negative sampling and NCE is that NCE needs both samples and the numerical probabilities of the noise distribution, while Negative sampling uses only samples. And while NCE approximately maximizes the log probability of the softmax, this property is not important for our application. Both NCE and NEG have the noise distribution Pn(w) as a free parameter. We investigated a number of choices for Pn(w) and found that the unigram distribution U(w) raised to the 3/4rd power (i.e., U(w)3/4/Z) outperformed significantly the unigram and the uniform distributions, for both NCE and NEG on every task we tried including language modeling (not reported here). 2.3 Subsampling of Frequent Words In very large corpora, the most frequent words can easily occur hundreds of millions of times (e.g., “in”, “the”, and “a”). Such words usually provide less information value than the rare words. For example, while the Skip-gram model benefits from observing the co-occurrences of “France” and “Paris”, it benefits much less from observing the frequent co-occurrences of “France” and “the”, as nearly every word co-occurs frequently within a sentence with “the”. This idea can also be applied in the opposite direction; the vector representations of frequent words do not change significantly after training on several million examples. To counter the imbalance between the rare and frequent words, we used a simple subsampling approach: each word wi in the training set is discarded with probability computed by the formula P(wi) = 1 − s t f(wi) (5) 4 Method Time [min] Syntactic [%] Semantic [%] Total accuracy [%] NEG-5 38 63 54 59 NEG-15 97 63 58 61 HS-Huffman 41 53 40 47 NCE-5 38 60 45 53 The following results use 10−5 subsampling NEG-5 14 61 58 60 NEG-15 36 61 61 61 HS-Huffman 21 52 59 55 Table 1: Accuracy of various Skip-gram 300-dimensional models on the analogical reasoning task as defined in [8]. NEG-k stands for Negative Sampling with k negative samples for each positive sample; NCE stands for Noise Contrastive Estimation and HS-Huffman stands for the Hierarchical Softmax with the frequency-based Huffman codes. where f(wi) is the frequency of word wi and t is a chosen threshold, typically around 10−5. We chose this subsampling formula because it aggressively subsamples words whose frequency is greater than t while preserving the ranking of the frequencies. Although this subsampling formula was chosen heuristically, we found it to work well in practice. It accelerates learning and even significantly improves the accuracy of the learned vectors of the rare words, as will be shown in the following sections. 3 Empirical Results In this section we evaluate the Hierarchical Softmax (HS), Noise Contrastive Estimation, Negative Sampling, and subsampling of the training words. We used the analogical reasoning task1 introduced by Mikolov et al. [8]. The task consists of analogies such as “Germany” : “Berlin” :: “France” : ?, which are solved by finding a vector x such that vec(x) is closest to vec(“Berlin”) - vec(“Germany”) + vec(“France”) according to the cosine distance (we discard the input words from the search). This specific example is considered to have been answered correctly if x is “Paris”. The task has two broad categories: the syntactic analogies (such as “quick” : “quickly” :: “slow” : “slowly”) and the semantic analogies, such as the country to capital city relationship. For training the Skip-gram models, we have used a large dataset consisting of various news articles (an internal Google dataset with one billion words). We discarded from the vocabulary all words that occurred less than 5 times in the training data, which resulted in a vocabulary of size 692K. The performance of various Skip-gram models on the word analogy test set is reported in Table 1. The table shows that Negative Sampling outperforms the Hierarchical Softmax on the analogical reasoning task, and has even slightly better performance than the Noise Contrastive Estimation. The subsampling of the frequent words improves the training speed several times and makes the word representations significantly more accurate. It can be argued that the linearity of the skip-gram model makes its vectors more suitable for such linear analogical reasoning, but the results of Mikolov et al. [8] also show that the vectors learned by the standard sigmoidal recurrent neural networks (which are highly non-linear) improve on this task significantly as the amount of the training data increases, suggesting that non-linear models also have a preference for a linear structure of the word representations. 4 Learning Phrases As discussed earlier, many phrases have a meaning that is not a simple composition of the meanings of its individual words. To learn vector representation for phrases, we first find words that appear frequently together, and infrequently in other contexts. For example, “New York Times” and “Toronto Maple Leafs” are replaced by unique tokens in the training data, while a bigram “this is” will remain unchanged. 1code.google.com/p/word2vec/source/browse/trunk/questions-words.txt 5 Newspapers New York New York Times Baltimore Baltimore Sun San Jose San Jose Mercury News Cincinnati Cincinnati Enquirer NHL Teams Boston Boston Bruins Montreal Montreal Canadiens Phoenix Phoenix Coyotes Nashville Nashville Predators NBA Teams Detroit Detroit Pistons Toronto Toronto Raptors Oakland Golden State Warriors Memphis Memphis Grizzlies Airlines Austria Austrian Airlines Spain Spainair Belgium Brussels Airlines Greece Aegean Airlines Company executives Steve Ballmer Microsoft Larry Page Google Samuel J. Palmisano IBM Werner Vogels Amazon Table 2: Examples of the analogical reasoning task for phrases (the full test set has 3218 examples). The goal is to compute the fourth phrase using the first three. Our best model achieved an accuracy of 72% on this dataset. This way, we can form many reasonable phrases without greatly increasing the size of the vocabulary; in theory, we can train the Skip-gram model using all n-grams, but that would be too memory intensive. Many techniques have been previously developed to identify phrases in the text; however, it is out of scope of our work to compare them. We decided to use a simple data-driven approach, where phrases are formed based on the unigram and bigram counts, using score(wi, wj) = count(wiwj) −δ count(wi) × count(wj). (6) The δ is used as a discounting coefficient and prevents too many phrases consisting of very infrequent words to be formed. The bigrams with score above the chosen threshold are then used as phrases. Typically, we run 2-4 passes over the training data with decreasing threshold value, allowing longer phrases that consists of several words to be formed. We evaluate the quality of the phrase representations using a new analogical reasoning task that involves phrases. Table 2 shows examples of the five categories of analogies used in this task. This dataset is publicly available on the web2. 4.1 Phrase Skip-Gram Results Starting with the same news data as in the previous experiments, we first constructed the phrase based training corpus and then we trained several Skip-gram models using different hyperparameters. As before, we used vector dimensionality 300 and context size 5. This setting already achieves good performance on the phrase dataset, and allowed us to quickly compare the Negative Sampling and the Hierarchical Softmax, both with and without subsampling of the frequent tokens. The results are summarized in Table 3. The results show that while Negative Sampling achieves a respectable accuracy even with k = 5, using k = 15 achieves considerably better performance. Surprisingly, while we found the Hierarchical Softmax to achieve lower performance when trained without subsampling, it became the best performing method when we downsampled the frequent words. This shows that the subsampling can result in faster training and can also improve accuracy, at least in some cases. 2code.google.com/p/word2vec/source/browse/trunk/questions-phrases.txt Method Dimensionality No subsampling [%] 10−5 subsampling [%] NEG-5 300 24 27 NEG-15 300 27 42 HS-Huffman 300 19 47 Table 3: Accuracies of the Skip-gram models on the phrase analogy dataset. The models were trained on approximately one billion words from the news dataset. 6 NEG-15 with 10−5 subsampling HS with 10−5 subsampling Vasco de Gama Lingsugur Italian explorer Lake Baikal Great Rift Valley Aral Sea Alan Bean Rebbeca Naomi moonwalker Ionian Sea Ruegen Ionian Islands chess master chess grandmaster Garry Kasparov Table 4: Examples of the closest entities to the given short phrases, using two different models. Czech + currency Vietnam + capital German + airlines Russian + river French + actress koruna Hanoi airline Lufthansa Moscow Juliette Binoche Check crown Ho Chi Minh City carrier Lufthansa Volga River Vanessa Paradis Polish zolty Viet Nam flag carrier Lufthansa upriver Charlotte Gainsbourg CTK Vietnamese Lufthansa Russia Cecile De Table 5: Vector compositionality using element-wise addition. Four closest tokens to the sum of two vectors are shown, using the best Skip-gram model. To maximize the accuracy on the phrase analogy task, we increased the amount of the training data by using a dataset with about 33 billion words. We used the hierarchical softmax, dimensionality of 1000, and the entire sentence for the context. This resulted in a model that reached an accuracy of 72%. We achieved lower accuracy 66% when we reduced the size of the training dataset to 6B words, which suggests that the large amount of the training data is crucial. To gain further insight into how different the representations learned by different models are, we did inspect manually the nearest neighbours of infrequent phrases using various models. In Table 4, we show a sample of such comparison. Consistently with the previous results, it seems that the best representations of phrases are learned by a model with the hierarchical softmax and subsampling. 5 Additive Compositionality We demonstrated that the word and phrase representations learned by the Skip-gram model exhibit a linear structure that makes it possible to perform precise analogical reasoning using simple vector arithmetics. Interestingly, we found that the Skip-gram representations exhibit another kind of linear structure that makes it possible to meaningfully combine words by an element-wise addition of their vector representations. This phenomenon is illustrated in Table 5. The additive property of the vectors can be explained by inspecting the training objective. The word vectors are in a linear relationship with the inputs to the softmax nonlinearity. As the word vectors are trained to predict the surrounding words in the sentence, the vectors can be seen as representing the distribution of the context in which a word appears. These values are related logarithmically to the probabilities computed by the output layer, so the sum of two word vectors is related to the product of the two context distributions. The product works here as the AND function: words that are assigned high probabilities by both word vectors will have high probability, and the other words will have low probability. Thus, if “Volga River” appears frequently in the same sentence together with the words “Russian” and “river”, the sum of these two word vectors will result in such a feature vector that is close to the vector of “Volga River”. 6 Comparison to Published Word Representations Many authors who previously worked on the neural network based representations of words have published their resulting models for further use and comparison: amongst the most well known authors are Collobert and Weston [2], Turian et al. [17], and Mnih and Hinton [10]. We downloaded their word vectors from the web3. Mikolov et al. [8] have already evaluated these word representations on the word analogy task, where the Skip-gram models achieved the best performance with a huge margin. 3http://metaoptimize.com/projects/wordreprs/ 7 Model Redmond Havel ninjutsu graffiti capitulate (training time) Collobert (50d) conyers plauen reiki cheesecake abdicate (2 months) lubbock dzerzhinsky kohona gossip accede keene osterreich karate dioramas rearm Turian (200d) McCarthy Jewell gunfire (few weeks) Alston Arzu emotion Cousins Ovitz impunity Mnih (100d) Podhurst Pontiff anaesthetics Mavericks (7 days) Harlang Pinochet monkeys planning Agarwal Rodionov Jews hesitated Skip-Phrase Redmond Wash. Vaclav Havel ninja spray paint capitulation (1000d, 1 day) Redmond Washington president Vaclav Havel martial arts grafitti capitulated Microsoft Velvet Revolution swordsmanship taggers capitulating Table 6: Examples of the closest tokens given various well known models and the Skip-gram model trained on phrases using over 30 billion training words. An empty cell means that the word was not in the vocabulary. To give more insight into the difference of the quality of the learned vectors, we provide empirical comparison by showing the nearest neighbours of infrequent words in Table 6. These examples show that the big Skip-gram model trained on a large corpus visibly outperforms all the other models in the quality of the learned representations. This can be attributed in part to the fact that this model has been trained on about 30 billion words, which is about two to three orders of magnitude more data than the typical size used in the prior work. Interestingly, although the training set is much larger, the training time of the Skip-gram model is just a fraction of the time complexity required by the previous model architectures. 7 Conclusion This work has several key contributions. We show how to train distributed representations of words and phrases with the Skip-gram model and demonstrate that these representations exhibit linear structure that makes precise analogical reasoning possible. The techniques introduced in this paper can be used also for training the continuous bag-of-words model introduced in [8]. We successfully trained models on several orders of magnitude more data than the previously published models, thanks to the computationally efficient model architecture. This results in a great improvement in the quality of the learned word and phrase representations, especially for the rare entities. We also found that the subsampling of the frequent words results in both faster training and significantly better representations of uncommon words. Another contribution of our paper is the Negative sampling algorithm, which is an extremely simple training method that learns accurate representations especially for frequent words. The choice of the training algorithm and the hyper-parameter selection is a task specific decision, as we found that different problems have different optimal hyperparameter configurations. In our experiments, the most crucial decisions that affect the performance are the choice of the model architecture, the size of the vectors, the subsampling rate, and the size of the training window. A very interesting result of this work is that the word vectors can be somewhat meaningfully combined using just simple vector addition. Another approach for learning representations of phrases presented in this paper is to simply represent the phrases with a single token. Combination of these two approaches gives a powerful yet simple way how to represent longer pieces of text, while having minimal computational complexity. Our work can thus be seen as complementary to the existing approach that attempts to represent phrases using recursive matrix-vector operations [16]. We made the code for training the word and phrase vectors based on the techniques described in this paper available as an open-source project4. 4code.google.com/p/word2vec 8 References [1] Yoshua Bengio, R´ejean Ducharme, Pascal Vincent, and Christian Janvin. A neural probabilistic language model. The Journal of Machine Learning Research, 3:1137–1155, 2003. [2] Ronan Collobert and Jason Weston. A unified architecture for natural language processing: deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pages 160–167. ACM, 2008. [3] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In ICML, 513–520, 2011. [4] Michael U Gutmann and Aapo Hyv¨arinen. Noise-contrastive estimation of unnormalized statistical models, with applications to natural image statistics. The Journal of Machine Learning Research, 13:307–361, 2012. [5] Tomas Mikolov, Stefan Kombrink, Lukas Burget, Jan Cernocky, and Sanjeev Khudanpur. Extensions of recurrent neural network language model. In Acoustics, Speech and Signal Processing (ICASSP), 2011 IEEE International Conference on, pages 5528–5531. IEEE, 2011. [6] Tomas Mikolov, Anoop Deoras, Daniel Povey, Lukas Burget and Jan Cernocky. Strategies for Training Large Scale Neural Network Language Models. In Proc. Automatic Speech Recognition and Understanding, 2011. [7] Tomas Mikolov. Statistical Language Models Based on Neural Networks. PhD thesis, PhD Thesis, Brno University of Technology, 2012. [8] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. ICLR Workshop, 2013. [9] Tomas Mikolov, Wen-tau Yih and Geoffrey Zweig. Linguistic Regularities in Continuous Space Word Representations. In Proceedings of NAACL HLT, 2013. [10] Andriy Mnih and Geoffrey E Hinton. A scalable hierarchical distributed language model. Advances in neural information processing systems, 21:1081–1088, 2009. [11] Andriy Mnih and Yee Whye Teh. A fast and simple algorithm for training neural probabilistic language models. arXiv preprint arXiv:1206.6426, 2012. [12] Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Proceedings of the international workshop on artificial intelligence and statistics, pages 246–252, 2005. [13] David E Rumelhart, Geoffrey E Hintont, and Ronald J Williams. Learning representations by backpropagating errors. Nature, 323(6088):533–536, 1986. [14] Holger Schwenk. Continuous space language models. Computer Speech and Language, vol. 21, 2007. [15] Richard Socher, Cliff C. Lin, Andrew Y. Ng, and Christopher D. Manning. Parsing natural scenes and natural language with recursive neural networks. In Proceedings of the 26th International Conference on Machine Learning (ICML), volume 2, 2011. [16] Richard Socher, Brody Huval, Christopher D. Manning, and Andrew Y. Ng. Semantic Compositionality Through Recursive Matrix-Vector Spaces. In Proceedings of the 2012 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2012. [17] Joseph Turian, Lev Ratinov, and Yoshua Bengio. Word representations: a simple and general method for semi-supervised learning. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, pages 384–394. Association for Computational Linguistics, 2010. [18] Peter D. Turney and Patrick Pantel. From frequency to meaning: Vector space models of semantics. In Journal of Artificial Intelligence Research, 37:141-188, 2010. [19] Peter D. Turney. Distributional semantics beyond words: Supervised learning of analogy and paraphrase. In Transactions of the Association for Computational Linguistics (TACL), 353–366, 2013. [20] Jason Weston, Samy Bengio, and Nicolas Usunier. Wsabie: Scaling up to large vocabulary image annotation. In Proceedings of the Twenty-Second international joint conference on Artificial Intelligence-Volume Volume Three, pages 2764–2770. AAAI Press, 2011. 9
2013
226
4,961
Learning Multiple Models via Regularized Weighting Daniel Vainsencher Department of Electrical Engineering Technion, Haifa, Israel danielv@tx.technion.ac.il Shie Mannor Department of Electrical Engineering Technion, Haifa, Israel shie@ee.technion.ac.il Huan Xu Mechanical Engineering Department National University of Singapore, Singapore mpexuh@nus.edu.sg Abstract We consider the general problem of Multiple Model Learning (MML) from data, from the statistical and algorithmic perspectives; this problem includes clustering, multiple regression and subspace clustering as special cases. A common approach to solving new MML problems is to generalize Lloyd’s algorithm for clustering (or Expectation-Maximization for soft clustering). However this approach is unfortunately sensitive to outliers and large noise: a single exceptional point may take over one of the models. We propose a different general formulation that seeks for each model a distribution over data points; the weights are regularized to be sufficiently spread out. This enhances robustness by making assumptions on class balance. We further provide generalization bounds and explain how the new iterations may be computed efficiently. We demonstrate the robustness benefits of our approach with some experimental results and prove for the important case of clustering that our approach has a non-trivial breakdown point, i.e., is guaranteed to be robust to a fixed percentage of adversarial unbounded outliers. 1 Introduction The standard approach to learning models from data assumes that the data were generated by a certain model, and the goal of learning is to recover this generative model. For example, in linear regression, an unknown linear functional, which we want to recover, is believed to have generated covariate-response pairs. Similarly, in principal component analysis, a random variable in some unknown low-dimensional subspace generated the observed data, and the goal is to recover this low-dimensional subspace. Yet, in practice, it is common to encounter data that were generated by a mixture of several models rather than a single one, and the goal is to learn a number of models such that any given data can be explained by at least one of the learned models. It is also common for the data to contain outliers: data-points that are not well explained by any of the models to be learned, possibly inserted by external processes. We briefly explain our approach (presented in detail in the next section). At its center is the problem of assigning data points to models, with the main consideration that every model be consistent with many of the data points. Thus we seek for each model a distribution of weights over the data points, and encourage even weights by regularizing these distributions (hence our approach is called Regularized Weighting; abbreviated as RW). A data point that is inconsistent with all available models will receive lower weight and even sometimes be ignored. The value of ignoring difficult points is illustrated by contrast with the common approach, which we consider next. 1 The arguably most widely applied approach for multiple model learning is the minimum loss approach, also known as Lloyd’s algorithm [1] in clustering, where the goal is to find a set of models, associate each data point to one model (in so called “soft” variations, one or more models), such that the sum of losses over data points is minimal. Notice that in this approach, every data point must be explained by some model. This leaves the minimum loss approach vulnerable to outliers and corruptions: If one data point goes to infinity, so must at least one model. Our remedy to this is relaxing the requirement that each data point must be explained. Indeed, as we show later, the RW formulation is provably robust in the case of clustering, in the sense of having non-zero breakdown point [2]. Moreover, we also establish other desirable properties, both computational and statistical, of the proposed method. Our main contributions are: 1. A new formulation of the sub-task of associating data points to models as a convex optimization problem for setting weights. This problem favors broadly based models, and may ignore difficult data points entirely. We formalize such properties of optimal solutions through analysis of a strongly dual problem. The remaining results are characteristics of this approach. 2. Outlier robustness. We show that the breakdown point of the proposed method is bounded away from zero for the clustering case. The breakdown point is a concept from robust statistics: it is the fraction of adversarial outliers that an algorithm can sustain without having its output arbitrarily changed. 3. Robustness to fat tailed noise. We show, empirically on a synthetic and real world datasets, that our formulation is more resistant to fat tailed additive noise. 4. Generalization. Ignoring some of the data, in general, may lead to overfitting. We show that when the parameter α (defined in Section 2) is appropriately set, this essentially does not occur. We prove this through uniform convergence bounds resilient to the lack of efficient algorithms to find near-optimal solutions in multiple model learning. 5. Computational complexity. As almost every method to tackle the multiple model learning problem, we use alternating optimization of the models and the association (weights), i.e., we iteratively optimize one of them while fixing the other. Our formulation for optimizing the association requires solving a quadratic problem in kn variables, where k is the number of models and n is the number of points. Compared to O(kn) steps for some formulations, this seems expensive. We show how to take advantage of the special problem structure and repetition in the alternating optimization subproblems to reduce this cost. 1.1 Relation to previous work Learning multiple models is by no means a new problem. Indeed, special examples of multi-model learning have been studied, including k-means clustering [3, 4, 5] (and many other variants thereof), Gaussian mixture models (and extensions) [6, 7] and subspace segmentation problem [8, 9, 10]; see Section 2 for details. Fewer studies attempt to cross problem type boundaries. A general treatment of the sample complexity of problems that can be interpreted as learning a code book (which encompasses some types of multiple model learning) is [11]. Slightly closer to our approach is [12], whose formulation generalizes a common approach to different model types and permits for problem specific regularization, giving both generalization results and algorithmic iteration complexity results. A probabilistic and generic algorithmic approach to learning multiple models is Expectation Maximization [13]. Algorithms for dealing with outliers and multiple models together have been proposed in the context of clustering [14]. Reference [15] provides an example of an algorithm for outlier resistance in learning a single subspace, and partly inspires the current work. In contrast, we abstract almost completely over the class of models, allowing both algorithms and analysis to be easily reused to address new classes. 2 Formulation In this section we show how multi-model learning problems can be formed from simple estimation problem (where we seek to explain weighted data points by a single model), and imposing a par2 ticular joint loss. We contrast the joint loss proposed here to a common one through the weights assigned by each and their effects on robustness. We refer throughout to n data points from X by (xi)n i=1 = X ∈X n, which we seek to explain by k models from M denoted (mj)k j=1 = M ∈Mk. A data set may be weighted by a set of k distributions (wj)k j=1 = W ∈(△n)k where △n ⊂Rn is the simplex. Definition 1. A base weighted learning problem is a tuple (X, M, ℓ, A), where ℓ: X × M →R+ is a non-negative convex function, which we call a base loss function and A : △n × X n →M defines an efficient algorithm for choosing a model. Given the weight w and data X, A obtains low weighted empirical loss Pn i=1 wiℓ(xi, m) (the weighted empirical loss need not be minimal, allowing for regularization which we do not discuss further). We will often denote the losses of a model m over X as a vector l = (ℓ(xi, m))n i=1. In the context of a set of models M, we similarly associate the loss vector lj and the weight vector wj with the model mj; this allows us to use the terse notation w⊤ j lj for the weighted loss of model j. Given a base weighted learning problem, one may pose a multi-model learning problem Example 1. The multi-model learning problem covers many examples, here we list a few: • In k-means clustering, the goal is to partition the training samples into k subsets, where each subset of samples is “close” to their mean. In our terminology, a multi-model learning problem where the base learning problem is  Rd, Rd, (x, m) 7→∥x −m∥2 2 , A  where A finds the weighted mean of the data. The weights allow us to compute each cluster center according to the relevant subset of points. • In subspace clustering, also known as subspace segmentation, the objective is to group the training samples into subsets, such that each subset can be well approximated by a low-dimensional affine subspace. This is a multi-model learning problem where the corresponding single-model learning problem is PCA. • Regression clustering [16] extends the standard linear regression problem in that the training samples cannot be explained by one linear function. Instead, multiple linear function are sought, so that the training samples can be split into groups, and each group can be approximated by one linear function. • Gaussian Mixture Model considers the case where data points are generated by a mixture of a finite number of Gaussian distributions, and seeks to estimate the mean and variance of each of these distribution, and simultaneously to group the data points according to the distribution that generates it. This is a multi-model learning problem where the respective single model learning problem is estimating the mean and variance of a distribution. The most common way to tackle the multiple model learning problem is the minimum loss approach, i.e, to minimize the following joint loss L (X, M) = 1 n X x∈X min m∈M ℓ(x, m) . (2.1) In terms of weighted base learning problems, each model gives equal weight to all points for which it is the best (lowest loss) model. For example, when M = X = Rn with ℓ(x, m) = ∥x −m∥2 2 the squared Euclidean distance loss yields k means clustering. In this context, alternating between choosing for each x its loss minimizing model, and adjusting each model to minimized the squared Euclidean loss, yields Lloyd’s algorithm (and its generalizations for other problems). The minimum loss approach requires that every point is assigned to a model, this can potentially cause problems in the presence of outliers. For example, consider the clustering case where the data contain a single outlier point xi. Let xi tend to infinity; there will always be some mj that is closest to xi, and is therefore (at equilibrium) the average of xi and some other data points. Then mj will tend to infinity also. We call this phenomenon mode I of sensitivity to outliers; it is common also 3 to such simple estimators as the mean. Mode II of sensitivity is more particular: as mj follows xi to infinity, it stops being the closest to any other points, until the model is associated only to the outlier and thus matches it perfectly. Thus under Eq. (2.1) outliers tend to take over models. Mode II of sensitivity is not clustering specific, and Fig. 2.1 provides an example in multiple regression. Neither mode is avoided by spreading a point’s weight among models as in mixture models [6]. To overcome both modes of sensitivity, we propose a different joint loss, in which the hard constraint is only that for each model we produce a distribution over data points. A penalty term discourages the concentration of a model on few points and thus mode II sensitivity. Deweighting difficult points helps mitigate mode I. For clustering this robustness is formalized in Theorem 2. 0.0 0.2 0.4 0.6 0.8 −3.5 −3.0 −2.5 −2.0 −1.5 −1.0 −0.5 Robust and Lloyds association methods, quadratic regression. Data Minimum loss 0.20 correct on 34 points Minimum loss 0.20 correct on 4 points Robust joint loss 0.20 correct on 29 points Robust joint loss 0.20 correct on 37 points Figure 2.1: Data is a mixture of two quadratics, with positive fat tailed noise. Under a minimum loss approach an off-the-chart high-noise point suffices to prevent the top broken line from being close to many other data points. Our approach is free to better model the bulk of data. We used a robust (mean absolute deviation) criterion to choose among the results of multiple restarts for each model. Definition 2. Let u ∈△n be the uniform distribution. Given k weight vectors, we denote their average v (W) = k−1 Pk j=1 wj, and just v when W is clear from context. The Regularized Weighting multiple model learning loss is a function Lα : X n × Mk × (△n)k →R defined as Lα (X, M, W) = α ∥u −v (W)∥2 2 + k−1 k X j=1 l⊤ j wj (2.2) which in particular defines the weight setting subproblem: Lα (X, M) = min W ∈(△n)k Lα (X, M, W) . (2.3) As its name suggests, our formulation regularizes distributions of weight over data points; specifically, wj are controlled by forcing their average v to be close to the uniform distribution u. Our goal is for each model to represent many data points, so weights should not be concentrated. We avoid this by penalizing squared Euclidean distance from uniformity, which emphasizes points receiving weight much higher than the natural n−1, and essentially ignores small variations around n−1. The effect is later formalized in Lemma 1, but to illustrate we next calculate the penalties for two stylized cases. This will also produce the first of several hints about the appropriate range of values for α. In the following examples, we will consider a set of γnk−1 data points, recalling that nk−1 is the natural number of points per model. To avoid letting a few high loss outliers skew our models (mode I of sensitivity), we prefer instead to give them zero weight. Take γ ≪k/2, then the cost of ignoring some γnk−1 points in all models is at most αn−1 · 2γk−1 ≪αn−1. In contrast, basing a model 4 −0.6 −0.4 −0.2 0.0 0.2 0.4 0.6 Location −0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 Weight assigned by model, scaled: wj,i · n/k Clustering in 1D w. varied class size. α/n = 0.335 model 1 weighs 21 points model 2 weighs 39 points Figure 2.2: For each location (horizontal) of a data point, the vertical locations of corresponding markers gives the weights assigned by each model. The left cluster is half as populated as the right, thus must give weights about twice as large. Within each model, weights are affine in the loss (see Section 2.1), causing the concave parabolas. The gap allowed between the maximal weights of different models allows a point from the right cluster to be adopted by the left model, lowering overall penalty at a cost to weighted losses. on very few points (mode II of sensitivity) should be avoided. If the jth model is fit to only γnk−1 points for γ ≪1, the penalty from those points will be at least (approximately) αn−1 · γ−1k−1. We can make the first situation cheap and the second expensive (per model) in comparison to the empirical weighted loss term by choosing αn−1 ≈k−1 k X j=1 w⊤ j lj. (2.4) On the flip side, highly unbalanced classes in the data can be challenging to our approach. Consider the case where a model has low loss for fewer than n/(2k) points: spreading its weight only over them can incur very high costs due to the regularization term, which might be lowered by including some higher-loss points that are indeed better explained by another model (see Figure 2.2 on page 5 for an illustration). This challenge might be solved by explicitly and separately estimating the relative frequencies of the classes, and penalizing deviations from the estimates rather than from equal frequencies, as is done in mixture models [6]; this is left for future study. 2.1 Two properties of Regularized Weighting Two properties of our formulation result from an analysis (in Appendix A for lack of space) of a dual problem of the weight setting problem (2.3). These provide the basis for later theory by relating v, losses and α. The first illustrates the uniform control of v: Lemma 1. Let all losses be in [0, B], then in an optimal solution to (2.3), we have ∥v −u∥∞≤B/ (2α) . This strengthens the conclusion of (2.4): if outliers are present and αn−1 > 2B where B bounds losses on all points including outliers, weights will be almost uniform (enabling mode I of sensi5 tivity). On the positive side, this lemma plays an important role in the generalization and iteration complexity results presented in the sequel. A more detailed view of vi for individual points is provided by the second property. By PC we denote the orthogonal projection mapping into a convex set C. Lemma 2. For an optimal solution to (2.3), there exists t ∈Rk such that: v = P△n  u −min j (lj −tj) / (2α)  , where minj should be read as operating element-wise, and in particular wj,i > 0 implies that j minimizes the ith element. This establishes that average weight (when positive) is affine in the loss; the concave parabolas visible in Figure 2.2 on page 5 are an example. We also learn the role of α in solutions is determining the coefficient in the affine relation. Distinct t allow for different densities of points around different models. One observation from this lemma is that if a particular model j gives weight to some point i, then every point with lower loss ℓ(xi′, mj) under that model will receive at least that much weight. This property plays a key role in the proof of robustness to outliers in clustering. 2.2 An alternating optimization algorithm The RW multiple model learning loss, like other MML losses, is not convex. However the weight setting problem (2.3) is convex when we fix the models, and an efficient procedure A is assumed for solving a weighted base learning problem for a model, supporting an alternating optimization approach, as in Algorithm 1; see Section 5 for further discussion. Data: X Result: The model-set M M ←initialModels (X); repeat M ′ ←M; W ←arg minW ′ Lα (X, M, W ′); mj ←A (wj, X) (∀j ∈[k]) ; until L (X, M ′) −L (X, M) < ε; Algorithm 1: Alternating optimization for Regularized Weighting 3 Breakdown point in clustering Our formulation allows a few difficult outliers to be ignored if the right models are found; does this happen in practice? Figure 2.1 on page 4 provides a positive example in regression clustering, and a more substantial empirical evaluation on subspace clustering is in Appendix B. In the particular case of clustering with the squared Euclidean loss, robustness benefits can be proved. We use “breakdown point” – the standard robustness measure in the literature of robust statistics [2], see also [17, 18] and many others – to quantify the robustness property of the proposed formulation. The breakdown point of an estimator is the smallest fraction of bad observations that can cause the estimator to take arbitrarily aberrant values, i.e., the smallest fraction of outliers needed to completely break an estimator. For the case of clustering with the squared Euclidean distance base loss, the min-loss approach corresponds to k-means clustering which is not robust in this sense; its breakdown point is 0. The non robustness of k-means has led to the development of many formulations of robust clustering, see a review by [14]. In contrast, we show that our joint loss yields an estimator that has a non-zero breakdown point, and is hence robust. In general, a squared loss clustering formulation that assigns equal weight to different data points cannot be robust – as one data point tends to infinity so must at least one model. This applies to our model if α is allowed to tend to infinity. On the other hand if α is too low, it becomes possible 6 for each model to assign all of its weight to a single point, which may well be an outlier tending to infinity. Thus, it is well expected that the robustness result below requires α to belong to a data dependent range. Theorem 2. Let X = M be a Euclidean space in which we perform clustering with the loss ℓ(xi, mj) = ∥mj −xi∥2 and k centers. Denote by R the radius of any ball containing the inliers, and η < k−2/22 the proportion of outliers allowed to be outside the ball. Denote also by r a radius such that there exists M ′ = {m′ 1, · · · , m′ k} such that each inlier is within a distance r of some model m′ j and each mj approximates (i.e., within a distance r) at least n/(2k) inliers; this always holds for some r ≤R. For any α ∈ n  r2, 13R2 let (M, W) be minimizers of Lα (X, M, W). Then we have ∥mj −xi∥2 ≤6R for every model mj and inlier xi. Theorem 2 shows that when the number of outliers is not too high, then the learned model, regardless of the magnitude of the outliers, is close to the inliers and hence cannot be arbitrarily bad. In particular, the theorem implies a non-zero breakdown point for any α > nr2; taking too high an α merely forces a larger but still finite R. If the inliers are amenable to balanced clustering so that r ≪R, the regime of non-zero breakdown is extended to smaller α. The proof follows three steps. First, due to the regularization term, for any model, the total weight on the few outliers is at most 1/3. Second, an optimal model must thus be at least twice as close to the weighted average of its inlier as it is to the weighted average of its outliers. This step depends critically on squared Euclidean loss being used. Lastly, this gap in distances cannot be large in absolute terms, due to Lemma 2; an outlier that is much farther from the model than the inliers must receive weight zero. For the proof see Appendix C of the supplementary material. 4 Regularized Weighting formulation sample complexity An important consideration in learning algorithms is controlling overfitting, in which a model is found that is appropriate for some data, rather than for the source that generates the data. The current formulation seems to be particularly vulnerable since it allows data to be ignored, in contrast to most generalization bounds that assume equal weight is given to all data. Our loss Lα(X, M) differs from common losses in allowing data points to be differently weighted. Thus, to obtain the sample complexity of our formulation we need to bound the difference that a single sample can make to the loss. For a common empirical average loss this is bounded by Bn−1 where B is the maximal value of the non-negative loss on a single data point, and in our case by B ∥v∥∞, because if X, X′ differ only on the ith element, then: |Lα (X′, M, W) −Lα (X, M, W)| = k−1 k X j=1 wj,i lj,i −l′ j,i  ≤Bk−1 k X j=1 wj,i ≤Bvi. Whenever W is optimal with respect to either X or X′, Lemma 1 provides the necessary bound on ∥v∥∞. Along with covering numbers as defined next and standard arguments (found in the supplementary material), this bound on differences provides us with the desired generalization result. Definition 3 (Covering numbers for multiple models). We shall endow Mk with the metric d∞(M, M ′) = max j∈[k] ℓ(·, mj) −ℓ ·, m′ j  ∞ and define its covering number Nε Mk as the minimal cardinality of a set Mk ε such that Mk ⊆ S M∈Mk ε B(M, ε). The bound depends on an upper bound on base losses denoted B; this should be viewed as fixing a scale for the losses and is standard where losses are not naturally bounded (e.g., classical bounds on SVM kernel regression [19] use bounded kernels). Thus, we have the following generalization result, whose proof can be found in Appendix D of the supplementary material. 7 Theorem 3. Let the base losses be bounded in the interval [0, B], let Mk have covering numbers Nε Mk ≤(C/ε)dk and let γ = nB/ (2α). Then we have with probability at least 1 −exp n dk log 2C τ  − 2nτ 2 B2(1+γ)2 o : ∀M ∈Mk |Lα (X, M) −EX′∼DnLα (X′, M)| ≤3τ. 5 The weight assignment optimization step As is typical in multi-model learning, simultaneously optimizing the model and the association of the data (in our formulation, the weight) is computationally hard [20], thus Algorithm 1 alternates between optimizing the weight with the model fixed, and optimizing the model with the weights fixed. Thus we show how to efficiently solve a sequence of weight setting problems, minimizing Lα(X, Mi, W) over W, where Mi typically converge. We propose to solve each instance of weight setting using gradient methods, and in particular FISTA [21]. This has two advantages compared to Interior Point methods: First, the use of memory for gradient methods depends only linearly with respect to the dimension, which is O(kn) in problem (2.3), allowing scaling to large data sets. Second, gradient methods have “warm start” properties: the number of iterations required is proportional to the distance between the initial and optimal solutions, which is useful both due to bounds on ∥v −u∥∞and when Mi converge. Theorem 4. Given data and models (X, M) there exists an algorithm that finds a weight matrix W such that Lα(X, M, W) −Lα(X, M) ≤ε using O p kα/ε  iterations, each costing O(kn) time and memory. If α ≥Bn/4 then O  k p αn−1/ε  iterations suffice. The first bound might suggest that typical settings of α ∝n requires iterations to increase with the number of points n; the second bounds shows this is not always necessary. This result can be realized by applying the algorithm FISTA, with a starting point wj = u, with 2αk−2 as a bound on the Lipschitz constant for the gradient. For the first bound we estimate the distance from u by the radius of the product of k simplices; for the second we use Lemma 1 in Appendix E. 6 Conclusion In this paper, we proposed and analyzed, from a general perspective, a new formulation for learning multiple models that explain well much of the data. This is based on associating to each model a regularized weight distribution over the data it explains well. A main advantage of the new formulation is its robustness to fat tailed noise and outliers: we demonstrated this empirically for regression clustering and subspace clustering tasks, and proved that for the important case of clustering, the proposed method has a non-trivial breakdown point, which is in sharp contrast to standard methods such as k-means. We further provided generalization bounds and explained an optimization procedure to solve the formulation in scale. Our main motivation comes from the fast growing attention to analyzing data using multiple models, under the names of k-means clustering, subspace segmentation, and Gaussian mixture models, to list a few. While all these learning schemes share common properties, they are largely studied separately, partly because these problems come from different sub-fields of machine learning. We believe general methods with desirable properties such as generalization and robustness will supply ready tools for new applications using other model types. Acknowledgments H. Xu is partially supported by the Ministry of Education of Singapore through AcRF Tier Two grant R-265-000-443-112 and NUS startup grant R-265-000-384-133. This research was funded (in part) by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). 8 References [1] S. Lloyd. Least squares quantization in PCM. Information Theory, IEEE Transactions on, 28(2):129–137, 1982. [2] P. J. Huber. Robust Statistics. John Wiley & Sons, New York, 1981. [3] J.A. Hartigan and M.A. Wong. Algorithm AS 136: A k-means clustering algorithm. Journal of the Royal Statistical Society. Series C (Applied Statistics), 28(1):100–108, 1979. [4] R. Ostrovsky, Y. Rabani, L.J. Schulman, and C. Swamy. The effectiveness of Lloyd-type methods for the k-means problem. In Foundations of Computer Science, 2006. FOCS’06. 47th Annual IEEE Symposium on, pages 165–176. IEEE, 2006. [5] P. Hansen, E. Ngai, B.K. Cheung, and N. Mladenovic. Analysis of global k-means, an incremental heuristic for minimum sum-of-squares clustering. Journal of classification, 22(2):287– 310, 2005. [6] G. J. McLachlan and K. E. Basford. Mixture Models: Inference and Applications to Clustering. Marcel Dekker, New York, 1998. [7] Mikhail Belkin and Kaushik Sinha. Polynomial learning of distribution families. In FOCS 2010: Proceedings of the 51st Annual IEEE Symposium on Foundations of Computer Science, pages 103–112. IEEE Computer Society, 2010. [8] G. Chen and M. Maggioni. Multiscale geometric and spectral analysis of plane arrangements. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 2825– 2832. IEEE, 2011. [9] Yaoliang Yu and Dale Schuurmans. Rank/norm regularization with closed-form solutions: Application to subspace clustering. In Fabio Gagliardi Cozman and Avi Pfeffer, editors, UAI, pages 778–785. AUAI Press, 2011. [10] M. Soltanolkotabi and E.J. Cand`es. A geometric analysis of subspace clustering with outliers. Arxiv preprint arXiv:1112.4258, 2011. [11] A. Maurer and M. Pontil. k-dimensional coding schemes in hilbert spaces. Information Theory, IEEE Transactions on, 56(11):5839–5846, 2010. [12] A.J. Smola, S. Mika, B. Sch¨olkopf, and R.C. Williamson. Regularized principal manifolds. The Journal of Machine Learning Research, 1:179–209, 2001. [13] A. Dempster, N. Laird, and D. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society. Series B, 39(1):1–38, 1977. [14] R.N. Dav´e and R. Krishnapuram. Robust clustering methods: a unified view. Fuzzy Systems, IEEE Transactions on, 5(2):270–293, 1997. [15] Huan Xu, Constantine Caramanis, and Shie Mannor. Outlier-robust PCA: The highdimensional case. IEEE transactions on information theory, 59(1):546–572, 2013. [16] B. Zhang. Regression clustering. In Data Mining, 2003. ICDM 2003. Third IEEE International Conference on, pages 451–458. IEEE, 2003. [17] P. J. Rousseeuw and A. M. Leroy. Robust Regression and Outlier Detection. John Wiley & Sons, New York, 1987. [18] R. A. Maronna, R. D. Martin, and V. J. Yohai. Robust Statistics: Theory and Methods. John Wiley & Sons, New York, 2006. [19] Olivier Bousquet and Andr´e Elisseeff. Stability and generalization. The Journal of Machine Learning Research, 2:499–526, 2002. [20] M. Mahajan, P. Nimbhorkar, and K. Varadarajan. The planar k-means problem is np-hard. WALCOM: Algorithms and Computation, pages 274–285, 2009. [21] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [22] Roberto Tron and Ren´e Vidal. A benchmark for the comparison of 3-d motion segmentation algorithms. In CVPR. IEEE Computer Society, 2007. [23] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the l1ball for learning in high dimensions. In Proceedings of the 25th international conference on Machine learning, pages 272–279, 2008. 9
2013
227
4,962
Discriminative Transfer Learning with Tree-based Priors Nitish Srivastava Department of Computer Science University of Toronto nitish@cs.toronto.edu Ruslan Salakhutdinov Department of Computer Science and Statistics University of Toronto rsalakhu@cs.toronto.edu Abstract High capacity classifiers, such as deep neural networks, often struggle on classes that have very few training examples. We propose a method for improving classification performance for such classes by discovering similar classes and transferring knowledge among them. Our method learns to organize the classes into a tree hierarchy. This tree structure imposes a prior over the classifier’s parameters. We show that the performance of deep neural networks can be improved by applying these priors to the weights in the last layer. Our method combines the strength of discriminatively trained deep neural networks, which typically require large amounts of training data, with tree-based priors, making deep neural networks work well on infrequent classes as well. We also propose an algorithm for learning the underlying tree structure. Starting from an initial pre-specified tree, this algorithm modifies the tree to make it more pertinent to the task being solved, for example, removing semantic relationships in favour of visual ones for an image classification task. Our method achieves state-of-the-art classification results on the CIFAR-100 image data set and the MIR Flickr image-text data set. 1 Introduction Learning classifiers that generalize well is a hard problem when only few training examples are available. For example, if we had only 5 images of a cheetah, it would be hard to train a classifier to be good at distinguishing cheetahs against hundreds of other classes, working off pixels alone. Any powerful enough machine learning model would severely overfit the few examples, unless it is held back by strong regularizers. This paper is based on the idea that performance can be improved using the natural structure inherent in the set of classes. For example, we know that cheetahs are related to tigers, lions, jaguars and leopards. Having labeled examples from these related classes should make the task of learning from 5 cheetah examples much easier. Knowing class structure should allow us to borrow “knowledge” from relevant classes so that only the distinctive features specific to cheetahs need to be learned. At the very least, the model should confuse cheetahs with these animals rather than with completely unrelated classes, such as cars or lamps. Our aim is to develop methods for transferring knowledge from related tasks towards learning a new task. In the endeavour to scale machine learning algorithms towards AI, it is imperative that we have good ways of transferring knowledge across related problems. Finding relatedness is also a hard problem. This is because in the absence of any prior knowledge, in order to find which classes are related, we should first know what the classes are - i.e., have a good model for each one of them. But to learn a good model, we need to know which classes are related. This creates a cyclic dependency. One way to circumvent it is to use an external knowledge source, such as a human, to specify the class structure by hand. Another way to resolve this dependency is to iteratively learn a model of the what the classes are and what relationships exist between them, using one to improve the other. In this paper, we follow this bootstrapping approach. 1 This paper proposes a way of learning class structure and classifier parameters in the context of deep neural networks. The aim is to improve classification accuracy for classes with few examples. Deep neural networks trained discriminatively with back propagation achieved state-of-the-art performance on difficult classification problems with large amounts of labeled data [2, 14, 15]. The case of smaller amounts of data or datasets which contain rare classes has been relatively less studied. To address this shortcoming, our model augments neural networks with a tree-based prior over the last layer of weights. We structure the prior so that related classes share the same prior. This shared prior captures the features that are common across all members of any particular superclass. Therefore, a class with few examples, for which the model would otherwise be unable to learn good features for, can now have access to good features just by virtue of belonging to the superclass. Learning a hierarchical structure over classes has been extensively studied in the machine learning, statistics, and vision communities. A large class of models based on hierarchical Bayesian models have been used for transfer learning [20, 4, 1, 3, 5]. The hierarchical topic model for image features of Bart et.al. [1] can discover visual taxonomies in an unsupervised fashion from large datasets but was not designed for rapid learning of new categories. Fei-Fei et.al. [5] also developed a hierarchical Bayesian model for visual categories, with a prior on the parameters of new categories that was induced from other categories. However, their approach is not well-suited as a generic approach to transfer learning because they learned a single prior shared across all categories. A number of models based on hierarchical Dirichlet processes have also been used for transfer learning [23, 17]. However, almost all of the the above-mentioned models are generative by nature. These models typically resort to MCMC approaches for inference, that are hard to scale to large datasets. Furthermore, they tend to perform worse than discriminative approaches, particularly as the number of labeled examples increases. A large class of discriminative models [12, 25, 11] have also been used for transfer learning that enable discovering and sharing information among related classes. Most similar to our work is [18] which defined a generative prior over the classifier parameters and a prior over the tree structures to identify relevant categories. However, this work focused on a very specific object detection task and used an SVM model with pre-defined HOG features as its input. In this paper, we demonstrate our method on two different deep architectures (1) convolutional nets with pixels as input and singlelabel softmax outputs and (2) fully connected nets pretrained using deep Boltzmann machines with image features and text tokens as input and multi-label logistic outputs. Our model improves performance over strong baselines in both cases, lending some measure of universality to the approach. In essence, our model learns low-level features, high-level features, as well as a hierarchy over classes in an end-to-end way. 2 Model Description Let X = {x1, x2, . . . , xN} be a set of N data points and Y = {y1, y2, . . . , yN} be the set of corresponding labels, where each label yi is a K dimensional vector of targets. These targets could be binary, one-of-K, or real-valued. In our setting, it is useful to think of each xi as an image and yi as a one-of-K encoding of the label. The model is a multi-layer neural network (see Fig. 1a). Let w denote the set of all parameters of this network (weights and biases for all the layers), excluding the top-level weights, which we denote separately as β ∈RD×K. Here D represents the number of hidden units in the last hidden layer. The conditional distribution over Y can be expressed as P(Y|X) = Z w,β P(Y|X, w, β)P(w)P(β)dwdβ. (1) In general, this integral is intractable, and we typically resort to MAP estimation to determine the values of the model parameters w and β that maximize log P(Y|X, w, β) + log P(w) + log P(β). Here, log P(Y|X, w, β) is the log-likelihood function and the other terms are priors over the model’s parameters. A typical choice of prior is a Gaussian distribution with diagonal covariance: βk ∼N  0, 1 λID  , ∀k ∈{1, . . . , K}. Here βk ∈RD denotes the classifier parameters for class k. Note that this prior assumes that each βk is independent of all other βi’s. In other words, a-priori, the weights for label k are not related to any 2 x fw(x) w β ˆy • • • Low level features Input High level features Predictions • • • βcar βtiger K D (a) • • • βcar βtruck βtiger βcheetah θvehicle θanimal (b) Figure 1: Our model: A deep neural network with priors over the classification parameters. The priors are derived from a hierarchy over classes. other label’s weights. This is a reasonable assumption when nothing is known about the labels. It works quite well for most applications with large number of labeled examples per class. However, if we know that the classes are related to one another, priors which respect these relationships may be more suitable. Such priors would be crucial for classes that only have a handful of training examples, since the effect of the prior would be more pronounced. In this work, we focus on developing such a prior. 2.1 Learning With a Fixed Tree Hierarchy Let us first assume that the classes have been organized into a fixed tree hierarchy which is available to us. We will relax this assumption later by placing a hierarchical non-parametric prior over the tree structures. For ease of exposition, consider a two-level hierarchy1, as shown in Fig. 1b. There are K leaf nodes corresponding to the K classes. They are connected to S super-classes which group together similar basic-level classes. Each leaf node k is associated with a weight vector βk ∈RD. Each super-class node s is associated with a vector θs ∈RD, s = 1, ..., S. We define the following generative model for β θs ∼N  0, 1 λ1 ID  , βk ∼N  θparent(k), 1 λ2 ID  . (2) This prior expresses relationships between classes. For example, it asserts that βcar and βtruck are both deviations from θvehicle. Similarly, βcat and βdog are deviations from θanimal. Eq. 1 can now be re-written to include θ as follows P(Y|X) = Z w,β,θ P(Y|X, w, β)P(w)P(β|θ)P(θ)dwdβdθ. (3) We can perform MAP inference to determine the values of {w, β, θ} that maximize log P(Y|X, w, β) + log P(w) + log P(β|θ) + log P(θ). In terms of a loss function, we wish to minimize L(w, β, θ) = −log P(Y|X, w, β) −log P(w) −log P(β|θ) −log P(θ) = −log P(Y|X, w, β) + λ2 2 ||w||2 + λ2 2 K X k=1 ||βk −θparent(k)||2 + λ1 2 ||θ||2. (4) Note that by fixing the value of θ = 0, this loss function recovers our standard loss function. The choice of normal distributions in Eq. 2 leads to a nice property that maximization over θ, given β can be done in closed form. It just amounts to taking a (scaled) average of all βk’s which are children of θs. Let Cs = {k|parent(k) = s}, then θ∗ s = 1 |Cs| + λ1/λ2 X k∈Cs .βk (5) 1The model can be easily generalized to deeper hierarchies. 3 1: Given: X, Y, classes K, superclasses S, initial z, L, M. 2: Initialize w, β. 3: repeat 4: // Optimize w, β with fixed z. 5: w, β ←SGD (X, Y, w, β, z) for L steps. 6: // Optimize z, β with fixed w. 7: RandomPermute(K) 8: for k in K do 9: for s in S ∪{snew} do 10: zk ←s 11: βs ←SGD (fw(X), Y, β, z) for M steps. 12: end for 13: s′ ←ChooseBestSuperclass(β1, β2, . . .) 14: β ←βs′, zk ←s′, S ←S ∪{s′} 15: end for 16: until convergence car truck cat dog van van van s=vehicle s=animal s=snew k = van Algorithm 1: Procedure for learning the tree. Therefore, the loss function in Eq. 4 can be optimized by iteratively performing the following two steps. In the first step, we maximize over w and β keeping θ fixed. This can be done using standard stochastic gradient descent (SGD). Then, we maximize over θ keeping β fixed. This can be done in closed form using Eq. 5. In practical terms, the second step is almost instantaneous and only needs to be performed after every T gradient descent steps, where T is around 10-100. Therefore, learning is almost identical to standard gradient descent. It allows us to exploit the structure over labels at a very nominal cost in terms of computational time. 2.2 Learning the Tree Hierarchy So far we have assumed that our model is given a fixed tree hierarchy. Now, we show how the tree structure can be learned during training. Let z be a K-length vector that specifies the tree structure, that is, zk = s indicates that class k is a child of super-class s. We place a non-parametric Chinese Restaurant Process (CRP) prior over z. This prior P(z) gives the model the flexibility to have any number of superclasses. The CRP prior extends a partition of k classes to a new class by adding the new class either to one of the existing superclasses or to a new superclass. The probability of adding it to superclass s is cs k+γ where cs is the number of children of superclass s. The probability of creating a new superclass is γ k+γ . In essence, it prefers to add a new node to an existing large superclass instead of spawning a new one. The strength of this preference is controlled by γ. Equipped with the CRP prior over z, the conditional over Y takes the following form P(Y|X) = X z Z w,β,θ P(Y|X, w, β)P(w)P(β|θ, z)P(θ)dwdβdθ  P(z). (6) MAP inference in this model leads to the following optimization problem max w,β,θ,z log P(Y|X, w, β) + log P(w) + log P(β|θ, z) + log P(θ) + log P(z). Maximization over z is problematic because the domain of z is a huge discrete set. Fortunately, this can be approximated using a simple and parallelizable search procedure. We first initialize the tree sensibly. This can be done by hand or by extracting a semantic tree from WordNet [16]. Let the number of superclasses in the tree be S. We optimize over {w, β, θ} for a L steps using this tree. Then, a leaf node is picked uniformly at random from the tree and S + 1 tree proposals are generated as follows. S proposals are generated by attaching this leaf node to each of the S superclasses. One additional proposal is generated by creating a new super-class and attaching the label to it. This process is shown in Algorithm 1. We then re-estimate {β, θ} for each of these S + 1 trees for a few steps. Note that each of the S + 1 optimization problems can be performed independently, in parallel. The best tree is then picked using a validation set. This process is repeated by picking another node and again trying all possible locations for it. After each node has been picked once and potentially repositioned, we take the resulting tree and go back to 4 whale dolphin willow tree oak tree lamp clock leopard tiger ray flatfish Figure 2: Examples from CIFAR-100. Five randomly chosen examples from 8 of the 100 classes are shown. Classes in each row belong to the same superclass. optimizing w, β using this newly learned tree in place of the given tree. If the position of any class in the tree did not change during a full pass through all the classes, the hierarchy discovery was said to have converged. When training this model on CIFAR-100, this amounts to interrupting the stochastic gradient descent after every 10,000 steps to find a better tree. The amount of time spent in learning this tree is a small fraction of the total time (about 5%). 3 Experiments on CIFAR-100 The CIFAR-100 dataset [13] consists of 32 × 32 color images belonging to 100 classes. These classes are divided into 20 groups of 5 each. For example, the superclass fish contains aquarium fish, flatfish, ray, shark and trout; and superclass flowers contains orchids, poppies, roses, sunflowers and tulips. Some examples from this dataset are shown in Fig. 2. We chose this dataset because it has a large number of classes with a few examples in each, making it ideal for demonstrating the utility of transfer learning. There are only 600 examples of each class of which 500 are in the training set and 100 in the test set. We preprocessed the images by doing global contrast normalization followed by ZCA whitening. 3.1 Model Architecture and Training Details We used a convolutional neural network with 3 convolutional hidden layers followed by 2 fully connected hidden layers. All hidden units used a rectified linear activation function. Each convolutional layer was followed by a max-pooling layer. Dropout [8] was applied to all the layers of the network with the probability of retaining a hidden unit being p = (0.9, 0.75, 0.75, 0.5, 0.5, 0.5) for the different layers of the network (going from input to convolutional layers to fully connected layers). Max-norm regularization [8] was used for weights in both convolutional and fully connected layers. The initial tree was chosen based on the superclass structure given in the data set. We learned a tree using Algorithm 1 with L = 10, 000 and M = 100. The final learned tree is provided in the supplementary material. 3.2 Experiments with Few Examples per Class In our first set of experiments, we worked in a scenario where each class has very few examples. The aim was to assess whether the proposed model allows related classes to borrow information from each other. For a baseline, we used a standard convolutional neural network with the same architecture as our model. This is an extremely strong baseline and already achieved excellent results, outperforming all previously reported results on this dataset as shown in Table 1. We created 5 subsets of the data by randomly choosing 10, 25, 50, 100 and 250 examples per class, and trained four models on each subset. The first was the baseline. The second was our model using the given tree structure (100 classes grouped into 20 superclasses) which was kept fixed during training. The third and fourth were our models with a learned tree structure. The third one was initialized with a random tree and the fourth with the given tree. The random tree was constructed by drawing a sample from the CRP prior and randomly assigning classes to leaf nodes. The test performance of these models is compared in Fig. 3a. We observe that if the number of examples per class is small, the fixed tree model already provides significant improvement over the baseline. The improvement diminishes as the number of examples increases and eventually the performance falls below the baseline (61.7% vs 62.8%). However, the learned tree model does 5 10 25 50 100 250 500 Number of training examples per label 10 20 30 40 50 60 70 Test classification accuracy Baseline Fixed Tree Learned Tree (a) 0 20 40 60 80 100 Sorted classes −30 −20 −10 0 10 20 30 Improvement Baseline Fixed Tree Learned Tree (b) Figure 3: Classification results on CIFAR-100. Left: Test set classification accuracy for different number of training examples per class. Right: Improvement over the baseline when trained on 10 examples per class. The learned tree models were initialized at the given tree. Method Test Accuracy % Conv Net + max pooling 56.62 ± 0.03 Conv Net + stochastic pooling [24] 57.49 Conv Net + maxout [6] 61.43 Conv Net + max pooling + dropout (Baseline) 62.80 ± 0.08 Baseline + fixed tree 61.70 ± 0.06 Baseline + learned tree (Initialized randomly) 61.20 ± 0.35 Baseline + learned tree (Initialized from given tree) 63.15 ± 0.15 Table 1: Classification results on CIFAR-100. All models were trained on the full training set. better. Even with 10 examples per class, it gets an accuracy of 18.52% compared to the baseline model’s 12.81% or the fixed tree model’s 16.29%. Thus the model can get almost a 50% relative improvement when few examples are available. As the number of examples increases, the relative improvement decreases. However, even for 500 examples per class, the learned tree model improves upon the baseline, achieving a classification accuracy of 63.15%. Note that initializing the model with a random tree decreases model performance, as shown in Table 1. Next, we analyzed the learned tree model to find the source of the improvements. We took the model trained on 10 examples per class and looked at the classification accuracy separately for each class. The aim was to find which classes gain or suffer the most. Fig. 3b shows the improvement obtained by different classes over the baseline, where the classes are sorted by the value of the improvement over the baseline. Observe that about 70 classes benefit in different degrees from learning a hierarchy for parameter sharing, whereas about 30 classes perform worse as a result of transfer. For the learned tree model, the classes which improve most are willow tree (+26%) and orchid (+25%). The classes which lose most from the transfer are ray (-10%) and lamp (-10%). We hypothesize that the reason why certain classes gain a lot is that they are very similar to other classes within their superclass and thus stand to gain a lot by transferring knowledge. For example, the superclass for willow tree contains other trees, such as maple tree and oak tree. However, ray belongs to superclass fish which contains more typical examples of fish that are very dissimilar in appearance. With the fixed tree, such transfer hurts performance (ray did worse by -29%). However, when the tree was learned, this class split away from the fish superclass to join a new superclass and did not suffer as much. Similarly, lamp was under household electrical devices along with keyboard and clock. Putting different kinds of electrical devices under one superclass makes semantic sense but does not help for visual recognition tasks. This highlights a key limitation of hierarchies based on semantic knowledge and advocates the need to learn the hierarchy so that it becomes relevant to the task at hand. The full learned tree is provided in the supplementary material. 3.3 Experiments with Few Examples for One Class In this set of experiments, we worked in a scenario where there are lots of examples for different classes, but only few examples of one particular class. The aim was to see whether the model transfers information from other classes that it has learned to this “rare” class. We constructed training sets by randomly drawing either 5, 10, 25, 50, 100, 250 or 500 examples from the dolphin 6 5 10 25 50 100 250 500 Number of training cases for dolphin 0 10 20 30 40 50 60 70 Test classification accuracy Baseline Fixed Tree Learned Tree (a) 1 5 10 25 50 100 250 500 Number of training cases for dolphin 45 50 55 60 65 70 75 80 85 Test classification accuracy Baseline Fixed Tree Learned Tree (b) Figure 4: Results on CIFAR-100 with few examples for the dolphin class. Left: Test set classification accuracy for different number of examples. Right: Accuracy when classifying a dolphin as whale or shark is also considered correct. Classes baby, female, people, portrait plant life, river, water clouds, sea, sky, transport, water animals, dog, food clouds, sky, structures Images Tags claudia ⟨no text ⟩ barco, pesca, boattosail, navegac¸¯ao watermelon, dog, hilarious, chihuahua colors, cores, centro, commercial, building Figure 5: Some examples from the MIR-Flickr dataset. Each instance in the dataset is an image along with textual tags. Each image has multiple classes. class and all 500 training examples for the other 99 classes. We trained the baseline, fixed tree and learned tree models with each of these datasets. The objective was kept the same as before and no special attention was paid to the dolphin class. Fig. 4a shows the test accuracy for correctly predicting the dolphin class. We see that transfer learning helped tremendously. For example, with 10 cases, the baseline gets 0% accuracy whereas the transfer learning model can get around 3%. Even for 250 cases, the learned tree model gives significant improvements (31% to 34%). We repeated this experiment for classes other than dolphin as well and found similar improvements. See the supplementary material for a more detailed description. In addition to performing well on the class with few examples, we would also want any errors to be sensible. To check if this was indeed the case, we evaluated the performance of the above models treating the classification of dolphin as shark or whale to also be correct, since we believe these to be reasonable mistakes. Fig. 4b shows the classification accuracy under this assumption for different models. Observe that the transfer learning methods provide significant improvements over the baseline. Even when we have just 1 example for dolphin, the accuracy jumps from 45% to 52%. 4 Experiments on MIR Flickr The Multimedia Information Retrieval Flickr Data set [9] consists of 1 million images collected from the social photography website Flickr along with their user assigned tags. Among the 1 million images, 25,000 have been annotated using 38 labels. These labels include object categories such as, bird, tree, people, as well as scene categories, such as indoor, sky and night. Each image has multiple labels. Some examples are shown in Fig. 5. This dataset is different from CIFAR-100 in many ways. In the CIFAR-100 dataset, our model was trained using image pixels as input and each image belonged to only one class. MIR-FLickr is a multimodal dataset for which we used standard computer vision image features and word counts as inputs. The CIFAR-100 models used a multi-layer convolutional network, whereas for this dataset we use a fully connected neural network initialized by unrolling a Deep Boltzmann Machine (DBM) [19]. Moreover, this dataset offers a more natural class distribution where some classes occur more often than others. For example, sky occurs in over 30% of the instances, whereas baby occurs in fewer than 0.4%. We also used 975,000 unlabeled images for unsupervised training of the DBM. We use the publicly available features and train-test splits from [21]. 7 0 5 10 15 20 25 30 35 40 Sorted classes −0.04 −0.02 0.00 0.02 0.04 0.06 0.08 0.10 Improvement in Average Precision Baseline Fixed Tree Learned Tree (a) Class-wise improvement 0.0 0.1 0.2 0.3 0.4 Fraction of instances containing the class −0.04 −0.02 0.00 0.02 0.04 0.06 0.08 Improvement in Average Precision (b) Improvement vs. number of examples Figure 6: Results on MIR Flickr. Left: Improvement in Average Precision over the baseline for different methods. Right: Improvement of the learned tree model over the baseline for different classes along with the fraction of test cases which contain that class. Each dot corresponds to a class. Classes with few examples (towards the left of plot) usually get significant improvements. Method MAP Logistic regression on Multimodal DBM [21] 0.609 Multiple Kernel Learning SVMs [7] 0.623 TagProp [22] 0.640 Multimodal DBM + finetuning + dropout (Baseline) 0.641 ± 0.004 Baseline + fixed tree 0.648 ± 0.004 Baseline + learned tree (initialized from given tree) 0.651 ± 0.005 Table 2: Mean Average Precision obtained by different models on the MIR-Flickr data set. 4.1 Model Architecture and Training Details In order to make our results directly comparable to [21], we used the same network architecture as described therein. The authors of the dataset [10] provided a high-level categorization of the classes which we use to create an initial tree. This tree structure and the one learned by our model are shown in the supplementary material. We used Algorithm 1 with L = 500 and M = 100. 4.2 Classification Results For a baseline we used a Multimodal DBM model after finetuning it discriminatively with dropout. This model already achieves state-of-the-art results, making it a very strong baseline. The results of the experiment are summarized in Table 2. The baseline achieved a MAP of 0.641, whereas our model with a fixed tree improved this to 0.647. Learning the tree structure further pushed this up to 0.651. For this dataset, the learned tree was not significantly different from the given tree. Therefore, we expected the improvement from learning the tree to be marginal. However, the improvement over the baseline was significant, showing that transferring information between related classes helped. Looking closely at the source of gains, we found that similar to CIFAR-100, some classes gain and others lose as shown in Fig. 6a. It is encouraging to note that classes which occur rarely in the dataset improve the most. This can be seen in Fig. 6b which plots the improvements of the learned tree model over the baseline against the fraction of test instances that contain that class. For example, the average precision for baby which occurs in only 0.4% of the test cases improves from 0.173 (baseline) to 0.205 (learned tree). This class borrows from people and portrait both of which occur very frequently. The performance on sky which occurs in 31% of the test cases stays the same. 5 Conclusion We proposed a model that augments standard neural networks with tree-based priors over the classification parameters. These priors follow the hierarchical structure over classes and enable the model to transfer knowledge from related classes. We also proposed a way of learning the hierarchical structure. Experiments show that the model achieves excellent results on two challenging datasets. 8 References [1] E. Bart, I. Porteous, P. Perona, and M. Welling. Unsupervised learning of visual taxonomies. In CVPR, pages 1–8, 2008. [2] Y. Bengio and Y. LeCun. Scaling learning algorithms towards AI. Large-Scale Kernel Machines, 2007. [3] Hal Daum´e, III. Bayesian multitask learning with latent hierarchies. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI ’09, pages 135–142, Arlington, Virginia, United States, 2009. AUAI Press. [4] Theodoros Evgeniou and Massimiliano Pontil. Regularized multi-task learning. In ACM SIGKDD, 2004. [5] Li Fei-Fei, R. Fergus, and P. Perona. One-shot learning of object categories. IEEE Trans. Pattern Analysis and Machine Intelligence, 28(4):594–611, April 2006. [6] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 1319–1327, 2013. [7] M. Guillaumin, J. Verbeek, and C. Schmid. Multimodal semi-supervised learning for image classification. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 902 –909, june 2010. [8] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. CoRR, abs/1207.0580, 2012. [9] Mark J. Huiskes and Michael S. Lew. The MIR Flickr retrieval evaluation. In MIR ’08: Proceedings of the 2008 ACM International Conference on Multimedia Information Retrieval, New York, NY, USA, 2008. ACM. [10] Mark J. Huiskes, Bart Thomee, and Michael S. Lew. New trends and ideas in visual concept detection: the MIR flickr retrieval evaluation initiative. In Multimedia Information Retrieval, pages 527–536, 2010. [11] Zhuoliang Kang, Kristen Grauman, and Fei Sha. Learning with whom to share in multi-task feature learning. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), ICML ’11, pages 521–528, New York, NY, USA, June 2011. ACM. [12] Seyoung Kim and Eric P. Xing. Tree-guided group lasso for multi-task regression with structured sparsity. In ICML, pages 543–550, 2010. [13] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. [14] Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25. MIT Press, 2012. [15] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proceedings of the 26th International Conference on Machine Learning, pages 609–616, 2009. [16] George A. Miller. Wordnet: a lexical database for english. Commun. ACM, 38(11):39–41, November 1995. [17] R. Salakhutdinov, J. Tenenbaum, and A. Torralba. Learning to learn with compound hierarchical-deep models. In NIPS. MIT Press, 2011. [18] R. Salakhutdinov, A. Torralba, and J. Tenenbaum. Learning to share visual appearance for multiclass object detection. In CVPR, 2011. [19] R. R. Salakhutdinov and G. E. Hinton. Deep Boltzmann machines. In Proceedings of the International Conference on Artificial Intelligence and Statistics, volume 12, 2009. [20] Babak Shahbaba and Radford M. Neal. Improving classification when a class hierarchy is available using a hierarchy-based prior. Bayesian Analysis, 2(1):221–238, 2007. [21] Nitish Srivastava and Ruslan Salakhutdinov. Multimodal learning with deep boltzmann machines. In Advances in Neural Information Processing Systems 25, pages 2231–2239. MIT Press, 2012. [22] Jakob Verbeek, Matthieu Guillaumin, Thomas Mensink, and Cordelia Schmid. Image Annotation with TagProp on the MIRFLICKR set. In 11th ACM International Conference on Multimedia Information Retrieval (MIR ’10), pages 537–546. ACM Press, 2010. [23] Ya Xue, Xuejun Liao, Lawrence Carin, and Balaji Krishnapuram. Multi-task learning for classification with dirichlet process priors. J. Mach. Learn. Res., 8:35–63, May 2007. [24] Matthew D. Zeiler and Rob Fergus. Stochastic pooling for regularization of deep convolutional neural networks. CoRR, abs/1301.3557, 2013. [25] Alon Zweig and Daphna Weinshall. Hierarchical regularization cascade for joint learning. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), volume 28, pages 37–45, May 2013. 9
2013
228
4,963
Machine Teaching for Bayesian Learners in the Exponential Family Xiaojin Zhu Department of Computer Sciences, University of Wisconsin-Madison Madison, WI, USA 53706 jerryzhu@cs.wisc.edu Abstract What if there is a teacher who knows the learning goal and wants to design good training data for a machine learner? We propose an optimal teaching framework aimed at learners who employ Bayesian models. Our framework is expressed as an optimization problem over teaching examples that balance the future loss of the learner and the effort of the teacher. This optimization problem is in general hard. In the case where the learner employs conjugate exponential family models, we present an approximate algorithm for finding the optimal teaching set. Our algorithm optimizes the aggregate sufficient statistics, then unpacks them into actual teaching examples. We give several examples to illustrate our framework. 1 Introduction Consider the simple task of learning a threshold classifier in 1D (Figure 1). There is an unknown threshold θ ∈[0, 1]. For any item x ∈[0, 1], its label y is white if x < θ and black otherwise. After seeing n training examples the learner’s estimate is ˆθ. What is the error |ˆθ −θ|? The answer depends on the learning paradigm. If the learner receives iid noiseless training examples where x ∼uniform[0, 1], then with large probability |ˆθ −θ| = O( 1 n). This is because the inner-most white and black items are 1/(n + 1) apart on average. If the learner performs active learning and an oracle provides noiseless labels, then the error reduces faster |ˆθ −θ| = O( 1 2n ) since the optimal strategy is binary search. However, a helpful teacher can simply teach with n = 2 items (θ − ϵ/2, white), (θ + ϵ/2, black) to achieve an arbitrarily small error ϵ. The key difference is that an active learner still needs to explore the boundary, while a teacher can guide. θ θ O(1/2 )n θ { { O(1/n) passive learning "waits" active learning "explores" teaching "guides" Figure 1: Teaching can require far fewer examples than passive or active learning We impose the restriction that teaching be conducted only via teaching examples (rather than somehow directly giving the parameter θ to the learner). What, then, are the best teaching examples? Understanding the optimal teaching strategies is important for both machine learning and education: (i) When the learner is a human student (as modeled in cognitive psychology), optimal teaching theory can design the best lessons for education. (ii) In cyber-security the teacher may be an adversary attempting to mislead a machine learning system via “poisonous training examples.” Optimal teaching quantifies the power and limits of such adversaries. (iii) Optimal teaching informs robots as to the best ways to utilize human teaching, and vice versa. 1 Our work builds upon three threads of research. The first thread is the teaching dimension theory by Goldman and Kearns [10] and its extensions in computer science(e.g., [1, 2, 11, 12, 14, 25]). Our framework allows for probabilistic, noisy learners with infinite hypothesis space, arbitrary loss functions, and the notion of teaching effort. Furthermore, in Section 3.2 we will show that the original teaching dimension is a special case of our framework. The second thread is the research on representativeness and pedagogy in cognitive science. Tenenbaum and Griffiths is the first to note that representative data is one that maximizes the posterior probability of the target model [22]. Their work on Gaussian distributions, and later work by Rafferty and Griffiths on multinomial distributions [19], find representative data by matching sufficient statistics. Our framework can be viewed as a generalization. Specifically, their work corresponds to the specific choice (to be defined in Section 2) of loss() = KL divergence and effort() being either zero or an indicator function to fix the data set size at n. We made it explicit that these functions can have other designs. Importantly, we also show that there are non-trivial interactions between loss() and effort(), such as not-teachingat-all in Example 4, or non-brute-force-teaching in Example 5. An interesting variant studied in cognitive science is when the learner expects to be taught [20, 8]. We defer the discussion on this variant, known as “collusion” in computational teaching theory, and its connection to information theory to section 5. In addition, our optimal teaching framework may shed light on the optimality of different method of teaching humans [9, 13, 17, 18]. The third thread is the research on better ways to training machine learners such as curriculum learning or easy-to-hard ordering of training items [3, 15, 16], and optimal reward design in reinforcement learning [21]. Interactive systems have been built which employ or study teaching heuristics [4, 6]. Our framework provides a unifying optimization view that balances the future loss of the learner and the effort of the teacher. 2 Optimal Teaching for General Learners We start with a general framework for teaching and gradually specialize the framework in later sections. Our framework consists of three entities: the world, the learner, and the teacher. (i) The world is defined by a target model θ∗. Future test items for the learner will be drawn iid from this model. This is the same as in standard machine learning. (ii) The learner has to learn θ∗from training data. Without loss of generality let θ∗∈Θ, the hypothesis space of the learner (if not, we can always admit approximation error and define θ∗to be the distribution in Θ closest to the world distribution). The learner is the same as in standard machine learning (learners who anticipate to be taught are discussed in section 5). The training data, however, is provided by a teacher. (iii) The teacher is the new entity in our framework. It is almost omnipotent: it knows the world θ∗, the learner’s hypothesis space Θ, and importantly how the learner learns given any training data.1 However, it can only teach the learner by providing teaching (or, from the learner’s perspective, training) examples. The teacher’s goal is to design a teaching set D so that the learner learns θ∗as accurately and effortlessly as possible. In this paper, we consider batch teaching where the teacher presents D to the learner all at once, and the teacher can use any item in the example domain. Being completely general, we leave many details unspecified. For instance, the world’s model can be supervised p(x, y; θ∗) or unsupervised p(x; θ∗); the learner may or may not be probabilistic; and when it is, Θ can be parametric or nonparametric. Nonetheless, we can already propose a generic optimization problem for optimal teaching: min D loss(c fD, θ∗) + effort(D). (1) The function loss() measures the learner’s deviation from the desired θ∗. The quantity c fD represents the state of the learner after seeing the teaching set D. The function effort() measures the difficulty the teacher experiences when teaching with D. Despite its appearance, the optimal teaching problem (1) is completely different from regularized parameter estimation in machine learning. The desired parameter θ∗is known to the teacher. The optimization is instead over the teaching set D. This can be a difficult combinatorial problem – for instance we need to optimize over the cardinality of D. Neither is the effort function a regularizer. The optimal teaching problem (1) so far is rather abstract. For the sake of concreteness we next focus on a rich family of learners, namely Bayesian models. However, we note that our framework can be adapted to other types of learners, as long as we know how they react to the teaching set D. 1This is a strong assumption. It can be relaxed in future work, where the teacher has to estimate the state of the learner by “probing” it with tests. 2 3 Optimal Teaching for Bayesian Learners We focus on Bayesian learners because they are widely used in both machine learning and cognitive science [7, 23, 24] and because of their predictability: they react to any teaching examples in D by performing Bayesian updates.2 Before teaching, a Bayesian learner’s state is captured by its prior distribution p0(θ). Given D, the learner’s likelihood function is p(D | θ). Both the prior and the likelihood are assumed to be known to the teacher. The learner’s state after seeing D is the posterior distribution c fD ≡p(θ | D) = R Θ p0(π)p(D | π)dπ −1 p0(θ)p(D | θ). 3.1 The KL Loss and Various Effort Functions, with Examples The choice of loss() and effort() is problem-specific and depends on the teaching goal. In this paper, we will use the Kullback-Leibler divergence so that loss(c fD, θ∗) = KL (δθ∗∥p(θ | D)), where δθ∗ is a point mass distribution at θ∗.3 This loss encourages the learner’s posterior to concentrate around the world model θ∗. With the KL loss, it is easy to verify that the optimal teaching problem (1) can be equivalently written as min D −log p(θ∗| D) + effort(D). (2) We remind the reader that this is not a MAP estimate problem. Instead, the intuition is to find a good teaching set D to make θ∗“stand out” in the posterior distribution. The effort() function reflects resource constraints on the teacher and the learner: how hard is it to create the teaching examples, to deliver them to the learner, and to have the learner absorb them? For most of the paper we use the cardinality of the teaching set effort(D) = c|D| where c is a positive per-item cost. This assumes that the teaching effort is proportional to the number of teaching items, which is reasonable in many problems. We will demonstrate a few other effort functions in the examples below. How good is any teaching set D? We hope D guides the learner’s posterior toward the world’s θ∗, but we also hope D takes little effort to teach. The proper quality measure is the objective value (2) which balances the loss() and effort() terms. Definition 1 (Teaching Impedance). The Teaching Impedance (TI) of a teaching set D is the objective value −log p(θ∗| D) + effort(D). The lower the TI, the better. We now give examples to illustrate our optimal teaching framework for Bayesian learners. Example 1 (Teaching a 1D threshold classifier). The classification task is the same as in Figure 1, with x ∈[0, 1] and y ∈{−1, 1}. The parameter space is Θ = [0, 1]. The world has a threshold θ∗∈Θ. Let the learner’s prior be uniform p0(θ) = 1. The learner’s likelihood function is p(y = 1 | x, θ) = 1 if x ≥θ and 0 otherwise. The teacher wants the learner to arrive at a posterior p(θ | D) peaked at θ∗by designing a small D. As discussed above, this can be formulated as (2) with the KL loss() and the cardinality effort() functions: minD −log p(θ∗| D) + c|D|. For any teaching set D = {(x1, y1), . . . , (xn, yn)}, the learner’s posterior is simply p(θ | D) = uniform [maxi:yi=−1(xi), mini:yi=1(xi)], namely uniform over the version space consistent with D. The optimal teaching problem becomes minn,x1,y1,...,xn,yn −log  1 mini:yi=1(xi)−maxi:yi=−1(xi)  + cn. One solution is the limiting case with a teaching set of size two D = {(θ∗−ϵ/2, −1), (θ∗+ ϵ/2, 1)} as ϵ →0, since the Teaching Impedance TI = log(ϵ)+2c approaches −∞. In other words, the teacher teaches by two examples arbitrarily close to, but on the opposite sides of, the decision boundary as in Figure 1(right). Example 2 (Learner cannot tell small differences apart). Same as Example 1, but the learner has poor perception (e.g., children or robots) and cannot distinguish similar items very well. We may 2Bayesian learners typically assume that the training data is iid; optimal teaching intentionally violates this assumption because the designed teaching examples in D will typically be non-iid. However, the learners are oblivious to this fact and will perform Bayesian update as usual. 3If we allow the teacher to be uncertain about the world θ∗, we may encode the teacher’s own belief as a distribution p∗(θ) and replace δθ∗with p∗(θ). 3 encode this in effort() as, for example, effort(D) = c minxi,xj ∈D |xi−xj|. That is, the teaching examples require more effort to learn if any two items are too close. With two teaching examples as in Example 1, TI = log(ϵ) + c/ϵ. It attains minimum at ϵ = c. The optimal teaching set is D = {(θ∗−c/2, −1), (θ∗+ c/2, 1)}. Example 3 (Teaching to pick one model out of two). There are two Gaussian distributions θA = N(−1 4, 1 2), θB = N( 1 4, 1 2). The learner has Θ = {θA, θB}, and we want to teach it the fact that the world is using θ∗= θA. Let the learner have equal prior p0(θA) = p0(θB) = 1 2. The learner observes examples x ∈R, and its likelihood function is p(x | θ) = N(x | θ). Let D = {x1, . . . , xn}. With these specific parameters, the KL loss can be shown to be −log p(θ∗| D) = log (1 + Qn i=1 exp(xi)). For this example, let us suppose that teaching with extreme item values is undesirable (note xi →−∞minimizes the KL loss). We combine cardinality and range preferences in effort(D) = cn + Pn i=1 I(|xi| ≤d), where the indicator function I(z) = 0 if z is true, and +∞otherwise. In other words, the teaching items must be in some interval [−d, d]. This leads to the optimal teaching problem minn,x1,...,xn log (1 + Qn i=1 exp(xi)) + cn + Pn i=1 I(|xi| ≤d). This is a mixed integer program (even harder–the number of variables has to be optimized as well). We first relax n to real values. By inspection, the solution is to let all xi = −d and let n minimize TI = log (1 + exp(−dn)) + cn. The minimum is achieved at n = 1 d log d c −1  . We then round n and force nonnegativity: n = max 0,  1 d log d c −1  . This D is sensible: θ∗= θA is the model on the left, and showing the learner n copies of −d lends the most support to that model. Note, however, that n = 0 for certain combinations of c, d (e.g., when c ≥d): the effort of teaching outweighs the benefit. The teacher may choose to not teach at all and maintain the status quo (prior p0) of the learner! 3.2 Teaching Dimension is a Special Case In this section we provide a comparison to one of the most influential teaching models, namely the original teaching dimension theory [10]. It may seem that our optimal teaching setting (2) is more restrictive than theirs, since we make strong assumptions about the learner (that it is Bayesian, and the form of the prior and likelihood). Their query learning setting in fact makes equally strong assumptions, in that the learner updates its version space to be consistent with all teaching items. Indeed, we can cast their setting as a Bayesian learning problem, showing that their problem is a special case of (2). Corresponding to the concept class C = {c} in [10], we define the conditional probability P(y = 1 | x, θc) =  1, if c(x) = + 0, if c(x) = − and the joint distribution P(x, y | θc) = P(x)P(y | x, θc) where P(x) is uniform over the domain X. The world has θ∗= θc∗corresponding to the target concept c∗∈C. The learner has Θ = {θc | c ∈C}. The learner’s prior is p0(θ) = uniform(Θ) = 1 |C|, and its likelihood function is P(x, y | θc). The learner’s posterior after teaching with D is P(θc | D) =  1/(number of concepts in C consistent with D), if c is consistent with D 0, otherwise (3) Teaching dimension TD(c∗) is the minimum cardinality of D that uniquely identifies the target concept. We can formulate this using our optimal teaching framework min D −log P(θc∗| D) + γ|D|, (4) where we used the cardinality effort() function (and renamed the cost γ for clarity). We can make sure that the loss term is minimized to 0, corresponding to successfully identifying the target concept, if γ < 1 T D(c∗). But since TD(c∗) is unknown beforehand, we can set γ ≤ 1 |C| since |C| ≥TD(c∗) (one can at least eliminate one concept from the version space with each well-designed teaching item). The solution D to (4) is then a minimum teaching set for the target concept c∗, and |D| = TD(c∗). 4 Optimal Teaching for Bayesian Learners in the Exponential Family While we have proposed an optimization-based framework for teaching any Bayesian learner and provided three examples, it is not clear if there is a unified approach to solve the optimization 4 problem (2). In this section, we further restrict ourselves to a subset of Bayesian learners whose prior and likelihood are in the exponential family and are conjugate. For this subset of Bayesian learners, finding the optimal teaching set D naturally decomposes into two steps: In the first step one solves a convex optimization problem to find the optimal aggregate sufficient statistics for D. In the second step one “unpacks” the aggregate sufficient statistics into actual teaching examples. We present an approximate algorithm for doing so. We recall that an exponential family distribution (see e.g. [5]) takes the form p(x | θ) = h(x) exp θ⊤T(x) −A(θ)  where T(x) ∈RD is the D-dimensional sufficient statistics of x, θ ∈RD is the natural parameter, A(θ) is the log partition function, and h(x) modifies the base measure. For a set D = {x1, . . . , xn}, the likelihood function under the exponential family takes a similar form p(D | θ) = (Qn i=1 h(xi)) exp θ⊤s −nA(θ)  , where we define s ≡ n X i=1 T(xi) (5) to be the aggregate sufficient statistics over D. The corresponding conjugate prior is the exponential family distribution with natural parameters (λ1, λ2) ∈RD × R: p(θ | λ1, λ2) = h0(θ) exp λ⊤ 1 θ −λ2A(θ) −A0(λ1, λ2)  . The posterior distribution is p(θ | D, λ1, λ2) = h0(θ) exp (λ1 + s)⊤θ −(λ2 + n)A(θ) −A0(λ1 + s, λ2 + n)  . The posterior has the same form as the prior but with natural parameters (λ1 + s, λ2 + n). Note that the data D enters the posterior only via the aggregate sufficient statistics s and cardinality n. If we further assume that effort(D) can be expressed in n and s, then we can write our optimal teaching problem (2) as min n,s −θ∗⊤(λ1 + s) + A(θ∗)(λ2 + n) + A0(λ1 + s, λ2 + n) + effort(n, s), (6) where n ∈Z≥0 and s ∈{t ∈RD | ∃{xi}i∈I such that t = P i∈I T(xi)}. We relax the problem to n ∈R and s ∈RD, resulting in a lower bound of the original objective.4 Since the log partition function A0() is convex in its parameters, we have a convex optimization problem (6) at hand if we design effort(n, s) to be convex, too. Therefore, the main advantage of using the exponential family distribution and conjugacy is this convex formulation, which we use to efficiently optimize over n and s. This forms the first step in finding D. However, we cannot directly teach with the aggregate sufficient statistics. We first turn n back into an integer by max(0, [n]) where [] denotes rounding.5 We then need to find n teaching examples whose aggregate sufficient statistics is s. The difficulty of this second “unpacking” step depends on the form of the sufficient statistics T(x). For some exponential family distributions unpacking is trivial. For example, the exponential distribution has T(x) = x. Given n and s we can easily unpack the teaching set D = {x1, . . . , xn} by x1 = . . . = xn = s/n. The Poisson distribution has T(x) = x as well, but the items x need to be integers. This is still relatively easy to achieve by rounding x1, . . . , xn and making adjustments to make sure they still sum to s. The univariate Gaussian distribution has T(x) = (x, x2) and unpacking is harder: given n = 3, s = (3, 5) it may not be immediately obvious that we can unpack into {x1 = 0, x2 = 1, x3 = 2} or even {x1 = 1 2, x2 = 5+ √ 13 4 , x3 = 5− √ 13 4 }. Clearly, unpacking is not unique. In this paper, we use an approximate unpacking algorithm. We initialize the n teaching examples by xi iid ∼p(x | θ∗), i = 1 . . . n. 6 We then improve the examples by solving an unconstrained optimization problem to match the examples’ aggregate sufficient statistics to the given s: min x1,...,xn ∥s − n X i=1 T(xi)∥2. (7) 4For higher solution quality we may impose certain convex constraints on s based on the structure of T(x). For example, univariate Gaussian has T(x) = (x, x2). Let s = (s1, s2). It is easy to show that s must satisfy the constraint s2 ≥s2 1/n. 5Better results can be obtained by comparing the objective of (6) under several integers around n and picking the smallest one. 6As we will see later, such iid samples from the target distribution are not great teaching examples for two main reasons: (i) We really should compensate for the learner’s prior by aiming not at the target distribution but overshooting a bit in the opposite direction of the prior. (ii) Randomness in the samples also prevents them from achieving the aggregate sufficient statistics. 5 This problem is non-convex in general but can be solved up to a local minimum. The gradient is ∂ ∂xj = −2 (s −P i T(xi))⊤T ′(xj). Additional post-processing such as enforcing x to be integers is then carried out if necessary. The complete algorithm is summarized in Algorithm 1. Algorithm 1 Approximately optimal teaching for Bayesian learners in the exponential family input target θ∗; learner information T(), A(), A0(), λ1, λ2; effort() Step 1: Solve for aggregate sufficient statistics n, s by convex optimization (6) Step 2: Unpacking: n ←max(0, [n]); find x1, . . . , xn by (7) output D = {x1, . . . , xn} We illustrate Algorithm 1 with several examples. Example 4 (Teaching the mean of a univariate Gaussian). The world consists of a Gaussian N(x; µ∗, σ2) where σ2 is fixed and known to the learner while µ∗is to be taught. In exponential family form p(x | θ) = h(x) exp (θT(x) −A(θ)) with T(x) = x alone (since σ2 is fixed), θ = µ σ2 , A(θ) = µ2 2σ2 = θ2σ2 2 , and h(x) = √ 2πσ −1 exp  −x2 2σ2  . Its conjugate prior (which is the learner’s initial state) is Gaussian with the form p(θ | λ1, λ2) = h0(θ) exp  λ1θ −λ2 θ2σ2 2 −A0(λ)  where A0(λ1, λ2) = λ2 1 2σ2λ2 −1 2 log(σ2λ2). To find a good teaching set D, in step 1 we first find its optimal cardinality n and aggregate sufficient statistics s = P i∈D xi using (6). The optimization problem becomes min n,s −θ∗s + σ2θ∗2 2 n + (λ1 + s)2 2σ2(λ2 + n) −1 2 log(σ2(λ2 + n)) + effort(n, s) (8) where θ∗= µ∗/σ2. The result is more intuitive if we rewrite the conjugate prior in its standard form µ ∼N(µ | µ0, σ2 0) with the relation λ1 = µ0σ2 σ2 0 , λ2 = σ2 σ2 0 . With this notation, the optimal aggregate sufficient statistics is s = σ2 σ2 0 (µ∗−µ0) + µ∗n. (9) Note an interesting fact here: the average of teaching examples s n is not the target µ∗, but should compensate for the learner’s initial belief µ0. This is the “overshoot” discussed earlier. Putting (9) back in (8) the optimization over n is minn −1 2 log σ2  σ2 σ2 0 + n  + effort(n). Consider any differentiable effort function (w.r.t. the relaxed n) with derivative effort′(n), the optimal n is the solution to n− 1 2 effort′(n) + σ2 σ2 0 = 0. For example, with the cardinality effort(n) = cn we have n = 1 2c −σ2 σ2 0 . In step 2 we unpack n and s into D. We discretize n by max(0, [n]). Another interesting fact is that the optimal teaching strategy may be to not teach at all (n = 0). This is the case when the learner has literally a narrow mind to start with: σ2 0 < 2cσ2 (recall σ2 0 is the learner’s prior variance on the mean). Intuitively, the learner is too stubborn to change its prior belief by much, and such minuscule change does not justify the teaching effort. Having picked n, unpacking s is trivial since T(x) = x. For example, we can let D be x1 = . . . = xn = s/n as discussed earlier, without employing optimization (7). Yet another interesting fact is that such an alarming teaching set (with n identical examples) is likely to contradict the world’s model variance σ2, but the discrepancy does not affect teaching because the learner fixes σ2. Example 5 (Teaching a multinomial distribution). The world is a multinomial distribution π∗= (π∗ 1, . . . , π∗ K) of dimension K. The learner starts with a conjugate Dirichlet prior p(π | β) = Γ(P βk) Q Γ(βk) QK k=1 πβk−1 k . Each teaching item is x ∈{1, . . . , K}. The teacher needs to decide the total number of teaching items n and the split s = (s1, . . . , sK) where n = PK k=1 sk. In step 1, the sufficient statistics is s1, . . . , sK−1 but for clarity we write (6) using s and standard parameters: min s −log Γ K X k=1 (βk + sk) ! + K X k=1 log Γ(βk + sk) − K X k=1 (βk + sk −1) log π∗ k + effort(s). (10) 6 This is an integer program; we relax s ∈RK ≥0, making it a continuous optimization problem with nonnegativity constraints. Assuming a differentiable effort(), the optimal aggregate sufficient statistics can be readily solved with the gradient ∂ ∂sk = −ψ PK k=1(βk + sk)  + ψ(βk + sk) −log π∗ k + ∂effort(s) ∂sk , where ψ() is the digamma function. In step 2, unpacking is again trivial: we simply let sk ←[sk] for k = 1 . . . K. Let us look at a concrete problem. Let the teaching target be π∗= ( 1 10, 3 10, 6 10). Let the learner’s prior Dirichlet parameters be quite different: β = (6, 3, 1). If we say that teaching requires no effort by setting effort(s) = 0, then the optimal teaching set D found by Algorithm 1 is s = (317, 965, 1933) as implemented with Matlab fmincon. The MLE from D is (0.099, 0.300, 0.601) and is very close to π∗. In fact, in our experiments, fmincon stopped because it exceeded the default function evaluation limit. Otherwise, the counts would grow even higher with MLE→π∗. This is “brute-force teaching”: using unlimited data to overwhelm the prior in the learner. But if we say teaching is costly by setting effort(s) = 0.3 PK k=1 sk, the optimal D found by Algorithm 1 is instead s = (0, 2, 8) with merely ten items. Note that it did not pick (1, 3, 6) which also has ten items and whose MLE is π∗: this is again to compensate for the biased prior Dir(β) in the learner. Our optimal teaching set (0, 2, 8) has Teaching Impedance TI = 2.65. In contrast, the set (1, 3, 6) has TI = 4.51 and the previous set (317, 965, 1933) has TI = 956.25 due to its size. We can also attempt to sample teaching sets of size ten from multinomial(10, π∗). In 100,000 simulations with such random teaching sets the average TI = 4.97 ± 1.88 (standard deviation), minimum TI = 2.65, and maximum TI = 18.7. In summary, our optimal teaching set (0, 2, 8) is very good. We remark that one can teach complex models using simple ones as building blocks. For instance, with the machinery in Example 5 one can teach the learner a full generative model for a Na¨ıve Bayes classifier. Let the target Na¨ıve Bayes classifier have K classes with class probability p(y = k) = π∗ k. Let v be the vocabulary size. Let the target class conditional probability be p(x = i | y = k) = θ∗ ki for word type i = 1 . . . v and label k = 1 . . . K. Then the aggregate sufficient statistics are n1 . . . nK, m11 . . . m1v, ..., mK1 . . . mKv where nk is the number of documents with label k, and mki is the number of times word i appear in all documents with label k. The optimal choice of these n’s and m’s for teaching can be solved separately as in Example 5 as long as effort() can be separated. The unpacking step is easy: we know we need nk teaching documents with label k. These nk documents together need mki counts of word type i. They can evenly split those counts. In the end, each teaching document with label k will have the bag-of-words  mk1 nk , . . . , mkv nk  , subject to rounding. Example 6 (Teaching a multivariate Gaussian). Now we consider the general case of teaching both the mean and the covariance of a multivariate Gaussian. The world has the target µ∗ ∈ RD and Σ∗ ∈ RD×D. The likelihood is N(x | µ, Σ). The learner starts with a Normal-Inverse-Wishart (NIW) conjugate prior p(µ, Σ | µ0, κ0, ν0, Λ−1 0 ) =  2 ν0D 2 π D(D−1) 4 QD i=1 Γ ν0+1−i 2  |Λ0|−ν0 2  2π κ0  D 2 −1 |Σ|−ν0+D+2 2 exp −1 2tr(Σ−1Λ0) −κ0 2 (µ −µ0)⊤Σ−1(µ −µ0)  . Given data x1, . . . , xn ∈ RD, the aggregate sufficient statistics are s = Pn i=1 xi, S = Pn i=1 xix⊤ i . The posterior is NIW p(µ, Σ | µn, κn, νn, Λ−1 n ) with parameters µn = κ0 κ0+nµ0 + 1 κ0+ns, κn = κ0 + n, νn = ν0 + n, Λn = Λ0 + S + κ0n κ0+nµ0µ⊤ 0 − 2κ0 κ0+nµ0s⊤− 1 κ0+nss⊤. We formulate the optimal aggregate sufficient statistics problem by putting the posterior into (6). Note S by definition needs to be positive semi-definite. In addition, with Cauchy-Schwarz inequality one can show that Sii ≥s2 i /2 for i = 1 . . . n. Step 1 is thus the following SDP: min n,s,S D log 2 2 νn + D X i=1 log Γ νn + 1 −i 2  −νn 2 log |Λn| −D 2 log κn + νn 2 log |Σ∗| +1 2tr(Σ∗−1Λn) + κn 2 (µ∗−µn)⊤Σ∗−1(µ∗−µn) + effort(n, s, S) (11) s.t. S ⪰0; Sii ≥s2 i /2, ∀i. (12) 7 In step 2, we unpack s, S by initializing x1, . . . , xn iid ∼N(µ∗, Σ∗). Again, such iid samples are typically not good teaching examples. We improve them with the optimization (7) where T(x) is the (D + D2)-dim vector formed by the elements of x and xx⊤, and similarly the aggregate sufficient statistics vector s is formed by the elements of s and S. We illustrate the results on a concrete problem in D = 3. The target Gaussian is µ∗= (0, 0, 0) and Σ∗= I. The target mean is visualized in each plot of Figure 2 as a black dot. The learner’s initial state is captured by the NIW with parameters µ0 = (1, 1, 1), κ0 = 1, ν0 = 2 + 10−5, Λ0 = 10−5I. Note the learner’s prior mean µ0 is different than µ∗, and is shown by the red dot in Figure 2. The red dot has a stem extending to the z-axis=0 plane for better visualization. We used an “expensive” effort function effort(n, s, S) = n. Algorithm 1 decides to use n = 4 teaching examples with s = (−1, −1, −1) and S = 4.63 −1 −1 −1 4.63 −1 −1 −1 4.63 ! . These unpack into D = {x1 . . . x4}, visualized by the four empty blue circles. The three panels of Figure 2 show unpacking results starting from different initial seeds sampled from N(µ∗, Σ∗). These teaching examples form a tetrahedron (edges added for clarity). This is sensible: in fact, one can show that the minimum teaching set for a D-dimensional Gaussian is the D + 1 points at the vertices of a D-dimensional tetrahedron. Importantly the mean of D, (−1/4, −1/4, −1/4) shown as the solid blue dot with a stem, is offset from the target µ∗and to the opposite side of the learner’s prior µ0. This again shows that D compensates for the learner’s prior. Our optimal teaching set D has TI = 1.69. In contrast, teaching sets with four iid random samples from the target N(µ∗, Σ∗) have worse TI. In 100,000 simulations such random teaching sets have average TI = 9.06 ± 3.34, minimum TI = 1.99, and maximum TI = 35.51. −1 0 1 −2 0 2 −1 −0.5 0 0.5 1 −1 0 1 −2 0 2 −1 0 1 −1 0 1 −2 0 2 −2 −1.5 −1 −0.5 0 0.5 1 Figure 2: Teaching a multivariate Gaussian 5 Discussions and Conclusion What if the learner anticipates teaching? Then the teaching set may be further reduced. For example, the task in Figure 1 may only require a single teaching example D = {x1 = θ∗}, and the learner can figure out that this x1 encodes the decision boundary. Smart learning behaviors similar to this have been observed in humans by Shafto and Goodman [20]. In fact, this is known as “collusion” in computational teaching theory (see e.g. [10]), and has strong connections to compression in information theory. In one extreme of collusion, the teacher and the learner agree upon an information-theoretical coding scheme beforehand. Then, the teaching set D is not used in a traditional machine learning training set sense, but rather as source coding. For example, x1 itself would be a floating-point encoding of θ∗up to machine precision. In contrast, the present paper assumes that the learner does not collude. We introduced an optimal teaching framework that balances teaching loss and effort. we hope this paper provides a “stepping stone” for follow-up work, such as 0-1 loss() for classification, nonBayesian learners, uncertainty in learner’s state, and teaching materials beyond training items. Acknowledgments We thank Bryan Gibson, Robert Nowak, Stephen Wright, Li Zhang, and the anonymous reviewers for suggestions that improved this paper. This research is supported in part by National Science Foundation grants IIS-0953219 and IIS-0916038. 8 References [1] D. Angluin. Queries revisited. Theor. Comput. Sci., 313(2):175–194, 2004. [2] F. J. Balbach and T. Zeugmann. Teaching randomized learners. In COLT, pages 229–243. Springer, 2006. [3] Y. Bengio, J. Louradour, R. Collobert, and J. Weston. Curriculum learning. In ICML, 2009. [4] B. Biggio, B. Nelson, and P. Laskov. Poisoning attacks against support vector machines. In ICML, 2012. [5] L. D. Brown. Fundamentals of statistical exponential families: with applications in statistical decision theory. Institute of Mathematical Statistics, Hayworth, CA, USA, 1986. [6] M. Cakmak and M. Lopes. Algorithmic and human teaching of sequential decision tasks. In AAAI Conference on Artificial Intelligence, 2012. [7] N. Chater and M. Oaksford. The probabilistic mind: prospects for Bayesian cognitive science. OXFORD University Press, 2008. [8] M. C. Frank and N. D. Goodman. Predicting Pragmatic Reasoning in Language Games. Science, 336(6084):998, May 2012. [9] G. Gigu`ere and B. C. Love. Limits in decision making arise from limits in memory retrieval. Proceedings of the National Academy of Sciences, Apr. 2013. [10] S. Goldman and M. Kearns. On the complexity of teaching. Journal of Computer and Systems Sciences, 50(1):20–31, 1995. [11] S. Hanneke. Teaching dimension and the complexity of active learning. In COLT, page 6681, 2007. [12] T. Heged¨us. Generalized teaching dimensions and the query complexity of learning. In COLT, pages 108–117, 1995. [13] F. Khan, X. Zhu, and B. Mutlu. How do humans teach: On curriculum learning and teaching dimension. In Advances in Neural Information Processing Systems (NIPS) 25. 2011. [14] H. Kobayashi and A. Shinohara. Complexity of teaching by a restricted number of examples. In COLT, pages 293–302, 2009. [15] M. P. Kumar, B. Packer, and D. Koller. Self-paced learning for latent variable models. In NIPS, 2010. [16] Y. J. Lee and K. Grauman. Learning the easy things first: Self-paced visual category discovery. In CVPR, 2011. [17] B. D. McCandliss, J. A. Fiez, A. Protopapas, M. Conway, and J. L. McClelland. Success and failure in teaching the [r]-[l] contrast to Japanese adults: Tests of a Hebbian model of plasticity and stabilization in spoken language perception. Cognitive, Affective, & Behavioral Neuroscience, 2(2):89–108, 2002. [18] H. Pashler and M. C. Mozer. When does fading enhance perceptual category learning? Journal of Experimental Psychology: Learning, Memory, and Cognition, 2013. In press. [19] A. N. Rafferty and T. L. Griffiths. Optimal language learning: The importance of starting representative. 32nd Annual Conference of the Cognitive Science Society, 2010. [20] P. Shafto and N. Goodman. Teaching Games: Statistical Sampling Assumptions for Learning in Pedagogical Situations. In CogSci, pages 1632–1637, 2008. [21] S. Singh, R. L. Lewis, A. G. Barto, and J. Sorg. Intrinsically motivated reinforcement learning: An evolutionary perspective. IEEE Trans. on Auton. Ment. Dev., 2(2):70–82, June 2010. [22] J. B. Tenenbaum and T. L. Griffiths. The rational basis of representativeness. 23rd Annual Conference of the Cognitive Science Society, 2001. [23] J. B. Tenenbaum, T. L. Griffiths, and C. Kemp. Theory-based Bayesian models of inductive learning and reasoning. Trends in Cognitive Sciences, 10(7):309–318, 2006. [24] F. Xu and J. B. Tenenbaum. Word learning as Bayesian inference. Psychological review, 114(2), 2007. [25] S. Zilles, S. Lange, R. Holte, and M. Zinkevich. Models of cooperative teaching and learning. Journal of Machine Learning Research, 12:349–384, 2011. 9
2013
229
4,964
Learning to Pass Expectation Propagation Messages Nicolas Heess∗ Gatsby Unit, UCL Daniel Tarlow Microsoft Research John Winn Microsoft Research Abstract Expectation Propagation (EP) is a popular approximate posterior inference algorithm that often provides a fast and accurate alternative to sampling-based methods. However, while the EP framework in theory allows for complex nonGaussian factors, there is still a significant practical barrier to using them within EP, because doing so requires the implementation of message update operators, which can be difficult and require hand-crafted approximations. In this work, we study the question of whether it is possible to automatically derive fast and accurate EP updates by learning a discriminative model (e.g., a neural network or random forest) to map EP message inputs to EP message outputs. We address the practical concerns that arise in the process, and we provide empirical analysis on several challenging and diverse factors, indicating that there is a space of factors where this approach appears promising. 1 Introduction Model-based machine learning and probabilistic programming offer the promise of a world where a probabilistic model can be specified independently of the inference routine that will operate on the model. The vision is to automatically perform fast and accurate approximate inference to compute a range of quantities of interest (e.g., marginal probabilities of query variables). Approaches to the general inference challenge can roughly be divided into two categories. We refer to the first category as the “uninformed” case, which is exemplified by e.g. Church [4], where the modeler has great freedom in the model specification. The cost of this flexibility is that inference routines have a more superficial understanding of the model structure, being unaware of symmetries and other idiosyncrasies of its components, which makes the already challenging inference task even harder. The second category is what we refer to as the “informed” case, which is exemplified by (e.g. BUGS[14], Stan[12], Infer.NET[8]). Here, models must be constructed out of a toolbox of building blocks, and a building block can only be used if a set of associated computational operations have been implemented by the toolbox designers. This gives inference routines a deeper understanding of the structure of the model and can lead to significantly faster inference, but the tradeoff is that efficient and accurate implementation of the building blocks can be a significant challenge. For example, EP message update operations, which are used by Infer.NET, often require the computation of integrals that do not have analytic expressions, so methods must be devised that are robust, accurate and efficient, which is generally quite nontrivial. In this work, we aim to bridge the gap between the informed and the uninformed cases and achieve the best of both worlds by automatically implementing the computational operations required for the informed case from a specification such as would be given in the uninformed case. We train high-capacity discriminative models that learn to map EP message inputs to EP message outputs for each message operation needed for EP inference. Importantly, the training is done so that the learned modules implement the same EP communication protocol as hand-crafted modules, so after the training phase is complete, we get a factor that behaves like a fast hand-crafted approximation that exploits factor structure, but which was generated using only the specification that would be ∗The majority of this work was done while NH was visiting Microsoft Research, Cambridge. 1 given in the uninformed case. Models may then be constructed from any combination of these learned modules and previously implemented modules. 2 Background and Notation 2.1 Factor graphs, directed graphical models, and probabilistic programming As is common for message passing algorithms, we assume that models of interest are represented as factor graphs: the joint distribution over a set of random variables x = {x1, . . . , xD} is specified in terms of non-negative factors ψ1, . . . , ψJ, which capture the relation between variables, and it decomposes as p(x) = 1/Z !J j=1 ψj(xψj). Here xψj is used to mean the set of variables that factor ψj is defined over and whose index set we will denote by Scope(ψj). We further use xψj−i to mean the set of variables xψj excluding xi. The set x may have a mix of discrete and continuous random variables and factors can operate over variables of mixed types. We are interested in computing marginal probabilities pi(xi) = " p(x)dx−i, where x−i is all variables except for i, and where integrals should be replaced by sums when the variable being integrated out is discrete. Note that this formulation allows for conditioning on variables by attaching factors with no inputs to variables which constrain the variable to be equal to a particular value, but we suppress this detail for simplicity of presentation. Although our approach can be extended to factors of arbitrary form, for the purpose of this paper we will focus on directed factors, i.e. factors of the form ψj(xout(j) | xin(j)) which directly specify the (conditional) distribution (or density) over xout(j) as a function of the vector of inputs xin(j) (here xψj is the set of variables {xout(j)} ∪xin(j)). In a (unconditioned) directed graphical model all factors will have this form, and we allow xin(j) to be empty, for example, to allow for prior distributions over the variables. Probabilistic programming is an umbrella term for the specification of probabilistic models via a programming-like syntax. In its most general form, an arbitrary program is specified, which can include calls to a random number generator (e.g. [4]). This can be related to the factor graph notation by introducing forward-sampling functions f1, . . . , fJ. If we associate each directed factor ψj(xout(j) | xin(j)) with a stochastic forward-sample function fj mapping xin(j) to xout(j) and then define the probabilistic program as the sequential sampling of xout(j) = fj(xin(j)) following a topographical ordering of the variables, then there is a clear association between directed graphical models and forward-sampling procedures. Specifically, fj is a stochastic function that draws a sample from ψj(xout(j) | xin(j)). The key difference is that the factor graph specification usually assumes that an analytic expression will be given to define ψj(xout(j) | xin(j)), while the forward-sampling formulation allows for fj to execute an arbitrary piece of computer code. The extra flexibility afforded by the forward-sampling formulation has led to the popularity of methods like Approximate Bayesian Computation (ABC) [11], although the cost of this flexibility is that inference becomes less informed. 2.2 Expectation Propagation Expectation Propagation (EP) is a message passing algorithm that is a generalization of sum-product belief propagation. It can be used for approximate marginal inference in models that have a mixed set of types. EP has been used successfully in a number of large-scale applications [5, 13], can be used with a wide range of factors and can support some programming language constructs like for loops and if statements [7]. For a detailed review of EP, we recommend [6]. For the purposes of this paper there are two important aspects of EP. First, we use the common variant where the posterior is approximated as a fully factorized distribution (except for some homogeneous variables which we treat as a single vector-valued variable) and each variable then has an associated type, type(x), which determines the distribution family used in its approximation. The second aspect is the form of the message from a factor ψ to a variable i. It is defined as follows: mψi(xi) = proj #" ψ(xout | xin) $! i′∈Scope(ψ) mi′ψ(xi′) % dxψ−i & miψ(xi). (1) The update has an intuitive form. The proj operator ensures that the message being passed is a distribution of type type(xi) – it only has an effect if its argument is outside the approximating family used for the target message. If the projection operation (proj [·]) is ignored, then the miψ(xi) 2 term in the denominator cancels with the corresponding term in the numerator, and standard belief propagation updates are recovered. The projection is implemented as finding the distribution q in the approximating family that minimizes the KL-divergence between the argument and q: proj [p] = argminq KL(p||q), where q is constrained to be a distribution of type(xi). Multiplying the reverse message miψ(xi) into the numerator before performing the projection effectively defines a “context”, which can be seen as reweighting the approximation to the standard BP update, placing more importance in the region where other parts of the model have placed high probability mass. 3 Formulation We now present the method that is the focus of this paper. The goal is to allow a user to specify a factor to be used in EP solely via specifying a forward sampling procedure; that is, we assume that the user provides an executable stochastic function f(xin), which, given xin returns a sample of xout. The user further specifies the families of distributions with which to represent the messages associated with the variables of the factor (e.g. Discrete, Gamma, Gaussian, Beta). Below we show how to learn fast EP message operators so that the new factor can be used alongside existing factors in a variety of models. Computing Targets with Importance Sampling Our goal is to compute EP messages from the factor ψ that is associated with f, as if we had access to an analytic expression for ψ(xout | xin). The only way a factor interacts with the rest of the model is via the incoming and outgoing messages, so we can focus on this mapping and the resulting operator can be used in any model. Given incoming messages {miψ(xi)}i∈Scope(ψ), the simplest approach to computing mψi(xi) is to use importance sampling. A proposal distribution q(xin) is specified, and then the approach is based on the fact that ' ψ(xout | xin)   * i′∈Scope(ψ) mi′ψ(xi′)  dxψ = Er -! i′∈Scope(ψ) mi′ψ(xi′) q(xin) . , (2) where r(x) = q(xin)ψ(xout | xin) can be sampled from by first drawing values of xin from q, then passing those values through the forward-sampling procedure f to get a value for xout. To use this procedure for computing messages mψi(xi), we use importance sampling with proposal distribution r. Roughly, samples are drawn from r and weighted by Q i′∈Scope(ψ) mi′ψ(xi′) q(xin) , then all variables other than xi are summed out to yield a mixture of point mass distributions over xi. The proj [·] operator is then applied to this distribution. Note that a simple choice for q(xin) is ! i′∈in mi′ψ(xi′), in which case the weighting term simplifies to just be moutψ(xout). Despite its simplicity, however, we found this choice to often be suboptimal. We elaborate on this issue and give concrete suggestions for improving over the naive approach in the experiments section. Algorithm 1 Generate training data 1: Input: ψ, i, specifying we are learning to send message mψi(xi). 2: Input: Dm training distribution over messages {mi′ψ(xi′)}i′∈Scope(ψ) 3: Input: q(xin) importance sampling distribution 4: for n = 1 : N do 5: Draw mn 0 (x0), . . . , mn D(xD) ∼Dm 6: for k = 1 : K do 7: Draw xnk in ∼q(xnk in ) then compute xnk out = f(xnk in ) 8: Compute importance weight wnk = Q i′∈Scope(ψ) mn i′ψ(xnk i′ ) q(xnk in ) . 9: end for 10: Compute ˆµn(xi) = proj h P k wnkδ(xi) P k wnk i 11: Add pair (⟨mn 0 (x0), . . . , mn D(xD)⟩, ˆµn(xi)) to training set. 12: end for 13: Return training set. Generation of Training Data For a given set of incoming messages {miψ(xi)}i∈Scope(ψ), we can produce a target outgoing message using the technique from the previous section. To train a model to automatically compute these messages, we need many example incoming and target outgoing message pairs. We can generate such a data set by drawing sets of incoming messages from some specified distribution, then computing the target outgoing message as above. Learning Given the training data, we learn a neural network model that takes as input the sufficient statistics defining mn = / mn i′ψ(xi′) 0 i′∈Scope(ψ) and outputs sufficient statistics defining 3 the approximation g(mn) to target ˆµn(xi). For each output message that the factor needs to send, we train a separate network. The error measure that we optimize is the average KL divergence 1 N 1N n=1 KL(ˆµn||g(mn)). We differentiate this objective analytically for the appropriate output distribution type and compute gradients via back-propagation. Choice of Decomposition Structure So far, we have shown how to incorporate factors into a model when the definition of the factor is via the forward-sample procedure f rather than as an analytic expression ψ. When specifying a model, there is some flexibility in how this capability is used. The natural use case is when a model can mostly be expressed using factors that have analytic expressions and corresponding hand-constructed operator implementations, but when a few of the interactions that we would like to use are more easily specified in terms of a forward-sampling procedure or would be difficult to implement hand-crafted approximations for. There is an alternative use-case, which is that even if we have analytic expressions and hand-crafted implementations for all the factors that we wish to use in a model, it might be that the approximations which arise due to the nature of message passing (that is, passing messages that factorize fully over variables) leads to a poor approximation in some block of the model. In this case, it may be desirable to collapse the problematic block of several factors into a single factor, then to use the approach we present here. If the new collapsed factor is sufficiently structured in a statistical sense, then this may lead to improved accuracy. In this view, the goal should be to find groups of modeling components that go together logically, which are reusable, and which define interactions that have input-output structure that is amenable to the learned approximation strategy. 4 Related Work Perhaps the most superficially similar line of work to the approach we present here is that of inference machines and truncated belief propagation [2, 3, 10, 9], where inference is done via an algorithm that is structurally similar to belief propagation, but where some parameters of the updates are learned. The fundamental difference between those approaches and ours is how the learning is performed. In inference machine training, learning is done jointly over parameters for all updates that will be used in the model. This means that the process of learning couples together all factors in the model; if part of the model changes, the parameters of the updates must be re-learned. A key property of our approach is that a factor may be learned once, then used in a variety of different models without need for re-training. The most closely related work is ABC-EP [1]. This approach employs a very similar importance sampling strategy but performs inference simply by sending the messages that we use as training data. The advantage is that no function approximator needs to be chosen, and if enough samples are drawn for each message update, the accuracy should be good. There is also no up-front cost of learning as in our case. The downside is that generation and weighting of a sufficient number of samples can be very expensive, and it is usually not practical to generate enough samples every time a message needs to be sent. Our formulation allows for a very large number of samples to be generated once as an up-front cost then, as long as the learning is done effectively, each message computation is much faster while still effectively drawing on a large number of samples. Our approach also opens up the possibility of using more accurate but slower methods to generate the training samples, which we believe will be important as we look ahead to applying the method to even more complex factors. Empirically we have found that using importance sampling but reducing the number of samples so as to make runtime computation times close to our method can lead to unreliable inference. Finally, at a high level, our goal in this work is to start from an informed general inference scheme and to extend the range of model specifications that can be used within the framework. There is work that aims for a similar goal but comes from the opposite direction of starting with a general specification language and aiming to build more informed inference routines. For example, [15] attempts to infer basic interaction structure from general probabilistic program specifications. Also of note is [16], which applies mean field-like variational inference to general program specifications. We believe both these directions and the direction we explore here to be promising and worth exploring. 5 Experimental Analyses We now turn our attention to experimental evaluation. The primary question of interest is whether given f it is feasible to learn the mapping from EP message inputs to outputs in such a way that the learned factors can be used within nontrivial models. This obviously depends on the specifics of f and the model in which the learned factor is used. We attempt to explore these issues thoroughly. 4 Choice of Factors We made specific choices about which functions f to apply our framework to. First, we wanted a simple factor to prove the concept and give an indication of the performance that we might expect. For this, we chose the sigmoid factor, which deterministically computes xout = f(xin) = 1 1+exp(−xin). For this factor, sensible choices for the messages to xout and xin are Beta and Gaussian distributions respectively. Second, we wanted factors that stressed the framework in different ways. For the first of these, we chose a compound Gamma factor, which is sampled by first drawing a random Gamma variable r2 with rate r1 and shape s1, then drawing another random Gamma variable xout with rate r2 and shape s2. This defines xout = f(r1, s1, s2), which is a challenging factor because depending on the choice of inputs, this can produce a very heavy tailed distribution over xout. Another challenging factor we experiment with is the product factor, which uses xout = f(xin,1, xin,2) = xin,1 × xin,2. While this is a conceptually simple function, it is highly challenging to use within EP for several reasons, including symmetries due to signs, and the fact that message outputs can change very quickly as functions of message inputs (see Fig. 3). One main reason for the above factor choices is that there are existing hand-crafted implementations in Infer.NET, which we can use to evaluate our learned message operators. It would have been straightforward to experiment with more example factors that could not be implemented with existing hand-crafted factors, but it would have been much harder to evaluate our proposed method. Finally, we developed a factor that models the throwing of a ball, which is representative of the type of factors that we believe our framework to be well-suited for, and which is not easily implemented with hand-crafted approximations. For all factors, we use the extensible factor interface in Infer.NET to create factors that compute messages by running a forward pass of the learned neural network. We then studied these factors in a variety of models, using the default Infer.NET settings for all other implementation details, e.g. message schedules and other factor implementations. Additional details of the models used in the experiments can be found in the supplemental material. Sigmoid Factor For the sigmoid factor, we ran two main sets of experiments. First, we learned a factor using the methodology described in Section 3 and evaluated how well the network was able to reconstruct the training data. In Fig. 1 we show histograms of KL errors for the network trained to send forward messages (Fig. 1a) and the network trained to send backwards messages (Fig. 1b). To aid the interpretation of these results, we also show the best, median, and worst approximations for each. There are a small number of moderate-sized errors, but average performance is very good. We then used the learned factor within a Bayesian logistic regression model where the output nonlinearity is implemented using either the default Infer.NET sigmoid factor or our learned sigmoid factor. The number of training points is given in the table. There were always 2000 data points for testing. Data points for training and testing were generated according to p(y = 1|x) = sigmoid(wT x). Entries of x were drawn from N(0, 1). Entries of w were drawn from N(0, 1) for all relevant dimensions, and the others were set to 0. Results are shown in Table 1, which appears in the Supplementary materials. Predictive performance is very similar across the board, and although there are moderately large KL divergences between the learned posteriors in some cases, when we compared the distance between the true generating weights and the learned posteriors means for the EP and NN case, we found them to be similar.                                                                       (a) Backward Message (to Gaussian) (b) Forward Message (to Beta) Figure 1: Sigmoid factor: Histogram of training KL divergences between target and predicted distributions for the two messages outgoing from the learned sigmoid factor (left: backward message; right: forward message). Also illustrated are best(1), median (2,3), and worst (4) examples. The red curve is the density of the target message, and the green is of the predicted message. In the inset are message parameters (left: Gaussian mean and precision; right: Beta α and β) for the true (top line) and predicted (middle line) message, along with the KL (bottom line). 5 Compound Gamma Factor The compound Gamma factor is useful as a heavy-tailed prior over precisions of Gaussian random variables. Accordingly, we evaluate performance in the context of models where the factor provides a prior precision for learning a Gaussian or mixture of Gaussians model. As before, we trained a network using the methodology from Section 3. For this factor, we fixed the value of the inputs xin, which is a standard way that the compound Gamma construction is used as a prior. We experimented with values of (3, 3, 1) and (1, 1, 1) for the inputs. In both cases, these settings induce a heavy-tailed distribution over the precision. We begin by evaluating the importance sampler. We first evaluate the naive choice for proposal distribution q as described in Section 3. As can be seen in the bottom left plot of Fig. 2, there is a relatively large region of possible input-message space (white region) where almost no samples are drawn, and thus the importance sampling estimates will be unreliable. Here shapein and ratein denote the parameters of the message being sent from the precision variable to the compound Gamma factor. By instead using a mixture distribution over q, which has one component equivalent to the naive sampler and one broader component, we achieve the result in the top left of Fig. 2, which has better coverage of the space of possible messages. The plots in the second column show the importance sampling estimates of factor-to-variable messages (one plot per message parameter) as a function of the variable-to-factor message coming from the precision variable, which are unreliable in the regions that would be expected based on the previous plot. The third column shows the same function but for the learned neural network model. Surprisingly, we see that the neural network has smoothed out some of the noise of the importance sampler, and that it has extrapolated in a smooth, reasonable manner. Overlaid on these plots are the message values that were actually encountered when running the experiments in Fig. 8, which are described next. messages expt. 1 shapein messages expt. 1 shapein 10 !4 10 !2 10 0 10 2 10 4 10 !4 10 !2 10 0 10 2 10 4 ! (default) ! (learned) CG111, 20 CG111, 100 CG331, 20 CG331, 100 Figure 2: Compound Gamma plots. First column: Log sum of importance weights arising from improved importance sampler (top) and naive sampler (bottom) as a function of the incoming context message. Second column: Improved importance sampler estimate of outgoing message shape parameter (top) and rate parameter (bottom) as a function of the incoming context message. We show the sufficient statistics of the numerator of eq. 1. Third column: Learned neural network estimates for the same messages. Parameters of the variable-to-factor messages encountered when running the experiments in Fig. 8 are super-imposed as black dots. Rightmost plot: Precisions learned for mixture of Gaussians model with “learned” / standard Infer.NET (“default”) factor for 20 and 100 datapoints respectively and true precisions: λ1 = 0.01; λ2 = 1000. Best viewed in color. In the next experiments, we generate data from Gaussians with a wide range of variances, and we evaluate how well we are able to learn the precision as a function of the number of data points (xaxis). We compare to the same construction but using two hand-crafted Gamma factors to implement the compound Gamma prior. The plots in Fig. 8 in the supplementary material show the means of the learned precisions for two choices of compound Gamma parameters (top is (3, 3, 1), bottom is (1, 1, 1)). Even though some messages were passed in regions with little representation under the importance sampling, the factor was still able to perform reliably. We next evaluate performance of the compound Gamma factors when learning a mixture of Gaussians. We generated data from a mixture of two Gaussians with fixed means but widely different variances, using the compound Gamma prior on the precisions of both Gaussians in the mixture. Results are shown in the right-most plot of Fig. 2. We see that both factors sometimes under-estimate the true variance, but the learned factor is equally as reliable as the hand-crafted version. We also observed in these experiments that the learned factor was an order of magnitude faster than the built-in factor (total runtime was 11s for the learned factor vs. 110s for the standard Infer.NET construction). 6 !!"# ! !"# $ !"%#& !"!'! !!"# ! !"# $ !"(#% !"!!& !!"# ! !"# $ %"'&) !"!!% !!"# ! !"# $ !"(#* !"!!( !!"# ! !"# $ !"%*+ !"!!! !!"# ! !"# $ !"('% !"!%( !!"# ! !"# $ %"#!* !"!!% !!"# ! !"# $ !"%&# !"!!! !"# % %"# ! !"!%! !"!!# !"# % %"# ! %"'!) !"!!& !"# % %"# ! !"!!' !"!!+ !"# % %"# ! !"!&( !"!!% !"# % %"# ! !"!&( !"!!# !"# % %"# ! !"!!( !"!!& !"# % %"# ! !"&'% !"!!' !"# % %"# ! !"!!+ !"!!* Figure 4: Learned posteriors from the multiplicative noise regression model. We compare the builtin factor’s result (green) to our learned factor (red) and an importance sampler that is given the same runtime budget as the learned model (black). Top row: Representative posteriors over weights w. Bottom row: Representative posteriors over ηn variables. Inset gives KL between built-in factor and learned factor (red) and IS factor (black). Product Factor The product factor is a surprisingly difficult factor to work with. To illustrate some of the difficulty, we provide plots of output message parameters along slices in input message space (Fig. 3). In our first experiment with the product factor, we build a Bayesian linear regression model with multiplicative output noise. Given a vector of inputs xn, we take an inner product of xn with multivariate Gaussian variables w, then for each instance n multiply the result by a random noise variable ηn that is drawn from a Gaussian with mean 1 and standard deviation 0.1. Additive noise is then added to the output to produce a noisy observation yn. The goal is to infer w and η values given x’s and y’s. We compare using the default Infer.NET product factor to using our learned product factor for the multiplication of η and the output of the inner products. Results are shown in Fig. 4, where we also compare to importance sampling, which was given a runtime budget similar to that of the neural network. µy !x=1;!y=1;µz=5;!z=1 !10 0 10 !x=0.1;!y=0.1;µz=5;!z=0.1 !10 0 10 µx µy !10 0 10 µx !10 0 10 !2 0 2 senator index ideal point regular SHG NN Figure 3: Message surfaces and failure case plot for the product factor (computing z = xy). Left: Mean of the factor to z message as a function of the mean-parameters of the incoming messages from x and y. Top row shows ground truth, the bottom row shows the learned NN approximation. Right: Posterior over the ideal-point variables for all senators (inferred std.-dev. is shown as error bars). Senators are ordered according to ideal-points means inferred with factor [13] (SHG). Red/blue dots indicate true party affiliation. In the second experiment with the product factor, we implemented an ideal point model, which is essentially a 1 latent-dimensional binary matrix-factorization model, using our learned product factor for the multiplications. This is the most challenging model we have considered yet, because (a) EP is known to be unreliable in matrix factorization models [13], and (b) there is an additional level of approximation due to the loopiness of the graph, which pushes the factor into more extreme ranges, which it might not have been trained as reliably for and/or where importance sampling estimates used for generating training data are unreliable. We ran the model on a subset of US senate vote records from the 112th congress.1 We evaluated the model based on how well the learned factor version recovered the posteriors over senator latent factors that were found by the built-in product factor and the approximate product factor of [13]. The result of this experiment was that midway through inference, the learned factor version produced posteriors with means that were consistent with the built-in factors, although the variances were slightly larger, and the means were noisier. After this, we observed gradual degradation of the estimates for a subset of about 5-10% of the senators. By the end of inference, results had degraded significantly. Investigating the cause of this result, we found that a large number of zero-precision messages were being sent, which happens when the projected distribution has larger variance than 1Data obtained from http://www.govtrack.us/ 7 the context message. We believe that the cause of this is that as the messages in this model begin to converge, the messages being passed take on a distribution that is difficult to approximate (leading the neural network to underfit), that is different from the training distribution, or is in a regime where importance sampling estimates are noisy. In these cases, our KL-objective factors are overestimating the variance. In some cases, these errors can propagate and lead to complete failure of inference, and we have observed this in our experiments. This leads to perhaps an obvious point, which is that our approach will fail when messages required by inference are significantly different from those that were in the training distribution. This can happen via the choice of too extreme priors, too many observations driving precisions to be extreme, and due to complicated effects arising from the dynamics of message passing on loopy graphs. We will discuss some possibly mitigating strategies in Section 6. Throwing a Ball Factor With this factor, we model the distance that a ball travels as a function of the angle, velocity, and initial height that it was thrown from. While this is also a relatively simple interaction conceptually, it would be highly challenging to implement it as a hand-crafted factor. In our framework, it suffices to provide a function f that, given the angle, velocity, and initial height, computes and returns the distance that the ball travels. We do so by constructing and solving the appropriate quadratic equation. Note that this requires multiplication and trigonometric functions. 0 10 30 50 0 0.1 0.2 person #1 0 10 30 50 0 0.1 0.2 person #2 0 10 30 50 0 0.1 0.2 velocity person #4 0 10 30 50 0 0.1 0.2 person #5 0 10 30 50 0 0.1 0.2 person #7 Figure 5: Throwing a ball factor experiments. True distributions over individual throwing velocities (black) and predictive distribution based on the learned posterior over velocity rates. We learn the factor as before and evaluate it in the context of two models. In the first model, we have person-specific distributions over height (Gaussian), log slope (Gaussian) and the rate parameter (Gamma) of a Gamma distribution that determines velocity. We then observe several samples (generated from the model) of noisy distances that the ball traveled for each person. We then use our learned factor to infer posteriors over the personspecific parameters. The inferred posteriors for several representative people are shown in Fig. 5. Second, we extended the above model to have the person-specific rate parameter be produced by a linear regression model (with exponential link function) with observed person-specific features and unknown weights. We again generated data from the model, observed several sample throws per person, and inferred the regression weights. We found that we were able to recover the generating weights with reasonable accuracy, although the posterior was a bit overconfident: true (−.5, .5, 3) vs. posterior mean (−.43, .55, 3.1) and standard deviations (.04, .03, .02). 6 Discussion We have shown that it is possible to learn to pass EP messages in several challenging cases. The techniques that we use build upon a number of tools well-known in the field, but the combination in this application is novel, and we believe it to have great practical potential. Although we have established viability of the idea, in its current form it works better for some factors than others. Its success depends on (a) the ability of the function approximator to represent the required message updates (which may be highly discontinuous) and (b) the availability of reliable samples of these mappings (some factors may be very hard to invert). Here, we expect that great improvements can be made taking advantage of recent progress in uninformed sampling, and high capacity regression models. We tested factors with multiple models and/or datasets but this does not mean that they will work with all models, hyper-parameter settings, or datasets (we found varying degrees of robustness to such variations). A critical ingredient is here an appropriate choice of the distribution of training messages which, at the current stage, can require some manual tuning and experimentation. This leads to an interesting extension, which would be to maintain an estimate of the quality of the approximation over the domain of the factor, and to re-train the factor on the fly when a message is encountered that lies in a low-confidence region. A second direction for future study, which is enabled by our work, is to add additional constraints during learning in order to guarantee that updates have certain desirable properties. For example, we may be able to ask the network to learn the best message updates subject to a constraint that guarantees convergence. Acknowledgements: NH acknowledges funding from the European Community’s Seventh Framework Programme (FP7/2007-2013) under grant agreement no. 270327, and from the Gatsby Charitable foundation. 8 References [1] S. Barthelm´e and N. Chopin. ABC-EP: Expectation Propagation for likelihood-free Bayesian computation. In Proceedings of the 28th International Conference on Machine Learning, 2011. [2] J. Domke. Parameter learning with truncated message-passing. In Computer Vision and Pattern Recognition (CVPR). IEEE, 2011. [3] J. Domke. Learning graphical model parameters with approximate marginal inference. Pattern Analysis and Machine Intelligence (PAMI), 2013. [4] N.D. Goodman, V.K. Mansinghka, D.M. Roy, K. Bonawitz, and J.B. Tenenbaum. Church: A language for generative models. In Proc. of Uncertainty in Artificial Intelligence (UAI), 2008. [5] R. Herbrich, T.P. Minka, and T. Graepel. Trueskill: A Bayesian skill rating system. Advances in Neural Information Processing Systems, 19:569, 2007. [6] T.P. Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, Massachusetts Institute of Technology, 2001. [7] T.P. Minka and J. Winn. Gates: A graphical notation for mixture models. In Advances in Neural Information Processing Systems, 2008. [8] T.P. Minka, J.M. Winn, J.P. Guiver, and D.A. Knowles. Infer.NET 2.5, 2012. Microsoft Research. http://research.microsoft.com/infernet. [9] P. Kohli R. Shapovalov, D. Vetrov. Spatial inference machines. In Computer Vision and Pattern Recognition (CVPR). IEEE, 2013. [10] S. Ross, D. Munoz, M. Hebert, and J.A. Bagnell. Learning message-passing inference machines for structured prediction. In Computer Vision and Pattern Recognition (CVPR). IEEE, 2011. [11] D.B. Rubin. Bayesianly justifiable and relevant frequency calculations for the applies statistician. The Annals of Statistics, pages 1151–1172, 1984. [12] Stan Development Team. Stan: A C++ library for probability and sampling, version 1.3, 2013. [13] D.H. Stern, R. Herbrich, and T. Graepel. Matchbox: Large scale online Bayesian recommendations. In Proceedings of the 18th international conference on World Wide Web, pages 111–120. ACM, 2009. [14] A. Thomas. BUGS: A statistical modelling package. RTA/BCS Modular Languages Newsletter, 1994. [15] D. Wingate, N.D. Goodman, A. Stuhlmueller, and J. Siskind. Nonstandard interpretations of probabilistic programs for efficient inference. In Advances in Neural Information Processing Systems, 2011. [16] D. Wingate and T. Weber. Automated variational inference in probabilistic programming. In arXiv:1301.1299, 2013. 9
2013
23
4,965
Online Learning with Switching Costs and Other Adaptive Adversaries Nicol`o Cesa-Bianchi Universit`a degli Studi di Milano Italy Ofer Dekel Microsoft Research USA Ohad Shamir Microsoft Research and the Weizmann Institute Abstract We study the power of different types of adaptive (nonoblivious) adversaries in the setting of prediction with expert advice, under both full-information and bandit feedback. We measure the player’s performance using a new notion of regret, also known as policy regret, which better captures the adversary’s adaptiveness to the player’s behavior. In a setting where losses are allowed to drift, we characterize —in a nearly complete manner— the power of adaptive adversaries with bounded memories and switching costs. In particular, we show that with switching costs, the attainable rate with bandit feedback is Θ(T 2/3). Interestingly, this rate is significantly worse than the Θ( √ T) rate attainable with switching costs in the full-information case. Via a novel reduction from experts to bandits, we also show that a bounded memory adversary can force Θ(T 2/3) regret even in the full information case, proving that switching costs are easier to control than bounded memory adversaries. Our lower bounds rely on a new stochastic adversary strategy that generates loss processes with strong dependencies. 1 Introduction An important instance of the framework of prediction with expert advice —see, e.g., [8]— is defined as the following repeated game, between a randomized player with a finite and fixed set of available actions and an adversary. At the beginning of each round of the game, the adversary assigns a loss to each action. Next, the player defines a probability distribution over the actions, draws an action from this distribution, and suffers the loss associated with that action. The player’s goal is to accumulate loss at the smallest possible rate, as the game progresses. Two versions of this game are typically considered: in the full-information feedback version, at the end of each round, the player observes the adversary’s assignment of loss values to each action. In the bandit feedback version, the player only observes the loss associated with his chosen action, but not the loss values of other actions. We assume that the adversary is adaptive (also called nonoblivious by [8] or reactive by [16]), which means that the adversary chooses the loss values on round t based on the player’s actions on rounds 1 . . . t −1. We also assume that the adversary is deterministic and has unlimited computational power. These assumptions imply that the adversary can specify his entire strategy before the game begins. In other words, the adversary can perform all of the calculations needed to specify, in advance, how he plans to react on each round to any sequence of actions chosen by the player. More formally, let A denote the finite set of actions and let Xt denote the player’s random action on round t. We adopt the notation X1:t as shorthand for the sequence X1 . . . Xt. We assume that the adversary defines, in advance, a sequence of history-dependent loss functions f1, f2, . . .. The input to each loss function ft is the entire history of the player’s actions so far, therefore the player’s loss on round t is ft(X1:t). Note that the player doesn’t observe the functions ft, only the losses that result from his past actions. Specifically, in the bandit feedback model, the player observes ft(X1:t) on round t, whereas in the full-information model, the player observes ft(X1:t−1, x) for all x ∈A. 1 On any round T, we evaluate the player’s performance so far using the notion of regret, which compares his cumulative loss on the first T rounds to the cumulative loss of the best fixed action in hindsight. Formally, the player’s regret on round T is defined as RT = T  t=1 ft(X1:t) −min x∈A T  t=1 ft(x . . . x) . (1) RT is a random variable, as it depends on the randomized action sequence X1:t. Therefore, we also consider the expected regret E[RT ]. This definition is the same as the one used in [18] and [3] (in the latter, it is called policy regret), but differs from the more common definition of expected regret E  T  t=1 ft(X1:t) −min x∈A T  t=1 ft(X1:t−1, x)  . (2) The definition in Eq. (2) is more common in the literature (e.g., [4, 17, 10, 16]), but is clearly inadequate for measuring a player’s performance against an adaptive adversary. Indeed, if the adversary is adaptive, the quantity ft(X1:t−1, x)is hardly interpretable —see [3] for a more detailed discussion. In general, we seek algorithms for which E[RT ] can be bounded by a sublinear function of T, implying that the per-round expected regret, E[RT ]/T, tends to zero. Unfortunately, [3] shows that arbitrary adaptive adversaries can easily force the regret to grow linearly. Thus, we need to focus on (reasonably) weaker adversaries, which have constraints on the loss functions they can generate. The weakest adversary we discuss is the oblivious adversary, which determines the loss on round t based only on the current action Xt. In other words, this adversary is oblivious to the player’s past actions. Formally, the oblivious adversary is constrained to choose a sequence of loss functions that satisfies ∀t, ∀x1:t ∈At, and ∀x 1:t−1 ∈At−1, ft(x1:t) = ft(x 1:t−1, xt) . (3) The majority of previous work in online learning focuses on oblivious adversaries. When dealing with oblivious adversaries, we denote the loss function by t and omit the first t−1 arguments. With this notation, the loss at time t is simply written as t(Xt). For example, imagine an investor that invests in a single stock at a time. On each trading day he invests in one stock and suffers losses accordingly. In this example, the investor is the player and the stock market is the adversary. If the investment amount is small, the investor’s actions will have no measurable effect on the market, so the market is oblivious to the investor’s actions. Also note that this example relates to the full-information feedback version of the game, as the investor can see the performance of each stock at the end of each trading day. A stronger adversary is the oblivious adversary with switching costs. This adversary is similar to the oblivious adversary defined above, but charges the player an additional switching cost of 1 whenever Xt = Xt−1. More formally, this adversary defines his sequence of loss functions in two steps: first he chooses an oblivious sequence of loss functions, 1, 2 . . ., which satisfies the constraint in Eq. (3). Then, he sets f1(x) = 1(x), and ∀t ≥2, ft(x1:t) = t(xt) + I{xt=xt−1} . (4) This is a very natural setting. For example, let us consider again the single-stock investor, but now assume that each trade has a fixed commission cost. If the investor keeps his position in a stock for multiple trading days, he is exempt from any additional fees, but when he sells one stock and buys another, he incurs a fixed commission. More generally, this setting (or simple generalizations of it) allows us to capture any situation where choosing a different action involves a costly change of state. In the paper, we will also discuss a special case of this adversary, where the loss function t(x) for each action is sampled i.i.d. from a fixed distribution. The switching costs adversary defines ft to be a function of Xt and Xt−1, and is therefore a special case of a more general adversary called an adaptive adversary with a memory of 1. This adversary is constrained to choose loss functions that satisfy ∀t, ∀x1:t ∈At, and ∀x 1:t−2 ∈At−2, ft(x1:t) = ft(x 1:t−2, xt−1, xt) . (5) This adversary is more general than the switching costs adversary because his loss functions can depend on the previous action in an arbitrary way. We can further strengthen this adversary and 2 define the bounded memory adaptive adversary, which has a bounded memory of an arbitrary size. In other words, this adversary is allowed to set his loss function based on the player’s m most recent past actions, where m is a predefined parameter. Formally, the bounded memory adversary must choose loss functions that satisfy, ∀t, ∀x1:t ∈At, and ∀x 1:t−m−1 ∈At−m−1, ft(x1:t) = ft(x 1:t−m−1, xt−m:t) . In the information theory literature, this setting is called individual sequence prediction against loss functions with memory [18]. In addition to the adversary types described above, the bounded memory adaptive adversary has additional interesting special cases. One of them is the delayed feedback oblivious adversary of [19], which defines an oblivious loss sequence, but reveals each loss value with a delay of m rounds. Since the loss at time t depends on the player’s action at time t −m, this adversary is a special case of a bounded memory adversary with a memory of size m. The delayed feedback adversary is not a focus of our work, and we present it merely as an interesting special case. So far, we have defined a succession of adversaries of different strengths. This paper’s goal is to understand the upper and lower bounds on the player’s regret when he faces these adversaries. Specifically, we focus on how the expected regret depends on the number of rounds, T, with either full-information or bandit feedback. 1.1 The Current State of the Art Different aspects of this problem have been previously studied and the known results are surveyed below and summarized in Table 1. Most of these previous results rely on the additional assumption that the range of the loss functions is bounded in a fixed interval, say [0, C]. We explicitly make note of this because our new results require us to slightly generalize this assumption. As mentioned above, the oblivious adversary has been studied extensively and is the best understood of all the adversaries discussed in this paper. With full-information feedback, both the Hedge algorithm [15, 11] and the follow the perturbed leader (FPL) algorithm [14] guarantee a regret of O( √ T), with a matching lower bound of Ω( √ T) —see, e.g., [8]. Analyses of Hedge in settings where the loss range may vary over time have also been considered —see, e.g., [9]. The oblivious setting with bandit feedback, where the player only observes the incurred loss ft(X1:t), is called the nonstochastic (or adversarial) multi-armed bandit problem. In this setting, the Exp3 algorithm of [4] guarantees the same regret O( √ T) as the full-information setting, and clearly the full-information lower bound Ω( √ T) still applies. The follow the lazy leader (FLL) algorithm of [14] is designed for the switching costs setting with full-information feedback. The analysis of FLL guarantees that the oblivious component of the player’s expected regret (without counting the switching costs), as well as the expected number of switches, is upper bounded by O( √ T), implying an expected regret of O( √ T). The work in [3] focuses on the bounded memory adversary with bandit feedback and guarantees an expected regret of O(T 2/3). This bound naturally extends to the full-information setting. We note that [18, 12] study this problem in a different feedback model, which we call counterfactual feedback, where the player receives a full description of the history-dependent function ft at the end of round t. In this setting, the algorithm presented in [12] guarantees an expected regret of O( √ T). Learning with bandit feedback and switching costs has mostly been considered in the economics literature, using a different setting than ours and with prior knowledge assumptions (see [13] for an overview). The setting of stochastic oblivious adversaries (i.e., oblivious loss functions sampled i.i.d. from a fixed distribution) was first studied by [2], where they show that O(log T) switches are sufficient to asymptotically guarantee logarithmic regret. The paper [20] achieves logarithmic regret nonasymptotically with O(log T) switches. Several other papers discuss online learning against “adaptive” adversaries [4, 10, 16, 17], but these results are not relevant to our work and can be easily misunderstood. For example, several bandit algorithms have extensions to the “adaptive” adversary case, with a regret upper bound of O( √ T) [1]. This bound doesn’t contradict the Ω(T) lower bound for general adaptive adversaries mentioned 3 oblivious switching cost memory of size 1 bounded memory adaptive Full-Information Feedback  O √ T √ T T 2/3 T 2/3 T Ω √ T √ T √ T √ T →T 2/3 T Bandit Feedback  O √ T T 2/3 T 2/3 T 2/3 T Ω √ T √ T →T 2/3 √ T →T 2/3 √ T →T 2/3 T Table 1: State-of-the-art upper and lower bounds on regret (as a function of T) against different adversary types. Our contribution to this table is presented in bold face. earlier, since these papers use the regret defined in Eq. (2) rather than the regret used in our work, defined in Eq. (1). Another related body of work lies in the field of competitive analysis —see [5], which also deals with loss functions that depend on the player’s past actions, and the adversary’s memory may even be unbounded. However, obtaining sublinear regret is generally impossible in this case. Therefore, competitive analysis studies much weaker performance metrics such as the competitive ratio, making it orthogonal to our work. 1.2 Our Contribution In this paper, we make the following contributions (see Table 1): • Our main technical contribution is a new lower bound on regret that matches the existing upper bounds in several of the settings discussed above. Specifically, our lower bound applies to the switching costs adversary with bandit feedback and to all strictly stronger adversaries. • Building on this lower bound, we prove another regret lower bound in the bounded memory setting with full-information feedback, again matching the known upper bound. • We confirm that existing upper bounds on regret hold in our setting and match the lower bounds up to logarithmic factors. • Despite the lower bound, we show that for switching costs and bandit feedback, if we also assume stochastic i.i.d. losses, then one can get a distribution-free regret bound of O(√T log log log T) for finite action sets, with only O(log log T) switches. This result uses ideas from [7], and is deferred to the supplementary material. Our new lower bound is a significant step towards a complete understanding of adaptive adversaries; observe that the upper and lower bounds in Table 1 essentially match in all but one of the settings. Our results have two important consequences. First, observe that the optimal regret against the switching costs adversary is Θ √ T  with full-information feedback, versus Θ  T 2/3 with bandit feedback. To the best of our knowledge, this is the first theoretical confirmation that learning with bandit feedback is strictly harder than learning with full-information, even on a small finite action set and even in terms of the dependence on T (previous gaps we are aware of were either in terms of the number of actions [4], or required large or continuous action spaces —see, e.g., [6, 21]). Moreover, recall the regret bound of O √T log log log T  against the stochastic i.i.d. adversary with switching costs and bandit feedback. This demonstrates that dependencies in the loss process must play a crucial role in controlling the power of the switching costs adversary. Indeed, the Ω  T 2/3 lower bound proven in the next section heavily relies on such dependencies. Second, observe that in the full-information feedback case, the optimal regret against a switching costs adversary is Θ( √ T), whereas the optimal regret against the more general bounded memory adversary is Ω(T 2/3). This is somewhat surprising given the ideas presented in [18] and later extended in [3]: The main technique used in these papers is to take an algorithm originally designed for oblivious adversaries, forcefully prevent it from switching actions very often, and obtain a new algorithm that guarantees a regret of O(T 2/3) against bounded memory adversaries. This would 4 seem to imply that a small number of switches is the key to dealing with general bounded memory adversaries. Our result contradicts this intuition by showing that controlling the number of switches is easier then dealing with a general bounded memory adversary. As noted above, our lower bounds require us to slightly weaken the standard technical assumption that loss values lie in a fixed interval [0, C]. We replace it with the following two assumptions: 1. Bounded range. We assume that the loss values on each individual round are bounded in an interval of constant size C, but we allow this interval to drift from round to round. Formally, ∀t, ∀x1:t ∈At and ∀x 1:t ∈At, ft(x1:t) −ft(x 1:t)  ≤C . (6) 2. Bounded drift. We also assume that the drift of each individual action from round to round is contained in a bounded interval of size Dt, where Dt may grow slowly, as O  log(t)  . Formally, ∀t and ∀x1:t ∈At, ft(x1:t) −ft+1(x1:t, xt)  ≤Dt . (7) Since these assumptions are a relaxation of the standard assumption, all of the known lower bounds on regret automatically extend to our relaxed setting. For our results to be consistent with the current state of the art, we must also prove that all of the known upper bounds continue to hold after the relaxation, up to logarithmic factors. 2 Lower Bounds In this section, we prove lower bounds on the player’s expected regret in various settings. 2.1 Ω(T 2/3) with Switching Costs and Bandit Feedback We begin with a Ω(T 2/3) regret lower bound against an oblivious adversary with switching costs, when the player receives bandit feedback. It is enough to consider a very simple setting, with only two actions, labeled 1 and 2. Using the notation introduced earlier, we use 1, 2, . . . to denote the oblivious sequence of loss functions chosen by the adversary before adding the switching cost. Theorem 1. For any player strategy that relies on bandit feedback and for any number of rounds T, there exist loss functions f1, . . . , fT that are oblivious with switching costs, with a range bounded by C = 2, and a drift bounded by Dt =  3 log(t) + 16, such that E[RT ] ≥ 1 40T 2/3. The full proof is given in the supplementary material, and here we give an informal proof sketch. We begin by constructing a randomized adversarial strategy, where the loss functions 1, . . . , T are an instantiation of random variables Lt, . . . , LT defined as follows. Let ξ1, . . . , ξT be i.i.d. standard Gaussian random variables (with zero mean and unit variance) and let Z be a random variable that equals −1 or 1 with equal probability. Using these random variables, define for all t = 1 . . . T Lt(1) = t  s=1 ξs , Lt(2) = Lt(1) + ZT −1/3 . (8) In words, {Lt(1)}T t=1 is simply a Gaussian random walk and {Lt(2)}T t=1 is the same random walk, slightly shifted up or down —see figure 1 for an illustration. It is straightforward to confirm that this loss sequence has a bounded range, as required by the theorem: by construction we have | t(1) − t(2)| = T −1/3 ≤1 for all t, and since the switching cost can add at most 1 to the loss on each round, we conclude that |ft(1) −ft(2)| ≤2 for all t. Next, we show that the expected regret of any player against this random loss sequence is Ω(T 2/3), where expectation is taken over the randomization of both the adversary and the player. The intuition is that the player can only gain information about which action is better by switching between them. Otherwise, if he stays on the same action, he only observes a random walk, and gets no further information. Since the gap between the two losses on each round is T −1/3, the player must perform Ω(T 2/3) switches before he can identify the better action. If the player performs that many switches, the total regret incurred due to the switching costs is Ω(T 2/3). Alternatively, if the player performs o(T 2/3) switches, he 5 5 10 15 20 25 30 −2 0 2 t t(1) t(2) Figure 1: A particular realization of the random loss sequence defined in Eq. (8). The sequence of losses for action 1 follows a Gaussian random walk, whereas the sequence of losses for action 2 follows the same random walk, but slightly shifted either up or down. can’t identify the better action; as a result he suffers an expected regret of Ω(T −1/3) on each round and a total regret of Ω(T 2/3). Since the randomized loss sequence defined in Eq. (8), plus a switching cost, achieves an expected regret of Ω(T 2/3), there must exist at least one deterministic loss sequence 1 . . . T with a regret of Ω(T 2/3). In our proof, we show that there exists such 1 . . . T with bounded drift. 2.2 Ω(T 2/3) with Bounded Memory and Full-Information Feedback We build on Thm. 1 and prove a Ω(T 2/3) regret lower bound in the full-information setting, where we get to see the entire loss vector on every round. To get this strong result, we need to give the adversary a little bit of extra power: memory of size 2 instead of size 1 as in the case of switching costs. To show this result, we again consider a simple setting with two actions. Theorem 2. For any player strategy that relies on full-information feedback and for any number of rounds T ≥2, there exist loss functions f1, . . . , fT , each with a memory of size m = 2, a range bounded by C = 2, and a drift bounded by Dt =  3 log(t) + 18, such that E[RT ] ≥ 1 40(T −1)2/3. The formal proof is deferred to the supplementary material and a proof sketch is given here. The proof is based on a reduction from full-information to bandit feedback that might be of independent interest. We construct the adversarial loss sequence as follows: on each round, the adversary assigns the same loss to both actions. Namely, the value of the loss depends only on the player’s previous two actions, and not on his action on the current round. Recall that even in the full-information version of the game, the player doesn’t know what the losses would have been had he chosen different actions in the past. Therefore, we have made the full-information game as difficult as the bandit game. Specifically, we construct an oblivious loss sequence 1 . . . T as in Thm. 1 and define ft(x1:t) = t−1(xt−1) + I{xt−1=xt−2} . (9) In words, we define the loss on round t of the full-information game to be equal to the loss on round t −1 of a bandits-with-switching-costs game in which the player chooses the same sequence of actions. This can be done with a memory of size 2, since the loss in Eq. (9) is fully specified by the player’s choices on rounds t, t −1, t −2. Therefore, the Ω(T 2/3) lower bound for switching costs and bandit feedback extends to the full-information setting with a memory of size at least 2. 3 Upper Bounds In this section, we show that the known upper bounds on regret, originally proved for bounded losses, can be extended to the case of losses with bounded range and bounded drift. Specifically, of the upper bounds that appear in Table 1, we prove the following: • O( √ T) for an oblivious adversary with switching costs, with full-information feedback. •  O( √ T) for an oblivious adversary with bandit feedback (where  O hides logarithmic factors). •  O(T 2/3) for a bounded memory adversary with bandit feedback. 6 The remaining upper bounds in Table 1 are either trivial or follow from the principle that an upper bound still holds if we weaken the adversary or provide a more informative feedback. 3.1 O( √ T) with Switching Costs and Full-Information Feedback In this setting, ft(x1:t) = t(xt) + I{xt=xt−1}. If the oblivious losses 1 . . . T (without the additional switching costs) were all bounded in [0, 1], the Follow the Lazy Leader (FLL) algorithm of [14] would guarantee a regret of O( √ T) with respect to these losses (again, without the additional switching costs). Additionally, FLL guarantees that its expected number of switches is O( √ T). We use a simple reduction to extend these guarantees to loss functions with a range bounded in an interval of size C and with an arbitrary drift. On round t, after choosing an action and receiving the loss function t, the player defines the modified loss  t(x) = 1 C−1  t(x) −miny t(y)  and feeds it to the FLL algorithm. The FLL algorithm then chooses the next action. Theorem 3. If each of the loss functions f1, f2, . . . is oblivious with switching costs and has a range bounded by C then the player strategy described above attains O(C √ T) expected regret. The full proof is given in the supplementary material but the proof technique is straightforward. We first show that each  t is bounded in [0, 1] and therefore the standard regret bound for FLL holds with respect to the sequence of modified loss functions  1,  2, . . .. Then we show that the guarantees provided for FLL imply a regret of O( √ T) with respect to the original loss sequence f1, f2, . . .. 3.2  O( √ T) with an Oblivious Adversary and Bandit Feedback In this setting, ft(x1:t) simply equals t(xt). The reduction described in the previous subsection cannot be used in the bandit setting, since minx t(x) is unknown to the player, and a different reduction is needed. The player sets a fixed horizon T and focuses on controlling his regret at time T; he can then use a standard doubling trick [8] to handle an infinite horizon. The player uses the fact that each ft has a range bounded by C. Additionally, he defines D = maxt≤T Dt and on each round he defines the modified loss f  t(x1:t) = 1 2(C + D)  t(xt) − t−1(xt−1)  + 1 2. (10) Note that f  t(X1:t) can be computed by the player using only bandit feedback. The player then feeds f  t(X1:t) to an algorithm that guarantees a O( √ T) standard regret (see definition in Eq. (2)) against a fixed action. The Exp3 algorithm, due to [4], is such an algorithm. The player chooses his actions according to the choices made by Exp3. The following theorem states that this reduction results in a bandit algorithm that guarantees a regret of  O( √ T) against oblivious adversaries. Theorem 4. If each of the loss functions f1 . . . fT is oblivious with a range bounded by C and a drift bounded by Dt = O  log(t)  then the player strategy described above attains  O(C √ T) expected regret. The full proof is given in the supplementary material. In a nutshell, we show that each f  t is a loss function bounded in [0, 1] and that the analysis of Exp3 guarantees a regret of O( √ T) with respect to the loss sequence f  1 . . . f  T . Then, we show that this guarantee implies a regret of (C+D)O( √ T) =  O(C √ T) with respect to the original loss sequence f1 . . . fT . 3.3  O(T 2/3) with Bounded Memory and Bandit Feedback Proving an upper bound against an adversary with a memory of size m, with bandit feedback, requires a more delicate reduction. As in the previous section, we assume a finite horizon T and we let D = maxt Dt. Let K = |A| be the number of actions available to the player. Since fT (x1:t) depends only on the last m + 1 actions in x1:t, we slightly overload our notation and define ft(xt−m:t) to mean the same as ft(x1:t). To define the reduction, the player fixes a base 7 action x0 ∈A and for each t > m he defines the loss function ft(xt−m:t) = 1 2  C + (m + 1)D  ft(xt−m:t) −ft−m−1(x0 . . . x0)  + 1 2 . Next, he divides the T rounds into J consecutive epochs of equal length, where J = Θ(T 2/3). We assume that the epoch length T/J is at least 2K(m + 1), which is true when T is sufficiently large. At the beginning of each epoch, the player plans his action sequence for the entire epoch. He uses some of the rounds in the epoch for exploration and the rest for exploitation. For each action in A, the player chooses an exploration interval of 2(m + 1) consecutive rounds within the epoch. These K intervals are chosen randomly, but they are not allowed to overlap, giving a total of 2K(m + 1) exploration rounds in the epoch. The details of how these intervals are drawn appears in our analysis, in the supplementary material. The remaining T/J −2K(m + 1) rounds are used for exploitation. The player runs the Hedge algorithm [11] in the background, invoking it only at the beginning of each epoch and using it to choose one exploitation action that will be played consistently on all of the exploitation rounds in the epoch. In the exploration interval for action x, the player first plays m+1 rounds of the base action x0 followed by m + 1 rounds of the action x. Letting tx denote the first round in this interval, the player uses the observed losses ftx+m(x0 . . . x0) and ftx+2m+1(x . . . x) to compute ftx+2m+1(x . . . x). In our analysis, we show that the latter is an unbiased estimate of the average value of ft(x . . . x) over t in the epoch. At the end of the epoch, the K estimates are fed as feedback to the Hedge algorithm. We prove the following regret bound, with the proof deferred to the supplementary material. Theorem 5. If each of the loss functions f1 . . . fT is has a memory of size m, a range bounded by C, and a drift bounded by Dt = O  log(t)  then the player strategy described above attains  O(T 2/3) expected regret. 4 Discussion In this paper, we studied the problem of prediction with expert advice against different types of adversaries, ranging from the oblivious adversary to the general adaptive adversary. We proved upper and lower bounds on the player’s regret against each of these adversary types, in both the full-information and the bandit feedback models. Our lower bounds essentially matched our upper bounds in all but one case: the adaptive adversary with a unit memory in the full-information setting, where we only know that regret is Ω( √ T) and O(T 2/3). Our bounds have two important consequences. First, we characterize the regret attainable with switching costs, and show a setting where predicting with bandit feedback is strictly more difficult than predicting with full-information feedback —even in terms of the dependence on T, and even on small finite action sets. Second, in the full-information setting, we show that predicting against a switching costs adversary is strictly easier than predicting against an arbitrary adversary with a bounded memory. To obtain our results, we had to relax the standard assumption that loss values are bounded in [0, 1]. Re-introducing this assumption and proving similar lower bounds remains an elusive open problem. Many other questions remain unanswered. Can we characterize the dependence of the regret on the number of actions? Can we prove regret bounds that hold with high probability? Can our results be generalized to more sophisticated notions of regret, as in [3]? In addition to the adversaries discussed in this paper, there are other interesting classes of adversaries that lie between the oblivious and the adaptive. A notable example is the family of deterministically adaptive adversaries, which includes adversaries that adapt to the player’s actions in a known deterministic way, rather than in a secret malicious way. For example, imagine playing a multi-armed bandit game where the loss values are initially oblivious, but whenever the player chooses an arm with zero loss, the loss of the same arm on the next round is deterministically changed to zero. Many real-world online prediction scenarios are deterministically adaptive, but we lack a characterization of the expected regret in this setting. Acknowledgments Part of this work was done while NCB was visiting OD at Microsoft Research, whose support is gratefully acknowledged. 8 References [1] J. Abernethy and A. Rakhlin. Beating the adaptive bandit with high probability. In COLT, 2009. [2] R. Agrawal, M.V. Hedge, and D. Teneketzis. Asymptotically efficient adaptive allocation rules for the multiarmed bandit problem with switching cost. IEEE Transactions on Automatic Control, 33(10):899–906, 1988. [3] R. Arora, O. Dekel, and A. Tewari. Online bandit learning against an adaptive adversary: from regret to policy regret. In Proceedings of the Twenty-Ninth International Conference on Machine Learning, 2012. [4] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [5] A. Borodin and R. El-Yaniv. Online computation and competitive analysis. Cambridge University Press, 1998. [6] S. Bubeck, R. Munos, G. Stoltz, and C. Szepesv´ari. X-armed bandits. Journal of Machine Learning Research, 12:1655–1695, 2011. [7] N. Cesa-Bianchi, C. Gentile, and Y. Mansour. Regret minimization for reserve prices in second-price auctions. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA13), 2013. [8] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [9] N. Cesa-Bianchi, Y. Mansour, and G. Stoltz. Improved second-order bounds for prediction with expert advice. Machine Learning, 66(2/3):321–352, 2007. [10] V. Dani and T. P. Hayes. Robbing the bandit: Less regret in online geometric optimization against an adaptive adversary. In Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithms, 2006. [11] Y. Freund and R.E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of computer and System Sciences, 55(1):119–139, 1997. [12] A. Gyorgy and G. Neu. Near-optimal rates for limited-delay universal lossy source coding. In IEEE International Symposium on Information Theory, pages 2218–2222, 2011. [13] T. Jun. A survey on the bandit problem with switching costs. De Economist, 152:513–541, 2004. [14] A. Kalai and S. Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71:291–307, 2005. [15] N. Littlestone and M.K. Warmuth. The weighted majority algorithm. Information and Computation, 108:212–261, 1994. [16] O. Maillard and R. Munos. Adaptive bandits: Towards the best history-dependent strategy. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, 2010. [17] H. B. McMahan and A. Blum. Online geometric optimization in the bandit setting against an adaptive adversary. In Proceedings of the Seventeenth Annual Conference on Learning Theory, 2004. [18] N. Merhav, E. Ordentlich, G. Seroussi, and M.J. Weinberger. Sequential strategies for loss functions with memory. IEEE Transactions on Information Theory, 48(7):1947–1958, 2002. [19] C. Mesterharm. Online learning with delayed label feedback. In Proceedings of the Sixteenth International Conference on Algorithmic Learning Theory, 2005. [20] R. Ortner. Online regret bounds for Markov decision processes with deterministic transitions. Theoretical Computer Science, 411(29–30):2684–2695, 2010. [21] O. Shamir. On the complexity of bandit and derivative-free stochastic convex optimization. CoRR, abs/1209.2388, 2012. 9
2013
230
4,966
From Bandits to Experts: A Tale of Domination and Independence Noga Alon Tel-Aviv University, Israel nogaa@tau.ac.il Nicol`o Cesa-Bianchi Universit`a degli Studi di Milano, Italy nicolo.cesa­bianchi@unimi.it Claudio Gentile University of Insubria, Italy claudio.gentile@uninsubria.it Yishay Mansour Tel-Aviv University, Israel mansour@tau.ac.il Abstract We consider the partial observability model for multi-armed bandits, introduced by Mannor and Shamir [14]. Our main result is a characterization of regret in the directed observability model in terms of the dominating and independence numbers of the observability graph (which must be accessible before selecting an action). In the undirected case, we show that the learner can achieve optimal regret without even accessing the observability graph before selecting an action. Both results are shown using variants of the Exp3 algorithm operating on the observability graph in a time-efficient manner. 1 Introduction Prediction with expert advice —see, e.g., [13, 16, 6, 10, 7]— is a general abstract framework for studying sequential prediction problems, formulated as repeated games between a player and an adversary. A well studied example of prediction game is the following: In each round, the adversary privately assigns a loss value to each action in a fixed set. Then the player chooses an action (possibly using randomization) and incurs the corresponding loss. The goal of the player is to control regret, which is defined as the excess loss incurred by the player as compared to the best fixed action over a sequence of rounds. Two important variants of this game have been studied in the past: the expert setting, where at the end of each round the player observes the loss assigned to each action for that round, and the bandit setting, where the player only observes the loss of the chosen action, but not that of other actions. Let K be the number of available actions, and T be the number of prediction rounds. The best possible regret for the expert setting is of order √T log K. This optimal rate is achieved by the Hedge algorithm [10] or the Follow the Perturbed Leader algorithm [12]. In the bandit setting, the optimal regret is of order √ TK, achieved by the INF algorithm [2]. A bandit variant of Hedge, called Exp3 [3], achieves a regret with a slightly worse bound of order √TK log K. Recently, Mannor and Shamir [14] introduced an elegant way for defining intermediate observability models between the expert setting (full observability) and the bandit setting (single observability). An intuitive way of representing an observability model is through a directed graph over actions: an arc1 from action i to action j implies that when playing action i we get information also about the loss of action j. Thus, the expert setting is obtained by choosing a complete graph over actions (playing any action reveals all losses), and the bandit setting is obtained by choosing an empty edge set (playing an action only reveals the loss of that action). 1 According to the standard terminology in directed graph theory, throughout this paper a directed edge will be called an arc. 1 The main result of [14] concerns undirected observability graphs. The regret is characterized in terms of the independence number α of the undirected observability graph. Specifically, they prove that √Tα log K is the optimal regret (up to logarithmic factors) and show that a variant of Exp3, called ELP, achieves this bound when the graph is known ahead of time, where α ∈{1 . . .  K} interpolates between full observability (α = 1 for the clique) and single observability (α = K for the graph with no edges). Given the observability graph, ELP runs a linear program to compute the desired distribution over actions. In the case when the graph changes over time, and at each time step ELP observes the current observability graph before prediction, a bound of T t=1 αt log K is shown, where αt is the independence number of the graph at time t. A major problem left open in [14] was the characterization of regret for directed observability graphs, a setting for which they only proved partial results. Our main result is a full characterization (to within logarithmic factors) of regret in the case of directed observability graphs. Our upper bounds are proven using a new algorithm, called Exp3-DOM. This algorithm is efficient to run even when the graph changes over time: it just needs to compute a small dominating set of the current observability graph (which must be given as side information) before prediction.2 As in the undirected case, the regret for the directed case is characterized in terms of the independence numbers of the observability graphs (computed ignoring edge directions). We arrive at this result by showing that a key quantity emerging in the analysis of Exp3-DOM can be bounded in terms of the independence numbers of the graphs. This bound (Lemma 13 in the appendix) is based on a combinatorial construction which might be of independent interest. We also explore the possibility of the learning algorithm receiving the observability graph only after prediction, and not before. For this setting, we introduce a new variant of Exp3, called Exp3-SET, which achieves the same regret as ELP for undirected graphs, but without the need of accessing the current observability graph before each prediction. We show that in some random directed graph models Exp3-SET has also a good performance. In general, we can upper bound the regret of Exp3SET as a function of the maximum acyclic subgraph of the observability graph, but this upper bound may not be tight. Yet, Exp3-SET is much simpler and computationally less demanding than ELP, which needs to solve a linear program in each round. There are a variety of real-world settings where partial observability models corresponding to directed and undirected graphs are applicable. One of them is route selection. We are given a graph of possible routes connecting cities: when we select a route r connecting two cities, we observe the cost (say, driving time or fuel consumption) of the “edges” along that route and, in addition, we have complete information on any sub-route r of r, but not vice versa. We abstract this in our model by having an observability graph over routes r, and an arc from r to any of its sub-routes r.3 Sequential prediction problems with partial observability models also arise in the context of recommendation systems. For example, an online retailer, which advertises products to users, knows that users buying certain products are often interested in a set of related products. This knowledge can be represented as a graph over the set of products, where two products are joined by an edge if and only if users who buy any one of the two are likely to buy the other as well. In certain cases, however, edges have a preferred orientation. For instance, a person buying a video game console might also buy a high-def cable to connect it to the TV set. Vice versa, interest in high-def cables need not indicate an interest in game consoles. Such observability models may also arise in the case when a recommendation system operates in a network of users. For example, consider the problem of recommending a sequence of products, or contents, to users in a group. Suppose the recommendation system is hosted on an online social network, on which users can befriend each other. In this case, it has been observed that social relationships reveal similarities in tastes and interests [15]. However, social links can also be asymmetric (e.g., followers of celebrities). In such cases, followers might be more likely to shape their preferences after the person they follow, than the other way around. Hence, a product liked by a celebrity is probably also liked by his/her followers, whereas a preference expressed by a follower is more often specific to that person. 2 Computing an approximately minimum dominating set can be done by running a standard greedy set cover algorithm, see Section 2. 3 Though this example may also be viewed as an instance of combinatorial bandits [8], the model studied here is more general. For example, it does not assume linear losses, which could arise in the routing example from the partial ordering of sub-routes. 2 2 Learning protocol' notation' and preliminaries As stated in the introduction, we consider an adversarial multi-armed bandit setting with a finite action set V = {1 . . .  K}. At each time t = 1 2 . . . , a player (the “learning algorithm”) picks some action It ∈V and incurs a bounded loss Itt ∈[0 1]. Unlike the standard adversarial bandit problem [3, 7], where only the played action It reveals its loss Itt, here we assume all the losses in a subset SItt ⊆V of actions are revealed after It is played. More formally, the player observes the pairs (i it) for each i ∈SItt. We also assume i ∈Sit for any i and t, that is, any action reveals its own loss when played. Note that the bandit setting (Sit = {i}) and the expert setting (Sit = V ) are both special cases of this framework. We call Sit the observation set of action i at time t, and write i t−→j when at time t playing action i also reveals the loss of action j. Hence, Sit = {j ∈V : i t−→j}. The family of observation sets {Sit}i∈V we collectively call the observation system at time t. The adversaries we consider are nonoblivious. Namely, each loss it at time t can be an arbitrary function of the past player’s actions I1 . . .  It−1. The performance of a player A is measured through the regret max k∈V   LAT −LkT  where LAT = I11 + · · · + IT T and LkT = k1 + · · · + kT are the cumulative losses of the player and of action k, respectively. The expectation is taken with respect to the player’s internal randomization (since losses are allowed to depend on the player’s past random actions, also Lkt may be random).4 The observation system {Sit}i∈V is also adversarially generated, and each Sit can be an arbitrary function of past player’s actions, just like losses are. However, in Section 3 we also consider a variant in which the observation system is randomly generated according to a specific stochastic model. Whereas some algorithms need to know the observation system at the beginning of each step t, others need not. From this viewpoint, we consider two online learning settings. In the first setting, called the informed setting, the full observation system {Sit}i∈V selected by the adversary is made available to the learner before making its choice It. This is essentially the “side-information” framework first considered in [14]. In the second setting, called the uninformed setting, no information whatsoever regarding the time-t observation system is given to the learner prior to prediction. We find it convenient to adopt the same graph-theoretic interpretation of observation systems as in [14]. At each step t = 1 2 . . . , the observation system {Sit}i∈V defines a directed graph Gt = (V Dt), where V is the set of actions, and Dt is the set of arcs, i.e., ordered pairs of nodes. For j = i, arc (i j) ∈Dt if and only if i t−→j (the self-loops created by i t−→i are intentionally ignored). Hence, we can equivalently define {Sit}i∈V in terms of Gt. Observe that the outdegree d+ i of any i ∈V equals |Sit|−1. Similarly, the indegree d− i of i is the number of action j = i such that i ∈Sjt (i.e., such that j t−→i). A notable special case of the above is when the observation system is symmetric over time: j ∈Sit if and only if i ∈Sjt for all i j and t. In words, playing i at time t reveals the loss of j if and only if playing j at time t reveals the loss of i. A symmetric observation system is equivalent to Gt being an undirected graph or, more precisely, to a directed graph having, for every pair of nodes i j ∈V , either no arcs or length-two directed cycles. Thus, from the point of view of the symmetry of the observation system, we also distinguish between the directed case (Gt is a general directed graph) and the symmetric case (Gt is an undirected graph for all t). The analysis of our algorithms depends on certain properties of the sequence of graphs Gt. Two graph-theoretic notions playing an important role here are those of independent sets and dominating sets. Given an undirected graph G = (V E), an independent set of G is any subset T ⊆V such that no two i j ∈T are connected by an edge in E. An independent set is maximal if no proper superset thereof is itself an independent set. The size of a largest (maximal) independent set is the independence number of G, denoted by α(G). If G is directed, we can still associate with it an independence number: we simply view G as undirected by ignoring arc orientation. If G = (V D) is a directed graph, then a subset R ⊆V is a dominating set for G if for all j ∈R there exists some i ∈R such that arc (i j) ∈D. In our bandit setting, a time-t dominating set Rt is a subset of actions with the property that the loss of any remaining action in round t can be observed by playing 4 Although we defined the problem in terms of losses, our analysis can be applied to the case when actions return rewards git ∈[0 1] via the transformation it = 1 −git. 3 Algorithm 1: Exp3-SET algorithm (for the uninformed setting) Parameter: η ∈[0 1] Initialize: wi1 = 1 for all i ∈V = {1 . . .  K} For t = 1 2 . . . : 1. Observation system {Sit}i∈V is generated but not disclosed ; 2. Set pit = wit Wit for each i ∈V , where Wt =  j∈V wjt ; 3. Play action It drawn according to distribution pt = (p1t . . .  pKt) ; 4. Observe pairs (i it) for all i ∈SItt; 5. Observation system {Sit}i∈V is disclosed ; 6. For any i ∈V set wit+1 = wit exp  −η  it  , where  it = it qit I{i ∈SItt} and qit =  j : j t−→i pjt . some action in Rt. A dominating set is minimal if no proper subset thereof is itself a dominating set. The domination number of directed graph G, denoted by γ(G), is the size of a smallest (minimal) dominating set of G. Computing a minimum dominating set for an arbitrary directed graph Gt is equivalent to solving a minimum set cover problem on the associated observation system {Sit}i∈V . Although minimum set cover is NP-hard, the well-known Greedy Set Cover algorithm [9], which repeatedly selects from {Sit}i∈V the set containing the largest number of uncovered elements so far, computes a dominating set Rt such that |Rt| ≤γ(Gt) (1 + ln K). Finally, we can also lift the notion of independence number of an undirected graph to directed graphs through the notion of maximum acyclic subgraphs: Given a directed graph G = (V D), an acyclic subgraph of G is any graph G = (V  D) such that V  ⊆V , and D = D ∩  V  × V  , with no (directed) cycles. We denote by mas(G) = |V | the maximum size of such V . Note that when G is undirected (more precisely, as above, when G is a directed graph having for every pair of nodes i j ∈V either no arcs or length-two cycles), then mas(G) = α(G), otherwise mas(G) ≥α(G). In particular, when G is itself a directed acyclic graph, then mas(G) = |V |. 3 Algorithms without Explicit Exploration: The Uninformed Setting In this section, we show that a simple variant of the Exp3 algorithm [3] obtains optimal regret (to within logarithmic factors) in the symmetric and uninformed setting. We then show that even the harder adversarial directed setting lends itself to an analysis, though with a weaker regret bound. Exp3-SET (Algorithm 1) runs Exp3 without mixing with the uniform distribution. Similar to Exp3, Exp3-SET uses loss estimates  it that divide each observed loss it by the probability qit of observing it. This probability qit is simply the sum of all pjt such that j t−→i (the sum includes pit). Next, we bound the regret of Exp3-SET in terms of the key quantity Qt =  i∈V pit qit =  i∈V pit  j : j t−→i pjt . (1) Each term pit/qit can be viewed as the probability of drawing i from pt conditioned on the event that i was observed. Similar to [14], a key aspect to our analysis is the ability to deterministically and nonvacuously5 upper bound Qt in terms of certain quantities defined on {Sit}i∈V . We do so in two ways, either irrespective of how small each pit may be (this section) or depending on suitable lower bounds on the probabilities pit (Section 4). In fact, forcing lower bounds on pit is equivalent to adding exploration terms to the algorithm, which can be done only when knowing {Sit}i∈V before each prediction —an information available only in the informed setting. 5 An obvious upper bound on Qt is K. 4 The following result is the building block for all subsequent results in the uninformed setting.6 Theorem 1 The regret of Exp3-SET satisfies max k∈V   LAT −LkT  ≤ln K η + η 2 T  t=1 [Qt] . As we said, in the adversarial and symmetric case the observation system at time t can be described by an undirected graph Gt = (V Et). This is essentially the problem of [14], which they studied in the easier informed setting, where the same quantity Qt above arises in the analysis of their ELP algorithm. In their Lemma 3, they show that Qt ≤α(Gt), irrespective of the choice of the probabilities pt. When applied to Exp3-SET, this immediately gives the following result. Corollary 2 In the symmetric setting, the regret of Exp3-SET satisfies max k∈V   LAT −LkT  ≤ln K η + η 2 T  t=1 [α(Gt)] . In particular, if for constants α1 . . .  αT we have α(Gt) ≤αt, t = 1 . . .  T, then setting η =  (2 ln K) T t=1 αt, gives max k∈V   LAT −LkT  ≤ 2(ln K) T  t=1 αt . The bounds proven in Corollary 2 are equivalent to those proven in [14] (Theorem 2 therein) for the ELP algorithm. Yet, our analysis is much simpler and, more importantly, our algorithm is simpler and more efficient than ELP, which requires solving a linear program at each step. Moreover, unlike ELP, Exp-SET does not require prior knowledge of the observation system {Sit}i∈V at the beginning of each step. We now turn to the directed setting. We start by considering a setting in which the observation system is stochastically generated. Then, we turn to the harder adversarial setting. The Erd˝os-Renyi model is a standard model for random directed graphs G = (V D), where we are given a density parameter r ∈[0 1] and, for any pair i j ∈V , arc (i j) ∈D with independent probability r.7 We have the following result. Corollary 3 Let Gt be generated according to the Erd˝os-Renyi model with parameter r ∈[0 1]. Then the regret of Exp3-SET satisfies max k∈V   LAT −LkT  ≤ln K η + η T 2r  1 −(1 −r)K . In the above, the expectations [·] are w.r.t. both the algorithm’s randomization and the random generation of Gt occurring at each round. In particular, setting η =  2r ln K T 1−1−r)K), gives max k∈V   LAT −LkT  ≤ 2(ln K)T (1 −(1 −r)K) r . Note that as r ranges in [0 1] we interpolate between the bandit (r = 0)8 and the expert (r = 1) regret bounds. When the observation system is generated by an adversary, we have the following result. Corollary 4 In the directed setting, the regret of Exp3-SET satisfies max k∈V   LAT −LkT  ≤ln K η + η 2 T  t=1 [mas(Gt)] . 6 All proofs are given in the supplementary material to this paper. 7 Self loops, i.e., arcs i i) are included by default here. 8 Observe that limr0+ 1−1−r)K r = K. 5 In particular, if for constants m1 . . .  mT we have mas(Gt) ≤mt, t = 1 . . .  T, then setting η =  (2 ln K) T t=1 mt, gives max k∈V   LAT −LkT  ≤ 2(ln K) T  t=1 mt . Observe that Corollary 4 is a strict generalization of Corollary 2 because, as we pointed out in Section 2, mas(Gt) ≥α(Gt), with equality holding when Gt is an undirected graph. As far as lower bounds are concerned, in the symmetric setting, the authors of [14] derive a lower bound of Ω  α(G)T  in the case when Gt = G for all t. We remark that similar to the symmetric setting, we can derive a lower bound of Ω  α(G)T  . The simple observation is that given a directed graph G, we can define a new graph G which is made undirected just by reciprocating arcs; namely, if there is an arc (i j) in G we add arcs (i j) and (j i) in G. Note that α(G) = α(G). Since in G the learner can only receive more information than in G, any lower bound on G also applies to G. Therefore we derive the following corollary to the lower bound of [14] (Theorem 4 therein). Corollary 5 Fix a directed graph G, and suppose Gt = G for all t. Then there exists a 'randomized) adversarial strategy such that for any T = Ω  α(G)3 and for any learning strategy, the expected regret of the learner is Ω  α(G)T  . Moreover, standard results in the theory of Erd˝os-Renyi graphs, at least in the symmetric case (e.g., [11]), show that, when the density parameter r is constant, the independence number of the resulting graph has an inverse dependence on r. This fact, combined with the abovementioned lower bound of [14] gives a lower bound of the form  T r , matching (up to logarithmic factors) the upper bound of Corollary 3. One may wonder whether a sharper lower bound argument exists which applies to the general directed adversarial setting and involves the larger quantity mas(G). Unfortunately, the above measure does not seem to be related to the optimal regret: Using Claim 1 in the appendix (see proof of Theorem 3) one can exhibit a sequence of graphs each having a large acyclic subgraph, on which the regret of Exp3-SET is still small. The lack of a lower bound matching the upper bound provided by Corollary 4 is a good indication that something more sophisticated has to be done in order to upper bound Qt in (1). This leads us to consider more refined ways of allocating probabilities pit to nodes. In the next section, we show an allocation strategy that delivers optimal (to within logarithmic factors) regret bounds using prior knowledge of the graphs Gt. 4 Algorithms with Explicit Exploration: The Informed Setting We are still in the general scenario where graphs Gt are adversarially generated and directed, but now Gt is made available before prediction. We start by showing a simple example where our analysis of Exp3-SET inherently fails. This is due to the fact that, when the graph induced by the observation system is directed, the key quantity Qt defined in (1) cannot be nonvacuously upper bounded independent of the choice of probabilities pit. A way around it is to introduce a new algorithm, called Exp3-DOM, which controls probabilities pit by adding an exploration term to the distribution pt. This exploration term is supported on a dominating set of the current graph Gt. For this reason, Exp3-DOM requires prior access to a dominating set Rt at each time step t which, in turn, requires prior knowledge of the entire observation system {Sit}i∈V . As announced, the next result shows that, even for simple directed graphs, there exist distributions pt on the vertices such that Qt is linear in the number of nodes while the independence number is 1.9 Hence, nontrivial bounds on Qt can be found only by imposing conditions on distribution pt. 9 In this specific example, the maximum acyclic subgraph has size K, which confirms the looseness of Corollary 4. 6 Algorithm 2: Exp3-DOM algorithm (for the uninformed setting) Input: Exploration parameters γb) ∈(0 1] for b ∈  0 1 . . .  log2 K  Initialization: wb) i1 = 1 for all i ∈V and b ∈  0 1 . . .  log2 K  For t = 1 2 . . . : 1. Observation system {Sit}i∈V is generated and disclosed ; 2. Compute a dominating set Rt ⊆V for Gt associated with {Sit}i∈V ; 3. Let bt be such that |Rt| ∈  2bt 2bt+1 −1  ; 4. Set W bt) t =  i∈V wbt) it ; 5. Set pbt) it =  1 −γbt) wbt) it W bt) t + γbt) |Rt| I{i ∈Rt}; 6. Play action It drawn according to distribution pbt) t =  pbt) 1t  . . .  pbt) Vt  ; 7. Observe pairs (i it) for all i ∈SItt; 8. For any i ∈V set wbt) it+1 = wbt) it exp  −γbt)  bt) it /2bt , where  bt) it = it qbt) it I{i ∈SItt} and qbt) it =  j : j t−→i pbt) jt . Fact 6 Let G = (V D) be a total order on V = {1 . . .  K}, i.e., such that for all i ∈V , arc (j i) ∈D for all j = i+1 . . .  K. Let p = (p1 . . .  pK) be a distribution on V such that pi = 2−i, for i < K and pk = 2−K+1. Then Q = K  i=1 pi pi +  j : j−→i pj = K  i=1 pi K j=i pj = K + 1 2 . We are now ready to introduce and analyze the new algorithm Exp3-DOM for the informed and directed setting. Exp3-DOM (see Algorithm 2) runs (log K) variants of Exp3 indexed by b = 0 1 . . .  log2 K. At time t the algorithm is given observation system {Sit}i∈V , and computes a dominating set Rt of the directed graph Gt induced by {Sit}i∈V . Based on the size |Rt| of Rt, the algorithm uses instance bt = log2 |Rt| to pick action It. We use a superscript b to denote the quantities relevant to the variant of Exp3 indexed by b. Similarly to the analysis of Exp3-SET, the key quantities are qb) it =  j : i∈Sjt pb) jt =  j : j t−→i pb) jt and Qb) t =  i∈V pb) it qb) it  b = 0 1 . . .  log2 K . Let T b) =  t = 1 . . .  T : |Rt| ∈[2b 2b+1 −1]  . Clearly, the sets T b) are a partition of the time steps {1 . . .  T}, so that  b |T b)| = T. Since the adversary adaptively chooses the dominating sets Rt, the sets T b) are random. This causes a problem in tuning the parameters γb). For this reason, we do not prove a regret bound for Exp3-DOM, where each instance uses a fixed γb), but for a slight variant (described in the proof of Theorem 7 —see the appendix) where each γb) is set through a doubling trick. Theorem 7 In the directed case, the regret of Exp3-DOM satisfies max k∈V   LAT −LkT  ≤ log2 K  b=0  2b ln K γb) + γb)   t∈T b)  1 + Qb) t 2b+1    . (2) 7 Moreover, if we use a doubling trick to choose γb) for each b = 0 . . .  log2 K, then max k∈V   LAT −LkT  =   (ln K)    T  t=1  4|Rt| + Qbt) t   + (ln K) ln(KT)  . (3) Importantly, the next result shows how bound (3) of Theorem 7 can be expressed in terms of the sequence α(Gt) of independence numbers of graphs Gt whenever the Greedy Set Cover algorithm [9] (see Section 2) is used to compute the dominating set Rt of the observation system at time t. Corollary 8 If Step 2 of Exp3-DOM uses the Greedy Set Cover algorithm to compute the dominating sets Rt, then the regret of Exp-DOM with doubling trick satisfies max k∈V   LAT −LkT  =   ln(K) ln(KT) T  t=1 α(Gt) + ln(K) ln(KT)   where, for each t, α(Gt) is the independence number of the graph Gt induced by observation system {Sit}i∈V . Comparing Corollary 8 to Corollary 5 delivers the announced characherization in the general adversarial and directed setting. Moreover, a quick comparison between Corollary 2 and Corollary 8 reveals that a symmetric observation system overcomes the advantage of working in an informed setting: The bound we obtained for the uninformed symmetric setting (Corollary 2) is sharper by logarithmic factors than the one we derived for the informed —but more general, i.e., directed— setting (Corollary 8). 5 Conclusions and work in progress We have investigated online prediction problems in partial information regimes that interpolate between the classical bandit and expert settings. We have shown a number of results characterizing prediction performance in terms of: the structure of the observation system, the amount of information available before prediction, the nature (adversarial or fully random) of the process generating the observation system. Our results are substantial improvements over the paper [14] that initiated this interesting line of research. Our improvements are diverse, and range from considering both informed and uninformed settings to delivering more refined graph-theoretic characterizations, from providing more efficient algorithmic solutions to relying on simpler (and often more general) analytical tools. Some research directions we are currently pursuing are the following: (1) We are currently investigating the extent to which our results could be applied to the case when the observation system {Sit}i∈V may depend on the loss Itt of player’s action It. Note that this would prevent a direct construction of an unbiased estimator for unobserved losses, which many worst-case bandit algorithms (including ours —see the appendix) hinge upon. (2) The upper bound contained in Corollary 4 and expressed in terms of mas(·) is almost certainly suboptimal, even in the uninformed setting, and we are trying to see if more adequate graph complexity measures can be used instead. (3) Our lower bound in Corollary 5 heavily relies on the corresponding lower bound in [14] which, in turn, refers to a constant graph sequence. We would like to provide a more complete charecterization applying to sequences of adversarially-generated graphs G1 G2 . . .  GT in terms of sequences of their corresponding independence numbers α(G1) α(G2) . . .  α(GT ) (or variants thereof), in both the uninformed and the informed settings. (4) All our upper bounds rely on parameters to be tuned as a function of sequences of observation system quantities (e.g., the sequence of independence numbers). We are trying to see if an adaptive learning rate strategy `a la [4], based on the observable quantities Qt, could give similar results without such a prior knowledge. Acknowledgments NA was supported in part by an ERC advanced grant, by a USA-Israeli BSF grant, and by the Israeli I-CORE program. NCB acknowledges partial support by MIUR (project ARS TechnoMedia, PRIN 2010-2011, grant no. 2010N5K7EB 003). YM was supported in part by a grant from the Israel Science Foundation, a grant from the United States-Israel Binational Science Foundation (BSF), a grant by Israel Ministry of Science and Technology and the Israeli Centers of Research Excellence (I-CORE) program (Center No. 4/11). 8 References [1] N. Alon and J. H. Spencer. The probabilistic method. John Wiley M Sons, 2004. [2] Jean-Yves Audibert and S´ebastien Bubeck. Minimax policies for adversarial and stochastic bandits. In COLT, 2009. [3] Peter Auer, Nicol`o Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [4] Peter Auer, Nicol`o Cesa-Bianchi, and Claudio Gentile. Adaptive and self-confident on-line learning algorithms. J. Comput. Syst. Sci., 64(1):48–75, 2002. [5] Y. Caro. New results on the independence number. In Tech. Report, Tel-Aviv University, 1979. [6] N. Cesa-Bianchi, Y. Freund, D. Haussler, D. P. Helmbold, R. E. Schapire, and M. K. Warmuth. How to use expert advice. J. ACM, 44(3):427–485, 1997. [7] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [8] Nicol`o Cesa-Bianchi and G´abor Lugosi. Combinatorial bandits. J. Comput. Syst. Sci., 78(5):1404–1422, 2012. [9] V. Chvatal. A greedy heuristic for the set-covering problem. Mathematics of Operations Research, 4(3):233–235, 1979. [10] Yoav Freund and Robert E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. In Euro-COLT, pages 23–37. Springer-Verlag, 1995. Also, JCSS 55(1): 119-139 (1997). [11] A. M. Frieze. On the independence number of random graphs. Discrete Mathematics, 81:171– 175, 1990. [12] A. Kalai and S. Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71:291–307, 2005. [13] Nick Littlestone and Manfred K. Warmuth. The weighted majority algorithm. Information and Computation, 108:212–261, 1994. [14] S. Mannor and O. Shamir. From bandits to experts: On the value of side-observations. In 25th Annual Conference on Neural Information Processing Systems 'NIPS 2011), 2011. [15] Alan Said, Ernesto W De Luca, and Sahin Albayrak. How social relationships affect user similarities. In Proceedings of the International Conference on Intelligent User Interfaces Workshop on Social Recommender Systems, Hong Kong, 2010. [16] V. G. Vovk. Aggregating strategies. In COLT, pages 371–386, 1990. [17] V. K. Wey. A lower bound on the stability number of a simple graph. In Bell Lab. Tech. Memo No. 81-11217-9, 1981. 9
2013
231
4,967
Which Space Partitioning Tree to Use for Search? P. Ram Georgia Tech. / Skytree, Inc. Atlanta, GA 30308 p.ram@gatech.edu A. G. Gray Georgia Tech. Atlanta, GA 30308 agray@cc.gatech.edu Abstract We consider the task of nearest-neighbor search with the class of binary-spacepartitioning trees, which includes kd-trees, principal axis trees and random projection trees, and try to rigorously answer the question “which tree to use for nearestneighbor search?” To this end, we present the theoretical results which imply that trees with better vector quantization performance have better search performance guarantees. We also explore another factor affecting the search performance – margins of the partitions in these trees. We demonstrate, both theoretically and empirically, that large margin partitions can improve tree search performance. 1 Nearest-neighbor search Nearest-neighbor search is ubiquitous in computer science. Several techniques exist for nearestneighbor search, but most algorithms can be categorized into two following groups based on the indexing scheme used – (1) search with hierarchical tree indices, or (2) search with hash-based indices. Although multidimensional binary space-partitioning trees (or BSP-trees), such as kd-trees [1], are widely used for nearest-neighbor search, it is believed that their performances degrade with increasing dimensions. Standard worst-case analyses of search with BSP-trees in high dimensions usually lead to trivial guarantees (such as, an Ω(n) search time guarantee for a single nearest-neighbor query in a set of n points). This is generally attributed to the “curse of dimensionality” – in the worst case, the high dimensionality can force the search algorithm to visit every node in the BSP-tree. However, these BSP-trees are very simple and intuitive, and still used in practice with success. The occasional favorable performances of BSP-trees in high dimensions are attributed to the low “intrinsic” dimensionality of real data. However, no clear relationship between the BSP-tree search performance and the intrinsic data properties is known. We present theoretical results which link the search performance of BSP-trees to properties of the data and the tree. This allows us to identify implicit factors influencing BSP-tree search performance — knowing these driving factors allows us to develop successful heuristics for BSP-trees with improved search performance. Algorithm 1 BSP-tree search Input: BSP-tree T on set S, Query q, Desired depth l Output: Candidate neighbor p current tree depth lc ←0 current tree node Tc ←T while lc < l do if ⟨Tc.w, q⟩+ Tc.b ≤0 then Tc ←Tc.left child else Tc ←Tc.right child end if Increment depth lc ←lc + 1 end while p ←arg minr∈Tc∩S ∥q −r∥. Each node in a BSP-tree represents a region of the space and each non-leaf node has a left and right child representing a disjoint partition of this region with some separating hyperplane and threshold (w, b). A search query on this tree is usually answered with a depth-first branch-and-bound algorithm. Algorithm 1 presents a simplified version where a search query is answered with a small set of neighbor candidates of any desired size by performing a greedy depth-first tree traversal to a specified depth. This is known as defeatist tree search. We are not aware of any data-dependent analysis of the quality of the results from defeatist BSP-tree search. However, Verma et al. (2009) [2] presented adaptive data-dependent analyses of some BSP-trees for the task of vector quantization. These results show precise connections between the quantization performance of the BSP-trees and certain properties of the data (we will present these data properties in Section 2). 1 (a) kd-tree (b) RP-tree (c) MM-tree Figure 1: Binary space-partitioning trees. We establish search performance guarantees for BSP-trees by linking their nearest-neighbor performance to their vector quantization performance and utilizing the recent guarantees on the BSP-tree vector quantization. Our results provide theoretical evidence, for the first time, that better quantization performance implies better search performance1. These results also motivate the use of large margin BSP-trees, trees that hierarchically partition the data with a large (geometric) margin, for better nearest-neighbor search performance. After discussing some existing literature on nearestneighbor search and vector quantization in Section 2, we discuss our following contributions: • We present performance guarantees for Algorithm 1 in Section 3, linking search performance to vector quantization performance. Specifically, we show that for any balanced BSP-tree and a depth l, under some conditions, the worst-case search error incurred by the neighbor candidate returned by Algorithm 1 is proportional to a factor which is O  2l/2 exp(−l/2β) (n/2l)1/O(d) −2  , where β corresponds to the quantization performance of the tree (smaller β implies smaller quantization error) and d is closely related to the doubling dimension of the dataset (as opposed to the ambient dimension D of the dataset). This implies that better quantization produces better worst-case search results. Moreover, this result implies that smaller l produces improved worstcase performance (smaller l does imply more computation, hence it is intuitive to expect less error at the cost of computation). Finally, there is also the expected dependence on the intrinsic dimensionality d – increasing d implies deteriorating worst-case performance. The theoretical results are empirically verified in this section as well. • In Section 3, we also show that the worst-case search error for Algorithm 1 with a BSP-tree T is proportional to (1/γ) where γ is the smallest margin size of all the partitions in T. • We present the quantization performance guarantee of a large margin BSP tree in Section 4. These results indicate that for a given dataset, the best BSP-tree for search is the one with the best combination of low quantization error and large partition margins. We conclude with this insight and related unanswered questions in Section 5. 2 Search and vector quantization Binary space-partitioning trees (or BSP-trees) are hierarchical data structures providing a multiresolution view of the dataset indexed. There are several space-partitioning heuristics for a BSPtree construction. A tree is constructed by recursively applying a heuristic partition. The most popular kd-tree uses axis-aligned partitions (Figure 1(a)), often employing a median split along the coordinate axis of the data in the tree node with the largest spread. The principal-axis tree (PA-tree) partitions the space at each node at the median along the principal eigenvector of the covariance matrix of the data in that node [3, 4]. Another heuristic partitions the space based on a 2-means clustering of the data in the node to form the two-means tree (2M-tree) [5, 6]. The random-projection tree (RP-tree) partitions the space by projecting the data along a random standard normal direction and choosing an appropriate splitting threshold [7] (Figure 1(b)). The max-margin tree (MM-tree) is built by recursively employing large margin partitions of the data [8] (Figure 1(c)). The unsupervised large margin splits are usually performed using max-margin clustering techniques [9]. Search. Nearest-neighbor search with a BSP-tree usually involves a depth-first branch-and-bound algorithm which guarantees the search approximation (exact search is a special case of approximate search with zero approximation) by a depth-first traversal of the tree followed by a backtrack up the tree as required. This makes the tree traversal unpredictable leading to trivial worst-case runtime 1This intuitive connection is widely believed but never rigorously established to the best of our knowledge. 2 guarantees. On the other hand, locality-sensitive hashing [10] based methods approach search in a different way. After indexing the dataset into hash tables, a query is answered by selecting candidate points from these hash tables. The candidate set size implies the worst-case search time bound. The hash table construction guarantees the set size and search approximation. Algorithm 1 uses a BSPtree to select a candidate set for a query with defeatist tree search. For a balanced tree on n points, the candidate set size at depth l is n/2l and the search runtime is O(l + n/2l), with l ≤log2 n. For any choice of the depth l, we present the first approximation guarantee for this search process. Defeatist BSP-tree search has been explored with the spill tree [11], a binary tree with overlapping sibling nodes unlike the disjoint nodes in the usual BSP-tree. The search involves selecting the candidates in (all) the leaf node(s) which contain the query. The level of overlap guarantees the search approximation, but this search method lacks any rigorous runtime guarantee; it is hard to bound the number of leaf nodes that might contain any given query. Dasgupta & Sinha (2013) [12] show that the probability of finding the exact nearest neighbor with defeatist search on certain randomized partition trees (randomized spill trees and RP-trees being among them) is directly proportional to the relative contrast of the search task [13], a recently proposed quantity which characterizes the difficulty of a search problem (lower relative contrast makes exact search harder). Vector Quantization. Recent work by Verma et al., 2009 [2] has established theoretical guarantees for some of these BSP-trees for the task of vector quantization. Given a set of points S ⊂RD of n points, the task of vector quantization is to generate a set of points M ⊂RD of size k ≪n with low average quantization error. The optimal quantizer for any region A is given by the mean µ(A) of the data points lying in that region. The quantization error of the region A is then given by VS(A) = 1 |A ∩S| X x∈A∩S ∥x −µ(A)∥2 2 , (1) and the average quantization error of a disjoint partition of region A into Al and Ar is given by: VS({Al, Ar}) = (|Al ∩S|VS(Al) + |Ar ∩S|VS(Ar)) /|A ∩S|. (2) Tree-based structured vector quantization is used for efficient vector quantization – a BSP-tree of depth log2 k partitions the space containing S into k disjoint regions to produce a k-quantization of S. The theoretical results for tree-based vector quantization guarantee the improvement in average quantization error obtained by partitioning any single region (with a single quantizer) into two disjoints regions (with two quantizers) in the following form (introduced by Freund et al. (2007) [14]): Tree Definition of β PA-tree O(ϱ2): ϱ .= PD i=1 λi  /λ1 RP-tree O(dc) kd-tree × 2M-tree optimal (smallest possible) MM-tree∗ O(ρ): ρ .= PD i=1 λi  /γ2 Table 1: β for various trees. λ1, . . . , λD are the sorted eigenvalues of the covariance matrix of A ∩S in descending order, and dc < D is the covariance dimension of A ∩S. The results for PA-tree and 2M-tree are due to Verma et al. (2009) [2]. The PA-tree result can be improved to O(ϱ) from O(ϱ2) with an additional assumption [2]. The RP-tree result is in Freund et al. (2007) [14], which also has the precise definition of dc. We establish the result for MM-tree in Section 4. γ is the margin size of the large margin partition. No such guarantee for kd-trees is known to us. Definition 2.1. For a set S ⊂RD, a region A partitioned into two disjoint regions {Al, Ar}, and a data-dependent quantity β > 1, the quantization error improvement is characterized by: VS({Al, Ar}) < (1 −1/β) VS(A). (3) The quantization performance depends inversely on the data-dependent quantity β – lower β implies better quantization. We present the definition of β for different BSP-trees in Table 1. For the PA-tree, β depends on the ratio of the sum of the eigenvalues of the covariance matrix of data (A ∩S) to the principal eigenvalue. The improvement rate β for the RP-tree depends on the covariance dimension of the data in the node A (β = O(dc)) [7], which roughly corresponds to the lowest dimensionality of an affine plane that captures most of the data covariance. The 2M-tree does not have an explicit β but it has the optimal theoretical improvement rate for a single partition because the 2-means clustering objective is equal to |Al|V(Al) + |Ar|V(Ar) and minimizing this objective maximizes β. The 2means problem is NP-hard and an approximate solution is used in practice. These theoretical results are valid under the condition that there are no outliers in A ∩S. This is characterized as maxx,y∈A∩S ∥x −y∥2 ≤ηVS(A) for a fixed η > 0. This notion of the absence of outliers was first introduced for the theoretical analysis of the RP-trees [7]. Verma et al. (2009) [2] describe outliers as “points that are much farther away from the mean than the typical distance-from-mean”. In this situation, an alternate type of partition is used to remove these outliers that are farther away 3 from the mean than expected. For η ≥8, this alternate partitioning is guaranteed to reduce the data diameter (maxx,y∈A∩S ∥x −y∥) of the resulting nodes by a constant fraction [7, Lemma 12], and can be used until a region contain no outliers, at which point, the usual hyperplane partition can be used with their respective theoretical quantization guarantees. The implicit assumption is that the alternate partitioning scheme is employed rarely. These results for BSP-tree quantization performance indicate that different heuristics are adaptive to different properties of the data. However, no existing theoretical result relates this performance of BSP-trees to their search performance. Making the precise connection between the quantization performance and the search performance of these BSP-trees is a contribution of this paper. 3 Approximation guarantees for BSP-tree search In this section, we formally present the data and tree dependent performance guarantees on the search with BSP-trees using Algorithm 1. The quality of nearest-neighbor search can be quantized in two ways – (i) distance error and (ii) rank of the candidate neighbor. We present guarantees for both notions of search error2. For a query q and a set of points S and a neighbor candidate p ∈S, distance error ϵ(q) = ∥q−p∥ minr∈S∥q−r∥−1, and rank τ(q) = |{r ∈S : ∥q −r∥< ∥q −p∥}| + 1. Algorithm 1 requires the query traversal depth l as an input. The search runtime is O(l + (n/2l)). The depth can be chosen based on the desired runtime. Equivalently, the depth can be chosen based on the desired number of candidates m; for a balanced binary tree on a dataset S of n points with leaf nodes containing a single point, the appropriate depth l = log2 n −⌈log2 m⌉. We will be building on the existing results on vector quantization error [2] to present the worst case error guarantee for Algorithm 1. We need the following definitions to precisely state our results: Definition 3.1. An ω-balanced split partitioning a region A into disjoint regions {A1, A2} implies ||A1 ∩S| −|A2 ∩S|| ≤ω|A ∩S|. For a balanced tree corresponding to recursive median splits, such as the PA-tree and the kd-tree, ω ≈0. Non-zero values of ω ≪1, corresponding to approximately balanced trees, allow us to potentially adapt better to some structure in the data at the cost of slightly losing the tree balance. For the MM-tree (discussed in detail in Section 4), ω-balanced splits are enforced for any specified value of ω. Approximately balanced trees have a depth bound of O(log n) [8, Theorem 3.1]. For a tree with ω-balanced splits, the worst case runtime of Algorithm 1 is O  l + 1+ω 2 l n  . For the 2M-tree, ω-balanced splits are not enforced. Hence the actual value of ω could be high for a 2M-tree. Definition 3.2. Let Bℓ2(p, ∆) = {r ∈S : ∥p −r∥< ∆} denote the points in S contained in a ball of radius ∆around some p ∈S with respect to the ℓ2 metric. The expansion constant of (S, ℓ2) is defined as the smallest c ≥2 such Bℓ2(p, 2∆) ≤c Bℓ2(p, ∆) ∀p ∈S and ∀∆> 0. Bounded expansion constants correspond to growth-restricted metrics [15]. The expansion constant characterizes the data distribution, and c ∼2O(d) where d is the doubling dimension of the set S with respect to the ℓ2 metric. The relationship is exact for points on a D-dimensional grid (i.e., c = Θ(2D)). Equipped with these definitions, we have the following guarantee for Algorithm 1: Theorem 3.1. Consider a dataset S ⊂RD of n points with ψ = 1 2n2 P x,y∈S ∥x −y∥2, the BSP tree T built on S and a query q ∈RD with the following conditions : (C1) Let (A ∩(S ∪{q}), ℓ2) have an expansion constant at most ˜c for any convex set A ⊂RD. (C2) Let T be complete till a depth L < log2 n ˜c  /(1 −log2(1 −ω)) with ω-balanced splits. (C3) Let β∗correspond to the worst quantization error improvement rate over all splits in T. (C4) For any node A in the tree T, let maxx,y∈A∩S ∥x −y∥2 ≤ηVS(A) for a fixed η ≥8. For α = 1/(1 −ω), the upper bound du on the distance of q to the neighbor candidate p returned by Algorithm 1 with depth l ≤L is given by ∥q −p∥≤du = 2√ηψ · (2α)l/2 · exp(−l/2β∗) (n/(2α)l)1/ log2 ˜c −2 . (4) 2The distance error corresponds to the relative error in terms of the actual distance values. The rank is one more than the number of points in S which are better neighbor candidates than p. The nearest-neighbor of q has rank 1 and distance error 0. The appropriate notion of error depends on the search application. 4 Now η is fixed, and ψ is fixed for a dataset S. Then, for a fixed ω, this result implies that between two types of BSP-trees on the same set and the same query, Algorithm 1 has a better worst-case guarantee on the candidate-neighbor distance for the tree with better quantization performance (smaller β∗). Moreover, for a particular tree with β∗≥log2 e, du is non-decreasing in l. This is expected because as we traverse down the tree, we can never reduce the candidate neighbor distance. At the root level (l = 0), the candidate neighbor is the nearest-neighbor. As we descend down the tree, the candidate neighbor distance will worsen if a tree split separates the query from its closer neighbors. This behavior is implied in Equation (4). For a chosen depth l in Algorithm 1, the candidate neighbor distance is inversely proportional to n/(2α)l1/ log2 ˜c, implying deteriorating bounds du with increasing ˜c. Since log2 ˜c ∼O(d), larger intrinsic dimensionality implies worse guarantees as expected from the curse of dimensionality. To prove Theorem 3.1, we use the following result: Lemma 3.1. Under the conditions of Theorem 3.1, for any node A at a depth l in the BSP-tree T on S, VS(A) ≤ψ (2/(1 −ω))l exp(−l/β∗). This result is obtained by recursively applying the quantization error improvement in Definition 2.1 over l levels of the tree (the proof is in Appendix A). Proof of Theorem 3.1. Consider the node A at depth l in the tree containing q, and let m = |A ∩S|. Let D = maxx,y∈A∩S ∥x −y∥, let d = minx∈A∩S ∥q −x∥, and let Bℓ2(q, ∆) = {x ∈A ∩(S ∪ {q}): ∥q −x∥< ∆}. Then, by the Definition 3.2 and condition C1, Bℓ2(q, D + d) ≤˜clog2⌈D+d d ⌉|Bℓ2(q, d)| = ˜clog2⌈D+d d ⌉≤˜clog2( D+2d d ), where the equality follows from the fact that Bℓ2(q, d) = {q}. Now Bℓ2(q, D + d) ≥m. Using this above gives us m1/ log2 ˜c ≤(D/d) + 2. By condition C2, m1/ log2 ˜c > 2. Hence we have d ≤D/(m1/ log2 ˜c −2). By construction and condition C4, D ≤ p ηVS(A). Now m ≥n/(2α)l. Plugging this above and utilizing Lemma 3.1 gives us the statement of Theorem 3.1. Nearest-neighbor search error guarantees. Equipped with the bound on the candidate-neighbor distance, we bound the worst-case nearest-neighbor search errors as follows: Corollary 3.1. Under the conditions of Theorem 3.1, for any query q at a desired depth l ≤L in Algorithm 1, the distance error ϵ(q) is bounded as ϵ(q) ≤(du/d∗ q) −1, and the rank τ(q) is bounded as τ(q) ≤˜c⌈log2(du/d∗ q)⌉, where d∗ q = minr∈S ∥q −r∥. Proof. The distance error bound follows from the definition of distance error. Let R = {r ∈ S : ∥q −r∥< du}. By definition, τ(q) ≤|R| + 1. Let Bℓ2(q, ∆) = {x ∈(S ∪{q}): ∥q −x∥< ∆}. Since Bℓ2(q, du) contains q and R, and q /∈S, |Bℓ2(q, du)| = |R| + 1 ≥τ(q). From Definition 3.2 and Condition C1, |Bℓ2(q, du)| ≤˜c⌈log2(du/d∗ q)⌉|Bℓ2(q, d∗ q)|. Using the fact that |Bℓ2(q, d∗ q)| = |{q}| = 1 gives us the upper bound on τ(q). The upper bounds on both forms of search error are directly proportional to du. Hence, the BSPtree with better quantization performance has better search performance guarantees, and increasing traversal depth l implies less computation but worse performance guarantees. Any dependence of this approximation guarantee on the ambient data dimensionality is subsumed by the dependence on β∗and ˜c. While our result bounds the worst-case performance of Algorithm 1, an average case performance guarantee on the distance error is given by Eq ϵ(q) ≤du Eq 1/d∗ q  −1, and on the rank is given by Eq τ(q) ≤˜c⌈log2 du⌉ Eq c−(log2 d∗ q) , since the expectation is over the queries q and du does not depend on q. For the purposes of relative comparison among BSP-trees, the bounds on the expected error depend solely on du since the term within the expectation over q is tree independent. Dependence of the nearest-neighbor search error on the partition margins. The search error bounds in Corollary 3.1 depend on the true nearest-neighbor distance d∗ q of any query q of which we have no prior knowledge. However, if we partition the data with a large margin split, then we can say that either the candidate neighbor is the true nearest-neighbor of q or that d∗ q is greater than the size of the margin. We characterize the influence of the margin size with the following result: Corollary 3.2. Consider the conditions of Theorem 3.1 and a query q at a depth l ≤L in Algorithm 1. Further assume that γ is the smallest margin size on both sides of any partition in the tree T. Then the distance error is bounded as ϵ(q) ≤du/γ −1, and the rank is bounded as τ(q) ≤˜c⌈log2(du/γ)⌉. This result indicates that if the split margins in a BSP-tree can be increased without adversely affecting its quantization performance, the BSP-tree will have improved nearest-neighbor error guarantees 5 for the Algorithm 1. This motivated us to consider the max-margin tree [8], a BSP-tree that explicitly maximizes the margin of the split for every split in the tree. Explanation of the conditions in Theorem 3.1. Condition C1 implies that for any convex set A ⊂RD, ((A ∩(S ∪{q})), ℓ2) has an expansion constant at most ˜c. A bounded ˜c implies that no subset of (S ∪{q}), contained in a convex set, has a very high expansion constant. This condition implies that ((S ∪{q}), ℓ2) also has an expansion constant at most ˜c (since (S ∪{q}) is contained in its convex hull). However, if (S ∪{q}, ℓ2) has an expansion constant c, this does not imply that the data lying within any convex set has an expansion constant at most c. Hence a bounded expansion constant assumption for (A∩(S ∪{q}), ℓ2) for every convex set A ⊂RD is stronger than a bounded expansion constant assumption for (S ∪{q}, ℓ2)3. Condition C2 ensures that the tree is complete so that for every query q and a depth l ≤L, there exists a large enough tree node which contains q. Condition C3 gives us the worst quantization error improvement rate over all the splits in the tree. Condition C4 implies that the squared data diameter of any node A (maxx,y∈A∩S ∥x −y∥2) is within a constant factor of its quantization error VS(A). This refers to the assumption that the node A contains no outliers as described in Section 3 and only hyperplane partitions are used and their respective quantization improvement guarantees presented in Section 2 (Table 1) hold. By placing condition C4, we ignore the alternate partitioning scheme used to remove outliers for simplicity of analysis. If we allow a small fraction of the partitions in the tree to be this alternate split, a similar result can be obtained since the alternate split is the same for all BSP-tree. For two different kinds of hyperplane splits, if alternate split is invoked the same number of times in the tree, the difference in their worst-case guarantees for both the trees would again be governed by their worstcase quantization performance (β∗). However, for any fixed η, a harder question is whether one type of hyperplane partition violates the inlier condition more often than another type of partition, resulting in more alternate partitions. And we do not yet have a theoretical answer for this4. Empirical validation. We examine our theoretical results with 4 datasets – OPTDIGITS (D = 64, n = 3823, 1797 queries), TINY IMAGES (D = 384, n = 5000, 1000 queries), MNIST (D = 784, n = 6000, 1000 queries), IMAGES (D = 4096, n = 500, 150 queries). We consider the following BSP-trees: kd-tree, random-projection (RP) tree, principal axis (PA) tree, two-means (2M) tree and max-margin (MM) tree. We only use hyperplane partitions for the tree construction. This is because, firstly, the check for the presence of outliers (∆2 S(A) > ηVS(A)) can be computationally expensive for large n, and, secondly, the alternate partition is mostly for the purposes of obtaining theoretical guarantees. The implementation details for the different tree constructions are presented in Appendix C. The performance of these BSP-trees are presented in Figure 2. Trees with missing data points for higher depth levels (for example, kd-tree in Figure 2(a) and 2M-tree in Figures 2 (b) & (c)) imply that we were unable to grow complete BSP-trees beyond that depth. The quantization performance of the 2M-tree, PA-tree and MM-tree are significantly better than the performance of the kd-tree and RP-tree and, as suggested by Corollary 3.1, this is also reflected in their search performance. The MM-tree has comparable quantization performance to the 2M-tree and PA-tree. However, in the case of search, the MM-tree outperforms PA-tree in all datasets. This can be attributed to the large margin partitions in the MM-tree. The comparison to 2M-tree is not as apparent. The MM-tree and PA-tree have ω-balanced splits for small ω enforced algorithmically, resulting in bounded depth and bounded computation of O(l + n(1 + ω)l/2l) for any given depth l. No such balance constraint is enforced in the 2-means algorithm, and hence, the 2M-tree can be heavily unbalanced. The absence of complete BSP 2M-tree beyond depth 4 and 6 in Figures 2 (b) & (c) respectively is evidence of the lack of balance in the 2M-tree. This implies possibly more computation and hence lower errors. Under these conditions, the MM-tree with an explicit balance constraint performs comparably to the 2M-tree (slightly outperforming in 3 of the 4 cases) while still maintaining a balanced tree (and hence returning smaller candidate sets on average). 3A subset of a growth-restricted metric space (S, ℓ2) may not be growth-restricted. However, in our case, we are not considering all subsets; we only consider subsets of the form (A ∩S) where A ⊂RD is a convex set. So our condition does not imply that all subsets of (S, ℓ2) are growth-restricted. 4We empirically explore the effect of the tree type on the violation of the inlier condition (C4) in Appendix B. The results imply that for any fixed value of η, almost the same number of alternate splits would be invoked for the construction of different types of trees on the same dataset. Moreover, with η ≥8, for only one of the datasets would a significant fraction of the partitions in the tree (of any type) need to be the alternate partition. 6 (a) OPTDIGITS (b) TINY IMAGES (c) MNIST (d) IMAGES Figure 2: Performance of BSP-trees with increasing traversal depth. The top row corresponds to quantization performance of existing trees and the bottom row presents the nearest-neighbor error (in terms of mean rank τ of the candidate neighbors (CN)) of Algorithm 1 with these trees. The nearest-neighbor search error graphs are also annotated with the mean distance-error of the CN (please view in color). 4 Large margin BSP-tree We established that the search error depends on the quantization performance and the partition margins of the tree. The MM-tree explicitly maximizes the margin of every partition and empirical results indicate that it has comparable performance to the 2M-tree and PA-tree in terms of the quantization performance. In this section, we establish a theoretical guarantee for the MM-tree quantization performance. The large margin split in the MM-tree is obtained by performing max-margin clustering (MMC) with 2 clusters. The task of MMC is to find the optimal hyperplane (w∗, b∗) from the following optimization problem5 given a set of points S = {x1, x2, . . . , xm} ⊂RD: min w,b,ξi 1 2 ∥w∥2 2 + C m X i=1 ξi (5) s.t. |⟨w, xi⟩+ b| ≥1 −ξi, ξi ≥0 ∀i = 1, . . . , m (6) −ωm ≤ m X i=1 sgn(⟨w, xi⟩+ b) ≤ωm. (7) MMC finds a soft max-margin split in the data to obtain two clusters separated by a large (soft) margin. The balance constraint (Equation (7)) avoids trivial solutions and enforces an ω-balanced split. The margin constraints (Equation (6)) enforce a robust separation of the data. Given a solution to the MMC, we establish the following quantization error improvement rate for the MM-tree: Theorem 4.1. Given a set of points S ⊂RD and a region A containing m points, consider an ω-balanced max-margin split (w, b) of the region A into {Al, Ar} with at most αm support vectors and a split margin of size γ = 1/ ∥w∥. Then the quantization error improvement is given by: VS({Al, Ar}) ≤  1 − γ2 (1 −α)2  1−ω 1+ω  PD i=1 λi  VS(A), (8) where λ1, . . . , λD are the eigenvalues of the covariance matrix of A ∩S. The result indicates that larger margin sizes (large γ values) and a smaller number of support vectors (small α) implies better quantization performance. Larger ω implies smaller improvement, but ω is generally restricted algorithmically in MMC. If γ = O(√λ1) then this rate matches the best possible quantization performance of the PA-tree (Table 1). We do assume that we have a feasible solution to the MMC problem to prove this result. We use the following result to prove Theorem 4.1: Proposition 4.1. [7, Lemma 15] Give a set S, for any partition {A1, A2} of a set A, VS(A) −VS({A1, A2}) = |A1 ∩S||A2 ∩S| |A ∩S|2 ∥µ(A1) −µ(A2)∥2 , (9) where µ(A) is the centroid of the points in the region A. 5This is an equivalent formulation [16] to the original form of max-margin clustering proposed by Xu et al. (2005) [9]. The original formulation also contains the labels yis and optimizes over it. We consider this form of the problem since it makes our analysis easier to follow. 7 This result [7] implies that the improvement in the quantization error depends on the distance between the centroids of the two regions in the partition. Proof of Theorem 4.1. For a feasible solution (w, b, ξi|i=1,...,m) to the MMC problem, m X i=1 |⟨w, xi⟩+ b| ≥m − m X i=1 ξi. Let ˜xi = ⟨w, xi⟩+b and mp = |{i: ˜xi > 0}| and mn = |{i: ˜xi ≤0}| and ˜µp = (P i: ˜ xi>0 ˜xi)/mp and ˜µn = (P i: ˜ xi≤0 ˜xi)/mn. Then mp˜µp −mn˜µn ≥m −P i ξi. Without loss of generality, we assume that mp ≥mn. Then the balance constraint (Equation (7)) tells us that mp ≤m(1+ω)/2 and mn ≥m(1−ω)/2. Then ˜µp −˜µn +ω(˜µp + ˜µn) ≥2−2 m P i ξi. Since ˜µp > 0 and µn ≤0, |˜µp + ˜µn| ≤(˜µp −˜µn). Hence (1 + ω)(˜µp −˜µn) ≥2 −2 m P i ξi. For an unsupervised split, the data is always separable since there is no misclassification. This implies that ξ∗ i ≤1∀i. Hence, ˜µp −˜µn ≥  2 −2 m |{i: ξi > 0}|  /(1 + ω) ≥2 1 −α 1 + ω  , (10) since the term |{i: ξi > 0}| corresponds to the number of support vectors in the solution. Cauchy-Schwartz implies that ∥µ(Al) −µ(Ar)∥≥|⟨w, µ(Al) −µ(Ar)⟩|/ ∥w∥= (˜µp −˜µn)γ, since ˜µn = ⟨w, µ(Al)⟩+ b and ˜µp = ⟨w, µ(Ar)⟩+ b. From Equation (10), we can say that ∥µ(Al) −µ(Ar)∥2 ≥4γ2 (1 −α)2 / (1 + ω)2. Also, for ω-balanced splits, |Al||Ar| ≥ (1 −ω2)m2/4. Combining these into Equation (9) from Proposition 4.1, we have VS(A) −VS({Al, Ar}) ≥(1 −ω2)γ2 1 −α 1 + ω 2 = γ2 (1 −α)2 1 −ω 1 + ω  . (11) Let Cov(A ∩S) be the covariance matrix of the data contained in region A and λ1, . . . , λD be the eigenvalues of Cov(A ∩S). Then, we have: VS(A) = 1 |A ∩S| X x∈A∩S ∥x −µ(A)∥2 = tr (Cov(A ∩S)) = D X i=1 λi. Then dividing Equation (11) by VS(A) gives us the statement of the theorem. 5 Conclusions and future directions Our results theoretically verify that BSP-trees with better vector quantization performance and large partition margins do have better search performance guarantees as one would expect. This means that the best BSP-tree for search on a given dataset is the one with the best combination of good quantization performance (low β∗in Corollary 3.1) and large partition margins (large γ in Corollary 3.2). The MM-tree and the 2M-tree appear to have the best empirical performance in terms of the search error. This is because the 2M-tree explicitly minimizes β∗while the MM-tree explicitly maximizes γ (which also implies smaller β∗by Theorem 4.1). Unlike the 2M-tree, the MM-tree explicitly maintains an approximately balanced tree for better worst-case search time guarantees. However, the general dimensional large margin partitions in the MM-tree construction can be quite expensive. But the idea of large margin partitions can be used to enhance any simpler space partition heuristic – for any chosen direction (such as along a coordinate axis or along the principal eigenvector of the data covariance matrix), a one dimensional large margin split of the projections of the points along the chosen direction can be obtained very efficiently for improved search performance. This analysis of search could be useful beyond BSP-trees. Various heuristics have been developed to improve locality-sensitive hashing (LSH) [10]. The plain-vanilla LSH uses random linear projections and random thresholds for the hash-table construction. The data can instead be projected along the top few eigenvectors of the data covariance matrix. This was (empirically) improved upon by learning an orthogonal rotation of the projected data to minimize the quantization error of each bin in the hash-table [17]. A nonlinear hash function can be learned using a restricted Boltzmann machine [18]. If the similarity graph of the data is based on the Euclidean distance, spectral hashing [19] uses a subset of the eigenvectors of the similarity graph Laplacian. Semi-supervised hashing [20] incorporates given pairwise semantic similarity and dissimilarity constraints. The structural SVM framework has also been used to learn hash functions [21]. Similar to the choice of an appropriate BSP-tree for search, the best hashing scheme for any given dataset can be chosen by considering the quantization performance of the hash functions and the margins between the bins in the hash tables. We plan to explore this intuition theoretically and empirically for LSH based search schemes. 8 References [1] J. H. Friedman, J. L. Bentley, and R. A. Finkel. An Algorithm for Finding Best Matches in Logarithmic Expected Time. ACM Transactions in Mathematical Software, 1977. [2] N. Verma, S. Kpotufe, and S. Dasgupta. Which Spatial Partition Trees are Adaptive to Intrinsic Dimension? In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2009. [3] R.F. Sproull. Refinements to Nearest-Neighbor Searching in k-dimensional Trees. Algorithmica, 1991. [4] J. McNames. A Fast Nearest-Neighbor Algorithm based on a Principal Axis Search Tree. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2001. [5] K. Fukunaga and P. M. Nagendra. A Branch-and-Bound Algorithm for Computing k-NearestNeighbors. IEEE Transactions on Computing, 1975. [6] D. Nister and H. Stewenius. Scalable Recognition with a Vocabulary Tree. In IEEE Conference on Computer Vision and Pattern Recognition, 2006. [7] S. Dasgupta and Y. Freund. Random Projection trees and Low Dimensional Manifolds. In Proceedings of ACM Symposium on Theory of Computing, 2008. [8] P. Ram, D. Lee, and A. G. Gray. Nearest-neighbor Search on a Time Budget via Max-Margin Trees. In SIAM International Conference on Data Mining, 2012. [9] L. Xu, J. Neufeld, B. Larson, and D. Schuurmans. Maximum Margin Clustering. Advances in Neural Information Processing Systems, 2005. [10] P. Indyk and R. Motwani. Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality. In Proceedings of ACM Symposium on Theory of Computing, 1998. [11] T. Liu, A. W. Moore, A. G. Gray, and K. Yang. An Investigation of Practical Approximate Nearest Neighbor Algorithms. Advances in Neural Information Proceedings Systems, 2005. [12] S. Dasgupta and K. Sinha. Randomized Partition Trees for Exact Nearest Neighbor Search. In Proceedings of the Conference on Learning Theory, 2013. [13] J. He, S. Kumar and S. F. Chang. On the Difficulty of Nearest Neighbor Search. In Proceedings of the International Conference on Machine Learning, 2012. [14] Y. Freund, S. Dasgupta, M. Kabra, and N. Verma. Learning the Structure of Manifolds using Random Projections. Advances in Neural Information Processing Systems, 2007. [15] D. R. Karger and M. Ruhl. Finding Nearest Neighbors in Growth-Restricted Metrics. In Proceedings of ACM Symposium on Theory of Computing, 2002. [16] B. Zhao, F. Wang, and C. Zhang. Efficient Maximum Margin Clustering via Cutting Plane Algorithm. In SIAM International Conference on Data Mining, 2008. [17] Y. Gong and S. Lazebnik. Iterative Quantization: A Procrustean Approach to Learning Binary Codes. In IEEE Conference on Computer Vision and Pattern Recognition, 2011. [18] R. Salakhutdinov and G. Hinton. Learning a Nonlinear Embedding by Preserving Class Neighbourhood Structure. In Artificial Intelligence and Statistics, 2007. [19] Y. Weiss, A. Torralba, and R. Fergus. Spectral Hashing. Advances of Neural Information Processing Systems, 2008. [20] J. Wang, S. Kumar, and S. Chang. Semi-Supervised Hashing for Scalable Image Retrieval. In IEEE Conference on Computer Vision and Pattern Recognition, 2010. [21] M. Norouzi and D. J. Fleet. Minimal Loss Hashing for Compact Binary Codes. In Proceedings of the International Conference on Machine Learning, 2011. [22] S. Lloyd. Least Squares Quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982. 9
2013
232
4,968
Small-Variance Asymptotics for Hidden Markov Models Anirban Roychowdhury, Ke Jiang, Brian Kulis Department of Computer Science and Engineering The Ohio State University roychowdhury.7@osu.edu, {jiangk,kulis}@cse.ohio-state.edu Abstract Small-variance asymptotics provide an emerging technique for obtaining scalable combinatorial algorithms from rich probabilistic models. We present a smallvariance asymptotic analysis of the Hidden Markov Model and its infinite-state Bayesian nonparametric extension. Starting with the standard HMM, we first derive a “hard” inference algorithm analogous to k-means that arises when particular variances in the model tend to zero. This analysis is then extended to the Bayesian nonparametric case, yielding a simple, scalable, and flexible algorithm for discrete-state sequence data with a non-fixed number of states. We also derive the corresponding combinatorial objective functions arising from our analysis, which involve a k-means-like term along with penalties based on state transitions and the number of states. A key property of such algorithms is that— particularly in the nonparametric setting—standard probabilistic inference algorithms lack scalability and are heavily dependent on good initialization. A number of results on synthetic and real data sets demonstrate the advantages of the proposed framework. 1 Introduction Inference in large-scale probabilistic models remains a challenge, particularly for modern “big data” problems. While graphical models are undisputedly important as a way to build rich probability distributions, existing sampling-based and variational inference techniques still leave some applications out of reach. A recent thread of research has considered small-variance asymptotics of latent-variable models as a way to capture the benefits of rich graphical models while also providing a framework for designing more scalable combinatorial optimization algorithms. Such models are often motivated by the well-known connection between mixtures of Gaussians and k-means: as the variances of the Gaussians tend to zero, the mixture of Gaussians model approaches k-means, both in terms of objectives and algorithms. This approach has recently been extended beyond the standard Gaussian mixture in various ways—to Dirichlet process mixtures and hierarchical Dirichlet processes [8], to non-Gaussian observations in the nonparametric setting [7], and to feature learning via the Beta process [5]. The small-variance analysis for each of these models yields simple algorithms that feature many of the benefits of the probabilistic models but with increased scalability. In essence, small-variance asymptotics provides a link connecting some probabilistic graphical models with non-probabilistic combinatorial counterparts. Thus far, small-variance asymptotics has been applied only to fairly simple latent-variable models. In particular, to our knowledge there has been no such analysis for sequential data models such as the Hidden Markov Model (HMM) nor its nonparametric counterpart, the infinite-state HMM (iHMM). HMMs are one of the most widely used probabilistic models for discrete sequence data, with diverse applications including DNA sequence analysis, natural language processing and speech recognition [4]. The HMMs consist of a discrete hidden state sequence that evolves according 1 to Markov assumptions, along with independent observations at each time step depending on the hidden state. The learning problem is to estimate the model given only the observation data. To develop scalable algorithms for sequential data, we begin by applying small-variance analysis to the standard parametric HMM. In the small-variance limit, we obtain a penalized k-means problem where the penalties capture the state transitions. Further, a special case of the resulting model yields segmental k-means [9]. For the nonparametric model we obtain an objective that effectively combines the asymptotics from the parametric HMM with the asymptotics for the Hierarchical Dirichlet Process [8]. We obtain a k-means-like objective with three penalties: one for state transitions, one for the number of reachable states out of each state, and one for the number of total states. The key aspect of our resulting formulation is that, unlike the standard sampler for the infinite-state HMM, dynamic programming can be used. In particular, we describe a simple algorithm that monotonically decreases the underlying objective function. Finally, we present results comparing our non-probabilistic algorithms to their probabilistic counterparts, on a number of real and synthetic data sets. Related Work. In the parametric setting (i.e., the standard HMM), several algorithms exist for maximum likelihood (ML) estimation, such as the Baum-Welch algorithm (a special instance of the EM algorithm) and the segmental k-means algorithm [9]. Infinite-state HMMs [3, 12] are nonparametric Bayesian extensions of the finite HMMs where hierarchical Dirichlet process (HDP) priors are used to allow for an unspecified number of states. Exact inference in this model is intractable, so one typically resorts to sampling methods. The standard Gibbs sampling methods [12] are notoriously slow to converge and cannot exploit the forward-backward structure of the HMMs. [6] presents a Beam sampling method which bypasses this obstacle via slice sampling, where only a finite number of hidden states are considered in each iteration. However, this approach is still computationally intensive since it works in the non-collapsed space. Thus infinite-state HMMs, while desirable from a modeling perspective, have been limited by their inability to scale to large data sets—this is precisely the situation in which small-variance asymptotics has the potential to be beneficial. Connections between the mixture of Gaussians model and k-means are widely known. Beyond the references discussed earlier, we note that a similar connection relating probabilistic PCA and standard PCA was discussed in [13, 10], as well as connections between support vector machines and a restricted Bayes optimal classifier in [14]. 2 Asymptotics of the finite-state HMM We begin, as a warm-up, with the simpler parametric (finite-state) HMM model, and show that small-variance asymptotics on the joint log likelihood yields a penalized k-means objective, and on the EM algorithm yields a generalized segmental k-means algorithm. The tools developed in this section will then be used for the more involved nonparametric model. 2.1 The Model The Hidden Markov Model assumes a hidden state sequence Z = {z1, . . . , zN} drawn from a finite discrete state space {1, . . . , K}, coupled with the observation sequence X = {x1, . . . , xN}. The resulting generative model defines a probability distribution over the hidden state sequence Z and the observation sequence X. Let T ∈RK×K be the stationary transition probability matrix of the hidden state sequence with Ti. = πi ∈RK being a distribution over the latent states. For clarity of presentation, we will use a binary 1-of-K representation for the latent state assignments. That is, we will write the event of the latent state at time step t being k as ztk = 1 and ztl = 0 ∀l = 1...K, l ̸= k. Then the transition probabilities can be written as Tij = Pr(ztj = 1|zt−1,i = 1). The initial state distribution is π0 ∈RK. The Markov structure dictates that zt ∼Mult(πzt−1), and the observations follow xt ∼Φ(θzt). The observation density Φ is assumed invariant, and the Markov structure induces conditional independence of the observations given the latent states. In the following, we present the asymptotic treament for the finite HMM with Gaussian emission densities Pr(xt|ztk = 1) = N(xt|µk, σ2Id). Here θzt = µk, since the parameter space Θ contains only the emission means. Generalization to exponential family emission densities is straightforward[7]. At a high level, the connection we seek to establish can be proven in two ways. The first approach is to examine small-variance asymptotics directly on the the joint probability distribution of the HMM, as done in [5] for clustering and feature learning problems. We will primarily 2 focus on this approach, since our ideas can be more clearly expressed by this technique, and it is independent of any inference algorithm. The other approach is to analyze the behavior of the EM algorithm as the variance goes to zero. We will briefly discuss this approach as well, but for further details the interested reader can consult the supplementary material. 2.1.1 Exponential Family Transitions Our main analysis relies on appropriate manipulation of the transition probabilities, where we will use the bijection between exponential families and Bregman divergences established in [2]. Since the conditional distribution of the latent state at any time step is multinomial in the transition probabilities from the previous state, we use the aforementioned bijection to refactor the transition probabilities in the joint distribution of the HMM into a form than utilizes Bregman divergences. This, with an appropriate scaling to enable small-variance asymptotics as mentioned in [7], allows us to combine the emission and transition distributions into a simple objective function. We denote Tjk = Pr(ztk = 1|zt−1,j = 1) as before, and the multinomial distribution for the latent state at time step t as Pr(zt|zt−1,j = 1) = K Y k=1 T ztk jk . (1) In order to apply small-variance asymptotics, we must allow the variance in the transition probabilities to go to zero in a reasonable way. Following the treatment in [2], we can rewrite this distribution in a suitable exponential family notation, which we then express in the following equivalent form: Pr(zt|zt−1,j = 1) = exp(−dφ(zt, mj))bφ(zt), (2) where the Bregman divergence dφ(zt, mj) = PK k=1 ztk log (ztk/Tjk) = KL(zt, mj), mj = {Tjk}K k=1 and bφ(zt) = 1. See the supplementary notes for derivation details. The prime motivation for using this form is that we can appropriately scale the variance of the exponential family distribution following Lemma 3.1 of [7]. In particular, if we introduce a new parameter ˆβ, and generalize the transition probabilities to be Pr(zt|zt−1,j = 1) = exp(−ˆβdφ(zt, mj))b ˜φ(zt), where ˜φ = ˆβφ, then the mean of the distribution is the same in the scaled distribution (namely, mj) while the variance is scaled. As ˆβ →∞, the variance goes to zero. The next step is to link the emission and transition probabilities so that the variance is scaled appropriately in both. In particular, we will define β = 1/2σ2 and then let ˆβ = λβ for some λ. The Gaussian emission densities can now be written as Pr(xt|ztk = 1) = exp(−β∥xt −µk∥2 2)f(β) and the transition probabilities as Pr(zt|zt−1,j = 1) = exp(−λβdφ(zt, mj))b ˜φ(zt). See [7] for further details about the scaling operation. 2.1.2 Joint Probability Asymptotics We now have all the background development required to perform small-variance asymptotics on the HMM joint probability, and derive the segmental k-means algorithm. Our parameters of interest are the Z = [z1, ..., zN] vectors, the µ = [µ1, ..., µK] means, and the transition parameter matrix T. We can write down the joint likelihood by taking a product of all the probabilities in the model: p(X, Z) = p(z1) N Y t=2 p(zt|zt−1) N Y t=1 N(xt|µzt, σ2Id), With some abuse of notation, let mzt−1 denote the mean transition vector given by the assignment zt−1 (that is, if zt−1,j = 1 then mzt−1 = mj). The exp-family probabilities above allow us to rewrite this joint likelihood as p(X, Z) ∝exp " −β N X t=1 ∥xt −µzt∥2 2 + λ N X t=2 KL(zt, mzt−1) ! + log p(z1) # . (3) 3 To obtain the corresponding non-probabilistic objective from small-variance asymptotics, we consider the MAP estimate obtained by maximizing the joint likelihood with respect to the parameters asymptotically as σ2 goes to zero (β goes to ∞). In our case, it is particularly simple given the joint likelihood above. The log-likelihood easily yields the following asymptotically: max Z,µ,T − N X t=1 ∥xt −µzt∥2 2 + λ N X t=2 KL(zt, mzt−1) ! (4) or equivalently, min Z,µ,T N X t=1 ∥xt −µzt∥2 2 + λ N X t=2 KL(zt, mzt−1) ! . (5) Note that, as mentioned above, mj =  Tjk K k=1. We can view the above objective function as a “penalized” k-means problem, where the penalties are given by the transitions from state to state. One possible strategy to minimize (5) would be to iteratively minimize with respect to each of the individual parameters (Z, µ, T) keeping the other two fixed. When fixing µ and T, and taking λ = 1, the solution for Z in (4) is identical to the MAP update on the latent variables Z for this model, as in a standard HMM. When λ ̸= 1, a simple generalization of the standard forward-backward routine can be used to find the optimal assignments. Keeping Z and T fixed, the update on µk is easily seen to be the equiweighted average of the data points which have been assigned to latent state k in the MAP estimate (it is the same minimization as in k-means for updating cluster means). Finally, since KL(zt, mj) ∝− K P k=1 log Tjk, minimization with respect to T simply yields the empirical transition probabilities, that is Tjk,new = # of transitions from state j to k # of transitions from state j , both counts from the MAP path computed during maximization w.r.t Z. We observe that, when λ = 1, the iterative minimization algorithm to solve (5) is exactly the segmental k-means algorithm, also known as Viterbi re-estimation. 2.1.3 EM algorithm asymptotics We can reach the same algorithm alternatively by writing down the steps of the EM algorithm and exploring the small-variance limit of these steps, analogous to the approach of [8] for a Dirichlet process mixture. Given space limitations (and the fact that the resulting algorithm is identical, as expected), a more detailed discussion can be found in the supplementary material. 3 Asymptotics of the Infinite Hidden Markov Model We now tackle the more complex nonparametric model. We will derive the objective function directly as in the parametric case but, unlike the parametric version, we will not apply asymptotics to the existing sampler algorithms. Instead, we will present a new algorithm to optimize our derived objective function. By deriving an algorithm directly, we ensure that our method takes advantage of dynamic programming, unlike the standard sampler. 3.1 The Model The iHMM, also known as the HDP-HMM [3, 12] is a nonparametric Bayesian extension to the HMM, where an HDP prior is used to allow for an unspecified number of states. The HDP is a set of Dirichlet Processes (DPs) with a shared base distribution, that are themselves drawn from a Dirichlet process [12]. Formally, we can write Gk ∼DP(α, G0) with a shared base distribution G0 ∼DP(γ, H), where H is the global base distribution that permits sharing of probability mass across Gks. α and γ are the concentration parameters for the Gk and G0 measures, respectively. To apply HDPs to sequential data, the iHMM can be formulated as follows: β ∼GEM(γ), πk|β ∼DP(α, β), θk ∼H, zt|zt−1 ∼Mult(πzt−1), xt ∼Φ(θzt). For a full Bayesian treatment, Gamma priors are placed on the concentration parameters (though we will not employ such priors in our asymptotic analysis). 4 Following the discussion in the parametric case, our goal is to write down the full joint likelihood in the above model. As discussed in [12], the Hierarchical Dirichlet Process yields assignments that follow the Chinese Restaurant Franchise (CRF), and thus the iHMM model additionally incorporates a term in the joint likelihood involving the prior probability of a set of state assignments arising from the CRF. Suppose an assignment of observations to states has K different states (i.e., number of restaurants in the franchise), si is the number of states that can be reached from state i in one step (i.e., number of tables in each restaurant i), and ni is the number observations in each state i (i.e., number of customers in each restaurant). Then the probability of an assignment in the HDP can be written as (after integrating out mixture weights [1, 11], and if we only consider terms that would not be constants after we do the asymptotic analysis [5]): p(Z|α, γ, λ) ∝γK−1 Γ(γ + 1) Γ(γ + PK k=1 sk) K Y k=1 αsk−1 Γ(α + 1) Γ(α + ni). For the likelihood, we follow the same assumption as in the parametric case: the observation densities are Gaussians with a shared covariance matrix σ2Id. Further, the means are drawn independently from the prior N(0, ρ2Id), where ρ2 > 0 (this is needed, as the model is fully Bayesian now). Therefore, p(µ1:K) = QK k=1 N(µk|0, ρ2Id), and p(X, Z) ∝p(Z|α, γ, λ) · p(z1) N Y t=2 p(zt|zt−1) · N Y t=1 N(xt|µzt, σ2Id) · p(µ1:K). Now, we can perform the small-variance analysis on the generative model. In order to retain the impact of the hyperparameters α and γ in the asymptotics, we can choose some constants λ1, λ2 > 0 such that α = exp(−λ1β), γ = exp(−λ2β), where β = 1/(2σ2) as before. Note that, in this way, we have α →0 and γ →0 when β →∞. We now can consider the objective function for maximizing the generative probability as we let β →∞. This gives p(X, Z) ∝ exp h −β N X t=1 ∥xt −µzt∥2 + λ N X t=2 KL(zt, mzt−1) + λ1 K X k=1 (sk −1) + λ2(K −1) ! + log(p(z1)) i . (6) Therefore, maximizing the generative probability is asymptotically equivalent to the following optimization problem: min K,Z,µ,T N X t=1 ∥xt −µzt∥2 + λ N X t=2 KL(zt, mzt−1) + λ1 K X k=1 (sk −1) + λ2(K −1). (7) In words, this objective seeks to minimize a penalized k-means objective, with three penalties. The first is the same as in the parametric case—a penalty based on the transitions from state to state. The second penalty penalizes the number of transitions out of each state, and the third penalty penalizes the total number of states. Note this is similar to the objective function derived in [8] for the HDP, but here there is no dependence on any particular samplers. This can also be considered as MAP estimation of the parameters, since p(Z, µ|X) ∝p(X|Z)p(Z)p(µ). 3.2 Algorithm The algorithm presented in [8] could be almost directly applied to (7) but it neglects the sequential characteristics of the model. Instead, we present a new algorithm to directly optimize (7). We follow the alternating minimization framework as in the parametric case, with some slight tweaks. Specifically, given observations {x1, . . . , xN}, λ, λ1, λ2, our high-level algorithm proceeds as follows: (1) Initialization: initialize with one hidden state. The parameters are therefore K = 1, µ1 = 1 N PN i=1 xi, T = 1. (2) Perform a forward-backward step (via approximate dynamic programming) to update Z. 5 (3) Update K, µ, T. (4) For each state i, (i = 1, . . . , K), check if the set of observations to any state j that are reached by transitioning out of i can form a new dedicated hidden state and lower the objective function in the process. If there are several such moves, choose the one with the maximum improvement in objective function. (5) Update K, µ, T. (6) Iterate steps (2)-(5) until convergence. There are two key changes to the algorithm beyond the standard parametric case. In the forwardbackward routine (step 2), we compute the usual K × N matrix α, where α(c, t) represents the minimum cost over paths of length t from the beginning of the sequence and that reach state c at time step t. We use the term “cost” to refer to the sum of the distances of points to state means, as well as the additive penalties incurred. However, to see why it is difficult to compute the exact value of α in the nonparametric case, suppose we have computed the minimum cost of paths up to step t −1 and we would like to compute the values of α for step t. The cost of a path that ends in state c is obtained by examining, for all states i, the cost of a path that ends at i at step t −1 and then transitions to state c at step t. Thus, we must consider the transition from i to c. If there are existing transitions from state i to state c, then we proceed as in a standard forward-backward algorithm. However, we are also interested in two other cases—one where there are no existing transitions from i to c but we consider this transition along with a penalty λ1, and another where an entirely new state is formed and we pay a penalty λ2. In the first case, the standard forwardbackward routine faces an immediate problem, since when we try to compute the cost of the path given by α(c, t), the cost will be infinite as there is a −log(0) term from the transition probability. We must therefore alter the forward-backward routine, or there will never be new states created nor transitions to an existing state which previously had no transitions. The main idea is to derive and use bounds on how much the transition matrix can change under the above scenarios. As long as we can show that the values we obtain for α are upper bounds, then we can show that the objective function will decrease after the forward-backward routine, as the existing sequence of states is also a valid path (with no new incurred penalties). The second change (step 4) is that we adopt a “local move” analogous to that described for the hard HDP in [8]. This step determines if the objective will decrease if we create a new global state in a certain fashion; in particular, for each existing state j, we compute the change in objective that occurs when data points that transition from j to some state k are given their own new global state. By construction this step decreases the objective. Due to space constraints, full details of the algorithm, along with a local convergence proof, are provided in the supplementary material (section B). 4 Experiments We conclude with a brief set of experiments designed to highlight the benefits of our approach. Namely, we will show that our methods have benefits over the existing parametric and nonparametric HMM algorithms in terms of speed and accuracy. Synthetic Data. First we compare our nonparametric algorithm with the Beam Sampler for the iHMM1. A sequence of length 3000 was generated over a varying number of hidden states with the all-zeros transition matrix except that Ti,i+1 = 0.8 and Ti,i+2 = 0.2 (when i + 1 > K, the total number of states, we choose j = i + 1 mod K and let Ti,j = 0.8, and similarly for i + 2). Observations were sampled from symmetric Gaussian distributions with means of {3, 6, . . . , 3K} and a variance of 0.9. The data described above were trained using our nonparametric algorithm (asymp-iHMM) and the Beam sampler. For our nonparametric algorithm, we performed a grid search over all three parameters and selected the parameters using a heuristic (see the supplementary material for a discussion of this heuristic). For the Beam sampling algorithm, we used the following hyperparameter settings: gamma hyperpriors (4, 1) for α, (3, 6) for γ, and a zero mean normal distribution for the base H with the variance equal to 10% of the empirical variance of the dataset. We also normalized the sequence to have zero mean. The number of selected samples was varied among 10, 100, and 1000 1http://mloss.org/software/view/205/ 6 for different numbers of states, with 5 iterations between two samples. (Note: there are no burn-in iterations and all samplers are initialized with a randomly initialized 20-state labeling.) 0.0 0.2 0.4 0.6 0.8 1.0 Training Accuracy # of states NMI Score AsymIhmm Beam10 Beam100 Beam1000 2 4 6 8 10 0 1 2 3 4 5 6 7 Training Time # of states Log of the time AsymIhmm Beam10 Beam100 Beam1000 2 4 6 8 10 Figure 1: Our algorithm (asymp-iHMM) vs. the Beam Sampler on the synthetic Gaussian hidden Markov model data. (Left) The training accuracy; (Right) The training time on a log-scale. In Figure 1 (best viewed in color), the training accuracy and running time for the two algorithms are shown, respectively. The accuracy of the Beam sampler is given by the highest among all the samples selected. The accuracy is shown in terms of the normalized mutual information (NMI) score (in the range of [0,1]), since the sampler may output different number of states than the ground truth and NMI can handle this situation. We can see that, in all datasets, our algorithm performs better than the sampling method in terms of accuracy, but with running time similar to the sampler with only 10 samples. For these datasets, we also observe that the EM algorithm for the standard HMM (not reported in the figure) can easily output a smaller number of states than the ground truth, which yields a smaller NMI score. We also observed that the Beam sampler is highly sensitive to the initialization of hyperparameters. Putting flat priors over the hyperparameters can ameliorate the situation, but also substantially increases the number of samples required. Next we demonstrate the effect of the compensation parameter λ in the parametric asymptotic model, along with comparisons to the standard HMM. We will call the generalized segmental k-means of Section 2 the ‘asymp-HMM’ algorithm, shortened to ‘AHMM’ as appropriate. For this experiment, we used univariate Gaussians with means at 3, 6, and 10, and standard deviation of 2.9. In our ground-truth transition kernel, state i had an 80% prob. of transitioning to state i+1, and 10% prob. of transitioning to each of the other states. 5000 datapoints were generated from this model. The first 40% of the data was used for training, and the remaining 60% for prediction. The means in both the standard HMM and the asymp-HMM were initialized by the centroids learned by k-means from the training data. The transition kernels were initialized randomly. Each algorithm was run 50 times; the averaged results are shown in Figure 2. Figure 2: NMI and prediction error as a function of the compensation parameter λ Figure 2 shows the effect of λ on accuracy as measured by NMI and scaled prediction error. We see the expected tradeoff: for small λ, the problem essentially reduces to standard kmeans, whereas for large λ the observations are essentially ignored. For λ = 1, corresponding to standard segmental k-means, we obtain results similar to the standard HMM, which obtains an NMI of .57 and error of 1.16. Thus, the parametric method offers some added flexibility via the new λ parameter. Financial time-series prediction. Our next experiment illustrates the advantages of our algorithms in a financial prediction problem. The sequence consists of 3668 values of the Standard & Poor’s 500 index on consecutive trading days 7 Figure 3: Predicted values of the S&P 500 index from 12/29/1999 to 07/30/2012 returned by the asymp-HMM, asymp-iHMM and the standard HMM algorithms, with the true index values for that period (better in color); see text for details. from Jan 02, 1998 to July 30, 20122. The index exhibited appreciable variability in this period, with both bull and bear runs. The goal here was to predict the index value on a test sequence of trading days, and compare the accuracies and runtimes of the algorithms. To prevent overfitting, we used a training window of length 500. This window size was empirically chosen to provide a balance between prediction accuracy and runtime. The algorithms were trained on the sequence from index i to i + 499, and then the i + 500-th value was predicted and compared with the actual recorded value at that point in the sequence. i ranged from 1 to 3168. As before, the mixture means were initialized with k-means and the transition kernels were given random initial values. For the asymp-HMM and the standard HMM, the number of latent states was empirically chosen to be 5. For the asymp-iHMM, we tune the parameters to get also 5 states on average. For predicting observation T + 1 given observations up to step T, we used the weighted average of the learned state means, weighted by the transition probabilities given by the state of the observation at time T. We ran the standard HMM along with both the parametric and non-parametric asymptotic algorithms on this data (the Beam sampler was too slow to run over this data, as each individual prediction took on the order of minutes). The values predicted from time step 501 to 3668 are plotted with the true index values in that time range in Figure 3. Both the parametric and non-parametric asymptotic algorithms perform noticably better than the standard HMM; they are able to better approximate the actual curve across all kinds of temporal fluctuations. Indeed, the difference is most stark in the areas of high-frequency oscillations. While the standard HMM returns an averaged-out prediction, our algorithms latch onto the underlying behavior almost immediately and return noticably more accurate predictions. Prediction accuracy has been measured using the mean absolute percentage (MAP) error, which is the mean of the absolute differences of the predicted and true values expressed as percentages of the true values. The MAP error for the HMM was 6.44%, that for the asymp-HMM was 3.16%, and that for the asymp-iHMM was 2.78%. This confirms our visual perception of the asymp-iHMM algorithm returning the best-fitted prediction in Figure 3. Additional Real-World Results. We also compared our methods on a well-log data set that was used for testing the Beam sampler. Due to space constraints, further discussion of these results is included in the supplementary material. 5 Conclusion This paper considered an asymptotic treatment of the HMM and iHMM. The goal was to obtain non-probabilistic formulations inspired by the HMM, in order to expand small-variance asymptotics to sequential models. We view our main contribution as a novel dynamic-programming-based algorithm for sequential data with a non-fixed number of states that is derived from the iHMM model. Acknowledgements This work was supported by NSF award IIS-1217433. 2http://research.stlouisfed.org/fred2/series/SP500/downloaddata 8 References [1] C. E. Antoniak. Mixtures of Dirichlet processes with applications to Bayesian nonparametric problems. The Annals of Statistics, 2(6):1152–1174, 1974. [2] A. Banerjee, S. Merugu, I. S. Dhillon, and J. Ghosh. Clustering with Bregman divergences. Journal of Machine Learning Research, 6:1705–1749, 2005. [3] M. J. Beal, Z. Ghahramani, and C. E. Rasmussen. The infinite hidden Markov model. In Advances in neural information processing systems, 2002. [4] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [5] T. Broderick, B. Kulis, and M. I. Jordan. MAD-Bayes: MAP-based asymptotic derivations from Bayes. In Proceedings of the 30th International Conference on Machine Learning, 2013. [6] J. V. Gael, Y. Saatci, Y. W. Teh, and Z. Ghahramani. Beam sampling for the infinite hidden Markov model. In Proceedings of the 25th International Conference on Machine Learning, 2008. [7] K. Jiang, B. Kulis, and M. I. Jordan. Small-variance asymptotics for exponential family Dirichlet process mixture models. In Advances in Neural Information Processing Systems, 2012. [8] B. Kulis and M. I. Jordan. Revisiting k-means: New algorithms via Bayesian nonparametrics. In Proceedings of the 29th International Conference on Machine Learning, 2012. [9] L. R. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. [10] S. Roweis. EM algorithms for PCA and SPCA. In Advances in Neural Information Processing Systems, 1998. [11] E. Sudderth. Toward reliable Bayesian nonparametric learning. In NIPS Workshop on Bayesian Noparametric Models for Reliable Planning and Decision-Making Under Uncertainty, 2012. [12] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101(476):1566–1581, 2006. [13] M. E. Tipping and C. M. Bishop. Probabilistic principal component analysis. Journal of Royal Statistical Society, Series B, 21(3):611–622, 1999. [14] S. Tong and D. Koller. Restricted Bayes optimal classifiers. In Proc. 17th AAAI Conference, 2000. 9
2013
233
4,969
Sparse Overlapping Sets Lasso for Multitask Learning and its Application to fMRI Analysis Nikhil S. Rao† nrao2@wisc.edu Christopher R. Cox# crcox@wisc.edu Robert D. Nowak† nowak@ece.wisc.edu Timothy T. Rogers# ttrogers@wisc.edu † Department of Electrical and Computer Engineering, # Department of Psychology University of Wisconsin- Madison Abstract Multitask learning can be effective when features useful in one task are also useful for other tasks, and the group lasso is a standard method for selecting a common subset of features. In this paper, we are interested in a less restrictive form of multitask learning, wherein (1) the available features can be organized into subsets according to a notion of similarity and (2) features useful in one task are similar, but not necessarily identical, to the features best suited for other tasks. The main contribution of this paper is a new procedure called Sparse Overlapping Sets (SOS) lasso, a convex optimization that automatically selects similar features for related learning tasks. Error bounds are derived for SOSlasso and its consistency is established for squared error loss. In particular, SOSlasso is motivated by multisubject fMRI studies in which functional activity is classified using brain voxels as features. Experiments with real and synthetic data demonstrate the advantages of SOSlasso compared to the lasso and group lasso. 1 Introduction Multitask learning exploits the relationships between several learning tasks in order to improve performance, which is especially useful if a common subset of features are useful for all tasks at hand. The group lasso (Glasso) [19, 8] is naturally suited for this situation: if a feature is selected for one task, then it is selected for all tasks. This may be too restrictive in many applications, and this motivates a less rigid approach to multitask feature selection. Suppose that the available features can be organized into overlapping subsets according to a notion of similarity, and that the features useful in one task are similar, but not necessarily identical, to those best suited for other tasks. In other words, a feature that is useful for one task suggests that the subset it belongs to may contain the features useful in other tasks (Figure 1). In this paper, we introduce the sparse overlapping sets lasso (SOSlasso), a convex program to recover the sparsity patterns corresponding to the situations explained above. SOSlasso generalizes lasso [16] and Glasso, effectively spanning the range between these two well-known procedures. SOSlasso is capable of exploiting the similarities between useful features across tasks, but unlike Glasso it does not force different tasks to use exactly the same features. It produces sparse solutions, but unlike lasso it encourages similar patterns of sparsity across tasks. Sparse group lasso [14] is a special case of SOSlasso that only applies to disjoint sets, a significant limitation when features cannot be easily partitioned, as is the case of our motivating example in fMRI. The main contribution of this paper is a theoretical analysis of SOSlasso, which also covers sparse group lasso as a special case (further differentiating us from [14]). The performance of SOSlasso is analyzed, error 1 bounds are derived for general loss functions, and its consistency is shown for squared error loss. Experiments with real and synthetic data demonstrate the advantages of SOSlasso relative to lasso and Glasso. 1.1 Sparse Overlapping Sets SOSlasso encourages sparsity patterns that are similar, but not identical, across tasks. This is accomplished by decomposing the features of each task into groups G1 . . . GM, where M is the same for each task, and Gi is a set of features that can be considered similar across tasks. Conceptually, SOSlasso first selects subsets that are most useful for all tasks, and then identifies a unique sparse solution for each task drawing only from features in the selected subsets. In the fMRI application discussed later, the subsets are simply clusters of adjacent spatial data points (voxels) in the brains of multiple subjects. Figure 1 shows an example of the patterns that typically arise in sparse multitask learning applications, where rows indicate features and columns correspond to tasks. Past work has focused on recovering variables that exhibit within and across group sparsity, when the groups do not overlap [14], finding application in genetics, handwritten character recognition [15] and climate and oceanography [2]. Along related lines, the exclusive lasso [21] can be used when it is explicitly known that variables in certain sets are negatively correlated. (a) Sparse (b) Group sparse (c) Group sparse plus sparse (d) Group sparse and sparse Figure 1: A comparison of different sparsity patterns. (a) shows a standard sparsity pattern. An example of group sparse patterns promoted by Glasso [19] is shown in (b). In (c), we show the patterns considered in [6]. Finally, in (d), we show the patterns we are interested in this paper. 1.2 fMRI Applications In psychological studies involving fMRI, multiple participants are scanned while subjected to exactly the same experimental manipulations. Cognitive Neuroscientists are interested in identifying the patterns of activity associated with different cognitive states, and construct a model of the activity that accurately predicts the cognitive state evoked on novel trials. In these datasets, it is reasonable to expect that the same general areas of the brain will respond to the manipulation in every participant. However, the specific patterns of activity in these regions will vary, both because neural codes can vary by participant [4] and because brains vary in size and shape, rendering neuroanatomy only an approximate guide to the location of relevant information across individuals. In short, a voxel useful for prediction in one participant suggests the general anatomical neighborhood where useful voxels may be found, but not the precise voxel. While logistic Glasso [17], lasso [13], and the elastic net penalty [12] have been applied to neuroimaging data, these methods do not exclusively take into account both the common macrostructure and the differences in microstructure across brains. SOSlasso, in contrast, lends itself well to such a scenario, as we will see from our experiments. 1.3 Organization The rest of the paper is organized as follows: in Section 2, we outline the notations that we will use and formally set up the problem. We also introduce the SOSlasso regularizer. We derive certain key properties of the regularizer in Section 3. In Section 4, we specialize the problem to the multitask linear regression setting (2), and derive consistency rates for the same, leveraging ideas from [9]. We outline experiments performed on simulated data in Section 5. In this section, we also perform logistic regression on fMRI data, and argue that the use of the SOSlasso yields interpretable multivariate solutions compared to Glasso and lasso. 2 2 Sparse Overlapping Sets Lasso We formalize the notations used in the sequel. Lowercase and uppercase bold letters indicate vectors and matrices respectively. We assume a multitask learning framework, with a data matrix Φt ∈Rn×p for each task t ∈{1, 2, . . . , T }. We assume there exists a vector x⋆ t ∈Rp such that measurements obtained are of the form yt = Φtx⋆ t + ηt ηt ∼N(0, σ2I). Let X⋆:= [x⋆ 1 x⋆ 2 . . . x⋆ T ] ∈Rp×T . Suppose we are given M (possibly overlapping) groups ˜G = { ˜G1, ˜G2, . . . , ˜GM}, so that ˜Gi ⊂{1, 2, . . . , p} ∀i, of maximum size B. These groups contain sets of “similar” features, the notion of similarity being application dependent. We assume that all but k ≪M groups are identically zero. Among the active groups, we further assume that at most only a fraction α ∈(0, 1) of the coefficients per group are non zero. We consider the following optimization program in this paper ˆ X = arg min x ( T X t=1 LΦt(xt) + λnh(x) ) (1) where x = [xT 1 xT 2 . . . xT T ]T , h(x) is a regularizer and Lt := LΦt(xt) denotes the loss function, whose value depends on the data matrix Φt. We consider least squares and logistic loss functions. In the least squares setting, we have Lt = 1 2n∥yt −Φtxt∥2. We reformulate the optimization problem (1) with the least squares loss as bx = arg min x  1 2n∥y −Φx∥2 2 + λnh(x)  (2) where y = [yT 1 yT 2 . . . yT T ]T and the block diagonal matrix Φ is formed by block concatenating the Φ′ ts. We use this reformulation for ease of exposition (see also [8] and references therein). Note that x ∈RT p, y ∈RT n, and Φ ∈RT n×T p. We also define G = {G1, G2, . . . , GM} to be the set of groups defined on RT p formed by aggregating the rows of X that were originally in ˜G, so that x is composed of groups G ∈G. We next define a regularizer h that promotes sparsity both within and across overlapping sets of similar features: h(x) = inf W X G∈G (αG∥wG∥2 + ∥wG∥1) s.t. X G∈G wG = x (3) where the αG > 0 are constants that balance the tradeoff between the group norms and the ℓ1 norm. Each wG has the same size as x, with support restricted to the variables indexed by group G. W is a set of vectors, where each vector has a support restricted to one of the groups G ∈G: W = {wG ∈RT p| [wG]i = 0 if i /∈G} where [wG]i is the ith coefficient of wG. The SOSlasso is the optimization in (1) with h(x) as defined in (3). We say the set of vectors wG is an optimal decomposition of x if they achieve the inf in (3). The objective function in (3) is convex and coercive. Hence, ∀x, an optimal decomposition always exists. As the αG →∞the ℓ1 term becomes redundant, reducing h(x) to the overlapping group lasso penalty introduced in [5], and studied in [10, 11]. When the αG →0, the overlapping group lasso term vanishes and h(x) reduces to the lasso penalty. We consider αG = 1 ∀G. All the results in the paper can be easily modified to incorporate different settings for the αG. Support Values P G ∥xG∥2 ∥x∥1 P G (∥xG∥2 + ∥xG∥1) {1, 4, 9} {3, 4, 7} 12 14 26 {1, 2, 3, 4, 5} {2, 5, 2, 4, 5} 8.602 18 26.602 {1, 3, 4} {3, 4, 7} 8.602 14 22.602 Table 1: Different instances of a 10-d vector and their corresponding norms. The example in Table 1 gives an insight into the kind of sparsity patterns preferred by the function h(x). The optimization problems (1) and (2) will prefer solutions that have a small value of h(·). 3 Consider 3 instances of x ∈R10, and the corresponding group lasso, ℓ1, and h(x) function values. The vector is assumed to be made up of two groups, G1 = {1, 2, 3, 4, 5} and G2 = {6, 7, 8, 9, 10}. h(x) is smallest when the support set is sparse within groups, and also when only one of the two groups is selected. The ℓ1 norm does not take into account sparsity across groups, while the group lasso norm does not take into account sparsity within groups. To solve (1) and (2) with the regularizer proposed in (3), we use the covariate duplication method of [5], to reduce the problem to a non overlapping sparse group lasso problem. We then use proximal point methods [7] in conjunction with the MALSAR [20] package to solve the optimization problem. 3 Error Bounds for SOSlasso with General Loss Functions We derive certain key properties of the regularizer h(·) in (3), independent of the loss function used. Lemma 3.1 The function h(x) in (3) is a norm The proof follows from basic properties of norms and because if wG, vG are optimal decompositions of x, y, then it does not imply that wG + vG is an optimal decomposition of x + y. For a detailed proof, please refer to the supplementary material. The dual norm of h(x) can be bounded as h∗(u) = max x {xT u} s.t. h(x) ≤1 = max W { X G∈G wT GuG} s.t. X G∈G (∥wG∥2 + ∥wG∥1) ≤1 (i) ≤max W { X G∈G wT GuG} s.t. X G∈G 2∥wG∥2 ≤1 = max W { X G∈G wT GuG} s.t. X G∈G ∥wG∥2 ≤1 2 ⇒h∗(u) ≤max G∈G 1 2∥uG∥2 (4) (i) follows from the fact that the constraint set in (i) is a superset of the constraint set in the previous statement, since ∥a∥2 ≤∥a∥1. (4) follows from noting that the maximum is obtained by setting wG∗= uG∗ 2∥uG∗∥2 , where G∗= arg maxG∈G ∥uG∥2. The inequality (4) is far more tractable than the actual dual norm, and will be useful in our derivations below. Since h(·) is a norm, we can apply methods developed in [9] to derive consistency rates for the optimization problems (1) and (2). We will use the same notations as in [9] wherever possible. Definition 3.2 A norm h(·) is decomposable with respect to the subspace pair sA ⊂sB if h(a + b) = h(a) + h(b) ∀a ∈sA, b ∈sB⊥. Lemma 3.3 Let x⋆∈Rp be a vector that can be decomposed into (overlapping) groups with withingroup sparsity. Let G⋆⊂G be the set of active groups of x⋆. Let S = supp(x⋆) indicate the support set of x. Let sA be the subspace spanned by the coordinates indexed by S, and let sB = sA. We then have that the norm in (3) is decomposable with respect to sA, sB The result follows in a straightforward way from noting that supports of decompositions for vectors in sA and sB⊥do not overlap. We defer the proof to the supplementary material. Definition 3.4 Given a subspace sB, the subspace compatibility constant with respect to a norm ∥∥is given by Ψ(B) = sup h(x) ∥x∥∀x ∈sB\{0}  Lemma 3.5 Consider a vector x that can be decomposed into G⋆⊂G active groups. Suppose the maximum group size is B, and also assume that a fraction α ∈(0, 1) of the coordinates in each active group is non zero. Then, h(x) ≤(1 + √ Bα) p |G⋆|∥x∥2 4 Proof For any vector x with supp(x) ⊂G⋆, there exists a representation x = P G∈G⋆wG, such that the supports of the different wG do not overlap. Then, h(x) ≤ X G∈G⋆ (∥wG∥2 + ∥wG∥1) ≤(1 + √ Bα) X G∈G⋆ ∥wG∥2 ≤(1 + √ Bα) p |G⋆|∥x∥2 We see that (1 + √ Bα) p |G⋆| (Lemma 3.5) gives an upper bound on the subspace compatibility constant with respect to the ℓ2 norm for the subspace indexed by the support of the vector, which is contained in the span of the union of groups in G⋆. Definition 3.6 For a given set S, and given vector x⋆, the loss function LΦ(x) satisfies the Restricted Strong Convexity(RSC) condition with parameter κ and tolerance τ if LΦ(x⋆+ ∆) −LΦ(x⋆) −⟨∇LΦ(x⋆), ∆⟩≥κ∥∆∥2 2 −τ 2(x⋆) ∀∆∈S In this paper, we consider vectors x⋆that lie exactly in k ≪M groups, and display within-group sparsity. This implies that the tolerance τ(x⋆) = 0, and we will ignore this term henceforth. We also define the following set, which will be used in the sequel: C(sA, sB, x⋆) := {∆∈Rp|h(ΠsB⊥∆) ≤3h(ΠsB∆) + 4h(ΠsA⊥x⋆)} (5) where ΠsA(·) denotes the projection onto the subspace sA. Based on the results above, we can now apply a result from [9] to the SOSlasso: Theorem 3.7 (Corollary 1 in [9]) Consider a convex and differentiable loss function such that RSC holds with constants κ and τ = 0 over (5), and a norm h(·) decomposable over sets sA and sB. For the optimization program in (1), using the parameter λn ≥2h∗(∇LΦ(x⋆)), any optimal solution ˆxλn to (1) satisfies ∥bxλn −x⋆∥2 ≤9λ2 n κ Ψ2(sB) The result above shows a general bound on the error using the lasso with sparse overlapping sets. Note that the regularization parameter λn as well as the RSC constant κ depend on the loss function LΦ(x). Convergence for logistic regression settings may be derived using methods in [1]. In the next section, we consider the least squares loss (2), and show that the estimate using the SOSlasso is consistent. 4 Consistency of SOSlasso with Squared Error Loss We first need to bound the dual norm of the gradient of the loss function, so as to bound λn. Consider L := LΦ(x) = 1 2n∥y −Φx∥2. The gradient of the loss function with respect to x is given by ∇L = 1 nΦT (Φx −y) = 1 nΦT η where η = [ηT 1 ηT 2 . . . ηT T ]T (see Section 2). Our goal now is to find an upper bound on the quantity h∗(∇L), which from (4) is 1 2 max G∈G ∥∇LG∥2 = 1 2n max G∈G ∥ΦT Gη∥2 where ΦG is the matrix Φ restricted to the columns indexed by the group G. We will prove an upper bound for the above quantity in the course of the results that follow. Since η ∼N(0, σ2I), we have ΦT Gη ∼σN(0, ΦT GΦG). Defining σmG := σmax{ΦT GΦG} to be the maximum singular value, we have ∥ΦT Gη∥2 2 ≤σ2σ2 mG∥γ∥2 2, where γ ∼N(0, I|G|) ⇒∥γ∥2 2 ∼ χ2 |G|, where χ2 d is a chi-squared random variable with d degrees of freedom. This allows us to work with the more tractable chi squared random variable when we look to bound the dual norm of ∇L. The next lemma helps us obtain a bound on the maximum of χ2 random variables. Lemma 4.1 Let z1, z2, . . . , zM be chi-squared random variables with d degrees of freedom. Then for some constant c, P  max i=1,2,...,M zi ≤c2d  ≥1 −exp  log(M) −(c −1)2d 2  5 Proof From the chi-squared tail bound in [3], P(zi ≥c2d) ≤exp  −(c−1)2d 2  . The result follows from a union bound and inverting the expression. Lemma 4.2 Consider the loss function L := 1 2n PT t=1 ∥yt −Φtxt∥2 = 1 2n∥y −Φx∥2, with the Φ′ ts deterministic and the measurements corrupted with AWGN of variance σ2. For the regularizer in (3), the dual norm of the gradient of the loss function is bounded as h∗(∇L)2 ≤σ2σ2 m 4 (log(M) + T B) n with probability at least 1 −c1 exp(−c2n), for c1, c2 > 0, and where σm = maxG∈G σmG Proof Let γ ∼χ2 T |G|. We begin with the upper bound obtained for the dual norm of the regularizer in (4): h∗(∇L)2 (i) ≤1 4 max G∈G 1 nΦT Gη 2 2 ≤σ2 4 max G∈G σ2 mGγ n2 (ii) ≤σ2σ2 m 4 max G∈G γ n2 (iii) ≤σ2σ2 m 4 c2T B w. p. 1 −exp  log(M) −(cn −1)2T B 2  where (i) follows from the formulation of the gradient of the loss function and the fact that the square of maximum of non negative numbers is the maximum of the squares of the same numbers. In (ii), we have defined σm = maxG σmG. Finally, we have made use of Lemma 4.1 in (iii). We then set c2 = log(M) + T B T Bn to obtain the result. We combine the results developed so far to derive the following consistency result for the SOS lasso, with the least squares loss function. Theorem 4.3 Suppose we obtain linear measurements of a sparse overlapping grouped matrix X⋆∈Rp×T , corrupted by AWGN of variance σ2. Suppose the matrix X⋆can be decomposed into M possible overlapping groups of maximum size B, out of which k are active. Furthermore, assume that a fraction α ∈(0, 1] of the coefficients are non zero in each active group. Consider the following vectorized SOSlasso multitask regression problem (2): bx = arg min x  1 2n∥y −Φx∥2 2 + λnh(x)  , h(x) = inf W X G∈G (∥wG∥2 + ∥wG∥1) s.t. X G∈G wG = x Suppose the data matrices Φt are non random, and the loss function satisfies restricted strong convexity assumptions with parameter κ. Then, for λn ≥σ2σ2 m(log(M)+T B) 4n , the following holds with probability at least 1 −c1 exp(−c2n), with c1, c2 > 0: ∥bx −x⋆∥2 ≤9 4 σ2σ2 m  1 + √ T Bα 2 k(log(M) + T B) nκ where we define σm := maxG∈G σmax{ΦT GΦG} Proof Follows from substituting in Theorem 3.7 the results from Lemma 3.5 and Lemma 4.2. From [9], we see that the convergence rate matches that of the group lasso, with an additional multiplicative factor α. This stems from the fact that the signal has a sparse structure “embedded” within a group sparse structure. Visualizing the optimization problem as that of solving a lasso within a group lasso framework lends some intuition into this result. Note that since α < 1, this bound is much smaller than that of the standard group lasso. 6 5 Experiments and Results 5.1 Synthetic data, Gaussian Linear Regression For T = 20 tasks, we define a N = 2002 element vector divided into M = 500 groups of size B = 6. Each group overlaps with its neighboring groups (G1 = {1, 2, . . . , 6}, G2 = {5, 6, . . . , 10}, G3 = {9, 10, . . . , 14}, . . . ). 20 of these groups were activated uniformly at random, and populated from a uniform [−1, 1] distribution. A proportion α of these coefficients with largest magnitude were retained as true signal. For each task, we obtain 250 linear measurements using a N(0, 1 250I) matrix. We then corrupt each measurement with Additive White Gaussian Noise (AWGN), and assess signal recovery in terms of Mean Squared Error (MSE). The regularization parameter was clairvoyantly picked to minimize the MSE over a range of parameter values. The results of applying lasso, standard latent group lasso [5, 10], and our SOSlasso to these data are plotted in Figures 2(a), varying σ, α = 0.2, and 2(b), varying α, σ = 0.1. Each point in Figures 2(a) and 2(b), is the average of 100 trials, where each trial is based on a new random instance of X⋆and the Gaussian data matrices. 0 0.05 0.1 0.15 0.2 0 0.005 0.01 0.015 0.02 σ MSE Glasso SOSlasso (a) Varying σ 0 0.2 0.4 0.6 0.8 1 0 0.005 0.01 0.015 1 − α MSE Glasso SOSlasso lasso (b) Varying α (c) Sample pattern Figure 2: As the noise is increased (a), our proposed penalty function (SOSlasso) allows us to recover the true coefficients more accurately than the group lasso (Glasso). Also, when alpha is large, the active groups are not sparse, and the standard overlapping group lasso outperforms the other methods. However, as α reduces, the method we propose outperforms the group lasso (b). (c) shows a toy sparsity pattern, with different colors denoting different overlapping groups 5.2 The SOSlasso for fMRI In this experiment, we compared SOSlasso, lasso, and Glasso in analysis of the star-plus dataset [18]. 6 subjects made judgements that involved processing 40 sentences and 40 pictures while their brains were scanned in half second intervals using fMRI1. We retained the 16 time points following each stimulus, yielding 1280 measurements at each voxel. The task is to distinguish, at each point in time, which stimulus a subject was processing. [18] showed that there exists cross-subject consistency in the cortical regions useful for prediction in this task. Specifically, experts partitioned each dataset into 24 non overlapping regions of interest (ROIs), then reduced the data by discarding all but 7 ROIs and, for each subject, averaging the BOLD response across voxels within each ROI and showed that a classifier trained on data from 5 subjects generalized when applied to data from a 6th. We assessed whether SOSlasso could leverage this cross-individual consistency to aid in the discovery of predictive voxels without requiring expert pre-selection of ROIs, or data reduction, or any alignment of voxels beyond that existing in the raw data. Note that, unlike [18], we do not aim to learn a solution that generalizes to a withheld subject. Rather, we aim to discover a group sparsity pattern that suggests a similar set of voxels in all subjects, before optimizing a separate solution for each individual. If SOSlasso can exploit cross-individual anatomical similarity from this raw, coarsely-aligned data, it should show reduced cross-validation error relative to the lasso applied separately to each individual. If the solution is sparse within groups and highly variable across individuals, SOSlasso should show reduced cross-validation error relative to Glasso. Finally, if SOSlasso is finding useful cross-individual structure, the features it selects should align at least somewhat with the expert-identified ROIs shown by [18] to carry consistent information. 1Data and documentation available at http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo-81/www/ 7 SOSlasso Glasso lasso R (a) 0.24 0.26 0.28 0.3 0.32 0.34 0.36 lasso Glasso SOSlasso Error (b) Picture only Sentence only Picture and Sentence (c) Figure 3: Results from fMRI experiments. (a) Aggregated sparsity patterns for a single brain slice. (b) Crossvalidation error obtained with each method. Lines connect data for a single subject. (c) The full sparsity pattern obtained with SOSlasso. Method % ROI t(5) , p lasso 46.11 6.08 ,0.001 Glasso 50.89 5.65 ,0.002 SOSlasso 70.31 Table 2: Proportion of selected voxels in the 7 relevant ROIS aggregated over subjects, and corresponding two-tailed significance levels for the contrast of lasso and Glasso to SOSlasso. We trained 3 classifiers using 4-fold cross validation to select the regularization parameter, considering all available voxels without preselection. We group regions of 5×5×1 voxels and considered overlapping groups “shifted” by 2 voxels in the first 2 dimensions.2 Figure 3(b) shows the individual error rates across the 6 subjects for the three methods. Across subjects, SOSlasso had a significantly lower cross-validation error rate (27.47 %) than individual lasso (33.3 %; within-subjects t(5) = 4.8; p = 0.004 two-tailed), showing that the method can exploit anatomical similarity across subjects to learn a better classifier for each. SOSlasso also showed significantly lower error rates than glasso (31.1 %; t(5) = 2.92; p = 0.03 two-tailed), suggesting that the signal is sparse within selected regions and variable across subjects. Figure 3(a) presents a sample of the the sparsity patterns obtained from the different methods, aggregated over all subjects. Red points indicate voxels that contributed positively to picture classification in at least one subject, but never to sentences; Blue points have the opposite interpretation. Purple points indicate voxels that contributed positively to picture and sentence classification in different subjects. The remaining slices for the SOSlasso are shown in Figure 3(c). There are three things to note from Figure 3(a). First, the Glasso solution is fairly dense, with many voxels signaling both picture and sentence across subjects. We believe this “purple haze” demonstrates why Glasso is illsuited for fMRI analysis: a voxel selected for one subject must also be selected for all others. This approach will not succeed if, as is likely, there exists no direct voxel-to-voxel correspondence or if the neural code is variable across subjects. Second, the lasso solution is less sparse than the SOSlasso because it allows any task-correlated voxel to be selected. It leads to a higher cross-validation error, indicating that the ungrouped voxels are inferior predictors (Figure 3(b)). Third, the SOSlasso not only yields a sparse solution, but also clustered. To assess how well these clusters align with the anatomical regions thought a-priori to be involved in sentence and picture representation, we calculated the proportion of selected voxels falling within the 7 ROIs identified by [18] as relevant to the classification task (Table 2). For SOSlasso an average of 70% of identified voxels fell within these ROIs, significantly more than for lasso or Glasso. 6 Conclusions and Extensions We have introduced SOSlasso, a function that recovers sparsity patterns that are a hybrid of overlapping group sparse and sparse patterns when used as a regularizer in convex programs, and proved its theoretical convergence rates when minimizing least squares. The SOSlasso succeeds in a multitask fMRI analysis, where it both makes better inferences and discovers more theoretically plausible brain regions that lasso and Glasso. Future work involves experimenting with different parameters for the group and l1 penalties, and using other similarity groupings, such as functional connectivity in fMRI. 2The irregular group size compensates for voxels being larger and scanner coverage being smaller in the z-dimension (only 8 slices relative to 64 in the x- and y-dimensions). 8 References [1] Francis Bach. Adaptivity of averaged stochastic gradient descent to local strong convexity for logistic regression. arXiv preprint arXiv:1303.6149, 2013. [2] S. Chatterjee, A. Banerjee, and A. Ganguly. Sparse group lasso for regression on land climate variables. In Data Mining Workshops (ICDMW), 2011 IEEE 11th International Conference on, pages 1–8. IEEE, 2011. [3] S. Dasgupta, D. Hsu, and N. Verma. A concentration theorem for projections. arXiv preprint arXiv:1206.6813, 2012. [4] Eva Feredoes, Giulio Tononi, and Bradley R Postle. The neural bases of the short-term storage of verbal information are anatomically variable across individuals. The Journal of Neuroscience, 27(41):11003– 11008, 2007. [5] L. Jacob, G. Obozinski, and J. P. Vert. Group lasso with overlap and graph lasso. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 433–440. ACM, 2009. [6] A. Jalali, P. Ravikumar, S. Sanghavi, and C. Ruan. A dirty model for multi-task learning. Advances in Neural Information Processing Systems, 23:964–972, 2010. [7] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proximal methods for hierarchical sparse coding. arXiv preprint arXiv:1009.2139, 2010. [8] K. Lounici, M. Pontil, A. B. Tsybakov, and S. van de Geer. Taking advantage of sparsity in multi-task learning. arXiv preprint arXiv:0903.1468, 2009. [9] S. N. Negahban, P. Ravikumar, M. J Wainwright, and Bin Yu. A unified framework for high-dimensional analysis of m-estimators with decomposable regularizers. Statistical Science, 27(4):538–557, 2012. [10] G. Obozinski, L. Jacob, and J.P. Vert. Group lasso with overlaps: The latent group lasso approach. arXiv preprint arXiv:1110.0413, 2011. [11] N. Rao, B. Recht, and R. Nowak. Universal measurement bounds for structured sparse signal recovery. In Proceedings of AISTATS, volume 2102, 2012. [12] Irina Rish, Guillermo A Cecchia, Kyle Heutonb, Marwan N Balikic, and A Vania Apkarianc. Sparse regression analysis of task-relevant information distribution in the brain. In Proceedings of SPIE, volume 8314, page 831412, 2012. [13] Srikanth Ryali, Kaustubh Supekar, Daniel A Abrams, and Vinod Menon. Sparse logistic regression for whole brain classification of fmri data. NeuroImage, 51(2):752, 2010. [14] N. Simon, J. Friedman, T. Hastie, and R. Tibshirani. A sparse-group lasso. Journal of Computational and Graphical Statistics, (just-accepted), 2012. [15] P. Sprechmann, I. Ramirez, G. Sapiro, and Y. Eldar. Collaborative hierarchical sparse modeling. In Information Sciences and Systems (CISS), 2010 44th Annual Conference on, pages 1–6. IEEE, 2010. [16] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [17] Marcel van Gerven, Christian Hesse, Ole Jensen, and Tom Heskes. Interpreting single trial data using groupwise regularisation. NeuroImage, 46(3):665–676, 2009. [18] X. Wang, T. M Mitchell, and R. Hutchinson. Using machine learning to detect cognitive states across multiple subjects. CALD KDD project paper, 2003. [19] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1):49–67, 2006. [20] J. Zhou, J. Chen, and J. Ye. Malsar: Multi-task learning via structural regularization, 2012. [21] Y. Zhou, R. Jin, and S. C. Hoi. Exclusive lasso for multi-task feature selection. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), 2010. 9
2013
234
4,970
Submodular Optimization with Submodular Cover and Submodular Knapsack Constraints Rishabh Iyer Department of Electrical Engineering University of Washington rkiyer@u.washington.edu Jeff Bilmes Department of Electrical Engineering University of Washington bilmes@u.washington.edu Abstract We investigate two new optimization problems — minimizing a submodular function subject to a submodular lower bound constraint (submodular cover) and maximizing a submodular function subject to a submodular upper bound constraint (submodular knapsack). We are motivated by a number of real-world applications in machine learning including sensor placement and data subset selection, which require maximizing a certain submodular function (like coverage or diversity) while simultaneously minimizing another (like cooperative cost). These problems are often posed as minimizing the difference between submodular functions [9, 25] which is in the worst case inapproximable. We show, however, that by phrasing these problems as constrained optimization, which is more natural for many applications, we achieve a number of bounded approximation guarantees. We also show that both these problems are closely related and an approximation algorithm solving one can be used to obtain an approximation guarantee for the other. We provide hardness results for both problems thus showing that our approximation factors are tight up to log-factors. Finally, we empirically demonstrate the performance and good scalability properties of our algorithms. 1 Introduction A set function f : 2V →R is said to be submodular [4] if for all subsets S, T ⊆V , it holds that f(S) + f(T) ≥f(S ∪T) + f(S ∩T). Defining f(j|S) ≜f(S ∪j) −f(S) as the gain of j ∈V in the context of S ⊆V , then f is submodular if and only if f(j|S) ≥f(j|T) for all S ⊆T and j /∈T. The function f is monotone iff f(j|S) ≥0, ∀j /∈S, S ⊆V . For convenience, we assume the ground set is V = {1, 2, · · · , n}. While general set function optimization is often intractable, many forms of submodular function optimization can be solved near optimally or even optimally in certain cases. Submodularity, moreover, is inherent in a large class of real-world applications, particularly in machine learning, therefore making them extremely useful in practice. In this paper, we study a new class of discrete optimization problems that have the following form: Problem 1 (SCSC): min{f(X) | g(X) ≥c}, and Problem 2 (SCSK): max{g(X) | f(X) ≤b}, where f and g are monotone non-decreasing submodular functions that also, w.l.o.g., are normalized (f(∅) = g(∅) = 0)1, and where b and c refer to budget and cover parameters respectively. The corresponding constraints are called the submodular cover [29] and submodular knapsack [1] respectively and hence we refer to Problem 1 as Submodular Cost Submodular Cover (henceforth SCSC) and Problem 2 as Submodular Cost Submodular Knapsack (henceforth SCSK). Our motivation stems from an interesting class of problems that require minimizing a certain submodular function f while simultaneously maximizing another submodular function g. We shall see that these naturally 1A monotone non-decreasing normalized (f(∅) = 0) submodular function is called a polymatroid function. 1 occur in applications like sensor placement, data subset selection, and many other machine learning applications. A standard approach used in literature [9, 25, 15] has been to transform these problems into minimizing the difference between submodular functions (also called DS optimization): Problem 0: min X⊆V f(X) −g(X)  . (1) While a number of heuristics are available for solving Problem 0, in the worst-case it is NP-hard and inapproximable [9], even when f and g are monotone. Although an exact branch and bound algorithm has been provided for this problem [15], its complexity can be exponential in the worst case. On the other hand, in many applications, one of the submodular functions naturally serves as part of a constraint. For example, we might have a budget on a cooperative cost, in which case Problems 1 and 2 become applicable. The utility of Problems 1 and 2 become apparent when we consider how they occur in real-world applications and how they subsume a number of important optimization problems. Sensor Placement and Feature Selection: Often, the problem of choosing sensor locations can be modeled [19, 9] by maximizing the mutual information between the chosen variables A and the unchosen set V \A (i.e.,f(A) = I(XA; XV \A)). Alternatively, we may wish to maximize the mutual information between a set of chosen sensors XA and a quantity of interest C (i.e., f(A) = I(XA; C)) assuming that the set of features XA are conditionally independent given C [19, 9]. Both these functions are submodular. Since there are costs involved, we want to simultaneously minimize the cost g(A). Often this cost is submodular [19, 9]. For example, there is typically a discount when purchasing sensors in bulk (economies of scale). This then becomes a form of either Problem 1 or 2. Data subset selection: A data subset selection problem in speech and NLP involves finding a limited vocabulary which simultaneously has a large coverage. This is particularly useful, for example in speech recognition and machine translation, where the complexity of the algorithm is determined by the vocabulary size. The motivation for this problem is to find the subset of training examples which will facilitate evaluation of prototype systems [23]. Often the objective functions encouraging small vocabulary subsets and large acoustic spans are submodular [23, 20] and hence this problem can naturally be cast as an instance of Problems 1 and 2. Privacy Preserving Communication: Given a set of random variables X1, · · · , Xn, denote I as an information source, and P as private information that should be filtered out. Then one way of formulating the problem of choosing a information containing but privacy preserving set of random variables can be posed as instances of Problems 1 and 2, with f(A) = H(XA|I) and g(A) = H(XA|P), where H(·|·) is the conditional entropy. Machine Translation: Another application in machine translation is to choose a subset of training data that is optimized for given test data set, a problem previously addressed with modular functions [24]. Defining a submodular function with ground set over the union of training and test sample inputs V = Vtr ∪Vte, we can set f : 2Vtr →R+ to f(X) = f(X|Vte), and take g(X) = |X|, and b ≈0 in Problem 2 to address this problem. We call this the Submodular Span problem. Apart from the real-world applications above, both Problems 1 and 2 generalize a number of wellstudied discrete optimization problems. For example the Submodular Set Cover problem (henceforth SSC) [29] occurs as a special case of Problem 1, with f being modular and g is submodular. Similarly the Submodular Cost Knapsack problem (henceforth SK) [28] is a special case of problem 2 again when f is modular and g submodular. Both these problems subsume the Set Cover and Max k-Cover problems [3]. When both f and g are modular, Problems 1 and 2 are called knapsack problems [16]. The following are some of our contributions. We show that Problems 1 and 2 are intimately connected, in that any approximation algorithm for either problem can be used to provide guarantees for the other problem as well. We then provide a framework of combinatorial algorithms based on optimizing, sometimes iteratively, subproblems that are easy to solve. These subproblems are obtained by computing either upper or lower bound approximations of the cost functions or constraining functions. We also show that many combinatorial algorithms like the greedy algorithm for SK [28] and SSC [29] also belong to this framework and provide the first constant-factor bi-criterion approximation algorithm for SSC [29] and hence the general set cover problem [3]. We then show how with suitable choices of approximate functions, we can obtain a number of bounded approximation guarantees and show the hardness for Problems 1 and 2, which in fact match some of our approximation guarantees. Our guarantees and hardness results depend on the curvature of the submodular functions [2]. We observe a strong asymmetry in the results that the factors change 2 polynomially based on the curvature of f but only by a constant-factor with the curvature of g, hence making the SK and SSC much easier compared to SCSK and SCSC. 2 Background and Main Ideas We first introduce several key concepts used throughout the paper. This paper includes only the main results and we defer all the proofs and additional discussions to the extended version [11]. Given a submodular function f, we define the total curvature, κf as2: κf = 1 −minj∈V f(j|V \j) f(j) [2]. Intuitively, the curvature 0 ≤κf ≤1 measures the distance of f from modularity and κf = 0 if and only if f is modular (or additive, i.e., f(X) = P j∈X f(j)). A number of approximation guarantees in the context of submodular optimization have been refined via the curvature of the submodular function [2, 13, 12]. In this paper, we shall witness the role of curvature also in determining the approximations and the hardness of problems 1 and 2. Algorithm 1: General algorithmic framework to address both Problems 1 and 2 1: for t = 1, 2, · · · , T do 2: Choose surrogate functions ˆft and ˆgt for f and g respectively, tight at Xt−1. 3: Obtain Xt as the optimizer of Problem 1 or 2 with ˆft and ˆgt instead of f and g. 4: end for The main idea of this paper is a framework of algorithms based on choosing appropriate surrogate functions for f and g to optimize over. This framework is represented in Algorithm 1. We would like to choose surrogate functions ˆft and ˆgt such that using them, Problems 1 and 2 become easier. If the algorithm is just single stage (not iterative), we represent the surrogates as ˆf and ˆg. The surrogate functions we consider in this paper are in the forms of bounds (upper or lower) and approximations. Modular lower bounds: Akin to convex functions, submodular functions have tight modular lower bounds. These bounds are related to the subdifferential ∂f(Y ) of the submodular set function f at a set Y ⊆V [4]. Denote a subgradient at Y by hY ∈∂f(Y ). The extreme points of ∂f(Y ) may be computed via a greedy algorithm: Let π be a permutation of V that assigns the elements in Y to the first |Y | positions (π(i) ∈Y if and only if i ≤|Y |). Each such permutation defines a chain with elements Sπ 0 = ∅, Sπ i = {π(1), π(2), . . . , π(i)} and Sπ |Y | = Y . This chain defines an extreme point hπ Y of ∂f(Y ) with entries hπ Y (π(i)) = f(Sπ i ) −f(Sπ i−1). Defined as above, hπ Y forms a lower bound of f, tight at Y — i.e., hπ Y (X) = P j∈X hπ Y (j) ≤f(X), ∀X ⊆V and hπ Y (Y ) = f(Y ). Modular upper bounds: We can also define superdifferentials ∂f(Y ) of a submodular function [14, 10] at Y . It is possible, moreover, to provide specific supergradients [10, 13] that define the following two modular upper bounds (when referring either one, we use mf X): mf X,1(Y ) ≜f(X) − X j∈X\Y f(j|X\j) + X j∈Y \X f(j|∅), mf X,2(Y ) ≜f(X) − X j∈X\Y f(j|V \j) + X j∈Y \X f(j|X). Then mf X,1(Y ) ≥f(Y ) and mf X,2(Y ) ≥f(Y ), ∀Y ⊆V and mf X,1(X) = mf X,2(X) = f(X). MM algorithms using upper/lower bounds: Using the modular upper and lower bounds above in Algorithm 1, provide a class of Majorization-Minimization (MM) algorithms, akin to the algorithms proposed in [13] for submodular optimization and in [25, 9] for DS optimization (Problem 0 above). An appropriate choice of the bounds ensures that the algorithm always improves the objective values for Problems 1 and 2. In particular, choosing ˆft as a modular upper bound of f tight at Xt, or ˆgt as a modular lower bound of g tight at Xt, or both, ensures that the objective value of Problems 1 and 2 always improves at every iteration as long as the corresponding surrogate problem can be solved exactly. Unfortunately, Problems 1 and 2 are NP-hard even if f or g (or both) are modular [3], and therefore the surrogate problems themselves cannot be solved exactly. Fortunately, the surrogate problems are often much easier than the original ones and can admit log or constant-factor guarantees. In practice, moreover, these factors are almost 1. Furthermore, with a simple modification of the iterative procedure of Algorithm 1, we can guarantee improvement at every iteration [11]. What is also fortunate and perhaps surprising, as we show in this paper below, is that unlike the case of DS optimization (where the problem is inapproximable in general [9]), the constrained forms of optimization (Problems 1 and 2) do have approximation guarantees. 2We can assume, w.l.o.g that f(j) > 0, g(j) > 0, ∀j ∈V 3 Ellipsoidal Approximation: We also consider ellipsoidal approximations (EA) of f. The main result of Goemans et. al [6] is to provide an algorithm based on approximating the submodular polyhedron by an ellipsoid. They show that for any polymatroid function f, one can compute an approximation of the form p wf(X) for a certain modular weight vector wf ∈RV , such that p wf(X) ≤f(X) ≤O(√n log n) p wf(X), ∀X ⊆V . A simple trick then provides a curvature-dependent approximation [12] — we define the κf-curve-normalized version of f as follows: f κ(X) ≜  f(X) −(1 −κf) P j∈X f(j)  /κf. Then, the submodular function f ea(X) = κf p wf κ(X) + (1 −κf) P j∈X f(j) satisfies [12]: f ea(X) ≤f(X) ≤O  √n log n 1 + (√n log n −1)(1 −κf)  f ea(X), ∀X ⊆V (2) f ea is multiplicatively bounded by f by a factor depending on √n and the curvature. We shall use the result above in providing approximation bounds for Problems 1 and 2. In particular, the surrogate functions ˆf or ˆg in Algorithm 1 can be the ellipsoidal approximations above, and the multiplicative bounds transform into approximation guarantees for these problems. 3 Relation between SCSC and SCSK In this section, we show a precise relationship between Problems 1 and 2. From the formulation of Problems 1 and 2, it is clear that these problems are duals of each other. Indeed, in this section we show that the problems are polynomially transformable into each other. Algorithm 2: Approx. algorithm for SCSK using an approximation algorithm for SCSC. 1: Input: An SCSK instance with budget b, an [σ, ρ] approx. algo. for SCSC, & ϵ ∈[0, 1). 2: Output: [(1 −ϵ)ρ, σ] approx. for SCSK. 3: c ←g(V ), ˆ Xc ←V . 4: while f( ˆ Xc) > σb do 5: c ←(1 −ϵ)c 6: ˆ Xc ←[σ, ρ] approx. for SCSC using c. 7: end while Algorithm 3: Approx. algorithm for SCSC using an approximation algorithm for SCSK. 1: Input: An SCSC instance with cover c, an [ρ, σ] approx. algo. for SCSK, & ϵ > 0. 2: Output: [(1 + ϵ)σ, ρ] approx. for SCSC. 3: b ←argminj f(j), ˆ Xb ←∅. 4: while g( ˆ Xb) < ρc do 5: b ←(1 + ϵ)b 6: ˆ Xb ←[ρ, σ] approx. for SCSK using b. 7: end while We first introduce the notion of bicriteria algorithms. An algorithm is a [σ, ρ] bi-criterion algorithm for Problem 1 if it is guaranteed to obtain a set X such that f(X) ≤σf(X∗) (approximate optimality) and g(X) ≥c′ = ρc (approximate feasibility), where X∗is an optimizer of Problem 1. Similarly, an algorithm is a [ρ, σ] bi-criterion algorithm for Problem 2 if it is guaranteed to obtain a set X such that g(X) ≥ρg(X∗) and f(X) ≤b′ = σb, where X∗is the optimizer of Problem 2. In a bi-criterion algorithm for Problems 1 and 2, typically σ ≥1 and ρ ≤1. A non-bicriterion algorithm for Problem 1 is when ρ = 1 and a non-bicriterion algorithm for Problem 2 is when σ = 1. Algorithms 2 and 3 provide the schematics for using an approximation algorithm for one of the problems for solving the other. Theorem 3.1. Algorithm 2 is guaranteed to find a set ˆ Xc which is a [(1 −ϵ)ρ, σ] approximation of SCSK in at most log1/(1−ϵ)[g(V )/ minj g(j)] calls to the [σ, ρ] approximate algorithm for SCSC. Similarly, Algorithm 3 is guaranteed to find a set ˆ Xb which is a [(1 + ϵ)σ, ρ] approximation of SCSC in log1+ϵ[f(V )/ minj f(j)] calls to a [ρ, σ] approximate algorithm for SCSK. Theorem 3.1 implies that the complexity of Problems 1 and 2 are identical, and a solution to one of them provides a solution to the other. Furthermore, as expected, the hardness of Problems 1 and 2 are also almost identical. When f and g are polymatroid functions, moreover, we can provide bounded approximation guarantees for both problems, as shown in the next section. Alternatively we can also do a binary search instead of a linear search to transform Problems 1 and 2. This essentially turns the factor of O(1/ϵ) into O(log 1/ϵ). Due to lack of space, we defer this discussion to the extended version [11]. 4 4 Approximation Algorithms We consider several algorithms for Problems 1 and 2, which can all be characterized by the framework of Algorithm 1, using the surrogate functions of the form of upper/lower bounds or approximations. 4.1 Approximation Algorithms for SCSC We first describe our approximation algorithms designed specifically for SCSC, leaving to §4.2 the presentation of our algorithms slated for SCSK. We first investigate a special case, the submodular set cover (SSC), and then provide two algorithms, one of them (ISSC) is very practical with a weaker theoretical guarantee, and another one (EASSC) which is slow but has the tightest guarantee. Submodular Set Cover (SSC): We start by considering a classical special case of SCSC (Problem 1) where f is already a modular function and g is a submodular function. This problem occurs naturally in a number of problems related to active/online learning [7] and summarization [21, 22]. This problem was first investigated by Wolsey [29], wherein he showed that a simple greedy algorithm achieves bounded (in fact, log-factor) approximation guarantees. We show that this greedy algorithm can naturally be viewed in the framework of our Algorithm 1 by choosing appropriate surrogate functions ˆft and ˆgt. The idea is to use the modular function f as its own surrogate ˆft and choose the function ˆgt as a modular lower bound of g. Akin to the framework of algorithms in [13], the crucial factor is the choice of the lower bound (or subgradient). Define the greedy subgradient as: π(i) ∈argmin  f(j) g(j|Sπ i−1) j /∈Sπ i−1, g(Sπ i−1 ∪j) < c  . (3) Once we reach an i where the constraint g(Sπ i−1 ∪j) < c can no longer be satisfied by any j /∈Sπ i−1, we choose the remaining elements for π arbitrarily. Let the corresponding subgradient be referred to as hπ. Then we have the following lemma, which is an extension of [29], and which is a simpler description of the result stated formally in [11]. Lemma 4.1. The greedy algorithm for SSC [29] can be seen as an instance of Algorithm 1 by choosing the surrogate function ˆf as f and ˆg as hπ (with π defined in Eqn. (3)). When g is integral, the guarantee of the greedy algorithm is Hg ≜H(maxj g(j)), where H(d) = Pd i=1 1 i [29] (henceforth we will use Hg for this quantity). This factor is tight up to lowerorder terms [3]. Furthermore, since this algorithm directly solves SSC, we call it the primal greedy. We could also solve SSC by looking at its dual, which is SK [28]. Although SSC does not admit any constant-factor approximation algorithms [3], we can obtain a constant-factor bi-criterion guarantee: Lemma 4.2. Using the greedy algorithm for SK [28] as the approximation oracle in Algorithm 3 provides a [1 + ϵ, 1 −e−1] bi-criterion approximation algorithm for SSC, for any ϵ > 0. We call this the dual greedy. This result follows immediately from the guarantee of the submodular cost knapsack problem [28] and Theorem 3.1. We remark that we can also use a simpler version of the greedy iteration at every iteration [21, 17] and we obtain a guarantee of (1 + ϵ, 1/2(1 −e−1)). In practice, however, both these factors are almost 1 and hence the simple variant of the greedy algorithm suffices. Iterated Submodular Set Cover (ISSC): We next investigate an algorithm for the general SCSC problem when both f and g are submodular. The idea here is to iteratively solve the submodular set cover problem which can be done by replacing f by a modular upper bound at every iteration. In particular, this can be seen as a variant of Algorithm 1, where we start with X0 = ∅and choose ˆft(X) = mf Xt(X) at every iteration. The surrogate problem at each iteration becomes min{mf Xt(X)|g(X) ≥c}. Hence, each iteration is an instance of SSC and can be solved nearly optimally using the greedy algorithm. We can continue this algorithm for T iterations or until convergence. An analysis very similar to the ones in [9, 13] will reveal polynomial time convergence. Since each iteration is only the greedy algorithm, this approach is also highly practical and scalable. Theorem 4.3. ISSC obtains an approximation factor of KgHg 1+(Kg−1)(1−κf ) ≤ n 1+(n−1)(1−κf )Hg where Kg = 1 + max{|X| : g(X) < c} and Hg is the approximation factor of the submodular set cover using g. 5 From the above, it is clear that Kg ≤n. Notice also that Hg is essentially a log-factor. We also see an interesting effect of the curvature κf of f. When f is modular (κf = 0), we recover the approximation guarantee of the submodular set cover problem. Similarly, when f has restricted curvature, the guarantees can be much better. Moreover, the approximation guarantee already holds after the first iteration, so additional iterations can only further improve the objective. Ellipsoidal Approximation based Submodular Set Cover (EASSC): In this setting, we use the ellipsoidal approximation discussed in §2. We can compute the κf-curve-normalized version of f (f κ, see §2), and then compute its ellipsoidal approximation √ wf κ. We then define the function ˆf(X) = f ea(X) = κf p wf κ(X) + (1 −κf) P j∈X f(j) and use this as the surrogate function ˆf for f. We choose ˆg as g itself. The surrogate problem becomes: min   κf q wf κ(X) + (1 −κf) X j∈X f(j) g(X) ≥c   . (4) While function ˆf(X) = f ea(X) is not modular, it is a weighted sum of a concave over modular function and a modular function. Fortunately, we can use the result from [26], where they show that any function of the form of p w1(X) + w2(X) can be optimized over any polytope P with an approximation factor of β(1 + ϵ) for any ϵ > 0, where β is the approximation factor of optimizing a modular function over P. The complexity of this algorithm is polynomial in n and 1 ϵ . We use their algorithm to minimize f ea(X) over the submodular set cover constraint and hence we call this algorithm EASSC. Theorem 4.4. EASSC obtains a guarantee of O( √n log nHg 1+(√n log n−1)(1−κf )), where Hg is the approximation guarantee of the set cover problem. If the function f has κf = 1, we can use a much simpler algorithm. In particular, we can minimize (f ea(X))2 = wf(X) at every iteration, giving a surrogate problem of the form min{wf(X)|g(X) ≥ c}. This is directly an instance of SSC, and in contrast to EASSC, we just need to solve SSC once. We call this algorithm EASSCc. Corollary 4.5. EASSCc obtains an approximation guarantee of O(√n log n p Hg). 4.2 Approximation Algorithms for SCSK In this section, we describe our approximation algorithms for SCSK. We note the dual nature of the algorithms in this current section to those given in §4.1. We first investigate a special case, the submodular knapsack (SK), and then provide three algorithms, two of them (Gr and ISK) being practical with slightly weaker theoretical guarantee, and another one (EASK) which is not scalable but has the tightest guarantee. Submodular Cost Knapsack (SK): We start with a special case of SCSK (Problem 2), where f is a modular function and g is a submodular function. In this case, SCSK turns into the SK problem for which the greedy algorithm with partial enumeration provides a 1 −e−1 approximation [28]. The greedy algorithm can be seen as an instance of Algorithm 1 with ˆg being the modular lower bound of g and ˆf being f, which is already modular. In particular, define: π(i) ∈argmax g(j|Sπ i−1) f(j) j /∈Sπ i−1, f(Sπ i−1 ∪{j}) ≤b  , (5) where the remaining elements are chosen arbitrarily. The following is an informal description of the result described formally in [11]. Lemma 4.6. Choosing the surrogate function ˆf as f and ˆg as hπ (with π defined in eqn (5)) in Algorithm 1 with appropriate initialization obtains a guarantee of 1 −1/e for SK. Greedy (Gr): A similar greedy algorithm can provide approximation guarantees for the general SCSK problem, with submodular f and g. Unlike the knapsack case in (5), however, at iteration i we choose an element j /∈Si−1 : f(Sπ i−1 ∪{j}) ≤b which maximizes g(j|Si−1). In terms of Algorithm 1, this is analogous to choosing a permutation, π such that: π(i) ∈argmax{g(j|Sπ i−1)|j /∈Sπ i−1, f(Sπ i−1 ∪{j}) ≤b}. (6) 6 Theorem 4.7. The greedy algorithm for SCSK obtains an approx. factor of 1 κg (1 −( Kf −κg Kf )kf ) ≥ 1 Kf , where Kf = max{|X| : f(X) ≤b} and kf = min{|X| : f(X) ≤b & ∀j ∈X, f(X ∪j) > b}. In the worst case, kf = 1 and Kf = n, in which case the guarantee is 1/n. The bound above follows from a simple observation that the constraint {f(X) ≤b} is down-monotone for a monotone function f. However, in this variant, we do not use any specific information about f. In particular it holds for maximizing a submodular function g over any down monotone constraint [2]. Hence it is conceivable that an algorithm that uses both f and g to choose the next element could provide better bounds. We do not, however, currently have the analysis for this. Iterated Submodular Cost Knapsack (ISK): Here, we choose ˆft(X) as a modular upper bound of f, tight at Xt. Let ˆgt = g. Then at every iteration, we solve max{g(X)|mf Xt(X) ≤b}, which is a submodular maximization problem subject to a knapsack constraint (SK). As mentioned above, greedy can solve this nearly optimally. We start with X0 = ∅, choose ˆf0(X) = P j∈X f(j) and then iteratively continue this process until convergence (note that this is an ascent algorithm). We have the following theoretical guarantee: Theorem 4.8. Algorithm ISK obtains a set Xt such that g(Xt) ≥(1−e−1)g( ˜X), where ˜X is the optimal solution of max n g(X) | f(X) ≤b(1+(Kf −1)(1−κf ) Kf o and where Kf = max{|X| : f(X) ≤b}. It is worth pointing out that the above bound holds even after the first iteration of the algorithm. It is interesting to note the similarity between this approach and ISSC. Notice that the guarantee above is not a standard bi-criterion approximation. We show in the extended version [11] that with a simple transformation, we can obtain a bicriterion guarantee. Ellipsoidal Approximation based Submodular Cost Knapsack (EASK): Choosing the Ellipsoidal Approximation f ea of f as a surrogate function, we obtain a simpler problem: max   g(X) κf q wf κ(X) + (1 −κf) X j∈X f(j) ≤b   . (7) In order to solve this problem, we look at its dual problem (i.e., Eqn. (4)) and use Algorithm 2 to convert the guarantees. We call this procedure EASK. We then obtain guarantees very similar to Theorem 4.4. Lemma 4.9. EASK obtains a guarantee of h 1 + ϵ, O( √n log nHg 1+(√n log n−1)(1−κf )) i . In the case when the submodular function has a curvature κf = 1, we can actually provide a simpler algorithm without needing to use the conversion algorithm (Algorithm 2). In this case, we can directly choose the ellipsoidal approximation of f as p wf(X) and solve the surrogate problem: max{g(X) : wf(X) ≤b2}. This surrogate problem is a submodular cost knapsack problem, which we can solve using the greedy algorithm. We call this algorithm EASKc. This guarantee is tight up to log factors if κf = 1. Corollary 4.10. Algorithm EASKc obtains a bi-criterion guarantee of [1 −e−1, O(√n log n)]. 4.3 Extensions beyond SCSC and SCSK SCSC and SCSK can in fact be extended to more flexible and complicated constraints which can arise naturally in many applications [18, 8]. These include multiple covering and knapsack constraints – i.e., min{f(X)|gi(X) ≥ci, i = 1, 2, · · · k} and max{g(X)|fi(X) ≤bi, i = 1, 2, · · · k}, and robust optimization problems like max{mini gi(X)|f(X) ≤b}, where the functions f, g, fi’s and gi’s are submodular. We also consider SCSC and SCSK with non-monotone submodular functions. Due to lack of space, we defer these discussions to the extended version of this paper [11]. 4.4 Hardness In this section, we provide the hardness for Problems 1 and 2. The lower bounds serve to show that the approximation factors above are almost tight. 7 Theorem 4.11. For any κ > 0, there exists submodular functions with curvature κ such that no polynomial time algorithm for Problems 1 and 2 achieves a bi-criterion factor better than σ ρ = n1/2−ϵ 1+(n1/2−ϵ−1)(1−κ) for any ϵ > 0. The above result shows that EASSC and EASK meet the bounds above to log factors. We see an interesting curvature-dependent influence on the hardness. We also see this phenomenon in the approximation guarantees of our algorithms. In particular, as soon as f becomes modular, the problem becomes easy, even when g is submodular. This is not surprising since the submodular set cover problem and the submodular cost knapsack problem both have constant factor guarantees. 5 Experiments In this section, we empirically compare the performance of the various algorithms discussed in this paper. We are motivated by the speech data subset selection application [20, 23] with the submodular function f encouraging limited vocabulary while g tries to achieve acoustic variability. A natural choice of the function f is a function of the form |Γ(X)|, where Γ(X) is the neighborhood function on a bipartite graph constructed between the utterances and the words [23]. For the coverage function g, we use two types of coverage: one is a facility location function g1(X) = P i∈V maxj∈X sij while the other is a saturated sum function g2(X) = P i∈V min{P j∈X sij, α P j∈V sij}. Both these functions are defined in terms of a similarity matrix S = {sij}i,j∈V , which we define on the TIMIT corpus [5], using the string kernel metric [27] for similarity. Since some of our algorithms, like the Ellipsoidal Approximations, are computationally intensive, we restrict ourselves to 50 utterances. 0 100 200 250 0 10 20 30 40 50 f(X) g(X) Fac. Location/ Bipartite Neighbor. ISSC EASSCc ISK Gr EASKc Random 20 40 60 80 100 0 100 200 300 f(X) g(X) Saturated Sum/ Bipartite Neighbor ISSC EASSCc ISK Gr EASKc Random Figure 1: Comparison of the algorithms in the text. We compare our different algorithms on Problems 1 and 2 with f being the bipartite neighborhood and g being the facility location and saturated sum respectively. Furthermore, in our experiments, we observe that the neighborhood function f has a curvature κf = 1. Thus, it suffices to use the simpler versions of algorithm EA (i.e., algorithm EASSCc and EASKc). The results are shown in Figure 1. We observe that on the real-world instances, all our algorithms perform almost comparably. This implies, moreover, that the iterative variants, viz. Gr, ISSC and ISK, perform comparably to the more complicated EA-based ones, although EASSC and EASK have better theoretical guarantees. We also compare against a baseline of selecting random sets (of varying cardinality), and we see that our algorithms all perform much better. In terms of the running time, computing the Ellipsoidal Approximation for |Γ(X)| with |V | = 50 takes about 5 hours while all the iterative variants (i.e., Gr, ISSC and ISK) take less than a second. This difference is much more prominent on larger instances (for example |V | = 500). 6 Discussions In this paper, we propose a unifying framework for problems 1 and 2 based on suitable surrogate functions. We provide a number of iterative algorithms which are very practical and scalable (like Gr, ISK and ISSC), and also algorithms like EASSC and EASK, which though more intensive, obtain tight approximation bounds. Finally, we empirically compare our algorithms, and show that the iterative algorithms compete empirically with the more complicated and theoretically better approximation algorithms. For future work, we would like to empirically evaluate our algorithms on many of the real world problems described above, particularly the limited vocabulary data subset selection application for speech corpora, and the machine translation application. Acknowledgments: Special thanks to Kai Wei and Stefanie Jegelka for discussions, to Bethany Herwaldt for going through an early draft of this manuscript and to the anonymous reviewers for useful reviews. This material is based upon work supported by the National Science Foundation under Grant No. (IIS-1162606), a Google and a Microsoft award, and by the Intel Science and Technology Center for Pervasive Computing. 8 References [1] A. Atamt¨urk and V. Narayanan. The submodular knapsack polytope. Discrete Optimization, 2009. [2] M. Conforti and G. Cornuejols. Submodular set functions, matroids and the greedy algorithm: tight worstcase bounds and some generalizations of the Rado-Edmonds theorem. Discrete Applied Mathematics, 7(3):251–274, 1984. [3] U. Feige. A threshold of ln n for approximating set cover. Journal of the ACM (JACM), 1998. [4] S. Fujishige. Submodular functions and optimization, volume 58. Elsevier Science, 2005. [5] J. Garofolo, F. Lamel, L., J. W., Fiscus, D. Pallet, and N. Dahlgren. Timit, acoustic-phonetic continuous speech corpus. In DARPA, 1993. [6] M. Goemans, N. Harvey, S. Iwata, and V. Mirrokni. Approximating submodular functions everywhere. In SODA, pages 535–544, 2009. [7] A. Guillory and J. Bilmes. Interactive submodular set cover. In ICML, 2010. [8] A. Guillory and J. Bilmes. Simultaneous learning and covering with adversarial noise. In ICML, 2011. [9] R. Iyer and J. Bilmes. Algorithms for approximate minimization of the difference between submodular functions, with applications. In UAI, 2012. [10] R. Iyer and J. Bilmes. The submodular Bregman and Lov´asz-Bregman divergences with applications. In NIPS, 2012. [11] R. Iyer and J. Bilmes. Submodular Optimization with Submodular Cover and Submodular Knapsack Constraints: Extended arxiv version, 2013. [12] R. Iyer, S. Jegelka, and J. Bilmes. Curvature and Optimal Algorithms for Learning and Minimizing Submodular Functions . In NIPS, 2013. [13] R. Iyer, S. Jegelka, and J. Bilmes. Fast semidifferential based submodular function optimization. In ICML, 2013. [14] S. Jegelka and J. A. Bilmes. Submodularity beyond submodular energies: coupling edges in graph cuts. In CVPR, 2011. [15] Y. Kawahara and T. Washio. Prismatic algorithm for discrete dc programming problems. In NIPS, 2011. [16] H. Kellerer, U. Pferschy, and D. Pisinger. Knapsack problems. Springer Verlag, 2004. [17] A. Krause and C. Guestrin. A note on the budgeted maximization on submodular functions. Technical Report CMU-CALD-05-103, Carnegie Mellon University, 2005. [18] A. Krause, B. McMahan, C. Guestrin, and A. Gupta. Robust submodular observation selection. Journal of Machine Learning Research (JMLR), 9:2761–2801, 2008. [19] A. Krause, A. Singh, and C. Guestrin. Near-optimal sensor placements in Gaussian processes: Theory, efficient algorithms and empirical studies. JMLR, 9:235–284, 2008. [20] H. Lin and J. Bilmes. How to select a good training-data subset for transcription: Submodular active selection for sequences. In Interspeech, 2009. [21] H. Lin and J. Bilmes. Multi-document summarization via budgeted maximization of submodular functions. In NAACL, 2010. [22] H. Lin and J. Bilmes. A class of submodular functions for document summarization. In The 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies (ACL/HLT2011), Portland, OR, June 2011. [23] H. Lin and J. Bilmes. Optimal selection of limited vocabulary speech corpora. In Interspeech, 2011. [24] R. C. Moore and W. Lewis. Intelligent selection of language model training data. In Proceedings of the ACL 2010 Conference Short Papers, pages 220–224. Association for Computational Linguistics, 2010. [25] M. Narasimhan and J. Bilmes. A submodular-supermodular procedure with applications to discriminative structure learning. In UAI, 2005. [26] E. Nikolova. Approximation algorithms for offline risk-averse combinatorial optimization, 2010. [27] J. Rousu and J. Shawe-Taylor. Efficient computation of gapped substring kernels on large alphabets. Journal of Machine Learning Research, 6(2):1323, 2006. [28] M. Sviridenko. A note on maximizing a submodular set function subject to a knapsack constraint. Operations Research Letters, 32(1):41–43, 2004. [29] L. A. Wolsey. An analysis of the greedy algorithm for the submodular set covering problem. Combinatorica, 2(4):385–393, 1982. 9
2013
235
4,971
Model Selection for High-Dimensional Regression under the Generalized Irrepresentability Condition Adel Javanmard Stanford University Stanford, CA 94305 adelj@stanford.edu Andrea Montanari Stanford University Stanford, CA 94305 montanar@stanford.edu Abstract In the high-dimensional regression model a response variable is linearly related to p covariates, but the sample size n is smaller than p. We assume that only a small subset of covariates is ‘active’ (i.e., the corresponding coefficients are non-zero), and consider the model-selection problem of identifying the active covariates. A popular approach is to estimate the regression coefficients through the Lasso (ℓ1-regularized least squares). This is known to correctly identify the active set only if the irrelevant covariates are roughly orthogonal to the relevant ones, as quantified through the so called ‘irrepresentability’ condition. In this paper we study the ‘Gauss-Lasso’ selector, a simple two-stage method that first solves the Lasso, and then performs ordinary least squares restricted to the Lasso active set. We formulate ‘generalized irrepresentability condition’ (GIC), an assumption that is substantially weaker than irrepresentability. We prove that, under GIC, the Gauss-Lasso correctly recovers the active set. 1 Introduction In linear regression, we wish to estimate an unknown but fixed vector of parameters θ0 ∈Rp from n pairs (Y1, X1), (Y2, X2), . . . , (Yn, Xn), with vectors Xi taking values in Rp and response variables Yi given by Yi = ⟨θ0, Xi⟩+ Wi , Wi ∼N(0, σ2) , (1) where ⟨· , · ⟩is the standard scalar product. In matrix form, letting Y = (Y1, . . . , Yn)T and denoting by X the design matrix with rows XT 1 , . . . , XT n, we have Y = X θ0 + W , W ∼N(0, σ2In×n) . (2) In this paper, we consider the high-dimensional setting in which the number of parameters exceeds the sample size, i.e., p > n, but the number of non-zero entries of θ0 is smaller than p. We denote by S ≡supp(θ0) ⊆[p] the support of θ0, and let s0 ≡|S|. We are interested in the ‘model selection’ problem, namely in the problem of identifying S from data Y , X. In words, there exists a ‘true’ low dimensional linear model that explains the data. We want to identify the set S of covariates that are ‘active’ within this model. This problem has motivated a large body of research, because of its relevance to several modern data analysis tasks, ranging from signal processing [9, 5] to genomics [15, 16]. A crucial step forward has been the development of model-selection techniques based on convex optimization formulations [17, 8, 6]. These formulations have lead to computationally efficient algorithms that can be applied to large scale problems. Such developments pose the following theoretical question: For which vectors θ0, designs X, and 1 noise levels σ, the support S can be identified, with high probability, through computationally efficient procedures? The same question can be asked for random designs X and, in this case, ‘high probability’ will refer both to the noise realization W, and to the design realization X. In the rest of this introduction we shall focus –for the sake of simplicity– on the deterministic settings, and refer to Section 3 for a treatment of Gaussian random designs. The analysis of computationally efficient methods has largely focused on ℓ1-regularized least squares, a.k.a. the Lasso [17]. The Lasso estimator is defined by bθn(Y, X; λ) ≡arg min θ∈Rp n 1 2n∥Y −Xθ∥2 2 + λ∥θ∥1 o . (3) In case the right hand side has more than one minimizer, one of them can be selected arbitrarily for our purposes. It is worth noting that when columns of X are in general positions (e.g. when the entries of X are drawn form a continuous probability distribution), the Lasso solution is unique [18]. We will often omit the arguments Y , X, as they are clear from the context. (A closely related method is the so-called Dantzig selector [6]: it would be interesting to explore whether our results can be generalized to that approach.) It was understood early on that, even in the large-sample, low-dimensional limit n →∞at p constant, supp(bθn) ̸= S unless the columns of X with index in S are roughly orthogonal to the ones with index outside S [12]. This assumption is formalized by the so-called ‘irrepresentability condition’, that can be stated in terms of the empirical covariance matrix bΣ = (XTX/n). Letting bΣA,B be the submatrix (bΣi,j)i∈A,j∈B, irrepresentability requires ∥bΣSc,S bΣ−1 S,S sign(θ0,S)∥∞≤1 −η , (4) for some η > 0 (here sign(u)i = +1, 0, −1 if, respectively, ui > 0, = 0, < 0). In an early breakthrough, Zhao and Yu [23] proved that, if this condition holds with η uniformly bounded away from 0, it guarantees correct model selection also in the high-dimensional regime p ≫n. Meinshausen and B¨ulmann [14] independently established the same result for random Gaussian designs, with applications to learning Gaussian graphical models. These papers applied to very sparse models, requiring in particular s0 = O(nc), c < 1, and parameter vectors with large coefficients. Namely, scaling the columns of X such that bΣi,i ≤1, for i ∈[p], they require θmin ≡mini∈S |θ0,i| ≥c p s0/n. Wainwright [21] strengthened considerably these results by allowing for general scalings of s0, p, n and proving that much smaller non-zero coefficients can be detected. Namely, he proved that for a broad class of empirical covariances it is only necessary that θmin ≥cσ p (log p)/n. This scaling of the minimum non-zero entry is optimal up to constants. Also, for a specific classes of random Gaussian designs (including X with i.i.d. standard Gaussian entries), the analysis of [21] provides tight bounds on the minimum sample size for correct model selection. Namely, there exists cℓ, cu > 0 such that the Lasso fails with high probability if n < cℓs0 log p and succeeds with high probability if n ≥cu s0 log p. While, thanks to these recent works [23, 14, 21], we understand reasonably well model selection via the Lasso, it is fundamentally unknown what model-selection performances can be achieved with general computationally practical methods. Two aspects of of the above theory cannot be improved substantially: (i) The non-zero entries must satisfy the condition θmin ≥cσ/√n to be detected with high probability. Even if n = p and the measurement directions Xi are orthogonal, e.g., X = √nIn×n, one would need |θ0,i| ≥cσ/√n to distinguish the i-th entry from noise. For instance, in [10], the authors prove a general upper bound on the minimax power of tests for hypotheses H0,i = {θ0,i = 0}. Specializing this bound to the case of standard Gaussian designs, the analysis of [10] shows formally that no test can detect θ0,i ̸= 0, with a fixed degree of confidence, unless |θ0,i| ≥cσ/√n. (ii) The sample size must satisfy n ≥s0. Indeed, if this is not the case, for each θ0 with support of size |S| = s0, there is a one parameter family {θ0(t) = θ0 + t v}t∈R with supp(θ0(t)) ⊆S, Xθ0(t) = Xθ0 and, for specific values of t, the support of θ0(t) is strictly contained in S. On the other hand, there is no fundamental reason to assume the irrepresentability condition (4). This follows from the requirement that a specific method (the Lasso) succeeds, but is unclear why it should be necessary in general. In this paper we prove that the Gauss-Lasso selector has nearly optimal model selection properties under a condition that is strictly weaker than irrepresentability. 2 GAUSS-LASSO SELECTOR: Model selector for high dimensional problems Input: Measurement vector y, design model X, regularization parameter λ, support size s0. Output: Estimated support bS. 1: Let T = supp(bθn) be the support of Lasso estimator bθn = bθn(y, X, λ) given by bθn(Y, X; λ) ≡arg min θ∈Rp n 1 2n∥Y −Xθ∥2 2 + λ∥θ∥1 o . 2: Construct the estimator bθGL as follows: bθGL T = (XT T XT )−1XT T y , bθGL T c = 0 . 3: Find s0-th largest entry (in modulus) of bθGL T , denoted by bθGL (s0), and let bS ≡  i ∈[p] : |bθGL i | ≥|bθGL (s0)| . We call this condition the generalized irrepresentability condition (GIC). The Gauss-Lasso procedure uses the Lasso to estimate a first model T ⊆{1, . . . , p}. It then constructs a new estimator by ordinary least squares regression of the data Y onto the model T. We prove that the estimated model is, with high probability, correct (i.e., bS = S) under conditions comparable to the ones assumed in [14, 23, 21], while replacing irrepresentability by the weaker generalized irrepresentability condition. In the case of random Gaussian designs, our analysis further assumes the restricted eigenvalue property in order to establish a nearly optimal scaling of the sample size n with the sparsity parameter s0. In order to build some intuition about the difference between irrepresentability and generalized irrepresentability, it is convenient to consider the Lasso cost function at ‘zero noise’: G(θ; ξ) ≡1 2n∥X(θ −θ0)∥2 2 + ξ∥θ∥1 = 1 2⟨(θ −θ0), bΣ(θ −θ0)⟩+ ξ∥θ∥1 . Let bθZN(ξ) be the minimizer of G( · ; ξ) and v ≡limξ→0+ sign(bθZN(ξ)). The limit is well defined by Lemma 2.2 below. The KKT conditions for bθZN imply, for T ≡supp(v), ∥bΣT c,T bΣ−1 T,T vT ∥∞≤1 . Since G( · ; ξ) has always at least one minimizer, this condition is always satisfied. Generalized irrepresentability requires that the above inequality holds with some small slack η > 0 bounded away from zero, i.e., ∥bΣT c,T bΣ−1 T,T vT ∥∞≤1 −η . Notice that this assumption reduces to standard irrepresentability cf. Eq. (4) if, in addition, we ask that v = sign(θ0). In other words, earlier work [14, 23, 21] required generalized irrepresentability plus sign-consistency in zero noise, and established sign consistency in non-zero noise. In this paper the former condition is shown to be sufficient. From a different point of view, GIC demands that irrepresentability holds for a superset of the true support S. It was indeed argued in the literature that such a relaxation of irrepresentability allows to cover a significantly broader set of cases (see for instance [3, Section 7.7.6]). However, it was never clarified why such a superset irrepresentability condition should be significantly more general than simple irrepresentability. Further, no precise prescription existed for the superset of the true support. Our contributions can therefore be summarized as follows: • By tying it to the KKT condition for the zero-noise problem, we justify the expectation that generalized irrepresentability should hold for a broad class of design matrices. • We thus provide a specific formulation of superset irrepresentability, prescribing both the superset T and the sign vector vT , that is, by itself, significantly more general than simple irrepresentability. 3 • We show that, under GIC, exact support recovery can be guaranteed using the Gauss-Lasso, and formulate the appropriate ‘minimum coefficient’ conditions that guarantee this. As a side remark, even when simple irrepresentability holds, our results strengthen somewhat the estimates of [21] (see below for details). The paper is organized as follows. In the rest of the introduction we illustrate the range of applicability of GIC through a simple example and we discuss further related work. We finally introduce the basic notations to be used throughout the paper. Section 2 treats the case of deterministic designs X, and develops our main results on the basis of the GIC. Section 3 extends our analysis to the case of random designs. In this case GIC is required to hold for the population covariance, and the analysis is more technical as it requires to control the randomness of the design matrix. We refer the reader to the long version of the paper [11] for the proofs of our main results and the technical steps. 1.1 An example In order to illustrate the range of new cases covered by our results, it is instructive to consider a simple example. A detailed discussion of this calculation can be found in [11]. The example corresponds to a Gaussian random design, i.e., the rows XT 1 , ...XT n are i.i.d. realizations of a p-variate normal distribution with mean zero. We write Xi = (Xi,1, Xi,2, . . . , Xi,p)T for the components of Xi. The response variable is linearly related to the first s0 covariates: Yi = θ0,1Xi,1 + θ0,2Xi,2 + · · · + θ0,s0Xi,s0 + Wi , where Wi ∼N(0, σ2) and we assume θ0,i > 0 for all i ≤s0. In particular S = {1, . . . , s0}. As for the design matrix, first p −1 covariates are orthogonal at the population level, i.e., Xi,j ∼ N(0, 1) are independent for 1 ≤j ≤p−1 (and 1 ≤i ≤n). However the p-th covariate is correlated to the s0 relevant ones: Xi,p = a Xi,1 + a Xi,2 + · · · + a Xi,s0 + b ˜Xi,p . Here ˜Xi,p ∼N(0, 1) is independent from {Xi,1, . . . , Xi,p−1} and represents the orthogonal component of the p-th covariate. We choose the coefficients a, b ≥0 such that s0a2 + b2 = 1, whence E{X2 i,p} = 1 and hence the p-th covariate is normalized as the first (p −1) ones. In other words, the rows of X are i.i.d. Gaussian Xi ∼N(0, Σ) with covariance given by Σij =    1 if i = j, a if i = p, j ∈S or i ∈S, j = p, 0 otherwise. For a = 0, this is the standard i.i.d. design and irrepresentability holds. The Lasso correctly recovers the support S from n ≥c s0 log p samples, provided θmin ≥c′p (log p)/n. It follows from [21] that this remains true as long as a ≤(1−η)/s0 for some η > 0 bounded away from 0. However, as soon as a > 1/s0, the Lasso includes the p-th covariate in the estimated model, with high probability. On the other hand, Gauss-Lasso is successful for a significantly larger set of values of a. Namely, if a ∈  0, 1 −η s0  ∪  1 s0 , 1 −η √s0  , then it recovers S from n ≥c s0 log p samples, provided θmin ≥c′p (log p)/n. While the interval ((1−η)/s0, 1/s0] is not covered by this result, we expect this to be due to the proof technique rather than to an intrinsic limitation of the Gauss-Lasso selector. 1.2 Further related work The restricted isometry property [7, 6] (or the related restricted eigenvalue [2] or compatibility conditions [19]) have been used to establish guarantees on the estimation and model selection errors of the Lasso or similar approaches. In particular, Bickel, Ritov and Tsybakov [2] show that, under such conditions, with high probability, ∥bθ −θ0∥2 2 ≤Cσ2 s0 log p n . 4 The same conditions can be used to prove model-selection guarantees. In particular, Zhou [24] studies a multi-step thresholding procedure whose first steps coincide with the Gauss-Lasso. While the main objective of this work is to prove high-dimensional ℓ2 consistency with a sparse estimated model, the author also proves partial model selection guarantees. Namely, the method correctly recovers a subset of large coefficients SL ⊆S, provided |θ0,i| ≥cσ p s0(log p)/n, for i ∈SL. This means that the coefficients that are guaranteed to be detected must be a factor √s0 larger than what is required by our results. An alternative approach to establishing model-selection guarantees assumes a suitable mutual incoherence conditions. Lounici [13] proves correct model selection under the assumption maxi̸=j |bΣij| = O(1/s0). This assumption is however stronger than irrepresentability [19]. Cand´es and Plan [4] also assume mutual incoherence, albeit with a much weaker requirement, namely maxi̸=j |bΣij| = O(1/(log p)). Under this condition, they establish model selection guarantees for an ideal scaling of the non-zero coefficients θmin ≥cσ p (log p)/n. However, this result only holds with high probability for a ‘random signal model’ in which the non-zero coefficients θ0,i have uniformly random signs. The authors in [22] consider the variable selection problem, and under the same assumptions on the non-zero coefficients as in the present paper, guarantee support recovery under a cone condition. The latter condition however is stronger than the generalized irrepresentability condition. In particular, for the example in Section 1.1 it yields no improvement over the standard irrepresentability. The work [20] studies the adaptive and the thresholded Lasso estimators and proves correct model selection assuming the non-zero coefficients are of order s0 p (log p)/n. Finally, model selection consistency can be obtained without irrepresentability through other methods. For instance [25] develops the adaptive Lasso, using a data-dependent weighted ℓ1 regularization, and [1] proposes the Bolasso, a resampling-based techniques. Unfortunately, both of these approaches are only guaranteed to succeed in the low-dimensional regime of p fixed, and n →∞. 1.3 Notations We provide a brief summary of the notations used throughout the paper. For a matrix A and set of indices I, J, we let AJ denote the submatrix containing just the columns in J and AI,J denote the submatrix formed by the rows in I and columns in J. Likewise, for a vector v, vI is the restriction of v to indices in I. Further, the notation A−1 I,I represents the inverse of AI,I, i.e., A−1 I,I = (AI,I)−1. The maximum and the minimum singular values of A are respectively denoted by σmax(A) and σmin(A). We write ∥v∥p for the standard ℓp norm of a vector v. Specifically, ∥v∥0 denotes the number of nonzero entries in v. Also, ∥A∥p refers to the induced operator norm on a matrix A. We use ei to refer to the i-th standard basis element, e.g., e1 = (1, 0, . . . , 0). For a vector v, supp(v) represents the positions of nonzero entries of v. Throughout, we denote the rows of the design matrix X by X1, . . . , Xn ∈Rp and denote its columns by x1, . . . , xp ∈Rn. Further, for a vector v, sign(v) is the vector with entries sign(v)i = +1 if vi > 0, sign(v)i = −1 if vi < 0, and sign(v)i = 0 otherwise. 2 Deterministic designs An outline of this section is as follows: (1) We first consider the zero-noise problem W = 0, and prove several useful properties of the Lasso estimator in this case. In particular, we show that there exists a threshold for the regularization parameter below which the support of the Lasso estimator remains the same and contains supp(θ0). Moreover, the Lasso estimator support is not much larger than supp(θ0). (2) We then turn to the noisy problem, and introduce the generalized irrepresentability condition (GIC) that is motivated by the properties of the Lasso in the zero-noise case. We prove that under GIC (and other technical conditions), with high probability, the signed support of the Lasso estimator is the same as that in the zero-noise problem. (3) We show that the Gauss-Lasso selector correctly recovers the signed support of θ0. 5 2.1 Zero-noise problem Recall that bΣ ≡(XTX/n) denotes the empirical covariance of the rows of the design matrix. Given bΣ ∈Rp×p, bΣ ⪰0, θ0 ∈Rp and ξ ∈R+, we define the zero-noise Lasso estimator as bθZN(ξ) ≡arg min θ∈Rp n 1 2n⟨(θ −θ0), bΣ(θ −θ0)⟩+ ξ∥θ∥1 o . (5) Note that bθZN(ξ) is obtained by letting Y = Xθ0 in the definition of bθn(Y, X; ξ). Following [2], we introduce a restricted eigenvalue constant for the empirical covariance matrix bΣ: bκ(s, c0) ≡min J⊆[p] |J|≤s min u∈Rp ∥uJc∥1≤c0∥uJ∥1 ⟨u, bΣu⟩ ∥u∥2 2 . (6) Our first result states that supp(bθZN(ξ)) is not much larger than the support of θ0, for any ξ > 0. Lemma 2.1. Let bθZN = bθZN(ξ) be defined as per Eq. (5), with ξ > 0. Then, if s0 = ∥θ0∥0, ∥bθZN∥0 ≤ 1 + 4∥bΣ∥2 bκ(s0, 1) ! s0 . (7) Lemma 2.2. Let bθZN = bθZN(ξ) be defined as per Eq. (5), with ξ > 0. Then there exist ξ0 = ξ0(bΣ, S, θ0) > 0, T0 ⊆[p], v0 ∈{−1, 0, +1}p, such that the following happens. For all ξ ∈(0, ξ0), sign(bθZN(ξ)) = v0 and supp(bθZN(ξ)) = supp(v0) = T0. Further T0 ⊇S, v0,S = sign(θ0,S) and ξ0 = mini∈S |θ0,i/[bΣ−1 T0,T0v0,T0]i|. Finally we have the following standard characterization of the solution of the zero-noise problem. Lemma 2.3. Let bθZN = bθZN(ξ) be defined as per Eq. (5), with ξ > 0. Let T ⊇S and v ∈ {+1, 0, −1}p be such that supp(v) = T. Then sign(bθZN) = v if and only if bΣT c,T bΣ−1 T,T vT ∞≤1 , (8) vT = sign  θ0,T −ξbΣ−1 T,T vT  . (9) Further, if the above holds, bθZN is given by bθZN T c = 0 and bθZN T = θ0,T −ξbΣ−1 T,T vT . Motivated by this result, we introduce the generalized irrepresentability condition (GIC) for deterministic designs. Generalized irrepresentability (deterministic designs). The pair (bΣ, θ0), bΣ ∈Rp×p, θ0 ∈Rp satisfy the generalized irrepresentability condition with parameter η > 0 if the following happens. Let v0, T0 be defined as per Lemma 2.2. Then bΣT c 0 ,T0 bΣ−1 T0,T0v0,T0 ∞≤1 −η . (10) In other words we require the dual feasibility condition (8), which always holds, to hold with a positive slack η. 2.2 Noisy problem Consider the noisy linear observation model as described in (2), and let br ≡(XTW/n). We begin with a standard characterization of sign(bθn), the signed support of the Lasso estimator (3). Lemma 2.4. Let bθn = bθn(y, X; λ) be defined as per Eq. (3), and let z ∈{+1, 0, −1}p with supp(z) = T. Further assume T ⊇S. Then the signed support of the Lasso estimator is given by sign(bθn) = z if and only if bΣT c,T bΣ−1 T,T zT + 1 λ(brT c −bΣT c,T bΣ−1 T,T brT ) ∞≤1 , (11) zT = sign  θ0,T −bΣ−1 T,T (λzT −brT )  . (12) 6 Theorem 2.5. Consider the deterministic design model with empirical covariance matrix bΣ ≡ (XTX)/n, and assume bΣi,i ≤1 for i ∈[p]. Let T0 ⊆[p], v0 ∈{+1, 0, −1}p be the set and vector defined in Lemma 2.2. Assume that (i) σmin(bΣT0,T0) ≥Cmin > 0. (ii) The pair (bΣ, θ0) satisfies the generalized irrepresentability condition with parameter η. Consider the Lasso estimator bθn = bθn(y, X; λ) defined as per Eq. (3), with λ = (σ/η) p 2c1 log p/n, for some constant c1 > 1, and suppose that for some c2 > 0: |θ0,i| ≥c2λ + λ [bΣ−1 T0,T0v0,T0]i for all i ∈S, (13) [bΣ−1 T0,T0v0,T0]i ≥c2 for all i ∈T0 \ S. (14) We further assume, without loss of generality, η ≤c2 √Cmin. Then the following holds true: P n sign(bθn(λ)) = v0 o ≥1 −4p1−c1 . (15) Note that even under standard irrepresentability, this result improves over [21, Theorem 1.(b)], in that the required lower bound for |θ0,i|, i ∈S, does not depend on ∥bΣ−1 S,S∥∞. Remark 2.6. Condition (i) in Theorem 2.5 requires the submatrix bΣT0,T0 to have minimum singular value bounded away form zero. Assuming bΣS,S to be non-singular is necessary for identifiability. Requiring the minimum singular value of bΣT0,T0 to be bounded away from zero is not much more restrictive since T0 is comparable in size with S, as stated in Lemma 2.1. We next show that the Gauss-Lasso selector correctly recovers the support of θ0. Theorem 2.7. Consider the deterministic design model with empirical covariance matrix bΣ ≡ (XTX)/n, and assume that bΣi,i ≤1 for i ∈[p]. Under the assumptions of Theorem 2.5, P  ∥bθGL −θ0∥∞≥µ  ≤4p1−c1 + 2pe−nCminµ2/2σ2 . In particular, if bS is the model selected by the Gauss-Lasso, then P(bS = S) ≥1 −6 p1−c1/4. 3 Random Gaussian designs In the previous section, we studied the case of deterministic design models which allowed for a straightforward analysis. Here, we consider the random design model which needs a more involved analysis. Within the random Gaussian design model, the rows Xi are distributed as Xi ∼N(0, Σ) for some (unknown) covariance matrix Σ ≻0. In order to study the performance of Gauss-Lasso selector in this case, we first define the population-level estimator. Given Σ ∈Rp×p, Σ ≻0, θ0 ∈Rp and ξ ∈R+, the population-level estimator bθ∞(ξ) = bθ∞(ξ; θ0, Σ) is defined as bθ∞(ξ) ≡arg min θ∈Rp n1 2 ⟨(θ −θ0), Σ(θ −θ0)⟩+ ξ∥θ∥1 o . (16) In fact, the population-level estimator is obtained by assuming that the response vector Y is noiseless and n = ∞, hence replacing the empirical covariance (XTX/n) with the exact covariance Σ in the lasso optimization problem (3). Note that the population-level estimator bθ∞is deterministic, albeit X is a random design. We show that under some conditions on the covariance Σ and vector θ0, T ≡supp(bθn) = supp(bθ∞), i.e., the population-level estimator and the Lasso estimator share the same (signed) support. Further T ⊇S. Since bθ∞(and hence T) is deterministic, XT is a Gaussian matrix with rows drawn independently from N(0, ΣT,T ). This observation allows for a simple analysis of the Gauss-Lasso selector bθGL. An outline of the section is as follows: (1) We begin with noting that the population-level estimator bθ∞(ξ) has the similar properties to bθZN(ξ) stated in Section 2.1. In particular, there exists a threshold ξ0, such that for all ξ ∈(0, ξ0), supp(bθ∞(ξ)) remains the same and contains supp(θ0). Moreover, supp(bθ∞(ξ)) is not much larger than supp(θ0). (2) We show that under GIC for covariance matrix Σ (and other sufficient conditions), with high probability, the signed support of the Lasso estimator is the same as the signed support of the population-level estimator. (3) Following the previous steps, we show that the Gauss-Lasso selector correctly recovers the signed support of θ0. 7 3.1 The n = ∞problem Comparing Eqs. (5) and (16), the estimators bθZN(ξ) and bθ∞(ξ) are defined in a very similar manner (the former is defined with respect to bΣ and the latter is defined with respect to Σ). It is easy to see that bθ∞satisfies the properties stated in Section 2.1 once we replace bΣ with Σ. 3.2 The high-dimensional problem We now consider the Lasso estimator (3). Recall the notations bΣ ≡(XTX)/n and br ≡(XTW)/n. Note that bΣ ∈Rp×p, br ∈Rp are both random quantities in the case of random designs. Theorem 3.1. Consider the Gaussian random design model with covariance matrix Σ ≻0, and assume that Σi,i ≤1 for i ∈[p]. Let T0 ⊆[p], v0 ∈{+1, 0, −1}p be the deterministic set and vector defined in Lemma 2.2 (replacing bΣ with Σ), and t0 ≡|T0|. Assume that (i) σmin(ΣT0,T0) ≥Cmin > 0. (ii) The pair (Σ, θ0) satisfies the generalized irrepresentability condition with parameter η. Consider the Lasso estimator bθn = bθn(y, X; λ) defined as per Eq. (3), with λ = (4σ/η) p c1 log p/n, for some constant c1 > 1, and suppose that for some c2 > 0: |θ0,i| ≥c2λ + 3 2λ [Σ−1 T0,T0v0,T0]i for all i ∈S, (17) [Σ−1 T0,T0v0,T0]i ≥2c2 for all i ∈T0 \ S. (18) We further assume, without loss of generality, η ≤c2 √Cmin. If n ≥max(M1, M2)t0 log p with M1 ≡(74c1)/(η2Cmin), and M2 ≡c1(32/(c2Cmin))2 , then the following holds true: P n sign(bθn(λ)) = v0 o ≥1 −pe−n 10 −6e−t0 2 −8p1−c1 . (19) Note that even under standard irrepresentability, this result improves over [21, Theorem 3.(ii)], in that the required lower bound for |θ0,i|, i ∈S, does not depend on ∥Σ−1/2 S,S ∥∞. Remark 3.2. Condition (i) follows readily from the restricted eigenvalue constraint, i.e., κ∞(t0, 0) > 0. This is a reasonable assumption since T0 is not much larger than S0, as stated in Lemma 2.1 (replacing bΣ with Σ). Namely, s0 ≤t0 ≤(1 + 4∥Σ∥2/κ(s0, 1))s0. Below, we show that the Gauss-Lasso selector correctly recovers the signed support of θ0. Theorem 3.3. Consider the random Gaussian design model with covariance matrix Σ ≻0, and assume that Σi,i ≤1 for i ∈[p]. Under the assumptions of Theorem 3.1, and for n ≥max(M1, M2)t0 log p, we have P  ∥bθGL −θ0∥∞≥µ  ≤pe−n 10 + 6e−s0 2 + 8p1−c1 + 2pe−nCminµ2/2σ2 . Moreover, letting ˆS be the model returned by the Gauss-Lasso selector, we have P(bS = S) ≥1 −p e−n 10 −6 e−s0 2 −10 p1−c1 . Remark 3.4. [Detection level] Let θmin ≡mini∈S |θ0,i| be the minimum magnitude of the nonzero entries of vector θ0. By Theorem 3.3, Gauss-Lasso selector correctly recovers supp(θ0), with probability greater than 1 −p e−n 10 −6 e−s0 2 −10 p1−c1, if n ≥max(M1, M2)t0 log p, and θmin ≥Cσ r log p n 1 + ∥Σ−1 T0,T0∥∞  , (20) for some constant C. Note that Eq. (20) follows from Eqs. (17) and (18). 8 References [1] F. R. Bach. Bolasso: model consistent lasso estimation through the bootstrap. In Proceedings of the 25th international conference on Machine learning, pages 33–40. ACM, 2008. [2] P. J. Bickel, Y. Ritov, and A. B. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. Amer. J. of Mathematics, 37:1705–1732, 2009. [3] P. B¨uhlmann and S. van de Geer. Statistics for high-dimensional data. Springer-Verlag, 2011. [4] E. Cand`es and Y. Plan. Near-ideal model selection by ℓ1 minimization. The Annals of Statistics, 37(5A):2145–2177, 2009. [5] E. Candes, J. K. Romberg, and T. Tao. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. on Inform. Theory, 52:489 – 509, 2006. [6] E. Cand´es and T. Tao. The Dantzig selector: statistical estimation when p is much larger than n. Annals of Statistics, 35:2313–2351, 2007. [7] E. J. Cand´es and T. Tao. Decoding by linear programming. IEEE Trans. on Inform. Theory, 51:4203– 4215, 2005. [8] S. Chen and D. Donoho. Examples of basis pursuit. In Proceedings of Wavelet Applications in Signal and Image Processing III, San Diego, CA, 1995. [9] D. L. Donoho. Compressed sensing. IEEE Trans. on Inform. Theory, 52:489–509, April 2006. [10] A. Javanmard and A. Montanari. Hypothesis testing in high-dimensional regression under the gaussian random design model: Asymptotic theory. arXiv preprint arXiv:1301.4240, 2013. [11] A. Javanmard and A. Montanari. Model selection for high-dimensional regression under the generalized irrepresentability condition. arXiv:1305.0355, 2013. [12] K. Knight and W. Fu. Asymptotics for lasso-type estimators. Annals of Statistics, pages 1356–1378, 2000. [13] K. Lounici. Sup-norm convergence rate and sign concentration property of lasso and dantzig estimators. Electronic Journal of statistics, 2:90–102, 2008. [14] N. Meinshausen and P. B¨uhlmann. High-dimensional graphs and variable selection with the lasso. Ann. Statist., 34:1436–1462, 2006. [15] J. Peng, J. Zhu, A. Bergamaschi, W. Han, D.-Y. Noh, J. R. Pollack, and P. Wang. Regularized multivariate regression for identifying master predictors with application to integrative genomics study of breast cancer. The Annals of Applied Statistics, 4(1):53–77, 2010. [16] S. K. Shevade and S. S. Keerthi. A simple and efficient algorithm for gene selection using sparse logistic regression. Bioinformatics, 19(17):2246–2253, 2003. [17] R. Tibshirani. Regression shrinkage and selection with the Lasso. J. Royal. Statist. Soc B, 58:267–288, 1996. [18] R. J. Tibshirani. The lasso problem and uniqueness. Electronic Journal of Statistics, 7:1456–1490, 2013. [19] S. van de Geer and P. B¨uhlmann. On the conditions used to prove oracle results for the lasso. Electron. J. Statist., 3:1360–1392, 2009. [20] S. van de Geer, P. B¨uhlmann, and S. Zhou. The adaptive and the thresholded Lasso for potentially misspecified models (and a lower bound for the Lasso). Electron. J. Stat., 5:688–749, 2011. [21] M. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using ℓ1-constrained quadratic programming. IEEE Trans. on Inform. Theory, 55:2183–2202, 2009. [22] F. Ye and C.-H. Zhang. Rate minimaxity of the lasso and dantzig selector for the lq loss in lr balls. Journal of Machine Learning Research, 11:3519–3540, 2010. [23] P. Zhao and B. Yu. On model selection consistency of Lasso. The Journal of Machine Learning Research, 7:2541–2563, 2006. [24] S. Zhou. Thresholded Lasso for high dimensional variable selection and statistical estimation. arXiv:1002.1583v2, 2010. [25] H. Zou. The adaptive lasso and its oracle properties. Journal of the American Statistical Association, 101(476):1418–1429, 2006. 9
2013
236
4,972
Scalable kernels for graphs with continuous attributes Aasa Feragen, Niklas Kasenburg Machine Learning and Computational Biology Group Max Planck Institutes T¨ubingen and DIKU, University of Copenhagen {aasa,niklas.kasenburg}@diku.dk Jens Petersen1, Marleen de Bruijne1,2 1DIKU, University of Copenhagen 2 Erasmus Medical Center Rotterdam {phup,marleen}@diku.dk Karsten Borgwardt Machine Learning and Computational Biology Group Max Planck Institutes T¨ubingen Eberhard Karls Universit¨at T¨ubingen karsten.borgwardt@tuebingen.mpg.de Abstract While graphs with continuous node attributes arise in many applications, stateof-the-art graph kernels for comparing continuous-attributed graphs suffer from a high runtime complexity. For instance, the popular shortest path kernel scales as O(n4), where n is the number of nodes. In this paper, we present a class of graph kernels with computational complexity O(n2(m + log n + δ2 + d)), where δ is the graph diameter, m is the number of edges, and d is the dimension of the node attributes. Due to the sparsity and small diameter of real-world graphs, these kernels typically scale comfortably to large graphs. In our experiments, the presented kernels outperform state-of-the-art kernels in terms of speed and accuracy on classification benchmark datasets. 1 Introduction Graph-structured data appears in many application domains of machine learning, reaching from Social Network Analysis to Computational Biology. Comparing graphs to each other is a fundamental problem in learning on graphs, and graph kernels have become an efficient and widely-used method for measuring similarity between graphs. Highly scalable graph kernels have been proposed for graphs with thousands and millions of nodes, both for graphs without node labels [1] and for graphs with discrete node labels [2]. Such graphs appear naturally in applications such as natural language processing, chemoinformatics and bioinformatics. For applications in medical image analysis, computer vision or even bioinformatics, however, continuous-valued physical measurements such as shape, relative position or other measured node properties are often important features for classification. An open challenge, which is receiving increased attention, is to develop a scalable kernel on graphs with continuous-valued node attributes. We present the GraphHopper kernel between graphs with real-valued edge lengths and any type of node attribute, including vectors. This kernel is a convolution kernel counting sub-path similarities. The computational complexity of this kernel is O(n2(m + log n + δ2 + d)), where n and m are the number of nodes and edges, respectively; δ is the graph diameter; and d is the dimension of the node attributes. Although δ = n or m = n2 in the worst case, this is rarely the case in real-world graphs, as is also illustrated by our experiments. We find empirically in Section 3.1 that our GraphHopper kernel tends to scale quadratically with the number of nodes on real data. 1 1.1 Related work Many popular kernels for structured data are sums of substructure kernels: k(G, G′) = X s∈S X s′∈S ′ ksub(s, s′). Here G and G′ are structured data objects such as strings, trees and graphs with classes S and S ′ of substructures, and ksub is a substructure kernel. Such k are instances of R-convolution kernels [3]. A large variety of kernels exist for structures such as strings [4, 5], finite state transducers [6] and trees [5, 7]. For graphs in general, kernels can be sorted into categories based on the types of attributes they can handle. The graphlet kernel [1] compares unlabeled graphs, whereas several kernels allow node labels from a finite alphabet [2, 8]. While most kernels have a runtime that is at least O(n3), the Weisfeiler-Lehman kernel [2] uses efficient sorting, hashing and counting algorithms that take advantage of repeated occurrences of node labels from the finite label alphabet, and achieves a runtime which is at most quadratic in the number of nodes. Unfortunately, this does not generalize to graphs with vector-valued node attributes, which are typically all distinct samples from an infinite alphabet. The first kernel to take advantage of non-discrete node labels was the random walk kernel [9–11]. It incorporates edge probabilities and geometric node attributes [12], but suffers from tottering [13] and is empirically slow. Kriege et al. [14] adopt the idea of comparing matched subgraphs, including vector-valued attributes on nodes and edges. However, this kernel has a high computational and memory cost, as we will see in Section 3. Other kernels handling non-discrete attributes use edit-distance and subtree enumeration [15]. While none of these kernels scale well to large graphs, the propagation kernel [16] is fast asymptotically and empirically. It translates the problem of continuous-valued attributes to a problem of discrete-valued labels by hashing node attributes. Nevertheless, its performance depends strongly on the hashing function and in our experiments it is outperformed in classification accuracy by kernels which do not discretize the attributes. In problems where continuous-valued node attributes and inter-node distance dG(v, w) along the graph G are important features, the shortest path kernel [17], defined as kSP (G, G′) = X v,w∈V X v′,w′∈V ′ kn(v, v′) · kl (dG(v, w), dG′(v′, w′)) · kn(w, w′), performs well in classification. In particular, kSP allows the user to choose any kernels kn and kl on nodes and shortest path length. However, the asymptotic runtime of kSP is generally O(n4), which makes it unfeasible for many real-world applications. 1.2 Our contribution In this paper we present a kernel which also compares shortest paths between node pairs from the two graphs, but with a different path kernel. Instead of comparing paths via products of kernels on their lengths and endpoints, we compare paths through kernels on the nodes encountered while ”hopping” along shortest paths. This particular path kernel allows us to decompose the graph kernel as a weighted sum of node kernels, initially suggesting a potential runtime as low as O(n2d). The graph structure is encoded in the node kernel weights, and the main algorithmic challenge becomes to efficiently compute these weights. This is a combinatorial problem, which we solve with complexity O(n2(m + log n + δ2)). Note, moreover, that the GraphHopper kernel is parameter-free except for the choice of node kernels. The paper is organized as follows. In Section 2 we give short formal definitions and proceed to defining our kernel and investigating its computational properties. Section 3 presents experimental classification results on different datasets in comparison to state-of-the-art kernels as well as empirical runtime studies, before we conclude with a discussion of our findings in Section 4. 2 Graphs, paths and GraphHoppers We shall compare undirected graphs G = (V, E) with edge lengths l: E →R+ and node attributes A: V →X from a set X, which can be any set with a kernel kn; in our data X = Rd. Denote 2 n = |V | and m = |E|. A subtree T ⊂G is a subgraph of G which is a tree. Such subtrees inherit node attributes and edge lengths from G by restricting the attribute and length maps A and l to the new node and edge sets, respectively. For a tree T = (V, E, r) with a root node r, let p(v) and c(v) denote the parent and the children of any v ∈V . Given nodes va, vb ∈V , a path π from va to vb in G is defined as a sequence of nodes π = [v1, v2, v3, . . . , vn] , where v1 = va, vn = vb and [vi, vi+1] ∈E for all i = 1, . . . , n −1. Let π(i) = vi denote the ith node encountered when ”hopping” along the path. Given paths π and π′ from v to w and from w to u, respectively, let [π, π′] denote their composition, which is a path from v to u. Denote by l(π) the weighted length of π, given by the sum of lengths l(vi, vi+1) of edges traversed along the path, and denote by |π| the discrete length of π, defined as the number of nodes in π. The shortest path πab from va to vb is defined in terms of weighted length; if no edge length function is given, set l(e) = 1 for all e ∈E as default. The diameter δ(G) of G is the maximal number of nodes in a shortest path in G, with respect to weighted path length. In the next few lemmas we shall prove that for a fixed a source node v ∈V , the directed edges along shortest paths from v to other nodes of G form a well-defined directed acyclic graph (DAG), that is, a directed graph with no cycles. First of all, subpaths of shortest paths πvw with source node v are shortest paths as well: Lemma 1. [18, Lemma 24.1] If π1n = [v1, . . . , vn] is a shortest path from v1 = v to vn, then the path π1n(1: i) consisting of the first i nodes of π1n is a shortest path from v1 = v to vi. □ Given a source node v ∈G, construct the directed graph Gv = (Vv, Ev) consisting of all nodes Vv from the connected component of v in G and the set Ev of all directed edges found in any shortest path from v to any given node w in Gv. Any directed walk from v in Gv is a shortest path in G: Lemma 2 If π1n is a shortest path from v1 = v to vn and (vn, vn+1) ∈Ev, then [π1n, [vn, vn+1]] is a shortest path from v1 = v to vn+1. Proof. Since (vn, vn+1) ∈Ev, there is a shortest path π1(n+1) = [v1, . . . , vn, vn+1] from v1 = v to vn+1. If this path is shorter than [π1n, [vn, vn+1]], then π1(n+1)(1 : n) is a shortest path from v1 = v to vn by Lemma 1, and it must be shorter than π1n. This is impossible, since π1n is a shortest path.□ Proposition 3 The shortest path graph Gv is a DAG. Proof. Assume, on the contrary, that Gv contains a cycle c = [v1, . . . , vn] where (vi, vi+1) ∈Ev for each i = 1, . . . , n −1 and v1 = vn. Let πv1 be the shortest path from v to v1. Using Lemma 2 repeatedly, we see that the path [πv1, c] is a shortest path from v to vn = v1, which is impossible since the new path must be longer than the shortest path πv1. □ 2.1 The GraphHopper kernel We define the GraphHopper kernel as a sum of path kernels kp over the families P, P′ of shortest paths in G, G′: k(G, G′) = X π∈P,π′∈P′ kp(π, π′), In this paper, the path kernel kp(π, π′) is a sum of node kernels kn on nodes simultaneously encountered while simultaneously hopping along paths π and π′ of equal discrete length, that is: kp(π, π′) =  P|π| j=1 kn (π(j), π′(j)) if |π| = |π′|, 0 otherwise. (4) It is clear from the definition that k(G, G′) decomposes as a sum of node kernels: k(G, G′) = X v∈V X v′∈V ′ w(v, v′)kn(v, v′), (5) where w(v, v′) counts the number of times v and v′ appear at the same hop, or coordinate, i of shortest paths π, π′ of equal discrete length |π| = |π′|. We can decompose the weight w(v, v′) as w(v, v′) = δ X j=1 δ X i=1 ♯{(π, π′)|π(i) = v, π′(i) = v′, |π| = |π′| = j} = ⟨M(v), M(v′)⟩, 3 1 1 2 1 3 2 1 2 1 1 2 1 3 2 2 1 1 2 1 3 2 2 2 2 1 0 1 0 1 1 + 0 1 + 0 1 + 0 1 + 0 0 1 0 1 1 + 0 0 1 + 0 0 1 + 0 0 1 1 + 0 0 1 1 0 0 2 1 + 0 0 1 0 0 2 1 1 1 1 + 0 1 + 0 1 1 2 + 0 1 + 0 1 2 1 2 2 + 0 1 2 2 1 1 2 2 1 1 1 + 0 1 + 0 1 1 2 + 0 1 + 0 1 + 0 1 + 0 1 2 + 0 1 + 0 1 2 1 4 2 + 0 1 4 2 1 3 6 2 Figure 1: Top: Expansion from the graph G, to the DAG G˜v, to a larger tree S˜v. Bottom left: Recursive computation of the ov ˜v. Bottom middle and right: Recursive computation of the dv r in a rooted tree as in Algorithm 2, and of the dv ˜v on a DAG G˜v as in Algorithm 3. where M(v) is a δ × δ matrix whose entry [M(v)]ij counts how many times v appears at the ith coordinate of a shortest path in G of discrete length j, and δ = max{δ(G), δ(G′)}. More precisely, [M(v)]ij = number of times v appears as the ith node on a shortest path of discrete length j = P ˜v∈V number of times v appears as ith node on a shortest path from ˜v of discrete length j = P ˜v∈V D˜v(v, j −i + 1)O˜v(v, i). (6) Here D˜v is a n × δ matrix whose (v, i)-coordinate counts the number of directed walks with i nodes starting at v in the shortest path DAG G˜v. The O˜v is a n × δ matrix whose (v, i)-coordinate counts the number of directed walks from ˜v to v in G˜v with i nodes. Given the matrices D˜v and O˜v, we compute all M(v) by looping through all choices of source node ˜v ∈V , adding up the contributions M˜v to M(v) from each ˜v, as detailed in Algorithm 4. The vth row of O˜v, denoted ov ˜v, is computed recursively by message-passing from the root, as detailed in Figure 1 and Algorithm 1. Here, V j ˜v consists of the nodes v ∈V for which the shortest paths π˜vv of highest discrete length have j nodes. Algorithm 1 sends one message of size at most δ per edge, thus has complexity O(mδ). To compute the vth row of D˜v, denoted dv ˜v, we draw inspiration from [19] where the vectors dv ˜v are computed easily for trees using a message-passing algorithm as follows. Let T = (V, E, r) be a tree with a designated root node r. The ith coefficient of dv r counts the number of paths from v in T of discrete length i, directed from the root. This is just the number of descendants of v at level i below v in T. Let ⊕denote left aligned addition of vectors of possibly different length, e.g. [a, b, c] ⊕[d, e] = [(a + d), (b + e), c]. (7) Using ⊕, the dv r can be expressed recursively: dv r = [1] M p(w)=v [0, dw r ]. Algorithm 1 Message-passing algorithm for computing ov ˜v for all v, on G˜v 1: Initialize: o˜v ˜v = [1]; ov ˜v = [0] ∀v ∈V \ {˜v}. 2: for j = 1 . . . δ do 3: for v ∈V j ˜v do 4: for (v, w) ∈E˜v do 5: ow ˜v = ow ˜v ⊕[0, ov ˜v] 6: end for 7: end for 8: end for 4 Algorithm 2 Recursive computation of dv r for all v on T = (V, E, r). 1: Initialize: dv r = [1] ∀v ∈V . 2: for e = (v, c(v)) ∈E do 3: dv r = dv r ⊕[0, dc(v) r ] 4: end for Algorithm 3 Recursive computation of dv ˜v for all v on G˜v 1: Initialize: dv ˜v = [1] ∀v ∈V . 2: for e = (v, c(v)) ∈EG do 3: dv ˜v = dv ˜v ⊕[0, dc(v) ˜v ] 4: end for The dv r for all v ∈V are computed recursively, sending counters along the edges from the leaf nodes towards the root, recording the number of descendants of any node at any level, see Algorithm 2 and Figure 1. The dv r for all v ∈V are computed in O(nh) time, where h is tree height, since each edge passes exactly one message of size ≤h. On a DAG, computing dv ˜v is a little more complex. Note that the DAG G˜v generated by all shortest paths from ˜v ∈V can be expanded into a rooted tree S˜v by duplicating any node with several incoming edges, see Figure 1. The tree S˜v contains, as a path from the root ˜v to one of the nodes labeled v in S˜v, any shortest path from ˜v to v in G. However, the number of nodes in S˜v could, in theory, be exponential in n, making computation of dv ˜v by message-passing on S˜v intractable. Thus, we shall compute the dv ˜v on the DAG G˜v rather than on S˜v. As on trees, the dv ˜v in S˜v are given by dv ˜v = [1] ⊕L (w,v)∈E˜v[0, dw ˜v ], where ⊕is defined in (7). This observation leads to an algorithm in which each edge e ∈E˜v passes exactly one vector of size ≤δ + 1 in the direction of the root ˜v, starting at the leaves of the DAG G˜v and computing updated descendant vectors for each receiving node. See Algorithm 3 and Figure 1. The complexity of Algorithm 3, which computes dv ˜v for all v ∈V , is O(|E˜v|δ) ≤O(mδ). 2.2 Computational complexity analysis Given the w(v, v′) and the kn(v, v′) for all v ∈V and v′ ∈V ′, the kernel can be computed in O(n2) time. If we assume that each node kernel kn(v, v′) can be computed in O(d) time (as is the case with many standard kernels including Gaussian and linear kernels), then all kn(v, v′) can be precomputed in O(n2d) time. Given the matrices M(v) and M(v′) for all v ∈V , v′ ∈V ′, each w(v, v′) requires O(δ2) time, giving O(n2δ2) complexity for computing all weights w(v, v′). Note that Algorithm 4 computes M(v) for all v ∈G simultaneously. Adding the time complexities of the lines in each iteration of the algorithm as given on the right hand side of the individual lines in Algorithm 4, the total complexity of one iteration of Algorithm 4 is O (mn + n log n) + mδ + mδ + nδ2 + nδ2 = O(n(m + log n + δ2)), Algorithm 4 Algorithm simultaneously computing all M(v) 1: Initialize: M(v) = 0 ∈Rδ×δ for each v ∈V . 2: for all ˜v ∈V do 3: compute shortest path DAG G˜v rooted at ˜v using Dijkstra (O(mn + n log n)) 4: compute D˜v(v) for each v ∈V (O(mδ)) 5: compute O˜v(v) for each v ∈V (O(mδ)) 6: for each v ∈V , compute the δ × δ matrix M˜v(v) given by [M˜v(v)]ij =  D˜v(v, j −i + 1)O˜v(v, i) when i ≤j 0 otherwise, (O(nδ2)) 7: update M(v) = M(v) + M˜v(v) for each v ∈V (O(nδ2)) 8: end for 5 giving total complexity O(n2(m+log n+δ2)) for computing M(v) for all v ∈V using Algorithm 4. It follows that the total complexity of computing k(G, G′) is O(n2 + n2d + n2δ2 + n2δ2 + n2(m + log n + δ2)) = O(n2(m + log n + d + δ2)). When computing the kernel matrix Kij = k(Gi, Gj) for a set {Gi}N i=1 of graphs with N > m + n + δ2, note that Algorithm 4 only needs to be run once for every graph Gi. Thus, the average complexity of computing one kernel value out of all Kij becomes 1 N 2 NO(n2(m + log n + δ2)) + N 2O(n2 + n2d + δ2)  ≤O(n2d). 3 Experiments Classification experiments were made with the proposed GraphHopper kernel and several alternatives: The propagation kernel PROP [16], the connected subgraph matching kernel CSM [14] and the shortest path kernel SP [17] all use continuous-valued attributes. In addition, we benchmark against the Weisfeiler-Lehman kernel WL [2], which only uses discrete node attributes. All kernels were implemented in Matlab, except for CSM, where a Java implementation was supplied by N. Kriege. For the WL kernel, the Matlab implementation available from [20] was used. For the GraphHopper and SP kernels, shortest paths were computed using the BGL package [21] implemented in C++. The PROP kernel was implemented in two different versions, both using the total variation hash function, as the Hellinger distance is only directly applicable to positive vector-valued attributes. For PROP-diff, labels were propagated with the diffusion scheme, whereas in PROP-WL labels were first discretised via hashing and then the WL kernel [2] update was used. The bin width of the hash function was set to 10−5 as suggested in [16]. The PROP-diff, PROP-WL and the WL kernel were each run with 10 iterations. In the CSM kernel, the clique size parameter was set to k = 5. Our kernel implementations and datasets (with the exception of AIRWAYS) can be found at http://image.diku.dk/aasa/software.php. Classification experiments were made on four datasets: ENZYMES, PROTEINS, AIRWAYS and SYNTHETIC. ENZYMES and PROTEINS are sets of proteins from the BRENDA database [22] and the dataset of Dobson and Doig [23], respectively. Proteins are represented by graphs as follows. Nodes represent secondary structure elements (SSEs), which are connected whenever they are neighbors either in the amino acid sequence or in 3D space [24]. Each node has a discrete type attribute (helix, sheet or turn) and an attribute vector containing physical and chemical measurements including length of the SSE in ˚Angstrøm ( ˚A), distance between the Cα atom of its first and last residue in ˚A, its hydrophobicity, van der Waals volume, polarity and polarizability. ENZYMES comes with the task of classifying the enzymes to one out of 6 EC top-level classes, whereas PROTEINS comes with the task of classifying into enzymes and non-enzymes. AIRWAYS is a set of airway trees extracted from CT scans of human lungs [25, 26]. Each node represents an airway branch, attributed with its length. Edges represent adjacencies between airway bronchi. AIRWAYS comes with the task of classifying airways into healthy individuals and patients suffering from Chronic Obstructive Pulmonary Disease (COPD). SYNTHETIC is a set of synthetic graphs based on a random graph G with 100 nodes and 196 edges, whose nodes are endowed with normally distributed scalar attributes sampled from N(0, 1). Two classes A and B each with 150 attributed graphs were generated from G by randomly rewiring edges and permuting node attributes. Each graph in A was generated by rewiring 5 edges and permuting 10 node attributes, and each graph in B was generated by rewiring 10 edges and permuting 5 node attributes, after which noise from N(0, 0.452) was added to every node attribute in every graph. Detailed metrics of the datasets are found in Table 1. Both GraphHopper, SP and CSM depend on freely selected node kernels for continuous attributes, giving modeling flexibility. For the ENZYMES, AIRWAYS and SYNTHETIC datasets, a Gaussian node kernel kn(v, v′) = e−λ∥A(v)−A(v′)∥2 was used on the continuous-valued attribute, with λ = 1/d. For the PROTEINS dataset, the node kernel was a product of a Gaussian kernel with λ = 1/d and a Dirac kernel on the continuous- and discrete-valued node attributes, respectively. For the WL kernel, discrete node labels were used when available (in ENZYMES and PROTEINS); otherwise node degree was used as node label. Classification was done using a support vector machine (SVM) [27]. The SVM slack parameter was trained using nested cross validation on 90% of the entire dataset, and the classifier was tested on the 6 ENZYMES PROTEINS AIRWAYS SYNTHETIC Number of nodes 32.6 39.1 221 100 Number of edges 46.7 72.8 220 196 Graph diameter 12.8 11.6 21.1 7 Node attribute dimension 18 1 1 1 Dataset size 600 1113 1966 300 Class size 6 × 100 663/450 980/986 150/150 Table 1: Data statistics: Average node and edge counts and graph diameter, dataset and class sizes. Kernel ENZYMES PROTEINS AIRWAYS SYNTHETIC GraphHopper 69.6 ± 1.3 (12′10′′) 74.1 ± 0.5 (2.8 h) 66.8 ± 0.5 (1 d 7 h) 86.6 ± 1.0 (12′10′′) PROP-diff [16] 37.2 ± 2.2 (13′′) 73.3 ± 0.4 (26′′) 63.5 ± 0.5 (4′12′′) 46.1 ± 1.9 (1′21′′) PROP-WL [16] 48.5 ± 1.3 (1′9′′) 73.1 ± 0.8 (2′40′′) 61.5 ± 0.6 (8′17′′) 44.5 ± 1.2 (1′52′′) SP [17] 71.0 ± 1.3 (3 d) 75.5 ± 0.8 (7.7 d) OUT OF TIME 85.4 ± 2.1 (3.4 d) CSM [14] 69.4 ± 0.8 OUT OF MEMORY OUT OF MEMORY OUT OF TIME WL [2] 48.0 ± 0.9 (18′′) 75.6 ± 0.5 (2′51′′) 62.0 ± 0.6 (7′43′′) 43.3 ± 2.3 (2′8′′) Table 2: Mean classification accuracies with standard deviation for all experiments, significantly best accuracies in bold. OUT OF MEMORY means that 100 GB memory was not enough. OUT OF TIME indicates that the kernel computation did not finish within 30 days. Runtimes are given in parentheses; see Section 3.1 for further runtime studies. Above, x′y′′ means x minutes, y seconds. remaining 10%. This experiment was repeated 10 times. Mean accuracies with standard deviations are reported in Table 2. For each kernel and dataset, runtime is given in parentheses in Table 2. Runtimes for the CSM kernel are not included, as this implementation was in another language. 3.1 Runtime experiments An empirical evaluation of the runtime dependence on the parameters n, m and δ is found in Figure 2. In the top left panel, average kernel evaluation runtime was measured on datasets of 10 random graphs with 10, 20, 30, . . . , 500 nodes each, and a density of 0.4. Density is defined as m n(n−1)/2, i.e. the fraction of edges in the graph compared to the number of edges in the complete graph. In the top right panel, the number of nodes was kept constant n = 100, while datasets of 10 random graphs were generated with 110, 120, . . . , 500 edges each. Development of both average kernel evaluation runtime and graph diameter is shown. In the bottom panels, the relationship between runtime and graph diameter is shown on subsets of 100 and 200 of the real AIRWAYS and PROTEINS datasets, respectively, for each diameter. 3.2 Results and discussion Our experiments on ENZYMES and AIRWAYS clearly demonstrate that there are real-world classification problems where continuous-valued attributes make a big contribution to classification performance. Our experiments on SYNTHETIC demonstrate how the more discrete types of kernels, PROP and WL, are unable to classify the graphs. Already on SYNTHETIC, which is a modest-sized set of modest-sized graphs, CSM and SP are too computationally demanding to be practical, and on AIRWAYS, which is a larger set of larger trees, they cannot finish in 30 days. The CSM kernel [14] has asymptotic runtime O(knk+1), where k is a parameter bounding the size of subgraphs considered by the kernel, and thus in order to study subgraphs of relevant size, its runtime will be at least as high as the shortest path kernel. Moreover, the CSM kernel requires the computation of a product graph which, for graphs with hundreds of nodes, can cause memory problems, which we also find in our experiments. The PROP kernel is fast; however, the reason for the computational efficiency of PROP is that it is not really a kernel for continuous valued features – it is a kernel for discrete features combined with a hashing scheme to discretize continuous-valued features. In our experiments, these hashing schemes do not prove powerful enough to compete in classification accuracy with the kernels that really do use the continuous-valued features. While ENZYMES and AIRWAYS benefit significantly from including continuous attributes, our experiments on PROTEINS demonstrate that there are also classification problems where the most important information is just as well summarized in a discrete feature: here our combination of 7 0 5 10 15 20 25 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 12 14 16 18 20 22 24 26 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0 50 100 150 200 250 300 350 400 450 500 0 0.5 1 1.5 2 2.5 3 3.5 4 100 150 200 250 300 350 400 450 500 0 0.05 0.1 0.15 0.2 0.25 0.3 0 2 4 6 8 10 12 14 Figure 2: Dependence of runtime on n, δ and m on synthetic and real graph datasets. continuous and discrete node features gives equal classification performance as the more efficient WL kernel using only discrete attributes. We proved in Section 3.1 that the GraphHopper kernel has asymptotic runtime O(n2(d+m+log n+ δ2)), and that the average runtime for one kernel evaluation in a Gram matrix is O(n2d) when the number of graphs exceeds m+n+δ2. Our experiments in Section 3.1 empirically demonstrate how runtime depends on the parameters n, m and δ. As m and δ are dependent parameters, the runtime dependence on m and δ is not straightforward. An increase in the number of edges m typically leads to an increased graph diameter δ for small m, but for more densely connected graphs, δ will decrease with increasing m as seen in the top right panel of Figure 2. A consequence of this is that graph diameter rarely becomes very large compared to m. The same plot also shows that the runtime increases slowly with increasing m. Our runtime experiments clearly illustrate that while in the worst case scenario we could have m = n2 or δ = n, this rarely happens in real-world graphs, which are often sparse and with small diameter. Our experiments also illustrate an average runtime quadratic in n on large datasets, as expected based on complexity analysis. 4 Conclusion We have defined the GraphHopper kernel for graphs with any type of node attributes, presented an efficient algorithm for computing it, and demonstrated that it outperforms state-of-the-art graph kernels on real and synthetic data in terms of classification accuracy and/or speed. The kernels are able to take advantage of any kind of node attributes, as they can integrate any user-defined node kernel. Moreover, the kernel is parameter-free except for the node kernels. This kernel opens the door to new application domains such as computer vision or medical imaging, in which kernels that work solely on graphs with discrete attributes were too restrictive so far. Acknowledgements The authors wish to thank Nils Kriege for sharing his code for computing the CSM kernel, Nino Shervashidze and Chlo´e-Agathe Azencott for sharing their preprocessed chemoinformatics data, and Asger Dirksen and Jesper Pedersen for sharing the AIRWAYS dataset. This work is supported by the Danish Research Council for Independent Research | Technology and Production, the Knud Høygaard Foundation, AstraZeneca, The Danish Council for Strategic Research, Netherlands Organisation for Scientic Research, and the DFG project ”Kernels for Large, Labeled Graphs (LaLa)”. The research of Professor Dr. Karsten Borgwardt was supported by the Alfried Krupp Prize for Young University Teachers of the Alfried Krupp von Bohlen und Halbach-Stiftung. 8 References [1] N. Shervashidze, S.V.N. Vishwanathan, T. Petri, K. Mehlhorn, and K.M. Borgwardt. Efficient graphlet kernels for large graph comparison. JMLR, 5:488–495, 2009. [2] N. Shervashidze, P. Schweitzer, E.J. van Leeuwen, K. Mehlhorn, and K.M. Borgwardt. WeisfeilerLehman graph kernels. JMLR, 12:2539–2561, 2011. [3] D. Haussler. Convolution kernels on discrete structures. Technical report, Department of Computer Science, University of California at Santa Cruz, 1999. [4] M. Collins and N. Duffy. Convolution kernels for natural language. In NIPS, pages 625–632, 2001. [5] S.V.N. Vishwanathan and A.J. Smola. Fast kernels for string and tree matching. In NIPS, pages 569–576, 2002. [6] C. Cortes, P. Haffner, and M. Mohri. Rational kernels: Theory and algorithms. JMLR, 5:1035–1062, 2004. [7] D. Kimura and H. Kashima. Fast computation of subpath kernel for trees. In ICML, 2012. [8] P. Mah´e and J.-P. Vert. Graph kernels based on tree patterns for molecules. Machine Learning, 75:3–35, 2009. [9] H. Kashima, K. Tsuda, and A. Inokuchi. Marginalized kernels between labeled graphs. In ICML, pages 321–328, 2003. [10] T. G¨artner, P. Flach, and S. Wrobel. On graph kernels: Hardness results and efficient alternatives. In Learning Theory and Kernel Machines, volume 2777 of LNCS, pages 129–143, 2003. [11] S.V.N. Vishwanathan, N.N. Schraudolph, R.I. Kondor, and K.M. Borgwardt. Graph kernels. JMLR, 11:1201–1242, 2010. [12] F.R. Bach. Graph kernels between point clouds. In ICML, pages 25–32, 2008. [13] P. Mah´e, N. Ueda, T. Akutsu, J.-L. Perret, and J.-P. Vert. Extensions of marginalized graph kernels. In ICML, 2004. [14] N. Kriege and P. Mutzel. Subgraph matching kernels for attributed graphs. In ICML, 2012. [15] B. Ga¨uz`ere, L. Brun, and D. Villemin. Two new graphs kernels in chemoinformatics. Pattern Recognition Letters, 15:2038–2047, 2012. [16] M. Neumann, N. Patricia, R. Garnett, and K. Kersting. Efficient graph kernels by randomization. In ECML/PKDD (1), pages 378–393, 2012. [17] K.M. Borgwardt and H.-P. Kriegel. Shortest-path kernels on graphs. ICDM, 2005. [18] T.H. Cormen, C.E. Leiserson, R.L. Rivest, and C. Stein. Introduction to Algorithms (3. ed.). MIT Press, 2009. [19] A. Feragen, J. Petersen, D. Grimm, A. Dirksen, J.H. Pedersen, K. Borgwardt, and M. de Bruijne. Geometric tree kernels: Classification of COPD from airway tree geometry. In IPMI 2013, 2013. [20] N. Shervashidze. Graph kernels code, http://mlcb.is.tuebingen.mpg.de/Mitarbeiter/ Nino/Graphkernels/. [21] D. Gleich. MatlabBGL http://dgleich.github.io/matlab-bgl/. [22] I. Schomburg, A. Chang, C. Ebeling, M. Gremse, C. Heldt, G. Huhn, and D. Schomburg. Brenda, the enzyme database: updates and major new developments. Nucleic Acids Research, 32:431–433, 2004. [23] P.D. Dobson and A.J. Doig. Distinguishing enzyme structures from non-enzymes without alignments. Journal of Molecular Biology, 330(4):771 – 783, 2003. [24] K.M. Borgwardt, C.S. Ong, S. Sch¨onauer, S.V.N. Vishwanathan, A.J. Smola, and H.-P. Kriegel. Protein function prediction via graph kernels. Bioinformatics, 21(suppl 1):i47–i56, 2005. [25] J. Pedersen, H. Ashraf, A. Dirksen, K. Bach, H. Hansen, P. Toennesen, H. Thorsen, J. Brodersen, B. Skov, M. Døssing, J. Mortensen, K. Richter, P. Clementsen, and N. Seersholm. The Danish randomized lung cancer CT screening trial - overall design and results of the prevalence round. J Thorac Oncol, 4(5):608– 614, May 2009. [26] J. Petersen, M. Nielsen, P. Lo, Z. Saghir, A. Dirksen, and M. de Bruijne. Optimal graph based segmentation using flow lines with application to airway wall segmentation. In IPMI, LNCS, pages 49–60, 2011. [27] C.-C. Chang and C.-J. Lin. LIBSVM: A library for support vector machines. ACM Trans. Int. Syst. and Tech., 2:27:1–27:27, 2011. Software available at http://www.csie.ntu.edu.tw/˜cjlin/ libsvm. 9
2013
237
4,973
Bayesian optimization explains human active search Ali Borji Department of Computer Science USC, Los Angeles, 90089 borji@usc.edu Laurent Itti Departments of Neuroscience and Computer Science USC, Los Angeles, 90089 itti@usc.edu Abstract Many real-world problems have complicated objective functions. To optimize such functions, humans utilize sophisticated sequential decision-making strategies. Many optimization algorithms have also been developed for this same purpose, but how do they compare to humans in terms of both performance and behavior? We try to unravel the general underlying algorithm people may be using while searching for the maximum of an invisible 1D function. Subjects click on a blank screen and are shown the ordinate of the function at each clicked abscissa location. Their task is to find the function’s maximum in as few clicks as possible. Subjects win if they get close enough to the maximum location. Analysis over 23 non-maths undergraduates, optimizing 25 functions from different families, shows that humans outperform 24 well-known optimization algorithms. Bayesian Optimization based on Gaussian Processes, which exploits all the x values tried and all the f(x) values obtained so far to pick the next x, predicts human performance and searched locations better. In 6 follow-up controlled experiments over 76 subjects, covering interpolation, extrapolation, and optimization tasks, we further confirm that Gaussian Processes provide a general and unified theoretical account to explain passive and active function learning and search in humans. 1 Introduction To find the best solution to a complex real-life search problem, e.g., discovering the best drug to treat a disease, one often has few chances for experimenting, as each trial is lengthy and costly. Thus, a decision maker, be it human or machine, should employ an intelligent strategy to minimize the number of trials. This problem has been addressed in several fields under different names, including active learning [1], Bayesian optimization [2, 3], optimal search [4, 5, 6], optimal experimental design [7, 8], hyper-parameter optimization, and others. Optimal decision making algorithms show significant promise in many applications, including human-machine interaction, intelligent tutoring systems, recommendation systems, sensor placement, robotics control, and many more. Here, inspired by the optimization literature, we design and conduct a series of experiments to understand human search and active learning behavior. We compare and contrast humans with standard optimization algorithms, to learn how well humans perform 1D function optimization and to discover which algorithm best approaches or explains human search strategies. This contrast hints toward developing even more sophisticated algorithms and offers important theoretical and practical implications for our understanding of human learning and cognition. We aim to decipher how humans choose the next x to be queried when attempting to locate the maximum of an unknown 1D function. We focus on the following questions: Do humans perform local search (for instance by randomly choosing a location and following the gradient of the function, e.g., gradient descent), or do they try to capture the overall structure of the underlying function (e.g., polynomial, linear, exponential, smoothness), or some combination of both? Do the sets of sample x locations queried by humans resemble those of some algorithms more than others? Do humans follow a Bayesian approach, and if so which selection criterion might they employ? How do humans balance between exploration and exploitation during optimization? Can Gaussian processes [9] offer a unifying theory of human function learning and active search? 1 2 Experiments and Results We seek to study human search behavior directly on 1D function optimization, for the first time systematically and explicitly. We are motivated by two main reasons: 1) Optimization has been intensively studied and today a large variety of optimization algorithms and theoretical analyses exist, 2) 1D search allows us to focus on basic search mechanisms utilized by humans, eliminating real-world confounds such as context, salient distractors, semantic information, etc. A total of 99 undergraduate students with basic calculus knowledge from our university participated in 7 experiments. They were from the following majors: Neurosciences, Biology, Psychology, Kinesiology, Business, English, Economics, and Political Sciences (i.e., not Maths or Engineering). Subjects had normal or corrected-to-normal vision and were compensated by course credits. They were seated behind a 42" computer monitor at a distance of 130 cm (subtending a field of view of 43◦× 25◦). The experimental methods were approved by our university’s Institutional Review Board (IRB). 2.1 Experiment 1: Optimization 1 −300 −200 −100 0 100 200 300 0 10 20 30 40 50 60 70 80 90 1 2 3 4 5 6 7 8 9 Hit , pls click on the continue botton for the next. Block 1 (TRAINING) Tries (penalty)= 9 Total Reward: 11 Selection Panel x-tolerance click here to terminate. Function Value −300 −200 −100 0 100 200 300 0 0.2 0.4 0.6 0.8 1 function no. 1 x y Original function Histogram of clicks Histogram of first clicks Figure 1: Left: a sample search trial. The unknown function (blue curve) was only displayed at the end of training trials. During search for the function’s maximum, a red dot at (x, f(x)) was drawn for each x selected by participants. Right: A sample function and the pdf of human clicks. Participants were 23 students (6 m, 17 f) aged 18 to 22 (19.52 ± 1.27 yr). Stimuli were a variety of 25 1D functions with different characteristics (linear/non-linear, differentiable/nondifferentiable, etc.), including: Polynomial, Exponential, Gaussian, Dirac, Sinc, etc. The goal was to cover many cases and to investigate the generalization power of algorithms and humans. To generate a polynomial stimulus of degree m (m > 2), we randomly generated m + 1 pairs of (x, y) points and fitted a polynomial to them using least squares regression. Coefficients were saved for later use. Other functions were defined with pre-specified formulas and parameters (e.g., Schwefel, Psi). We generated two sets of stimuli, one for training and the other for testing. The x range was fixed to [−300 300] and the y range varied depending on the function. Fig. 1 shows a sample search trial during training, as well as smoothed distribution of clicked locations for first clicks, and progressively for up to 15 clicks. In the majority of cases, the distribution of clicks starts with a strong leftward bias for the first clicks, then progressively focusing around the true function maximum as subjects make more clicks and approach the maximum. Subjects clicked less on smooth regions and more on spiky regions (near local maxima). This indicates that they sometimes followed the local gradient direction of the function. Procedure. Subjects were informed about the goal of the experiment. They were asked to “find the maximum value (highest point) of a function in as few clicks as possible”. During the experiment, each subject went through 30 test trials (in random order). Starting from a blank screen, subjects could click on any abscissa x location, and we would show them the corresponding f(x) ordinate. Previously clicked points remained on the screen until the end of the trial. Subjects were instructed to terminate the trial when they thought they had reached the maximum location within a margin of error (xTolh=6) shown at the bottom of the screen (small blue line in Fig. 1). This design was intentional to both obtain information about the human satisficing process and to make the comparison fair with algorithms (e.g., as opposed to automatically terminating a trial if humans happened to click near the maximum). We designed the following procedure to balance speed vs. accuracy. For each trial, a subject gained A points for “HIT”, lost A points for “MISS”, and lost 1 point for each click. Scores of subjects were kept on the record, to compete against other subjects. The subject with the highest score was rewarded with a prize. We used A = 10 (for 13 subjects) and A = 20 (for 10 subjects); since we did not observe a significant difference across both conditions, here we collapsed all the data. We highlighted to subjects that they should decide carefully where to click next, to minimize the number of clicks before hitting the maximum location. They were not allowed to click outside the function area. Before the experiment, we had a training session in which subjects completed 5 trials on a different set of functions than those used in the real experiment. The purpose was for subjects to understand the task and familiarize themselves to the general complexity and shapes of functions (i.e., developing a prior). We revealed the entire function at the end of each training trial only (not after test trials). The maximum number of clicks was set to 40. To prohibit subjects from using the vertical extent of the screen to guess the maximum location, we randomly elevated or lowered the function plot. We also recorded the time spent on each trial. 2 Human Results. On average, over all 25 functions and 23 subjects, subjects attempted 12.8 ± 0.4 tries to reach the target. Average hit rate (i.e., whether subjects found the maximum) over all trials was 0.74 ± 0.04. Across subjects, standard deviations of the number of tries and hit rates were 3.8 and 0.74. Relatively low values here suggest inter-subject consistency in our task. Hard Easy function call hit rate f12 f2 f8 f16 f20 f20 f17 f17 f7 f24 f15 f22 Figure 2: Difficult and easy stimuli. Each trial lasted about 22 ± 4 seconds. Figure 2 shows example hard and easy stimuli (fn are function numbers, see Supplement). The Dirac function had the most clicks (16.5), lowest hit rate (0.26), and longest time (32.4±18.8 s). Three other most difficult functions, in terms of function calls were, listed as (function number, number of clicks): {(f2,15.8), (f8,15.2), (f12,15.1)}. The easiest ones were: {(f16,9.3), (f20, 9.9), (f17, 10)}. For hit rate, the hardest functions were: {(f24,0.35), (f15,0.45), (f7,0.56)}, and the easiest ones: {(f20,1), (f17,1), (f22,0.95)}. Subjects were faster on Gaussian (f17) and Exponential (f20) functions (16.2 and 16.9 seconds). Table 1: Baseline algorithms. We set maxItr to 500 when the only parameter is xTolm. Algorithm Type Parameters FminSearch [10] Loc. xTolm = 0.005:0.005:0.1 FminBnd L xTolm = 5e-7:1e-6:1e-5 FminUnc L xTolm = 0.01:0.05:1 minFunc-# L xTolm = 0.01:0.05:1 GD L xTolm = 0.001:0.001:0.005 α = 0.1:0.1:0.5; tol = 1e-6 mult-FminSearch Glob. xTolm = 0.005, starts = 1:10 mult-FminBnd G xTolm = 5e-7, starts = 1:10 mult-FminUnc G xTolm = 0.01, starts = 1:10 PSO [11] G pop = 1:10; gen = 1:20 GA [12, 13] G pop and gen = 5:10:100 generation gap = 0.01 SA [14] G stopTemp = 0.01:0.05:1 β = 0.1:0.1:1 DIRECT [15] G maxItr = 5:5:70 Random G maxItr = 5:5:150 GP [2, 3] G maxItr = 5:5:35 Model-based Results. We compared human data to 24 well-established optimization algorithms. These baseline methods employ various search strategies (local, global, gradient-based, etc.) and often have several parameters (Table 1). Here, we emphasize one to two of the most important parameters for each algorithm. The following algorithms are considered: local search (e.g., Nelder-Mead simplex/FminSearch [10]); multistart local search; population-based (e.g., Genetic Algorithms (GA) [12, 13], Particle Swarm Optimization (PSO) [11]); DIvided RECTangles (DIRECT) [15]; and Bayesian Optimization (BO) techniques [2, 3]. BO constructs a probabilistic model for f(·) using all previous observations and then exploits this model to make decisions about where along X to evaluate the function next. This results in a procedure that can find the maximum of difficult non-convex, non-differentiable functions with relatively few evaluations, at the cost of performing more computation to determine the next point to try. BO methods are based on Gaussian processes (GP) [9] and several selection criteria. Here we use a GP with a zero mean prior and a RBF covariance kernel. Two parameters of the kernel function, kernel width and signal variance, are learned from our training functions. We consider 5 types of selection criteria for BO: Maximum Mean (MM) [16], Maximum Variance (MV) [17], Maximum Probability of Improving (MPI) [18, 19], Maximum Expected Improvement (MEI)[20, 21], and Upper Confidence Bounds (UCB) [22]. Further, we consider two BO methods by Osborne et al. [23], with and without gradient information (See supplement). To measure to what degree human search behavior deviates from a random process, we devise a Random search algorithm which chooses the next point uniformly random from [−300 300] without replacement. We also run the Gradient Descent (GD) algorithm and its descendants denoted as minFunc-# in Table 1 where # refers to different methods (conjugate gradient (cg), quasi-Newton (qnewton), etc.). To evaluate which algorithm better explains human 1D search behavior, we propose two measures: 1) an algorithm should have about the same performance, in terms of hit rate and function calls, as humans (1st-level analysis), and 2) it should have similar search statistics as humans, for example in terms of searched locations or search order (2nd-level analysis). For fair human-algorithm comparison, we simulate for algorithms the same conditions as in our behavioral experiment, when counting a trial as a hit or a miss (e.g., using same xTolh). It is worth noting that in our behavioral experiment we did our best not to provide information to humans that we cannot provide to algorithms. In the 1st-level analysis, we tuned algorithms for their best accuracy by performing a grid search over their parameters to sample the hit-rate vs. function-calls plane. Table 1 shows two stopping conditions that are considered: 1) we either run an algorithm until a tolerance on x is met (i.e., |xi−1 −xi| < xTolm), or 2) we allow it to run up to a variable (maximum) number of function calls (maxItr). For each parameter setting (e.g., a specified population size and generations in GA), since each run of an algorithm may result in a different answer, we run it 200 times to reach a reliable estimate of its performance. To generate a starting point for algorithms, we randomly sampled from 3 the distribution of human first clicks (over all subjects and functions, p(x1); see Fig. 1). As in the behavioral experiment, after termination of an algorithm, a hit is declared when: ∃xi ∈B : |xi −argmaxxf(x)| ≤xTolh, where set B includes the history of searched locations in a search trial. Fig. 3 shows search accuracy of optimization algorithms. As shown, humans are better than all algorithms tested, if hit rate and function calls are weighed equally (i.e., best is to approach the bottom-right corner of Fig. 3). That is, undergraduates from non-maths majors managed to beat the state of the art in numerical optimization. BO algorithms with GP-UCB and GP-MEI criteria are closer to human performance (so are GP-Osborne methods). The DIRECT method did very well and found the maximum with ≥30 function calls. It can achieve better-than-human hit rate, with a number of function calls which is smaller than BO algorithms, though still higher than humans (it was not able to reach human performance with equal number of function calls). As expected, some algorithms reach human accuracy but with much higher number of function calls (e.g., GA, mult-start-#), sometimes by up to 3 orders of magnitude. We chose the following promising algorithms for the 2nd-level analysis: DIRECT, GP-Osborne-G, GP-Osborne, GP-MPI, GP-MUI, GP-MEI, GP-UCB, GP-UCB-Opt, GP-MV, PSO, and Random. GP-UCB-Opt is basically the same as GP-UCB with its exploration/exploitation parameter (κ in µx + κσx; GP mean + GP std) learned from train data for each function. These algorithms were chosen because their performance curve in the first analysis intersected a window where accuracy is half of humans and function call is twice as humans (black rectangle in Fig. 3). We first find those parameters that led these algorithms to their closest performance to humans. We then run them again and this time save their searched locations for further analysis. FminSearch FminBnd Fminunc PSO GA GD SA multFminS multFminB multFminU Random GP−Osborne GP−Osborne−G Direct minFunc−cg minFunc−csd minFunc−sd minFunc−qnewton minFunc−lbfgs GP−MUI GP−MM GP−MPI GP−UCB-Opt GP−UCB GP−MEI GP−MV Human 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 1 102 hit rate function calls Figure 3: Human vs. algorithm 1D search accuracy. We design 4 evaluation scores to quantify similarities between algorithms and humans on each function: 1) mean sequence distance between an algorithm’s searched locations and human searched locations, in each trial for the first 5 clicks, 2) mean shortest distance between an algorithm’s searched locations and all human clicks (i.e., point matching), 3) agreement between probability distributions of searched locations by all humans and an algorithm, and 4) agreement between pdfs of normalized step sizes (to [0 1] on each trial). Let pm(t) and ph(t) be pdfs of the search statistic t by an algorithm and humans, respectively. The agreement between pm and ph is defined as pm(argmaxt ph(t)) (i.e., the value of an algorithm’s pdf at the location of maximum for human pdf). Median scores (over all 25 functions) are depicted in Fig. 4. Distance score is lower for Bayesian models compared to DIRECT, Random, PSO, and GP-Osborne algorithms (Fig. 4.a). Point matching distances are lower for GP-MPI, and GP-UCB (Fig. 4.b). These two algorithms also show higher agreement to humans in terms of searched locations (Fig. 4.c). The clearest pattern happens over step size agreement with BO methods (except GP-MV) being closest to humans (Fig. 4.d). GP-MPI and GP-UCB show higher resemblance to human search behavior over all scores. Further, we measure the regret of algorithms and humans defined as fmax(·) −f ∗ where f ∗is the best value found so far for up to 15 function calls averaged over all trials. As shown in Fig. 4.e, BO models approach the maximum of f(·) as fast as humans. Hence, although imperfect, BO algorithms overall are the most similar to humans, out of all algorithms tested. Three reasons prompt us to consider BO methods as promising candidates for modeling human basic search: 1) BO methods perform efficient search in a way that resembles human behavior in terms of accuracy and search statistics (results of Exp. 1), 2) BO methods exploit GP which offers a principled and elegant approach for adding structure to Bayesian models (in contrast to purely data-driven Bayesian). Furthermore, the sequential nature of the BO and updating the GP posterior after each function call seems a natural strategy humans might be employing, and 3) GP models explain function learning in humans over simple functional relationships (linear and quadratic) [24]. Function learning and search mechanisms are linked in the sense that, to conduct efficient search, one needs to know the search landscape and to progressively update one’s knowledge about it. 4 e function call regret (fmax - f*) 2 4 6 8 10 12 14 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 PSO FminSearch FminBnd Random GP−Osborne GP−Osbo.−G DIRECT GP-UCB GP-MEI GP-MPI GP-MUI GP-MV GP-UCB-Opt PSO FminSearch FminBnd Random GP−Osborne GP−Osbo.−G DIRECT GP-UCB GP-MEI GP-MPI GP-MUI GP-MV GP-UCB-Opt PSO FminSearch FminBnd Random GP−Osborne GP−Osbo.−G DIRECT GP-UCB GP-MEI GP-MPI GP-MUI GP-MV GP-UCB-Opt 1 PSO FminSearch FminBnd Random GP−Osborne GP−Osbo.−G DIRECT GP-UCB GP-MEI GP-MPI GP-MUI GP-MV GP-UCB-Opt agreement on search step sizes 0 0.2 0.4 0.6 0.8 1 agreement on searched locations 0 0.1 0.2 0.3 0.4 0.5 0.6 sequence distance 100 150 200 250 point matching distance 0 1 2 3 4 c b d a PSO Random GP−Osborne GP−Osb.−G DIRECT GP-UCB GP-MEI GP-MPI GP-MUI GP-MV GP-UCB-Opt Human Figure 4: Results of our second-level analysis. The lower the distance and the higher the agreement, the better (red arrows). Boxes represent median (red line) and 25 th, 75 th percentiles. Panel (e) shows average regret of algorithms and humans (f ∗is normalized to fmax for each trial separately). We thus designed 6 additional controlled experiments to further explore GP as a unified computational principle guiding human function learning and active search. In particular, we investigate the basic idea that humans might be following a GP, at least in the continuous domain, and change some of its properties to cope with different tasks. For example, humans may use GP to choose the next point to dynamically balance exploration vs. exploitation (e.g., in search task), or to estimate the function value of a point (e.g., in function interpolation). In experiments 2 to 5, subjects performed interpolation and extrapolation tasks, as well as active versions of these tasks by choosing points to help them learn about the functions. In experiments 6 and 7, we then return to the optimization task, for a detailed model-based analysis of human search behavior over functions from the same family. Note that many real-world problems can be translated into our synthetic tasks here. We used polynomial functions of degree 2, 3, and 5 as our stimuli (denoted as Deg2, Deg3, and Deg5, respectively). Two different sets of functions were generated for training and testing, shown in Fig. 5. For each function type, subjects completed 10 training trials followed by 30 testing trials. As in Exp. 1, function plots were disclosed to subjects only during training. To keep subjects engaged, in addition to the competition for a prize, we showed them the magnitude of error during both training and testing sessions. In experiments 2 to 6, we fitted a GP to different types of functions using the same set of (x, y) points shown to subjects during training (Fig. 6). A grid search was conducted to learn GP parameters from the training functions to predict subjects’ test data. 2.2 Experiments 2 & 3: Interpolation and Active Interpolation Participants. Twenty subjects (7m, 13f) aged 18 to 22 participated (mean: 19.75 ± 1.06 yr). Procedure. In the interpolation task, on each function, subjects were shown 4 points x ∈ {−300, a, b, 300} along with their f(x) values. Points a and b were generated randomly once in advance and were then tied to each function. Subjects were asked to guess the function value at the center (x = 0) as accurately as possible. In the active interpolation task, the same 4 points as in interpolation were shown to subjects. Subjects were first asked to choose a 5th point between [−300 300] to see its y = f(x) value. They were then asked to guess the function value at a randomly-chosen 6th x location as accurately as possible. Subjects were instructed to pick the most informative fifth point regarding estimating the function value at the follow-up random x (See Fig. 6). Results. Fig. 7.a shows mean distance of human clicks from the GP mean at x = 0 over test trials (averaged over absolute pairwise distances between clicks and the GP) in the interpolation task. Human errors rise as functions become more complicated. Distances of the GP and the actual function from humans are the same over Deg2 and Deg3 functions (no significant difference in medians, Wilcoxon signed-rank test, p > 0.05). Interestingly, on Deg5 functions, GP is closer to human clicks than the actual function (signed-rank test, p = 0.053) implying that GP captures clicks well in this case. GP did fit the human data even better than the actual function, thereby lending support to our hypothesis that GP may be a reasonable approximation to human function estimation. Could it be that subjects locally fit a line to the two middle points to guess f(0)? To evaluate this hypothesis, we measured the distance, at x = 0, from human clicks to a line passing through (a, f(a)) and (b, f(b)). By construction of our stimuli, a line model explains human data well on Deg3 and Deg5, but fails dramatically on Deg2 which deflect around the center. GP is significantly better than the line model on Deg2 (p < 0.0005), while being as good on Deg3 and Deg5 (p = 0.78). Deg3-Test Deg3-Train Deg5-Test Deg5-Train Deg2-Test −300 −200 −100 0 100 200 300 0 20 40 60 80 100 x y −300 −200 −100 0 100 200 300 0 20 40 60 80 100 x −300 −200 −100 0 100 200 300 0 20 40 60 80 100 x −300 −200 −100 0 100 200 300 0 20 40 60 80 100 x −300 −200 −100 0 100 200 300 0 20 40 60 80 100 x −300 −200 −100 0 100 200 300 0 20 40 60 80 100 x Deg2-Train Figure 5: Train and test polynomial stimuli used in experiments 2 through 6. 5 Active Interpolation Optimization 2 Optimization 3 Extrapolation Active Extrapolation −300 −200 −100 0 100 200 300 0 50 100 150 200 polynomial deg 3 line deg 2 mean human mean GP Interpolation x y −300 −200 −100 0 100 200 300 0 20 40 60 80 100 human rand max variance shufed rand −300 −200 −100 0 100 200 300 −50 0 50 100 human clicks GP mean GP std human clicks (mean + std) Actual func −300 −200 −100 0 100 200 300 0 50 100 GP-MV GP-UCB GP-MPI GP-MEI −300 −200 −100 0 100 200 300 0 20 40 60 80 100 mean human click 2 mean human click 1 histogram of clicks −300 −200 −100 0 100 200 300 0 20 40 60 80 100 Figure 6: Illustration of experiments. In extrapolation, polynomials (degrees 1, 2 & 3) fail to explain our data. Another possibility could be that humans choose a point randomly on the y axis, thus discarding the shape of the function. To control for this, we devised two random selection strategies. The first one uniformly chooses y values between 0 and 100. The second one, known as shuffled random (SRand), takes samples from the distribution of y values selected by other subjects over all functions. The purpose is to account for possible systematic biases in human selections. We then calculate the average of the pairwise distances between human clicks and 200 draws from each random model. Both random models fail to predict human answers on all types of functions (significantly worse than GP, signed-rank test ps < 0.05). One advantage of the GP over other models is providing a level of uncertainty at every x. Fig. 7.a (inset) demonstrates similar uncertainty patterns for humans and the GP, showing that both uncertainties (at x = 0) rise as functions become more complicated. Interpolation results suggest that humans try to capture the shape of functions. If this is correct, we expect that humans will tend to click on high uncertainty regions (according to GP std) in the active interpolation task (see Fig. 6 for an example). Fig. 7.b shows the average of GP standard deviation at locations of human selections. Humans did not always choose x locations with the highest uncertainty (shown in red in Fig. 7.b). One reason for this might be that several regions had about the same std. Another possibility is because subjects had slight preference to click toward center. However, GP std at human-selected locations was significantly higher than the GP std at random and SRand points, over all types of functions (signed-rank test, ps < 1e–4; non-significant on Deg2 vs. SRand p = 0.18). This result suggests that since humans did not know in advance where a follow-up query might happen, they chose high-uncertainty locations according to GP, as clicking at those locations would most shrink the overall uncertainty about the function. 2.3 Experiments 4 & 5: Extrapolation and Active Extrapolation Participants. 16 new subjects (7m, 9f) completed experiments 4 and 5 (Age: 19.62 ± 1.45 yr). Procedure. Three points x ∈{−300, c, 100} and their y values were shown to subjects. Point c was random, specific to each function. In the extrapolation task, subjects were asked to guess the function value at x = 200 as accurately as possible (Fig. 6). In the active extrapolation task, subjects were asked to choose the most informative 4th point in [−300 100] regarding estimating f(200). Results. A similar analysis as in the interpolation task is conducted. As seen in Fig. 7.c, in alignment with interpolation results, humans are good at Deg2 and Deg3 but fail on Deg5, and so does the GP model. Here again, with Deg5, GP and humans are closer to each other than to the actual function, further suggesting that their behaviors and errors are similar. There is no significant difference between GP and the actual functions over all three function types (signed-rank test; p > 0.25). Interestingly, a line model fitted to points c and 100 is impaired significantly (p < 1e–5 vs. GP) over all function types (Fig. 6). Both random strategies also performed significantly worse than GP on this task (signed-rank test; ps < 1e–6). SRand performs better than uniform random, indicating mean standard deviation of chosen locations mean standard deviation of chosen locations mean distance of human selections from a model mean distance of human selections from a model Deg2 Deg3 Deg5 0 4 8 12 16 human random shuffled Random max std min std Deg2 Deg3 Deg5 0 2 4 6 8 10 12 14 16 b) Active Interpolation a) Interpolation d) Active Extrapolation human random shuffled Random max std min std Deg2 Deg3 Deg5 5 15 25 35 45 6 18 STD Human GP actual func line GP randY shuffledRandY Deg2 Deg3 Deg5 10 20 30 40 actual func line GP randY shuffledRandY STD 10 19 Human GP c) Extrapolation Figure 7: a) Mean distance of human clicks from models. Errors bars show standard error of the mean (s.e.m) over test trials. Inset shows the standard deviation of humans and the GP model at x = 0. b) mean GP std at human vs. random clicks in active interpolation. c and d correspond to a and b, for the extrapolation task. 6 human1 human2 human1 human2 random shuffled Random random shuffled Random Deg2 Deg3 Deg5 Deg2 Deg3 Deg5 Deg2 Deg3 Deg5 Deg2 Deg3 Deg5 Deg2 Deg3 Deg5 c) left: mean selected function values right: mean selected GP values a) distance of human clicks from location of max Q b) distance of random clicks from location of max Q d) mean selected GP std values 20 60 100 140 180 60 70 80 90 100 100 0.2 0.3 0.4 0.5 0.6 0.7 0.8 20 60 100 140 180 rand − mean rand − std SRand−mean SRand−std human1 − mean human1 − std human2 − mean human2 − std Figure 8: Results of the optimization task 2. a and b) distance of human and random clicks from locations of max Q (i.e., GP mean and max GP std). c) actual function and GP mean values at human and random clicks. d) normalized GP standard deviation at human vs. random clicks. Errors bars show s.e.m over test trials. existence of systematic biases in human clicks. Subjects learned that f(200) did not happen on extreme lows or highs (same argument is true for f(0) in interpolation). As in the interpolation task, GP and human standard deviations rise as functions become more complex (Fig. 7.c; inset). Active extrapolation (Fig. 7.d), similar to active interpolation, shows that humans tended to choose locations with significantly higher uncertainty than uniform and SRand points, for all function types (ps < 0.005). Some subjects in this task tended to click toward the right (close to 100), maybe to obtain a better idea of the curvature between 100 and 200. This is perhaps why the ratio of human std to max std is lower in active extrapolation compared to active interpolation (0.75 vs. 0.82), suggesting that maybe humans used an even more sophisticated strategy on this task. 2.4 Experiment 6: Optimization 2 Participants were another 21 subjects (4m, 17f) in the age range of 18 to 22 (mean: 20 ± 1.18). Procedure. Subjects were shown function values at x ∈{−300, −200, 200, 300} and were asked to find the x location where they think the function’s maximum is. They were allowed to make two equally important clicks and were shown the function value after each one. For quadratic functions, we only used 13 concave-down functions that have one unique maximum. Results. We perform two analyses shown in Fig. 8. In the first one, we measure the mean distance of human clicks (1st and 2nd clicks) from the location of the maximum GP mean and maximum GP standard deviation (Fig. 8.a). We updated the GP after the first click. We hypothesized that the human first click would be at a location of high GP variance (to reduce uncertainty about the function), while the second click would be close to the location of highest GP mean (estimated function maximum). However, results showed that human 1st clicks were close to the max GP mean and not very close to the max GP std. Human 2nd clicks were even closer (signedrank test, p < 0.001) to the max GP mean and further away from the max GP std (p < 0.001). These two observations together suggest that humans might have been following a Gaussian process with a selection criterion heavily biased towards finding the maximum, as opposed to shrinking the most uncertain region. Repeating this analysis for random clicks (uniform and SRand) shows quite the opposite trend (Fig. 8.b). Random locations are further apart from maximum of the GP mean (compared to human clicks) while being closer to the maximum of the GP std point (compared to human clicks). This cross pattern between human and random clicks (wrt. GP mean and GP std) shows a systematic search strategy utilized by humans. Distances of human clicks from the max GP mean and max GP std rise as functions become more complicated. In the second analysis (Fig. 8.c), we measure actual function and GP values at human and random clicks. Humans had significantly higher function values at their 2nd clicks; p < 1e–4 (so was true using GP; p < 0.05). Values at random points are significantly lower than human clicks. Humans were less accurate as functions became more complex, as indicated by lower function values. Finally, Fig. 8.d shows that humans chose points with significantly less std (normalized to the entire function) in their 2nd clicks compared to random and first clicks. Human 1st clicks have higher std than uniform random clicks. 2.5 Experiment 7: Optimization 3 Participants were 19 new subjects (6m, 13f) in the age range of 19 to 25 (mean: 20.26 ± 1.64 yr). Stimuli. Functions were sampled from a Gaussian process with predetermined parameters to assure functions come from the same family and resemble each other (as opposed to Exp. 1; See Fig. 6). Procedure was the same as in Exp. 1. Number of train and test trials, in order, were 10 and 20. 7 number of clicks number of clicks regret mean distance from max GP mean and std 1 3 5 7 9 11 13 15 0 50 100 150 200 250 human− max GP mean human− max GP std normalized GP mean normalized GP std human random shuffled random GP 0 5 10 15 10 −2 10 −1 10 0 0 5 10 15 0 0. 2 0. 4 0. 6 0. 8 1 a) b) Figure 9: Exploration vs. exploitation balance in Optimization 3 task. Results. Subjects had average accuracy of 0.76 ± 0.11 (0.5 ± 0.18 on train) over all subjects and functions, and average clicks of 8.86 ± 1.12 (7.15 ± 1.2 on train) before ending a search trial. To investigate the sequential strategy of subjects, we progressively updated a GP using a subject’s clicks on each trial, and exploited this GP to evaluate the next click of the same subject. In other words, we attempted to know to what degree a subject follows a GP. Results are shown in Fig. 9. The regret of the GP model and humans decline with more clicks, implying that humans chose informative clicks regarding optimization (figure inset). Humans converge to the maximum location slightly faster than a GP fitted to their data, and much faster than random. Fig. 9.a shows that subjects get closer to the location of maximum GP mean and further away from max GP std (for 15 clicks). Fig. 9.b shows the normalized mean and standard deviation of human clicks (from the GP model), averaged over all trials. At about 6.4 clicks, subjects are at 58% of the function maximum while they have reduced the variance by 42%. Interestingly, we observe that humans tended to click on higher uncertainty regions (according to GP) in their first 6 clicks (average over all subjects and functions), then gradually relying more on the GP mean (i.e., balancing exploration vs. exploitation). Results of optimization tasks suggest that human clicks during search for a maximum of a 1D function can be predicted by a Gaussian process model. 3 Discussion and Conclusion Our contributions are twofold: First, we found a striking capability of humans in 1D function optimization. In spite of the relative naivety of our subjects (not maths or engineering majors), the high human efficiency in our search task does open the challenge that even more efficient optimization algorithms must be possible. Additional pilot investigations not shown here suggest that humans may perform even better in optimization when provided with first and second derivatives. Following this road may lead to designing efficient selection criteria for BO methods (for example new ways to augment gradient information with BO). However, it remains to be addressed how our findings scale up to higher dimensions and benchmark optimization problems. Second, we showed that Gaussian processes provide a reasonable (though not perfect) unifying theoretical account of human function learning, active learning, and search (GP plus a selection strategy). Results of experiments 2 to 5 lead to an interesting conclusion: In interpolation and extrapolation tasks, subjects try to minimize the error between their estimation and the actual function, while in active tasks they change their objective function to explore uncertain regions. In the optimization task, subjects progressively sample the function, update their belief and use this belief again to find the location of maximum. (i.e., exploring new parts of the search space and exploiting parts that look promising). Our findings support previous work by Griffiths et al. [24] (also [25, 26, 27]). Yet, while they showed that Gaussian processes can predict human errors and difficulty in function learning, here we focused on explaining human active behavior with GP, thus extending explanatory power of GP one step ahead. One study showed promising evidence that our results may extend to a larger class of natural tasks. Najemnik and Geisler [6, 28, 29] proposed a Bayesian ideal-observer model to explain human eye movement strategies during visual search for a small Gabor patch hidden in noise. Their model computes posterior probabilities and integrates information across fixations optimally. This process can be formulated with BO with an exploitative search mechanism (i.e., GP-MM). Castro et al. [30] studied human active learning on the well-understood problem of finding the threshold in a binary search problem. They showed that humans perform better when they can actively select samples, and their performance is nearly optimal (below the theoretical upper bound). However, they did not address how humans choose the next best sample. One aspect of our study which we did not elaborate much here, is the satisficing mechanisms humans used in our task to decide when to end a trial. Further modeling of our data may be helpful to develop new stopping criteria for active learning methods. Related efforts have studied strategies that humans may use to quickly find an object (i.e., search, active vision) [31, 32, 33, 34, 35], optimal foraging [36], and optimal search theories [4, 5], which we believe could all now be revisited with GP as an underlying mechanism. Supported by NSF (CCF-1317433, CMMI-1235539) and ARO (W911NF-11-1-0046, W911NF-12-1-0433). 8 References [1] B. Settles, “Active learning.,” in Morgan & Claypool, 2012. 1 [2] D. Jones, “A taxonomy of global optimization methods based on response surfaces.,” Journal of Global Optimization, vol. 21, pp. 345–383, 2001. 1, 3 [3] E. Brochu, M. Cora, and N. de Freitas, “A tutorial on bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning,” Tech R., 2009. 1, 3 [4] L. D. Stone, “The theory of optimal search,” 1975. 1, 8 [5] B. O. Koopman, “The theory of search. i. kinematic bases.,” Operations Research, vol. 4, 1956. 1, 8 [6] J. Najemnik and W. S. Geisler, “Optimal eye movement strategies in visual search.,” Nature, 2005. 1, 8 [7] W. B. Powell and I. O. Ryzhov in Optimal Learning. (J. Wiley and Sons., eds.), 2012. 1 [8] V. V. Fedorov, Theory of Optimal Experiments. Academic Press, 1972. 1 [9] C. E. Rasmussen and C. K. I. Williams, “Gaussian processes for machine learning.,” in MIT., 2006. 1, 3 [10] J. A. Nelder and R. Mead, “A simplex method for function minimization,” Computer Journa, 1965. 3 [11] J. Kennedy and R. Eberhart, “Particle swarm optimization.,” in proc. IEEE ICNN., 1995. 3 [12] J. H. Holland, “Adoption in natural and artificial systems.,” 1975. 3 [13] D. E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning. 1989. 3 [14] S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, “Optimization by simulated annealing.,” Science., 1983. 3 [15] D. Finkel, DIRECT Optimization Algorithm User Guide. 2003. 3 [16] A. Moore, J. Schneider, J. Boyan, and M. S. Lee, “Q2: Memory-based active learning for optimizing noisy continuous functions.,” in ICML, pp. 386–394, 1998. 3 [17] D. Lewis and W. Gale, “A sequential algorithm for training text classifiers.,” in In Proc. ACM SIGIR Conference on Research and Development in Information Retreival, 1994. 3 [18] H. J. Kushner, “A new method of locating the maximum of an arbitrary multipeak curve in the presence of noise.,” J. Basic Engineering, vol. 86, pp. 97–106, 1964. 3 [19] J. Elder, “Global rd optimization when probes are expensive: the grope algorithm,” in IEEE International Conference on Systems, Man and Cybernetics, 1992. 3 [20] J. Mockus, V. Tiesis, and A. Zilinskas, “The application of bayesian methods for seeking the extremum.,” in Towards Global Optimization. (L. Dixon and E. Szego, eds.), 1978. 3 [21] M. Locatelli, “Bayesian algorithms for one-dimensional global optimization.,” Journal of Global Optimization., vol. 10, pp. 57–76, 1997. 3 [22] D. D. Cox and S. John, “A statistical method for global optimization,” in In Proc. IEEE Conference on Systems, Man and Cybernetics, 1992. 3 [23] M. Osborne, R. Garnett, and S. Roberts, “Gaussian processes for global optimization,” in LION3, 2009. 3 [24] T. L. Griffiths, C. Lucas, J. J. Williams, and M. L. Kalish, “Modeling human function learning with gaussian processes.,” in NIPS, 2009. 4, 8 [25] B. R. Gibson, X. Zhu, T. T. Rogers, C. Kalish, and J. Harrison, “Humans learn using manifolds, reluctantly,” in NIPS, 2010. 8 [26] J. D. Carroll, “Functional learning: The learning of continuous functional mappings relating stimulus and response continua.,” in Education Testing Service, Princeton, NJ, 1963. 8 [27] K. Koh and D. E. Meyer, “Function learning: Induction of continuous stimulus-response relations,” Journal of Experimental Psychology: Learning, Memory, and Cognition, vol. 17, pp. 811–836, 1991. 8 [28] J. Najemnik and G. Geisler, “Eye movement statistics in humans are consistent with an optimal search strategy,” Journal of Vision, vol. 8, no. 3, pp. 1–14, 2008. 8 [29] W. S. Geisler and R. L. Diehl, “A bayesian approach to the evolution of perceptual and cognitive systems.,” Cogn. Sci., vol. 27, pp. 379–402, 2003. 8 [30] R. Castro, C. Kalish, R. Nowak, R. Qian, T. Rogers, and X. Zhu, “Human active learning,” NIPS, 2008. 8 [31] P. V. J. Palmer and M. Pavel, “The psychophysics of visual search.,” Vision Research., vol. 40, 2000. 8 [32] J. M. Wolfe in Attention. (H. E. S. in Attention (ed. Pashler, H.) 13-74 (Psychology Press, ed.), 1998. 8 [33] K. Nakayama and P. Martini, “Situating visual search,” Vision Research, vol. 51, pp. 1526–1537, 2011. 8 [34] M. P. Eckstein, “Visual search: A retrospective.,” Journal of Vision, vol. 11, no. 5, 2011. 8 [35] A. Borji and L. Itti, “State-of-the-art in modeling visual attention.,” IEEE PAMI, 2012. 8 [36] A. C. Kamil, J. R. Krebs, and H. R. Pulliam, Foraging Behavior. (ed) 1987 (New York: Plenum). 8 9
2013
238
4,974
B-tests: Low Variance Kernel Two-Sample Tests Wojciech Zaremba Center for Visual Computing ´Ecole Centrale Paris Chˆatenay-Malabry, France Arthur Gretton Gatsby Unit University College London United Kingdom Matthew Blaschko ´Equipe GALEN Inria Saclay Chˆatenay-Malabry, France {woj.zaremba,arthur.gretton}@gmail.com, matthew.blaschko@inria.fr Abstract A family of maximum mean discrepancy (MMD) kernel two-sample tests is introduced. Members of the test family are called Block-tests or B-tests, since the test statistic is an average over MMDs computed on subsets of the samples. The choice of block size allows control over the tradeoff between test power and computation time. In this respect, the B-test family combines favorable properties of previously proposed MMD two-sample tests: B-tests are more powerful than a linear time test where blocks are just pairs of samples, yet they are more computationally efficient than a quadratic time test where a single large block incorporating all the samples is used to compute a U-statistic. A further important advantage of the B-tests is their asymptotically Normal null distribution: this is by contrast with the U-statistic, which is degenerate under the null hypothesis, and for which estimates of the null distribution are computationally demanding. Recent results on kernel selection for hypothesis testing transfer seamlessly to the B-tests, yielding a means to optimize test power via kernel choice. 1 Introduction Given two samples {xi}n i=1 where xi ∼P i.i.d., and {yi}n i=1, where yi ∼Q i.i.d, the two sample problem consists in testing whether to accept or reject the null hypothesis H0 that P = Q, vs the alternative hypothesis HA that P and Q are different. This problem has recently been addressed using measures of similarity computed in a reproducing kernel Hilbert space (RKHS), which apply in very general settings where P and Q might be distributions over high dimensional data or structured objects. Kernel test statistics include the maximum mean discrepancy [10, 6] (of which the energy distance is an example [18, 2, 22]), which is the distance between expected features of P and Q in the RKHS; the kernel Fisher discriminant [12], which is the distance between expected feature maps normalized by the feature space covariance; and density ratio estimates [24]. When used in testing, it is necessary to determine whether the empirical estimate of the relevant similarity measure is sufficiently large as to give the hypothesis P = Q low probability; i.e., below a user-defined threshold α, denoted the test level. The test power denotes the probability of correctly rejecting the null hypothesis, given that P ̸= Q. The minimum variance unbiased estimator MMDu of the maximum mean discrepancy, on the basis of n samples observed from each of P and Q, is a U-statistic, costing O(n2) to compute. Unfortunately, this statistic is degenerate under the null hypothesis H0 that P = Q, and its asymptotic distribution takes the form of an infinite weighted sum of independent χ2 variables (it is asymptotically Gaussian under the alternative hypothesis HA that P ̸= Q). Two methods for empirically estimating the null distribution in a consistent way have been proposed: the bootstrap [10], and a method requiring an eigendecomposition of the kernel matrices computed on the merged samples from P and Q [7]. Unfortunately, both procedures are computationally demanding: the former costs O(n2), with a large constant (the MMD must be computed repeatedly over random assignments of the pooled data); the latter costs O(n3), but with a smaller constant, hence can in practice be 1 faster than the bootstrap. Another approach is to approximate the null distribution by a member of a simpler parametric family (for instance, a Pearson curve approximation), however this has no consistency guarantees. More recently, an O(n) unbiased estimate MMDl of the maximum mean discrepancy has been proposed [10, Section 6], which is simply a running average over independent pairs of samples from P and Q. While this has much greater variance than the U-statistic, it also has a simpler null distribution: being an average over i.i.d. terms, the central limit theorem gives an asymptotically Normal distribution, under both H0 and HA. It is shown in [9] that this simple asymptotic distribution makes it easy to optimize the Hodges and Lehmann asymptotic relative efficiency [19] over the family of kernels that define the statistic: in other words, to choose the kernel which gives the lowest Type II error (probability of wrongly accepting H0) for a given Type I error (probability of wrongly rejecting H0). Kernel selection for the U-statistic is a much harder question due to the complex form of the null distribution, and remains an open problem. It appears that MMDu and MMDl fall at two extremes of a spectrum: the former has the lowest variance of any n-sample estimator, and should be used in limited data regimes; the latter is the estimator requiring the least computation while still looking at each of the samples, and usually achieves better Type II error than MMDu at a given computational cost, albeit by looking at much more data (the “limited time, unlimited data” scenario). A major reason MMDl is faster is that its null distribution is straightforward to compute, since it is Gaussian and its variance can be calculated at the same cost as the test statistic. A reasonable next step would be to find a compromise between these two extremes: to construct a statistic with a lower variance than MMDl, while retaining an asymptotically Gaussian null distribution (hence remaining faster than tests based on MMDu). We study a family of such test statistics, where we split the data into blocks of size B, compute the quadratic-time MMDu on each block, and then average the resulting statistics. We call the resulting tests B-tests. As long as we choose the size B of blocks such that n/B →∞, we are still guaranteed asymptotic Normality by the central limit theorem, and the null distribution can be computed at the same cost as the test statistic. For a given sample size n, however, the power of the test can increase dramatically over the MMDl test, even for moderate block sizes B, making much better use of the available data with only a small increase in computation. The block averaging scheme was originally proposed in [13], as an instance of a two-stage Ustatistic, to be applied when the degree of degeneracy of the U-statistic is indeterminate. Differences with respect to our method are that Ho and Shieh compute the block statistics by sampling with replacement [13, (b) p. 863], and propose to obtain the variance of the test statistic via Monte Carlo, jackknife, or bootstrap techniques, whereas we use closed form expressions. Ho and Shieh further suggest an alternative two-stage U-statistic in the event that the degree of degeneracy is known; we return to this point in the discussion. While we confine ourselves to the MMD in this paper, we emphasize that the block approach applies to a much broader variety of test situations where the null distribution cannot easily be computed, including the energy distance and distance covariance [18, 2, 22] and Fisher statistic [12] in the case of two-sample testing, and the HilbertSchmidt Independence Criterion [8] and distance covariance [23] for independence testing. Finally, the kernel learning approach of [9] applies straightforwardly, allowing us to maximize test power over a given kernel family. Code is available at http://github.com/wojzaremba/btest. 2 Theory In this section we describe the mathematical foundations of the B-test. We begin with a brief review of kernel methods, and of the maximum mean discrepancy. We then present our block-based average MMD statistic, and derive its distribution under the H0 (P = Q) and HA (P ̸= Q) hypotheses. The central idea employed in the construction of the B-test is to generate a low variance MMD estimate by averaging multiple low variance kernel statistics computed over blocks of samples. We show simple sufficient conditions on the block size for consistency of the estimator. Furthermore, we analyze the properties of the finite sample estimate, and propose a consistent strategy for setting the block size as a function of the number of samples. 2.1 Definition and asymptotics of the block-MMD Let Fk be an RKHS defined on a topological space X with reproducing kernel k, and P a Borel probability measure on X. The mean embedding of P in Fk, written µk(p) ∈Fk is defined such 2 −0.05 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0.05 0 50 100 150 200 250 HA histogram H0 histogram approximated 5% quantile of H0 (a) B = 2. This setting corresponds to the MMDl statistic [10]. −4 −2 0 2 4 6 8 10 x 10 −3 0 50 100 150 200 250 HA histogram H0 histogram approximated 5% quantile of H0 (b) B = 250 Figure 1: Empirical distributions under H0 and HA for different regimes of B for the music experiment (Section 3.2). In both plots, the number of samples is fixed at 500. As we vary B, we trade off the quality of the finite sample Gaussian approximation to the null distribution, as in Theorem 2.3, with the variances of the H0 and HA distributions, as outlined in Section 2.1. In (b) the distribution under H0 does not resemble a Gaussian (it does not pass a level 0.05 Kolmogorov-Smirnov (KS) normality test [16, 20]), and a Gaussian approximation results in a conservative test threshold (vertical green line). The remaining empirical distributions all pass a KS normality test. that Ex∼pf(x) = ⟨f, µk(p)⟩Fk for all f ∈Fk, and exists for all Borel probability measures when k is bounded and continuous [3, 10]. The maximum mean discrepancy (MMD) between a Borel probability measure P and a second Borel probability measure Q is the squared RKHS distance between their respective mean embeddings, ηk(P, Q) = ∥µk(P) −µk(Q)∥2 Fk = Exx′k(x, x′) + Eyy′k(y, y′) −2Exyk(x, y), (1) where x′ denotes an independent copy of x [11]. Introducing the notation z = (x, y), we write ηk(P, Q) = Ezz′hk(z, z′), h(z, z′) = k(x, x′) + k(y, y′) −k(x, y′) −k(x′, y). (2) When the kernel k is characteristic, then ηk (P, Q) = 0 iff P = Q [21]. Clearly, the minimum variance unbiased estimate MMDu of ηk(P, Q) is a U-statistic. By analogy with MMDu, we make use of averages of h(x, y, x′, y′) to construct our two-sample test. We denote by ˆηk(i) the ith empirical estimate MMDu based on a subsample of size B, where 1 ≤i ≤n B (for notational purposes, we will index samples as though they are presented in a random fixed order). More precisely, ˆηk(i) = 1 B(B −1) iB X a=(i−1)B+1 iB X b=(i−1)B+1,b̸=a h(za, zb). (3) The B-test statistic is an MMD estimate obtained by averaging the ˆηk(i). Each ˆηk(i) under H0 converges to an infinite sum of weighted χ2 variables [7]. Although setting B = n would lead to the lowest variance estimate of the MMD, computing sound thresholds for a given p-value is expensive, involving repeated bootstrap sampling [5, 14], or computing the eigenvalues of a Gram matrix [7]. In contrast, we note that ˆηk(i)i=1,..., n B are i.i.d. variables, and averaging them allows us to apply the central limit theorem in order to estimate p-values from a normal distribution. We denote the average of the ˆηk(i) by ˆηk, ˆηk = B n n B X i=1 ˆηk(i). (4) We would like to apply the central limit theorem to variables ˆηk(i)i=1,..., n B . It remains for us to derive the distribution of ˆηk under H0 and under HA. We rely on the result from [11, Theorem 8] for HA. According to our notation, for every i, 3 Theorem 2.1 Assume 0 < E(h2) < ∞, then under HA, ˆηk converges in distribution to a Gaussian according to B 1 2 (ˆηk(i) −MMD2) D →N(0, σ2 u), (5) where σ2 u = 4 Ez[(Ez′h(z, z′))2 −Ez,z′(h(z, z′))]2 . This in turn implies that ˆηk(i) D →N(MMD2, σ2 uB−1). (6) For an average of {ˆηk(i)}i=1,..., n B , the central limit theorem implies that under HA, ˆηk D →N  MMD2, σ2 u (Bn/B)−1 = N MMD2, σ2 un−1 . (7) This result shows that the distribution of HA is asymptotically independent of the block size, B. Turning to the null hypothesis, [11, Theorem 8] additionally implies that under H0 for every i, Theorem 2.2 Bˆηk(i) D → ∞ X l=1 λl[z2 l −2], (8) where zl ∼N(0, 2)2 i.i.d, λl are the solutions to the eigenvalue equation Z X ¯k(x, x′)ψl(x)dp(x) = λlψl(x′), (9) and ¯k(xi, xj) := k(xi, xj)−Exk(xi, x)−Exk(x, xj)+Ex,x′k(x, x′) is the centered RKHS kernel. As a consequence, under H0, ˆηk(i) has expected variance 2B−2 P∞ l=1 λ2. We will denote this variance by CB−2. The central limit theorem implies that under H0, ˆηk D →N  0, C B2n/B −1 = N 0, C(nB)−1 (10) The asymptotic distributions for ˆηk under H0 and HA are Gaussian, and consequently it is easy to calculate the distribution quantiles and test thresholds. Asymptotically, it is always beneficial to increase B, as the distributions for η under H0 and HA will be better separated. For consistency, it is sufficient to ensure that n/B →∞. A related strategy of averaging over data blocks to deal with large sample sizes has recently been developed in [15], with the goal of efficiently computing bootstrapped estimates of statistics of interest (e.g. quantiles or biases). Briefly, the approach splits the data (of size n) into s subsamples each of size B, computes an estimate of the n-fold bootstrap on each block, and averages these estimates. The difference with respect to our approach is that we use the asymptotic distribution of the average over block statistics to determine a threshold for a hypothesis test, whereas [15] is concerned with proving the consistency of a statistic obtained by averaging over bootstrap estimates on blocks. 2.2 Convergence of Moments In this section, we analyze the convergence of the moments of the B-test statistic, and comment on potential sources of bias. The central limit theorem implies that the empirical mean of {ˆηk(i)}i=1,..., n B converges to E(ˆηk(i)). Moreover it states that the variance {ˆηk(i)}i=1,..., n B converges to E(ˆηk(i))2 −E(ˆηk(i)2). Finally, all remaining moments tend to zero, where the rate of convergence for the jth moment is of the order n B  j+1 2 [1]. This indicates that the skewness dominates the difference of the distribution from a Gaussian. 4 Under both H0 and HA, thresholds computed from normal distribution tables are asymptotically unbiased. For finite samples sizes, however, the bias under H0 can be more severe. From Equation (8) we have that under H0, the summands, ˆηk(i), converge in distribution to infinite weighted sums of χ2 distributions. Every unweighted term of this infinite sum has distribution N(0, 2)2, which has finite skewness equal to 8. The skewness for the entire sum is finite and positive, C = ∞ X l=1 8λ3 l , (11) as λl ≥0 for all l due to the positive definiteness of the kernel k. The skew for the mean of the ˆηk(i) converges to 0 and is positively biased. At smaller sample sizes, test thresholds obtained from the standard Normal table may therefore be inaccurate, as they do not account for this skew. In our experiments, this bias caused the tests to be overly conservative, with lower Type I error than the design level required (Figures 2 and 5). 2.3 Finite Sample Case In the finite sample case, we apply the Berry-Ess´een theorem, which gives conservative bounds on the ℓ∞convergence of a series of finite sample random variables to a Gaussian distribution [4]. Theorem 2.3 Let X1, X2, . . . , Xn be i.i.d. variables. E(X1) = 0, E(X2 1) = σ2 > 0, and E(|X1|3) = ρ < ∞. Let Fn be a cumulative distribution of Pn i=1 Xi √nσ , and let Φ denote the standard normal distribution. Then for every x, |Fn(x) −Φ(x)| ≤Cρσ−3n−1/2, (12) where C < 1. This result allows us to ensure fast point-wise convergence of the B-test. We have that ρ(ˆηk) = O(1), i.e., it is dependent only on the underlying distributions of the samples and not on the sample size. The number of i.i.d. samples is nB−1. Based on Theorem 2.3, the point-wise error can be upper bounded by O(1) O(B−1) 3 2 √n B = O( B2 √n) under HA. Under H0, the error can be bounded by O(1) O(B−2) 3 2 √n B = O( B3.5 √n ). While the asymptotic results indicate that convergence to an optimal predictor is fastest for larger B, the finite sample results support decreasing the size of B in order to have a sufficient number of samples for application of the central limit theorem. As long as B →∞and n B →∞, the assumptions of the B-test are fulfilled. By varying B, we make a fundamental tradeoff in the construction of our two sample test. When B is small, we have many samples, hence the null distribution is close to the asymptotic limit provided by the central limit theorem, and the Type I error is estimated accurately. The disadvantage of a small B is a lower test power for a given sample size. Conversely, if we increase B, we will have a lower variance empirical distribution for H0, hence higher test power, but we may have a poor estimate of the number of Type I errors (Figure 1). A sensible family of heuristics therefore is to set B = [nγ] (13) for some 0 < γ < 1, where we round to the nearest integer. In this setting the number of samples available for application of the central limit theorem will be [n(1−γ)]. For given γ computational complexity of the B-test is O n1+γ . We note that any value of γ ∈(0, 1) yields a consistent estimator. We have chosen γ = 1 2 in the experimental results section, with resulting complexity O n1.5 : we emphasize that this is a heuristic, and just one choice that fulfils our assumptions. 3 Experiments We have conducted experiments on challenging synthetic and real datasets in order to empirically measure (i) sample complexity, (ii) computation time, and (iii) Type I / Type II errors. We evaluate B-test performance in comparison to the MMDl and MMDu estimators, where for the latter we compare across different strategies for null distribution quantile estimation. 5 Method Kernel parameters Additional parameters Minimum number of samples Computation time (s) Consistent B-test σ = 1 B = 2 26400 0.0012 ✓ B = 8 3850 0.0039 ✓ B = √n 886 0.0572 ✓ σ = median any B > 60000 ✓ multiple kernels B = 2 37000 0.0700 ✓ B = 8 5400 0.1295 ✓ B = p n 2 1700 0.8332 ✓ Pearson curves σ = 1 B = n 186 387.4649 × Gamma approximation 183 0.2667 × Gram matrix spectrum 186 407.3447 ✓ Bootstrap 190 129.4094 ✓ Pearson curves σ = median > 60000, or 2h per iteration timeout × Gamma approximation × Gram matrix spectrum ✓ Bootstrap ✓ Table 1: Sample complexity for tests on the distributions described in Figure 3. The fourth column indicates the minimum number of samples necessary to achieve Type I and Type II errors of 5%. The fifth column is the computation time required for 2000 samples, and is not presented for settings that have unsatisfactory sample complexity. 2 4 8 16 32 64 128 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Size of inner block Type I error Empirical Type I error Expected Type I error B = √n (a) 2 4 8 16 32 64 128 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Size of inner block Type I error Empirical Type I error Expected Type I error B = √n (b) 2 4 8 16 32 64 128 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Size of inner block Type I error Empirical Type I error Expected Type I error B = p n 2 (c) Figure 2: Type I errors on the distributions shown in Figure 3 for α = 5%: (a) MMD, single kernel, σ = 1, (b) MMD, single kernel, σ set to the median pairwise distance, and (c) MMD, non-negative linear combination of multiple kernels. The experiment was repeated 30000 times. Error bars are not visible at this scale. 3.1 Synthetic data Following previous work on kernel hypothesis testing [9], our synthetic distributions are 5 × 5 grids of 2D Gaussians. We specify two distributions, P and Q. For distribution P each Gaussian has identity covariance matrix, while for distribution Q the covariance is non-spherical. Samples drawn from P and Q are presented in Figure 3. These distributions have proved to be very challenging for existing non-parametric two-sample tests [9]. (a) Distribution P (b) Distribution Q Figure 3: Synthetic data distributions P and Q. Samples belonging to these classes are difficult to distinguish. We employed three different kernel selection strategies in the hypothesis test. First, we used a Gaussian kernel with σ = 1, which approximately matches the scale of the variance of each Gaussian in mixture P. While this is a somewhat arbitrary default choice, we selected it as it performs well in practice (given the lengthscale of the data), and we treat it as a baseline. Next, we set σ equal to the median pairwise distance over the training data, which is a standard way to choose the Gaussian kernel bandwidth [17], although it is likewise arbitrary in this context. Finally, we applied a kernel learning strategy, in which the kernel was optimized to maximize the test power for the alternative P ̸= Q [9]. This approach returned a non-negative linear combination combination of base kernels, where half the data were used in learning the kernel weights (these data were excluded from the testing phase). The base kernels in our experiments were chosen to be Gaussian, with bandwidths in the set σ ∈ {2−15, 2−14, . . . , 210}. Testing was conducted using the remaining half of the data. 6 10 1 10 2 10 3 0 0.2 0.4 0.6 0.8 1 Size of inner block Emprical number of Type II errors B−test, a single kernel, σ = 1 B−test, a single kernel, σ = median B−test kernel selection Tests estimating MMDu with σ=1 Tests estimating MMDu with σ=median Figure 4: Synthetic experiment: number of Type II errors vs B, given a fixed probability α of Type I errors. As B grows, the Type II error drops quickly when the kernel is appropriately chosen. The kernel selection method is described in [9], and closely approximates the baseline performance of the well-informed user choice of σ = 1. For comparison with the quadratic time Ustatistic MMDu [7, 10], we evaluated four null distribution estimates: (i) Pearson curves, (ii) gamma approximation, (iii) Gram matrix spectrum, and (iv) bootstrap. For methods using Pearson curves and the Gram matrix spectrum, we drew 500 samples from the null distribution estimates to obtain the 1 −α quantiles, for a test of level α. For the bootstrap, we fixed the number of shuffles to 1000. We note that Pearson curves and the gamma approximation are not statistically consistent. We considered only the setting with σ = 1 and σ set to the median pairwise distance, as kernel selection is not yet solved for tests using MMDu [9]. In the first experiment we set the Type I error to be 5%, and we recorded the Type II error. We conducted these experiments on 2000 samples over 1000 repetitions, with varying block size, B. Figure 4 presents results for different kernel choice strategies, as a function of B. The median heuristic performs extremely poorly in this experiment. As discussed in [9, Section 5], the reason for this failure is that the lengthscale of the difference between the distributions P and Q differs from the lengthscale of the main data variation as captured by the median, which gives too broad a kernel for the data. In the second experiment, our aim was to compare the empirical sample complexity of the various methods. We again fixed the same Type I error for all methods, but this time we also fixed a Type II error of 5%, increasing the number of samples until the latter error rate was achieved. Column four of Table 1 shows the number of samples required in each setting to achieve these error rates. We additionally compared the computational efficiency of the various methods. The computation time for each method with a fixed sample size of 2000 is presented in column five of Table 1. All experiments were run on a single 2.4 GHz core. Finally, we evaluated the empirical Type I error for α = 5% and increasing B. Figure 2 displays the empirical Type I error, where we note the location of the γ = 0.5 heuristic in Equation (13). For the user-chosen kernel (σ = 1, Figure 2(a)), the number of Type I errors closely matches the targeted test level. When median heuristic is used, however, the test is overly conservative, and makes fewer Type I errors than required (Figure 2(b)). This indicates that for this choice of σ, we are not in the asymptotic regime, and our Gaussian null distribution approximation is inaccurate. Kernel selection via the strategy of [9] alleviates this problem (Figure 2(c)). This setting coincides with a block size substantially larger than 2 (MMDl), and therefore achieves lower Type II errors while retaining the targeted Type I error. 3.2 Musical experiments In this set of experiments, two amplitude modulated Rammstein songs were compared (Sehnsucht vs. Engel, from the album Sehnsucht). Following the experimental setting in [9, Section 5], samples from P and Q were extracts from AM signals of time duration 8.3 × 10−3 seconds in the original audio. Feature extraction was identical to [9], except that the amplitude scaling parameter was set to 0.3 instead of 0.5. As the feature vector had size 1000 we set the block size B = √ 1000  = 32. Table 2 summarizes the empirical Type I and Type II errors over 1000 repetitions, and the average computation times. Figure 5 shows the average number of Type I errors as a function of B: in this case, all kernel selection strategies result in conservative tests (lower Type I error than required), indicating that more samples are needed to reach the asymptotic regime. Figure 1 shows the empirical H0 and HA distributions for different B. 4 Discussion We have presented experimental results both on a difficult synthetic problem, and on real-world data from amplitude modulated audio recordings. The results show that the B-test has a much better 7 Method Kernel parameters Additional parameters Type I error Type II error Computational time (s) B-test σ = 1 B = 2 0.038 0.927 0.039 B = √n 0.006 0.597 1.276 σ = median B = 2 0.043 0.786 0.047 B = √n 0.026 0 1.259 multiple kernels B = 2 0.0481 0.867 0.607 B = p n 2 0.025 0.012 18.285 Gram matrix spectrum σ = 1 B = 2000 0 0 160.1356 Bootstrap 0.01 0 121.2570 Gram matrix spectrum σ = median 0 0 286.8649 Bootstrap 0.01 0 122.8297 Table 2: A comparison of consistent tests on the music experiment described in Section 3.2. Here computation time is reported for the test achieving the stated error rates. 2 4 8 16 32 64 128 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Size of inner block Type I error Empirical Type I error Expected Type I error B = √n (a) 2 4 8 16 32 64 128 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Size of inner block Type I error Empirical Type I error Expected Type I error B = √n (b) 2 4 8 16 32 64 128 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Size of inner block Type I error Empirical Type I error Expected Type I error B = p n 2 (c) Figure 5: Empirical Type I error rate for α = 5% on the music data (Section 3.2). (a) A single kernel test with σ = 1, (b) A single kernel test with σ = median, and (c) for multiple kernels. Error bars are not visible at this scale. The results broadly follow the trend visible from the synthetic experiments. sample complexity than MMDl over all tested kernel selection strategies. Moreover, it is an order of magnitude faster than any test that consistently estimates the null distribution for MMDu (i.e., the Gram matrix eigenspectrum and bootstrap estimates): these estimates are impractical at large sample sizes, due to their computational complexity. Additionally, the B-test remains statistically consistent, with the best convergence rates achieved for large B. The B-test combines the best features of MMDl and MMDu based two-sample tests: consistency, high statistical efficiency, and high computational efficiency. A number of further interesting experimental trends may be seen in these results. First, we have observed that the empirical Type I error rate is often conservative, and is less than the 5% targeted by the threshold based on a Gaussian null distribution assumption (Figures 2 and 5). In spite of this conservatism, the Type II performance remains strong (Tables 1 and 2), as the gains in statistical power of the B-tests improve the testing performance (cf. Figure 1). Equation (7) implies that the size of B does not influence the asymptotic variance under HA, however we observe in Figure 1 that the empirical variance of HA drops with larger B. This is because, for these P and Q and small B, the null and alternative distributions have considerable overlap. Hence, given the distributions are effectively indistinguishable at these sample sizes n, the variance of the alternative distribution as a function of B behaves more like that of H0 (cf. Equation (10)). This effect will vanish as n grows. Finally, [13] propose an alternative approach for U-statistic based testing when the degree of degeneracy is known: a new U-statistic (the TU-statistic) is written in terms of products of centred U-statistics computed on the individual blocks, and a test is formulated using this TU-statistic. Ho and Shieh show that a TU-statistic based test can be asymptotically more powerful than a test using a single U-statistic on the whole sample, when the latter is degenerate under H0, and nondegenerate under HA. It is of interest to apply this technique to MMD-based two-sample testing. Acknowledgments We thank Mladen Kolar for helpful discussions. This work is partially funded by ERC Grant 259112, and by the Royal Academy of Engineering through the Newton Alumni Scheme. 8 References [1] Bengt Von Bahr. On the convergence of moments in the central limit theorem. The Annals of Mathematical Statistics, 36(3):pp. 808–818, 1965. [2] L. Baringhaus and C. Franz. On a new multivariate two-sample test. J. Multivariate Anal., 88:190–206, 2004. [3] A. Berlinet and C. Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer, 2004. [4] Andrew C Berry. The accuracy of the gaussian approximation to the sum of independent variates. Transactions of the American Mathematical Society, 49(1):122–136, 1941. [5] B. Efron and R. J. Tibshirani. An Introduction to the Bootstrap. Chapman & Hall, 1993. [6] M. Fromont, B. Laurent, M. Lerasle, and P. Reynaud-Bouret. Kernels based tests with nonasymptotic bootstrap approaches for two-sample problems. In COLT, 2012. [7] A Gretton, K Fukumizu, Z Harchaoui, and BK Sriperumbudur. A fast, consistent kernel twosample test. In Advances in Neural Information Processing Systems 22, pages 673–681, 2009. [8] A. Gretton, K. Fukumizu, C.-H. Teo, L. Song, B. Sch¨olkopf, and A. J. Smola. A kernel statistical test of independence. In Advances in Neural Information Processing Systems 20, pages 585–592, Cambridge, MA, 2008. MIT Press. [9] A Gretton, B Sriperumbudur, D Sejdinovic, H Strathmann, S Balakrishnan, M Pontil, and K Fukumizu. Optimal kernel choice for large-scale two-sample tests. In Advances in Neural Information Processing Systems 25, pages 1214–1222, 2012. [10] Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Sch¨olkopf, and Alexander Smola. A kernel two-sample test. J. Mach. Learn. Res., 13:723–773, March 2012. [11] Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Sch¨olkopf, and Alexander J. Smola. A kernel method for the two-sample-problem. In NIPS, pages 513–520, 2006. [12] Z. Harchaoui, F. Bach, and E. Moulines. Testing for homogeneity with kernel Fisher discriminant analysis. In NIPS, pages 609–616. MIT Press, Cambridge, MA, 2008. [13] H.-C. Ho and G. Shieh. Two-stage U-statistics for hypothesis testing. Scandinavian Journal of Statistics, 33(4):861–873, 2006. [14] Norman Lloyd Johnson, Samuel Kotz, and Narayanaswamy Balakrishnan. Continuous univariate distributions. Distributions in statistics. Wiley, 2nd edition, 1994. [15] A. Kleiner, A. Talwalkar, P. Sarkar, and M. I. Jordan. A scalable bootstrap for massive data. Journal of the Royal Statistical Society, Series B, In Press. [16] Andrey N Kolmogorov. Sulla determinazione empirica di una legge di distribuzione. Giornale dellIstituto Italiano degli Attuari, 4(1):83–91, 1933. [17] B Sch¨olkopf. Support vector learning. Oldenbourg, M¨unchen, Germany, 1997. [18] D. Sejdinovic, A. Gretton, B. Sriperumbudur, and K. Fukumizu. Hypothesis testing using pairwise distances and associated kernels. In ICML, 2012. [19] R. Serfling. Approximation Theorems of Mathematical Statistics. Wiley, New York, 1980. [20] Nickolay Smirnov. Table for estimating the goodness of fit of empirical distributions. The Annals of Mathematical Statistics, 19(2):279–281, 1948. [21] B. Sriperumbudur, A. Gretton, K. Fukumizu, G. Lanckriet, and B. Sch¨olkopf. Hilbert space embeddings and metrics on probability measures. Journal of Machine Learning Research, 11:1517–1561, 2010. [22] G. Sz´ekely and M. Rizzo. Testing for equal distributions in high dimension. InterStat, (5), November 2004. [23] G. Sz´ekely, M. Rizzo, and N. Bakirov. Measuring and testing dependence by correlation of distances. Ann. Stat., 35(6):2769–2794, 2007. [24] M. Yamada, T. Suzuki, T. Kanamori, H. Hachiya, and M. Sugiyama. Relative density-ratio estimation for robust distribution comparison. Neural Computation, 25(5):1324–1370, 2013. 9
2013
239
4,975
Bayesian Inference and Online Experimental Design for Mapping Neural Microcircuits Ben Shababo ∗ Department of Biological Sciences Columbia University, New York, NY 10027 bms2156@columbia.edu Brooks Paige ∗ Department of Engineering Science University of Oxford, Oxford OX1 3PJ, UK brooks@robots.ox.ac.uk Ari Pakman Department of Statistics, Center for Theoretical Neuroscience, & Grossman Center for the Statistics of Mind Columbia University, New York, NY 10027 ap3053@columbia.edu Liam Paninski Department of Statistics, Center for Theoretical Neuroscience, & Grossman Center for the Statistics of Mind Columbia University, New York, NY 10027 liam@stat.columbia.edu Abstract With the advent of modern stimulation techniques in neuroscience, the opportunity arises to map neuron to neuron connectivity. In this work, we develop a method for efficiently inferring posterior distributions over synaptic strengths in neural microcircuits. The input to our algorithm is data from experiments in which action potentials from putative presynaptic neurons can be evoked while a subthreshold recording is made from a single postsynaptic neuron. We present a realistic statistical model which accounts for the main sources of variability in this experiment and allows for significant prior information about the connectivity and neuronal cell types to be incorporated if available. Due to the technical challenges and sparsity of these systems, it is important to focus experimental time stimulating the neurons whose synaptic strength is most ambiguous, therefore we also develop an online optimal design algorithm for choosing which neurons to stimulate at each trial. 1 Introduction A major goal of neuroscience is the mapping of neural microcircuits at the scale of hundreds to thousands of neurons [1]. By mapping, we specifically mean determining which neurons synapse onto each other and with what weight. One approach to achieving this goal involves the simultaneous stimulation and observation of populations of neurons. In this paper, we specifically address the mapping experiment in which a set of putative presynaptic neurons are optically stimulated while an electrophysiological trace is recorded from a designated postsynaptic neuron. It should be noted that the methods we present are general enough that most stimulation and subthreshold monitoring technology would be well fit by our model with only minor changes. These types of experiments have been implemented with some success [2, 3, 6], yet there are several issues which prevent efficient, large scale mapping of neural microcircuitry. For example, while it has been shown that multiple neurons can be stimulated simultaneously [4, 5], successful mapping experiments have thus far only stimulated a single neuron per trial which increases experimental time [2, 3, 6]. Stimulating multiple neurons simultaneously and with high accuracy requires well-tuned hardware, and even then some level of stimulus uncertainty may remain. In addition, a large portion of connection ∗These authors contributed equally to this work. 1 weights are small which has meant that determining these weights is difficult and that many trials must be performed. Due to the sparsity of neural connectivity, potentially useful trials are spent on unconnected pairs instead of refining weight estimates for connected pairs when the stimuli are chosen non-adaptively. In this paper, we address these issues by developing a procedure for sparse Bayesian inference and information-based experimental design which can reconstruct neural microcircuits accurately and quickly despite the issues listed above. 2 A realistic model of neural microcircuits In this section we propose a novel and thorough statistical model which is specific enough to capture most of the relevant variability in these types of experiments while being flexible enough to be used with many different hardware setups and biological preparations. 2.1 Stimulation In our experimental setup, at each trial, n = 1, . . . , N, the experimenter stimulates R of K possible presynaptic neurons. We represent the chosen set of neurons for each trial with the binary vector zn ∈{0, 1}K, which has a one in each of the the R entries corresponding to the stimulated neurons on that trial. One of the difficulties of optical stimulation lies in the experimenter’s inability to stimulate a specific neuron without possibly failing to stimulate the target neuron or engaging other nearby neurons. In general, this is a result of the fact that optical excitation does not stimulate a single point in space but rather has a point spread function that is dependent on the hardware and the biological tissue. To complicate matters further, each neuron has a different rheobase (a measure of how much current is needed to generate an action potential) and expression level of the optogenetic protein. While some work has shown that it may be possible to stimulate exact sets of neurons, this setup requires very specific hardware and fine tuning [4, 5]. In addition, even if a neuron fires, there is some probability that synaptic transmission will not occur. Because these events are difficult or impossible to observe, we model this uncertainty by introducing a second binary vector xn ∈{0, 1}K denoting the neurons that actually release neurotransmitter in trial n. The conditional distribution of xn given zn can be chosen by the experimenter to match their hardware settings and understanding of synaptic transmission rates in their preparation. 2.2 Sparse connectivity Numerous studies have collected data to estimate both connection probabilities and synaptic weight distributions as a function of distance and cell identity [2, 3, 6, 7, 8, 9, 10, 11, 12]. Generally, the data show that connectivity is sparse and that most synaptic weights are small with a heavy tail of strong connections. To capture the sparsity of neural connectivity, we place a “spike-and-slab” prior on the synaptic weights wk [13, 14, 15], for each presynaptic neuron k = 1, . . . , K; these priors are designed to place non-zero probability on the event that a given weight wk is exactly zero. Note that we do not need to restrict the “slab” distributions (the conditional distributions of wk given that wk is nonzero) to the traditional Gaussian choice, and in fact each weight can have its own parameters. For example, log-normal [12] or exponential [8, 10] distributions may be used in conjunction with information about cell type and location to assign highly informative priors 1. 2.3 Postsynaptic response In our model a subthreshold response is measured from a designated postsynaptic neuron. Here we assume the measurement is a one-dimensional trace yn ∈RT , where T is the number of samples in the trace. The postsynaptic response for each synaptic event in a given trial can be modeled using an appropriate template function fk(·) for each presynaptic neuron k. For this paper we use an alpha function to model the shape of each neuron’s contribution to the postsynaptic current, parameterized by time constants τk which define the rise and decay time. As with the synaptic weight priors, the template functions could be designed based on the cells’ identities. The onset of each postsynaptic 1A cell’s identity can be general such as excitatory or inhibitory, or more specific such as VIP- or PVinterneurons. These identities can be identified by driving the optogenetic channel with a particular promotor unique to that cell type or by coexpressing markers for various cell types along with the optogenetic channel. 2 Weight Current [pA] Postsynaptic current trace Presynaptic weights Location of presynaptic neurons and stimuli 0 50 100 150 200 −30 −20 −10 0 10 0 20 40 60 80 100 −1 0 1 Time [samples] Neuron k Figure 1: A schematic of the model experiment. The left figure shows the relative location of 100 presynaptic neurons; inhibitory neurons are shown in yellow, and excitatory neurons in purple. Neurons marked with a black outline have a nonzero connectivity to the postsynaptic neuron (shown as a blue star, in the center). The blue circles show the diffusion of the stimulus through the tissue. The true connectivity weights are shown on the upper right, with blue vertical lines marking the five neurons which were actually fired as a result of this stimulus. The resulting time series postsynaptic current trace is shown in the bottom right. The connected neurons which fired are circled in red, the triangle and star marking their weights and corresponding postsynaptic events in the plots at right. response may be jittered such that each event starts at some time dnk after t = 0, where the delays could be conditionally distributed on the parameters of the stimulation and cells. Finally, at each time step the signal is corrupted by zero mean Gaussian noise with variance ν2. This noise distribution is chosen for simplicity; however, the model could easily handle time-correlated noise. 2.4 Full definition of model The full model can be summarized by the likelihood p(Y|w, X, D) = N Y n=1 T Y t=1 N  ynt X k wkxnkfk(t −dnk, τk), ν2  (1) with the general spike-and-slab prior p(γk) = Bernoulli(ak), p(wk|γk) = γkp(wk|γk = 1) + (1 −γk)δ0(wk) (2a, 2b) where Y ∈RN×T , X ∈{0, 1}N×K, and D ∈RN×K are composed of the responses, latent neural activity, and delays, respectively; γk is a binary variable indicating whether or not neuron k is connected. We restate that the key to this model is that it captures the main sources of uncertainty in the experiment while providing room for particulars regarding hardware and the anatomy and physiology of the system to be incorporated. To infer the marginal distribution of the synaptic weights, one can use standard Bayesian methods such as Gibbs sampling or variational inference, both of which are discussed below. An example set of neurons and connectivity weights, along with the set of stimuli and postsynaptic current trace for a single trial, is shown in Figure 1. 3 Inference Throughout the remainder of the paper, all simulated data is generated from the model presented above. As mentioned, any free hyperparameters or distribution choices can be chosen intelligently from empirical evidence. Biological parameters may be specific and chosen on a cell by cell basis or left general for the whole system. We show in our results that inference and optimal design still perform well when general priors are used. Details regarding data simulation as well as specific choices we make in our experiments are presented in Appendix A. 3 3.1 Charge as synaptic strength To reduce the space over which we perform inference, we collapse the variables wk and τk into a single variable ck = P t wkfk(t −dnk, τk) which quantifies the charge transfer during the synaptic event and can be used to define the strength of a connection. Integrating over time also eliminates any dependence on the delays dnk. In this context, we reparameterize the likelihood as a function of yn = PT t=0 ynt and σ = νT 1/2 and the resulting likelihood is p(y|X, c) = Y n N(yn|x⊤ n c, σ2). (3) We found that na¨ıve MCMC sampling over the posterior of w, τ, γ, X, and D insufficiently explored the support and inference was unsuccessful. In this effort to make the inference procedure computationally tractable, we discard potentially useful temporal information in the responses. An important direction for future work is to experiment with samplers that can more efficiently explore the full posterior (e.g., using Wang-Landau or simulated tempering methods). 3.2 Gibbs sampling The reparameterized posterior p(c, γ, X|Z, y) can be inferred using a simple Gibbs sampler. We approximate the prior over c as a spike-and-slab with Gaussian slabs where the slabs could be truncated if the cells’ excitatory or inhibitory identity is known. Each xnk can be sampled by computing the odds ratio, and following [15] we draw each ck, γk from the joint distribution p(ck, γk|Z, y, X, {cj, γj|j ̸= k}) by sampling first γk from p(γk|Z, y, X, {cj|j ̸= k}), then p(ck|Z, y, X, {cj, |j ̸= k}, γk). 3.3 Variational Bayes As stated earlier we do not only want to recover the parameters of the system, but want to perform optimal experimental design, which is a closed-loop process. One essential aspect of the design procedure is that decisions must be returned to the experimenter quickly, on the order of a few seconds. This means that we must be able to perform inference of the posterior as well as choose the next stimulus extremely quickly. For realistically sized systems with hundred to thousands of neurons, Gibbs sampling will be too slow, and we have to explore other options for speeding up inference. To achieve this decrease in runtime, we approximate the posterior distribution of c and γ using a variational approach [16]. The use of variational inference for spike-and-slab regression models has been explored in [17, 18], and we follow their methods with some minor changes. If we, for now, assume that X is known and let the spike-and-slab prior on c have untruncated Gaussian slabs, then this variational approach finds the best fully-factorized approximation to the true posterior p(c, γ|x1:n, y1:n) ≈ Y k q(ck, γk) (4) where the functional form of q(ck, γk) is itself restricted to a spike-and-slab distribution q(ck, γk) = αkN(ck|µk, s2 k) if γk = 1 (1 −αk)δ0(ck) otherwise. (5) The variational parameters αk, µk, sk for k = 1, . . . , K are found by minimizing the KL-divergence KL(q||p) between the left and right hand sides of Eq. 4 with respect to these values. As is the case with fully-factorized variational distributions, updating the posterior involves an iterative algorithm which cycles through the parameters for each factor. The factorized variational approximation is reasonable when the number of simultaneous stimuli, R, is small. Note that if we examine the posterior distributions of the weights p(c|y, X) ∝ Y n N(yn|x⊤ n c, σ2) Y k  akN(ck|ηk, σ2 k) + (1 −ak)δ0(ck)  (6) we see that if each xn contains only one nonzero value then each factor in the likelihood is dependent on only one of the K weights and can be multiplied into the corresponding kth spike-and-slab. 4 Therefore, since the product of a spike-and-slab and a Gaussian is still a spike-and-slab, if we stimulate only one neuron at each trial then this posterior is also spike-and-slab, and the variational approximation becomes exact in this limit. Since we do not directly observe X, we must take the expectation of the variational parameters αk, µk, sk with respect to the distribution p(X|Z, y). We Monte Carlo approximate this integral in a manner similar to the approach used for integrating over the hyperparameters in [17]; however, here we further approximate by sampling over potential stimuli xnk from p(xnk = 1|zn). In practice we will see this approximation suffices for experimental design, with the overall variational approach performing nearly as well for posterior weight reconstruction as Gibbs sampling from the true posterior. 4 Optimal experimental design The preparations needed to perform these type of experiments tend to be short-lived, and indeed, the very act of collecting data — that is, stimulating and probing cells — can compromise the health of the preparation further. Also, one may want to use the connectivity information to perform additional experiments. Therefore it becomes critical to complete the mapping phase of the experiment as quickly as possible. We are thus strongly motivated to optimize the experimental design: to choose the optimal subset of neurons zn to stimulate at each trial to minimize N, the overall number of trials required for good inference. The Bayesian approach to the optimization of experimental design has been explored in [19, 20, 21]. In this paper, we maximize the mutual information I(θ; D) between the model parameters θ and the data D; however, other objective functions could be explored. Mutual information can be decomposed into a difference of entropies, one of which does not depend on the data. Therefore the optimization reduces to the intuitive objective of minimizing the posterior entropy with respect to the data. Because the previous data Dn−1 = {(z1, y1), . . . , (zn−1, yn−1)} are fixed and yn is dependent on the stimulus zn, our problem is reduced to choosing the optimal next stimulus, denoted z⋆ n, in expectation over yn, z⋆ n = arg max zn Eyn|zn [I(θ; D)] = arg min zn Eyn|zn [H(θ|D)] . (7) 5 Experimental design procedure The optimization described in Section 4 entails performing a combinatorial optimization over zn, where for each zn we consider an expectation over all possible yn. In order to be useful to experimenters in an online setting, we must be able to choose the next stimulus in only one or two seconds. For any realistically sized system, an exact optimization is computationally infeasible; therefore in the following section we derive a fast method for approximating the objective function. 5.1 Computing the objective function The variational posterior distribution of ck, γk can be used to characterize our general objective function described in Section 4. We define the cost function J to be the right-hand side of Equation 7, J ≡Eyn|zn[H(c, γ|D)] (8) such that the optimal next stimulus z⋆ n can be found by minimizing J. We benefit immediately from the factorized approximation of the variational posterior, since we can rewrite the joint entropy as H[c, γ|D] ≈ X k H[ck, γk|D] (9) allowing us to optimize over the sum of the marginal entropies instead of having to compute the (intractable) entropy over the full posterior. Using the conditional entropy identity H[ck, γk|D] = H[ck|γk, D] + H[γk|D], we see that the entropy of each spike-and-slab is the sum of a weighted Gaussian entropy and a Bernoulli entropy and we can write out the approximate objective function as J ≈ X k Eyn|zn hαk,n 2 (1 + log(2πs2 k,n)) −αk,n log αk,n −(1 −αk,n) log(1 −αk,n) i . (10) 5 Here, we have introduced additional notation, using αk,n, µk,n, and sk,n to refer to the parameters of the variational posterior distribution given the data through trial n. Intuitively, we see that equation 10 represents a balance between minimizing the sparsity pattern entropy H[γk] of each neuron and minimizing the weight entropy H[ck|γk = 1] proportional to the probability αk that the presynaptic neuron is connected. As p(γk = 1) →1, the entropy of the Gaussian slab distribution grows to dominate. In algorithm behavior, we see when the probability that a neuron is connected increases, we spend time stimulating it to reduce the uncertainty in the corresponding nonzero slab distribution. To perform this optimization we must compute the expected joint entropy with respect to p(yn|zn). For any particular candidate zn, this can be Monte Carlo approximated by first sampling yn from the posterior distribution p(yn|zn, c, Dn−1), where c is drawn from the variational posterior inferred at trial n −1. Each sampled yn may be used to estimate the variational parameters αk,n and sk,n with which we evaluate H[ck, γk]; we average over these evaluations of the entropy from each sample to compute an estimate of J in Eq. 10. Once we have chosen z⋆ n, we execute the actual trial and run the variational inference procedure on the full data to obtain the updated variational posterior parameters αk,n, µk,n, and sk,n which are needed for optimization. Once the experiment has concluded, Gibbs sampling can be run, though we found only a limited gain when comparing Gibbs sampling to variational inference. 5.2 Fast optimization The major cost to the algorithm is in the stimulus selection phase. It is not feasible to evaluate the right-hand side of equation 10 for every zn because as K grows there is a combinatorial explosion of possible stimuli. To avoid an exhaustive search over possible zn, we adopt a greedy approach for choosing which R of the K locations to stimulate. First we rank the K neurons based on an approximation of the objective function. To do this, we propose K hypothetical stimuli, ˜zk n, each all zeros except the kth entry equal to 1 — that is, we examine only the K stimuli which represent stimulating a single location. We then set z∗ nk = 1 for the R neurons corresponding to the ˜zk n which give the smallest values for the objective function and all other entries of z∗ n to zero. We found that the neurons selected by a brute force approach are most likely to be the neurons that the greedy selection process chooses (see Figure 1 in the Appendix). For large systems of neurons, even the above is too slow to perform in an online setting. For each of the K proposed stimuli ˜zk n, to approximate the expected entropy we must compute the variational posterior for M samples of [X⊤ 1:n−1 ˜x⊤ n ]⊤and L samples of yn (where ˜xn is the random variable corresponding to p(˜xn|˜zn)). Therefore we run the variational inference procedure on the full data on the order of O(MKL) times at each trial. As the system size grows, running the variational inference procedure this many times becomes intractable because the number of iterations needed to converge the coordinate ascent algorithm is dependent on the correlations between the rows of X. This is implicitly dependent on both N, the number of trials, and R, the number of stimulus locations (see Figure 2 in the Appendix). Note that the stronger dependence here is on R; when R = 1 the variational parameter updates become exact and independent across the neurons, and therefore no coordinate ascent is necessary and the runtime becomes linear in K. We therefore take one last measure to speed up the optimization process by implementing an online Bayesian approach to updating the variational posterior (in the stimulus selection phase only). Since the variational posterior of ck and γk takes the same form as the prior distribution, we can use the posterior from trial n −1 as the prior at trial n, allowing us to effectively summarize the previous data. In this online setting, when we stimulate only one neuron, only the parameters of that specific neuron change. If during optimization we temporarily assume that ˜xk n = ˜zk n, this results in explicit updates for each variational parameter, with no coordinate ascent iterations required. In total, the resulting optimization algorithm has a runtime O(KL) with no coordinate ascent algorithms needed. The combined accelerations described in this section result in a speed up of several orders of magnitude which allows the full inference and optimization procedure to be run in real time, running at approximately one second per trial in our computing environment for K = 500, R = 8. It is worth mentioning here that there are several points at which parallelization could be implemented in the full algorithm. We chose to parallelize over M which distributes the sampling of X and the running of variational inference for each sample. (Formulae and step-by-step implementation details are found in Appendix B.) 6 0.2 0.4 0.6 0.8 1 1.2 ν =1.0 NRE of E[c] R =2 0.2 0.4 0.6 0.8 1 1.2 1.4 ν =2.5 NRE of E[c] 0 200 400 600 800 0.4 0.6 0.8 1 1.2 1.4 ν =5.0 NRE of E[c] trial, n R =4 0 200 400 600 800 trial, n R =8 0 200 400 600 800 trial, n R =16 0 200 400 600 800 trial, n Figure 2: A comparison of normalized reconstruction error (NRE) over 800 trials in a system with 500 neurons, between random stimulus selection (red, magenta) and our optimal experimental design approach (blue, cyan). The heavy red and blue lines indicate the results when running the Gibbs sampler at that point in the experiment, and the thinner magenta and cyan lines indicate the results from variational inference. Results are shown over three noise levels ν = 1, 2.5, 5, and for multiple numbers of stimulus locations per trial, R = 2, 4, 8, 16. Each plot shows the median and quartiles over 50 experiments. The error decreases much faster in the optimal design case, over a wide parameter range. 6 Experiments and results We ran our inference and optimal experimental design algorithm on data sets generated from the model described in Section 2. We benchmarked our optimal design algorithm against a sequence of randomly chosen stimuli, measuring performance by normalized reconstruction error, defined as ∥E[c] −c∥2/∥c∥2; we report the variation in our experiments by plotting the median and quartiles. Baseline results are shown in Figure 2, over a range of values for stimulations per trial R and baseline postsynaptic noise levels ν. The results here use an informative prior, where we assume the excitatory or inhibitory identity is known, and we set individual prior connectivity probabilities for each neuron based on that neuron’s identity and distance from the postsynaptic cell. We choose to let X be unobserved and let the stimuli Z produce Gaussian ellipsoids which excite neurons that are located nearby. All model parameters are given in Appendix A. We see that inference in general performs well. The optimal procedure was able to achieve equivalent reconstruction quality as a random stimulation paradigm in significantly fewer trials when the number of stimuli per trial and response noise were in an experimentally realistic range (R = 4 and ν = 2.5 being reasonable values). Interestingly, the approximate variational inference methods performed about as well as the full Gibbs sampler here (at much less computational cost), although Gibbs sampling seems to break down when R grows too large and the noise level is small, which may be a consequence of strong, local peaks in the posterior. As the the number of stimuli per trial R increases, we start to see improved weight estimates and faster convergence but a decrease in the relative benefit of optimal design; the random approach “catches up” to the optimal approach as R becomes large. This is consistent with the results of [22], who argue that optimal design can provide only modest gains in performing sparse reconstructions, 7 0 200 400 600 800 0.4 0.6 0.8 1 1.2 trial, n X Observed 0 200 400 600 800 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 NRE of E[c] trial, n General Prior Figure 3: The results of inference and optimal design (A) with a single spike-andslab prior for all connections (prior connection probability of .1, and each slab Gaussian with mean 0 and standard deviation 31.4); and (B) with X observed. Both experiments show median and quartiles range with R = 4 and ν = 2.5. if the design vectors x are unconstrained. (Note that these results do not apply directly in our setting if R is small, since in this case x is constrained to be highly sparse — and this is exactly where we see major gains from optimal online designs.) Finally, we see that we are still able to recover the synaptic strengths when we use a more general prior as in Figure 3A where we placed a single spike-and-slab prior across all the connections. Since we assumed the cells’ identities were unknown, we used a zero-centered Gaussian for the slab and a prior connection probability of .1. While we allow for stimulus uncertainty, it will likely soon be possible to stimulate multiple neurons with high accuracy. In Figure 3B we see that - as expected performance improves. It is helpful to place this observation in the context of [23], which proposed a compressed-sensing algorithm to infer microcircuitry in experiments like those modeled here. The algorithms proposed by [23] are based on computing a maximum a posteriori (MAP) estimate of the weights w; note that to pursue the optimal Bayesian experimental design methods proposed here, it is necessary to compute (or approximate) the full posterior distribution, not just the MAP estimate. (See, e.g., [24] for a related discussion.) In the simulated experiments of [23], stimulating roughly 30 of 500 neurons per trial is found to be optimal; extrapolating from Fig. 2, we would expect a limited difference between optimal and random designs in this range of R. That said, large values of R lead to some experimental difficulties: first, stimulating large populations of neurons with high spatial resolution requires very fined tuned hardware (note that the approach of [23] has not yet been applied to experimental data, to our knowledge); second, if R is sufficiently large then the postsynaptic neuron can be easily driven out of a physiologically realistic regime, which in turn means that the basic linear-Gaussian modeling assumptions used here and in [23] would need to be modified. We plan to address these issues in more depth in our future work. 7 Future Work There are several improvements we would like to explore in developing this model and algorithm further. First, the implementation of an inference algorithm which performs well on the full model such that we can recover the synaptic weights, the time constants, and the delays would allow us to avoid compressing the responses to scalar values and recover more information about the system. Also, it may be necessary to improve the noise model as we currently assume that there are no spontaneous synaptic events which will confound the determination of each connection’s strength. Finally, in a recent paper, [25], a simple adaptive compressive sensing algorithm was presented which challenges the results of [22]. It would be worth exploring whether their algorithm would be applicable to our problem. Acknowledgements This material is based upon work supported by, or in part by, the U. S. Army Research Laboratory and the U. S. Army Research Office under contract number W911NF-12-1-0594 and an NSF CAREER grant. We would also like to thank Rafael Yuste and Jan Hirtz for helpful discussions, and our anonymous reviewers. 8 References [1] R. Reid, “From Functional Architecture to Functional Connectomics,” Neuron, vol. 75, pp. 209–217, July 2012. [2] M. Ashby and J. Isaac, “Maturation of a recurrent excitatory neocortical circuit by experience-dependent unsilencing of newly formed dendritic spines,” Neuron, vol. 70, no. 3, pp. 510 – 521, 2011. [3] E. Fino and R. Yuste, “Dense Inhibitory Connectivity in Neocortex,” Neuron, vol. 69, pp. 1188–1203, Mar. 2011. [4] V. Nikolenko, K. E. Poskanzer, and R. Yuste, “Two-photon photostimulation and imaging of neural circuits,” Nat Meth, vol. 4, pp. 943–950, Nov. 2007. [5] A. M. Packer, D. S. Peterka, J. J. Hirtz, R. Prakash, K. Deisseroth, and R. Yuste, “Two-photon optogenetics of dendritic spines and neural circuits,” Nat Meth, vol. 9, pp. 1202–1205, Dec. 2012. [6] A. M. Packer and R. Yuste, “Dense, unspecific connectivity of neocortical parvalbumin-positive interneurons: A canonical microcircuit for inhibition?,” The Journal of Neuroscience, vol. 31, no. 37, pp. 13260– 13271, 2011. [7] B. Barbour, N. Brunel, V. Hakim, and J.-P. Nadal, “What can we learn from synaptic weight distributions?,” Trends in neurosciences, vol. 30, pp. 622–629, Dec. 2007. [8] C. Holmgren, T. Harkany, B. Svennenfors, and Y. Zilberter, “Pyramidal cell communication within local networks in layer 2/3 of rat neocortex,” The Journal of Physiology, vol. 551, no. 1, pp. 139–153, 2003. [9] J. Kozloski, F. Hamzei-Sichani, and R. Yuste, “Stereotyped position of local synaptic targets in neocortex,” Science, vol. 293, no. 5531, pp. 868–872, 2001. [10] R. B. Levy and A. D. Reyes, “Spatial profile of excitatory and inhibitory synaptic connectivity in mouse primary auditory cortex,” The Journal of Neuroscience, vol. 32, no. 16, pp. 5609–5619, 2012. [11] R. Perin, T. K. Berger, and H. Markram, “A synaptic organizing principle for cortical neuronal groups,” Proceedings of the National Academy of Sciences, vol. 108, no. 13, pp. 5419–5424, 2011. [12] S. Song, P. J. Sj¨ostr¨om, M. Reigl, S. Nelson, and D. B. Chklovskii, “Highly nonrandom features of synaptic connectivity in local cortical circuits.,” PLoS biology, vol. 3, p. e68, Mar. 2005. [13] E. I. George and R. E. McCulloch, “Variable selection via gibbs sampling,” Journal of the American Statistical Association, vol. 88, no. 423, pp. 881–889, 1993. [14] T. J. Mitchell and J. J. Beauchamp, “Bayesian variable selection in linear regression,” Journal of the American Statistical Association, vol. 83, no. 404, pp. 1023–1032, 1988. [15] S. Mohamed, K. A. Heller, and Z. Ghahramani, “Bayesian and l1 approaches to sparse unsupervised learning,” CoRR, vol. abs/1106.1157, 2011. [16] C. M. Bishop, Pattern Recognition and Machine Learning. Springer, 2007. [17] P. Carbonetto and M. Stephens, “Scalable variational inference for bayesian variable selection in regression, and its accuracy in genetic association studies,” Bayesian Analysis, vol. 7, no. 1, pp. 73–108, 2012. [18] M. Titsias and M. Lzaro-Gredilla, “Spike and Slab Variational Inference for Multi-Task and Multiple Kernel Learning,” in Advances in Neural Information Processing Systems 24, pp. 2339–2347, 2011. [19] Y. Dodge, V. Fedorov, and H. Wynn, eds., Optimal Design and Analysis of Experiments. North Holland, 1988. [20] D. J. C. MacKay, “Information-based objective functions for active data selection,” Neural Comput., vol. 4, pp. 590–604, July 1992. [21] L. Paninski, “Asymptotic Theory of Information-Theoretic Experimental Design,” Neural Comput., vol. 17, pp. 1480–1507, July 2005. [22] E. Arias-Castro, E. J. Cand`es, and M. A. Davenport, “On the fundamental limits of adaptive sensing,” IEEE Transactions on Information Theory, vol. 59, no. 1, pp. 472–481, 2013. [23] T. Hu, A. Leonardo, and D. Chklovskii, “Reconstruction of Sparse Circuits Using Multi-neuronal Excitation (RESCUME),” in Advances in Neural Information Processing Systems 22, pp. 790–798, 2009. [24] S. Ji and L. Carin, “Bayesian compressive sensing and projection optimization,” in Proceedings of the 24th international conference on Machine learning, ICML ’07, (New York, NY, USA), pp. 377–384, ACM, 2007. [25] M. Malloy and R. D. Nowak, “Near-optimal adaptive compressed sensing,” CoRR, vol. abs/1306.6239, 2013. 9
2013
24
4,976
Moment-based Uniform Deviation Bounds for k-means and Friends Matus Telgarsky Sanjoy Dasgupta Computer Science and Engineering, UC San Diego {mtelgars,dasgupta}@cs.ucsd.edu Abstract Suppose k centers are fit to m points by heuristically minimizing the k-means cost; what is the corresponding fit over the source distribution? This question is resolved here for distributions with p ≥4 bounded moments; in particular, the difference between the sample cost and distribution cost decays with m and p as mmin{−1/4,−1/2+2/p}. The essential technical contribution is a mechanism to uniformly control deviations in the face of unbounded parameter sets, cost functions, and source distributions. To further demonstrate this mechanism, a soft clustering variant of k-means cost is also considered, namely the log likelihood of a Gaussian mixture, subject to the constraint that all covariance matrices have bounded spectrum. Lastly, a rate with refined constants is provided for k-means instances possessing some cluster structure. 1 Introduction Suppose a set of k centers {pi}k i=1 is selected by approximate minimization of k-means cost; how does the fit over the sample compare with the fit over the distribution? Concretely: given m points sampled from a source distribution ρ, what can be said about the quantities 1 m m X j=1 min i ∥xj −pi∥2 2 − Z min i ∥x −pi∥2 2dρ(x) (k-means), (1.1) 1 m m X j=1 ln k X i=1 αipθi(xj) ! − Z ln k X i=1 αipθi(x) ! dρ(x) (soft k-means), (1.2) where each pθi denotes the density of a Gaussian with a covariance matrix whose eigenvalues lie in some closed positive interval. The literature offers a wealth of information related to this question. For k-means, there is firstly a consistency result: under some identifiability conditions, the global minimizer over the sample will converge to the global minimizer over the distribution as the sample size m increases [1]. Furthermore, if the distribution is bounded, standard tools can provide deviation inequalities [2, 3, 4]. For the second problem, which is maximum likelihood of a Gaussian mixture (thus amenable to EM [5]), classical results regarding the consistency of maximum likelihood again provide that, under some identifiability conditions, the optimal solutions over the sample converge to the optimum over the distribution [6]. The task here is thus: to provide finite sample guarantees for these problems, but eschewing boundedness, subgaussianity, and similar assumptions in favor of moment assumptions. 1 1.1 Contribution The results here are of the following form: given m examples from a distribution with a few bounded moments, and any set of parameters beating some fixed cost c, the corresponding deviations in cost (as in eq. (1.1) and eq. (1.2)) approach O(m−1/2) with the availability of higher moments. • In the case of k-means (cf. Corollary 3.1), p ≥4 moments suffice, and the rate is O(mmin{−1/4,−1/2+2/p}). For Gaussian mixtures (cf. Theorem 5.1), p ≥8 moments suffice, and the rate is O(m−1/2+3/p). • The parameter c allows these guarantees to hold for heuristics. For instance, suppose k centers are output by Lloyd’s method. While Lloyd’s method carries no optimality guarantees, the results here hold for the output of Lloyd’s method simply by setting c to be the variance of the data, equivalently the k-means cost with a single center placed at the mean. • The k-means and Gaussian mixture costs are only well-defined when the source distribution has p ≥2 moments. The condition of p ≥4 moments, meaning the variance has a variance, allows consideration of many heavy-tailed distributions, which are ruled out by boundedness and subgaussianity assumptions. The main technical byproduct of the proof is a mechanism to deal with the unboundedness of the cost function; this technique will be detailed in Section 3, but the difficulty and its resolution can be easily sketched here. For a single set of centers P, the deviations in eq. (1.1) may be controlled with an application of Chebyshev’s inequality. But this does not immediately grant deviation bounds on another set of centers P ′, even if P and P ′ are very close: for instance, the difference between the two costs will grow as successively farther and farther away points are considered. The resolution is to simply note that there is so little probability mass in those far reaches that the cost there is irrelevant. Consider a single center p (and assume x 7→∥x −p∥2 2 is integrable); the dominated convergence theorem grants Z Bi ∥x −p∥2 2dρ(x) → Z ∥x −p∥2 2dρ(x), where Bi := {x ∈Rd : ∥x −p∥2 ≤i}. In other words, a ball Bi may be chosen so that R Bc i ∥x −p∥2 2dρ(x) ≤1/1024. Now consider some p′ with ∥p −p′∥2 ≤i. Then Z Bc i ∥x −p′∥2 2dρ(x) ≤ Z Bc i (∥x −p∥2 + ∥p −p′∥2)2dρ(x) ≤4 Z Bc i ∥x −p∥2 2dρ(x) ≤ 1 256. In this way, a single center may control the outer deviations of whole swaths of other centers. Indeed, those choices outperforming the reference score c will provide a suitable swath. Of course, it would be nice to get a sense of the size of Bi; this however is provided by the moment assumptions. The general strategy is thus to split consideration into outer deviations, and local deviations. The local deviations may be controlled by standard techniques. To control outer deviations, a single pair of dominating costs — a lower bound and an upper bound — is controlled. This technique can be found in the proof of the consistency of k-means due to Pollard [1]. The present work shows it can also provide finite sample guarantees, and moreover be applied outside hard clustering. The content here is organized as follows. The remainder of the introduction surveys related work, and subsequently Section 2 establishes some basic notation. The core deviation technique, termed outer bracketing (to connect it to the bracketing technique from empirical process theory), is presented along with the deviations of k-means in Section 3. The technique is then applied in Section 5 to a soft clustering variant, namely log likelihood of Gaussian mixtures having bounded spectra. As a reprieve between these two heavier bracketing sections, Section 4 provides a simple refinement for k-means which can adapt to cluster structure. All proofs are deferred to the appendices, however the construction and application of outer brackets is sketched in the text. 2 1.2 Related Work As referenced earlier, Pollard’s work deserves special mention, both since it can be seen as the origin of the outer bracketing technique, and since it handled k-means under similarly slight assumptions (just two moments, rather than the four here) [1, 7]. The present work hopes to be a spiritual successor, providing finite sample guarantees, and adapting technique to a soft clustering problem. In the machine learning community, statistical guarantees for clustering have been extensively studied under the topic of clustering stability [4, 8, 9, 10]. One formulation of stability is: if parameters are learned over two samples, how close are they? The technical component of these works frequently involves finite sample guarantees, which in the works listed here make a boundedness assumption, or something similar (for instance, the work of Shamir and Tishby [9] requires the cost function to satisfy a bounded differences condition). Amongst these finite sample guarantees, the finite sample guarantees due to Rakhlin and Caponnetto [4] are similar to the development here after the invocation of the outer bracket: namely, a covering argument controls deviations over a bounded set. The results of Shamir and Tishby [10] do not make a boundedness assumption, but the main results are not finite sample guarantees; in particular, they rely on asymptotic results due to Pollard [7]. There are many standard tools which may be applied to the problems here, particularly if a boundedness assumption is made [11, 12]; for instance, Lugosi and Zeger [2] use tools from VC theory to handle k-means in the bounded case. Another interesting work, by Ben-david [3], develops specialized tools to measure the complexity of certain clustering problems; when applied to the problems of the type considered here, a boundedness assumption is made. A few of the above works provide some negative results and related commentary on the topic of uniform deviations for distributions with unbounded support [10, Theorem 3 and subsequent discussion] [3, Page 5 above Definition 2]. The primary “loophole” here is to constrain consideration to those solutions beating some reference score c. It is reasonable to guess that such a condition entails that a few centers must lie near the bulk of the distribution’s mass; making this guess rigorous is the first step here both for k-means and for Gaussian mixtures, and moreover the same consequence was used by Pollard for the consistency of k-means [1]. In Pollard’s work, only optimal choices were considered, but the same argument relaxes to arbitrary c, which can thus encapsulate heuristic schemes, and not just nearly optimal ones. (The secondary loophole is to make moment assumptions; these sufficiently constrain the structure of the distribution to provide rates.) In recent years, the empirical process theory community has produced a large body of work on the topic of maximum likelihood (see for instance the excellent overviews and recent work of Wellner [13], van der Vaart and Wellner [14], Gao and Wellner [15]). As stated previously, the choice of the term “bracket” is to connect to empirical process theory. Loosely stated, a bracket is simply a pair of functions which sandwich some set of functions; the bracketing entropy is then (the logarithm of) the number of brackets needed to control a particular set of functions. In the present work, brackets are paired with sets which identify the far away regions they are meant to control; furthermore, while there is potential for the use of many outer brackets, the approach here is able to make use of just a single outer bracket. The name bracket is suitable, as opposed to cover, since the bracketing elements need not be members of the function class being dominated. (By contrast, Pollard’s use in the proof of the consistency of k-means was more akin to covering, in that remote fluctuations were compared to that of a a single center placed at the origin [1].) 2 Notation The ambient space will always be the Euclidean space Rd, though a few results will be stated for a general domain X. The source probability measure will be ρ, and when a finite sample of size m is available, ˆρ is the corresponding empirical measure. Occasionally, the variable ν will refer to an arbitrary probability measure (where ρ and ˆρ will serve as relevant instantiations). Both integral and expectation notation will be used; for example, E(f(X)) = Eρ(f(X) = R f(x)dρ(x); for integrals, R B f(x)dρ(x) = R f(x)1[x ∈B]dρ(x), where 1 is the indicator function. The moments of ρ are defined as follows. Definition 2.1. Probability measure ρ has order-p moment bound M with respect to norm ∥·∥when Eρ∥X −Eρ(X)∥l ≤M for 1 ≤l ≤p. 3 For example, the typical setting of k-means uses norm ∥·∥2, and at least two moments are needed for the cost over ρ to be finite; the condition here of needing 4 moments can be seen as naturally arising via Chebyshev’s inequality. Of course, the availability of higher moments is beneficial, dropping the rates here from m−1/4 down to m−1/2. Note that the basic controls derived from moments, which are primarily elaborations of Chebyshev’s inequality, can be found in Appendix A. The k-means analysis will generalize slightly beyond the single-center cost x 7→∥x −p∥2 2 via Bregman divergences [16, 17]. Definition 2.2. Given a convex differentiable function f : X →R, the corresponding Bregman divergence is Bf(x, y) := f(x) −f(y) −⟨∇f(y), x −y⟩. Not all Bregman divergences are handled; rather, the following regularity conditions will be placed on the convex function. Definition 2.3. A convex differentiable function f is strongly convex with modulus r1 and has Lipschitz gradients with constant r2, both respect to some norm ∥· ∥, when f (respectively) satisfies f(αx + (1 −α)y) ≤αf(x) + (1 −α)f(y) −r1α(1 −α) 2 ∥x −y∥2, ∥∇f(x) −∇f(y)∥∗≤r2∥x −y∥, where x, y ∈X, α ∈[0, 1], and ∥· ∥∗is the dual of ∥· ∥. (The Lipschitz gradient condition is sometimes called strong smoothness.) These conditions are a fancy way of saying the corresponding Bregman divergence is sandwiched between two quadratics (cf. Lemma B.1). Definition 2.4. Given a convex differentiable function f : Rd →R which is strongly convex and has Lipschitz gradients with respective constants r1, r2 with respect to norm ∥· ∥, the hard k-means cost of a single point x according to a set of centers P is φf(x; P) := min p∈P Bf(x, p). The corresponding k-means cost of a set of points (or distribution) is thus computed as Eν(φf(X; P)), and let Hf(ν; c, k) denote all sets of at most k centers beating cost c, meaning Hf(ν; c, k) := {P : |P| ≤k, Eν(φf(X; P)) ≤c}. For example, choosing norm ∥· ∥2 and convex function f(x) = ∥x∥2 2 (which has r1 = r2 = 2), the corresponding Bregman divergence is Bf(x, y) = ∥x −y∥2 2, and Eˆρ(φf(X; P)) denotes the vanilla k-means cost of some finite point set encoded in the empirical measure ˆρ. The hard clustering guarantees will work with Hf(ν; c, k), where ν can be either the source distribution ρ, or its empirical counterpart ˆρ. As discussed previously, it is reasonable to set c to simply the sample variance of the data, or a related estimate of the true variance (cf. Appendix A). Lastly, the class of Gaussian mixture penalties is as follows. Definition 2.5. Given Gaussian parameters θ := (µ, Σ), let pθ denote Gaussian density pθ(x) = 1 p (2π)d|Σi| exp  −1 2(x −µi)T Σ−1 i (x −µi)  . Given Gaussian mixture parameters (α, Θ) = ({αi}k i=1, {θi}k i=1) with α ≥0 and P i αi = 1 (written α ∈∆), the Gaussian mixture cost at a point x is φg(x; (α, Θ)) := φg(x; {(αi, θi) = (αi, µi, Σi)}k i=1) := ln k X i=1 αipθi(x) ! , Lastly, given a measure ν, bound k on the number of mixture parameters, and spectrum bounds 0 < σ1 ≤σ2, let Smog(ν; c, k, σ1, σ2) denote those mixture parameters beating cost c, meaning Smog(ν; c, k, σ1, σ2) := {(α, Θ) : σ1I ⪯Σi ⪯σ2I, |α| ≤k, α ∈∆, Eν (φg(X; (α, Θ))) ≤c} . While a condition of the form Σ ⪰σ1I is typically enforced in practice (say, with a Bayesian prior, or by ignoring updates which shrink the covariance beyond this point), the condition Σ ⪯σ2I is potentially violated. These conditions will be discussed further in Section 5. 4 3 Controlling k-means with an Outer Bracket First consider the special case of k-means cost. Corollary 3.1. Set f(x) := ∥x∥2 2, whereby φf is the k-means cost. Let real c ≥0 and probability measure ρ be given with order-p moment bound M with respect to ∥· ∥2, where p ≥4 is a positive multiple of 4. Define the quantities c1 := (2M)1/p + √ 2c, M1 := M 1/(p−2) + M 2/p, N1 := 2 + 576d(c1 + c2 1 + M1 + M 2 1 ). Then with probability at least 1 −3δ over the draw of a sample of size m ≥ max{(p/(2p/4+2e))2, 9 ln(1/δ)}, every set of centers P ∈Hf(ˆρ; c, k) ∪Hf(ρ; c, k) satisfies Z φf(x; P)dρ(x) − Z φf(x; P)dˆρ(x) ≤m−1/2+min{1/4,2/p} 4 + (72c2 1 + 32M 2 1 ) s 1 2 ln (mN1)dk δ  + r 2p/4ep 8m1/2 2 δ 4/p! . One artifact of the moment approach (cf. Appendix A), heretofore ignored, is the term (2/δ)4/p. While this may seem inferior to ln(2/δ), note that the choice p = 4 ln(2/δ)/ ln(ln(2/δ)) suffices to make the two equal. Next consider a general bound for Bregman divergences. This bound has a few more parameters than Corollary 3.1. In particular, the term ϵ, which is instantiated to m−1/2+1/p in the proof of Corollary 3.1, catches the mass of points discarded due to the outer bracket, as well as the resolution of the (inner) cover. The parameter p′, which controls the tradeoff between m and 1/δ, is set to p/4 in the proof of Corollary 3.1. Theorem 3.2. Fix a reference norm ∥· ∥throughout the following. Let probability measure ρ be given with order-p moment bound M where p ≥4, a convex function f with corresponding constants r1 and r2, reals c and ϵ > 0, and integer 1 ≤p′ ≤p/2 −1 be given. Define the quantities RB := max  (2M)1/p + p 4c/r1, max i∈[p′](M/ϵ)1/(p−2i)  , RC := p r2/r1  (2M)1/p + p 4c/r1 + RB  + RB, B :=  x ∈Rd : ∥x −E(X)∥≤RB , C :=  x ∈Rd : ∥x −E(X)∥≤RC , τ := min r ϵ 2r2 , ϵ 2(RB + RC)r2  , and let N be a cover of C by ∥· ∥-balls with radius τ; in the case that ∥· ∥is an lp norm, the size of this cover has bound |N| ≤  1 + 2RCd τ d . Then with probability at least 1 −3δ over the draw of a sample of size m ≥ max{p′/(e2p′ϵ), 9 ln(1/δ)}, every set of centers P ∈Hf(ρ; c, k) ∪Hf(ˆρ; c, k) satisfies Z φf(x; P)dρ(x) − Z φf(x; P)dˆρ(x) ≤4ϵ+4r2R2 C s 1 2m ln 2|N|k δ  + r e2p′ϵp′ 2m 2 δ 1/p′ . 3.1 Compactification via Outer Brackets The outer bracket is defined as follows. Definition 3.3. An outer bracket for probability measure ν at scale ϵ consists of two triples, one each for lower and upper bounds. 5 1. The function ℓ, function class Zℓ, and set Bℓsatisfy two conditions: if x ∈Bc ℓand φ ∈Zℓ, then ℓ(x) ≤φ(x), and secondly | R Bc ℓℓ(x)dν(x)| ≤ϵ. 2. Similarly, function u, function class Zu, and set Bu satisfy: if x ∈Bc u and φ ∈Zu, then u(x) ≥φ(x), and secondly | R Bcu u(x)dν(x)| ≤ϵ. Direct from the definition, given bracketing functions (ℓ, u), a bracketed function φf(·; P), and the bracketing set B := Bu ∪Bℓ, −ϵ ≤ Z Bc ℓ(x)dν(x) ≤ Z Bc φf(x; P)dν(x) ≤ Z Bc u(x)dν(x) ≤ϵ; (3.4) in other words, as intended, this mechanism allows deviations on Bc to be discarded. Thus to uniformly control the deviations of the dominated functions Z := Zu ∪Zℓover the set Bc, it suffices to simply control the deviations of the pair (ℓ, u). The following lemma shows that a bracket exists for {φf(·; P) : P ∈Hf(ν; c, k)} and compact B, and moreover that this allows sampled points and candidate centers in far reaches to be deleted. Lemma 3.5. Consider the setting and definitions in Theorem 3.2, but additionally define M ′ := 2p′ϵ, ℓ(x) := 0, u(x) := 4r2∥x −E(X)∥2, ϵˆρ := ϵ + r M ′ep′ 2m 2 δ 1/p′ . The following statements hold with probability at least 1 −2δ over a draw of size m ≥ max{p′/(M ′e), 9 ln(1/δ)}. 1. (u, ℓ) is an outer bracket for ρ at scale ϵρ := ϵ with sets Bℓ= Bu = B and Zℓ= Zu = {φf(·; P) : P ∈Hf(ˆρ; c, k)∪Hf(ρ; c, k)}, and furthermore the pair (u, ℓ) is also an outer bracket for ˆρ at scale ϵˆρ with the same sets. 2. For every P ∈Hf(ˆρ; c, k) ∪Hf(ρ; c, k), Z φf(x; P)dρ(x) − Z B φf(x; P ∩C)dρ(x) ≤ϵρ = ϵ. and Z φf(x; P)dˆρ(x) − Z B φf(x; P ∩C)dˆρ(x) ≤ϵˆρ. The proof of Lemma 3.5 has roughly the following outline. 1. Pick some ball B0 which has probability mass at least 1/4. It is not possible for an element of Hf(ˆρ; c, k) ∪Hf(ρ; c, k) to have all centers far from B0, since otherwise the cost is larger than c. (Concretely, “far from” means at least p 4c/r1 away; note that this term appears in the definitions of B and C in Theorem 3.2.) Consequently, at least one center lies near to B0; this reasoning was also the first step in the k-means consistency proof due to k-means Pollard [1]. 2. It is now easy to dominate P ∈Hf(ˆρ; c, k) ∪Hf(ρ; c, k) far away from B0. In particular, choose any p0 ∈B0 ∩P, which was guaranteed to exist in the preceding point; since minp∈P Bf(x, p) ≤Bf(x, p0) holds for all x, it suffices to dominate p0. This domination proceeds exactly as discussed in the introduction; in fact, the factor 4 appeared there, and again appears in the u here, for exactly the same reason. Once again, similar reasoning can be found in the proof by Pollard [1]. 3. Satisfying the integral conditions over ρ is easy: it suffices to make B huge. To control the size of B0, as well as the size of B, and moreover the deviations of the bracket over B, the moment tools from Appendix A are used. Now turning consideration back to the proof of Theorem 3.2, the above bracketing allows the removal of points and centers outside of a compact set (in particular, the pair of compact sets B and C, respectively). On the remaining truncated data and set of centers, any standard tool suffices; for mathematical convenience, and also to fit well with the use of norms in the definition of moments as well as the conditions on the convex function f providing the divergence Bf, norm structure used throughout the other properties, covering arguments are used here. (For details, please see Appendix B.) 6 4 Interlude: Refined Estimates via Clamping So far, rates have been given that guarantee uniform convergence when the distribution has a few moments, and these rates improve with the availability of higher moments. These moment conditions, however, do not necessarily reflect any natural cluster structure in the source distribution. The purpose of this section is to propose and analyze another distributional property which is intended to capture cluster structure. To this end, consider the following definition. Definition 4.1. Real number R and compact set C are a clamp for probability measure ν and family of centers Z and cost φf at scale ϵ > 0 if every P ∈Z satisfies |Eν(φf(X; P)) −Eν (min {φf(X; P ∩C) , R})| ≤ϵ. Note that this definition is similar to the second part of the outer bracket guarantee in Lemma 3.5, and, predictably enough, will soon lead to another deviation bound. Example 4.2. If the distribution has bounded support, then choosing a clamping value R and clamping set C respectively slightly larger than the support size and set is sufficient: as was reasoned in the construction of outer brackets, if no centers are close to the support, then the cost is bad. Correspondingly, the clamped set of functions Z should again be choices of centers whose cost is not too high. For a more interesting example, suppose ρ is supported on k small balls of radius R1, where the distance between their respective centers is some R2 ≫R1. Then by reasoning similar to the bounded case, all choices of centers achieving a good cost will place centers near to each ball, and thus the clamping value can be taken closer to R1. ■ Of course, the above gave the existence of clamps under favorable conditions. The following shows that outer brackets can be used to show the existence of clamps in general. In fact, the proof is very short, and follows the scheme laid out in the bounded example above: outer bracketing allows the restriction of consideration to a bounded set, and some algebra from there gives a conservative upper bound for the clamping value. Proposition 4.3. Suppose the setting and definitions of Lemma 3.5, and additionally define R := 2((2M)2/p + R2 B). Then (C, R) is a clamp for measure ρ and center Hf(ρ; c, k) at scale ϵ, and with probability at least 1 −3δ over a draw of size m ≥max{p′/(M ′e), 9 ln(1/δ)}, it is also a clamp for ˆρ and centers Hf(ˆρ; c, k) at scale ϵˆρ. The general guarantee using clamps is as follows. The proof is almost the same as for Theorem 3.2, but note that this statement is not used quite as readily, since it first requires the construction of clamps. Theorem 4.4. Fix a norm ∥· ∥. Let (R, C) be a clamp for probability measure ρ and empirical counterpart ˆρ over some center class Z and cost φf at respective scales ϵρ and ϵˆρ, where f has corresponding convexity constants r1 and r2. Suppose C is contained within a ball of radius RC, let ϵ > 0 be given, define scale parameter τ := min r ϵ 2r2 , r1ϵ 2r2R3  , and let N be a cover of C by ∥· ∥-balls of radius τ (as per lemma B.4, if ∥· ∥is an lp norm, then |N| ≤(1 + (2RCd)/τ)d suffices). Then with probability at least 1 −δ over the draw of a sample of size m ≥p′/(M ′e), every set of centers P ∈Z satisfies Z φf(x; P)dρ(x) − Z φf(x; P)dˆρ(x) ≤2ϵ + ϵρ + ϵˆρ + R2 s 1 2m ln 2|N|k δ  . Before adjourning this section, note that clamps and outer brackets disagree on the treatment of the outer regions: the former replaces the cost there with the fixed value R, whereas the latter uses the value 0. On the technical side, this is necessitated by the covering argument used to produce the final theorem: if the clamping operation instead truncated beyond a ball of radius R centered at each p ∈P, then the deviations would be wild as these balls moved and suddenly switched the value at a point from 0 to something large. This is not a problem with outer bracketing, since the same points (namely Bc) are ignored by every set of centers. 7 5 Mixtures of Gaussians Before turning to the deviation bound, it is a good place to discuss the condition σ1I ⪯Σ ⪯σ2I, which must be met by every covariance matrix of every constituent Gaussian in a mixture. The lower bound σ1I ⪯Σ, as discussed previously, is fairly common in practice, arising either via a Bayesian prior, or by implementing EM with an explicit condition that covariance updates are discarded when the eigenvalues fall below some threshold. In the analysis here, this lower bound is used to rule out two kinds of bad behavior. 1. Given a budget of at least 2 Gaussians, and a sample of at least 2 distinct points, arbitrarily large likelihood may be achieved by devoting one Gaussian to one point, and shrinking its covariance. This issue destroys convergence properties of maximum likelihood, since the likelihood score may be arbitrarily large over every sample, but is finite for well-behaved distributions. The condition σ1I ⪯Σ rules this out. 2. Another phenomenon is a “flat” Gaussian, meaning a Gaussian whose density is high along a lower dimensional manifold, but small elsewhere. Concretely, consider a Gaussian over R2 with covariance Σ = diag(σ, σ−1); as σ decreases, the Gaussian has large density on a line, but low density elsewhere. This phenomenon is distinct from the preceding in that it does not produce arbitrarily large likelihood scores over finite samples. The condition σ1I ⪯Σ rules this situation out as well. In both the hard and soft clustering analyses here, a crucial early step allows the assertion that good scores in some region mean the relevant parameter is nearby. For the case of Gaussians, the condition σ1I ⪯Σ makes this problem manageable, but there is still the possibility that some far away, fairly uniform Gaussian has reasonable density. This case is ruled out here via σ2I ⪰Σ. Theorem 5.1. Let probability measure ρ be given with order-p moment bound M according to norm ∥· ∥2 where p ≥8 is a positive multiple of 4, covariance bounds 0 < σ1 ≤σ2 with σ1 ≤1 for simplicity, and real c ≤1/2 be given. Then with probability at least 1 −5δ over the draw of a sample of size m ≥max  (p/(2p/4+2e))2, 8 ln(1/δ), d2 ln(πσ2)2 ln(1/δ) , every set of Gaussian mixture parameters (α, Θ) ∈Smog(ˆρ; c, k, σ1, σ2) ∪Smog(ρ; c, k, σ1, σ2) satisfies Z φg(x; (α, Θ))dρ(x) − Z φg(x; (α, Θ))dˆρ(x) = O  m−1/2+3/p  1 + p ln(m) + ln(1/δ) + (1/δ)4/p , where the O(·) drops numerical constants, polynomial terms depending on c, M, d, and k, σ2/σ1, and ln(σ2/σ1), but in particular has no sample-dependent quantities. The proof follows the scheme of the hard clustering analysis. One distinction is that the outer bracket now uses both components; the upper component is the log of the largest possible density — indeed, it is ln((2πσ1)−d/2) — whereas the lower component is a function mimicking the log density of the steepest possible Gaussian — concretely, the lower bracket’s definition contains the expression ln((2πσ2)−d/2) −2∥x −Eρ(X)∥2 2/σ1, which lacks the normalization of a proper Gaussian, highlighting the fact that bracketing elements need not be elements of the class. Superficially, a second distinction with the hard clustering case is that far away Gaussians can not be entirely ignored on local regions; the influence is limited, however, and the analysis proceeds similarly in each case. Acknowledgments The authors thank the NSF for supporting this work under grant IIS-1162581. 8 References [1] David Pollard. Strong consistency of k-means clustering. The Annals of Statistics, 9(1):135– 140, 1981. [2] Gbor Lugosi and Kenneth Zeger. Rates of convergence in the source coding theorem, in empirical quantizer design, and in universal lossy source coding. IEEE Trans. Inform. Theory, 40: 1728–1740, 1994. [3] Shai Ben-david. A framework for statistical clustering with a constant time approximation algorithms for k-median clustering. In COLT, pages 415–426. Springer, 2004. [4] Alexander Rakhlin and Andrea Caponnetto. Stability of k-means clustering. In NIPS, pages 1121–1128, 2006. [5] Richard O. Duda, Peter E. Hart, and David G. Stork. Pattern Classification. Wiley, 2 edition, 2001. [6] Thomas S. Ferguson. A course in large sample theory. Chapman & Hall, 1996. [7] David Pollard. A central limit theorem for k-means clustering. The Annals of Probability, 10 (4):919–926, 1982. [8] Shai Ben-david, Ulrike Von Luxburg, and D´avid P´al. A sober look at clustering stability. In In COLT, pages 5–19. Springer, 2006. [9] Ohad Shamir and Naftali Tishby. Cluster stability for finite samples. In Annals of Probability, 10(4), pages 919–926, 1982. [10] Ohad Shamir and Naftali Tishby. Model selection and stability in k-means clustering. In COLT, 2008. [11] St´ephane Boucheron, Olivier Bousquet, and G´abor Lugosi. Theory of classification: a survey of recent advances. ESAIM: Probability and Statistics, 9:323–375, 2005. [12] St´ephane Boucheron, G´abor Lugosi, and Pascal Massart. Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford, 2013. [13] Jon Wellner. Consistency and rates of convergence for maximum likelihood estimators via empirical process theory. 2005. [14] Aad van der Vaart and Jon Wellner. Weak Convergence and Empirical Processes. Springer, 1996. [15] FuChang Gao and Jon A. Wellner. On the rate of convergence of the maximum likelihood estimator of a k-monotone density. Science in China Series A: Mathematics, 52(7):1525–1538, 2009. [16] Yair Al Censor and Stavros A. Zenios. Parallel Optimization: Theory, Algorithms and Applications. Oxford University Press, 1997. [17] Arindam Banerjee, Srujana Merugu, Inderjit S. Dhillon, and Joydeep Ghosh. Clustering with Bregman divergences. Journal of Machine Learning Research, 6:1705–1749, 2005. [18] Terence Tao. 254a notes 1: Concentration of measure, January 2010. URL http://terrytao.wordpress.com/2010/01/03/ 254a-notes-1-concentration-of-measure/. [19] I. F. Pinelis and S. A. Utev. Estimates of the moments of sums of independent random variables. Teor. Veroyatnost. i Primenen., 29(3):554–557, 1984. Translation to English by Bernard Seckler. [20] Shai Shalev-Shwartz. Online Learning: Theory, Algorithms, and Applications. PhD thesis, The Hebrew University of Jerusalem, July 2007. [21] Jean-Baptiste Hiriart-Urruty and Claude Lemar´echal. Fundamentals of Convex Analysis. Springer Publishing Company, Incorporated, 2001. 9
2013
240
4,977
Convex Calibrated Surrogates for Low-Rank Loss Matrices with Applications to Subset Ranking Losses Harish G. Ramaswamy Computer Science & Automation Indian Institute of Science harish gurup@csa.iisc.ernet.in Shivani Agarwal Computer Science & Automation Indian Institute of Science shivani@csa.iisc.ernet.in Ambuj Tewari Statistics and EECS University of Michigan tewaria@umich.edu Abstract The design of convex, calibrated surrogate losses, whose minimization entails consistency with respect to a desired target loss, is an important concept to have emerged in the theory of machine learning in recent years. We give an explicit construction of a convex least-squares type surrogate loss that can be designed to be calibrated for any multiclass learning problem for which the target loss matrix has a low-rank structure; the surrogate loss operates on a surrogate target space of dimension at most the rank of the target loss. We use this result to design convex calibrated surrogates for a variety of subset ranking problems, with target losses including the precision@q, expected rank utility, mean average precision, and pairwise disagreement. 1 Introduction There has been much interest in recent years in understanding consistency properties of learning algorithms – particularly algorithms that minimize a surrogate loss – for a variety of finite-output learning problems, including binary classification, multiclass classification, multi-label classification, subset ranking, and others [1–17]. For algorithms minimizing a surrogate loss, the question of consistency reduces to the question of calibration of the surrogate loss with respect to the target loss of interest [5–7, 16]; in general, one is interested in convex surrogates that can be minimized efficiently. In particular, the existence (and lack thereof) of convex calibrated surrogates for various subset ranking problems, with target losses including for example the discounted cumulative gain (DCG), mean average precision (MAP), mean reciprocal rank (MRR), and pairwise disagreement (PD), has received significant attention recently [9,11–13,15–17]. In this paper, we develop a general result which allows us to give an explicit convex, calibrated surrogate defined on a low-dimensional surrogate space for any finite-output learning problem for which the loss matrix has low rank. Recently, Ramaswamy and Agarwal [16] showed the existence of such surrogates, but their result involved an unwieldy surrogate space, and moreover did not give an explicit, usable construction for the mapping needed to transform predictions in the surrogate space back to the original prediction space. Working in the same general setting as theirs, we give an explicit construction that leads to a simple least-squares type surrogate. We then apply this result to obtain several new results related to subset ranking. Specifically, we first obtain calibrated, score-based surrogates for the Precision@q loss, which includes the winner-take-all (WTA) loss as a special case, and the expected rank utility (ERU) loss; to the best of our knowledge, consistency with respect to these losses has not been studied previously in the literature. When there are r documents to be ranked for each query, the score-based surrogates operate on an r-dimensional surrogate space. We then turn to the MAP and PD losses, which are both widely used in practice, and for which it has been shown that no convex score-based surrogate can be calibrated for all probability distributions [11,15,16]. For the PD loss, Duchi et al. [11] gave certain low-noise conditions on the probability distribution under which a convex, calibrated score-based surrogate could be designed; 1 we are unaware of such a result for the MAP loss. A straightforward application of our low-rank result to these losses yields convex calibrated surrogates defined on O(r2)-dimensional surrogate spaces, but in both cases, the mapping needed to transform back to predictions in the original space involves solving a computationally hard problem. Inspired by these surrogates, we then give a convex score-based surrogate with an efficient mapping that is calibrated with respect to MAP under certain conditions on the probability distribution; this is the first such result for the MAP loss that we are aware of. We also give a family of convex score-based surrogates calibrated with the PD loss under certain noise conditions, generalizing the surrogate and conditions of Duchi et al. [11]. Finally, we give an efficient mapping for the O(r2)-dimensional surrogate for the PD loss, and show that this leads to a convex surrogate calibrated with the PD loss under a more general condition, i.e. over a larger set of probability distributions, than those associated with the score-based surrogates. Paper outline. We start with some preliminaries and background in Section 2. Section 3 gives our primary result, namely an explicit convex surrogate calibrated for low-rank loss matrices, defined on a surrogate space of dimension at most the rank of the matrix. Sections 4–7 then give applications of this result to the Precision@q, ERU, MAP, and PD losses, respectively. All proofs not included in the main text can be found in the appendix. 2 Preliminaries and Background Setup. We work in the same general setting as that of Ramaswamy and Agarwal [16]. There is an instance space X, a finite set of class labels Y = [n] = {1, . . . , n}, and a finite set of target labels (possible predictions) T = [k] = {1, . . . , k}. Given training examples (X1, Y1), . . . , (Xm, Ym) drawn i.i.d. from a distribution D on X ×Y, the goal is to learn a prediction model h : X→T . Often, T = Y, but this is not always the case (for example, in the subset ranking problems we consider, the labels in Y are typically relevance vectors or preference graphs over a set of r documents, while the target labels in T are permutations over the r documents). The performance of a prediction model h : X→T is measured via a loss function  : Y × T →R+ (where R+ = [0, ∞)); here (y, t) denotes the loss incurred on predicting t ∈T when the label is y ∈Y. Specifically, the goal is to learn a model h with low expected loss or -error er D[h] = E(X,Y )∼D[(Y, h(X))]; ideally, one wants the -error of the learned model to be close to the optimal -error er,∗ D = infh:X→T er D[h]. An algorithm which when given a random training sample as above produces a (random) model hm : X→T is said to be consistent w.r.t.  if the -error of the learned model hm converges in probability to the optimal: er D[hm] P−→er,∗ D .1 Typically, minimizing the discrete -error directly is computationally difficult; therefore one uses instead a surrogate loss function ψ : Y × Rd→¯R+ (where ¯R+ = [0, ∞]), defined on the continuous surrogate target space Rd for some d ∈Z+ instead of the discrete target space T , and learns a model f : X→Rd by minimizing (approximately, based on the training sample) the ψ-error erψ D[f] = E(X,Y )∼D[ψ(Y, f(X))]. Predictions on new instances x ∈X are then made by applying the learned model f and mapping back to predictions in the target space T via some mapping pred : Rd→T , giving h(x) = pred(f(x)). Under suitable conditions, algorithms that approximately minimize the ψ-error based on a training sample are known to be consistent with respect to ψ, i.e. to converge in probability to the optimal ψ-error erψ,∗ D = inff:X→Rd erψ D[f]. A desirable property of ψ is that it be calibrated w.r.t. , in which case consistency w.r.t. ψ also guarantees consistency w.r.t. ; we give a formal definition of calibration and statement of this result below. In what follows, we will denote by Δn the probability simplex in Rn: Δn = {p ∈Rn + :  i pi = 1}. For z ∈R, let (z)+ = max(z, 0). We will find it convenient to view the loss function  : Y×T →R+ as an n × k matrix with elements yt = (y, t) for y ∈[n], t ∈[k], and column vectors t = (1t, . . . , nt) ∈Rn + for t ∈[k]. We will also represent the surrogate loss ψ : Y × Rd→¯R+ as a vector function ψ : Rd→¯Rn + with ψy(u) = ψ(y, u) for y ∈[n], u ∈Rd, and ψ(u) = (ψ1(u), . . . , ψn(u)) ∈¯Rn + for u ∈Rd. Definition 1 (Calibration). Let  : Y × T →R+ and let P ⊆Δn. A surrogate loss ψ : Y × Rd→¯R+ is said to be calibrated w.r.t.  over P if there exists a function pred : Rd→T such that ∀p ∈P : inf u∈Rd:pred(u)/∈argmintpt pψ(u) > inf u∈Rd pψ(u) . 1Here P−→denotes convergence in probability: Xm P−→a if ∀ > 0, P(|Xm −a| ≥) →0 as m →∞. 2 In this case we also say (ψ, pred) is (, P)-calibrated, or if P = Δn, simply -calibrated. Theorem 2 ( [6, 7, 16]). Let  : Y × T →R+ and ψ : Y × Rd→¯R+. Then ψ is calibrated w.r.t.  over Δn iff ∃a function pred : Rd→T such that for all distributions D on X × Y and all sequences of random (vector) functions fm : X→Rd (depending on (X1, Y1), . . . , (Xm, Ym)), erψ D[fm] P−→erψ,∗ D implies er D[pred ◦fm] P−→er,∗ D . For any instance x ∈X, let p(x) ∈Δn denote the conditional label probability vector at x, given by p(x) = (p1(x), . . . , pn(x)) where py(x) = P(Y = y | X = x). Then one can extend the above result to show that for P ⊂Δn, ψ is calibrated w.r.t.  over P iff ∃a function pred : Rd→T such that the above implication holds for all distributions D on X × Y for which p(x) ∈P ∀x ∈X. Subset ranking. Subset ranking problems arise frequently in information retrieval applications. In a subset ranking problem, each instance in X consists of a query together with a set of say r documents to be ranked. The label space Y varies from problem to problem: in some cases, labels consist of binary or multi-level relevance judgements for the r documents, in which case Y = {0, 1}r or Y = {0, 1, . . . , s}r for some appropriate s ∈Z+; in other cases, labels consist of pairwise preference graphs over the r documents, represented as (possibly weighted) directed acyclic graphs (DAGs) over r nodes. Given examples of such instance-label pairs, the goal is to learn a model to rank documents for new queries/instances; in most cases, the desired ranking takes the form of a permutation over the r documents, so that T = Sr (where Sr denotes the group of permutations on r objects). As noted earlier, various loss functions are used in practice, and there has been much interest in understanding questions of consistency and calibration for these losses in recent years [9–15, 17]. The focus so far has mostly been on designing r-dimensional surrogates, which operate on a surrogate target space of dimension d = r; these are also termed ‘score-based’ surrogates since the resulting algorithms can be viewed as learning one real-valued score function for each of the r documents, and in this case the pred mapping usually consists of simply sorting the documents according to these scores. Below we will apply our result on calibrated surrogates for low-rank loss matrices to obtain new calibrated surrogates – both r-dimensional, score-based surrogates and, in some cases, higher-dimensional surrogates – for several subset ranking losses. 3 Calibrated Surrogates for Low Rank Loss Matrices The following is the primary result of our paper. The result gives an explicit construction for a convex, calibrated, least-squares type surrogate loss defined on a low-dimensional surrogate space for any target loss matrix that has a low-rank structure. Theorem 3. Let  : Y × T →R+ be a loss function such that there exist d ∈Z+, vectors α1, . . . , αn ∈Rd, β1, . . . , βk ∈Rd and c ∈R such that (y, t) = d  i=1 αyiβti + c . Let ψ∗  : Y × Rd→¯R+ be defined as ψ∗  (y, u) = d  i=1 (ui −αyi)2 and let pred∗  : Rd→T be defined as pred∗ (u) ∈argmint∈[k]uβt . Then  ψ∗  , pred∗   is -calibrated. Proof. Let p ∈Δn. Define up ∈Rd as up i = n y=1 pyαyi ∀i ∈[d]. Now for any u ∈Rd, we have pψ∗ (u) = d  i=1 n  y=1 py(ui −αyi)2 . Minimizing this over u ∈Rd yields that up is the unique minimizer of pψ∗ (u). Also, for any t ∈[k], we have 3 pt = n  y=1 py  d  i=1 αyiβti + c  = (up)βt + c . Now, for each t ∈[k], define regret p(t) = pt −min t∈[k] pt = (up)βt −min t∈[k](up)βt . Clearly, by definition of pred∗ , we have regret p(pred∗ (up)) = 0. Also, if regret p(t) = 0 for all t ∈[k], then trivially pred∗ (u) ∈argmintpt ∀u ∈Rd (and there is nothing to prove in this case). Therefore assume ∃t ∈[k] : regret p(t) > 0, and let  = min t∈[k]:regret p(t)>0 regret p(t) . Then we have inf u∈Rd:pred∗  (u)/∈argmintpt pψ∗ (u) = inf u∈Rd:regret p(pred∗  (u))≥ pψ∗ (u) = inf u∈Rd:regret p(pred∗  (u))≥regret p(pred∗  (up))+ pψ∗ (u) . Now, we claim that the mapping u →regret p(pred∗ (u)) is continuous at u = up. To see this, suppose the sequence {um} converges to up. Then we have regret p(pred∗ (um)) = (up)βpred∗  (um) −min t∈[k](up)βt = (up −um)βpred∗  (um) + u mβpred∗  (um) −min t∈[k](up)βt = (up −um)βpred∗  (um) + min t∈[k] u mβt −min t∈[k](up)βt The last equality holds by definition of pred∗ . It is easy to see the term on the right goes to zero as um converges to up. Thus regret p(pred∗ (um)) converges to regret p(pred∗ (up)) = 0, yielding continuity at up. In particular, this implies ∃δ > 0 such that u −up < δ =⇒regret p(pred∗ (u)) −regret p(pred∗ (up)) <  . This gives inf u∈Rd:regret p(pred∗  (u))≥regret p(pred∗  (up))+ pψ∗ (u) ≥ inf u∈Rd:u−up≥δ pψ∗ (u) > inf u∈Rd pψ∗ (u) , where the last inequality holds since pψ∗ (u) is a strictly convex function of u and up is its unique minimizer. The above sequence of inequalities give us that inf u∈Rd:pred∗  (u)/∈argmintpt pψ∗ (u) > inf u∈Rd pψ∗ (u) . Since this holds for all p ∈Δn, we have that (ψ∗  , pred∗ ) is -calibrated. We note that Ramaswamy and Agarwal [16] showed a similar least-squares type surrogate calibrated for any loss  : Y × T →R+; indeed our proof technique above draws inspiration from the proof technique there. However, the surrogate they gave was defined on a surrogate space of dimension n−1, where n is the number of class labels in Y. For many practical problems, this is an intractably large number. For example, as noted above, in the subset ranking problems we consider, the number of class labels is typically exponential in r, the number of documents associated with each query. On the other hand, as we will see below, many subset ranking losses have a low-rank structure, with rank linear or quadratic in r, allowing us to use the above result to design convex calibrated surrogates on an O(r) or O(r2)-dimensional space. Ramaswamy and Agarwal also gave another result in which they showed that any loss matrix of rank d has a d-dimensional convex calibrated surrogate; however the surrogate there was defined such that it took values < ∞on an awkward space in Rd (not the full space Rd) that would be difficult to construct in practice, and moreover, their result did not yield an explicit construction for the pred mapping required to use a calibrated surrogate in practice. Our result above combines the benefits of both these previous results, allowing explicit construction of low-dimensional least-squares type surrogates for any low-rank loss matrix. The following sections will illustrate several applications of this result. 4 4 Calibrated Surrogates for Precision@q The Precision@q is a popular performance measure for subset ranking problems in information retrieval. As noted above, in a subset ranking problem, each instance in X consists of a query together with a set of r documents to be ranked. Consider a setting with binary relevance judgement labels, so that Y = {0, 1}r with n = 2r. The prediction space is T = Sr (group of permutations on r objects) with k = r!. For y ∈{0, 1}r and σ ∈Sr, where σ(i) denotes the position of document i under σ, the Precision@q loss for any integer q ∈[r] can be written as follows: P@q(y, σ) = 1 −1 q q  i=1 yσ−1(i) = 1 −1 q r  i=1 yi · 1(σ(i) ≤q) . Therefore, by Theorem 3, for the r-dimensional surrogate ψ∗ P@q : {0, 1}r × Rr→¯R+ and pred∗ P@q : Rr→Sr defined as ψ∗ P@q(y, u) = r  i=1 (ui −yi)2 pred∗ P@q(u) ∈ argmaxσ∈Sr r  i=1 ui · 1(σ(i) ≤q) , we have that (ψ∗ P@q, pred∗ P@q) is P@q-calibrated. It can easily be seen that for any u ∈Rr, any permutation σ which places the top q documents sorted in decreasing order of scores ui in the top q positions achieves the maximum in pred∗ P@q(u); thus pred∗ P@q(u) can be implemented efficiently using a standard sorting or selection algorithm. Note that the popular winner-take-all (WTA) loss, which assigns a loss of 0 if the top-ranked item is relevant (i.e. if yσ−1(1) = 1) and 1 otherwise, is simply a special case of the above loss with q = 1; therefore the above construction also yields a calibrated surrogate for the WTA loss. To our knowledge, this is the first example of convex, calibrated surrogates for the Precision@q and WTA losses. 5 Calibrated Surrogates for Expected Rank Utility The expected rank utility (ERU) is a popular subset ranking performance measure used in recommender systems displaying short ranked lists [18]. In this case the labels consist of multi-level relevance judgements (such as 0 to 5 stars), so that Y = {0, 1, . . . , s}r for some appropriate s ∈Z+ with n = (s + 1)r. The prediction space again is T = Sr with k = r!. For y ∈{0, 1, . . . , s}r and σ ∈Sr, where σ(i) denotes the position of document i under σ, the ERU loss is defined as ERU(y, σ) = z − r  i=1 max(yi −v, 0) · 2 1−σ(i) w−1 , where z is a constant to ensure the positivity of the loss, v ∈[s] is a constant that indicates a neutral score, and w ∈R is a constant indicating the viewing half-life. Thus, by Theorem 3, for the r-dimensional surrogate ψ∗ ERU : {0, 1, . . . , s}r × Rr→¯R+ and pred∗ ERU : Rr→Sr defined as ψ∗ ERU(y, u) = r  i=1 (ui −max(yi −v, 0))2 pred∗ ERU(u) ∈ argmaxσ∈Sr r  i=1 ui · 2 1−σ(i) w−1 , we have that (ψ∗ ERU, pred∗ ERU) is ERU-calibrated. It can easily be seen that for any u ∈Rr, any permutation σ satisfying the condition ui > uj =⇒σ(i) < σ(j) achieves the maximum in pred∗ ERU(u), and therefore pred∗ ERU(u) can be implemented efficiently by simply sorting the r documents in decreasing order of scores ui. As for Precision@q, to our knowledge, this is the first example of a convex, calibrated surrogate for the ERU loss. 5 6 Calibrated Surrogates for Mean Average Precision The mean average precision (MAP) is a widely used ranking performance measure in information retrieval and related applications [15,19]. As with the Precision@q loss, Y = {0, 1}r and T = Sr. For y ∈{0, 1}r and σ ∈Sr, where σ(i) denotes the position of document i under σ, the MAP loss is defined as follows: MAP(y, σ) = 1 − 1 |{γ : yγ = 1}|  i:yi=1 1 σ(i) σ(i)  j=1 yσ−1(j) . It was recently shown that there cannot exist any r-dimensional convex, calibrated surrogates for the MAP loss [15]. We now re-write the MAP loss above in a manner that allows us to show the existence of an O(r2)-dimensional convex, calibrated surrogate. In particular, we can write MAP(y, σ) = 1 − 1 r γ=1 yγ r  i=1 i  j=1 yσ−1(i)yσ−1(j) i . = 1 − 1 r γ=1 yγ r  i=1 i  j=1 yiyj max(σ(i), σ(j)) Thus, by Theorem 3, for the r(r+1) 2 -dimensional surrogate ψ∗ MAP : {0, 1}r × Rr(r+1)/2→¯R+ and pred∗ MAP : Rr(r+1)/2→Sr defined as ψ∗ MAP(y, u) = r  i=1 i  j=1  uij − yiyj r γ=1 yγ 2 pred∗ MAP(u) ∈ argmaxσ∈Sr r  i=1 i  j=1 uij · 1 max(σ(i), σ(j)) , we have that (ψ∗ MAP, pred∗ MAP) is MAP-calibrated. Note however that the optimization problem associated with computing pred∗ MAP(u) above can be written as a quadratic assignment problem (QAP), and most QAPs are known to be NP-hard. We conjecture that the QAP associated with the mapping pred∗ MAP above is also NP-hard. Therefore, while the surrogate loss ψ∗ MAP is calibrated for MAP and can be minimized efficiently over a training sample to learn a model f : X→Rr(r+1)/2, for large r, evaluating the mapping required to transform predictions in Rr(r+1)/2 back to predictions in Sr is likely to be computationally infeasible. Below we describe an alternate mapping in place of pred∗ MAP which can be computed efficiently, and show that under certain conditions on the probability distribution, the surrogate ψ∗ MAP together with this mapping is still calibrated for MAP. Specifically, define predMAP : Rr(r+1)/2→Sr as follows: predMAP(u) ∈  σ ∈Sr : uii > ujj =⇒σ(i) < σ(j)  . Clearly, predMAP(u) can be implemented efficiently by simply sorting the ‘diagonal’ elements uii for i ∈[r]. Also, let ΔY denote the probability simplex over Y, and for each p ∈ΔY, define up ∈Rr(r+1)/2 as follows: up ij = EY ∼p YiYj r γ=1 Yγ =  y∈Y py yiyj r γ=1 yγ ∀i, j ∈[r] : i ≥j . Now define Preinforce ⊂ΔY as follows: Preinforce =  p ∈ΔY : up ii ≥up jj =⇒up ii ≥up jj +  γ∈[r]\{i,j} (up jγ −up iγ)+  , where we set up ij = up ji for i < j. Then we have the following result: Theorem 4. (ψ∗ MAP, predMAP) is (MAP, Preinforce)-calibrated. The ideal predictor pred∗ MAP uses the entire u matrix, but the predictor predMAP, uses only the diagonal elements. The noise conditions Preinforce can be viewed as basically enforcing that the diagonal elements dominate and enforce a clear ordering themselves. In fact, since the mapping predMAP depends on only the diagonal elements of u, we can equivalently define an r-dimensional surrogate that is calibrated w.r.t. MAP over Preinforce. Specifically, we have the following immediate corollary: 6 Corollary 5. Let ψMAP : {0, 1}r × Rr→¯R+ and  predMAP : Rr→Sr be defined as ψMAP(y, u) = r  i=1  ui − yi r γ=1 yγ 2  predMAP( u) ∈  σ ∈Sr : ui > uj =⇒σ(i) < σ(j)  . Then ( ψMAP,  predMAP) is (MAP, Preinforce)-calibrated. Looking at the form of ψMAP and  predMAP, we can see that the function s : Y→Rr defined as si(y) = yi/(r γ=1 yr) is a ‘standardization function’ for the MAP loss over Preinforce, and therefore it follows that any ‘order-preserving surrogate’ with this standardization function is also calibrated with the MAP loss over Preinforce [13]. To our knowledge, this is the first example of conditions on the probability distribution under which a convex calibrated (and moreover, score-based) surrogate can be designed for the MAP loss. 7 Calibrated Surrogates for Pairwise Disagreement The pairwise disagreement (PD) loss is a natural and widely used loss in subset ranking [11, 17]. The label space Y here consists of a finite number of (possibly weighted) directed acyclic graphs (DAGs) over r nodes; we can represent each such label as a vector y ∈Rr(r−1) + where at least one of yij or yji is 0 for each i = j, with yij > 0 indicating a preference for document i over document j and yij denoting the weight of the preference. The prediction space as usual is T = Sr with k = r!. For y ∈Y and σ ∈Sr, where σ(i) denotes the position of document i under σ, the PD loss is defined as follows: PD(y, σ) = r  i=1  j =i yij 1  σ(i) > σ(j)  . It was recently shown that there cannot exist any r-dimensional convex, calibrated surrogates for the PD loss [15, 16]. By Theorem 3, for the r(r −1)-dimensional surrogate ψ∗ PD : Y × Rr(r−1)→¯R+ and pred∗ PD : Rr(r−1)→Sr defined as ψ∗ PD(y, u) = r  i=1  j =i (uij −yij)2 (1) pred∗ PD(u) ∈ argminσ∈Sr r  i=1  j =i uij · 1  σ(i) > σ(j)  we immediately have that (ψ∗ PD, pred∗ PD) is PD-calibrated (in fact the loss matrix PD has rank at most r(r−1) 2 , allowing for an r(r−1) 2 -dimensional surrogate; we use r(r−1) dimensions for convenience). In this case, the optimization problem associated with computing pred∗ PD(u) above is a minimum weighted feedback arc set (MWFAS) problem, which is known to be NP-hard. Therefore, as with the MAP loss, while the surrogate loss ψ∗ PD is calibrated for PD and can be minimized efficiently over a training sample to learn a model f : X→Rr(r−1), for large r, evaluating the mapping required to transform predictions in Rr(r−1) back to predictions in Sr is likely to be computationally infeasible. Below we give two sets of results. In Section 7.1, we give a family of score-based (r-dimensional) surrogates that are calibrated with the PD loss under different conditions on the probability distribution; these surrogates and conditions generalize those of Duchi et al. [11]. In Section 7.2, we give a different condition on the probability distribution under which we can actually avoid ‘difficult’ graphs being passed to pred∗ PD. This condition is more general (i.e. encompasses a larger set of probability distributions) than those associated with the score-based surrogates; this gives a new (non-score-based, r(r−1)-dimensional) surrogate with an efficiently computable pred mapping that is calibrated with the PD loss over a larger set of probability distributions than previous surrogates for this loss. 7.1 Family of r-Dimensional Surrogates Calibrated with PD Under Noise Conditions The following gives a family of score-based surrogates, parameterized by functions f : Y→Rr, that are calibrated with the PD loss under different conditions on the probability distribution: 7 Theorem 6. Let f : Y→Rr be any function that maps DAGs y ∈Y to score vectors f(y) ∈Rr. Let ψf : Y × Rr→¯R+, pred : Rr→Sr and Pf ⊂ΔY be defined as ψf(y, u) = r  i=1  ui −fi(y) 2 pred(u) ∈  σ ∈Sr : ui > uj =⇒σ(i) < σ(j)  Pf =  p ∈ΔY : EY ∼p[Yij] > EY ∼p[Yji] =⇒EY ∼p[fi(Y )] > EY ∼p[fj(Y )]  . Then (ψf, pred) is (PD, Pf)-calibrated. The noise conditions Pf state that the expected value of function f must decide the ‘right’ ordering. We note that the surrogate given by Duchi et al. [11] can be written in our notation as ψDMJ(y, u) = r  i=1  j =i yij(uj −ui) + ν r  i=1 λ(ui) , where λ is a strictly convex and 1-coercive function and ν > 0. Taking λ(z) = z2 and ν = 1 2 gives a special case of the family of score-based surrogates in Theorem 6 above obtained by taking f as fi(y) =  j =i (yij −yji) . Indeed, the set of noise conditions under which the surrogate ψDMJ is shown to be calibrated with the PD loss in Duchi et al. [11] is exactly the set Pf above with this choice of f. We also note that f can be viewed as a ‘standardization function’ [13] for the PD loss over Pf. 7.2 An O(r2)-dimensional Surrogate Calibrated with PD Under More General Conditions Consider now the r(r −1)-dimensional surrogate ψ∗ PD : Y × Rr(r−1) defined in Eq. (1). We noted the corresponding mapping pred∗ PD involved an NP-hard optimization problem. Here we give an alternate mapping predPD : Rr(r−1)→Sr that can be computed efficiently, and show that under certain conditions on the probability distribution , the surrogate ψ∗ PD together with this mapping predPD is calibrated for PD. The mapping predPD is described by Algorithm 1 below: Algorithm 1 predPD (Input: u ∈Rr(r−1); Output: Permutation σ ∈Sr) Construct a directed graph over [r] with edge (i, j) having weight (uij −uji)+. If this graph is acyclic, return any topological sorted order. If the graph has cycles, sort the edges in ascending order by weight and delete them one by one (smallest weight first) until the graph becomes acyclic; return any topological sorted order of the resulting acyclic graph. For each p ∈ΔY, define Ep = {(i, j) ∈[r] × [r] : EY ∼p[Yij] > EY ∼p[Yji]}, and define PDAG =  p ∈ΔY :  [r], Ep is a DAG  . Then we have the following result: Theorem 7. (ψ∗ PD, predPD) is (PD, PDAG)-calibrated. It is easy to see that PDAG  Pf ∀f (where Pf is as defined in Theorem 6), so that the above result yields a low-dimensional, convex surrogate with an efficiently computable pred mapping that is calibrated for the PD loss under a broader set of conditions than the previous surrogates. 8 Conclusion Calibration of surrogate losses is an important property in designing consistent learning algorithms. We have given an explicit method for constructing calibrated surrogates for any learning problem with a low-rank loss structure, and have used this to obtain several new results for subset ranking, including new calibrated surrogates for the Precision@q, ERU, MAP and PD losses. Acknowledgments The authors thank the anonymous reviewers, Aadirupa Saha and Shiv Ganesh for their comments. HGR acknowledges a Tata Consultancy Services (TCS) PhD fellowship and the Indo-US Virtual Institute for Mathematical and Statistical Sciences (VIMSS). SA thanks the Department of Science & Technology (DST) and Indo-US Science & Technology Forum (IUSSTF) for their support. AT gratefully acknowledges the support of NSF under grant IIS-1319810. 8 References [1] G´abor Lugosi and Nicolas Vayatis. On the Bayes-risk consistency of regularized boosting methods. Annals of Statistics, 32(1):30–55, 2004. [2] Wenxin Jiang. Process consistency for AdaBoost. Annals of Statistics, 32(1):13–29, 2004. [3] Tong Zhang. Statistical behavior and consistency of classification methods based on convex risk minimization. Annals of Statistics, 32(1):56–134, 2004. [4] Ingo Steinwart. Consistency of support vector machines and other regularized kernel classifiers. IEEE Transactions on Information Theory, 51(1):128–142, 2005. [5] Peter L. Bartlett, Michael Jordan, and Jon McAuliffe. Convexity, classification and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. [6] Tong Zhang. Statistical analysis of some multi-category large margin classification methods. Journal of Machine Learning Research, 5:1225–1251, 2004. [7] Ambuj Tewari and Peter L. Bartlett. On the consistency of multiclass classification methods. Journal of Machine Learning Research, 8:1007–1025, 2007. [8] Ingo Steinwart. How to compare different loss functions and their risks. Constructive Approximation, 26:225–287, 2007. [9] David Cossock and Tong Zhang. Statistical analysis of bayes optimal subset ranking. IEEE Transactions on Information Theory, 54(11):5140–5154, 2008. [10] Fen Xia, Tie-Yan Liu, Jue Wang, Wensheng Zhang, and Hang Li. Listwise approach to learning to rank: Theory and algorithm. In International Conference on Machine Learning, 2008. [11] John Duchi, Lester Mackey, and Michael Jordan. On the consistency of ranking algorithms. In International Conference on Machine Learning, 2010. [12] Pradeep Ravikumar, Ambuj Tewari, and Eunho Yang. On NDCG consistency of listwise ranking methods. In International Conference on Artificial Intelligence and Statistics, 2011. [13] David Buffoni, Cl´ement Calauz`enes, Patrick Gallinari, and Nicolas Usunier. Learning scoring functions with order-preserving losses and standardized supervision. In International Conference on Machine Learning, 2011. [14] Wei Gao and Zhi-Hua Zhou. On the consistency of multi-label learning. In Conference on Learning Theory, 2011. [15] Cl´ement Calauz`enes, Nicolas Usunier, and Patrick Gallinari. On the (non-)existence of convex, calibrated surrogate losses for ranking. In Advances in Neural Information Processing Systems 25, pages 197–205. 2012. [16] Harish G. Ramaswamy and Shivani Agarwal. Classification calibration dimension for general multiclass losses. In Advances in Neural Information Processing Systems 25, pages 2087– 2095. 2012. [17] Yanyan Lan, Jiafeng Guo, Xueqi Cheng, and Tie-Yan Liu. Statistical consistency of ranking methods in a rank-differentiable probability space. In Advances in Neural Information Processing Systems 25, pages 1241–1249. 2012. [18] Quoc V. Le and Alex Smola. Direct optimization of ranking measures, arXiv:0704.3359, 2007. [19] Yisong Yue, Thomas Finley, Filip Radlinski, and Thorsten Joachims. A support vector method for optimizing average precision. In Proceedings of the 30th ACM SIGIR International Conference on Research and Development in Information Retrieval, 2007. 9
2013
241
4,978
Auxiliary-variable Exact Hamiltonian Monte Carlo Samplers for Binary Distributions Ari Pakman and Liam Paninski Department of Statistics Center for Theoretical Neuroscience Grossman Center for the Statistics of Mind Columbia University New York, NY, 10027 Abstract We present a new approach to sample from generic binary distributions, based on an exact Hamiltonian Monte Carlo algorithm applied to a piecewise continuous augmentation of the binary distribution of interest. An extension of this idea to distributions over mixtures of binary and possibly-truncated Gaussian or exponential variables allows us to sample from posteriors of linear and probit regression models with spike-and-slab priors and truncated parameters. We illustrate the advantages of these algorithms in several examples in which they outperform the Metropolis or Gibbs samplers. 1 Introduction Mapping a problem involving discrete variables into continuous variables often results in a more tractable formulation. For the case of probabilistic inference, in this paper we present a new approach to sample from distributions over binary variables, based on mapping the original discrete distribution into a continuous one with a piecewise quadratic log-likelihood, from which we can sample efficiently using exact Hamiltonian Monte Carlo (HMC). The HMC method is a Markov Chain Monte Carlo algorithm that usually has better performance over Metropolis or Gibbs samplers, because it manages to propose transitions in the Markov chain which lie far apart in the sampling space, while maintaining a reasonable acceptance rate for these proposals. But the implementations of HMC algorithms generally involve the non-trivial tuning of numerical integration parameters to obtain such a reasonable acceptance rate (see [1] for a review). The algorithms we present in this work are special because the Hamiltonian equations of motion can be integrated exactly, so there is no need for tuning a step-size parameter and the Markov chain always accepts the proposed moves. Similar ideas have been used recently to sample from truncated Gaussian multivariate distributions [2], allowing much faster sampling than other methods. It should be emphasized that despite the apparent complexity of deriving the new algorithms, their implementation is very simple. Since the method we present transforms a binary sampling problem into a continuous one, it is natural to extend it to distributions defined over mixtures of binary and Gaussian or exponential variables, transforming them into purely continuous distributions. Such a mixed binary-continuous problem arises in Bayesian model selection with a spike-and-slab prior and we illustrate our technique by focusing on this case. In particular, we show how to sample from the posterior of linear and probit regression models with spike-and-slab priors, while also imposing truncations in the parameter space (e.g., positivity). The method we use to map binary to continuous variables consists in simply identifying a binary variable with the sign of a continuous one. An alternative relaxation of binary to continuous vari1 ables, known in statistical physics as the “Gaussian integral trick” [3], has been used recently to apply HMC methods to binary distributions [4], but the details of that method are different than ours. In particular, the HMC in that work is not ‘exact’ in the sense used above and the algorithm only works for Markov random fields with Gaussian potentials. 2 Binary distributions We are interested in sampling from a probability distribution p(s) defined over d-dimensional binary vectors s ∈{−1, +1}d, and given in terms of a function f(s) as p(s) = 1 Z f(s) . (1) Here Z is a normalization factor, whose value will not be needed. Let us augment the distribution p(s) with continuous variables y ∈Rd as p(s, y) = p(s)p(y|s) (2) where p(y|s) is non-zero only in the orthant defined by si = sign(yi) i = 1, . . . , d. (3) The essence of the proposed method is that we can sample from p(s) by sampling y from p(y) = X s′ p(s′)p(y|s′) , (4) = p(s)p(y|s) , (5) and reading out the values of s from (3). In the second line we have made explicit that for each y, only one term in the sum in (4) is non-zero, so that p(y) is piecewise defined in each orthant. In order to sample from p(y) using the exact HMC method of [2], we require log p(y|s) to be a quadratic function of y on its support. The idea is to define a potential energy function U(y) = −log p(y|s) −log f(s) , (6) introduce momentum variables qi, and consider the piecewise continuous Hamiltonian H(y, q) = U(y) + q·q 2 , (7) whose value is identified with the energy of a particle moving in a d-dimensional space. Suppose the particle has initial coordinates y(0). In each iteration of the sampling algorithm, we sample initial values q(0) for the momenta from a standard Gaussian distribution and let the particle move during a time T according to the equations of motion ˙y(t) = ∂H ∂q(t) , ˙q(t) = −∂H ∂y(t) . (8) The final coordinates, y(T), belong to a Markov chain with invariant distribution p(y), and are used as the initial coordinates of the next iteration. The detailed balance condition follows directly from the conservation of energy and (y, q)-volume along the trajectory dictated by (8), see [1, 2] for details. The restriction to quadratic functions of y in log p(y|s) allows us to solve the differential equations (8) exactly in each orthant. As the particle moves, the potential energy U(y) and the kinetic energy q·q 2 change in tandem, keeping the value of the Hamiltonian (7) constant. But this smooth interchange gets interrupted when any coordinate reaches zero. Suppose this first happens at time tj for coordinate yj, and assume that yj < 0 for t < tj. Conservation of energy imposes now a jump on the momentum qj as a result of the discontinuity in U(y). Let us call qj(t− j ) and qj(t+ j ) the value of the momentum qj just before and after the coordinate hits yj = 0. In order to enforce conservation of energy, we equate the Hamiltonian at both sides of the yj = 0 wall, giving q2 j (t+ j ) 2 = ∆j + q2 j (t− j ) 2 (9) 2 with ∆j = U(yj = 0, sj = −1) −U(yj = 0, sj = +1) (10) If eq. (9) gives a positive value for q2 j (t+ j ), the coordinate yj crosses the boundary and continues its trajectory in the new orthant. On the other hand, if eq.(9) gives a negative value for q2 j (t+ j ), the particle is reflected from the yj = 0 wall and continues its trajectory with qj(t+ j ) = −qj(t− j ). When ∆j < 0, the situation can be understood as the limit of a scenario in which the particle faces an upward hill in the potential energy, causing it to diminish its velocity until it either reaches the top of the hill with a lower velocity or stops and then reverses. In the limit in which the hill has finite height but infinite slope, the velocity change occurs discontinuously at one instant. Note that we used in (9) that the momenta qi̸=j are continuous, since this sudden infinite slope hill is only seen by the yj coordinate. Regardless of whether the particle bounces or crosses the yj = 0 wall, the other coordinates move unperturbed until the next boundary hit, where a similar crossing or reflection occurs, and so on, until the final position y(T). The framework we presented above is very general and in order to implement a particular sampler we need to select the distributions p(y|s). Below we consider in some detail two particularly simple choices that illustrate the diversity of options here. 2.1 Gaussian augmentation Let us consider first for p(y|s) the truncated Gaussians p(y|s) =  (2/π)d/2 e−y·y 2 for sign(yi) = si, i = 1, . . . , d 0 otherwise , (11) The equations of motion (8) lead to ¨y(t) = −y(t), ¨q(t) = −q(t), and have a solution yi(t) = yi(0) cos(t) + qi(0) sin(t) , (12) = ui sin(φi + t) , (13) qi(t) = −yi(0) sin(t) + qi(0) cos(t) , (14) = ui cos(φi + t) . (15) This setting is similar to the case studied in [2] and from φi = tan−1(yi(0)/qi(0)) the boundary hit times ti are easily obtained. When a boundary is reached, say yj = 0, the coordinate yj changes its trajectory for t > tj as yj(t) = qj(t+ j ) sin(t −tj) , (16) with the value of qj(t+ j ) obtained as described above. Choosing an appropriate value for the travel time T is crucial when using HMC algorithms [5]. As is clear from (13), if we let the particle travel during a time T > π, each coordinate reaches zero at least once, and the hitting times can be ordered as 0 < tj1 ≤tj2 ≤· · · ≤tjd < π . (17) Moreover, regardless of whether a coordinate crosses zero or gets reflected, it follows from (16) that the successive hits occur at ti + nπ, n = 1, 2, . . . (18) and therefore the hitting times only need to be computed once for each coordinate in every iteration. If we let the particle move during a time T = nπ, each coordinate reaches zero n times, in the cyclical order (17), with a computational cost of O(nd) from wall hits. But choosing precisely T = nπ is not recommended for the following reason. As we just showed, between yj(0) and yj(π) the coordinate touches the boundary yj = 0 once, and if yj gets reflected off the boundary, it is easy to check that we have yj(π) = yj(0). If we take T = nπ and the particle gets reflected all the n times it hits the boundary, we get yj(T) = yj(0) and the coordinate yj does not move at all. To avoid these singular situations, a good choice is T = (n+ 1 2)π, which generalizes the recommended 3 travel time T = π/2 for truncated Gaussians in [2]. The value of n should be chosen for each distribution, but we expect optimal values for n to grow with d. With T = (n + 1 2)π, the total cost of each sample is O((n + 1/2)d) on average from wall hits, plus O(d) from the sampling of q(0) and from the d inverse trigonometric functions to obtain the hit times ti. But in complex distributions, the computational cost is dominated by the the evaluation of ∆i in (10) at each wall hit. Interestingly, the rate at which wall yi = 0 is crossed coincides with the acceptance rate in a Metropolis algorithm that samples uniformly a value for i and makes a proposal of flipping the binary variable si. See the Appendix for details. Of course, this does not mean that the HMC algorithm is the same as Metropolis, because in HMC the order in which the walls are hit is fixed given the initial velocity, and the values of q2 i at successive hits of yi = 0 within the same iteration are not independent. 2.2 Exponential and other augmentations Another distribution that allows one an exact solution of the equations of motion (8) is p(y|s) =  e−Pd i=1 |yi| for sign(yi) = si, i = 1, . . . , d 0 otherwise , (19) which leads to the equations of motion ¨yi(t) = −si, with solutions of the form yi(t) = yi(0) + qi(0)t −sit2 2 . (20) In this case, the initial hit time for every coordinate is the solution of the quadratic equation yi(t) = 0. But, unlike the case of the Gaussian augmentation, the order of successive hits is not fixed. Indeed, if coordinate yj hits zero at time tj, it continues its trajectory as yj(t > tj) = q(t+ j )(t −tj) −sj 2 (t −tj)2 , (21) so the next wall hit yj = 0 will occur at a time t′ j given by (t′ j −tj) = 2|qj(t+ j )| , (22) where we used sj = sign(qj(t+ j )). So we see that the time between successive hits of the same coordinate depends only on its momentum after the last hit. Moreover, since the value of |qj(t+)| is smaller than |qj(t−)| if the coordinate crosses to an orthant of lower probability, equation (22) implies that the particle moves away faster from areas of lower probability. This is unlike the Gaussian augmentation, where a coordinate ‘waits in line’ until all the other coordinates touch their wall before hitting its wall again. The two augmentations we considered above have only scratched the surface of interesting possibilities. One could also define f(y|s) as a uniform distribution in a box such that the computation of the times for wall hits would becomes purely linear and we get a classical ‘billiards’ dynamics. More generally, one could consider different augmentations in different orthants and potentially tailor the algorithm to mix faster in complex and multimodal distributions. 3 Spike-and-slab regression with truncated parameters The subject of Bayesian sparse regression has seen a lot of work during the last decade. Along with priors such as the Bayesian Lasso [6] and the Horsehoe [7], the classic spike-and-slab prior [8, 9] still remains very competitive, as shown by its superior performance in the recent works [10, 11, 12]. But despite its successes, posterior inference remains a computational challenge for the spike-andslab prior. In this section we will show how the HMC binary sampler can be extended to sample from the posterior of these models. The latter is a distribution over a set of binary and continuous variables, with the binary variables determining whether each coefficient should be included in the model or not. The idea is to map these indicator binary variables into continuous variables as we did above, obtaining a distribution from which we can sample again using exact HMC methods. Below we consider a regression model with Gaussian noise but the extension to exponential noise (or other scale-mixtures of Gaussians) is immediate. 4 3.1 Linear regression Consider a regression problem with a log-likelihood that depends quadratically on its coefficients, such as log p(D|w) = −1 2w′Mw + r · w + const. (23) where D represents the observed data. In a linear regression model z = Xw+ε, with ε ∼N(0, σ2), we have M = X′X/σ2 and r = z′X/σ2. We are interested in a spike-and-slab prior for the coefficients w of the form p(w, s|a, τ 2) = d Y i=1 p(wi|si, τ 2)p(si|a) . (24) Each binary variable si = ±1 has a Bernoulli prior p(si|a) = a (1+si) 2 (1 −a) (1−si) 2 and determines whether the coefficient wi is included in the model. The prior for wi, conditioned on si, is p(wi|si, τ 2) =      1 √ 2πτ 2 e− w2 i 2τ2 for si = +1, δ(wi) for si = −1 (25) We are interested in sampling from the posterior, given by p(w, s|D, a, τ 2) ∝ p(D|w)p(w, s|a, τ 2) (26) ∝ e−1 2 w′Mw+r·we−1 2 w′ +w+τ −2 (2πτ 2)|s+|/2 δ(w−)a|s+|(1 −a)|s−| (27) ∝ e−1 2 w′ +(M++τ −2)w++r+·w+ (2πτ 2)|s+|/2 δ(w−)a|s+|(1 −a)|s−| (28) where s+ are the variables with si = +1 and s−those with si = −1. The notation r+, M+ and w+ indicates a restriction to the s+ subspace and w−indicates a restriction to the s−space. In the passage from (27) to (28) we see that the spike-and-slab prior shrinks the dimension of the Gaussian likelihood from d to |s+|. In principle we could integrate out the weights w and obtain a collapsed distribution for s, but we are interested in cases in which the space of w is truncated and therefore the integration is not feasible. An example would be when a non-negativity constraint wi ≥0 is imposed. In these cases, one possible approach is to sample from (28) with a block Gibbs sampler over the pairs {wi, si}, as proposed in [10]. Here we will present an alternative method, extending the ideas of the previous section. For this, we consider a new distribution, obtained in two steps. Firstly, we replace the delta functions in (28) by a factor similar to the slab (25) δ(wi) → 1 √ 2πτ 2 e− w2 i 2τ2 si = −1 (29) The introduction of a non-singular distribution for those wi’s that are excluded from the model in (28) creates a Reversible Jump sampler [13]: the Markov chain can now keep track of all the coefficients, whether they belong or not to the model in a given state of the chain, thus allowing them to join or leave the model along the chain in a reversible way. Secondly, we augment the distribution with y variables as in (2)-(5) and sum over s. Using the Gaussian augmentation (11), this gives a distribution p(w, y|D, a, τ 2) ∝e−1 2 w′ +(M++τ −2)w++r+·w+e− w−·w− 2τ2 e−y·y 2 a|s+|(1 −a)|s−| (30) where the values of s in the rhs are obtained from the signs of y. This is a piecewise Gaussian, different in each orthant of y, and possibly truncated in the w space. Note that the changes in p(w, y|D, a, τ 2) across orthants of y come both from the factors a|s+|(1 −a)|s−| and from the functional dependence on the w variables. Sampling from (30) gives us samples from the original distribution (28) using a simple rule: each pair (wi, yi) becomes (wi, si = +1) if yi ≥0 and 5 (wi = 0, si = −1) if yi < 0. This undoes the steps we took to transform (28) into (30): the identification si = sign(yi) takes us from p(w, y|D, a, τ 2) to p(w, s|D, a, τ 2), and setting wi = 0 when si = −1 undoes the replacement in (29). Since (30) is a piecewise Gaussian distribution, we can sample from it again using the methods of [2]. As in that work, the possible truncations for w are given as gn(w) ≥0 for n = 1, . . . , N, with gn(w) any product of linear and quadratic functions of w. The details are a simple extension of the purely binary case and are not very illuminating, so we leave them for the Appendix. 3.2 Probit regression Consider a probit regression model in which binary variables bi = ±1 are observed with probability p(bi|w, xi) = 1 √ 2π Z zibi≥0 dzie−1 2 (zi+xiw)2 (31) Given a set of N pairs (bi, xi), we are interested in the posterior distribution of the weights w using the spike-and-slab prior (24). This posterior is the marginal over the zi’s of the distribution p(z, w, s|x, a, τ 2) ∝ N Y i=1 e−1 2 (zi+xiw)2p(w, s|a, τ 2) zibi ≥0 , (32) and we can use the same approach as above to transform this distribution into a truncated piecewise Gaussian, defined over the (N +2d)-dimensional space of the vector (z, w, y). Each zi is truncated according to the sign of bi and we can also truncate the w space if we so desire. We omit the details of the HMC algorithm, since it is very similar to the linear regression case. 4 Examples We present here three examples that illustrate the advantages of the proposed HMC algorithms over Metropolis or Gibbs samplers. 4.1 1D Ising model We consider a 1D periodic Ising model, with p(s) ∝e−βE[s], where the energy is E[s] = −Pd i=1 sisi+1, with sd+1 = s1 and β is the inverse temperature. Figure 1 shows the first 1000 iterations of both the Gaussian HMC and the Metropolis1 sampler on a model with d = 400 and β = 0.42, initialized with all spins si = 1. In HMC we took a travel time T = 12.5π and, for the sake of comparable computational costs, for the Metropolis sampler we recorded the value of s every d × 12.5 flip proposals. The plot shows clearly that the Markov chain mixes much faster with HMC than with Metropolis. A useful variable that summarizes the behavior of the Markov chain is the magnetization m = 1 d Pd i=1 si , whose expected value is ⟨m⟩= 0. The oscillations of both samplers around this value illustrate the superiority of the HMC sampler. In the Appendix we present a more detailed comparison of the HMC Gaussian and exponential and the Metropolis samplers, showing that the Gaussian HMC sampler is the most efficient among the three. 4.2 2D Ising model We consider now a 2D Ising model on a square lattice of size L × L with periodic boundary conditions below the critical temperature. Starting from a completely disordered state, we compare the time it takes for the sampler to reach one of the two low energy states with magnetization m ≃±1. Figure 2 show the results of 20 simulations of such a model with L = 100 and inverse temperature β = 0.5. We used a Gaussian HMC with T = 2.5π and a Metropolis sampler recording values of s every 2.5L2 flip proposals. In general we see that the HMC sampler reaches higher likelihood regions faster. 1As is well known (see e.g.[14]), for binary distributions, the Metropolis sampler that chooses a random spin and makes a proposal of flipping its value, is more efficient than the Gibbs sampler. 6 0 100 200 300 400 500 600 700 800 900 1000 −1 0 1 Magnetization 0 100 200 300 400 500 600 700 800 900 1000 −1000 −950 −900 Energy Metropolis HMC Metropolis 100 200 300 400 500 600 700 800 900 1000 200 400 HMC Iteration 100 200 300 400 500 600 700 800 900 1000 200 400 Figure 1: 1D Ising model. First 1000 iterations of Gaussian HMC and Metropolis samplers on a model with d = 400 and β = 0.42, initialized with all spins si = 1 (black dots). For HMC the travel time was T = 12.5π and in the Metropolis sampler we recorded the state of the Markov chain once every d × 12.5 flip proposals. The lower two panels show the state of s at every iteration for each sampler. The plots show clearly that the HMC model mixes faster than Metropolis in this model. 5 45 85 125 165 205 245 285 1.7 1.75 1.8 1.85 1.9 1.95 2 x 10 4 Log likelihood Iteration 5 45 85 125 165 205 245 285 0 0.2 0.4 0.6 0.8 1 Absolute Magnetization Iteration HMC Metropolis Figure 2: 2D Ising model. First samples from 20 simulations in a 2D Ising model in a square lattice of side length L = 100 with periodic boundary conditions and inverse temperature β = 0.5. The initial state is totally disordered. We do not show the first 4 samples in order to ease the visualization. For the Gaussian HMC we used T = 2.5π and for Metropolis we recorded the state of the chain every 2.5L2 flip proposals. The plots illustrate that in general HMC reaches equilibrium faster than Metropolis in this model. Note that these results of the 1D and 2D Ising models illustrate the advantage of the HMC method in relation to two different time constants relevant for Markov chains [15]. Figure 1 shows that the HMC sampler explores faster the sampled space once the chain has reached its equilibrium distribution, while Figure 2 shows that the HMC sampler is faster in reaching the equilibrium distribution. 7 100 300 500 700 900 1100 1300 1500 1700 1900 2520 2540 2560 2580 Iteration Log likelihood HMC Gibbs 100 300 500 700 900 1100 1300 1500 1700 1900 7.4 7.6 7.8 8 8.2 Samples of first coefficient Iteration HMC Gibbs 0 100 200 300 400 500 600 700 800 900 1000 0 0.5 1 Lag ACF of first coefficient HMC Gibbs Figure 3: Spike-and-slab linear regression with constraints. Comparison of the proposed HMC method with the Gibbs sampler of [10] for the posterior of a linear regression model with spike-andslab prior, with a positivity constraint on the coefficients. See the text for details of the synthetic data used. Above: log-likelihood as a function of the iteration. Middle: samples of the first coefficient. Below: ACF of the first coefficient. The plots shows clearly that HMC mixes much faster than Gibbs and is more consistent in exploring areas of high probability. 4.3 Spike-and-slab linear regression with positive coefficients We consider a linear regression model z = Xw + ε with the following synthetic data. X has N = 700 rows, each sampled from a d = 150-dimensional Gaussian whose covariance matrix has 3 in the diagonal and 0.3 in the nondiagonal entries. The noise is ε ∼N(0, σ2 = 100). The data z is generated with a coefficients vector w, with 10 non-zero entries with values between 1 and 10. The spike-and-slab hyperparameters are set to a = 0.1 and τ = 10. Figure 3 compares the results of the proposed HMC method versus the Gibbs sampler used in [10]. In both cases we impose a positivity constraint on the coefficients. For the HMC sampler we use a travel time T = π/2. This results in a number of wall hits (both for w and y variables) of ≃150, which makes the computational cost of every HMC and Gibbs sample similar. The advantage of the HMC method is clear, both in exploring regions of higher probability and in the mixing speed of the sampled coefficients. This impressive difference in the efficiency of HMC versus Gibbs is similar to the case of truncated multivariate Gaussians studied in [2]. 5 Conclusions and outlook We have presented a novel approach to use exact HMC methods to sample from generic binary distributions and certain distributions over mixed binary and continuous variables, Even though with the HMC algorithm is better than Metropolis or Gibbs in the examples we presented, this will clearly not be the case in many complex binary distributions for which specialized sampling algorithms have been developed, such as the Wolff or Swendsen-Wang algorithms for 2D Ising models near the critical temperature [14]. But in particularly difficult distributions, these HMC algorithms could be embedded as inner loops inside more powerful algorithms of Wang-Landau type [16]. We leave the exploration of these newly-opened realms for future projects. Acknowledgments This work was supported by an NSF CAREER award and by the US Army Research Laboratory and the US Army Research Office under contract number W911NF-12-1-0594. 8 References [1] R Neal. MCMC Using Hamiltonian Dynamics. Handbook of Markov Chain Monte Carlo, pages 113–162, 2011. [2] Ari Pakman and Liam Paninski. Exact Hamiltonian Monte Carlo for Truncated Multivariate Gaussians. Journal of Computational and Graphical Statistics, 2013, arXiv:1208.4118. [3] John A Hertz, Anders S Krogh, and Richard G Palmer. Introduction to the theory of neural computation, volume 1. Westview press, 1991. [4] Yichuan Zhang, Charles Sutton, Amos Storkey, and Zoubin Ghahramani. Continuous Relaxations for Discrete Hamiltonian Monte Carlo. In Advances in Neural Information Processing Systems 25, pages 3203–3211, 2012. [5] M.D. Hoffman and A. Gelman. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. Arxiv preprint arXiv:1111.4246, 2011. [6] T. Park and G. Casella. The Bayesian lasso. Journal of the American Statistical Association, 103(482):681–686, 2008. [7] C.M. Carvalho, N.G. Polson, and J.G. Scott. The horseshoe estimator for sparse signals. Biometrika, 97(2):465–480, 2010. [8] T.J. Mitchell and J.J. Beauchamp. Bayesian variable selection in linear regression. Journal of the American Statistical Association, 83(404):1023–1032, 1988. [9] E.I. George and R.E. McCulloch. Variable selection via Gibbs sampling. Journal of the American Statistical Association, 88(423):881–889, 1993. [10] S. Mohamed, K. Heller, and Z. Ghahramani. Bayesian and L1 approaches to sparse unsupervised learning. arXiv preprint arXiv:1106.1157, 2011. [11] I.J. Goodfellow, A. Courville, and Y. Bengio. Spike-and-slab sparse coding for unsupervised feature discovery. arXiv preprint arXiv:1201.3382, 2012. [12] Yutian Chen and Max Welling. Bayesian structure learning for Markov random fields with a spike and slab prior. arXiv preprint arXiv:1206.1088, 2012. [13] Peter J Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82(4):711–732, 1995. [14] Mark E.J. Newman and Gerard T. Barkema. Monte Carlo methods in statistical physics. Oxford: Clarendon Press, 1999., 1, 1999. [15] Alan D Sokal. Monte Carlo methods in statistical mechanics: foundations and new algorithms, 1989. [16] Fugao Wang and David P Landau. Efficient, multiple-range random walk algorithm to calculate the density of states. Physical Review Letters, 86(10):2050–2053, 2001. 9
2013
242
4,979
Spectral methods for neural characterization using generalized quadratic models Il Memming Park∗123, Evan Archer∗13, Nicholas Priebe14, & Jonathan W. Pillow123 1. Center for Perceptual Systems, 2. Dept. of Psychology, 3. Division of Statistics & Scientific Computation, 4. Section of Neurobiology, The University of Texas at Austin {memming@austin., earcher@, nicholas@, pillow@mail.} utexas.edu Abstract We describe a set of fast, tractable methods for characterizing neural responses to high-dimensional sensory stimuli using a model we refer to as the generalized quadratic model (GQM). The GQM consists of a low-rank quadratic function followed by a point nonlinearity and exponential-family noise. The quadratic function characterizes the neuron’s stimulus selectivity in terms of a set linear receptive fields followed by a quadratic combination rule, and the invertible nonlinearity maps this output to the desired response range. Special cases of the GQM include the 2nd-order Volterra model [1, 2] and the elliptical Linear-Nonlinear-Poisson model [3]. Here we show that for “canonical form” GQMs, spectral decomposition of the first two response-weighted moments yields approximate maximumlikelihood estimators via a quantity called the expected log-likelihood. The resulting theory generalizes moment-based estimators such as the spike-triggered covariance, and, in the Gaussian noise case, provides closed-form estimators under a large class of non-Gaussian stimulus distributions. We show that these estimators are fast and provide highly accurate estimates with far lower computational cost than full maximum likelihood. Moreover, the GQM provides a natural framework for combining multi-dimensional stimulus sensitivity and spike-history dependencies within a single model. We show applications to both analog and spiking data using intracellular recordings of V1 membrane potential and extracellular recordings of retinal spike trains. 1 Introduction Although sensory stimuli are high-dimensional, sensory neurons are typically sensitive to only a small number of stimulus features. Linear dimensionality-reduction methods seek to identify these features in terms of a subspace spanned by a small number of spatiotemporal filters. These filters, which describe how the stimulus is integrated over space and time, can be considered the first stage in a “cascade” model of neural responses. In the well-known linear-nonlinear-Poisson (LNP) cascade model, filter outputs are combined via a nonlinear function to produce an instantaneous spike rate, which generates spikes via an inhomogeneous Poisson process [4,5]. The most popular methods for dimensionality reduction with spike train data involve the first two moments of the spike-triggered stimulus distribution: (1) the spike-triggered average (STA) [7–9]; and (2) major and minor eigenvectors of spike-triggered covariance (STC) matrix [10, 11]1. STC analysis can be described as a spectral method because the estimate is obtained by eigenvector ∗These authors contributed equally. 1Related moment-based estimators have also appeared in the statistics literature under the names “inverse regression” and “sufficient dimensionality reduction”, although the connection to STA and STC analysis does not appear to have been noted previously [12,13]. 1 response analog spikes or stimulus ... nonlinear function Generalized Quadratic Model noise quadratic linear filters recurrent filters Figure 1: Schematic of generalized quadratic model (GQM) for analog or spike train data. decomposition of an appropriately defined matrix. Compared to likelihood-based methods, spectral methods are generally computationally efficient and devoid of (non-global) local optima. Recently, Park and Pillow [3] described a connection between STA/STC analysis and maximum likelihood estimators based on a quantity called the expected log-likelihood (EL). The EL results from replacing the nonlinear term in the log-likelihood and with its expectation over the stimulus distribution. When the stimulus is Gaussian, the EL depends only on moments (mean spike rate, STA, STC, and stimulus mean and covariance) and leads to a closed-form spectral estimate for LNP filters, which has STC analysis as a special case. More recently, Ramirez and Paninski derived ELbased estimators for the linear Gaussian model and proposed fast EL-based inference methods for generalized linear models (GLMs) [14]. Here, we show that the EL framework can be extended to a more general class that we refer to as the generalized quadratic model (GQM). The GQM represents a straightforward extension of the generalized linear model GLM [15, 16] wherein the linear predictor is replaced by a quadratic function (Fig. 1). For Gaussian and Poisson GQMs, we derive computationally efficient EL-based estimators that apply to a variety of non-Gaussian stimulus distributions; this substantially extends previous work on the conditions of validity for moment-based estimators [7,17–19]. In the Gaussian case, the EL-based estimator has a closed form solution that relies only on the first two responseweighted moments and the first four stimulus moments. In the Poisson case, GQMs provide a natural synthesis of models that have multiple filters (i.e., where the response depends on multiple projections of the stimulus) and dependencies on spike history. We show that spectral estimates of a low-dimensional feature space are nearly as accurate as maximum likelihood estimates (for GQMs without spike-history), and demonstrate the applicability of GQMs for both analog and spiking data. 2 Generalized Quadratic Models We begin by briefly reviewing of the class of models known as GLMs, which includes the singlefilter LNP model, and the Wiener model from the systems identification literature. A GLM has three basic components: a linear stimulus filter, an invertible nonlinearity (or “inverse link” function), and an exponential-family noise model. The GLM describes the conditional response y to a vector stimulus x as: y|x ∼P(f(w⊤x)), (1) where w is the filter, f is the nonlinearity, and P(λ) denotes a noise distribution function with mean λ. From the standpoint of dimensionality reduction, the GLM makes the strong modeling assumption that response y depends upon x only via its one-dimensional projection onto w. At the other end of the modeling spectrum sits the very general “multiple filter” linear-nonlinear (LN) cascade model, which posits that the response depends on a p-dimensional projection of the stimulus, represented by a bank of filters {wi}p i=1, and combined via some arbitrary multidimensional function f : Rp →R: y|x ∼P(f(w⊤ 1 x, . . . , w⊤ p x)). (2) Spike-triggered covariance analysis and related methods provide low-cost estimates of the filters {wi} under Poisson or Bernoulli noise models, but only under restrictive conditions on the stimulus 2 distribution (e.g., elliptical symmetry) and some weak conditions on f [17, 19]. Semi-parametric estimators like “maximally informative dimensions” (MID) eliminate these restrictions [20], but do not practically scale beyond two or three filters without additional modeling assumptions [21]. The generalized quadratic model (GQM) provides a tractable middle ground between the GLM and general multi-filter LN models. The GQM allows for multi-dimensional stimulus dependence, yet restricts the nonlinearity to be a transformed quadratic function [22–25]. The GQM can be written: y|x ∼P(f(Q(x))), (3) where Q(x) = x⊤Cx + b⊤x + a denotes a quadratic function of x, governed by a (possibly lowrank) symmetric matrix C, a vector b, and a scalar a. Note that the GQM may be regarded as a GLM in the space of quadratically transformed stimuli [6], although this approach does not allow Q(x) to be parametrized directly in terms of a projection onto a small number of linear filters. In the following, we show that the elliptical-LNP model [3] is a GQM with Poisson noise, and make a detailed study of canonical GQMs with Gaussian noise. We show that the maximum-EL estimates for C, b, and a have similar forms for both Gaussian and Poisson GQMs, and that the eigenspectrum of C provides accurate estimates of a neuron’s low-dimensional feature space. Finally, we show that the GQM provides a natural framework for combining multi-dimensional stimulus sensitivity with dependencies on spike train history or other response covariates. 3 Estimation with expected log-likelihoods The expected log-likelihood is a quantity that approximates log-likelihood but can be computed very efficiently using moments. It exists for any GQM or GLM with “canonical” nonlinearity (or link function). The canonical nonlinearity for an exponential-family noise distribution has the special property that it allows the log-likelihood to be written as the sum of two terms: a term that depends linearly on the responses {yi}, and a second (nonlinear) term that depends only on the stimuli {xi} and parameters θ. The expected log-likelihood (EL) results from replacing the nonlinear term with its expectation over the stimulus distribution P(x), which in neurophysiology settings is often known a priori to the experimenter. Maximizing the EL results in maximum expected log-likelihood (MEL) estimators that have very low computational cost while achieving nearly the accuracy of full maximum likelihood (ML) estimators. Spectral decompositions derived from the EL provide estimators that generalize STA/STC analysis. In the following, we derive MEL estimators for three special cases—two for the Gaussian noise model, and one for the Poisson noise model. 3.1 Gaussian GQMs Gaussian noise provides a natural model for analog neural response variables like membrane potential or fluorescence. The canonical nonlinearity for Gaussian noise is the identity function, f(x) = x. The the canonical-form Gaussian GQM can therefore be written: y|x ∼N(Q(x), σ2). Given a dataset {xi, yi}N i=1, the log-likelihood per sample is: L = −1 2σ2 1 N X i (Q(xi) −yi)2 = −1 2σ2 1 N X i −2Q(xi)yi + Q(xi)2 + const = −1 2σ2 −2 Tr(CΛ) + µ⊤b + a¯y  + 1 N X i Q(xi)2 ! + const, (4) where σ2 is the noise variance, const is a parameter-independent constant, ¯y = 1 N P i yi is the mean response, and µ and Λ denote cross-correlation statistics that we will refer to (in a slight abuse of terminology) as the response triggered average and response-triggered covariance: µ = 1 N N X i=1 yixi (“RTA”) Λ = 1 N N X i=1 yixixi ⊤(“RTC”).2 (5) The expected log-likelihood results from replacing the troublesome nonlinear term 1 N P i Q(xi)2 by its expectation over the stimulus distribution. This is justified by the law of large numbers, which 2When responses yi are spike counts, these correspond to the STA and STC. 3 asserts that 1 N P i Q(xi)2 converges to EP (x)[Q(x)2] asymptotically. Leaving off the const term, this leads to the per-sample expected log-likelihood [3,14], which is defined: ˜L = − 1 2σ2 −2 Tr(CΛ) + µ⊤b + a¯y  + E[Q(x)2]  . (6) Gaussian stimuli If the stimuli are drawn from a Gaussian distribution, x ∼N(0, Σ), then we have (from [26]): E[Q(x)2] = 2 Tr  (CΣ)2 + Tr(bT Σb) + (Tr(CΣ) + a)2. (7) The EL is concave in the parameters a, b, C, so we can obtain the MEL estimates by finding the stationary point: ∂ ∂a ˜L = −1 2σ2 (−2¯y + 2 (Tr(CΣ) + a)) = 0 =⇒ amel = ¯y −Tr(CmelΣ)) (8) ∂ ∂b ˜L = −1 2σ2 (−2µ + 2Σb) = 0 =⇒ bmel = Σ−1µ (9) ∂ ∂C ˜L = −1 2σ2 −2Λ + 4ΣCΣ + 2¯yΣ  = 0 =⇒ Cmel = 1 2 Σ−1ΛΣ−1 −¯yΣ−1 (10) Note that this coincides with the moment-based estimate for the 2nd-order Volterra model [2]. Axis-symmetric stimuli More generally, we can derive the MEL estimator for stimuli with arbitrary axis-symmetric distributions with finite 4th-order moments. Axis-symmetric distributions exhibit invariance under reflections around each axis, that is, P(x1, . . . , xd) = P(ρ1x1, . . . , ρdxd) for any ρi ∈{−1, 1}. The class of axis-symmetric distributions subsumes both radially symmetric and independent product distributions. However, axis symmetry is a strictly weaker condition; significantly, marginals need not be identically distributed. To simplify derivation of the MEL estimator for axis-symmetric stimuli, we take the derivative of Q(x) with respect to (a, b, C) before taking the expectation. Derivatives with respect to model parameters are given by ∂E[Q(x)2] ∂θi = E h 2Q(x) ∂Q(x) ∂θi i . For each θi, we solve the equation, ∂˜L ∂θi = −2∂ Tr(CΛ) + µ⊤b + a¯y  ∂θi + 2E  Q(x)∂Q(x) ∂θi  = 0. From derivatives w.r.t. a, b, and C, respectively, we obtain conditions for the MEL estimates: ¯y = E [Q(x)] = a + b⊤E[x] + Tr(CE[xx⊤]) µ = E [Q(x)x] = aE[x] + b⊤E[xx⊤] + X i,j CijE[xixjx] Λ = E  Q(x)xx⊤ = aE[xx⊤] + X i biE[xixx⊤] + X i,j CijE[xixjxx⊤] where the subindices within the sums are for components. Due to axis symmetry, E[x], E[xixjxk] and E[xix3 j] are all zero for distinct indices. Thus, the MEL estimates for a and b are identical to the Gaussian case given above. If we further assume that the stimulus is whitened so that E[xx⊤] = I, sufficient stimulus statistics are the 4th order even moments, which we represent with the matrix Mij = E  x2 i x2 j  . In general, when the marginals are not identical but the joint distribution is axis-symmetric, X ij CijE[xixjxx⊤] = X i Cii diag(x2 i x2 1, · · · , x2 i x2 d) + X i̸=j CijMijeie⊤ j (11) = diag(1⊤(I ◦C)M) + C ◦M ◦(11⊤−I). where 1 is a vector of 1’s, ei is the standard basis, and ◦denotes the Hadamard product. We can solve these sets of linear equations for the diagonal terms and off-diagonal terms separately obtaining, [Cmel]ij = ( Λij 2Mij , i ̸= j Ω(M −11⊤)−1, i = j (12) 4 time neural response true response iid axis-sym [r 2 = 0.894] general axis-sym [r2 = 0.99] Gaussian [r2 = 0.424] 2D stimulus distribution assumed stimulus distribution Figure 2: Maximum expected log-likelihood (MEL) estimators for a Gaussian GQM under different assumptions about the stimulus distribution. (left) Axis-symmetric stimulus distribution in 2D. The horizontal axis is a (symmetric) mixture of Gaussian, and the vertical axis is a uniform distribution. Red dots indicate samples from the distribution. (right) Response prediction based on various ˆC estimated using eq. 10, eq. 14, and eq. 12. Performance is evaluated on a cross-validation test set with no noise for each C, and we see a huge loss in performance as a result of incorrect assumption about the stimulus distribution. where Ω= diag(1⊤(I ◦Λ) −¯y1⊤). For the special case when the marginal distributions are identical, we note that E[x⊤Cx(xx⊤)] = µ22 Tr(C)I + (µ4 −µ22)C ◦I + 2µ22C ◦(11⊤−I) (13) where µ22 = E[x2 1x2 2] = M1,2 and µ4 = E[x4 1] = M1,1. This gives the simplified formula (also given in [27]): [Cmel]ij = ( Λij 2µ22 , i ̸= j Λii−¯y µ4−µ22 , i = j (14) When the stimulus is not Gaussian or the marginals not identical, the estimates obtained from (eq. 10) and (eq. 14) are not consistent. In this case, the general axis-symmetric estimate (eq. 12) gives much better performance, as we illustrate with a simulated example in Fig. 2. 3.2 Poisson GQM Poisson noise provides a natural model for discrete events like spike counts, and extends easily to point process models for spike trains. The canonical nonlinearity for Poisson noise is exponential, f(x) = exp(x), so the canonical-form Poisson GQM is: y|x ∼Poiss(exp(Q(x))). Ignoring irrelevant constants, the log-likelihood per sample is L = 1 N X i yi log(exp(Q(xi))) −1 N X i exp(Q(xi)) = Tr(CΛ) + µ⊤b + a¯y −1 N X i exp(Q(xi)), (15) where ¯y, µ and Λ denote mean response, STA, and STC, as given above (eq. 5). We obtain the EL for a Poisson GQM by replacing the term 1 N P exp(Q(xi)) by its expectation with respect to P(x). Under a zero-mean Gaussian stimulus distribution with covariance Σ, the closed-form MEL estimates are (from [3]): bmel =  Λ + 1 ¯y2µµ⊤−1 µ, Cmel = 1 2  Σ−1 −¯y  Λ + 1 ¯y2µµ⊤−1 , (16) where we assume that Λ + 1 ¯y2µµ⊤is invertible. Note that the MEL estimator combines information from µ and Λ, unlike standard STA and STC-based estimates, which maximize EL only when either b or C is zero (respectively). Park and Pillow 2011 used Poisson EL in conjunction with a log-prior to obtain approximate Bayesian estimates, an approach referred to as Bayesian STC [3]. 5 Figure 3: Rank-1 quadratic filter reconstruction performance. Both rank-1 models were optimized using conjugate gradient descent. (Left) l1 distance from the ground truth filter. (Right) Computation time for the optimization. 10 4 10 5 10 0 10 -1 flter estimation error 10 4 10 5 0 1 2 optimization time seconds L1 error # of samples # of samples MELE (1st eigenvector) rank−1 MELE rank−1 ML Mixture-of-Gaussians stimuli Results for Gaussian stimuli extend naturally to mixtures of Gaussians, which can be used to approximate arbitrary stimulus distributions. The EL for mixture-of-Gaussian stimuli can be computed simply via the linearity of expectation. For stimuli drawn from a mixture P i αjN(µj, Σj) with mixing weights P j αj = 1, the EL is ˜L = Tr(CΛ) + µ⊤b + a¯y − X i αjEN (µj,Σj)[eQ(x)], (17) where the Gaussian expectation terms are given by EN (µj,Σj)[eQ(x)] = 1 |I−2CΣj| 1 2 e  a+µ⊤ j Cµj+b⊤µj+ 1 2 (b+2Cµj)⊤(Σ−1 j −2C) −1(b+2Cµj)  . (18) Although the MEL estimator does not have a closed analytic form in this case, the EL can be efficiently optimized numerically, as it still depends on the responses only via the spike-triggered moments ¯y, µ and Λ, and on the stimuli only via the mean, covariance, and mixing weight of each Gaussian. 4 Spectral estimation for low-dimensional models 4.1 Low-rank parameterization We have so far focused upon MEL estimators for the parameters a, b, and C. These results have a natural mapping to dimensionality reduction methods. Under the GQM, a low-dimensional stimulus dependence is equivalent to having a low-rank C. If C = BB⊤for some d × p matrix B, we have a p-filter model (or p+1 filter model if the linear term b is not spanned by the columns of B). We can obtain spectral estimates of a low-dimensional GQM by performing an eigenvector decomposition of Cmel and selecting the eigenvectors corresponding to the largest p eigenvalues. The eigenvectors of Cmel also make natural initializers for maximization of the full GQM likelihood. In Fig. 3, we show the results of three different methods for recovering a simulated rank-1 GQM with Poisson noise: (1) the largest eigenvector of Cmel, (2) numerically maximizing the expected log-likelihood for a rank-1 GQM (i.e., with C parametrized as a rank-1 matrix), and (3) maximizing the (full) likelihood for a rank-1 GQM. Although the difference in performance between expected and full GQM log-likelihood is negligible, there is a drastic difference in optimization time complexity between the full and expected log-likelihood. The expected log-likelihood only requires computation of the sufficient statistics, while the full ML estimate requires a full pass through the dataset for each evaluation of the log-likelihood. Thus, the expected log-likelihood offers a fast yet accurate estimate for C. In the following section we show that, asymptotically, the eigenvectors of Cmel span the “correct” (in an appropriate sense) low-dimensional subspace. 4.2 Consistency of subspace estimates If the conditional probability y|x = y|β⊤x for a matrix β, the neural feature space is spanned by the columns of β. As a generalization of STC, we introduce moment-based dimensionality reduction 6 −1 0 1 −2 0 2 4 mV bx −1 0 1 0 0.4 0.8 mV w1x −1 0 1 0 0.4 mV w2x time (10ms/frame) linear filter b space (0.70 deg/bar) quadratic filter w1 space (0.70 deg/bar) quadratic filter w 2 space (0.70 deg/bar) mean model (r2 = 0.55) A B 0.2 0.4 0.6 0.8 1 −60 −55 −50 −45 time (s) Membrane Potential (mV) Prediction Performance (test data) Figure 4: GQM fit and prediction for intracellular recording in cat V1 with a trinary noise stimulus. (A) On top, estimated linear (b) and quadratic (w1 and w2) filters for the GQM, lagged by 20ms. On bottom, the empirical marginal nonlinearities along each dimension (black) and model prediction (red). (B) Cross-validated model prediction (red) and n = 94 recordings with repeats of identical stimulus (light grey) along with their mean (black). Reported performance metric (r2 = 0.55) is for prediction of the mean response. techniques that recover (portions of) β and show the relationship of these techniques to the MEL estimators of GQM. We propose to use Σ−1 2 µ and eigenvectors of Σ−1 2 ΛΣ−1 2 (whose eigenvalues are significantly smaller or larger than 1) as the feature space basis. When the response is binary, this coincides with the traditional STA/STC analysis, which is provably consistent only in the case of stimuli drawn from a spherically symmetric (for STA) or independent Gaussian distribution (for STC) [5]. Below, we argue that this procedure can identify the subspace when y has mean f(β⊤x) with finite variance, f is some function, and the stimulus distribution is zero-mean with white covariance, i.e., E[x] = 0 and E[xxT ] = I. First, note that by the law of large numbers, Λ →E[y xxT ] = E  yE[xxT |y]  . Let Ψ = ββT be a projection operator to the feature space, and Ψ⊥= I −Ψ be the perpendicular space. We follow the discussion in [12,13] regarding the related “sliced regression” literature. Recalling that E[X] = 0, we can exploit the independence of Ψ⊥x and y to find, E  xx⊤|y = ξ  = E  (Ψ + Ψ⊥)xx⊤(Ψ + Ψ⊥)|y = ξ  = ΨE  xx⊤|y = ξ  Ψ + Ψ⊥E  xx⊤ Ψ⊥= ΨE  xx⊤|y = ξ  Ψ + Ψ⊥ thus, E  yxx⊤ = ΨE  yxx⊤ Ψ + E[y]Ψ⊥and therefore the eigenvectors of E  yxx⊤ whose eigenvalues significantly differ from E[y] span a subspace of the range of Ψ. Effective estimation of the subspace depends critically on both the stimulus distribution and the form of f. Under the GQM, the eigenvectors of E  yxx⊤ are closely related to the expected log-likelihood estimators we derived earlier. Indeed, those eigenvectors of eq. 10, eq. 12 and eq. 16 whose associated eigenvalues differ significantly from zero span precisely the same space. 5 Results 5.1 Intracellular membrane potential We fit a Gaussian GQM to intracellular recordings of membrane potential from a neuron in cat V1, using a 2D spatiotemporal “flickering bars” stimulus aligned with the cell’s preferred orientation (Fig. 4). The recorded time-series is a continuous signal, so the Gaussian GQM provides an appropriate noise model. The recorded voltage was median-filtered (to remove spikes) and down-sampled to a 10 ms sample rate. We fit the GQM to a 21.6 minute recording of responses to non-repeating trinary noise stimulus . We validated the model using responses to 94 repeats of a 1 second frozen noise stimulus. Panel (B) of Fig. 4 illustrates the GQM prediction on cross-validation data. Although the cell was classified as “simple”, meaning that its response is predominately linear, the GQM fit reveals two quadratic filters that also influence the membrane potential response. The GQM captures a substantial percentage of the variance in the mean response, systematically outperforming the GLM in terms of r2 (GQM:55% vs. GLM:50%). 7 0 10 20 30 40 0.2 0.6 1 time (stimulus frames) 0 1 2 0 100 200 1 1.4 1.8 time (ms) 0.2 0.6 1 spike history stimulus filter gain gain linear quadratic 1 sec rate prediction (test data) GQM ( ) GLM ( ) Figure 5: (left) GLM and GQM filters fit to spike responses of a retinal ganglion cell stimulated with a 120 Hz binary full field noise stimulus [28]. The GLM has only linear stimulus and spike history filters (top left) while the GQM contains all four filters. Each plot shows the exponentiated filter, so the ordinate has units of gain, and filters interact multiplicatively. Quadratic filter outputs are squared and then subtracted from other inputs, giving them a suppressive effect on spiking (although quadratic excitation is also possible). (right) Cross-validated rate prediction averaged over 167 repeated trials. 5.2 Retinal ganglion spike train The Poisson GLM provides a popular model for neural spike trains due to its ability to incorporate dependencies on spike history (e.g., refractoriness, bursting, and adaptation). These dependencies cannot be captured by models with inhomogeneous Poisson output like the multi-filter LNP model (which is also implicit in information-theoretic methods like MID [21]). The GLM achieves this by incorporating a one-dimensional linear projection of spike history as an input to the model. In general, however, a spike train may exhibit dependencies on more than one linear projection of spike history. The GQM extends the GLM by allowing multiple stimulus filters and multiple spike-history filters. It can therefore capture multi-dimensional stimulus sensitivity (e.g., as found in complex cells) and produce dynamic spike patterns unachievable by GLMs. We fit a Poisson GQM with a quadratic history filter to data recorded from a retinal ganglion cell driven by a full-field white noise stimulus [28]. For ease of comparison, we fit a Poisson GLM, then added quadratic stimulus and history filters, initialized using a spectral decomposition of the MEL estimate (eq. 16) and then optimized by numerical ascent of the full log-likelihood. Both quadratic filters (which enter with negative sign), have a suppressive effect on spiking (Fig. 5). The quadratic stimulus filter induces strong suppression at a delay of 5 frames, while the quadratic spike history filter induces strong suppression during a 50 ms window after a spike. 6 Conclusion The GQM provides a flexible class of probabilistic models that generalizes the GLM, the 2ndorder Volterra model, the Wiener model, and the elliptical-LNP model [3]. Unlike the GLM, the GQM allows multiple stimulus and history filters and yet remains tractable for likelihood-based inference. We have derived expected log-likelihood estimators in a general form that reveals a deep connection between likelihood-based and moment-based inference methods. We have shown that GQM performs well on neural data, both for discrete (spiking) and analog (voltage) data. Although we have discussed the GQM in the context of neural systems, but we believe it (and EL-based inference methods) will find applications in other areas such as signal processing and psychophysics. Acknowledgments We thank the L. Paninski and A. Ramirez for helpful discussions and V. J. Uzzell and E. J. Chichilnisky for retinal data. This work was supported by Sloan Research Fellowship (JP), McKnight Scholar’s Award (JP), NSF CAREER Award IIS-1150186 (JP), NIH EY019288 (NP), and Pew Charitable Trust (NP). 8 References [1] P. Z. Marmarelis and V. Marmarelis. Analysis of physiological systems: the white-noise approach. Plenum Press, New York, 1978. [2] Taiho Koh and E. Powers. Second-order volterra filtering and its application to nonlinear system identification. IEEE Transactions on Acoustics, Speech, and Signal Processing, 33(6):1445–1455, 1985. [3] Il Memming Park and Jonathan W. Pillow. Bayesian spike-triggered covariance analysis. Advances in Neural Information Processing Systems 24, pp 1692–1700, 2011. [4] E. P. Simoncelli, J. W. Pillow, L. Paninski, and O. Schwartz. Characterization of neural responses with stochastic stimuli. The Cognitive Neurosciences, III, chapter 23, pp 327–338. MIT Press, Cambridge, MA, October 2004. [5] L. Paninski. Maximum likelihood estimation of cascade point-process neural encoding models. Network: Computation in Neural Systems, 15:243–262, 2004. [6] S. Gerwinn, J. H. Macke, M. Seeger, and M. Bethge. Bayesian inference for spiking neuron models with a sparsity prior. Advances in Neural Information Processing Systems, pp 529–536, 2008. [7] J. Bussgang. Crosscorrelation functions of amplitude-distorted gaussian signals. RLE Technical Reports, 216, 1952. [8] E. deBoer and P. Kuyper. Triggered correlation. IEEE Transact. Biomed. Eng., 15, pp 169–179, 1968. [9] E. J. Chichilnisky. A simple white noise analysis of neuronal light responses. Network: Computation in Neural Systems, 12:199–213, 2001. [10] R. R. de Ruyter van Steveninck and W. Bialek. Real-time performance of a movement-senstivive neuron in the blowfly visual system: coding and information transmission in short spike sequences. Proc. R. Soc. Lond. B, 234:379–414, 1988. [11] O. Schwartz, J. W. Pillow, N. C. Rust, and E. P. Simoncelli. Spike-triggered neural characterization. J. Vision, 6(4):484–507, 7 2006. [12] RD Cook and S. Weisberg. Comment on ”sliced inverse regression for dimension reduction” by k.-c. li. Journal of the American Statistical Association, 86:328–332, 1991. [13] Ker-Chau Li. Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86(414):316–327, 1991. [14] Alexandro D. Ramirez and Liam Paninski. Fast inference in generalized linear models via expected log-likelihoods. Journal of Computational Neuroscience, pp 1–20, 2013. [15] W. Truccolo, U. T. Eden, M. R. Fellows, J. P. Donoghue, and E. N. Brown. A point process framework for relating neural spiking activity to spiking history, neural ensemble and extrinsic covariate effects. J. Neurophysiol, 93(2):1074–1089, 2005. [16] J. W. Pillow, J. Shlens, L. Paninski, A. Sher, A. M. Litke, and E. P. Chichilnisky, E. J. Simoncelli. Spatiotemporal correlations and visual signaling in a complete neuronal population. Nature, 454:995–999, 2008. [17] L. Paninski. Convergence properties of some spike-triggered analysis techniques. Network: Computation in Neural Systems, 14:437–464, 2003. [18] J. W. Pillow and E. P. Simoncelli. Dimensionality reduction in neural models: An information-theoretic generalization of spike-triggered average and covariance analysis. J. Vision, 6(4):414–428, 4 2006. [19] In´es Samengo and Tim Gollisch. Spike-triggered covariance: geometric proof, symmetry properties, and extension beyond gaussian stimuli. Journal of Computational Neuroscience, 34(1):137–161, 2013. [20] Tatyana Sharpee, Nicole C. Rust, and William Bialek. Analyzing neural responses to natural signals: maximally informative dimensions. Neural Comput, 16(2):223–250, Feb 2004. [21] R. S. Williamson, M. Sahani, and J. W. Pillow. Equating information-theoretic and likelihood-based methods for neural dimensionality reduction. arXiv:1308.3542 [q-bio.NC], 2013. [22] J. D. Fitzgerald, R. J. Rowekamp, L. C. Sincich, and T. O. Sharpee. Second order dimensionality reduction using minimum and maximum mutual information models. PLoS Comput Biol, 7(10):e1002249, 2011. [23] K. Rajan and W. Bialek. Maximally informative ”stimulus energies” in the analysis of neural responses to natural signals. arXiv:1201.0321v1 [q-bio.NC], 2012. [24] James M. McFarland, Yuwei Cui, and Daniel A. Butts. Inferring nonlinear neuronal computation based on physiologically plausible inputs. PLoS Comput Biol, 9(7):e1003143+, July 2013. [25] L. Theis, A. M. Chagas, D. Arnstein, C. Schwarz, and M. Bethge. Beyond glms: A generative mixture modeling approach to neural system identification. PLoS Computational Biology, Nov 2013. in press. [26] A. M. Mathai and S. B. Provost. Quadratic forms in random variables: theory and applications. M. Dekker, 1992. [27] Y. S. Cho and E. J. Powers. Estimation of quadratically nonlinear systems with an i.i.d. input. [Proceedings] ICASSP 91: 1991 International Conference on Acoustics, Speech, and Signal Processing pp 3117–3120 vol.5. IEEE, 1991. [28] V. J. Uzzell and E. J. Chichilnisky. Precision of spike trains in primate retinal ganglion cells. Journal of Neurophysiology, 92:780–789, 2004. 9
2013
243
4,980
A Latent Source Model for Nonparametric Time Series Classification George H. Chen MIT georgehc@mit.edu Stanislav Nikolov Twitter snikolov@twitter.com Devavrat Shah MIT devavrat@mit.edu Abstract For classifying time series, a nearest-neighbor approach is widely used in practice with performance often competitive with or better than more elaborate methods such as neural networks, decision trees, and support vector machines. We develop theoretical justification for the effectiveness of nearest-neighbor-like classification of time series. Our guiding hypothesis is that in many applications, such as forecasting which topics will become trends on Twitter, there aren’t actually that many prototypical time series to begin with, relative to the number of time series we have access to, e.g., topics become trends on Twitter only in a few distinct manners whereas we can collect massive amounts of Twitter data. To operationalize this hypothesis, we propose a latent source model for time series, which naturally leads to a “weighted majority voting” classification rule that can be approximated by a nearest-neighbor classifier. We establish nonasymptotic performance guarantees of both weighted majority voting and nearest-neighbor classification under our model accounting for how much of the time series we observe and the model complexity. Experimental results on synthetic data show weighted majority voting achieving the same misclassification rate as nearest-neighbor classification while observing less of the time series. We then use weighted majority to forecast which news topics on Twitter become trends, where we are able to detect such “trending topics” in advance of Twitter 79% of the time, with a mean early advantage of 1 hour and 26 minutes, a true positive rate of 95%, and a false positive rate of 4%. 1 Introduction Recent years have seen an explosion in the availability of time series data related to virtually every human endeavor — data that demands to be analyzed and turned into valuable insights. A key recurring task in mining this data is being able to classify a time series. As a running example used throughout this paper, consider a time series that tracks how much activity there is for a particular news topic on Twitter. Given this time series up to present time, we ask “will this news topic go viral?” Borrowing Twitter’s terminology, we label the time series a “trend” and call its corresponding news topic a trending topic if the news topic goes viral; otherwise, the time series has label “not trend”. We seek to forecast whether a news topic will become a trend before it is declared a trend (or not) by Twitter, amounting to a binary classification problem. Importantly, we skirt the discussion of what makes a topic considered trending as this is irrelevant to our mathematical development.1 Furthermore, we remark that handling the case where a single time series can have different labels at different times is beyond the scope of this paper. 1While it is not public knowledge how Twitter defines a topic to be a trending topic, Twitter does provide information for which topics are trending topics. We take these labels to be ground truth, effectively treating how a topic goes viral to be a black box supplied by Twitter. 1 Numerous standard classification methods have been tailored to classify time series, yet a simple nearest-neighbor approach is hard to beat in terms of classification performance on a variety of datasets [20], with results competitive to or better than various other more elaborate methods such as neural networks [15], decision trees [16], and support vector machines [19]. More recently, researchers have examined which distance to use with nearest-neighbor classification [2, 7, 18] or how to boost classification performance by applying different transformations to the time series before using nearest-neighbor classification [1]. These existing results are mostly experimental, lacking theoretical justification for both when nearest-neighbor-like time series classifiers should be expected to perform well and how well. If we don’t confine ourselves to classifying time series, then as the amount of data tends to infinity, nearest-neighbor classification has been shown to achieve a probability of error that is at worst twice the Bayes error rate, and when considering the nearest k neighbors with k allowed to grow with the amount of data, then the error rate approaches the Bayes error rate [5]. However, rather than examining the asymptotic case where the amount of data goes to infinity, we instead pursue nonasymptotic performance guarantees in terms of how large of a training dataset we have and how much we observe of the time series to be classified. To arrive at these nonasymptotic guarantees, we impose a low-complexity structure on time series. Our contributions. We present a model for which nearest-neighbor-like classification performs well by operationalizing the following hypothesis: In many time series applications, there are only a small number of prototypical time series relative to the number of time series we can collect. For example, posts on Twitter are generated by humans, who are often behaviorally predictable in aggregate. This suggests that topics they post about only become trends on Twitter in a few distinct manners, yet we have at our disposal enormous volumes of Twitter data. In this context, we present a novel latent source model: time series are generated from a small collection of m unknown latent sources, each having one of two labels, say “trend” or “not trend”. Our model’s maximum a posteriori (MAP) time series classifier can be approximated by weighted majority voting, which compares the time series to be classified with each of the time series in the labeled training data. Each training time series casts a weighted vote in favor of its ground truth label, with the weight depending on how similar the time series being classified is to the training example. The final classification is “trend” or “not trend” depending on which label has the higher overall vote. The voting is nonparametric in that it does not learn parameters for a model and is driven entirely by the training data. The unknown latent sources are never estimated; the training data serve as a proxy for these latent sources. Weighted majority voting itself can be approximated by a nearest-neighbor classifier, which we also analyze. Under our model, we show sufficient conditions so that if we have n = ⇥(m log m δ ) time series in our training data, then weighted majority voting and nearest-neighbor classification correctly classify a new time series with probability at least 1 −δ after observing its first ⌦(log m δ ) time steps. As our analysis accounts for how much of the time series we observe, our results readily apply to the “online” setting in which a time series is to be classified while it streams in (as is the case for forecasting trending topics) as well as the “offline” setting where we have access to the entire time series. Also, while our analysis yields matching error upper bounds for the two classifiers, experimental results on synthetic data suggests that weighted majority voting outperforms nearest-neighbor classification early on when we observe very little of the time series to be classified. Meanwhile, a specific instantiation of our model leads to a spherical Gaussian mixture model, where the latent sources are Gaussian mixture components. We show that existing performance guarantees on learning spherical Gaussian mixture models [6, 10, 17] require more stringent conditions than what our results need, suggesting that learning the latent sources is overkill if the goal is classification. Lastly, we apply weighted majority voting to forecasting trending topics on Twitter. We emphasize that our goal is precognition of trends: predicting whether a topic is going to be a trend before it is actually declared to be a trend by Twitter or, in theory, any other third party that we can collect ground truth labels from. Existing work that identify trends on Twitter [3, 4, 13] instead, as part of their trend detection, define models for what trends are, which we do not do, nor do we assume we have access to such definitions. (The same could be said of previous work on novel document detection on Twitter [11, 12].) In our experiments, weighted majority voting is able to predict whether a topic will be a trend in advance of Twitter 79% of the time, with a mean early advantage of 1 hour and 26 minutes, a true positive rate of 95%, and a false positive rate of 4%. We empirically find that the Twitter activity of a news topic that becomes a trend tends to follow one of a finite number of patterns, which could be thought of as latent sources. 2 Outline. Weighted majority voting and nearest-neighbor classification for time series are presented in Section 2. We provide our latent source model and theoretical performance guarantees of weighted majority voting and nearest-neighbor classification under this model in Section 3. Experimental results for synthetic data and forecasting trending topics on Twitter are in Section 4. 2 Weighted Majority Voting and Nearest-Neighbor Classification Given a time-series2 s : Z ! R, we want to classify it as having either label +1 (“trend”) or −1 (“not trend”). To do so, we have access to labeled training data R+ and R−, which denote the sets of all training time series with labels +1 and −1 respectively. Weighted majority voting. Each positively-labeled example r 2 R+ casts a weighted vote e−γd(T )(r,s) for whether time series s has label +1, where d(T )(r, s) is some measure of similarity between the two time series r and s, superscript (T) indicates that we are only allowed to look at the first T time steps (i.e., time steps 1, 2, . . . , T) of s (but we’re allowed to look outside of these time steps for the training time series r), and constant γ ≥0 is a scaling parameter that determines the “sphere of influence” of each example. Similarly, each negatively-labeled example in R−also casts a weighted vote for whether time series s has label −1. The similarity measure d(T )(r, s) could, for example, be squared Euclidean distance: d(T )(r, s) = PT t=1(r(t) −s(t))2 , kr −sk2 T . However, this similarity measure only looks at the first T time steps of training time series r. Since time series in our training data are known, we need not restrict our attention to their first T time steps. Thus, we use the following similarity measure: d(T )(r, s) = min ∆2{−∆max,...,0,...,∆max} T X t=1 (r(t+∆)−s(t))2 = min ∆2{−∆max,...,0,...,∆max} kr⇤∆−sk2 T , (1) where we minimize over integer time shifts with a pre-specified maximum allowed shift ∆max ≥0. Here, we have used q⇤∆to denote time series q advanced by ∆time steps, i.e., (q⇤∆)(t) = q(t+∆). Finally, we sum up all of the weighted +1 votes and then all of the weighted −1 votes. The label with the majority of overall weighted votes is declared as the label for s: bL(T )(s; γ) = ( +1 if P r2R+ e−γd(T )(r,s) ≥P r2R−e−γd(T )(r,s), −1 otherwise. (2) Using a larger time window size T corresponds to waiting longer before we make a prediction. We need to trade off how long we wait and how accurate we want our prediction. Note that knearest-neighbor classification corresponds to only considering the k nearest neighbors of s among all training time series; all other votes are set to 0. With k = 1, we obtain the following classifier: Nearest-neighbor classifier. Let br = arg minr2R+[R−d(T )(r, s) be the nearest neighbor of s. Then we declare the label for s to be: bL(T ) NN(s) = ⇢+1 if br 2 R+, −1 if br 2 R−. (3) 3 A Latent Source Model and Theoretical Guarantees We assume there to be m unknown latent sources (time series) that generate observed time series. Let V denote the set of all such latent sources; each latent source v : Z ! R in V has a true label +1 or −1. Let V+ ⇢V be the set of latent sources with label +1, and V−⇢V be the set of those with label −1. The observed time series are generated from latent sources as follows: 1. Sample latent source V from V uniformly at random.3 Let L 2 {±1} be the label of V . 2We index time using Z for notationally convenience but will assume time series to start at time step 1. 3While we keep the sampling uniform for clarity of presentation, our theoretical guarantees can easily be extended to the case where the sampling is not uniform. The only change is that the number of training data needed will be larger by a factor of 1 m⇡min , where ⇡min is the smallest probability of a particular latent source occurring. 3 time activity +1 {1 +1 {1 +1 {1 Figure 1: Example of latent sources superimposed, where each latent source is shifted vertically in amplitude such that every other latent source has label +1 and the rest have label −1. 2. Sample integer time shift ∆uniformly from {0, 1, . . . , ∆max}. 3. Output time series S : Z ! R to be latent source V advanced by ∆time steps, followed by adding noise signal E : Z ! R, i.e., S(t) = V (t + ∆) + E(t). The label associated with the generated time series S is the same as that of V , i.e., L. Entries of noise E are i.i.d. zero-mean sub-Gaussian with parameter σ, which means that for any time index t, E[exp(λE(t))] exp ⇣1 2λ2σ2⌘ for all λ 2 R. (4) The family of sub-Gaussian distributions includes a variety of distributions, such as a zeromean Gaussian with standard deviation σ and a uniform distribution over [−σ, σ]. The above generative process defines our latent source model. Importantly, we make no assumptions about the structure of the latent sources. For instance, the latent sources could be tiled as shown in Figure 1, where they are evenly separated vertically and alternate between the two different classes +1 and −1. With a parametric model like a k-component Gaussian mixture model, estimating these latent sources could be problematic. For example, if we take any two adjacent latent sources with label +1 and cluster them, then this cluster could be confused with the latent source having label −1 that is sandwiched in between. Noise only complicates estimating the latent sources. In this example, the k-component Gaussian mixture model needed for label +1 would require k to be the exact number of latent sources with label +1, which is unknown. In general, the number of samples we need from a Gaussian mixture mixture model to estimate the mixture component means is exponential in the number of mixture components [14]. As we discuss next, for classification, we sidestep learning the latent sources altogether, instead using training data as a proxy for latent sources. At the end of this section, we compare our sample complexity for classification versus some existing sample complexities for learning Gaussian mixture models. Classification. If we knew the latent sources and if noise entries E(t) were i.i.d. N(0, 1 2γ ) across t, then the maximum a posteriori (MAP) estimate for label L given an observed time series S = s is bL(T ) MAP(s; γ) = ( +1 if ⇤(T ) MAP(s; γ) ≥1, −1 otherwise, (5) where ⇤(T ) MAP(s; γ) , P v+2V+ P ∆+2D+ exp ( −γkv+ ⇤∆+ −sk2 T ) P v−2V− P ∆−2D+ exp ( −γkv−⇤∆−−sk2 T ), (6) and D+ , {0, . . . , ∆max}. However, we do not know the latent sources, nor do we know if the noise is i.i.d. Gaussian. We assume that we have access to training data as given in Section 2. We make a further assumption that the training data were sampled from the latent source model and that we have n different training time series. Denote D , {−∆max, . . . , 0, . . . , ∆max}. Then we approximate the MAP classifier by using training data as a proxy for the latent sources. Specifically, we take ratio (6), replace the inner sum by a minimum in the exponent, replace V+ and V−by R+ and R−, and replace D+ by D to obtain the ratio: ⇤(T )(s; γ) , P r+2R+ exp ( −γ ( min∆+2D kr+ ⇤∆+ −sk2 T )) P r−2R−exp ( −γ ( min∆−2D kr−⇤∆−−sk2 T )). (7) 4 Plugging ⇤(T ) in place of ⇤(T ) MAP in classification rule (5) yields the weighted majority voting rule (2). Note that weighted majority voting could be interpreted as a smoothed nearest-neighbor approximation whereby we only consider the time-shifted version of each example time series that is closest to the observed time series s. If we didn’t replace the summations over time shifts with minimums in the exponent, then we have a kernel density estimate in the numerator and in the denominator [9, Chapter 7] (where the kernel is Gaussian) and our main theoretical result for weighted majority voting to follow would still hold using the same proof.4 Lastly, applications may call for trading off true and false positive rates. We can do this by generalizing decision rule (5) to declare the label of s to be +1 if ⇤(T )(s, γ) ≥✓and vary parameter ✓> 0. The resulting decision rule, which we refer to as generalized weighted majority voting, is thus: bL(T ) ✓ (s; γ) = ⇢+1 if ⇤(T )(s, γ) ≥✓, −1 otherwise, (8) where setting ✓= 1 recovers the usual weighted majority voting (2). This modification to the classifier can be thought of as adjusting the priors on the relative sizes of the two classes. Our theoretical results to follow actually cover this more general case rather than only that of ✓= 1. Theoretical guarantees. We now present the main theoretical results of this paper which identify sufficient conditions under which generalized weighted majority voting (8) and nearest-neighbor classification (3) can classify a time series correctly with high probability, accounting for the size of the training dataset and how much we observe of the time series to be classified. First, we define the “gap” between R+ and R−restricted to time length T and with maximum time shift ∆max as: G(T )(R+, R−, ∆max) , min r+2R+,r−2R−, ∆+,∆−2D kr+ ⇤∆+ −r−⇤∆−k2 T . (9) This quantity measures how far apart the two different classes are if we only look at length-T chunks of each time series and allow all shifts of at most ∆max time steps in either direction. Our first main result is stated below. We defer proofs to the longer version of this paper. Theorem 1. (Performance guarantee for generalized weighted majority voting) Let m+ = |V+| be the number of latent sources with label +1, and m−= |V−| = m −m+ be the number of latent sources with label −1. For any β > 1, under the latent source model with n > βm log m time series in the training data, the probability of misclassifying time series S with label L using generalized weighted majority voting bL(T ) ✓ (·; γ) satisfies the bound P(bL(T ) ✓ (S; γ) 6= L)  ⇣✓m+ m + m− ✓m ⌘ (2∆max + 1)n exp ( −(γ −4σ2γ2)G(T )(R+, R−, ∆max) ) + m−β+1. (10) An immediate consequence is that given error tolerance δ 2 (0, 1) and with choice γ 2 (0, 1 4σ2 ), then upper bound (10) is at most δ (by having each of the two terms on the right-hand side be δ 2) if n > m log 2m δ (i.e., β = 1 + log 2 δ / log m), and G(T )(R+, R−, ∆max) ≥log( ✓m+ m + m− ✓m ) + log(2∆max + 1) + log n + log 2 δ γ −4σ2γ2 . (11) This means that if we have access to a large enough pool of labeled time series, i.e., the pool has ⌦(m log m δ ) time series, then we can subsample n = ⇥(m log m δ ) of them to use as training data. Then with choice γ = 1 8σ2 , generalized weighted majority voting (8) correctly classifies a new time series S with probability at least 1 −δ if G(T )(R+, R−, ∆max) = ⌦ ✓ σ2⇣ log ⇣✓m+ m + m− ✓m ⌘ + log(2∆max + 1) + log m δ ⌘◆ . (12) Thus, the gap between sets R+ and R−needs to grow logarithmic in the number of latent sources m in order for weighted majority voting to classify correctly with high probability. Assuming that the 4We use a minimum rather a summation over time shifts to make the method more similar to existing time series classification work (e.g., [20]), which minimize over time warpings rather than simple shifts. 5 original unknown latent sources are separated (otherwise, there is no hope to distinguish between the classes using any classifier) and the gap in the training data grows as G(T )(R+, R−, ∆max) = ⌦(σ2T) (otherwise, the closest two training time series from opposite classes are within noise of each other), then observing the first T = ⌦(log(✓+ 1 ✓) + log(2∆max + 1) + log m δ ) time steps from the time series is sufficient to classify it correctly with probability at least 1 −δ. A similar result holds for the nearest-neighbor classifier (3). Theorem 2. (Performance guarantee for nearest-neighbor classification) For any β > 1, under the latent source model with n > βm log m time series in the training data, the probability of misclassifying time series S with label L using the nearest-neighbor classifier bL(T ) NN(·) satisfies the bound P(bL(T ) NN(S) 6= L) (2∆max + 1)n exp ⇣ − 1 16σ2 G(T )(R+, R−, ∆max) ⌘ + m−β+1. (13) Our generalized weighted majority voting bound (10) with ✓= 1 (corresponding to regular weighted majority voting) and γ = 1 8σ2 matches our nearest-neighbor classification bound, suggesting that the two methods have similar behavior when the gap grows with T. In practice, we find weighted majority voting to outperform nearest-neighbor classification when T is small, and then as T grows large, the two methods exhibit similar performance in agreement with our theoretical analysis. For small T, it could still be fairly likely that the nearest neighbor found has the wrong label, dooming the nearest-neighbor classifier to failure. Weighted majority voting, on the other hand, can recover from this situation as there may be enough correctly labeled training time series close by that contribute to a higher overall vote for the correct class. This robustness of weighted majority voting makes it favorable in the online setting where we want to make a prediction as early as possible. Sample complexity of learning the latent sources. If we can estimate the latent sources accurately, then we could plug these estimates in place of the true latent sources in the MAP classifier and achieve classification performance close to optimal. If we restrict the noise to be Gaussian and assume ∆max = 0, then the latent source model corresponds to a spherical Gaussian mixture model. We could learn such a model using Dasgupta and Schulman’s modified EM algorithm [6]. Their theoretical guarantee depends on the true separation between the closest two latent sources, namely G(T )⇤, minv,v02V s.t. v6=v0 kv −v0k2 2, which needs to satisfy G(T )⇤≫σ2p T. Then with n = ⌦(max{1, σ2T G(T )⇤}m log m δ ), G(T )⇤= ⌦(σ2 log m " ), and T = ⌦ ✓ max ⇢ 1, σ4T 2 (G(T )⇤)2 , log m δ max ⇢ 1, σ4T 2 (G(T )⇤)2 ,.◆ , (14) their algorithm achieves, with probability at least 1 −δ, an additive "σ p T error (in Euclidean distance) close to optimal in estimating every latent source. In contrast, our result is in terms of gap G(T )(R+, R−, ∆max) that depends not on the true separation between two latent sources but instead on the minimum observed separation in the training data between two time series of opposite labels. In fact, our gap, in their setting, grows as ⌦(σ2T) even when their gap G(T )⇤grows sublinear in T. In particular, while their result cannot handle the regime where O(σ2 log m δ ) G(T )⇤σ2p T, ours can, using n = ⇥(m log m δ ) training time series and observing the first T = ⌦(log m δ ) time steps to classify a time series correctly with probability at least 1 −δ; see the longer version of this paper for details. Vempala and Wang [17] have a spectral method for learning Gaussian mixture models that can handle smaller G(T )⇤than Dasgupta and Schulman’s approach but requires n = e⌦(T 3m2) training data, where we’ve hidden the dependence on σ2 and other variables of interest for clarity of presentation. Hsu and Kakade [10] have a moment-based estimator that doesn’t have a gap condition but, under a different non-degeneracy condition, requires substantially more samples for our problem setup, i.e., n = ⌦((m14 +Tm11)/"2) to achieve an " approximation of the mixture components. These results need substantially more training data than what we’ve shown is sufficient for classification. To fit a Gaussian mixture model to massive training datasets, in practice, using all the training data could be prohibitively expensive. In such scenarios, one could instead non-uniformly subsample O(Tm3/"2) time series from the training data using the procedure given in [8] and then feed the resulting smaller dataset, referred to as an (m, ")-coreset, to the EM algorithm for learning the latent sources. This procedure still requires more training time series than needed for classification and lacks a guarantee that the estimated latent sources will be close to the true latent sources. 6 0 50 100 150 200 0 0.1 0.2 0.3 0.4 0.5 0.6 T Classification error rate on test data Weighted majority voting Nearest−neighbor classifier Oracle MAP classifier (a) 1 2 3 4 5 6 7 8 0 0.05 0.1 0.15 0.2 0.25 β Classification error rate on test data Weighted majority voting Nearest−neighbor classifier Oracle MAP classifier (b) Figure 2: Results on synthetic data. (a) Classification error rate vs. number of initial time steps T used; training set size: n = βm log m where β = 8. (b) Classification error rate at T = 100 vs. β. All experiments were repeated 20 times with newly generated latent sources, training data, and test data each time. Error bars denote one standard deviation above and below the mean value. time activity Figure 3: How news topics become trends on Twitter. The top left shows some time series of activity leading up to a news topic becoming trending. These time series superimposed look like clutter, but we can separate them into different clusters, as shown in the next five plots. Each cluster represents a “way” that a news topic becomes trending. 4 Experimental Results Synthetic data. We generate m = 200 latent sources, where each latent source is constructed by first sampling i.i.d. N(0, 100) entries per time step and then applying a 1D Gaussian smoothing filter with scale parameter 30. Half of the latent sources are labeled +1 and the other half −1. Then n = βm log m training time series are sampled as per the latent source model where the noise added is i.i.d. N(0, 1) and ∆max = 100. We similarly generate 1000 time series to use as test data. We set γ = 1/8 for weighted majority voting. For β = 8, we compare the classification error rates on test data for weighted majority voting, nearest-neighbor classification, and the MAP classifier with oracle access to the true latent sources as shown in Figure 2(a). We see that weighted majority voting outperforms nearest-neighbor classification but as T grows large, the two methods’ performances converge to that of the MAP classifier. Fixing T = 100, we then compare the classification error rates of the three methods using varying amounts of training data, as shown in Figure 2(b); the oracle MAP classifier is also shown but does not actually depend on training data. We see that as β increases, both weighted majority voting and nearest-neighbor classification steadily improve in performance. Forecasting trending topics on twitter. We provide only an overview of our Twitter results here, deferring full details to the longer version of this paper. We sampled 500 examples of trends at random from a list of June 2012 news trends, and 500 examples of non-trends based on phrases appearing in user posts during the same month. As we do not know how Twitter chooses what phrases are considered as candidate phrases for trending topics, it’s unclear what the size of the 7 (a) (b) (c) Figure 4: Results on Twitter data. (a) Weighted majority voting achieves a low error rate (FPR of 4%, TPR of 95%) and detects trending topics in advance of Twitter 79% of the time, with a mean of 1.43 hours when it does; parameters: γ = 10, T = 115, Tsmooth = 80, h = 7. (b) Envelope of all ROC curves shows the tradeoff between TPR and FPR. (c) Distribution of detection times for “aggressive” (top), “conservative” (bottom) and “in-between” (center) parameter settings. non-trend category is in comparison to the size of the trend category. Thus, for simplicity, we intentionally control for the class sizes by setting them equal. In practice, one could still expressly assemble the training data to have pre-specified class sizes and then tune ✓for generalized weighted majority voting (8). In our experiments, we use the usual weighted majority voting (2) (i.e., ✓= 1) to classify time series, where ∆max is set to the maximum possible (we consider all shifts). Per topic, we created its time series based on a pre-processed version of the raw rate of how often the topic was shared, i.e., its Tweet rate. We empirically found that how news topics become trends tends to follow a finite number of patterns; a few examples of these patterns are shown in Figure 3. We randomly divided the set of trends and non-trends into into two halves, one to use as training data and one to use as test data. We applied weighted majority voting, sweeping over γ, T, and data pre-processing parameters. As shown in Figure 4(a), one choice of parameters allows us to detect trending topics in advance of Twitter 79% of the time, and when we do, we detect them an average of 1.43 hours earlier. Furthermore, we achieve a true positive rate (TPR) of 95% and a false positive rate (FPR) of 4%. Naturally, there are tradeoffs between TPR, FPR, and how early we make a prediction (i.e., how small T is). As shown in Figure 4(c), an “aggressive” parameter setting yields early detection and high TPR but high FPR, and a “conservative” parameter setting yields low FPR but late detection and low TPR. An “in-between” setting can strike the right balance. Acknowledgements. This work was supported in part by the Army Research Office under MURI Award 58153-MA-MUR. GHC was supported by an NDSEG fellowship. 8 References [1] Anthony Bagnall, Luke Davis, Jon Hills, and Jason Lines. Transformation based ensembles for time series classification. In Proceedings of the 12th SIAM International Conference on Data Mining, pages 307–319, 2012. [2] Gustavo E.A.P.A. Batista, Xiaoyue Wang, and Eamonn J. Keogh. A complexity-invariant distance measure for time series. In Proceedings of the 11th SIAM International Conference on Data Mining, pages 699–710, 2011. [3] Hila Becker, Mor Naaman, and Luis Gravano. Beyond trending topics: Real-world event identification on Twitter. In Proceedings of the Fifth International Conference on Weblogs and Social Media, 2011. [4] Mario Cataldi, Luigi Di Caro, and Claudio Schifanella. Emerging topic detection on twitter based on temporal and social terms evaluation. In Proceedings of the 10th International Workshop on Multimedia Data Mining, 2010. [5] Thomas M. Cover and Peter E. Hart. Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1):21–27, 1967. [6] Sanjoy Dasgupta and Leonard Schulman. A probabilistic analysis of EM for mixtures of separated, spherical gaussians. Journal of Machine Learning Research, 8:203–226, 2007. [7] Hui Ding, Goce Trajcevski, Peter Scheuermann, Xiaoyue Wang, and Eamonn Keogh. Querying and mining of time series data: experimental comparison of representations and distance measures. Proceedings of the VLDB Endowment, 1(2):1542–1552, 2008. [8] Dan Feldman, Matthew Faulkner, and Andreas Krause. Scalable training of mixture models via coresets. In Advances in Neural Information Processing Systems 24, 2011. [9] Keinosuke Fukunaga. Introduction to statistical pattern recognition (2nd ed.). Academic Press Professional, Inc., 1990. [10] Daniel Hsu and Sham M. Kakade. Learning mixtures of spherical gaussians: Moment methods and spectral decompositions, 2013. arXiv:1206.5766. [11] Shiva Prasad Kasiviswanathan, Prem Melville, Arindam Banerjee, and Vikas Sindhwani. Emerging topic detection using dictionary learning. In Proceedings of the 20th ACM Conference on Information and Knowledge Management, pages 745–754, 2011. [12] Shiva Prasad Kasiviswanathan, Huahua Wang, Arindam Banerjee, and Prem Melville. Online l1dictionary learning with application to novel document detection. In Advances in Neural Information Processing Systems 25, pages 2267–2275, 2012. [13] Michael Mathioudakis and Nick Koudas. Twittermonitor: trend detection over the Twitter stream. In Proceedings of the 2010 ACM SIGMOD International Conference on Management of Data, 2010. [14] Ankur Moitra and Gregory Valiant. Settling the polynomial learnability of mixtures of gaussians. In 51st Annual IEEE Symposium on Foundations of Computer Science, pages 93–102, 2010. [15] Alex Nanopoulos, Rob Alcock, and Yannis Manolopoulos. Feature-based classification of time-series data. International Journal of Computer Research, 10, 2001. [16] Juan J. Rodr´ıguez and Carlos J. Alonso. Interval and dynamic time warping-based decision trees. In Proceedings of the 2004 ACM Symposium on Applied Computing, 2004. [17] Santosh Vempala and Grant Wang. A spectral algorithm for learning mixture models. Journal of Computer and System Sciences, 68(4):841–860, 2004. [18] Kilian Q. Weinberger and Lawrence K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009. [19] Yi Wu and Edward Y. Chang. Distance-function design and fusion for sequence data. In Proceedings of the 2004 ACM International Conference on Information and Knowledge Management, 2004. [20] Xiaopeng Xi, Eamonn J. Keogh, Christian R. Shelton, Li Wei, and Chotirat Ann Ratanamahatana. Fast time series classification using numerosity reduction. In Proceedings of the 23rd International Conference on Machine Learning, 2006. 9
2013
244
4,981
PAC-Bayes-Empirical-Bernstein Inequality Ilya Tolstikhin Computing Centre Russian Academy of Sciences iliya.tolstikhin@gmail.com Yevgeny Seldin Queensland University of Technology UC Berkeley yevgeny.seldin@gmail.com Abstract We present a PAC-Bayes-Empirical-Bernstein inequality. The inequality is based on a combination of the PAC-Bayesian bounding technique with an Empirical Bernstein bound. We show that when the empirical variance is significantly smaller than the empirical loss the PAC-Bayes-Empirical-Bernstein inequality is significantly tighter than the PAC-Bayes-kl inequality of Seeger (2002) and otherwise it is comparable. Our theoretical analysis is confirmed empirically on a synthetic example and several UCI datasets. The PAC-Bayes-Empirical-Bernstein inequality is an interesting example of an application of the PAC-Bayesian bounding technique to self-bounding functions. 1 Introduction PAC-Bayesian analysis is a general and powerful tool for data-dependent analysis in machine learning. By now it has been applied in such diverse areas as supervised learning [1–4], unsupervised learning [4, 5], and reinforcement learning [6]. PAC-Bayesian analysis combines the best aspects of PAC learning and Bayesian learning: (1) it provides strict generalization guarantees (like VCtheory), (2) it is flexible and allows the incorporation of prior knowledge (like Bayesian learning), and (3) it provides data-dependent generalization guarantees (akin to Radamacher complexities). PAC-Bayesian analysis provides concentration inequalities for the divergence between expected and empirical loss of randomized prediction rules. For a hypothesis space H a randomized prediction rule associated with a distribution ρ over H operates by picking a hypothesis at random according to ρ from H each time it has to make a prediction. If ρ is a delta-distribution we recover classical prediction rules that pick a single hypothesis h ∈H. Otherwise, the prediction strategy resembles Bayesian prediction from the posterior distribution, with a distinction that ρ does not have to be the Bayes posterior. Importantly, many of PAC-Bayesian inequalities hold for all posterior distributions ρ simultaneously (with high probability over a random draw of a training set). Therefore, PACBayesian bounds can be used in two ways. Ideally, we prefer to derive new algorithms that find the posterior distribution ρ that minimizes the PAC-Bayesian bound on the expected loss. However, we can also use PAC-Bayesian bounds in order to estimate the expected loss of posterior distributions ρ that were found by other algorithms, such as empirical risk minimization, regularized empirical risk minimization, Bayesian posteriors, and so forth. In such applications PAC-Bayesian bounds can be used to provide generalization guarantees for other methods and can be applied as a substitute for cross-validation in paratemer tuning (since the bounds hold for all posterior distributions ρ simultaneously, we can apply the bounds to test multiple posterior distributions ρ without suffering from over-fitting, in contrast with extensive applications of cross-validation). There are two forms of PAC-Bayesian inequalities that are currently known to be the tightest depending on a situation. One is the PAC-Bayes-kl inequality of Seeger [7] and the other is the PACBayes-Bernstein inequality of Seldin et. al. [8]. However, the PAC-Bayes-Bernstein inequality is expressed in terms of the true expected variance, which is rarely accessible in practice. Therefore, in order to apply the PAC-Bayes-Bernstein inequality we need an upper bound on the expected variance 1 (or, more precisely, on the average of the expected variances of losses of each hypothesis h ∈H weighted according to the randomized prediction rule ρ). If the loss is bounded in the [0, 1] interval the expected variance can be upper bounded by the expected loss and this bound can be used to recover the PAC-Bayes-kl inequality from the PAC-Bayes-Bernstein inequality (with slightly suboptimal constants and suboptimal behavior for small sample sizes). In fact, for the binary loss this result cannot be significantly improved (see Section 3). However, when the loss is not binary it may be possible to obtain a tighter bound on the variance, which will lead to a tighter bound on the loss than the PAC-Bayes-kl inequality. For example, in Seldin et. al. [6] a deterministic upper bound on the variance of importance-weighted sampling combined with PAC-Bayes-Bernstein inequality yielded an order of magnitude improvement relative to application of PAC-Bayes-kl inequality to the same problem. We note that the bound on the variance used by Seldin et. al. [6] depends on specific properties of importance-weighted sampling and does not apply to other problems. In this work we derive the PAC-Bayes-Empirical-Bernstein bound, in which the expected average variance of the loss weighted by ρ is replaced by the weighted average of the empirical variance of the loss. Bounding the expected variance by the empirical variance is generally tighter than bounding it by the empirical loss. Therefore, the PAC-Bayes-Empirical-Bernstein bound is generally tighter than the PAC-Bayes-kl bound, although the exact comparison also depends on the divergence between the posterior and the prior and the sample size. In Section 5 we provide an empirical comparison of the two bounds on several synthetic and UCI datasets. The PAC-Bayes-Empirical-Bernstein bound is derived in two steps. In the first step we combine the PAC-Bayesian bounding technique with the Empirical Bernstein inequality [9] and derive a PACBayesian bound on the variance. The PAC-Bayesian bound on the variance bounds the divergence between averages [weighted by ρ] of expected and empirical variances of the losses of hypotheses in H and holds with high probability for all averaging distributions ρ simultaneously. In the second step the PAC-Bayesian bound on the variance is substituted into the PAC-Bayes-Bernstein inequality yielding the PAC-Bayes-Empirical-Bernstein bound. The remainder of the paper is organized as follows. We start with some formal definitions and review the major PAC-Bayesian bounds in Section 2, provide our main results in Section 3 and their proof sketches in Section 4, and finish with experiments in Section 5 and conclusions in Section 6. Detailed proofs are provided in the supplementary material. 2 Problem Setting and Background We start with providing the problem setting and then give some background on PAC-Bayesian analysis. 2.1 Notations and Definitions We consider supervised learning setting with an input space X, an output space Y, an i.i.d. training sample S = {(Xi, Yi)}n i=1 drawn according to an unknown distribution D on the product-space X × Y, a loss function ℓ: Y2 →[0, 1], and a hypothesis class H. The elements of H are functions h: X →Y from the input space to the output space. We use ℓh(X, Y ) = ℓ(Y, h(X)) to denote the loss of a hypothesis h on a pair (X, Y ). For a fixed hypothesis h ∈H denote its expected loss by L(h) = E(X,Y )∼D[ℓh(X, Y )], the empirical loss Ln(h) = 1 n Pn i=1 ℓh(Xi, Yi), and the variance of the loss V(h) = Var(X,Y )∼D[ℓh(X, Y )] = E(X,Y )∼D hℓh(X, Y ) −E(X,Y )∼D [ℓh(X, Y )] 2i . We define Gibbs regression rule Gρ associated with a distribution ρ over H in the following way: for each point X Gibbs regression rule draws a hypothesis h according to ρ and applies it to X. The expected loss of Gibbs regression rule is denoted by L(Gρ) = Eh∼ρ[L(h)] and the empirical loss is denoted by Ln(Gρ) = Eh∼ρ[Ln(h)]. We use KL(ρ∥π) = Eh∼ρ h ln ρ(h) π(h) i to denote the KullbackLeibler divergence between two probability distributions [10]. For two Bernoulli distributions with biases p and q we use kl(q∥p) as a shorthand for KL([q, 1 −q]∥[p, 1 −p]). In the sequel we use Eρ [·] as a shorthand for Eh∼ρ [·]. 2 2.2 PAC-Bayes-kl bound Before presenting our results we review several existing PAC-Bayesian bounds. The result in Theorem 1 was presented by Maurer [11, Theorem 5] and is one of the tightest known concentration bounds on the expected loss of Gibbs regression rule. Theorem 1 generalizes (and slightly tightens) PAC-Bayes-kl inequality of Seeger [7, Theorem 1] from binary to arbitrary loss functions bounded in the [0, 1] interval. Theorem 1. For any fixed probability distribution π over H, for any n ≥8 and δ > 0, with probability greater than 1 −δ over a random draw of a sample S, for all distributions ρ over H simultaneously: kl Ln(Gρ)∥L(Gρ)  ≤KL(ρ∥π) + ln 2√n δ n . (1) Since by Pinsker’s inequality |p −q| ≤ p kl(q∥p)/2, Theorem 1 directly implies (up to minor factors) the more explicit PAC-Bayesian bound of McAllester [12]: L(Gρ) ≤Ln(Gρ) + s KL(ρ∥π) + ln 2√n δ 2n , (2) which holds with probability greater than 1 −δ for all ρ simultaneously. We note that kl is easy to invert numerically and for small values of Ln(Gρ) (less than 1/4) the implicit bound in (1) is significantly tighter than the explicit bound in (2). This can be seen from another relaxation suggested by McAllester [2], which follows from (1) by the inequality p ≤q + p 2qkl(q∥p) + 2kl(q∥p) for p < q: L(Gρ) ≤Ln(Gρ) + v u u t2Ln(Gρ)  KL(ρ∥π) + ln 2√n δ  n + 2  KL(ρ∥π) + ln 2√n δ  n . (3) From inequality (3) we clearly see that inequality (1) achieves “fast convergence rate” or, in other words, when L(Gρ) is zero (or small compared to 1/√n) the bound converges at the rate of 1/n rather than 1/√n as a function of n. 2.3 PAC-Bayes-Bernstein Bound Seldin et. al. [8] introduced a general technique for combining PAC-Bayesian analysis with concentration of measure inequalities and derived the PAC-Bayes-Bernstein bound cited below. (The PAC-Bayes-Bernstein bound of Seldin et. al. holds for martingale sequences, but for simplicity in this paper we restrict ourselves to i.i.d. variables.) Theorem 2. For any fixed distribution π over H, for any δ1 > 0, and for any fixed c1 > 1, with probability greater than 1 −δ1 (over a draw of S) we have L(Gρ) ≤Ln(Gρ) + (1 + c1) v u u t(e −2)Eρ[V(h)]  KL(ρ∥π) + ln ν1 δ1  n (4) simultaneously for all distributions ρ over H that satisfy s KL(ρ∥π) + ln ν1 δ1 (e −2)Eρ[V(h)] ≤√n, where ν1 = & 1 ln c1 ln s (e −2)n 4 ln(1/δ1) !' + 1, and for all other ρ we have: L(Gρ) ≤Ln(Gρ) + 2 KL(ρ∥π) + ln ν1 δ1 n . Furthermore, the result holds if Eρ [V(h)] is replaced by an upper bound ¯V (ρ), as long as Eρ [V(h)] ≤¯V (ρ) ≤1 4 for all ρ. 3 A few comments on Theorem 2 are in place here. First, we note that Seldin et. al. worked with cumulative losses and variances, whereas we work with normalized losses and variances, which means that their losses and variances differ by a multiplicative factor of n from our definitions. Second, we note that the statement on the possibility of replacing Eρ [V(h)] by an upper bound is not part of [8, Theorem 8], but it is mentioned and analyzed explicitly in the text. The requirement that ¯V (ρ) ≤1 4 is not mentioned explicitly, but it follows directly from the necessity to preserve the relevant range of the trade-off parameter λ in the proof of the theorem. Since 1 4 is a trivial upper bound on the variance of a random variable bounded in the [0, 1] interval, the requirement is not a limitation. Finally, we note that since we are working with “one-sided” variables (namely, the loss is bounded in the [0, 1] interval rather than “two-sided” [−1, 1] interval, which was considered in [8]) the variance is bounded by 1 4 (rather than 1), which leads to a slight improvement in the value of ν1. Since in reality we rarely have access to the expected variance Eρ [V(h)] the tightness of Theorem 2 entirely depends on the tightness of the upper bound ¯V (ρ). If we use the trivial upper bound Eρ [V(h)] ≤1 4 the result is roughly equivalent to (2), which is inferior to Theorem 1. Design of a tighter upper bound on Eρ [V(h)] that holds for all ρ simultaneously is the subject of the following section. 3 Main Results The key result of our paper is a PAC-Bayesian bound on the average expected variance Eρ [V(h)] given in terms of the average empirical variance Eρ[Vn(h)] = Eh∼ρ[Vn(h)], where Vn(h) = 1 n −1 n X i=1 ℓh(Xi, Yi) −Ln(h) 2 (5) is an unbiased estimate of the variance V(h). The bound is given in Theorem 3 and it holds with high probability for all distributions ρ simultaneously. Substitution of this bound into Theorem 2 yields the PAC-Bayes-Empirical-Bernstein inequality given in Theorem 4. Thus, the PAC-BayesEmpirical-Bernstein inequality is based on two subsequent applications of the PAC-Bayesian bounding technique. 3.1 PAC-Bayesian bound on the variance Theorem 3 is based on an application of the PAC-Bayesian bounding technique to the difference Eρ [V(h)] −Eρ [Vn(h)]. We note that Vn(h) is a second-order U-statistics [13] and Theorem 3 provides an interesting example of combining PAC-Bayesian analysis with concentration inequalities for self-bounding functions. Theorem 3. For any fixed distribution π over H, any c2 > 1 and δ2 > 0, with probability greater than 1 −δ2 over a draw of S, for all distributions ρ over H simultaneously: Eρ[V(h)] ≤Eρ[Vn(h)] + (1 + c2) v u u tEρ [Vn(h)]  KL(ρ∥π) + ln ν2 δ2  2(n −1) + 2c2  KL(ρ∥π) + ln ν2 δ2  n −1 , (6) where ν2 = & 1 ln c2 ln 1 2 s n −1 ln(1/δ2) + 1 + 1 2 !' . Note that (6) closely resembles the explicit bound on L(Gρ) in (3). If the empirical variance Vn(h) is close to zero the impact of the second term of the bound (that scales with 1/√n) is relatively small and we obtain “fast convergence rate” of Eρ [Vn(h)] to Eρ [V(h)]. Finally, we note that the impact of c2 on ln ν2 is relatively small and so c2 can be taken very close to 1. 3.2 PAC-Bayes-Empirical-Bernstein bound Theorem 3 controls the average variance Eρ[V(h)] for all posterior distributions ρ simultaneously. By taking δ1 = δ2 = δ 2 we have the claims of Theorems 2 and 3 holding simultaneously with 4 probability greater than 1 −δ. Substitution of the bound on Eρ [V(h)] from Theorem 3 into the PAC-Bayes-Bernstein inequality in Theorem 2 yields the main result of our paper, the PAC-BayesEmpirical-Bernstein inequality, that controls the loss of Gibbs regression rule Eρ [L(h)] for all posterior distributions ρ simultaneously. Theorem 4. Let Vn(ρ) denote the right hand side of (6) (with δ2 = δ 2) and let ¯Vn(ρ) = min Vn(ρ), 1 4  . For any fixed distribution π over H, for any δ > 0, and for any c1, c2 > 1, with probability greater than 1 −δ (over a draw of S) we have: L(Gρ) ≤Ln(Gρ) + (1 + c1) s (e −2) ¯Vn(ρ) KL(ρ∥π) + ln 2ν1 δ  n (7) simultaneously for all distributions ρ over H that satisfy s KL(ρ∥π) + ln 2ν1 δ (e −2) ¯Vn(ρ) ≤√n, where ν1 was defined in Theorem 2 (with δ1 = δ 2), and for all other ρ we have: L(Gρ) ≤Ln(Gρ) + 2KL(ρ∥π) + ln 2ν1 δ n . Note that all the quantities in Theorem 4 are computable based on the sample. As we can see immediately by comparing the O(1/√n) term in PAC-Bayes-Empirical-Bernstein inequality (PB-EB for brevity) with the corresponding term in the relaxed version of the PAC-Bayeskl inequality (PB-kl for brevity) in equation (3), the PB-EB inequality can potentially be tighter when Eρ [Vn(h)] ≤(1/(2(e −2)))Ln(Gρ) ≈0.7Ln(Gρ). We also note that when the loss is bounded in the [0,1] interval we have Vn(h) ≤(n/(n −1))Ln(h) (since ℓh(X, Y )2 ≤ℓh(X, Y )). Therefore, the PB-EB bound is never much worse than the PB-kl bound and if the empirical variance is small compared to the empirical loss it can be much tighter. We note that for the binary loss (ℓ(y, y′) ∈{0, 1}) we have V(h) = L(h)(1 −L(h)) and in this case the empirical variance cannot be significantly smaller than the empirical loss and PB-EB does not provide an advantage over PB-kl. We also note that the unrelaxed version of the PB-kl inequality in equation (1) has better behavior for very small sample sizes and in such cases PB-kl can be tighter than PB-EB even when the empirical variance is small. To summarize the discussion, when Eρ [Vn(h)] ≤0.7Ln(Gρ) the PB-EB inequality can be significantly tighter than the PB-kl bound and otherwise it is comparable (except for very small sample sizes). In Section 5 we provide a more detailed numerical comparison of the two inequalities. 4 Proofs In this section we present a sketch of a proof of Theorem 3 and a proof of Theorem 4. Full details of the proof of Theorem 3 are provided in the supplementary material. The proof of Theorem 3 is based on the following lemma, which is at the base of all PAC-Bayesian theorems. (Since we could not find a reference, where the lemma is stated explicitly its proof is provided in the supplementary material.) Lemma 1. For any function fn : H × (X × Y)n →R and for any distribution π over H, such that π is independent of S, with probability greater than 1 −δ over a random draw of S, for all distributions ρ over H simultaneously: Eρ [fn(h, S)] ≤KL(ρ∥π) + ln 1 δ + ln Eπ h ES′∼Dn h efn(h,S′)ii . (8) The smart part is to choose fn(h, S) so that we get the quantities of interest on the left hand side of (8) and at the same time are able to bound the last term on the right hand side of (8). Bounding of the moment generating function (the last term in (8)) is usually done by involving some known concentration of measure results. In the proof of Theorem 3 we use the fact that nVn(h) satisfies the self-bounding property [14]. Specifically, for any λ > 0: ES∼Dn h eλ(nV(h)−nVn(h))−λ2 2 n2 n−1 V(h)i ≤1 (9) 5 0.001 0.01 0.1 0.001 0.01 0.1 Average empirical loss Average sample variance 1 1 2 2 1 1.5 2 2.5 (a) n = 1000 0.001 0.01 0.1 0.001 0.01 0.1 Average empirical loss Average sample variance 0.5 0.5 1 1 1 2 0.5 1 1.5 2 2.5 (b) n = 4000 Figure 1: The Ratio of the gap between PB-EB and Ln(Gρ) to the gap between PB-kl and Ln(Gρ) for different values of n, Eρ[Vn(h)], and Ln(Gρ). PB-EB is tighter below the dashed line with label 1. The axes of the graphs are in log scale. (see, for example, [9, Theorem 10]). We take fn(h, S) = λ nV(h) −nVn(h)  −λ2 2 n2 n−1V(h) and substitute fn and the bound on its moment generating function in (9) into (8). To complete the proof it is left to optimize the bound with respect to λ. Since it is impossible to minimize the bound simultaneously for all ρ with a single value of λ, we follow the technique suggested by Seldin et. al. and take a grid of λ-s in a form of a geometric progression and apply a union bound over this grid. Then, for each ρ we pick a value of λ from the grid, which is the closest to the value of λ that minimizes the bound for the corresponding ρ. (The approximation of the optimal λ by the closest λ from the grid is behind the factor c2 in the bound and the ln ν2 factor is the result of the union bound over the grid of λ-s.) Technical details of the derivation are provided in the supplementary material. Proof of Theorem 4. By our choice of δ1 = δ2 = δ 2 the upper bounds of Theorems 2 and 3 hold simultaneously with probability greater than 1 −δ. Therefore, with probability greater than 1 −δ2 we have Eρ [V(h)] ≤¯Vn(h) ≤1 4 and the result follows by Theorem 2. 5 Experiments Before presenting the experiments we present a general comparison of the behavior of the PB-EB and PB-kl bounds as a function of Ln(Gρ), Eρ [Vn(h)], and n. In Figure 1.a and 1.b we examine the ratio of the complexity parts of the two bounds PB-EB −Ln(Gρ) PB-kl −Ln(Gρ) , where PB-EB is used to denote the value of the PB-EB bound in equation (7) and PB-kl is used to denote the value of the PB-kl bound in equation (1). The ratio is presented in the Ln(Gρ) by Eρ [Vn(h)] plane for two values of n. In the illustrative comparison we took KL(ρ∥π) = 18 and in all the experiments presented in this section we take c1 = c2 = 1.15 and δ = 0.05. As we wrote in the discussion of Theorem 4, PB-EB is never much worse than PB-kl and when Eρ [Vn(h)] ≪ Ln(Gρ) it can be significantly tighter. In the illustrative comparison in Figure 1, in the worst case the ratio is slightly above 2.5 and in the best case it is slightly above 0.3. We note that as the sample size grows the worst case ratio decreases (asymptotically down to 1.2) and the improvement of the best case ratio is unlimited. As we already said, the advantage of the PB-EB inequality over the PB-kl inequality is most prominent in regression (for classification with zero-one loss it is roughly comparable to PB-kl). Below we provide regression experiments with L1 loss on synthetic data and three datasets from the UCI repository [15]. We use the PB-EB and PB-kl bounds to bound the loss of a regularized empirical 6 risk minimization algorithm. In all our experiments the inputs Xi lie in a d-dimensional unit ball centered at the origin (∥Xi∥2 ≤1) and the outputs Y take values in [−0.5, 0.5]. The hypothesis class HW is defined as HW = n hw(X) = ⟨w, X⟩: w ∈Rd, ∥w∥2 ≤0.5 o . This construction ensures that the L1 regression loss ℓ(y, y′) = |y −y′| is bounded in the [0, 1] interval. We use uniform prior distribution over HW defined by π(w) = V (1/2, d) −1, where V (r, d) is the volume of a d-dimensional ball with radius r. The posterior distribution ρ ˆw is taken to be a uniform distribution on a d-dimensional ball of radius ϵ centered at the weight vector ˆw, where ˆw is the solution of the following minimization problem: ˆw = arg min w 1 n n X i=1 |Yi −⟨w, Xi⟩| + λ∗∥w∥2 2. (10) Note that (10) is a quadratic program and can be solved by various numerical solvers (we used Matlab quadprog). The role of the regularization parameter λ∗∥w∥2 2 is to ensure that the posterior distribution is supported by HW . We use binary search in order to find the minimal (non-negative) λ∗, such that the posterior ρ ˆw is supported by HW (meaning that the ball of radius ϵ around ˆw is within the ball of radius 0.5 around the origin). In all the experiments below we used ϵ = 0.05. 5.1 Synthetic data Our synthetic datasets are produced as follows. We take inputs X1, . . . , Xn uniformly distributed in a d-dimensional unit ball centered at the origin. Then we define Yi = σ0 (50 · ⟨w0, Xi⟩) + ϵi with weight vector w0 ∈Rd, centred sigmoid function σ0(z) = 1 1+e−z −0.5 which takes values in [−0.5, 0.5], and noise ϵi independent of Xi and uniformly distributed in [−ai, ai] with ai = min 0.1, 0.5 −σ0(50 · ⟨w0, Xi⟩)  , for σ0(50 · ⟨w0, Xi⟩) ≥0; min 0.1, 0.5 + σ0(50 · ⟨w0, Xi⟩)  , for σ0(50 · ⟨w0, Xi⟩) < 0. This design ensures that Yi ∈[−0.5, 0.5]. The sigmoid function creates a mismatch between the data generating distribution and the linear hypothesis class. Together with relatively small level of the noise (ϵi ≤0.1) this results in small empirical variance of the loss Vn(h) and medium to high empirical loss Ln(h). Let us denote the j-th coordinate of a vector u ∈Rd by uj and the number of nonzero coordinates of u by ∥u∥0. We choose the weight vector w0 to have only a few nonzero coordinates and consider two settings. In the first setting d ∈{2, 5}, ∥w0∥0 = 2, w1 0 = 0.12, and w2 0 = −0.04 and in the second setting d ∈{3, 6}, ∥w0∥0 = 3, w1 0 = −0.08, w2 0 = 0.05, and w3 0 = 0.2. For each sample size ranging from 300 to 4000 we averaged the bounds over 10 randomly generated datasets. The results are presented in Figure 2. We see that except for very small sample sizes (n < 1000) the PB-EB bound outperforms the PB-kl bound. Inferior performance for very small sample sizes is a result of domination of the O(1/n) term in the PB-EB bound (7). As soon as n gets large enough this term significantly decreases and PB-EB dominates PB-kl. 5.2 UCI datasets We compare our PAC-Bayes-Empirical-Bernstein inequality (7) with the PAC-Bayes-kl inequality (1) on three UCI regression datasets: Wine Quality, Parkinsons Telemonitoring, and Concrete Compressive Strength. For each dataset we centred and normalised both outputs and inputs so that Yi ∈[−0.5, 0.5] and ∥Xi∥≤1. The results for 5-fold train-test split of the data together with basic descriptions of the datasets are presented in Table 1. 6 Conclusions and future work We derived a new PAC-Bayesian bound that controls the convergence of averages of empirical variances of losses of hypotheses in H to averages of expected variances of losses of hypothesis in H simultaneously for all averaging distributions ρ. This bound is an interesting example of combination 7 1000 2000 3000 0.2 0.25 0.3 0.35 0.4 Sample size Expected loss PB−EB PB−kl Train error Test error (a) d = 2, ∥w0∥0 = 2 1000 2000 3000 0.2 0.3 0.4 0.5 Sample size Expected loss PB−EB PB−kl Train error Test error (b) d = 5, ∥w0∥0 = 2 1000 2000 3000 0.2 0.3 0.4 0.5 Sample size Expected loss PB−EB PB−kl Train error Test error (c) d = 3, ∥w0∥0 = 3 1000 2000 3000 0.2 0.3 0.4 0.5 Sample size Expected loss PB−EB PB−kl Train error Test error (d) d = 6, ∥w0∥0 = 3 Figure 2: The values of the PAC-Bayes-kl and PAC-Bayes-Empirical-Bernstein bounds together with the test and train errors on synthetic data. The values are averaged over the 10 random draws of training and test sets. Table 1: Results for the UCI datasets Dataset n d Train Test PB-kl bound PB-EB bound winequality 6497 11 0.106 ± 0.0005 0.106 ± 0.0022 0.175 ± 0.0006 0.162 ± 0.0006 parkinsons 5875 16 0.188 ± 0.0014 0.188 ± 0.0055 0.266 ± 0.0013 0.250 ± 0.0012 concrete 1030 8 0.110 ± 0.0008 0.111 ± 0.0038 0.242 ± 0.0010 0.264 ± 0.0011 of PAC-Bayesian bounding technique with concentration inequalities for self-bounding functions. We applied the bound to derive the PAC-Bayes-Empirical-Bernstein inequality which is a powerful Bernstein-type inequality outperforming the state-of-the-art PAC-Bayes-kl inequality of Seeger [7] in situations, where the empirical variance is smaller than the empirical loss and otherwise comparable to PAC-Bayes-kl. We also demonstrated an empirical advantage of the new PAC-BayesEmpirical-Bernstein inequality over the PAC-Bayes-kl inequality on several synthetic and real-life regression datasets. Our work opens a number of interesting directions for future research. One of the most important of them is to derive algorithms that will directly minimize the PAC-Bayes-Empirical-Bernstein bound. Another interesting direction would be to decrease the last term in the bound in Theorem 3, as it is done in the PAC-Bayes-kl inequality. This can probably be achieved by deriving a PAC-Bayes-kl inequality for the variance. Acknowledgments The authors are thankful to Anton Osokin for useful discussions and to the anonymous reviewers for their comments. This research was supported by an Australian Research Council Australian Laureate Fellowship (FL110100281) and a Russian Foundation for Basic Research grants 13-0700677, 14-07-00847. References [1] John Langford and John Shawe-Taylor. PAC-Bayes & margins. In Advances in Neural Information Processing Systems (NIPS), 2002. [2] David McAllester. PAC-Bayesian stochastic model selection. Machine Learning, 51(1), 2003. [3] John Langford. Tutorial on practical prediction theory for classification. Journal of Machine Learning Research, 2005. [4] Yevgeny Seldin and Naftali Tishby. PAC-Bayesian analysis of co-clustering and beyond. Journal of Machine Learning Research, 11, 2010. [5] Matthew Higgs and John Shawe-Taylor. A PAC-Bayes bound for tailored density estimation. In Proceedings of the International Conference on Algorithmic Learning Theory (ALT), 2010. 8 [6] Yevgeny Seldin, Peter Auer, Franc¸ois Laviolette, John Shawe-Taylor, and Ronald Ortner. PACBayesian analysis of contextual bandits. In Advances in Neural Information Processing Systems (NIPS), 2011. [7] Matthias Seeger. PAC-Bayesian generalization error bounds for Gaussian process classification. Journal of Machine Learning Research, 2002. [8] Yevgeny Seldin, Franc¸ois Laviolette, Nicol`o Cesa-Bianchi, John Shawe-Taylor, and Peter Auer. PAC-Bayesian inequalities for martingales. IEEE Transactions on Information Theory, 58, 2012. [9] Andreas Maurer and Massimiliano Pontil. Empirical Bernstein bounds and sample variance penalization. In Proceedings of the International Conference on Computational Learning Theory (COLT), 2009. [10] Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. John Wiley & Sons, 1991. [11] Andreas Maurer. A note on the PAC-Bayesian theorem. www.arxiv.org, 2004. [12] David McAllester. Some PAC-Bayesian theorems. Machine Learning, 37, 1999. [13] A.W. Van Der Vaart. Asymptotic statistics. Cambridge University Press, 1998. [14] St´ephane Boucheron, G´abor Lugosi, and Olivier Bousquet. Concentration inequalities. In O. Bousquet, U.v. Luxburg, and G. R¨atsch, editors, Advanced Lectures in Machine Learning. Springer, 2004. [15] A. Asuncion and D.J. Newman. UCI machine learning repository, 2007. http://www.ics.uci.edu/∼mlearn/MLRepository.html. 9
2013
245
4,982
Convex Two-Layer Modeling ¨Ozlem Aslan Hao Cheng Dale Schuurmans Department of Computing Science, University of Alberta Edmonton, AB T6G 2E8, Canada {ozlem,hcheng2,dale}@cs.ualberta.ca Xinhua Zhang Machine Learning Research Group National ICT Australia and ANU xinhua.zhang@anu.edu.au Abstract Latent variable prediction models, such as multi-layer networks, impose auxiliary latent variables between inputs and outputs to allow automatic inference of implicit features useful for prediction. Unfortunately, such models are difficult to train because inference over latent variables must be performed concurrently with parameter optimization—creating a highly non-convex problem. Instead of proposing another local training method, we develop a convex relaxation of hidden-layer conditional models that admits global training. Our approach extends current convex modeling approaches to handle two nested nonlinearities separated by a non-trivial adaptive latent layer. The resulting methods are able to acquire two-layer models that cannot be represented by any single-layer model over the same features, while improving training quality over local heuristics. 1 Introduction Deep learning has recently been enjoying a resurgence [1, 2] due to the discovery that stage-wise pre-training can significantly improve the results of classical training methods [3–5]. The advantage of latent variable models is that they allow abstract “semantic” features of observed data to be represented, which can enhance the ability to capture predictive relationships between observed variables. In this way, latent variable models can greatly simplify the description of otherwise complex relationships between observed variates. For example, in unsupervised (i.e., “generative”) settings, latent variable models have been used to express feature discovery problems such as dimensionality reduction [6], clustering [7], sparse coding [8], and independent components analysis [9]. More recently, such latent variable models have been used to discover abstract features of visual data invariant to low level transformations [1, 2, 4]. These learned representations not only facilitate understanding, they can enhance subsequent learning. Our primary focus in this paper, however, is on conditional modeling. In a supervised (i.e. “conditional”) setting, latent variable models are used to discover intervening feature representations that allow more accurate reconstruction of outputs from inputs. One advantage in the supervised case is that output information can be used to better identify relevant features to be inferred. However, latent variables also cause difficulty in this case because they impose nested nonlinearities between the input and output variables. Some important examples of conditional latent learning approaches include those that seek an intervening lower dimensional representation [10] latent clustering [11], sparse feature representation [8] or invariant latent representation [1, 3, 4, 12] between inputs and outputs. Despite their growing success, the difficulty of training a latent variable model remains clear: since the model parameters have to be trained concurrently with inference over latent variables, the convexity of the training problem is usually destroyed. Only highly restricted models can be trained to optimality, and current deep learning strategies provide no guarantees about solution quality. This remains true even when restricting attention to a single stage of stage-wise pre-training: simple models such as the two-layer auto-encoder or restricted Boltzmann machine (RBM) still pose intractable training problems, even within a single stage (in fact, simply computing the gradient of the RBM objective is currently believed to be intractable [13]). 1 Meanwhile, a growing body of research has investigated reformulations of latent variable learning that are able to yield tractable global training methods in special cases. Even though global training formulations are not a universally accepted goal of deep learning research [14], there are several useful methodologies that have been been applied successfully to other latent variable models: boosting strategies [15–17], semidefinite relaxations [18–20], matrix factorization [21–23], and moment based estimators (i.e. “spectral methods”) [24, 25]. Unfortunately, none of these approaches has yet been able to accommodate a non-trivial hidden layer between an input and output layer while retaining the representational capacity of an auto-encoder or RBM (e.g. boosting strategies embed an intractable subproblem in these cases [15–17]). Some recent work has been able to capture restricted forms of latent structure in a conditional model—namely, a single latent cluster variable [18–20]—but this remains a rather limited approach. In this paper we demonstrate that more general latent variable structures can be accommodated within a tractable convex framework. In particular, we show how two-layer latent conditional models with a single latent layer can be expressed equivalently in terms of a latent feature kernel. This reformulation allows a rich set of latent feature representations to be captured, while allowing useful convex relaxations in terms of a semidefinite optimization. Unlike [26], the latent kernel in this model is explicitly learned (nonparametrically). To cope with scaling issues we further develop an efficient algorithmic approach for the proposed relaxation. Importantly, the resulting method preserves sufficient problem structure to recover prediction models that cannot be represented by any one-layer architecture over the same input features, while improving the quality of local training. 2 Two-Layer Conditional Modeling We address the problem of training a two-layer latent conditional model in the form of Figure 1; i.e., where there is a single layer of h latent variables, φ, between a layer of n input variables, x, and m output variables, y. The goal is to predict an output vector y given an input vector x. Here, a prediction model consists of the composition of two nonlinear conditional models, f1(Wx) ; φ and f2(V φ) ; ˆy, parameterized by the matrices W 2 Rh⇥n and V 2 Rm⇥h. Once the parameters W and V have been specified, this architecture defines a point predictor that can determine ˆy from x by first computing an intermediate representation φ. To learn the model parameters, we assume we are given t training pairs {(xj, yj)}t j=1, stacked in two matrices X = (x1, ..., xt) 2 Rn⇥t and Y = (y1, ..., yt) 2 Rm⇥t, but the corresponding set of latent variable values Φ = (φ1, ..., φt) 2 Rh⇥t remains unobserved. W φj f1 V xj yj f2 t Figure 1: Latent conditional model f1(Wx) ; φ, f2(V φ) ; ˆy, where φj is a latent variable, xj is an observed input vector, yj is an observed output vector, W are first layer parameters, and V are second layer parameters. To formulate the training problem, we will consider two losses, L1 and L2, that relate the input to the latent layer, and the latent to the output layer respectively. For example, one can think of losses as negative log-likelihoods in a conditional model that generates each successive layer given its predecessor; i.e., L1(Wx, φ) = −log pW (φ|x) and L2(V φ, y) = −log pV (y|φ). (However, a loss based formulation is more flexible, since every negative log-likelihood is a loss but not vice versa.) Similarly to RBMs and probabilistic networks (PFNs) [27] (but unlike auto-encoders and classical feed-forward networks), we will not assume φ is a deterministic output of the first layer; instead we will consider φ to be a variable whose value is the subject of inference during training. Given such a set-up many training principles become possible. For simplicity, we consider a Viterbi based training principle where the parameters W and V are optimized with respect to an optimal imputation of the latent values Φ. To do so, define the first and second layer training objectives as F1(W, Φ) = L1(WX, Φ) + ↵ 2 kWk2 F , and F2(Φ, V ) = L2(V Φ, Y ) + β 2 kV k2 F , (1) where we assume the losses are convex in their first arguments. Here it is typical to assume that the losses decompose columnwise; that is, L1(ˆ , Φ) = Pt j=1 L1( ˆ j, φj) and L2(Z, Y ) = Pt j=1 L2(ˆzj, yj), where ˆ j is the jth column of ˆ and ˆzj is the jth column of ˆZ respectively. This 2 follows for example if the training pairs (xj, yj) are assumed I.I.D., but such a restriction is not necessary. Note that we have also introduced Euclidean regularization over the parameters (i.e. negative log-priors under a Gaussian), which will provide a useful representer theorem [28] we exploit later. These two objectives can be combined to obtain the following joint training problem: min W,V min Φ F1(W, Φ) + γF2(Φ, V ), (2) where γ > 0 is a trade off parameter that balances the first versus second layer discrepancy. Unfortunately (2) is not jointly convex in the unknowns W, V and Φ. A key modeling question concerns the structure of the latent representation φ. As noted, the extensive literature on latent variable modeling has proposed a variety of forms for latent structure. Here, we follow work on deep learning and sparse coding and assume that the latent variables are boolean, φ 2 {0, 1}h⇥1; an assumption that is also often made in auto-encoders [13], PFNs [27], and RBMs [5]. A boolean representation can capture structures that range from a single latent clustering [11, 19, 20], by imposing the assumption that φ01 = 1, to a general sparse code, by imposing the assumption that φ01 = k for some small k [1, 4, 13].1 Observe that, in the latter case, one can control the complexity of the latent representation by imposing a constraint on the number of “active” variables k rather than directly controlling the latent dimensionality h. 2.1 Multi-Layer Perceptrons and Large-Margin Losses To complete a specification of the two-layer model in Figure 1 and the associated training problem (2), we need to commit to specific forms for the transfer functions f1 and f2 and the losses in (1). For simplicity, we will adopt a large-margin approach over two-layer perceptrons. Although it has been traditional in deep learning research to focus on exponential family conditional models (e.g. as in auto-encoders, PFNs and RBMs), these are not the only possibility; a large-margin approach offers additional sparsity and algorithmic simplifications that will clarify the development below. Despite its simplicity, such an approach will still be sufficient to prove our main point. First, consider the second layer model. We will conduct our primary evaluations on multiclass classification problems, where output vectors y encode target classes by indicator vectors y 2 {0, 1}m⇥1 such that y01 = 1. Although it is common to adopt a softmax transfer for f2 in such a case, it is also useful to consider a perceptron model defined by f2(ˆz) = indmax(ˆz) such that indmax(ˆz) = 1i (vector of all 0s except a 1 in the ith position) where ˆzi ≥ˆzl for all l. Therefore, for multi-class classification, we will simply adopt the standard large-margin multi-class loss [29]: L2(ˆz, y) = max(1 −y + ˆz −1y0ˆz). (3) Intuitively, if yc = 1 is the correct label, this loss encourages the response ˆzc = y0ˆz on the correct label to be a margin greater than the response ˆzi on any other label i 6= c. Second, consider the first layer model. Although the loss (3) has proved to be highly successful for multi-class classification problems, it is not suitable for the first layer because it assumes there is only a single target component active in any latent vector φ; i.e. φ01 = 1. Although some work has considered learning a latent clustering in a two-layer architecture [11, 18–20], such an approach is not able to capture the latent sparse code of a classical PFN or RBM in a reasonable way: using clustering to simulate a multi-dimensional sparse code causes exponential blow-up in the number of latent classes required. Therefore, we instead adopt a multi-label perceptron model for the first layer, defined by the transfer function f1( ˆ ) = step( ˆ ) applied componentwise to the response vector ˆ ; i.e. step( ˆ i) = 1 if ˆ i > 0, 0 otherwise. Here again, instead of using a traditional negative loglikelihood loss, we will adopt a simple large-margin loss for multi-label classification that naturally accommodates multiple binary latent classifications in parallel. Although several loss formulations exist for multi-label classification [30, 31], we adopt the following: L1( ˆ , φ) = max(1 −φ + ˆ φ01 −1φ0 ˆ ) ⌘max " (1 −φ)/(φ01) + ˆ −1φ0 ˆ /(φ01) # . (4) Intuitively, this loss encourages the average response on the active labels, φ0 ˆ /(φ01), to exceed the response ˆ i on any inactive label i, φi = 0, by some margin, while also encouraging the response on any active label to match the average of the active responses. Despite their simplicity, large-margin multi-label losses have proved to be highly successful in practice [30, 31]. Therefore, the overall architecture we investigate embeds two nonlinear conditionals around a non-trivial latent layer. 1 Throughout this paper we let 1 denote the vector of all 1s with length determined by context. 3 3 Equivalent Reformulation The main contribution of this paper is to show that the training problem (2) has a convex relaxation that preserves sufficient structure to transcend one-layer models. To demonstrate this relaxation, we first need to establish the key observation that problem (2) can be re-expressed in terms of a kernel matrix between latent representation vectors. Importantly, this reformulation allows the problem to be re-expressed in terms of an optimization objective that is jointly convex in all participating variables. We establish this key intermediate result in this section in three steps: first, by re-expressing the latent representation in terms of a latent kernel; second, by reformulating the second layer objective; and third, by reformulating the first layer objective by exploiting large-margin formulation outlined in Section 2.1. Below let K = X0X denote the kernel matrix over the input data, let Im(N) denote the row space of N, and let and † denote Moore-Penrose pseudo-inverse. First, simply define N = Φ0Φ. Next, re-express the second layer objective F2 in (1) by the following. Lemma 1. For any fixed Φ, letting N = Φ0Φ, it follows that min V F2(Φ, V ) = min B2Im(N) L2(B, Y ) + β 2 tr(BN †B0). (5) Proof. The result follows from the following sequence of equivalence preserving transformations: min V L2(V Φ, Y ) + β 2 kV k2 F = min A L2(AN, Y ) + β 2 tr(ANA0) (6) = min B2Im(N) L2(B, Y ) + β 2 tr(BN †B0), (7) where, starting with the definition of F2 in (1), the first equality in (6) follows from the representer theorem applied to kV k2 F , which implies that the optimal V must be in the form of V = AΦ0 for some A 2 Rm⇥t [28]; and finally, (7) follows by the change of variable B = AN. Note that Lemma 1 holds for any loss L2. In fact, the result follows solely from the structure of the regularizer. However, we require L2 to be convex in its first argument to ensure a convex problem below. Convexity is indeed satisfied by the choice (3). Moreover, the term tr(BN †B0) is jointly convex in N and B since it is a perspective function [32], hence the objective in (5) is jointly convex. Next, we reformulate the first layer objective F1 in (1). Since this transformation exploits specific structure in the first layer loss, we present the result in two parts: first, by showing how the desired outcome follows from a general assumption on L1, then demonstrating that this assumption is satisfied by the specific large-margin multi-label loss defined in (4). To establish this result we will exploit the following augmented forms for the data and variables: let ˜Φ = [Φ, kI], ˜N = ˜Φ0 ˜Φ, ˜ = [ˆ , 0], ˜X = [X, 0], ˜K = ˜X0 ˜X, and ˜t = t + h. Lemma 2. For any L1 if there exists a function ˜L1 such that L1(ˆ , Φ) = ˜L1(˜Φ0 ˜ , ˜Φ0 ˜Φ) for all ˆ 2 Rh⇥t and Φ 2 {0, 1}h⇥t, such that Φ01 = 1k, it then follows that min W F1(W, Φ) = min D2Im( ˜ N) ˜L1(D ˜K, ˜N) + ↵ 2 tr(D0 ˜N †D ˜K). (8) Proof. Similar to above, consider the sequence of equivalence preserving transformations: min W L1(WX, Φ) + ↵ 2 kWk2 F = min W ˜L1(˜Φ0W ˜X, ˜Φ0 ˜Φ) + ↵ 2 kWk2 F (9) = min C ˜L1(˜Φ0 ˜ΦC ˜X0 ˜X, ˜Φ0 ˜Φ) + β 2 tr( ˜XC0 ˜Φ0 ˜ΦC ˜X0) (10) = min D2Im( ˜ N) ˜L1(D ˜K, ˜N) + ↵ 2 tr(D0 ˜N †D ˜K), (11) where, starting with the definition of F1 in (1), the first equality (9) simply follows from the assumption. The second equality (10) follows from the representer theorem applied to kWk2 F , which implies that the optimal W must be in the form of W = ˜ΦC ˜X0 for some C 2 R˜t⇥˜t (using the fact that ˜Φ has full rank h) [28]. Finally, (11) follows by the change of variable D = ˜NC. 4 Observe that the term tr(D0 ˜N †D ˜K) is again jointly convex in ˜N and D (also a perspective function), while it is easy to verify that ˜L1(D ˜K, ˜N) as defined in Lemma 3 below is also jointly convex in ˜N and D [32]; therefore the objective in (8) is jointly convex. Next, we show that the assumption of Lemma 2 is satisfied by the specific large-margin multi-label formulation in Section 2.1; that is, assume L1 is given by the large-margin multi-label loss (4): L1(ˆ , Φ) = P j max " 1 −φj + ˆ jφ0 j1 −1φ0 j ˆ j # = ⌧ " 110 −Φ + ˆ diag(Φ01) −1 diag(Φ0 ˆ )0# , such that ⌧(⇥) := P j max(✓j), (12) where we use ˆ j, φj and ✓j to denote the jth columns of ˆ , Φ and ⇥respectively. Lemma 3. For the multi-label loss L1 defined in (4), and for any fixed Φ 2 {0, 1}h⇥t where Φ01 = 1k, the definition ˜L1(˜Φ0 ˜ , ˜Φ0 ˜Φ) := ⌧(˜Φ0 ˜ −˜Φ0 ˜Φ/k)+t−tr(˜Φ0 ˜ ) using the augmentation above satisfies the property that L1(ˆ , Φ) = ˜L1(˜Φ0 ˜ , ˜Φ0 ˜Φ) for any ˆ 2 Rh⇥t. Proof. Since Φ01 = 1k we obtain a simplification of L1: L1(ˆ , Φ) = ⌧ " 110 −Φ + k ˆ −1 diag(Φ0 ˆ )0# = ⌧(k ˆ −Φ) + t −tr(˜Φ0 ˜ ). (13) It only remains is to establish that ⌧(k ˆ −Φ) = ⌧(˜Φ0 ˜ −˜Φ0 ˜Φ/k). To do so, consider the sequence of equivalence preserving transformations: ⌧(k ˆ −Φ) = max ⇤2Rh⇥˜t + :⇤01=1 tr " ⇤0(k ˜ −˜Φ) # (14) = max ⌦2R ˜t⇥˜t + :⌦01=1 1 k tr " ⌦0 ˜Φ0(k ˜ −˜Φ) # = ⌧(˜Φ0 ˜ −˜Φ0 ˜Φ/k), (15) where the equalities in (14) and (15) follow from the definition of ⌧and the fact that linear maximizations over the simplex obtain their solutions at the vertices. To establish the equality between (14) and (15), since ˜Φ embeds the submatrix kI, for any ⇤2 Rh⇥˜t + there must exist an ⌦2 R˜t⇥˜t + satisfying ⇤= ˜Φ⌦/k. Furthermore, these matrices satisfy ⇤01 = 1 iff ⌦0 ˜Φ01/k = 1 iff ⌦01 = 1. Therefore, the result (8) holds for the first layer loss (4), using ˜L1 defined in Lemma 3. (The same result can be established for other loss functions, such as the multi-class large-margin loss.) Combining these lemmas yields the desired result of this section. Theorem 1. For any second layer loss and any first layer loss that satisfies the assumption of Lemma 2 (for example the large-margin multi-label loss (4)), the following equivalence holds: (2) = min { ˜ N:9Φ2{0,1}t⇥hs.t. Φ1=1k, ˜ N= ˜ Φ0 ˜Φ} min B2Im( ˜ N) min D2Im( ˜ N) ˜L1(D ˜K, ˜N) + ↵ 2 tr(D0 ˜N †D ˜K) +γL2(B, Y ) + γβ 2 tr(B ˜N †B0). (16) (Theorem 1 follows immediately from Lemmas 1 and 2.) Note that no relaxation has occurred thus far: the objective value of (16) matches that of (2). Not only has this reformulation resulted in (2) being entirely expressed in terms of the latent kernel matrix ˜N, the objective in (16) is jointly convex in all participating unknowns, ˜N, B and D. Unfortunately, the constraints in (16) are not convex. 4 Convex Relaxation We first relax the problem by dropping the augmentation Φ 7! ˜Φ and working with the t⇥t variable N = Φ0Φ. Without the augmentation, Lemma 3 becomes a lower bound (i.e. (14)≥(15)), hence a relaxation. To then achieve a convex form we further relax the constraints in (16). To do so, consider N0 = $ N : 9Φ 2 {0, 1}t⇥h such that Φ1 = 1k and N = Φ0Φ (17) N1 = $ N : N 2 {0, ..., k}t⇥t, N ⌫0, diag(N) = 1k, rank(N) h (18) N2 = {N : N ≥0, N ⌫0, diag(N) = 1k} , (19) where it is clear from the definitions that N0 ✓N1 ✓N2. (Here we use N ⌫0 to also encode N 0 = N.) Note that the set N0 corresponds to the original set of constraints from (16). The set 5 Algorithm 1: ADMM to optimize F(N) for N 2 N2. 1 Initialize: M0 = I, Γ0 = 0. 2 while T = 1, 2, . . . do 3 NT arg minN⌫0 L(N, MT −1, ΓT −1), by using the boosting Algorithm 2. 4 MT arg minM≥0,Mii=k L(NT , M, ΓT −1), which has an efficient closed form solution. 5 ΓT ΓT −1 + 1 µ(MT −NT ); i.e. update the multipliers. 6 return NT . Algorithm 2: Boosting algorithm to optimize G(N) for N ⌫0. 1 Initialize: N0 0, H0 [ ] (empty set). 2 while T = 1, 2, . . . do 3 Find the smallest arithmetic eigenvalue of rG(NT −1), and its eigenvector hT . 4 Conic search by LBFGS: (aT , bT ) mina≥0,b≥0 G(aNT −1 + bhT h0 T ). Local search by LBFGS: HT local minHG(HH0) initialized by H =(paHT −1, p bhT ). 5 Set NT HT H0 T ; break if stopping criterion met. 6 return NT . N1 simplifies the characterization of this constraint set on the resulting kernel matrices N = Φ0Φ. However, neither N0 nor N1 are convex. Therefore, we need to adopt the further relaxed set N2, which is convex. (Note that Nij k has been implied by N ⌫0 and Nii = k in N2.) Since dropping the rank constraint eliminates the constraints B 2 Im(N) and D 2 Im(N) in (16) when N ≻0 [32], we obtain the following relaxed problem, which is jointly convex in N, B and D: min N2N2 min B2Rt⇥t min D2Rt⇥t ˜L1(DK, N) + ↵ 2 tr(D0N †DK) + γL2(B, Y ) + γβ 2 tr(BN †B0). (20) 5 Efficient Training Approach Unfortunately, nonlinear semidefinite optimization problems in the form (20) are generally thought to be too expensive in practice despite their polynomial theoretical complexity [33, 34]. Therefore, we develop an effective training algorithm that exploits problem structure to bypass the main computational bottlenecks. The key challenge is that N2 contains both semidefinite and affine constraints, and the pseudo-inverse N † makes optimization over N difficult even for fixed B and D. To mitigate these difficulties we first treat (20) as the reduced problem, minN2N2 F(N), where F is an implicit objective achieved by minimizing out B and D. Note that F is still convex in N by the joint convexity of (20). To cope with the constraints on N we adopt the alternating direction method of multipliers (ADMM) [35] as the main outer optimization procedure; see Algorithm 1. This approach allows one to divide N2 into two groups, N ⌫0 and {Nij ≥0, Nii = k}, yielding the augmented Lagrangian L(N, M, Γ) = F(N) + δ(N ⌫0) + δ(Mij ≥0, Mii =k) −hΓ, N −Mi + 1 2µ kN −Mk2 F , (21) where µ > 0 is a small constant, and δ denotes an indicator such that δ(·) = 0 if · is true, and 1 otherwise. In this procedure, Steps 4 and 5 cost O(t2) time; whereas the main bottleneck is Step 3, which involves minimizing GT (N) := L(N, MT −1, ΓT −1) over N ⌫0 for fixed MT −1 and ΓT −1. Boosting for Optimizing over the Positive Semidefinite Cone. To solve the problem in Step 3 we develop an efficient boosting procedure based on [36] that retains low rank iterates NT while avoiding the need to determine N † when computing G(N) and rG(N); see Algorithm 2. The key idea is to use a simple change of variable. For example, consider the first layer objective and let G1(N) = minD ˜L1(DK, N) + ↵ 2 tr(D0N †DK). By defining D = NC, we obtain G1(N) = minC ˜L1(NCK, N) + ↵ 2 tr(C0NCK), which no longer involves N † but remains convex in C; this problem can be solved efficiently after a slight smoothing of the objective [37] (e.g. by LBFGS). Moreover, the gradient rG1(N) can be readily computed given C⇤. Applying the same technique 6 −2 −1.5 −1 −0.5 0 0.5 1 1.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 (a) “Xor” (2 ⇥400) 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 1.5 2 2.5 3 3.5 4 (b) “Boxes” (2 ⇥320) −2 0 2 4 6 8 10 12 14 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 (c) “Interval” (2 ⇥200) XOR BOXES INTER TJB2 49.8 ±0.7 45.7 ±0.6 49.3 ±1.3 TSS1 50.2 ±1.2 35.7 ±1.3 42.6 ±3.9 SVM1 50.3 ±1.1 31.4 ±0.5 50.0 ±0.0 LOC2 4.2 ±0.9 11.4 ±0.6 50.0 ±0.0 CVX2 0.2 ±0.1 10.1 ±0.4 20.0 ±2.4 (d) Synthetic results (% error) Figure 2: Synthetic experiments: three artificial data sets that cannot be meaningfully classified by a one-layer model that does not use a nonlinear kernel. Table shows percentage test set error. to the second layer yields an efficient procedure for evaluating G(N) and rG(N). Finally note that many of the matrix-vector multiplications in this procedure can be further accelerated by exploiting the low rank factorization of N maintained by the boosting algorithm; see the Appendix for details. Additional Relaxation. One can further reduce computation cost by adopting additional relaxations to (20). For example, by dropping N ≥0 and relaxing diag(N) = 1k to diag(N) 1k, the objective can be written as min{N⌫0,maxi Niik} F(N). Since maxi Nii is convex in N, it is well known that there must exist a constant c1 > 0 such that the optimal N is also an optimal solution to minN⌫0 F(N) + c1 (maxi Nii)2. While maxi Nii is not smooth, one can further smooth it with a softmax, to instead solve minN⌫0 F(N) + c1 (log P i exp(c2Nii))2 for some large c2. This formulation avoids the need for ADMM entirely and can be directly solved by Algorithm 2. 6 Experimental Evaluation To investigate the effectiveness of the proposed relaxation scheme for training a two-layer conditional model, we conducted a number of experiments to compare learning quality against baseline methods. Note that, given an optimal solution N, B and D to (20), an approximate solution to the original problem (2) can be recovered heuristically by first rounding N to obtain Φ, then recovering W and V , as shown in Lemmas 1 and 2. However, since our primary objective is to determine whether any convex relaxation of a two-layer model can even compete with one-layer or locally trained two-layer models (rather than evaluate heuristic rounding schemes), we consider a transductive evaluation that does not require any further modification of N, B and D. In such a set-up, training data is divided into a labeled and unlabeled portion, where the method receives X = [X`, Xu] and Y`, and at test time the resulting predictions ˆYu are evaluated against the held-out labels Yu. Methods. We compared the proposed convex relaxation scheme (CVX2) against the following methods: simple alternating minimization of the same two-layer model (2) (LOC2), a one-layer linear SVM trained on the labeled data (SVM1), the transductive one-layer SVM methods of [38] (TSJ1) and [39] (TSS1), and the transductive latent clustering method of [18, 19] (TJB2), which is also a two-layer model. Linear input kernels were used for all methods (standard in most deep learning models) to control the comparison between one and two-layer models. Our experiments were conducted with the following common protocol: First, the data was split into a separate training and test set. Then the parameters of each procedure were optimized by a three-fold cross validation on the training set. Once the optimal parameters were selected, they were fixed and used on the test set. For transductive procedures, the same three training sets from the first phase were used, but then combined with ten new test sets drawn from the disjoint test data (hence 30 overall) for the final evaluation. At no point were test examples used to select any parameters for any of the methods. We considered different proportions between labeled/unlabeled data; namely, 100/100 and 200/200. Synthetic Experiments. We initially ran a proof of concept experiment on three binary labeled artificial data sets depicted in Figure 2 (showing data set sizes n⇥t) with 100/100 labeled/unlabeled training points. Here the goal was simply to determine whether the relaxed two-layer training method could preserve sufficient structure to overcome the limits of a one-layer architecture. Clearly, none of the data sets in Figure 2 are adequately modeled by a one-layer architecture (that does not cheat and use a nonlinear kernel). The results are shown in the Figure 2(d) table. 7 MNIST USPS Letter COIL CIFAR G241N TJB2 19.3 ±1.2 53.2 ±2.9 20.4 ±2.1 30.6 ±0.8 29.2 ±2.1 26.3 ±0.8 LOC2 19.3 ±1.0 13.9 ±1.1 10.4 ±0.6 18.0 ±0.5 31.8 ±0.9 41.6 ±0.9 SVM1 16.2 ±0.7 11.6 ±0.5 6.2 ±0.4 16.9 ±0.6 27.6 ±0.9 27.1 ±0.9 TSS1 13.7 ±0.8 11.1 ±0.5 5.9 ±0.5 17.5 ±0.6 26.7 ±0.7 25.1 ±0.8 TSJ1 14.6 ±0.7 12.1 ±0.4 5.6 ±0.5 17.2 ±0.6 26.6 ±0.8 24.4 ±0.7 CVX2 9.2 ±0.6 9.2 ±0.5 5.1 ±0.5 13.8 ±0.6 26.5 ±0.8 25.2 ±1.0 Table 1: Mean test misclassification error % (± stdev) for 100/100 labeled/unlabeled. MNIST USPS Letter COIL CIFAR G241N TJB2 13.7 ±0.6 46.6 ±1.0 14.0 ±2.6 45.0 ±0.8 30.4 ±1.9 22.4 ±0.5 LOC2 16.3 ±0.6 9.7 ±0.5 8.5 ±0.6 12.8 ±0.6 28.2 ±0.9 40.4 ±0.7 SVM1 11.2 ±0.4 10.7 ±0.4 5.0 ±0.3 15.6 ±0.5 25.5 ±0.6 22.9 ±0.5 TSS1 11.4 ±0.5 11.3 ±0.4 4.4 ±0.3 14.9 ±0.4 24.0 ±0.6 23.7 ±0.5 TSJ1 12.3 ±0.5 11.8 ±0.4 4.8 ±0.3 13.5 ±0.4 23.9 ±0.5 22.2 ±0.6 CVX2 8.8 ±0.4 6.6 ±0.4 3.8 ±0.3 8.2 ±0.4 22.8 ±0.6 20.3 ±0.5 Table 2: Mean test misclassification error % (± stdev) for 200/200 labeled/unlabeled. As expected, the one-layer models SVM1 and TSS1 were unable to capture any useful classification structure in these problems. (TSJ1 behaves similarly to TSS1.) The results obtained by CVX2, on the other hand, are encouraging. In these data sets, CVX2 is easily able to capture latent nonlinearities while outperforming the locally trained LOC2. Although LOC2 is effective in the first two cases, it exhibits weaker test accuracy while failing on the third data set. The two-layer method TJB2 exhibited convergence difficulties on these problems that prevented reasonable results. Experiments on “Real” Data Sets. Next, we conducted experiments on real data sets to determine whether the advantages in controlled synthetic settings could translate into useful results in a more realistic scenario. For these experiments we used a collection of binary labeled data sets: USPS, COIL and G241N from [40], Letter from [41], MNIST, and CIFAR-100 from [42]. (See Appendix B in the supplement for further details.) The results are shown in Tables 1 and 2 for the labeled/unlabeled proportions 100/100 and 200/200 respectively. The relaxed two-layer method CVX2 again demonstrates effective results, although some data sets caused difficulty for all methods. The data sets can be divided into two groups, (MNIST, USPS, COIL) versus (Letter, CIFAR, G241N). In the first group, two-layer modeling demonstrates a clear advantage: CVX2 outperforms SVM1 by a significant margin. Note that this advantage must be due to two-layer versus one-layer modeling, since the transductive SVM methods TSS1 and TSJ1 demonstrate no advantage over SVM1. For the second group, the effectiveness of SVM1 demonstrates that only minor gains can be possible via transductive or two-layer extensions, although some gains are realized. The locally trained two-layer model LOC2 performed quite poorly in all cases. Unfortunately, the convex latent clustering method TJB2 was also not competitive on any of these data sets. Overall, CVX2 appears to demonstrate useful promise as a two-layer modeling approach. 7 Conclusion We have introduced a new convex approach to two-layer conditional modeling by reformulating the problem in terms of a latent kernel over intermediate feature representations. The proposed model can accommodate latent feature representations that go well beyond a latent clustering, extending current convex approaches. A semidefinite relaxation of the latent kernel allows a reasonable implementation that is able to demonstrate advantages over single-layer models and local training methods. From a deep learning perspective, this work demonstrates that trainable latent layers can be expressed in terms of reproducing kernel Hilbert spaces, while large margin methods can be usefully applied to multi-layer prediction architectures. Important directions for future work include replacing the step and indmax transfers with more traditional sigmoid and softmax transfers, while also replacing the margin losses with more traditional Bregman divergences; refining the relaxation to allow more control over the structure of the latent representations; and investigating the utility of convex methods for stage-wise training within multi-layer architectures. 8 References [1] Q. Le, M. Ranzato, R. Monga, M. Devin, G. Corrado, K. Chen, J. Dean, and A. Ng. Building high-level features using large scale unsupervised learning. In Proceedings ICML, 2012. [2] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep Boltzmann machines. In NIPS, 2012. [3] Y. Bengio. Learning deep architectures for AI. Foundat. and Trends in Machine Learning, 2:1–127, 2009. [4] G. Hinton. Learning multiple layers of representations. Trends in Cognitive Sciences, 11:428–434, 2007. [5] G. Hinton, S. Osindero, and Y. Teh. A fast algorithm for deep belief nets. Neur. Comp., 18(7), 2006. [6] N. Lawrence. Probabilistic non-linear principal component analysis. JMLR, 6:1783–1816, 2005. [7] A. Banerjee, S. Merugu, I. Dhillon, and J. Ghosh. Clustering with Bregman divergences. J. Mach. Learn. Res., 6:1705–1749, 2005. [8] M. Elad and M. Aharon. Image denoising via sparse and redundant representations over learned dictionaries. IEEE Trans. on Image Processing, 15:3736–3745, 2006. [9] P. Comon. Independent component analysis, a new concept? Signal Processing, 36(3):287–314, 1994. [10] M. Carreira-Perpi˜n´an and Z. Lu. dimensionality reduction by unsupervised regression. In CVPR, 2010. [11] N. Tishby, F. Pereira, and W. Bialek. The information bottleneck method. In Allerton Conf., 1999. [12] S. Rifai, P. Vincent, X. Muller, X. Glorot, and Y. Bengio. Contractive auto-encoders: Explicit invariance during feature extraction. In ICML, 2011. [13] K. Swersky, M. Ranzato, D. Buchman, B. Marlin, and N. de Freitas. On autoencoders and score matching for energy based models. In Proceedings ICML, 2011. [14] Y. LeCun. Who is afraid of non-convex loss functions? http://videolectures.net/eml07 lecun wia, 2007. [15] Y. Bengio, N. Le Roux, P. Vincent, and O. Delalleau. Convex neural networks. In NIPS, 2005. [16] S. Nowozin and G. Bakir. A decoupled approach to exemplar-based unsupervised learning. In Proceedings of the International Conference on Machine Learning, 2008. [17] D. Bradley and J. Bagnell. Convex coding. In UAI, 2009. [18] A. Joulin and F. Bach. A convex relaxation for weakly supervised classifiers. In Proc. ICML, 2012. [19] A. Joulin, F. Bach, and J. Ponce. Efficient optimization for discrimin. latent class models. In NIPS, 2010. [20] Y. Guo and D. Schuurmans. Convex relaxations of latent variable training. In Proc. NIPS 20, 2007. [21] A. Goldberg, X. Zhu, B. Recht, J. Xu, and R. Nowak. Transduction with matrix completion: Three birds with one stone. In NIPS 23, 2010. [22] E. Candes, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? arXiv:0912.3599, 2009. [23] X. Zhang, Y. Yu, and D. Schuurmans. Accelerated training for matrix-norm regularization: A boosting approach. In Advances in Neural Information Processing Systems 25, 2012. [24] A. Anandkumar, D. Hsu, and S. Kakade. A method of moments for mixture models and hidden Markov models. In Proc. Conference on Learning Theory, 2012. [25] D. Hsu and S. Kakade. Learning mixtures of spherical Gaussians: Moment methods and spectral decompositions. In Innovations in Theoretical Computer Science (ITCS), 2013. [26] Y. Cho and L. Saul. Large margin classification in infinite neural networks. Neural Comput., 22, 2010. [27] R. Neal. Connectionist learning of belief networks. Artificial Intelligence, 56(1):71–113, 1992. [28] G. Kimeldorf and G. Wahba. Some results on Tchebycheffian spline functions. JMAA, 33:82–95, 1971. [29] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, pages 265–292, 2001. [30] J. Fuernkranz, E. Huellermeier, E. Mencia, and K. Brinker. Multilabel classification via calibrated label ranking. Machine Learning, 73(2):133–153, 2008. [31] Y. Guo and D. Schuurmans. Adaptive large margin training for multilabel classification. In AAAI, 2011. [32] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Mach. Learn., 73(3), 2008. [33] Y. Nesterov and A. Nimirovskii. Interior-Point Polynomial Algorithms in Convex Programming. 1994. [34] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge U. Press, 2004. [35] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundat. Trends in Mach. Learn., 3(1):1–123, 2010. [36] S. Laue. A hybrid algorithm for convex semidefinite optimization. In Proc. ICML, 2012. [37] O. Chapelle. Training a support vector machine in the primal. Neural Comput., 19(5):1155–1178, 2007. [38] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, 1999. [39] V. Sindhwani and S. Keerthi. Large scale semi-supervised linear SVMs. In SIGIR, 2006. [40] http://olivier.chapelle.cc/ssl- book/benchmarks.html. [41] http://archive.ics.uci.edu/ml/datasets. [42] http://www.cs.toronto.edu/ kriz/cifar.html. 9
2013
246
4,983
The Randomized Dependence Coefficient David Lopez-Paz, Philipp Hennig, Bernhard Sch¨olkopf Max Planck Institute for Intelligent Systems Spemannstraße 38, T¨ubingen, Germany {dlopez,phennig,bs}@tue.mpg.de Abstract We introduce the Randomized Dependence Coefficient (RDC), a measure of nonlinear dependence between random variables of arbitrary dimension based on the Hirschfeld-Gebelein-R´enyi Maximum Correlation Coefficient. RDC is defined in terms of correlation of random non-linear copula projections; it is invariant with respect to marginal distribution transformations, has low computational cost and is easy to implement: just five lines of R code, included at the end of the paper. 1 Introduction Measuring statistical dependence between random variables is a fundamental problem in statistics. Commonly used measures of dependence, Pearson’s rho, Spearman’s rank or Kendall’s tau are computationally efficient and theoretically well understood, but consider only a limited class of association patterns, like linear or monotonically increasing functions. The development of non-linear dependence measures is challenging because of the radically larger amount of possible association patterns. Despite these difficulties, many non-linear statistical dependence measures have been developed recently. Examples include the Alternating Conditional Expectations or backfitting algorithm (ACE) [2, 9], Kernel Canonical Correlation Analysis (KCCA) [1], (Copula) Hilbert-Schmidt Independence Criterion (CHSIC, HSIC) [6, 5, 15], Distance or Brownian Correlation (dCor) [24, 23] and the Maximal Information Coefficient (MIC) [18]. However, these methods exhibit high computational demands (at least quadratic costs in the number of samples for KCCA, HSIC, CHSIC, dCor or MIC), are limited to measuring dependencies between scalar random variables (ACE, MIC) or can be difficult to implement (ACE, MIC). This paper develops the Randomized Dependence Coefficient (RDC), an estimator of the HirschfeldGebelein-R´enyi Maximum Correlation Coefficient (HGR) addressing the issues listed above. RDC defines dependence between two random variables as the largest canonical correlation between random non-linear projections of their respective empirical copula-transformations. RDC is invariant to monotonically increasing transformations, operates on random variables of arbitrary dimension, and has computational cost of O(n log n) with respect to the sample size. Moreover, it is easy to implement: just five lines of R code, included in Appendix A. The following Section reviews the classic work of Alfr´ed R´enyi [17], who proposed seven desirable fundamental properties of dependence measures, proved to be satisfied by the Hirschfeld-GebeleinR´enyi’s Maximum Correlation Coefficient (HGR). Section 3 introduces the Randomized Dependence Coefficient as an estimator designed in the spirit of HGR, since HGR itself is computationally intractable. Properties of RDC and its relationship to other non-linear dependence measures are analysed in Section 4. Section 5 validates the empirical performance of RDC on a series of numerical experiments on both synthetic and real-world data. 1 2 Hirschfeld-Gebelein-R´enyi’s Maximum Correlation Coefficient In 1959 [17], Alfr´ed R´enyi argued that a measure of dependence ρ∗: X × Y →[0, 1] between random variables X ∈X and Y ∈Y should satisfy seven fundamental properties: 1. ρ∗(X, Y ) is defined for any pair of non-constant random variables X and Y . 2. ρ∗(X, Y ) = ρ∗(Y, X) 3. 0 ≤ρ∗(X, Y ) ≤1 4. ρ∗(X, Y ) = 0 iff X and Y are statistically independent. 5. For bijective Borel-measurable functions f, g : R →R, ρ∗(X, Y ) = ρ∗(f(X), g(Y )). 6. ρ∗(X, Y ) = 1 if for Borel-measurable functions f or g, Y = f(X) or X = g(Y ). 7. If (X, Y ) ∼N(µ, Σ), then ρ∗(X, Y ) = |ρ(X, Y )|, where ρ is the correlation coefficient. R´enyi also showed the Hirschfeld-Gebelein-R´enyi Maximum Correlation Coefficient (HGR) [3, 17] to satisfy all these properties. HGR was defined by Gebelein in 1941 [3] as the supremum of Pearson’s correlation coefficient ρ over all Borel-measurable functions f, g of finite variance: hgr(X, Y ) = sup f,g ρ(f(X), g(Y )), (1) Since the supremum in (1) is over an infinite-dimensional space, HGR is not computable. It is an abstract concept, not a practical dependence measure. In the following we propose a scalable estimator with the same structure as HGR: the Randomized Dependence Coefficient. 3 Randomized Dependence Coefficient The Randomized Dependence Coefficient (RDC) measures the dependence between random samples X ∈Rp×n and Y ∈Rq×n as the largest canonical correlation between k randomly chosen nonlinear projections of their copula transformations. Before Section 3.4 defines this concept formally, we describe the three necessary steps to construct the RDC statistic: copula-transformation of each of the two random samples (Section 3.1), projection of the copulas through k randomly chosen nonlinear maps (Section 3.2) and computation of the largest canonical correlation between the two sets of non-linear random projections (Section 3.3). Figure 1 offers a sketch of this process.                               y x P(y) ∼U[0, 1] P(x) ∼U[0, 1] βTΦ(P(y)) αTΦ(P(x)) αTΦ(P(x)) βTΦ(P(y)) P(x) P(y) P(x) P(y) φ(wiP(x) + bi) φ(miP(y) + li) ρ ≈0 ρ ≈0 ρ ≈1 CCA Figure 1: RDC computation for a simple set of samples {(xi, yi)}100 i=1 drawn from a noisy circular pattern: The samples are used to estimate the copula, then mapped with randomly drawn non-linear functions. The RDC is the largest canonical correlation between these non-linear projections. 3.1 Estimation of Copula-Transformations To achieve invariance with respect to transformations on marginal distributions (such as shifts or rescalings), we operate on the empirical copula transformation of the data [14, 15]. Consider a random vector X = (X1, . . . , Xd) with continuous marginal cumulative distribution functions (cdfs) Pi, 1 ≤i ≤d. Then the vector U = (U1, . . . , Ud) := P (X) = (P1(X1), . . . , Pd(Xd)), known as the copula transformation, has uniform marginals: 2 Theorem 1. (Probability Integral Transform [14]) For a random variable X with cdf P, the random variable U := P(X) is uniformly distributed on [0, 1]. The random variables U1, . . . , Ud are known as the observation ranks of X1, . . . , Xd. Crucially, U preserves the dependence structure of the original random vector X, but ignores each of its d marginal forms [14]. The joint distribution of U is known as the copula of X: Theorem 2. (Sklar [20]) Let the random vector X = (X1, . . . , Xd) have continuous marginal cdfs Pi, 1 ≤i ≤d. Then, the joint cumulative distribution of X is uniquely expressed as: P(X1, . . . , Xd) = C(P1(X1), . . . , Pd(Xd)), (2) where the distribution C is known as the copula of X. A practical estimator of the univariate cdfs P1, . . . , Pd is the empirical cdf: Pn(x) := 1 n n X i=1 I(Xi ≤x), (3) which gives rise to the empirical copula transformations of a multivariate sample: Pn(x) = [Pn,1(x1), . . . , Pn,d(xd)]. (4) The Massart-Dvoretzky-Kiefer-Wolfowitz inequality [13] can be used to show that empirical copula transformations converge fast to the true transformation as the sample size increases: Theorem 3. (Convergence of the empirical copula, [15, Lemma 7]) Let X1, . . . , Xn be an i.i.d. sample from a probability distribution over Rd with marginal cdf’s P1, . . . , Pd. Let P (X) be the copula transformation and Pn(X) the empirical copula transformation. Then, for any ϵ > 0: Pr  sup x∈Rd ∥P (x) −Pn(x)∥2 > ϵ  ≤2d exp  −2nϵ2 d  . (5) Computing Pn(X) involves sorting the marginals of X ∈Rd×n, thus O(dn log(n)) operations. 3.2 Generation of Random Non-Linear Projections The second step of the RDC computation is to augment the empirical copula transformations with non-linear projections, so that linear methods can subsequently be used to capture non-linear dependencies on the original data. This is a classic idea also used in other areas, particularly in regression. In an elegant result, Rahimi and Recht [16] proved that linear regression on random, non-linear projections of the original feature space can generate high-performance regressors: Theorem 4. (Rahimi-Recht) Let p be a distribution on Ωand |φ(x; w)| ≤1. Let F =  f(x) = R Ωα(w)φ(x; w)dw |α(w)| ≤Cp(w) . Draw w1, . . . , wk iid from p. Further let δ > 0, and c be some L-Lipschitz loss function, and consider data {xi, yi}n i=1 drawn iid from some arbitrary P(X, Y ). The α1, . . . , αk for which fk(x) = Pk i=1 αiφ(x; wi) minimizes the empirical risk c(fk(x), y) has a distance from the c-optimal estimator in F bounded by EP [c(fk(x), y)] −min f∈F EP [c(f(x), y)] ≤O  1 √n + 1 √ k  LC r log 1 δ ! (6) with probability at least 1 −2δ. Intuitively, Theorem 4 states that randomly selecting wi in Pk i=1 αiφ(x; wi) instead of optimising them causes only bounded error. The choice of the non-linearities φ : R →R is the main and unavoidable assumption in RDC. This choice is a well-known problem common to all non-linear regression methods and has been studied extensively in the theory of regression as the selection of reproducing kernel Hilbert space [19, §3.13]. The only way to favour one such family and distribution over another is to use prior assumptions about which kind of distributions the method will typically have to analyse. 3 We use random features instead of the Nystr¨om method because of their smaller memory and computation requirements [11]. In our experiments, we will use sinusoidal projections, φ(wT x + b) := sin(wT x + b). Arguments favouring this choice are that shift-invariant kernels are approximated with these features when using the appropriate random parameter sampling distribution [16], [4, p. 208] [22, p. 24], and that functions with absolutely integrable Fourier transforms are approximated with L2 error below O(1/ √ k) by k of these features [10]. Let the random parameters wi ∼N(0, sI), bi ∼N(0, s). Choosing wi to be Normal is analogous to the use of the Gaussian kernel for HSIC, CHSIC or KCCA [16]. Tuning s is analogous to selecting the kernel width, that is, to regularize the non-linearity of the random projections. Given a data collection X = (x1, . . . , xn), we will denote by Φ(X; k, s) :=    φ(wT 1 x1 + b1) · · · φ(wT k x1 + bk) ... ... ... φ(wT 1 xn + b1) · · · φ(wT k xn + bk)    T (7) the k−th order random non-linear projection from X ∈Rd×n to Φ(X; k, s) ∈Rk×n. The computational complexity of computing Φ(X; k, s) with naive matrix multiplications is O(kdn). However, recent techniques using fast Walsh-Hadamard transforms [11] allow computing these feature expansions within a computational cost of O(k log(d)n) and O(k) storage. 3.3 Computation of Canonical Correlations The final step of RDC is to compute the linear combinations of the augmented empirical copula transformations that have maximal correlation. Canonical Correlation Analysis (CCA, [7]) is the calculation of pairs of basis vectors (α, β) such that the projections αT X and βT Y of two random samples X ∈Rp×n and Y ∈Rq×n are maximally correlated. The correlations between the projected (or canonical) random samples are referred to as canonical correlations. There exist up to max(rank(X), rank(Y )) of them. Canonical correlations ρ2 are the solutions to the eigenproblem:  0 C−1 xx Cxy C−1 yy Cyx 0   α β  = ρ2  α β  , (8) where Cxy = cov(X, Y ) and the matrices Cxx and Cyy are assumed to be invertible. Therefore, the largest canonical correlation ρ1 between X and Y is the supremum of the correlation coefficients over their linear projections, that is: ρ1(X, Y ) = supα,β ρ(αT X, βT Y ). When p, q ≪n, the cost of CCA is dominated by the estimation of the matrices Cxx, Cyy and Cxy, hence being O((p + q)2n) for two random variables of dimensions p and q, respectively. 3.4 Formal Definition or RDC Given the random samples X ∈Rp×n and Y ∈Rq×n and the parameters k ∈N+ and s ∈R+, the Randomized Dependence Coefficient between X and Y is defined as: rdc(X, Y ; k, s) := sup α,β ρ αT Φ(P (X); k, s), βT Φ(P (Y ); k, s)  . (9) 4 Properties of RDC Computational complexity: In the typical setup (very large n, large p and q, small k) the computational complexity of RDC is dominated by the calculation of the copula-transformations. Hence, we achieve a cost in terms of the sample size of O((p+q)n log n+kn log(pq)+k2n) ≈O(n log n). Ease of implementation: An implementation of RDC in R is included in the Appendix A. Relationship to the HGR coefficient: It is tempting to wonder whether RDC is a consistent, or even an efficient estimator of the HGR coefficient. However, a simple experiment shows that it is not desirable to approximate HGR exactly on finite datasets: Consider p(X, Y ) = N(x; 0, 1)N(y; 0, 1) 4 which is independent, thus, by both R´enyi’s 4th and 7th properties, has hgr(X, Y ) = 0. However, for finitely many N samples from p(X, Y ), almost surely, values in both X and Y are pairwise different and separated by a finite difference. So there exist continuous (thus Borel measurable) functions f(X) and g(Y ) mapping both X and Y to the sorting ranks of Y , i.e. f(xi) = g(yi) ∀(xi, yi) ∈(X, Y ). Therefore, the finite-sample version of Equation (1) is constant and equal to “1” for continuous random variables. Meaningful measures of dependence from finite samples thus must rely on some form of regularization. RDC achieves this by approximating the space of Borel measurable functions with the restricted function class F from Theorem 4: Assume the optimal transformations f and g (Equation 1) to belong to the Reproducing Kernel Hilbert Space F (Theorem 4), with associated shift-invariant, positive semi-definite kernel function k(x, x′) = ⟨φ(x), φ(x′)⟩F ≤1. Then, with probability greater than 1 −2δ: hgr(X, Y ; F) −rdc(X, Y ; k) = O ∥m∥F √n + LC √ k  r log 1 δ ! , (10) where m := ααT + ββT and n, k denote the sample size and number of random features. The bound (10) is the sum of two errors. The error O(1/√n) is due to the convergence of CCA’s largest eigenvalue in the finite sample size regime. This result [8, Theorem 6] is originally obtained by posing CCA as a least squares regression on the product space induced by the feature map ψ(x, y) = [φ(x)φ(x)T , φ(y)φ(y)T , √ 2φ(x)φ(y)T ]T . Because of approximating ψ with k random features, an additional error O(1/ √ k) is introduced in the least squares regression [16, Lemma 3]. Therefore, an equivalence between RDC and KCCA is established if RDC uses an infinite number of sinusoidal features, the random sampling distribution is set to the inverse Fourier transform of the shift-invariant kernel used by KCCA and the copula-transformations are discarded. However, when k ≥n regularization is needed to avoid spurious perfect correlations, as discussed above. Relationship to other estimators: Table 1 summarizes several state-of-the-art dependence measures showing, for each measure, whether it allows for general non-linear dependence estimation, handles multidimensional random variables, is invariant with respect to changes in marginal distributions, returns a statistic in [0, 1], satisfy R´enyi’s properties (Section 2), and how many parameters it requires. As parameters, we here count the kernel function for kernel methods, the basis function and number of random features for RDC, the stopping tolerance for ACE and the search-grid size for MIC, respectively. Finally, the table lists computational complexities with respect to sample size. When using random features φ linear for some neighbourhood around zero (like sinusoids or sigmoids), RDC converges to Spearman’s rank correlation coefficient as s →0, for any k. Table 1: Comparison between non-linear dependence measures. Name of Coeff. NonLinear Vector Inputs Marginal Invariant Renyi’s Properties Coeff. ∈[0, 1] # Par. Comp. Cost Pearson’s ρ × × × × ✓ 0 n Spearman’s ρ × × ✓ × ✓ 0 n log n Kendall’s τ × × ✓ × ✓ 0 n log n CCA × ✓ × × ✓ 0 n KCCA [1] ✓ ✓ × × ✓ 1 n3 ACE [2] ✓ × × ✓ ✓ 1 n MIC [18] ✓ × × × ✓ 1 n1.2 dCor [24] ✓ ✓ × × ✓ 1 n2 HSIC [5] ✓ ✓ × × × 1 n2 CHSIC [15] ✓ ✓ ✓ × × 1 n2 RDC ✓ ✓ ✓ ✓ ✓ 2 n log n Testing for independence with RDC: Consider the hypothesis “the two sets of non-linear projections are mutually uncorrelated”. Under normality assumptions (or large sample sizes), Bartlett’s approximation [12] can be used to show 2k+3 2 −n  log Qk i=1(1−ρ2 i ) ∼χ2 k2, where ρ1, . . . , ρk are the 5 canonical correlations between Φ(P (X); k, s) and Φ(P (Y ); k, s). Alternatively, non-parametric asymptotic distributions can be obtained from the spectrum of the inner products of the non-linear random projection matrices [25, Theorem 3]. 5 Experimental Results We performed experiments on both synthetic and real-world data to validate the empirical performance of RDC versus the non-linear dependence measures listed in Table 1. In some experiments we do not compare against to KCCA because we were unable to find a good set of hyperparameters. Parameter selection: For RDC, the number of random features is set to k = 20 for both random samples, since no significant improvements were observed for larger values. The random feature sampling parameter s is more crucial, and set as follows: when the marginals of u are standard uniforms, w ∼N(0, sI) and b ∼N(0, s), then V[wT u + b] = s 1 + d 3  ; therefore, we opt to set s to a linear scaling of the input variable dimensionality. In all our experiments s = 1 6d worked well. The development of better methods to set the parameters of RDC is left as future work. HSIC and CHSIC use Gaussian kernels k(z, z′) = exp(−γ∥z −z′∥2 2) with γ−1 set to the euclidean distance median of each sample [5]. MIC’s search-grid size is set to B(n) = n0.6 as recommended by the authors [18], although speed improvements are achieved when using lower values. ACE’s tolerance is set to ϵ = 0.01, default value in the R package acepack. 5.1 Synthetic Data Resistance to additive noise: We define the power of a dependence measure as its ability to discern between dependent and independent samples that share equal marginal forms. In the spirit of Simon and Tibshirani1, we conducted experiments to estimate the power of RDC as a measure of non-linear dependence. We chose 8 bivariate association patterns, depicted inside little boxes in Figure 3. For each of the 8 association patterns, 500 repetitions of 500 samples were generated, in which the input sample was uniformly distributed on the unit interval. Next, we regenerated the input sample randomly, to generate independent versions of each sample with equal marginals. Figure 3 shows the power for the discussed non-linear dependence measures as the variance of some zero-mean Gaussian additive noise increases from 1/30 to 3. RDC shows worse performance in the linear association pattern due to overfitting and in the step-function due to the smoothness prior induced by the sinusoidal features, but has good performance in non-functional association patterns. Running times: Table 2 shows running times for the considered non-linear dependence measures on scalar, uniformly distributed, independent samples of sizes {103, . . . , 106} when averaging over 100 runs. Single runs above ten minutes were cancelled. Pearson’s ρ, ACE, dCor, KCCA and MIC are implemented in C, while RDC, HSIC and CHSIC are implemented as interpreted R code. KCCA is approximated using incomplete Cholesky decompositions as described in [1]. Table 2: Average running times (in seconds) for dependence measures on versus sample sizes. sample size Pearson’s ρ RDC ACE KCCA dCor HSIC CHSIC MIC 1,000 0.0001 0.0047 0.0080 0.402 0.3417 0.3103 0.3501 1.0983 10,000 0.0002 0.0557 0.0782 3.247 59.587 27.630 29.522 — 100,000 0.0071 0.3991 0.5101 43.801 — — — — 1,000,000 0.0914 4.6253 5.3830 — — — — — Value of statistic in [0, 1]: Figure 4 shows RDC, ACE, dCor, MIC, Pearson’s ρ, Spearman’s rank and Kendall’s τ dependence estimates for 14 different associations of two scalar random samples. RDC scores values close to one on all the proposed dependent associations, whilst scoring values close to zero for the independent association, depicted last. When the associations are Gaussian (first row), RDC scores values close to the Pearson’s correlation coefficient (Section 2, 7th property). 1http://www-stat.stanford.edu/˜tibs/reshef/comment.pdf 6 5.2 Feature Selection in Real-World Data We performed greedy feature selection via dependence maximization [21] on eight real-world datasets. More specifically, we attempted to construct the subset of features G ⊂X that minimizes the normalized mean squared regression error (NMSE) of a Gaussian process regressor. We do so by selecting the feature x(i) maximizing dependence between the feature set Gi = {Gi−1, x(i)} and the target variable y at each iteration i ∈{1, . . . 10}, such that G0 = {∅} and x(i) /∈Gi−1. We considered 12 heterogeneous datasets, obtained from the UCI dataset repository2, the Gaussian process web site Data3 and the Machine Learning data set repository4. Random training/test partitions are computed to be disjoint and equal sized. Since G can be multi-dimensional, we compare RDC to the non-linear methods dCor, HSIC and CHSIC. Given their quadratic computational demands, dCor, HSIC and CHSIC use up to 1, 000 points when measuring dependence; this constraint only applied on the sarcos and abalone datasets. Results are averages of 20 random training/test partitions. 1 2 3 4 5 6 7 0.48 0.54 0.60 abalone 2 4 6 8 10 0.36 0.40 0.44 0.48 automobile 1 2 3 4 5 6 7 0.15 0.25 0.35 autompg 2 4 6 8 10 0.35 0.45 breast dCor HSIC CHSIC RDC 1 2 3 4 5 6 7 8 0.30 0.40 0.50 calhousing 2 4 6 8 10 0.3 0.5 0.7 0.9 cpuact 2 4 6 8 10 0.20 0.30 crime 2 4 6 8 10 0.25 0.35 housing 2 4 6 8 10 0.965 0.980 insurance 2 4 6 8 10 0.35 0.40 0.45 parkinson 2 4 6 8 10 0.1 0.3 0.5 0.7 sarcos 2 4 6 8 10 0.70 0.80 whitewine Number of features Gaussian Process NMSE Figure 2: Feature selection experiments on real-world datasets. Figure 2 summarizes the results for all datasets and algorithms as the number of selected features increases. RDC performs best in most datasets, with much lower running time than its contenders. 6 Conclusion We have presented the randomized dependence coefficient, a lightweight non-linear measure of dependence between multivariate random samples. Constructed as a finite-dimensional estimator in the spirit of the Hirschfeld-Gebelein-R´enyi maximum correlation coefficient, RDC performs well empirically, is scalable to very large datasets, and is easy to adapt to concrete problems. We thank fruitful discussions with Alberto Su´arez, Theofanis Karaletsos and David Reshef. 2http://www.ics.uci.edu/˜mlearn 3http://www.gaussianprocess.org/gpml/data/ 4http://www.mldata.org 7 0.0 0.4 0.8 xvals power.cor[typ, ] xvals power.cor[typ, ] 0.0 0.4 0.8 xvals power.cor[typ, ] xvals power.cor[typ, ] cor dCor MIC ACE HSIC CHSIC RDC 0.0 0.4 0.8 xvals power.cor[typ, ] xvals power.cor[typ, ] 0 20 40 60 80 100 0.0 0.4 0.8 xvals power.cor[typ, ] 0 20 40 60 80 100 xvals power.cor[typ, ] Noise Level Power Figure 3: Power of discussed measures on several bivariate association patterns as noise increases. Insets show the noise-free form of each association pattern. 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.8 0.8 0.7 0.5 0.8 0.8 0.6 0.4 0.4 0.4 0.2 0.4 0.4 0.3 0.1 0.1 0.1 0.1 0.0 0.0 0.0 0.4 0.4 0.4 0.2 -0.4 -0.4 -0.3 0.8 0.8 0.7 0.5 -0.8 -0.8 -0.6 1.0 1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 1.0 0.4 1.0 0.0 0.0 0.0 0.3 0.3 0.1 0.2 0.0 0.0 -0.0 0.5 0.5 0.1 0.2 0.0 0.0 0.0 1.0 1.0 0.5 0.9 0.0 0.0 0.0 1.0 1.0 0.3 0.6 0.1 0.1 0.1 1.0 1.0 0.2 0.6 -0.0 -0.0 -0.0 0.1 0.1 0.0 0.1 -0.0 -0.0 -0.0 Figure 4: RDC, ACE, dCor, MIC, Pearson’s ρ, Spearman’s rank and Kendall’s τ estimates (numbers in tables above plots, in that order) for several bivariate association patterns. A R Source Code rdc <- function(x,y,k=20,s=1/6,f=sin) { x <- cbind(apply(as.matrix(x),2,function(u)rank(u)/length(u)),1) y <- cbind(apply(as.matrix(y),2,function(u)rank(u)/length(u)),1) x <- s/ncol(x)*x%*%matrix(rnorm(ncol(x)*k),ncol(x)) y <- s/ncol(y)*y%*%matrix(rnorm(ncol(y)*k),ncol(y)) cancor(cbind(f(x),1),cbind(f(y),1))$cor[1] } 8 References [1] F. R. Bach and M. I. Jordan. Kernel independent component analysis. JMLR, 3:1–48, 2002. [2] L. Breiman and J. H. Friedman. Estimating Optimal Transformations for Multiple Regression and Correlation. Journal of the American Statistical Association, 80(391):580–598, 1985. [3] H. Gebelein. Das statistische Problem der Korrelation als Variations- und Eigenwertproblem und sein Zusammenhang mit der Ausgleichsrechnung. Zeitschrift f¨ur Angewandte Mathematik und Mechanik, 21(6):364–379, 1941. [4] I.I. Gihman and A.V. Skorohod. The Theory of Stochastic Processes, volume 1. Springer, 1974s. [5] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Sch¨olkopf, and A. Smola. A kernel two-sample test. JMLR, 13:723–773, 2012. [6] A. Gretton, O. Bousquet, A. Smola, and B. Sch¨olkopf. Measuring statistical dependence with Hilbert-Schmidt norms. In Proceedings of the 16th international conference on Algorithmic Learning Theory, pages 63–77. Springer-Verlag, 2005. [7] W. K. H¨ardle and L. Simar. Applied Multivariate Statistical Analysis. Springer, 2nd edition, 2007. [8] D. Hardoon and J. Shawe-Taylor. Convergence analysis of kernel canonical correlation analysis: theory and practice. Machine Learning, 74(1):23–38, 2009. [9] T. Hastie and R. Tibshirani. Generalized additive models. Statistical Science, 1:297–310, 1986. [10] L. K. Jones. A simple lemma on greedy approximation in Hilbert space and convergence rates for projection pursuit regression and neural network training. Annals of Statistics, 20(1):608– 613, 1992. [11] Q. Le, T. Sarlos, and A. Smola. Fastfood – Approximating kernel expansions in loglinear time. In ICML, 2013. [12] K. V. Mardia, J. T. Kent, and J. M. Bibby. Multivariate Analysis. Academic Press, 1979. [13] P. Massart. The tight constant in the Dvoretzky-Kiefer-wolfowitz inequality. The Annals of Probability, 18(3), 1990. [14] R. Nelsen. An Introduction to Copulas. Springer Series in Statistics, 2nd edition, 2006. [15] B. Poczos, Z. Ghahramani, and J. Schneider. Copula-based kernel dependency measures. In ICML, 2012. [16] A. Rahimi and B. Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. NIPS, 2008. [17] A. R´enyi. On measures of dependence. Acta Mathematica Academiae Scientiarum Hungaricae, 10:441–451, 1959. [18] D. N. Reshef, Y. A. Reshef, H. K. Finucane, S. R. Grossman, G. McVean, P. J. Turnbaugh, E. S. Lander, M. Mitzenmacher, and P. C. Sabeti. Detecting novel associations in large data sets. Science, 334(6062):1518–1524, 2011. [19] B. Sch¨olkopf and A.J. Smola. Learning with Kernels. MIT Press, 2002. [20] A. Sklar. Fonctions de repartition `a n dimension set leurs marges. Publ. Inst. Statis. Univ. Paris, 8(1):229–231, 1959. [21] L. Song, A. Smola, A. Gretton, J. Bedo, and K. Borgwardt. Feature selection via dependence maximization. JMLR, 13:1393–1434, June 2012. [22] M.L. Stein. Interpolation of Spatial Data. Springer, 1999. [23] G. J. Sz´ekely and M. L. Rizzo. Rejoinder: Brownian distance covariance. Annals of Applied Statistics, 3(4):1303–1308, 2009. [24] G. J. Sz´ekely, M. L. Rizzo, and N. K. Bakirov. Measuring and testing dependence by correlation of distances. Annals of Statistics, 35(6), 2007. [25] K. Zhang, J. Peters, D. Janzing, and B.Sch¨olkopf. Kernel-based conditional independence test and application in causal discovery. CoRR, abs/1202.3775, 2012. 9
2013
247
4,984
Sparse Precision Matrix Estimation with Calibration Tuo Zhao Department of Computer Science Johns Hopkins University Han Liu Department of Operations Research and Financial Engineering Princeton University Abstract We propose a semiparametric method for estimating sparse precision matrix of high dimensional elliptical distribution. The proposed method calibrates regularizations when estimating each column of the precision matrix. Thus it not only is asymptotically tuning free, but also achieves an improved finite sample performance. Theoretically, we prove that the proposed method achieves the parametric rates of convergence in both parameter estimation and model selection. We present numerical results on both simulated and real datasets to support our theory and illustrate the effectiveness of the proposed estimator. 1 Introduction We study the precision matrix estimation problem: let X = (X1, ..., Xd)T be a d-dimensional random vector following some distribution with mean µ ∈Rd and covariance matrix Σ ∈Rd×d, where Σkj = EXkXj −EXkEXj. We want to estimate Ω= Σ−1 from n independent observations. To make the estimation manageable in high dimensions (d/n →∞), we assume that Ωis sparse. That is, many off-diagonal entries of Ωare zeros. Existing literature in machine learning and statistics usually assumes that X follows a multivariate Gaussian distribution, i.e., X ∼N(0, Σ). Such a distributional assumption naturally connects sparse precision matrices with Gaussian graphical models (Dempster, 1972), and has motivated numerous applications (Lauritzen, 1996). To estimate sparse precision matrices for Gaussian distributions, many methods in the past decade have been proposed based on the sample covariance estimator. Let x1, ..., xn ∈Rd be n independent observations of X, the sample covariance estimator is defined as S = 1 n n X i=1 (xi −¯x)(xi −¯x)T with ¯x = 1 n n X i=1 xi. (1.1) Banerjee et al. (2008); Yuan and Lin (2007); Friedman et al. (2008) take advantage of the Gaussian likelihood, and propose the graphic lasso (GLASSO) estimator by solving bΩ= argmin Ω −log |Ω| + tr(SΩ) + λ X j,k |Ωkj|, where λ > 0 is the regularization parameter. Scalable software packages for GLASSO have been developed, such as huge (Zhao et al., 2012). In contrast, Cai et al. (2011); Yuan (2010) adopt the pseudo-likelihood approach to estimate the precision matrix. Their estimators follow a column-by-column estimation scheme, and possess better 1 theoretical properties. More specifically, given a matrix A ∈Rd×d, let A∗j = (A1j, ..., Adj)T denote the jth column of A, ||A∗j||1 = P k |Akj| and ||A∗j||∞= maxk |Akj|, Cai et al. (2011) obtain the CLIME estimator by solving bΩ∗j = argmin Ω∗j ||Ω∗j||1 s.t. ||SΩ∗j −I∗j||∞≤λ, ∀j = 1, ..., d. (1.2) Computationally, (1.2) can be reformulated and solved by general linear program solvers. Theoretically, let ||A||1 = maxj ||A∗j||1 be the matrix ℓ1 norm of A, and ||A||2 be the largest singular value of A, (i.e., the spectral norm of A), Cai et al. (2011) show that if we choose λ ≍||Ω||1 r log d n , (1.3) the CLIME estimator achieves the following rates of convergence under the spectral norm, ||bΩ−Ω||2 2 = OP ||Ω||4−4q 1 s2 log d n 1−q! , (1.4) where q ∈[0, 1) and s = maxj P k |Ωkj|q. Despite of these good properties, the CLIME estimator in (1.2) has three drawbacks: (1) The theoretical justification heavily relies on the subgaussian tail assumption. When this assumption is violated, the inference can be unreliable; (2) All columns are estimated using the same regularization parameter, even though these columns may have different sparseness. As a result, more estimation bias is introduced to the denser columns to compensate the sparser columns. In another word, the estimation is not calibrated (Liu et al., 2013); (3) The selected regularization parameter in (1.3) involves the unknown quantity ||Ω||1. Thus we have to carefully tune the regularization parameter over a refined grid of potential values in order to get a good finite-sample performance. To overcome the above three drawbacks, we propose a new sparse precision matrix estimation method, named EPIC (Estimating Precision mIatrix with Calibration). To relax the Gaussian assumption, our EPIC method adopts an ensemble of the transformed Kendall’s tau estimator and Catoni’s M-estimator (Kruskal, 1958; Catoni, 2012). Such a semiparametric combination makes EPIC applicable to the elliptical distribution family. The elliptical family (Cambanis et al., 1981; Fang et al., 1990) contains many multivariate distributions such as Gaussian, multivariate t-distribution, Kotz distribution, multivariate Laplace, Pearson type II and VII distributions. Many of these distributions do not have subgaussian tails, thus the commonly used sample covariance-based sparse precision matrix estimators often fail miserably. Moreover, our EPIC method adopts a calibration framework proposed in Gautier and Tsybakov (2011), which reduces the estimation bias by calibrating the regularization for each column. Meanwhile, the optimal regularization parameter selection under such a calibration framework does not require any prior knowledge of unknown quantities (Belloni et al., 2011). Thus our EPIC estimator is asymptotically tuning free (Liu and Wang, 2012). Our theoretical analysis shows that if the underlying distribution has a finite fourth moment, the EPIC estimator achieves the same rates of convergence as (1.4). Numerical experiments on both simulated and real datasets show that EPIC outperforms existing precision matrix estimation methods. 2 Background We first introduce some notations used throughout this paper. Given a vector v = (v1, . . . , vd)T ∈ Rd, we define the following vector norms: ||v||1 = X j |vj|, ||v||2 2 = X j v2 j , ||v||∞= max j |vj|. Given a matrix A ∈Rd×d, we use A∗j = (A1j, ..., Adj)T to denote the jth column of A. We define the following matrix norms: ||A||1 = max j ||A∗j||1, ||A||2 = max j ψj(A), ||A||2 F = X k,j A2 kj, ||A||max = max k,j |Akj|, 2 where ψj(A)’s are all singular values of A. We then briefly review the elliptical family. As a generalization of the Gaussian distribution, it has the following definition. Definition 2.1 (Fang et al. (1990)). Given µ ∈Rd and Ξ ∈Rd×d, where Ξ ⪰0 and rank(Ξ) = r ≤d, we say that a d-dimensional random vector X = (X1, ..., X)T follows an elliptical distribution with parameter µ, Ξ, and β, if X has a stochastic representation X d= µ + βBU, such that β ≥0 is a continuous random variable independent of U, U ∈Sr−1 is uniformly distributed in the unit sphere in Rr, and Ξ = BBT . Since we are interested in the precision matrix estimation, we assume that maxj EX2 j is finite. Note that the stochastic representation in Definition 2.1 is not unique, and existing literature usually imposes the constraint maxj Ξjj = 1 to make the distribution identifiable (Fang et al., 1990). However, such a constraint does not necessarily make Ξ the covariance matrix. Here we present an alternative representation as follows. Proposition 2.2. If X has the stochastic representation X = µ + βBU as in Definition 2.1, given Ξ = BBT , rank(Ξ) = r, and E(ξ2) = α < ∞, X can be rewritten as X = µ + ξAU, where ξ = β p r/α, A = B p α/r and Σ = AAT . Moreover we have E(ξ2) = r, E(X) = µ, and Cov(X) = Σ. After the reparameterization in Proposition 2.2, the distribution is identifiable with Σ defined as the conventional covariance matrix. Remark 2.3. Σ has the decomposition Σ = ΘZΘ, where Z is the Pearson correlation matrix, and Θ = diag(θ1, ..., θd) with θj as the standard deviation of Xj. Since Θ is a diagonal matrix, the precision Ωalso has a similar decomposition Ω= Θ−1ΓΘ−1, where Γ = Z−1 is the inverse correlation matrix. 3 Method We propose a three-step method: (1) We first use the transformed Kendall’s tau estimator and Catoni’s M-estimator to obtain bZ and bΘ respectively. (2) We then plug bZ into the calibrated inverse correlation matrix estimation to obtain bΓ. (3) At last, we assemble bΓ and bΘ to obtain bΩ. 3.1 Correlation Matrix and Standard Deviation Estimation To estimate Z, we adopt the transformed Kendall’s tau estimator proposed in Liu et al. (2012). Given n independent observations, x1, ..., xn, where xi = (xi1, ..., xid)T , we calculate the Kendall’s statistic by bτkj =    2 n(n −1) X i<i′ sign  (xij −xi′j)(xik −xi′k)  if j ̸= k; 1 otherwise. After a simple transformation, we obtain a correlation matrix estimator bZ = [bZkj] =  sin π 2 bτkj  (Liu et al., 2012; Zhao et al., 2013). To estimate Θ = diag(θ1, ..., θd), we adopt the Catoni’s M-estimator proposed in Catoni (2012). We define ψ(t) = sign(t) log(1 + |t| + t2/2), where sign(0) = 0. Let bmj be the estimator of EX2 j , we solve n X i=1 ψ  (xij −bµj) r 2 nKmax  = 0, n X i=1 ψ  (x2 ij −bmj) r 2 nKmax  = 0. where Kmax is an upper bound of maxj Var(Xj) and maxj Var(X2 j ). Since ψ(t) is a strictly increasing function in t, bµj and bmj are unique and can be obtained by the efficient Newton-Raphson method (Stoer et al., 1993). Then we can obtain bθj using bθj = q bmj −bµ2 j. 3 3.2 Calibrated Inverse Correlation Matrix Estimation We plugin bZ into the following convex program, (bΓ∗j, bτj) = argmin Γ∗j,τj ||Γ∗j||1 + cτj s.t. ||bZΓ∗j −I∗j||∞≤λτj, ||Γ∗j||1 ≤τj, ∀j = 1, ..., d. (3.1) where c can be an arbitrary constant (e.g. c = 0.5). τj works as an auxiliary variable to calibrate the regularization. Remark 3.1. If we know τj = ||Ω∗j||1 in advance, we can consider a simple variant of the CLIME estimator, bΩ∗j = argmin Ω∗j ||Ω∗j||1 s.t. ||SΩ∗j −I∗j||∞≤λτj, ∀j = 1, ..., d. Since we do not have any prior knowledge of τ ′ js, we consider the following replacement (bΓ∗j, bτj) = argmin Γ∗j,τj ||Ω∗j||1 (3.2) s.t. ||SΩ∗j −I∗j||∞≤λτj, τj = ||Ω∗j||1 ∀j = 1, ..., d. As can be seen, (3.2) is nonconvex due to the constraint τj = ||Ω∗j||1. Thus no global optimum can be guaranteed in polynomial time. From a computational perspective, (3.1) can be viewed as a convex relaxation of (3.2). Both the objective function and the constraint in (3.1) contain τj to prevent from choosing τj either too large or too small. Due to the complementary slackness, (3.1) eventually encourages the regularization to be proportional to the ℓ1 norm of each column (weak sparseness). Therefore the estimation is calibrated. By introducing the decomposition Γ∗j = Γ+ ∗j −Γ− ∗j with Γ+ ∗j, Γ− ∗j ≥0, we can reformulate (3.1) as a linear program as follows, (bΓ+ ∗j, bΓ− ∗j, bτj) = argmin Γ+ ∗j,Γ− ∗j,τj 1T Γ+ ∗j + 1T Γ− ∗j + cτj (3.3) subjected to   bZ −bZ −λ −bZ bZ −λ 1T 1T −1     Γ+ ∗j Γ− ∗j τj  ≤ " I∗j −I∗j 0 # , Γ+ ∗j ≥0, Γ− ∗j ≥0, τj ≥0, where λ = (λ, ..., λ)T ∈Rd. (3.3) can be solved by existing linear program solvers, and further accelerated by the parallel computing techniques. Remark 3.2. Though (3.1) looks more complicated than (1.2), it is not necessarily more computationally difficult. After the reparameterization, (3.3) contains 2d + 1 parameters to optimize, which is of a similar scale to the linear program formulation as the CLIME method in Cai et al. (2011). Our EPIC method does not guarantee the symmetry of the estimator bΓ. Thus we need the following symmetrization methods to obtain the symmetric replacement eΓ. eΓkj = bΓkjI(|bΓkj| ≤bΓjk) + bΓjkI(|bΓkj| > bΓjk). 3.3 Precision Matrix Estimation Once we obtain the estimated inverse correlation matrix eΓ, we can recover the precision matrix estimator by the ensemble rule, bΩ= bΘ−1eΓ bΘ−1. Remark 3.3. A possible alternative is to directly estimate Ωby plugging a covariance estimator bS = bΘbZ bΘ (3.4) into (3.1) instead of bZ, but this direct estimation procedure makes the regularization parameter selection sensitive to Var(X2 j ). 4 4 Statistical Properties In this section, we study statistical properties of the EPIC estimator. We define the following class of sparse symmetric matrices, Uq(s, M) = n Γ ∈Rd×d Γ ≻0, Γ = ΓT , max j X k |Γkj|q ≤s, ||Γ||1 ≤M o , where q ∈[0, 1) and (s, d, M) can scale with the sample size n. We also impose the following additional conditions: (A.1) Γ ∈Uq(s, M) (A.2) maxj |µj| ≤µmax, maxj θj ≤θmax, minj θj ≥θmin (A.3) maxj EX4 j ≤K where µmax, K, θmax, and θmin are constants. Before we proceed with our main results, we first present the following key lemma. Lemma 4.1. Suppose that X follows an elliptical distribution with mean µ, and covariance Σ = ΘZΘ. Assume that (A.1)-(A.3) hold, given the transformed Kendall’s tau estimator and Catoni’s Mestimator defined in Section 3, there exist universal constants κ1 and κ2 such that for large enough n, P max j |bθ−1 j −θ−1 j | ≤κ2 r log d n ! ≥1 −2 d3 , P max j,k |bZkj −Zkj| ≤κ1 r log d n ! ≥1 −1 d3 . Lemma 4.1 implies that both transformed Kendall’s tau estimator and Catoni’s M-estimator possess good concentration properties, which enable us to obtain a consistent estimator of Ω. The next theorem presents the rates of convergence under the matrix ℓ1 norm, spectral norm, Frobenius norm, and max norm. Theorem 4.2. Suppose that X follows an elliptical distribution. Assume (A.1)-(A.3) hold, there exist universal constants C1, C2, and C3 such that by taking λ = κ1 r log d n , (4.1) for large enough n and p = 1, 2, we have ||bΩ−Ω||2 p ≤C1M 4−4qs2 log d n 1−q , 1 d||bΩ−Ω||2 F ≤C2M 4−2qs log d n 1−q/2 , ||bΩ−Ω||max ≤C3M 2 r log d n , with probability at least 1 −3 exp(−3 log d). Moreover, when the exact sparsity holds (i.e., q = 0), let E = {(k, j) | Ωkj ̸= 0}, and bE = {(k, j) | bΩkj ̸= 0}, then we have P  E ⊆bE  →1, if there exists a large enough constant C4 such that min (k,j)∈E |Ωkj| ≥C4M 2 r log d n . The rates of convergence in Theorem 4.2 are comparable to those in Cai et al. (2011). Remark 4.3. The selected tuning parameter λ in (4.1) does not involve any unknown quantity. Therefore our EPIC method is asymptotically tuning free. 5 5 Numerical Simulations In this section, we compare the proposed ALCE method with other methods including (1) GLASSO.RC : GLASSO + bS defined in (3.4) as the input covariance matrix (2) CLIME.RC: CLIME + bS as the input covariance matrix (3) CLIME.SM: CLIME + S defined in (1.1) as the input covariance matrix We consider three different settings for the comparison: (1) d = 100; (2) d = 200; (3) d = 400. We adopt the following three graph generation schemes, as illustrated in Figure 1, to obtain precision matrices. (a) Chain (b) Erd¨os-R´enyi (c) Scale-free Figure 1: Three different graph patterns. To ease the visualization, we choose d = 100. We then generate n = 200 independent samples from the t-distribution1 with 5 degrees of freedom, mean 0 and covariance Σ = Ω−1. For the EPIC estimator, we set c = 0.5 in (3.1). For the Catoni’s M-estimator, we set Kmax = 102. To evaluate the performance in parameter estimation, we repeatedly split the data into a training set of n1 = 160 samples and a validation set of n2 = 40 samples for 10 times. We tune λ over a refined grid, then the selected optimal regularization parameter is λ = argmin λ 10 X k=1 ||bΩ(λ,k) bΣ(k) −I||max, where bΩ(λ,k) denotes the estimated precision matrix using the regularization parameter λ and the training set in the kth split, and bΣ(k) denotes the estimated covariance matrix using the validation set in the kth split. Table 1 summarizes our experimental results averaged over 200 simulations. We see that EPIC outperforms the competing estimators throughout all settings. To evaluate the performance in model selection, we calculate the ROC curve of each obtained regularization path. Figure 2 summarizes ROC curves of all methods averaged over 200 simulations. We see that EPIC also outperforms the competing estimators throughout all settings. 6 Real Data Example To illustrate the effectiveness of the proposed EPIC method, we adopt the breast cancer data2, which is analyzed in Hess et al. (2006). The data set contains 133 subjects with 22,283 gene expression levels. Among the 133 subjects, 99 have achieved residual disease (RD) and the remaining 34 have achieved pathological complete response (pCR). Existing results have shown that the pCR subjects have higher chance of cancer-free survival in the long term than the RD subject. Thus we are interested in studying the response states of patients (with RD or pCR) to neoadjuvant (preoperative) chemotherapy. 1The marginal variances of the distribution vary from 0.5 to 2. 2Available at http://bioinformatics.mdanderson.org/. 6 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 1.0 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (a) d = 100 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 1.0 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (b) d = 200 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 1.0 False Positive Rate True plot(c(e Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (c) d = 400 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 1.0 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (d) d = 100 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (e) d = 200 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.1 0.2 0.3 0.4 0.5 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (f) d = 400 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (g) d = 100 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.1 0.2 0.3 0.4 0.5 0.6 False Positive Rate True Positive Rate EPC GLASSO.RC CLIME.RC CLIME.SC (h) d = 200 0.00 0.01 0.02 0.03 0.04 0.05 0.0 0.2 0.4 0.6 0.8 False Positive Rate True Positive Rate EPIC GLASSO.RC CLIME.RC CLIME.SC (i) d = 400 Figure 2: Average ROC curves of different methods on the chain (a-c), Erd¨os-R´enyi (d-e), and scalefree (f-h) models. We can see that EPIC uniformly outperforms the competing estimators throughout all settings. We randomly divide the data into a training set of 83 RD and 29 pCR subjects, and a testing set of the remaining 16 RD and 5 pCR subjects. Then by conducting a Wilcoxon test between two categories for each gene, we further reduce the dimension by choosing the 113 most signcant genes with the smallest p-values. We assume that the gene expression data in each category is elliptical distributed, and the two categories have the same covariance matrix Σ but different means µ(k), where k = 0 for RD and k = 1 for pCR. In Cai et al. (2011), the sample mean is adopted to estimate µ(k)’s, and CLIME.RC is adopted to estimate Ω= Σ−1. In contrast, we adopt the Catoni’s M-estimator to estimate µk’s, and EPIC is adopted to estimate Ω. We classify a sample x to pCR if  x −bµ(1) + bµ(0) 2 T bΩ  bµ(1) −bµ(0) ≥0, and to RD otherwise. We use the testing set to evaluate the performance of CLIME.RC and EPIC. For the tuning parameter selection, we use a 5-fold cross validation on the training data to pick λ with the minimum classification error rate. To evaluate the classification performance, we use the criteria of specificity, sensitivity, and Mathews Correlation Coefficient (MCC). More specifically, let yi’s and byi’s be true labels and predicted labels 7 Table 1: Quantitive comparison of EPIC, GLASSO.RC, CLIME.RC, and CLIME.SC on the chain, Erd¨os-R´enyi, and scale-free models. We see that EPIC outperforms the competing estimators throughout all settings. Spectral Norm: ||bΩ−Ω||2 Model d EPIC GLASSO.RC CLIME.RC CLIME.SC Chain 100 0.8405(0.1247) 1.1880(0.1003) 0.9337(0.5389) 3.2991(0.0512) 200 0.9147(0.1009) 1.3433(0.0870) 1.0716(0.4939) 3.7303(0.4477) 400 1.0058(0.1231) 1.4842(0.0760) 1.3567(0.3706) 3.8462(0.4827) Erd¨os-R´enyi 100 0.9846(0.0970) 1.6037(0.2289) 1.6885(0.1704) 3.7158(0.0663) 200 1.1944(0.0704) 1.6105(0.0680) 1.7507(0.0389) 3.5209(0.0419) 400 1.9010(0.0462) 2.2613(0.1133) 2.6884(0.5988) 4.1342(0.1079) Scale-free 100 0.9779(0.1379) 1.6619(0.1553) 2.1327(0.0986) 3.4548(0.0513) 200 2.9278(0.3367) 4.0882(0.0962) 4.5820(0.0604) 8.8904(0.0575) 400 1.1816(0.1201) 1.8304(0.0710) 2.1191(0.0629) 3.4249(0.0849) Frobenius Norm: ||bΩ−Ω||F Model d EPIC GLASSO.RC CLIME.RC CLIME.SC Chain 100 3.3108(0.1521) 4.5664(0.1034) 3.4406(0.4319) 16.282(0.1346) 200 5.0309(0.1833) 7.2154(0.0831) 5.4776(0.2586) 23.403(0.2727) 400 7.5134(0.1205) 11.300(0.1851) 7.8357(1.2217) 33.504(0.1341) Erd¨os-R´enyi 100 3.5122(0.0796) 3.9600(0.1459) 4.4212(0.1065) 13.734(0.0629) 200 6.3000(0.0868) 7.3385(0.0994) 7.3501(0.1589) 20.151(0.1899) 400 11.489(0.0858) 12.594(0.1633) 13.026(0.4124) 30.030(0.1289) Scale-free 100 2.6369(0.1125) 3.1154(0.1001) 3.1363(0.1014) 10.717(0.0844) 200 4.1280(0.1389) 7.7543(0.0934) 7.8916(0.0556) 16.370(0.1490) 400 5.3440(0.0511) 6.3741(0.0723) 5.7643(0.0625) 20.687(0.1373) of the testing samples, we define Specificity = TN TN + FP, Sensitivity = TP TP + FN, MCC = TPTN −FPFN p (TP + FP)(TP + FN)(TN + FP)(TN + FN) , where TP = X i I(byi = yi = 1), FP = X i I(byi = 0, yi = 1) TN = X i I(byi = yi = 0), FN = X i I(byi = 1, yi = 0). Table 2 summarizes the performance of both methods over 100 replications. We see that EPIC outperforms CLIME.RC on the specificity. The overall classification performance measured by MCC shows that EPIC has a 4% improvement over CLIME.RC. Table 2: Quantitive comparison of EPIC and CLIME.RC in the breast cancer data analysis. Method Specificity Sensitivity MCC CLIME.RC 0.7412(0.0131) 0.7911(0.0251) 0.4905(0.0288) EPIC 0.7935(0.0211) 0.8087(0.0324) 0.5301(0.0375) 8 References BANERJEE, O., EL GHAOUI, L. and D’ASPREMONT, A. (2008). Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. The Journal of Machine Learning Research 9 485–516. BELLONI, A., CHERNOZHUKOV, V. and WANG, L. (2011). Square-root lasso: pivotal recovery of sparse signals via conic programming. Biometrika 98 791–806. CAI, T., LIU, W. and LUO, X. (2011). A constrained ℓ1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association 106 594—607. CAMBANIS, S., HUANG, S. and SIMONS, G. (1981). On the theory of elliptically contoured distributions. Journal of Multivariate Analysis 11 368–385. CATONI, O. (2012). Challenging the empirical mean and empirical variance: a deviation study. Annales de l’Institut Henri Poincar´e, Probabilit´es et Statistiques 48 1148–1185. DEMPSTER, A. P. (1972). Covariance selection. Biometrics 157–175. FANG, K.-T., KOTZ, S. and NG, K. W. (1990). Symmetric Multivariate and Related Distributions, Monographs on Statistics and Applied Probability, 36. London: Chapman and Hall Ltd. MR1071174. FRIEDMAN, J., HASTIE, T. and TIBSHIRANI, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics 9 432–441. GAUTIER, E. and TSYBAKOV, A. B. (2011). High-dimensional instrumental variables regression and confidence sets. Tech. rep., ENSAE ParisTech. HESS, K. R., ANDERSON, K., SYMMANS, W. F., VALERO, V., IBRAHIM, N., MEJIA, J. A., BOOSER, D., THERIAULT, R. L., BUZDAR, A. U., DEMPSEY, P. J. ET AL. (2006). Pharmacogenomic predictor of sensitivity to preoperative chemotherapy with paclitaxel and fluorouracil, doxorubicin, and cyclophosphamide in breast cancer. Journal of clinical oncology 24 4236–4244. KRUSKAL, W. H. (1958). Ordinal measures of association. Journal of the American Statistical Association 53 814–861. LAURITZEN, S. L. (1996). Graphical models, vol. 17. Oxford University Press. LIU, H., HAN, F., YUAN, M., LAFFERTY, J. and WASSERMAN, L. (2012). High-dimensional semiparametric gaussian copula graphical models. The Annals of Statistics 40 2293–2326. LIU, H. and WANG, L. (2012). Tiger: A tuning-insensitive approach for optimally estimating gaussian graphical models. Tech. rep., Massachusett Institute of Technology. LIU, H., WANG, L. and ZHAO, T. (2013). Multivariate regression with calibration. arXiv preprint arXiv:1305.2238 . STOER, J., BULIRSCH, R., BARTELS, R., GAUTSCHI, W. and WITZGALL, C. (1993). Introduction to numerical analysis, vol. 2. Springer New York. YUAN, M. (2010). High dimensional inverse covariance matrix estimation via linear programming. The Journal of Machine Learning Research 11 2261–2286. YUAN, M. and LIN, Y. (2007). Model selection and estimation in the gaussian graphical model. Biometrika 94 19–35. ZHAO, T., LIU, H., ROEDER, K., LAFFERTY, J. and WASSERMAN, L. (2012). The huge package for high-dimensional undirected graph estimation in r. The Journal of Machine Learning Research 9 1059–1062. ZHAO, T., ROEDER, K. and LIU, H. (2013). Positive semidefinite rank-based correlation matrix estimation with application to semiparametric graph estimation. Journal of Computational and Graphical Statistics To appear. 9
2013
248
4,985
Thompson Sampling for 1-Dimensional Exponential Family Bandits Nathaniel Korda INRIA Lille - Nord Europe, Team SequeL nathaniel.korda@inria.fr Emilie Kaufmann Institut Mines-Telecom; Telecom ParisTech kaufmann@telecom-paristech.fr Remi Munos INRIA Lille - Nord Europe, Team SequeL remi.munos@inria.fr Abstract Thompson Sampling has been demonstrated in many complex bandit models, however the theoretical guarantees available for the parametric multi-armed bandit are still limited to the Bernoulli case. Here we extend them by proving asymptotic optimality of the algorithm using the Jeffreys prior for 1-dimensional exponential family bandits. Our proof builds on previous work, but also makes extensive use of closed forms for Kullback-Leibler divergence and Fisher information (through the Jeffreys prior) available in an exponential family. This allow us to give a finite time exponential concentration inequality for posterior distributions on exponential families that may be of interest in its own right. Moreover our analysis covers some distributions for which no optimistic algorithm has yet been proposed, including heavy-tailed exponential families. 1 Introduction K-armed bandit problems provide an elementary model for exploration-exploitation tradeoffs found at the heart of many online learning problems. In such problems, an agent is presented with K distributions (also called arms, or actions) {pa}K a=1, from which she draws samples interpreted as rewards she wants to maximize. This objective induces a trade-off between choosing to sample a distribution that has already yielded high rewards, and choosing to sample a relatively unexplored distribution at the risk of loosing rewards in the short term. Here we make the assumption that the distributions, pa, belong to a parametric family of distributions P = {p(· | θ), θ ∈Θ} where Θ ⊂R. The bandit model is described by a parameter θ0 = (θ1, . . . , θK) such that pa = p(· | θa). We introduce the mean function µ(θ) = EX∼p(·|θ)[X], and the optimal arm θ∗= θa∗where a∗= argmaxa µ(θa). An algorithm, A, for a K-armed bandit problem is a (possibly randomised) method for choosing which arm at to sample from at time t, given a history of previous arm choices and obtained rewards, Ht−1 := ((as, xs))t−1 s=1: each reward xs is drawn from the distribution pas. The agent’s goal is to design an algorithm with low regret: R(A, t) = R(A, t)(θ) := tµ(θ∗) −EA " t X s=1 xs # . This quantity measures the expected performance of algorithm A compared to the expected performance of an optimal algorithm given knowledge of the reward distributions, i.e. sampling always from the distribution with the highest expectation. 1 Since the early 2000s the “optimisim in the face of uncertainty” heuristic has been a popular approach to this problem, providing both simplicity of implementation and finite-time upper bounds on the regret (e.g. [4, 7]). However in the last two years there has been renewed interest in the Thompson Sampling heuristic (TS). While this heuristic was first put forward to solve bandit problems eighty years ago in [15], it was not until recently that theoretical analyses of its performance were achieved [1, 2, 11, 13]. In this paper we take a major step towards generalising these analyses to the same level of generality already achieved for “optimistic” algorithms. Thompson Sampling Unlike optimistic algorithms which are often based on confidence intervals, the Thompson Sampling algorithm, denoted by Aπ0 uses Bayesian tools and puts a prior distribution πa,0 = π0 on each parameter θa. A posterior distribution, πa,t, is then maintained according to the rewards observed in Ht−1. At each time a sample θa,t is drawn from each posterior πa,t and then the algorithm chooses to sample at = arg maxa∈{1,...,K}{µ(θa,t)}. Note that actions are sampled according to their posterior probabilities of being optimal. Our contributions TS has proved to have impressive empirical performances, very close to those of state of the art algorithms such as DMED and KL-UCB [11, 9, 7]. Furthermore recent works [11, 2] have shown that in the special case where each pa is a Bernoulli distribution B(θa), TS using a uniform prior over the arms is asymptotically optimal in the sense that it achieves the asymptotic lower bound on the regret provided by Lai and Robbins in [12] (that holds for univariate parametric bandits). As explained in [1, 2], Thompson Sampling with uniform prior for Bernoulli rewards can be slightly adapted to deal with bounded rewards. However, there is no notion of asymptotic optimality for this non-parametric family of rewards. In this paper, we extend the optimality property that holds for Bernoulli distributions to more general families of parametric rewards, namely 1dimensional exponential families if the algorithm uses the Jeffreys prior: Theorem 1. Suppose that the reward distributions belong to a 1-dimensional canonical exponential family and let πJ denote the associated Jeffreys prior. Then, lim T →∞ R(AπJ, T) ln T = K X a=1 µ(θa∗) −µ(θa) K(θa, θa∗) , (1) where K(θ, θ′) := KL(pθ, p′ θ) is the Kullback-Leibler divergence between pθ and p′ θ. This theorem follows directly from Theorem 2. In the proof of this result we provide in Theorem 4 a finite-time, exponential concentration bound for posterior distributions of exponential family random variables, something that to the best of our knowledge is new to the literature and of interest in its own right. Our proof also exploits the connection between the Jeffreys prior, Fisher information and the Kullback-Leibler divergence in exponential families. Related Work Another line of recent work has focused on distribution-independent bounds for Thompson Sampling. [2] establishes that R(AπU , T) = O( p KT ln(T)) for Thompson Sampling for bounded rewards (with the classic uniform prior πU on the underlying Bernoulli parameter). [14] go beyond the Bernoulli model, and give an upper bound on the Bayes risk (i.e. the regret averaged over the prior) independent of the prior distribution. For the parametric multi-armed bandit with K arms described above, their result states that the regret of Thompson Sampling using a prior π0 is not too big when averaged over this same prior: Eθ∼π⊗K 0 [R(Aπ0, T)(θ)] ≤4 + K + 4 p KT log(T). Building on the same ideas, [6] have improved this upper bound to 14 √ KT. In our paper, we rather see the prior used by Thompson Sampling as a tool, and we want therefore to derive regret bounds for any given problem parametrized by θ that depend on this parameter. [14] also use Thompson Sampling in more general models, like the linear bandit model. Their result is a bound on the Bayes risk that does not depend on the prior, whereas [3] gives a first bound on the regret in this model. Linear bandits consider a possibly infinite number of arms whose mean rewards are linearly related by a single, unknown coefficient vector. Once again, the analysis in [3] encounters the problem of describing the concentration of posterior distributions. However by using a conjugate normal prior, they can employ explicit concentration bounds available for Normal distributions to complete their argument. 2 Paper Structure In Section 2 we describe important features of the one-dimensional canonical exponential families we consider, including closed-form expression for KL-divergences and the Jeffreys’ prior. Section 3 gives statements of the main results, and provides the proof of the regret bound. Section 4 proves the posterior concentration result used in the proof of the regret bound. 2 Exponential Families and the Jeffreys Prior A distribution is said to belong to a one-dimensional canonical exponential family if it has a density with respect to some reference measure ν of the form: p(x | θ) = A(x) exp(T(x)θ −F(θ)), (2) where θ ∈Θ ⊂R. T and A are some fixed functions that characterize the exponential family and F(θ) = log R A(x) exp [T(x)θ] dν(x)  . Θ is called the parameter space, T(x) the sufficient statistic, and F(θ) the normalisation function. We make the classic assumption that F is twice differentiable with a continuous second derivative. It is well known [17] that: EX|θ(T(X)) = F ′(θ) and VarX|θ[T(X)] = F ′′(θ) showing in particular that F is strictly convex. The mean function µ is differentiable and stricly increasing, since we can show that µ′(θ) = CovX|θ(X, T(X)) > 0. In particular, this shows that µ is one-to-one in θ. KL-divergence in Exponential Families In an exponential family, a direct computation shows that the Kullback-Leibler divergence can be expressed as a Bregman divergence of the normalisation function, F: K(θ, θ′) = DB F (θ′, θ) := F(θ′) −[F(θ) + F ′(θ)(θ′ −θ)] . (3) Jeffreys prior in Exponential Families In the Bayesian literature, a special “non-informative” prior, introduced by Jeffreys in [10], is sometimes considered. This prior, called the Jeffreys prior, is invariant under re-parametrisation of the parameter space, and it can be shown to be proportional to the square-root of the Fisher information I(θ). In the special case of the canonical exponential family, the Fisher information takes the form I(θ) = F ′′(θ), hence the Jeffreys prior for the model (2) is πJ(θ) ∝ p |F ′′(θ)|. Under the Jeffreys prior, the posterior on θ after n observations is given by p(θ|y1, . . . yn) ∝ p F ′′(θ) exp θ n X i=1 T(yi) −nF(θi) ! (4) When R Θ p F ′′(θ)dθ < +∞, the prior is called proper. However, stasticians often use priors which are not proper: the prior is called improper if R Θ p F ′′(θ)dθ = +∞and any observation makes the corresponding posterior (4) integrable. Some Intuition for choosing the Jeffreys Prior In the proof of our concentration result for posterior distributions (Theorem 4) it will be crucial to lower bound the prior probability of an ϵ-sized KL-divergence ball around each of the parameters θa. Since the Fisher information F ′′(θ) = limθ′→θ K(θ, θ′)/|θ −θ′|2, choosing a prior proportional to F ′′(θ) ensures that the prior measure of such balls are Ω(√ϵ). Examples and Pseudocode Algorithm 1 presents pseudocode for Thompson Sampling with the Jeffreys prior for distributions parametrized by their natural parameter θ. But as the Jeffreys prior is invariant under reparametrization, if a distribution is parametrised by some parameter λ ̸≡θ, the algorithm can use the Jeffreys prior ∝ p I(λ) on λ, drawing samples from the posterior on λ. Note that the posterior sampling step (in bold) is always tractable using, for example, a HastingsMetropolis algorithm. 3 Algorithm 1 Thompson Sampling for Exponential Families with the Jeffreys prior Require: F normalization function, T sufficient statistic, µ mean function for t = 1 . . . K do Sample arm t and get rewards xt Nt = 1, St = T(xt). end for for t = K + 1 . . . n do for a = 1 . . . K do Sample θa,t from πa,t ∝ p F ′′(θ) exp (θSa −NaF(θ)) end for Sample arm At = argmaxaµ(θa,t) and get reward xt SAt = SAt + T(xt) NAt = NAt + 1 end for Name Distribution θ Prior on λ Posterior on λ B(λ) λx(1 −λ)1−xδ0,1 log  λ 1−λ  Beta 1 2, 1 2  Beta 1 2 + s, 1 2 + n −s  N(λ, σ2) 1 √ 2πσ2 e−(x−λ)2 2σ2 λ σ2 ∝1 N  s n, σ2 n  Γ(k, λ) λk Γ(k)xk−1e−λx1[0,+∞[(x) −λ ∝1 λ Γ(kn, s) P(λ) λxe−λ x! δN(x) log(λ) ∝ 1 √ λ Γ 1 2 + s, n  Pareto(xm, λ) λxλ m xλ+1 1[xm,+∞[(x) −λ −1 ∝1 λ Γ (n + 1, s −n log xm) Weibull(k, λ) kλ(xλ)k−1e−(λx)k1[0,+∞[ −λk ∝ 1 λk αλ(n−1)k exp(−λks) Figure 1: The posterior distribution after observations y1, . . . , yn depends on n and s = Pn i=1 T(yi) Some examples of common exponential family models are given in Figure 1, together with the posterior distributions on the parameter λ that is used by TS with the Jeffreys prior. In addition to examples already studied in [7] for which T(x) = x, we also give two examples of more general canonical exponential families, namely the Pareto distribution with known min value and unknown tail index λ, Pareto(xm, λ), for which T(x) = log(x), and the Weibul distribution with known shape and unknown rate parameter, Weibull(k, λ), for which T(x) = xk. These last two distributions are not covered even by the work in [8], and belong to the family of heavy-tailed distributions. For the Bernoulli model, we note futher that the use of the Jeffreys prior is not covered by the previous analyses. These analyses make an extensive use of the uniform prior, through the fact that the coefficient of the Beta posteriors they consider have to be integers. 3 Results and Proof of Regret Bound An exponential family K-armed bandit is a K-armed bandit for which the reward distributions pa are known to be elements of an exponential family of distributions P(Θ). We denote by pθa the distribution of arm a and its mean by µa = µ(θa). Theorem 2 (Regret Bound). Assume that µ1 > µa for all a ̸= 1, and that πa,0 is taken to be the Jeffreys prior over Θ. Then for every ϵ > 0 there exists a constant C(ϵ, P) depending on ϵ and on the problem P such that the regret of Thompson Sampling using the Jeffreys prior satisfies R(AπJ, T) ≤1 + ϵ 1 −ϵ K X a=2 (µ1 −µa) K(θa, θ1) ! ln(T) + C(ϵ, P). Proof: We give here the main argument of the proof of the regret bound, which proceed by bounding the expected number of draws of any suboptimal arm. Along the way we shall state concentration results whose proofs are postponed to later sections. 4 Step 0: Notation We denote by ya,s the s-th observation of arm a and by Na,t the number of times arm a is chosen up to time t. (ya,s)s≥1 is i.i.d. with distribution pθa. Let Y u a := (ya,s)1≤s≤u be the vector of first u observations from arm a. Ya,t := Y Na,t a is therefore the vector of observations from arm a available at the beginning of round t. Recall that πa,t, respectively πa,0, is the posterior, respectively the prior, on θa at round t of the algorithm. We define L(θ) to be such that PY ∼p(|θ)(p(Y |θ) ≥L(θ)) ≥1 2. Observations from arm a such that p(ya,s|θ) ≥L(θa) can therefore be seen as likely observations. For any δa > 0, we introduce the event ˜Ea,t = ˜Ea,t(δa): ˜Ea,t = ∃1 ≤s′ ≤Na,t : p(ya,s′|θa) ≥L(θa), PNa,t s=1,s̸=s′ T(ya,s) Na,t −1 −F ′(θa) ≤δa ! . (5) For all a ̸= 1 and ∆a such that µa < µa + ∆a < µ1, we introduce Eθ a,t = Eθ a,t(∆a) := µ (θa,t) ≤µa + ∆a  . On ˜Ea,t, the empirical sufficient statistic of arm a at round t is well concentrated around its mean and a ’likely’ realization of arm a has been observed. On Eθ a,t, the mean of the distribution with parameter θa,t does not exceed by much the true mean, µa. δa and ∆a will be carefully chosen at the end of the proof. Step 1: Decomposition The idea of the proof is to decompose the probability of playing a suboptimal arm using the events given in Step 0, and that E[Na,T ] = PT t=1 P (at = a): E [Na,T ] = T X t=1 P  at = a, ˜Ea,t, Eθ a,t  | {z } (A) + T X t=1 P  at = a, ˜Ea,t, (Eθ a,t)c | {z } (B) + T X t=1 P  at = a, ˜Ec a,t  | {z } (C) . where Ec denotes the complement of event E. Term (C) is controlled by the concentration of the empirical sufficient statistic, and (B) is controlled by the tail probabilities of the posterior distribution. We give the needed concentration results in Step 2. When conditioned on the event that the optimal arm is played at least polynomially often, term (A) can be decomposed further, and then controled by the results from Step 2. Step 3 proves that the optimal arm is played this many times. Step 2: Concentration Results We state here the two concentration results that are necessary to evaluate the probability of the above events. Lemma 3. Let (ys) be an i.i.d sequence of distribution p(· | θ) and δ > 0. Then P 1 u u X s=1 [T(ys) −F ′(θ)] ≥δ ! ≤2e−u ˜ K(θ,δ), where ˜K(θ, δ) = min(K(θ + g(δ), θ), K(θ −h(δ), θ)), with g(δ) > 0 defined by F ′(θ + g(δ)) = F ′(θ) + δ and h(δ) > 0 defined by F ′(θ −h(δ)) = F ′(θ) −δ. The two following inequalities that will be useful in the sequel can easily be deduced from Lemma 3. Their proof is gathered in Appendix A with that of Lemma 3. For any arm a, for any b ∈]0, 1[, T X t=1 P(at = a, ( ˜Ea,t(δa))c) ≤ ∞ X t=1 1 2 t + ∞ X t=1 2te−(t−1) ˜ K(θa,δa) (6) T X t=1 P(( ˜Ea,t(δa))c ∩Na,t > tb) ≤ ∞ X t=1 t 1 2 tb + ∞ X t=1 2t2e−(tb−1) ˜ K(θa,δa), (7) The second result tells us that concentration of the empirical sufficient statistic around its mean implies concentration of the posterior distribution around the true parameter: Theorem 4 (Posterior Concentration). Let πa,0 be the Jeffreys prior. There exists constants C1,a = C1(F, θa) > 0, C2,a = C2(F, θa, ∆a) > 0, and N(θa, F) s.t., ∀Na,t ≥N(θa, F), 1 ˜ Ea,tP µ(θa,t) > µ(θa) + ∆a|Ya,t  ≤C1,ae−(Na,t−1)(1−δaC2,a)K(θa,µ−1(µa+∆a))+ln(Na,t) whenever δa < 1 and ∆a are such that 1 −δaC2,a(∆a) > 0. 5 Step 3: Lower Bound the Number of Optimal Arm Plays with High Probability The main difficulty adressed in previous regret analyses for Thompson Sampling is the control of the number of draws of the optimal arm. We provide this control in the form of Proposition 5 which is adapted from Proposition 1 in [11]. The proof of this result, an outline of which is given in Appendix D, explores in depth the randomised nature of Thompson Sampling. In particular, we show that the proof in [11] can be significantly simplified, but at the expense of no longer being able to describe the constant Cb explicitly: Proposition 5. ∀b ∈(0, 1), ∃Cb(π, µ1, µ2, K) < ∞such that P∞ t=1 P N1,t ≤tb ≤Cb. Step 4: Bounding the Terms of the Decomposition Now we bound the terms of the decomposition as discussed in Step 1: An upper bound on term (C) is given in (6), whereas a bound on term (B) follows from Lemma 6 below. Although the proof of this lemma is standard, and bears a strong similarity to Lemma 3 of [3], we provide it in Appendix C for the sake of completeness. Lemma 6. For all actions a and for all ϵ > 0, ∃Nϵ = Nϵ(δa, ∆a, θa) > 0 such that (B) ≤[(1 −ϵ)(1 −δaC2,a)K(θa, µ−1(µa + ∆a))]−1 ln(T) + max{Nϵ, N(θa, F)} + 1. where Nϵ = Nϵ(δa, ∆a, θa) is the smallest integer such that for all n ≥Nϵ (n −1)−1 ln(C1,an) < ϵ(1 −δaC2,a)K(θa, µ−1(µa + ∆a)), and N(θa, F) is the constant from Theorem 4. When we have seen enough observations on the optimal arm, term (A) also becomes a result about the concentration of the posterior and the empirical sufficient statistic, but this time for the optimal arm: (A) ≤ T X t=1 P  at = a, ˜Ea,t, Eθ a,t, N1,t > tb + Cb ≤ T X t=1 P µ(θ1,t) ≤µ1 −∆′ a, N1,t > tb + Cb ≤ T X t=1 P  µ(θ1,t) ≤µ1 −∆′ a, ˜E1,t(δ1), N1,t > tb | {z } B′ + T X t=1 P  ˜Ec 1,t(δ1) ∩N1,t > tb | {z } C′ +Cb (8) where ∆′ a = µ1 −µa −∆a and δ1 > 0 remains to be chosen. The first inequality comes from Proposition 5, and the second inequality comes from the following fact: if arm 1 is not chosen and arm a is such that µ(θa,t) ≤µa + ∆a, then µ(θ1,t) ≤µa + ∆a. A bound on term (C’) is given in (7) for a = 1 and δ1. In Theorem 4, we bound the conditional probability that µ(θa,t) exceed the true mean. Following the same lines, we can also show that P (µ(θ1,t) ≤µ1 −∆′ a|Y1,t) 1 ˜ E1,t(δ1) ≤C1,1e−(N1,t−1)(1−δ1C2,1)K(θ1,µ−1(µ1−∆′ a))+ln(N1,t). For any ∆′ a > 0, one can choose δ1 such that 1 −δ1C1,1 > 0. Then, with N = N(P) such that the function u 7→e−(u−1)(1−δ1C2,1)K(θ1,µ−1(µ1−∆′ a))+ln u is decreasing for u ≥N, (B′) is bounded by N 1/b + ∞ X t=N 1/b+1 C1,1e−(tb−1)(1−δ1C2,1)K(θ1,µ−1(µ1−∆′ a))+ln(tb) < ∞. Step 4: Choosing the Values δa and ϵa So far, we have shown that for any ϵ > 0 and for any choice of δa > 0 and 0 < ∆a < µ1 −µa such that 1 −δaC2,a > 0, there exists a constant C(δa, ∆a, ϵ, P) such that E[Na,T ] ≤ ln(T) (1 −δaC2,a)K(θa, µ−1(µa + ∆a))(1 −ϵ) + C(δa, ∆a, ϵ, P) The constant is of course increasing (dramatically) when δa goes to zero, ∆a to µ1 −µa, or ϵ to zero. But one can choose ∆a close enough to µ1 −µa and δa small enough, such that (1 −C2,a(∆a)δa)K(θa, µ−1(µa + ∆a)) ≥K(θa, θ1) (1 + ϵ) , and this choice leads to E[Na,T ] ≤1 + ϵ 1 −ϵ ln(T) K(θa, θ1) + C(δa, ∆a, ϵ, P). Using that R(A, T) = PK a=2(µ1 −µa)EA[Na,T ] for any algorithm A concludes the proof. 6 4 Posterior Concentration: Proof of Theorem 4 For ease of notation, we drop the subscript a and let (ys) be an i.i.d. sequence of distribution pθ, with mean µ = µ(θ). Furthermore, by conditioning on the value of Ns, it is enough to bound 1 ˜ EuP (µ(θu) ≥µ + ∆|Y u) where Y u = (ys)1≤s≤u and ˜Eu = ∃1 ≤s′ ≤u : p(ys′|θ) ≥L(θ), Pu s=1,s̸=s′ T(ys) u −1 −F ′(θ) ≤δ ! . Step 1: Extracting a Kullback-Leibler Rate The argument rests on the following Lemma, whose proof can be found in Appendix B Lemma 7. Let ˜Eu be the event defined by (5), and introduce Θθ,∆:= {θ′ ∈Θ : µ(θ′) ≥µ(θ)+∆}. The following inequality holds: 1 ˜ EuP (µ(θu) ≥µ + ∆|Y u) ≤ R θ′∈Θθ,∆e−(u−1)(K[θ,θ′]−δ|θ−θ′|)π(θ′|ys′)dθ′ R θ′∈Θ e−(u−1)(K[θ,θ′]+δ|θ−θ′|)π(θ′|ys′)dθ′ , (9) with s′ = inf{s ∈N : p(ys|θ) ≥L(θ)}. Step 2: Upper bounding the numerator of (9) We first note that on Θθ,∆the leading term in the exponential is K(θ, θ′). Indeed, from (3) we know that K(θ, θ′)/|θ −θ′| = |F ′(θ) −(F(θ) −F(θ′))/(θ −θ′)| which, by strict convexity of F, is strictly increasing in |θ −θ′| for any fixed θ. Now since µ is one-to-one and continuous, Θc θ,∆is an interval whose interior contains θ, and hence, on Θθ,∆, K(θ, θ′) |θ −θ′| ≥F(µ−1(µ + ∆)) −F(θ) µ−1(µ + ∆) −θ −F ′(θ) := (C2(F, θ, ∆))−1 > 0. So for δ such that 1 −δC2 > 0 we can bound the numerator of (9) by: Z θ′∈Θθ,∆ e−(u−1)(K(θ,θ′)−δ|θ−θ′|)π(θ′|ys′)dθ′ ≤ Z θ′∈Θθ,∆ e−(u−1)K(θ,θ′)(1−δC2)π(θ′|ys′)dθ′ ≤e−(u−1)(1−δC2)K(θ,µ−1(µ+∆)) Z Θθ,∆ π(θ′|ys′)dθ′ ≤e−(u−1)(1−δC2)K(θ,µ−1(µ+∆)) (10) where we have used that π(·|ys′) is a probability distribution, and that, since µ is increasing, K(θ, µ−1(µ + ∆)) = infθ′∈Θθ,∆K(θ, θ′). Step 3: Lower bounding the denominator of (9) To lower bound the denominator, we reduce the integral on the whole space Θ to a KL-ball, and use the structure of the prior to lower bound the measure of that KL-ball under the posterior obtained with the well-chosen observation ys′. We introduce the following notation for KL balls: for any x ∈Θ, ϵ > 0, we define Bϵ(x) := {θ′ ∈Θ : K(x, θ′) ≤ϵ} . We have K(θ,θ′) (θ−θ′)2 →F ′′(θ) ̸= 0 (since F is strictly convex). Therefore, there exists N1(θ, F) such that for u ≥N1(θ, F), on B 1 u2 (θ), |θ −θ′| ≤ p 2K(θ, θ′)/F ′′(θ). Using this inequality we can then bound the denominator of (9) whenever u ≥N1(θ, F) and δ < 1: Z θ′∈Θ e−(u−1)(K(θ,θ′)+δ|θ−θ′|)π(θ′|ys′)dθ′ ≥ Z θ′∈B1/u2(θ) e−(u−1)(K(θ,θ′)+δ|θ−θ′|)π(θ′|ys′)dθ′ ≥ Z θ′∈B1/u2(θ) e −(u−1)  K(θ,θ′)+δ r 2K(θ,θ′) F ′′(θ)  π(θ′|ys′)dθ′ ≥π B1/u2(θ)|ys′ e −  1+ q 2 F ′′(θ)  . (11) 7 Finally we turn our attention to the quantity π B1/u2(θ)|ys′ = R B1/u2(θ) p(y′ s|θ′)π0(θ′)dθ′ R Θ p(y′s|θ′)π0(θ′)dθ′ = R B1/u2(θ) p(y′ s|θ′) p F ′′(θ′)dθ′ R Θ p(y′s|θ′) p F ′′(θ′)dθ′ . (12) Now since the KL divergence is convex in the second argument, we can write B1/u2(θ) = (a, b). So, from the convexity of F we deduce that 1 u2 = K(θ, b) = F(b) −[F(θ) + (b −θ)F ′(θ)] = (b −θ) F(b) −F(θ) (b −θ) −F ′(θ)  ≤(b −θ) [F ′(b) −F ′(θ)] ≤(b −a) [F ′(b) −F ′(θ)] ≤(b −a) [F ′(b) −F ′(a)] . As p(y | θ) →0 as y →±∞, the set C(θ) = {y : p(y | θ) ≥L(θ)} is compact. The map y 7→ R Θ p(y|θ′) p F ′′(θ′)dθ′ < ∞is continuous on the compact C(θ). Thus, it follows that L′(θ) = L′(θ, F) := sup y:p(y|θ)>L(θ) Z Θ p(y|θ′) p F ′′(θ′)dθ′  < ∞ is an upper bound on the denominator of (12). Now by the continuity of F ′′, and the continuity of (y, θ) 7→p(y|θ) in both coordinates, there exists an N2(θ, F) such that for all u ≥N2(θ, F) F ′′(θ) ≥1 2 F ′(b) −F ′(a) b −a and  p(y|θ′) p F ′′(θ′) ≥L(θ) 2 p F ′′(θ), ∀θ′ ∈B1/u2(θ), y ∈C(θ)  . Finally, for u ≥N2(θ, F), we have a lower bound on the numerator of (12): Z B1/u2(θ) p(y′ s|θ′) p F ′′(θ′)dθ′ ≥L(θ) 2 p F ′′(θ) Z b a dθ′ = L(θ) 2 p (F ′(b) −F ′(a)) (b −a) ≥L(θ) 2u Puting everything together, we get that there exist constants C2 = C2(F, θ, ∆) and N(θ, F) = max{N1, N2} such that for every δ < 1 satisfying 1 −δC2 > 0, and for every u ≥N, one has 1 ˜ EuP(µ(θu) ≥µ(θ) + ∆|Yu) ≤2e 1+ q 2 F ′′(θ) L′(θ)u L(θ) e−(u−1)(1−δC2)K(θ,µ−1(µ+∆)). Remark 8. Note that when the prior is proper we do not need to introduce the observation ys′, which significantly simplifies the argument. Indeed in this case, in (10) we can use π0 in place of π(·|ys′) which is already a probability distribution. In particular, the quantity (12) is replaced by π0 B1/u2(θ)  , and so the constants L and L′ are not needed. 5 Conclusion We have shown that choosing to use the Jeffreys prior in Thompson Sampling leads to an asymptotically optimal algorithm for bandit models whose rewards belong to a 1-dimensional canonical exponential family. The cornerstone of our proof is a finite time concentration bound for posterior distributions in exponential families, which, to the best of our knowledge, is new to the literature. With this result we built on previous analyses and avoided Bernoulli-specific arguments. Thompson Sampling with Jeffreys prior is now a provably competitive alternative to KL-UCB for exponential family bandits. Moreover our proof holds for slightly more general problems than those for which KL-UCB is provably optimal, including some heavy-tailed exponential family bandits. Our arguments are potentially generalisable. Notably generalising to n-dimensional exponential family bandits requires only generalising Lemma 3 and Step 3 in the proof of Theorem 4. Our result is asymptotic, but the only stage where the constants are not explicitly derivable from knowledge of F, T, and θ0 is in Lemma 9. Future work will investigate these open problems. Another possible future direction lies the optimal choice of prior distribution. Our theoretical guarantees only hold for Jeffreys’ prior, but a careful examination of our proof shows that the important property is to have, for every θa, −ln Z (θ′:K(θa,θ′)≤n−2) π0(θ′)dθ′ ! = o (n) , which could hold for prior distributions other than the Jeffreys prior. 8 References [1] S. Agrawal and N. Goyal. Analysis of thompson sampling for the multi-armed bandit problem. In Conference On Learning Theory (COLT), 2012. [2] S. Agrawal and N. Goyal. Further optimal regret bounds for thompson sampling. In Sixteenth International Conference on Artificial Intelligence and Statistics (AISTATS), 2012. [3] S. Agrawal and N. Goyal. Thompson sampling for contextual bandits with linear payoffs. In 30th International Conference on Machine Learning (ICML), 2013. [4] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2):235–256, 2002. [5] S. Boucheron, G. Lugosi, and P. Massart. Concentration Inequalities. Oxford Univeristy Press, 2013. [6] S. Bubeck and Che-Yu Liu. A note on the bayesian regret of thompson sampling with an arbitrairy prior. arXiv:1304.5758, 2013. [7] O. Capp´e, A. Garivier, O-A. Maillard, R. Munos, and G. Stoltz. Kullback-Leibler upper confidence bounds for optimal sequential allocation. Annals of Statistics, 41(3):516–541, 2013. [8] A. Garivier and O. Capp´e. The kl-ucb algorithm for bounded stochastic bandits and beyond. In Conference On Learning Theory (COLT), 2011. [9] J. Honda and A. Takemura. An asymptotically optimal bandit algorithm for bounded support models. In Conference On Learning Theory (COLT), 2010. [10] H. Jeffreys. An invariant form for prior probability in estimation problem. Proceedings of the Royal Society of London, 186:453–461, 1946. [11] E. Kaufmann, N. Korda, and R. Munos. Thompson sampling: An asymptotically optimal finite-time analysis. In Algorithmic Learning Theory, Lecture Notes in Computer Science, pages 199–213. Springer, 2012. [12] T.L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [13] B.C. May, N. Korda, A. Lee, and D. Leslie. Optimistic bayesian sampling in contextual bandit problems. Journal of Machine Learning Research, 13:2069–2106, 2012. [14] D. Russo and B. Van Roy. Learning to optimize via posterior sampling. arXiv:1301.2609, 2013. [15] 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. [16] A.W Van der Vaart. Asymptotic Statistics. Cambridge University Press, 1998. [17] L. Wasserman. All of Statistics: A Concise Course in Statistical Inference. Springer Publishing Company, Incorporated, 2010. 9
2013
249
4,986
Action is in the Eye of the Beholder: Eye-gaze Driven Model for Spatio-Temporal Action Localization Nataliya Shapovalova∗ Michalis Raptis† Leonid Sigal‡ Greg Mori∗ ∗Simon Fraser University †Comcast ‡Disney Research {nshapova,mori}@cs.sfu.ca mraptis@cable.comcast.com lsigal@disneyresearch.com Abstract We propose a weakly-supervised structured learning approach for recognition and spatio-temporal localization of actions in video. As part of the proposed approach, we develop a generalization of the Max-Path search algorithm which allows us to efficiently search over a structured space of multiple spatio-temporal paths while also incorporating context information into the model. Instead of using spatial annotations in the form of bounding boxes to guide the latent model during training, we utilize human gaze data in the form of a weak supervisory signal. This is achieved by incorporating eye gaze, along with the classification, into the structured loss within the latent SVM learning framework. Experiments on a challenging benchmark dataset, UCF-Sports, show that our model is more accurate, in terms of classification, and achieves state-of-the-art results in localization. In addition, our model can produce top-down saliency maps conditioned on the classification label and localized latent paths. 1 Introduction Structured prediction models for action recognition and localization are emerging as prominent alternatives to more traditional holistic bag-of-words (BoW) representations. The obvious advantage of such models is the ability to localize, spatially and temporally, an action (and actors) in potentially long and complex scenes with multiple subjects. Early alternatives [3, 7, 14, 27] address this challenge using sub-volume search, however, this implicitly assumes that the action and actor(s) are static within the frame. More recently, [9] and [18, 19] propose figure-centric approaches that can track an actor by searching over the space of spatio-temporal paths in video [19] and by incorporating person detection into the formulation [9]. However, all successful localization methods, to date, require spatial annotations in the form of partial poses [13], bounding boxes [9, 19] or pixel level segmentations [7] for learning. Obtaining such annotations is both time consuming and unnatural; often it is not easy for a human to decide which spatio-temporal segment corresponds to an action. One alternative is to proceed in a purely unsupervised manner and try to mine for most discriminant portions of the video for classification [2]. However, this often results in overfitting due to the relatively small and constrained nature of the datasets, as discriminant portions of the video, in training, may correspond to regions of background and be unrelated to the motion of interest (e.g., grass may be highly discriminative for “kicking” action because in the training set most instances come from soccer, but clearly “kicking” can occur on nearly any surface). Bottom-up perceptual saliency, computed from eye-gaze of observers (obtained using an eye tracker), has recently been introduced as another promising alternative to annotation and supervision [11, 21]. It has been shown that traditional BoW models computed over the salient regions of the video result in superior performance, compared to dense sampling of descriptors. However, this comes at expense of losing ability to localize actions. Bottom-up saliency models usually respond to numerous unrelated low-level stimuli [25](e.g., textured cluttered backgrounds, large motion gradients from subjects irrelevant to the action, etc.) which often fall outside the region of the action (and can confuse classifiers). 1 In this paper we posit that a good spatio-temporal model for action recognition and localization should have three key properties: (1) be figure-centric, to allow for subject and/or camera motion, (2) discriminative, to facilitate classification and localization, and (3) perceptually semantic, to mitigate overfitting to accidental statistical regularities in a training set. To avoid reliance on spatial annotation of actors we utilize human gaze data (collected by having observers view corresponding videos [11]) as weak supervision in learning1. Note that such weak annotation is more natural, effortless (from the point of view of an annotator) and can be done in real-time. By design, gaze gives perceptually semantic interest regions, however, while semantic, gaze, much like bottom-up saliency, is not necessarily discriminative. Fig. 1(b) shows that while for some (typically fast) actions like “diving”, gaze may be well aligned with the actor and hence discriminative, for others, like “golf” and “horse riding”, gaze may either drift to salient but non discriminant regions (the ball), or simply fall on background regions that are prominent or of intrinsic aesthetic value to the observer. To deal with complexities of the search and ambiguities in the weak-supervision, given by gaze, we formulate our model in a max-margin framework where we attempt to infer latent smooth spatiotemporal path(s) through the video that simultaneously maximize classification accuracy and pass through regions of high gaze concentration. During learning, this objective is encouraged in the latent Structural SVM [26] formulation through a real-valued loss that penalizes misclassification and, for correctly classified instances, misalignment with salient regions induced by the gaze. In addition to classification and localization, we show that our model can provide top-down actionspecific saliency by predicting distribution over gaze conditioned on the action label and inferred spatio-temporal path. Having less (annotation) information available at training time, our model shows state-of-the art classification and localization accuracy on the UCF-Sports dataset and is the first, to our knowledge, to propose top-down saliency for action classification task. 2 Related works Action recognition: The literature on vision-based action recognition is too vast. Here we focus on the most relevant approaches and point the reader to recent surveys [20, 24] for a more complete overview. The most prominent action recognition models to date utilize visual BoW representations [10, 22] and extensions [8, 15]. Such holistic models have proven to be surprisingly good at recognition, but are, by design, incapable of spatial or temporal localization of actions. Saliency and eye gaze: Work in cognitive science suggests that control inputs to the attention mechanism can be grouped into two categories: stimulus-driven (bottom-up) and goal-driven (top-down) [4]. Recent work in action recognition [11, 21] look at bottom-up saliency as a way to sparsify descriptors and to bias BoW representations towards more salient portions of the video. In [11] and [21] multiple subjects were tasked with viewing videos while their gaze was recorded. A saliency model is then trained to predict the gaze and is used to either prune or weight the descriptors. However, the proposed saliency-based sampling is purely bottom-up, and still lacks ability to localize actions in either space or time2. In contrast, our model is designed with spatio-temporal localization in mind and uses gaze data as weak supervision during learning. In [16] and [17] authors use “objectness” saliency operator and person detector as weak supervision respectively, however, in both cases the saliency is bottom-up and task independent. The top-down discriminative saliency, based on distribution of gaze, in our approach, allows our model to focus on perceptually salient regions that are also discriminative. Similar in spirit, in [5] gaze and action labels are simultaneously inferred in ego-centric action recognition setting. While conceptually similar, the model in [5] is significantly different both in terms of formulation and use. The model [5] is generative and relies on existence of object detectors. Sub-volume search: Spatio-temporal localization of actions is a difficult task, largely due to the computational complexity of search involved. One way to alleviate this computational complexity is to model the action as an axis aligned rectangular 3D volume. This allows spatio-temporal search to be formulated efficiently using convolutions in the Fourier [3] or Clifford Fourier [14] domain. In [28] an efficient spatio-temporal branch-and-bound approach was proposed as alternative. However, the assumption of single fixed axis aligned volumetric representation is limiting and only applicable 1We assume no gaze data is available for test videos. 2Similar observations have been made in object detection domain [25], where purely bottom-up saliency has been shown to produce responses on textured portions of the background, outside of object of interest. 2 (a) (b) Figure 1: Graphical model representation is illustrated in (a). Term φ(x, h) captures information about context (all the video excluding regions defined by latent variables h); terms ψ(x, hi) capture information about latent regions. Inferred latent regions should be discriminative and match high density regions of eye gaze data. In (b) ground truth eye gaze density, computed from fixations of multiple subjects, is overlaid over images from sequences of 3 different action classes (see Sect. 1). for well defined and relatively static actions. In [7] an extension to multiple sub-volumes that model parts of the action is proposed and amounts to a spatio-temporal part-based (pictorial structure) model. While part-based model of [7] allows for greater flexibility, the remaining axis-aligned nature of part sub-volumes is still largely appropriate for recognition in scenarios where camera and subject are relatively static. This constraint is slightly relaxed in [12] where a part-based model built on dense trajectory clustering is proposed. However, [12] relies on sophisticated pre-processing which requires building long feature trajectories over time, which is difficult to do for fast motions or less textured regions. Most closely related approaches to our work come from [9, 18, 19]. In [18] Tran and Yuan show that a rectangular axis-aligned volume constraint can be relaxed by efficiently searching over the space of smooth paths within the spatio-temporal volume. The resulting Max-Path algorithm is applied to object tracking in video. In [19] this approach is further extended by incorporating MaxPath inference into a max-margin structured output learning framework, resulting in an approach capable of localizing actions. We generalize Max-Path idea by allowing multiple smooth paths and context within a latent max-margin structured output learning. In addition, our model is trained to simultaneously localize and classify actions. Alternatively, [9] uses latent SVM to jointly detect an actor and recognize actions. In practice, [9] relies on human detection for both inference and learning and only sub-set of frames can be localized due to the choice of the features (HOG3D). Similarly, [2] relies on person detection and distributed partial pose representation, in the form of poselets, to build a spatio-temporal graph for action recognition and localization. We want to stress that [2, 9, 18, 19] require bounding box annotations for actors in learning. In contrast, we focus on weaker and more natural source of data – gaze, to formulate our learning criteria. 3 Recognizing and Localizing Actions in Videos Our goal is to learn a model that can jointly localize and classify human actions in video. This problem is often tackled in the same manner as object recognition and localization in images. However, extension to a temporal domain comes with many challenges. The core challenges we address are: (i) dealing with a motion of the actor within the frame, resulting from camera or actor’s own motion in the world; (ii) complexity of the resulting spatio-temporal search, that needs to search over the space of temporal paths; (iii) ability to model coarse temporal progression of the action and action context, and (iv) learning in absence of direct annotations for actor(s) position within the frame. To this end, we propose a model that has the ability to localize temporally and spatially discriminative regions of the video and encode the context in which these regions occur. The output of the model indicates the absence or presence of a particular action in the video sequence while simultaneously extracting the most discriminative and perceptually salient spatio-temporal video regions. During the training phase, the selection of these regions is implicitly driven by eye gaze fixations collected by a sample of viewers. As a consequence, our model is able to perform top-down video saliency detection conditioned on the performed action and localized action region. 3 1 Model Formulation Given a set of video sequences {x1, . . . , xn} ⊂X and their associated labels {y1, . . . , yn}, with yi ∈{−1, 1}, our purpose is to learn a mapping f : X →{−1, 1}. Additionally, we introduce auxiliary latent variables {h1, . . . , hn}, where hi = {hi1, . . . , hiK} and hik ∈∅∪{(lj, tj, rj, bj)Te j=Ts} denotes the left, top, right and bottom coordinates of spatio-temporal paths of bounding boxes that are defined from frame Ts up to Te. The latent variables h specify the spatio-temporal regions selected by our model. Our function is then defined y∗ x(w) = f(x; w), where (y∗ x(w), h∗ x(w)) = argmax (y,h)∈{−1,1}×H F(x, y, h; w), F(x, y, h; w) = wT Ψ(x, y, h), (1) w is a parameter of the model, and Ψ(x, y, h) ∈Rd is a joint feature map. Video sequences in which the action of interest is absent are treated as zero vectors in the Hilbert space induced by the feature map Ψ similar to [1]. Whereas, the corresponding feature map of videos where the action of interest is present is being decomposed into two components: a) the latent regions and b) context regions. As a consequence, the scoring function is written: F(x, y = 1, h; w) = wT Ψ(x, y = 1, h) = wT 0 φ(x, h) + K X k=1 wT k ψ(x, hk) + b (2) where K is the number of latent regions of the action model and b is the bias term. A graphical representation of the model is illustrated in Fig. 1(a). Latent regions potential wT k ψ(x, hk): This potential function measures the compatibility of latent spatio-temporal region hk with the action model. More specifically, ψ(x, hk) returns the sum of normalized BoW histograms extracted from the bounding box defined by the latent variable hk = (lj, tj, rj, bj)Te j=Ts at each corresponding frame. Context potential wT 0 φ(x, h): We define context as the entire video sequence excluding the latent regions; our aim is to capture any information that is not directly produced by the appearance and motion of the actor. The characteristics of the context are encoded in φ(x, h) as a sum of normalized BoW histograms at each frame of the video excluding the regions indicated by latent variables h. Many action recognition scoring functions recently proposed [9, 12, 16] include the response of a global BoW statistical representation of the entire video. While such formulations are simpler, since the response of the global representation is independent from the selection of the latent variables, they are also somewhat unsatisfactory from the modeling point of view. First, the visual information that corresponds to the latent region of interest implicitly gets to be counted twice. Second, it is impossible to decouple and analyze importance of foreground and contextual information separately. 2 Inference Given the model parameters w and an unseen video x our goal is to infer the binary action label y∗as well as the location of latent regions h∗(Eq. 1). The scoring function for the case of y = −1 is equal to zero due to the trivial zero vector feature map (Sect. 1). However, estimating the optimal value of the scoring function for the case of y = 1 involves the maximization over the latent variables. The search space over even a single spatio-temporal path (non-smooth) of variable size bounding boxes in a video sequence of width M, height N and length T is exponential: O(MN)2T . Therefore, we restrict the search space by introducing a number of assumptions. We constraint the search space to smooth spatio-temporal paths3 of fixed size bounding boxes [18]. These constraints allows the inference of the optimal latent variables for a single region using dynamic programming, similarly to Max-Path algorithm proposed by Tran and Yuan [18]. Algorithm 1 summarizes the process of dynamic programming considering both the context and the latent region contributions. The time and space complexity of this algorithm is O(MNT). However, without introducing further constraints on the latent variables, the extension of this forward message passing procedure to multiple latent regions results in an exponential, in the number of regions, algorithm because of the implicit dependency of the latent variables through the context 3The feasible positions of the bounding box in a frame are constrained by its location in the previous frame. 4 Algorithm 1 MaxCPath: Inference of Single Latent Region with Context 1: Input : R(t): the context local response without the presence of bounding box, Q0(u, v, t): the context local response excluding the bounding box at location (u, v), Q1(u, v, t): the latent region local response 2: Output : S(t): score of the best path till frame t, L(t): end point of the best path till t, P (u, v, t): the best path record for tracing back 3: Initialize S∗= −inf, S(u, v, 0) = −inf, ∀u, v, l∗= null 4: for t ←1 to T do // Forward Process, Backward Process: t ←T to 1 5: for each (u, v) ∈[1..M] × [1..N] do 6: (u0, v0) ←argmax(u′,v′)∈Nb(u,v) S(u′, v′, t −1) 7: if S(u0, v0, t −1) > PT i=1 R(i) then 8: S(u, v, t) ←S(u0, v0, t −1) + Q0(u, v, t) + Q1(u, v, t) −R(t) 9: P (u, v, t) ←(u0, v0, t −1) 10: else 11: S(u, v, t) ←Q0(u, v, t) + Q1(u, v, t) + PT i=1 R(i) −R(t) 12: end if 13: if S(u, v, t) > S∗then 14: S∗←S(u, v, t) and l∗←(u, v, t) 15: end if 16: end for 17: S(t) ←S∗and L(t) ←l∗ 18: end for Algorithm 2 Inference: Two Latent Region with Context 1: Input : R(t): the context local response without the presence of bounding box, Q0(u, v, t): the context local response excluding the bounding box at location (u, v), Q1(u, v, t): the latent region local response of the first latent region, Q2(u, v, t): the latent region local response of the second latent region. 2: Output : S∗: the maximum score of the inference, h1, h2: first and second latent regions 3: Initialize S∗= −inf, t∗= null 4: (S1, L1, P1) ←MaxCP ath −F orward(R, Q0, Q1) 5: (S2, L2, P2) ←MaxCP ath −Backward(R, Q0, Q2) 6: for t ←1 to T −1 do 7: S ←S1(t) + S2(t + 1) −PT i=1 R(i) 8: if S > S∗then 9: S∗←S and t∗←t 10: end if 11: end for 12: h1 ←traceBackward(P1, L1(t∗)) 13: h2 ←traceF orward(P2, L2(t∗+ 1)) term. Incorporating temporal ordering constraints between the K latent regions leads to a polynomial time algorithm. More specifically, the optimal scoring function can be inferred by enumerating all potential end locations of each latent region and executing independently Algorithm 1 at each interval in O(MNT K). For the special case of K = 2, we derive a forward/backward message process that remains linear in the size of video volume: O(MNT); see summary in Algorithm 2. In our experimental validation a model with 2 latent regions proved to be sufficiently expressive. 3 Learning Framework Identifying the spatio-temporal regions of the video sequences that will enable our model to detect human action is a challenging optimization problem. While the introduction of latent variables in discriminative models [6, 9, 12, 13, 23, 26] is natural for many applications (e.g., modeling body parts) and has also offered excellent performance [6], it also lead to training formulations with nonconvex functions. In our training formulation we adopt the large-margin latent structured output learning [26], however we also introduce a loss function that weakly supervises the selection of latent variables based on human gaze information. Our training set of videos {x1, . . . , xn} along with their action labels {y1, . . . , yn} contains 2D fixation points (sampled at much higher frequency than the video frame rate) of 16 subjects observing the videos [11]. We transform these measurements using kernel density estimation with Gaussian kernel (with bandwidth set to the visual angle span of 2◦) to a probability density function of gaze gi = {g1 i , . . . , gTi i } at each frame of video xi. Following the Latent Structural SVM formulation [26], our learning takes the following form: min w,ξ≥0 1 2∥w∥2 + C n X i=1 ξi (3) max h′ i∈H wT Ψ(xi, yi, h′ i) −wT Ψ(xi, ˆyi, ˆhi) ≥∆(yi, gi, ˆyi, ˆhi) −ξi, ∀ˆyi ∈{−1, 1}, ∀ˆhi ∈H, 5 where ∆(yi, gi, ˆyi, ˆhi) ≥0 is an asymmetric loss function encoding the cost of an incorrect action label prediction but also of mislocalization of the eye gaze. The loss function is defined as follows: ∆(yi, gi, ˆyi, ˆhi) =  1 −1 K PK k=1 δ(gi, ˆhik) if yi = ˆyi = 1, 1 −1 2(yiˆyi + 1) otherwise. (4) δ(gi, ˆhik) indicates the minimum overlap of ˆhik and a given eye gaze gi map over a frame: δ(gi, ˆhik) = min j δp(bj ik, gj i ), Ts,k ≤j ≤Te,k, (5) δp(bj ik, gj i ) = ( 1 if P bj ik gj i ≥r, 0 < r < 1, 1 r P bj ik gj i otherwise, (6) where bj ik is the bounding box at frame j of the k-th latent region in the xi video. The parameter r regulates the minimum amount of eye gaze “mass” that should be enclosed by each bounding box. The loss function can be easily incorporated in Algorithm 1 during the loss-augmented inference. 4 Gaze Prediction Our model is based on the core assumption that a subset of perceptually salient regions of a video, encoded by the gaze map, share discriminative idiosyncrasies useful for human action classification. The loss function dictating the learning process enables the model’s parameter (i.e , w) to encode this notion into our model4. Assuming our assumption holds in practice, we can use selected latent regions for prediction of top-down saliency within the latent region. We do so by regressing the amount of eye gaze (probability density map over gaze) on a fixed grid, inside each bounding box of the latent regions, by conditioning on low level features that construct the feature map ψi and the action label. In this way the latent regions select consistent salient portions of videos using top-down knowledge about the action, and image content modulates the saliency prediction within that region. Given the training data gaze g and the corresponding inferred latent variables h, we learn a linear regression, per action class, that maps augmented feature representation of the extracted bounding boxes, of each latent region, to a coarse description of the corresponding gaze distribution. Each bounding box is divided into a 4 × 4 grid and a BoW representation for each cell is computed; augmented feature is constructed by concatenating these histograms. Similarly, the human gaze is summarized by a 16 dimension vector by accumulating gaze density at each cell over a 4 × 4 grid. For visualization, we further smooth the predictions to obtain a continuous and smooth gaze density over the latent regions. We find our top-down saliency predictions to be quite good (see Sect. 5) in most cases which experimentally validated our initial model assumption. 5 Experiments We evaluate our model on the UCF-Sports dataset presented in [14]. The dataset contains 150 videos extracted from broadcast television channels and includes 10 different action classes. The dataset includes annotation of action classes as well as bounding boxes around the person of interest (which we ignore for training but use to measure localization performance). We follow the evaluation setup defined in the of Lan et al. [9] and split the dataset into 103 training and 47 test samples. We employ the eye gaze data made available by Mathe and Sminchisescu [11]. The data captures eye movements of 16 subjects while they were watching the video clips from the dataset. The eye gaze data are represented with a probability density function (Sect. 4). Data representation: We extract HoG, HoF, and HoMB descriptors [12] at a dense spatio-temporal grid and at 4 different scales. These descriptors are clustered into 3 vocabularies of 500, 500, 300 sizes correspondingly. For the baseline experiments, we use ℓ1-normalized histogram representation. For the potentials described in Sect. 1, we represent latent regions/context with the sum of perframe normalized histograms. Per-frame normalization, as opposed to global normalization over the spatio-temporal region, allows us to aggregate scores iteratively in Algorithm 1. Baselines: We compare our model to several baseline methods. All our baselines are trained with linear SVM, to make them comparable to our linear model, and use the same feature representation 4Parameter r of the loss (Sect. 3) modulates importance of gaze localization within the latent region. 6 Model Accuracy Localization Baselines Global BoW 64.29 N/A BoW with SS 65.95 N/A BoW with TS 69.64 N/A # of Latent Regions K = 1 K = 2 K = 1 K = 2 Our Model Region 77.98 82.14 26.4 20.8 Region+Context 77.62 81.31 32.3 29.3 Region+Global 76.79 80.71 29.6 30.4 State-of-the-art Lan et al. [9] 73.1 27.8 Tran and Yuan [19] N/A 54.3∗ Shapovalova et al. [16] 75.3 N/A Raptis et al. [12] 79.4 N/A Table 1: Action classification and localization results. Our model significantly outperforms the baselines and most of the State-of-the-art results (see text for discussion). ∗Note that the average localization score is calculated based only on three classes reported in [19]. as described above. We report performance of three baselines: (1) Global BoW, where video is represented with just one histogram and all the temporal-spatial structure is discarded. (2) BoW with spatial split (SS), where video is divided by a 2 × 2 spatial grid and parts in order to capture spatial structure. (3) BoW with temporal split (TS), where the video is divided into 2 consecutive temporal segments. This setup allows the capture of the basic temporal structure of human action. Our model: We evaluate three different variants of our model, which we call Region, Region+Global, and Region+Context. Region: includes only the latent regions, the potentials ψ from our scoring function in Eq. 1, and ignores the context features φ. Region+Global: the context potential φ is replaced with a Global BoW, like in our first baseline. Region+Context: represents our full model from the Eq. 1. We test all our models with one and two latent regions. Action classification and localization: Results of action classification are summarized in Table 1. We train a model for each action separately in a standard one-vs-all framework. Table 1 shows that all our models outperform the BoW baselines and the results of Lan et al. [9] and Shapovalova et al. [16]. The Region and Region+Context models with two latent regions demonstrate superior performance compared to Raptis et al. [12]. Our model with 1 latent region performs slightly worse then model of Raptis et al. [12], however note that [12] used non-linear SVM with χ2 kernel and 4 regions, while we work with linear SVM only. Further, we can clearly see that having 2 latent regions is beneficial, and improves the classification performance by roughly 4%. The addition of Global BoW marginally decreases the performance, due to, we believe, over counting of image evidence and hence overfitting. Context does not improve classification, but does improve localization. We perform action localization by following the evaluation procedure of [9, 19] and estimate how well inferred latent regions capture the human5 performing the action. Given a video, for each frame we compute the overlap score between the latent region and the ground truth bounding box of the human. The overlap O(bj k, bj gt) is defined by the “intersection-over-union” metric between inferred and ground truth bounding box. The total localization score per video is computed as an average of the overlap scores of the frames: 1 T PT j=1 O(bj k, bj gt). Note, since our latent regions may not span the entire video, instead of dividing by the number of frames T, we divide by the total length of the inferred latent regions. To be consistent with the literature [9, 19], we calculate the localization score of each test video given its ground truth action label. Table 1 illustrates average localization scores6. It is clear that our model with Context achieves considerably better localization than without (Region) especially with two latent regions. This can be explained by the fact that in UCF-Sports background tends to be discriminative for classification; hence without proper context a latent region is likely to drift to the background (which reduces localization score). Context in our model models the background and leaves the latent regions free to select perceptually salient regions of the video. Numerically, our full model (Region+Context) outperforms the model of Lan et al. [9] (despite [9] having person detections and actor annotations 5Note that by definition the task of localizing a human is unnatural for our model since it captures perceptually salient fixed sized discriminate regions for action classification, not human localization. This unfavorably biases localization results agains our model; see Fig. 3 for visual comparison between annotated person regions and our inferred discriminative salient latent regions. 6It is worth mentioning that [19] and [9] have regions detected at different subsets of frames; thus in terms of localization, these methods are not directly comparable. 7 Region Region+Context K = 1 K = 2 K = 1 K = 2 Ave. 60.6 47.6 68.5 63.8 Region, K = 1 Region+Context, K = 1 Corr. χ2 Corr. χ2 Ours 0.36 1.64 0.36 1.55 [11] 0.44 1.43 0.46 1.31 Table 2: Average amount of gaze (left): Table shows fraction of ground truth gaze captured by the latent region(s) on test videos; context improves the performance. Top-down saliency prediction (right): χ2 distance and norm. cross-correlation between predicted and ground-truth gaze densities. 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Recall Precision Diving Tran&Yuan(2011) Tran&Yuan(2012) Our model 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Recall Precision Running Tran&Yuan(2011) Tran&Yuan(2012) Our model 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Recall Precision Horse−riding Tran&Yuan(2011) Tran&Yuan(2012) Our model Figure 2: Precision-Recall curves for localization: We compare our model (Region+Context with K=1 latent region) to the method from [18] and [19]. Figure 3: Localization and gaze prediction: First row: groundtruth gaze and person bounding box, second row: predicted gaze and extent of the latent region in the frame. at training). We cannot compare our average performance to Tran and Yuan [19] since their approach is evaluated only on 3 action classes out of 10, but we provide their numbers in Table 1 for reference. We build Precision-Recall (PR) curves for our model (Region+Context) and results reported in [19] to better evaluate our method with respect to [19] (see Fig. 2). We refer to [19] for experimental setup and evaluate the PR curves at σ = 0.2. For the 3 classes in [19] our model performs considerably better for “diving” action, similarly for “horse-riding”, and marginally worse for the “running”. Gaze localization and prediction: Since our model is driven by eye-gaze, we also measure how much gaze our latent regions can actually capture on the test set and whether we can predict eyegaze saliency maps for the inferred latent regions. Evaluation of the gaze localization is performed in a similar fashion to the evaluation of action localization described earlier. We estimate amount of gaze that falls into each bounding box of the latent region, and then average the gaze amount over the length of all the latent regions of the video. Thus, each video has a gaze localization score sg ∈[0, 1]. Table 2 (left) summarizes average gaze localization for different variants of our model. Noteworthy, we are able to capture around 60% of gaze by latent regions when modeling context. We estimate gaze saliency, as described in Sect. 4. Qualitative results of the gaze prediction are illustrated in Fig. 3. For quantitative comparison we compute normalized cross-correlation and χ2 distance between predicted and ground truth gaze, see Table 2 (right). We also evaluate performance of bottom-up gaze prediction [11] within inferred latent regions. Better results of bottom-up approach can be explained by superior low-level features used for learning [11]. Still, we can observe that for both approaches the full model (Region+Context) is more consistent with gaze prediction. 6 Conclusion We propose a novel weakly-supervised structured learning approach for recognition and spatiotemporal localization of actions in video. Special case of our model with two temporally ordered paths and context can be solved in linear time complexity. In addition, our approach does not require actor annotations for training. Instead we rely on gaze data for weak supervision, by incorporating it into our structured loss. Further, we show how our model can be used to predict top-down saliency in the form of gaze density maps. In the future, we plan to explore the benefits of searching over region scale and focus on more complex spatio-temporal relationships between latent regions. 8 References [1] M. Blaschko and C. Lampert. Learning to localize objects with structured output regression. ECCV, 2008. [2] C. Chen and K. Grauman. Efficient activity detection with max-subgraph search. In CVPR, 2012. [3] K. G. Derpanis, M. Sizintsev, K. Cannons, and R. P. Wildes. Efficient action spotting based on a spacetime oriented structure representation. In CVPR, 2010. [4] D. V. Essen, B. Olshausen, C. Anderson, and J. Gallant. Pattern recognition, attention, and information bottlenecks in the primate visual system. SPIE Conference on Visual Information Processing: From Neurons to Chips, 1991. [5] A. Fathi, Y. Li, and J. M. Rehg. Learning to recognize daily actions using gaze. In ECCV, 2012. [6] P. Felzenszwalb, R. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part based models. IEEE PAMI, 2010. [7] Y. Ke, R. Sukthankar, and M. Hebert. Event detection in crowded videos. In ICCV, 2007. [8] A. Kovashka and K. Grauman. Learning a Hierarchy of Discriminative Space-Time Neighborhood Features for Human Action Recognition. In CVPR, 2010. [9] T. Lan, Y. Wang, and G. Mori. Discriminative figure-centric models for joint action localization and recognition. In ICCV, 2011. [10] I. Laptev. On space-time interest points. IJCV, 64, 2005. [11] S. Mathe and C. Sminchisescu. Dynamic eye movement datasets and learnt saliency models for visual action recognition. In ECCV, 2012. [12] M. Raptis, I. Kokkinos, and S. Soatto. Discovering discriminative action parts from mid-level video representations. In CVPR, 2012. [13] M. Raptis and L. Sigal. Poselet key-framing: A model for human activity recognition. In CVPR, 2013. [14] M. Rodriguez, J. Ahmed, and M. Shah. Action MACH: a spatio-temporal maximum average correlation height filter for action recognition. In CVPR, 2008. [15] M. Ryoo and J. Aggarwal. Spatio-temporal relationship match: Video structure comparison for recognition of complex human activities. In ICCV, 2009. [16] N. Shapovalova, A. Vahdat, K. Cannons, T. Lan, and G. Mori. Similarity constrained latent support vector machine: An application to weakly supervised action classification. In ECCV, 2012. [17] P. Siva and T. Xiang. Weakly supervised action detection. In BMVC, 2011. [18] D. Tran and J. Yuan. Optimal spatio-temporal path discovery for video event detection. In CVPR, 2011. [19] D. Tran and J. Yuan. Max-margin structured output regression for spatio-temporal action localization. In NIPS, 2012. [20] P. Turaga, R. Chellappa, V. Subrahmanian, and O. Udrea. Machine recognition of human activities: A survey. IEEE Transactions on Circuits and Systems for Video Technology, 18(11):1473–1488, 2008. [21] E. Vig, M. Dorr, and D. Cox. Space-variant descriptor sampling for action recognition based on saliency and eye movements. In ECCV, 2012. [22] H. Wang, M. M. Ullah, A. Kl¨aser, I. Laptev, and C. Schmid. Evaluation of local spatio-temporal features for action recognition. In BMVC, 2009. [23] Y. Wang and G. Mori. Hidden part models for human action recognition: Probabilistic vs. max-margin. IEEE PAMI, 2010. [24] D. Weinland, R. Ronfard, and E. Boyer. A survey of vision-based methods for action representation, segmentation and recognition. Computer Vision and Image Understanding, 115(2):224–241, 2011. [25] J. Yang and M.-H. Yang. Top-down visual saliency via joint crf and dictionary learning. In CVPR, 2012. [26] C.-N. J. Yu and T. Joachims. Learning structural svms with latent variables. In ICML, 2009. [27] J. Yuan, Z. Liu, and Y. Wu. Discriminative subvolume search for efficient action detection. In CVPR, 2009. [28] J. Yuan, Z. Liu, and Y. Wu. Discriminative video pattern search for efficient action detection. IEEE PAMI, 33(9), 2011. 9
2013
25
4,987
Accelerating Stochastic Gradient Descent using Predictive Variance Reduction Rie Johnson RJ Research Consulting Tarrytown NY, USA Tong Zhang Baidu Inc., Beijing, China Rutgers University, New Jersey, USA Abstract Stochastic gradient descent is popular for large scale optimization but has slow convergence asymptotically due to the inherent variance. To remedy this problem, we introduce an explicit variance reduction method for stochastic gradient descent which we call stochastic variance reduced gradient (SVRG). For smooth and strongly convex functions, we prove that this method enjoys the same fast convergence rate as those of stochastic dual coordinate ascent (SDCA) and Stochastic Average Gradient (SAG). However, our analysis is significantly simpler and more intuitive. Moreover, unlike SDCA or SAG, our method does not require the storage of gradients, and thus is more easily applicable to complex problems such as some structured prediction problems and neural network learning. 1 Introduction In machine learning, we often encounter the following optimization problem. Let ψ1, . . . , ψn be a sequence of vector functions from Rd to R. Our goal is to find an approximate solution of the following optimization problem min P(w), P(w) := 1 n n X i=1 ψi(w). (1) For example, given a sequence of n training examples (x1, y1), . . . , (xn, yn), where xi ∈Rd and yi ∈R, if we use the squared loss ψi(w) = (w⊤xi −yi)2, then we can obtain least squares regression. In this case, ψi(·) represents a loss function in machine learning. One may also include regularization conditions. For example, if we take ψi(w) = ln(1 + exp(−w⊤xiyi)) + 0.5λw⊤w (yi ∈{±1}), then the optimization problem becomes regularized logistic regression. A standard method is gradient descent, which can be described by the following update rule for t = 1, 2, . . . w(t) = w(t−1) −ηt∇P(w(t−1)) = w(t−1) −ηt n n X i=1 ∇ψi(w(t−1)). (2) However, at each step, gradient descent requires evaluation of n derivatives, which is expensive. A popular modification is stochastic gradient descent (SGD): where at each iteration t = 1, 2, . . ., we draw it randomly from {1, . . . , n}, and w(t) = w(t−1) −ηt∇ψit(w(t−1)). (3) The expectation E[w(t)|w(t−1)] is identical to (2). A more general version of SGD is the following w(t) = w(t−1) −ηtgt(w(t−1), ξt), (4) 1 where ξt is a random variable that may depend on w(t−1), and the expectation (with respect to ξt) E[gt(w(t−1), ξt)|w(t−1)] = ∇P(w(t−1)). The advantage of stochastic gradient is that each step only relies on a single derivative ∇ψi(·), and thus the computational cost is 1/n that of the standard gradient descent. However, a disadvantage of the method is that the randomness introduces variance — this is caused by the fact that gt(w(t−1), ξt) equals the gradient ∇P(w(t−1)) in expectation, but each gt(w(t−1), ξt) is different. In particular, if gt(w(t−1), ξt) is large, then we have a relatively large variance which slows down the convergence. For example, consider the case that each ψi(w) is smooth ψi(w) −ψi(w′) −0.5L∥w −w′∥2 ≤∇ψi(w′)⊤(w −w′), (5) and convex; and P(w) is strongly convex P(w) −P(w′) −0.5γ∥w −w′∥2 2 ≥∇P(w′)⊤(w −w′), (6) where L ≥γ ≥0. As long as we pick ηt as a constant η < 1/L, we have linear convergence of O((1 −γ/L)t) Nesterov [2004]. However, for SGD, due to the variance of random sampling, we generally need to choose ηt = O(1/t) and obtain a slower sub-linear convergence rate of O(1/t). This means that we have a trade-off of fast computation per iteration and slow convergence for SGD versus slow computation per iteration and fast convergence for gradient descent. Although the fast computation means it can reach an approximate solution relatively quickly, and thus has been proposed by various researchers for large scale problems Zhang [2004], Shalev-Shwartz et al. [2007] (also see Leon Bottou’s Webpage http://leon.bottou.org/projects/sgd), the convergence slows down when we need a more accurate solution. In order to improve SGD, one has to design methods that can reduce the variance, which allows us to use a larger learning rate ηt. Two recent papers Le Roux et al. [2012], Shalev-Shwartz and Zhang [2012] proposed methods that achieve such a variance reduction effect for SGD, which leads to a linear convergence rate when ψi(w) is smooth and strongly convex. The method in Le Roux et al. [2012] was referred to as SAG (stochastic average gradient), and the method in Shalev-Shwartz and Zhang [2012] was referred to as SDCA. These methods are suitable for training convex linear prediction problems such as logistic regression or least squares regression, and in fact, SDCA is the method implemented in the popular lib-SVM package Hsieh et al. [2008]. However, both proposals require storage of all gradients (or dual variables). Although this issue may not be a problem for training simple regularized linear prediction problems such as least squares regression, the requirement makes it unsuitable for more complex applications where storing all gradients would be impractical. One example is training certain structured learning problems with convex loss, and another example is training nonconvex neural networks. In order to remedy the problem, we propose a different method in this paper that employs explicit variance reduction without the need to store the intermediate gradients. We show that if ψi(w) is strongly convex and smooth, then the same convergence rate as those of Le Roux et al. [2012], Shalev-Shwartz and Zhang [2012] can be obtained. Even if ψi(w) is nonconvex (such as neural networks), under mild assumptions, it can be shown that asymptotically the variance of SGD goes to zero, and thus faster convergence can be achieved. In summary, this work makes the following three contributions: • Our method does not require the storage of full gradients, and thus is suitable for some problems where methods such as Le Roux et al. [2012], Shalev-Shwartz and Zhang [2012] cannot be applied. • We provide a much simpler proof of the linear convergence results for smooth and strongly convex loss, and our view provides a significantly more intuitive explanation of the fast convergence by explicitly connecting the idea to variance reduction in SGD. The resulting insight can easily lead to additional algorithmic development. • The relatively intuitive variance reduction explanation also applies to nonconvex optimization problems, and thus this idea can be used for complex problems such as training deep neural networks. 2 Stochastic Variance Reduced Gradient One practical issue for SGD is that in order to ensure convergence the learning rate ηt has to decay to zero. This leads to slower convergence. The need for a small learning rate is due to the variance 2 of SGD (that is, SGD approximates the full gradient using a small batch of samples or even a single example, and this introduces variance). However, there is a fix described below. At each time, we keep a version of estimated w as ˜w that is close to the optimal w. For example, we can keep a snapshot of ˜w after every m SGD iterations. Moreover, we maintain the average gradient ˜µ = ∇P( ˜w) = 1 n n X i=1 ∇ψi( ˜w), and its computation requires one pass over the data using ˜w. Note that the expectation of ∇ψi( ˜w) − ˜µ over i is zero, and thus the following update rule is generalized SGD: randomly draw it from {1, . . . , n}: w(t) = w(t−1) −ηt(∇ψi(w(t−1)) −∇ψit( ˜w) + ˜µ). (7) We thus have E[w(t)|w(t−1)] = w(t−1) −ηt∇P(w(t−1)). That is, if we let the random variable ξt = it and gt(w(t−1), ξt) = ∇ψit(w(t−1)) −∇ψit( ˜w) + ˜µ, then (7) is a special case of (4). The update rule in (7) can also be obtained by defining the auxiliary function ˜ψi(w) = ψi(w) −(∇ψi( ˜w) −˜µ)⊤w. Since Pn i=1(∇ψi( ˜w) −˜µ) = 0, we know that P(w) = 1 n n X i=1 ψi(w) = 1 n n X i=1 ˜ψi(w). Now we may apply the standard SGD to the new representation P(w) = 1 n Pn i=1 ˜ψi(w) and obtain the update rule (7). To see that the variance of the update rule (7) is reduced, we note that when both ˜w and w(t) converge to the same parameter w∗, then ˜µ →0. Therefore if ∇ψi( ˜w) →∇ψi(w∗), then ∇ψi(w(t−1)) −∇ψi( ˜w) + ˜µ →∇ψi(w(t−1)) −∇ψi(w∗) →0. This argument will be made more rigorous in the next section, where we will analyze the algorithm in Figure 1 that summarizes the ideas described in this section. We call this method stochastic variance reduced gradient (SVRG) because it explicitly reduces the variance of SGD. Unlike SGD, the learning rate ηt for SVRG does not have to decay, which leads to faster convergence as one can use a relatively large learning rate. This is confirmed by our experiments. In practical implementations, it is natural to choose option I, or take ˜ws to be the average of the past t iterates. However, our analysis depends on option II. Note that each stage s requires 2m + n gradient computations (for some convex problems, one may save the intermediate gradients ∇ψi( ˜w), and thus only m + n gradient computations are needed). Therefore it is natural to choose m to be the same order of n but slightly larger (for example m = 2n for convex problems and m = 5n for nonconvex problems in our experiments). In comparison, standard SGD requires only m gradient computations. Since gradient may be the computationally most intensive operation, for fair comparison, we compare SGD to SVRG based on the number of gradient computations. 3 Analysis For simplicity we will only consider the case that each ψi(w) is convex and smooth, and P(w) is strongly convex. Theorem 1. Consider SVRG in Figure 1 with option II. Assume that all ψi are convex and both (5) and (6) hold with γ > 0. Let w∗= arg minw P(w). Assume that m is sufficiently large so that α = 1 γη(1 −2Lη)m + 2Lη 1 −2Lη < 1, then we have geometric convergence in expectation for SVRG: E P( ˜ws) ≤E P(w∗) + αs[P( ˜w0) −P(w∗)] 3 Procedure SVRG Parameters update frequency m and learning rate η Initialize ˜w0 Iterate: for s = 1, 2, . . . ˜w = ˜ws−1 ˜µ = 1 n Pn i=1 ∇ψi( ˜w) w0 = ˜w Iterate: for t = 1, 2, . . . , m Randomly pick it ∈{1, . . . , n} and update weight wt = wt−1 −η(∇ψit(wt−1) −∇ψit( ˜w) + ˜µ) end option I: set ˜ws = wm option II: set ˜ws = wt for randomly chosen t ∈{0, . . . , m −1} end Figure 1: Stochastic Variance Reduced Gradient Proof. Given any i, consider gi(w) = ψi(w) −ψi(w∗) −∇ψi(w∗)⊤(w −w∗). We know that gi(w∗) = minw gi(w) since ∇gi(w∗) = 0. Therefore 0 = gi(w∗) ≤min η [gi(w −η∇gi(w))] ≤min η [gi(w) −η∥∇gi(w)∥2 2 + 0.5Lη2∥∇gi(w)∥2 2] = gi(w) −1 2L∥∇gi(w)∥2 2. That is, ∥∇ψi(w) −∇ψi(w∗)∥2 2 ≤2L[ψi(w) −ψi(w∗) −∇ψi(w∗)⊤(w −w∗)]. By summing the above inequality over i = 1, . . . , n, and using the fact that ∇P(w∗) = 0, we obtain n−1 n X i=1 ∥∇ψi(w) −∇ψi(w∗)∥2 2 ≤2L[P(w) −P(w∗)]. (8) We can now proceed to prove the theorem. Let vt = ∇ψit(wt−1) −∇ψit( ˜w) + ˜µ. Conditioned on wt−1, we can take expectation with respect to it, and obtain: E ∥vt∥2 2 ≤2 E ∥∇ψit(wt−1) −∇ψit(w∗)∥2 2 + 2 E ∥[∇ψit( ˜w) −∇ψit(w∗)] −∇P( ˜w)∥2 2 =2 E ∥∇ψit(wt−1) −∇ψit(w∗)∥2 2 + 2 E ∥[∇ψit( ˜w) −∇ψit(w∗)] −E [∇ψit( ˜w) −∇ψit(w∗)]∥2 2 ≤2 E ∥∇ψit(wt−1) −∇ψit(w∗)∥2 2 + 2 E ∥∇ψit( ˜w) −∇ψit(w∗)∥2 2 ≤4L[P(wt−1) −P(w∗) + P( ˜w) −P(w∗)]. The first inequality uses ∥a + b∥2 2 ≤2∥a∥2 2 + 2∥b∥2 2 and ˜µ = ∇P( ˜w). The second inequality uses E ∥ξ −E ξ∥2 2 = E ∥ξ∥2 2 −∥E ξ∥2 2 ≤E ∥ξ∥2 2 for any random vector ξ. The third inequality uses (8). Now by noticing that conditioned on wt−1, we have E vt = ∇P(wt−1); and this leads to E ∥wt −w∗∥2 2 =∥wt−1 −w∗∥2 2 −2η(wt−1 −w∗)⊤E vt + η2 E ∥vt∥2 2 ≤∥wt−1 −w∗∥2 2 −2η(wt−1 −w∗)⊤∇P(wt−1) + 4Lη2[P(wt−1) −P(w∗) + P( ˜w) −P(w∗)] ≤∥wt−1 −w∗∥2 2 −2η[P(wt−1) −P(w∗)] + 4Lη2[P(wt−1) −P(w∗) + P( ˜w) −P(w∗)] =∥wt−1 −w∗∥2 2 −2η(1 −2Lη)[P(wt−1) −P(w∗)] + 4Lη2[P( ˜w) −P(w∗)]. 4 The first inequality uses the previously obtained inequality for E ∥vt∥2 2, and the second inequality convexity of P(w), which implies that −(wt−1 −w∗)⊤∇P(wt−1) ≤P(w∗) −P(wt−1). We consider a fixed stage s, so that ˜w = ˜ws−1 and ˜ws is selected after all of the updates have completed. By summing the previous inequality over t = 1, . . . , m, taking expectation with all the history, and using option II at stage s, we obtain E ∥wm −w∗∥2 2 + 2η(1 −2Lη)m E [P( ˜ws) −P(w∗)] ≤E ∥w0 −w∗∥2 2 + 4Lmη2 E[P( ˜w) −P(w∗)] = E ∥˜w −w∗∥2 2 + 4Lmη2 E[P( ˜w) −P(w∗)] ≤2 γ E[P( ˜w) −P(w∗)] + 4Lmη2 E[P( ˜w) −P(w∗)] =2(γ−1 + 2Lmη2) E[P( ˜w) −P(w∗)]. The second inequality uses the strong convexity property (6). We thus obtain E [P( ˜ws) −P(w∗)] ≤  1 γη(1 −2Lη)m + 2Lη 1 −2Lη  E[P( ˜ws−1) −P(w∗)]. This implies that E [P( ˜ws) −P(w∗)] ≤αs E [P( ˜w0) −P(w∗)]. The desired bound follows. The bound we obtained in Theorem 1 is comparable to those obtained in Le Roux et al. [2012], Shalev-Shwartz and Zhang [2012] (if we ignore the log factor). To see this, we may consider for simplicity the most indicative case where the condition number L/γ = n. Due to the poor condition number, the standard batch gradient descent requires complexity of n ln(1/ϵ) iterations over the data to achieve accuracy of ϵ, which means we have to process n2 ln(1/ϵ) number of examples. In comparison, in our procedure we may take η = 0.1/L and m = O(n) to obtain a convergence rate of α = 1/2. Therefore to achieve an accuracy of ϵ, we need to process n ln(1/ϵ) number of examples. This matches the results of Le Roux et al. [2012], Shalev-Shwartz and Zhang [2012]. Nevertheless, our analysis is significantly simpler than both Le Roux et al. [2012] and Shalev-Shwartz and Zhang [2012], and the explicit variance reduction argument provides better intuition on why this method works. In fact, in Section 4 we show that a similar intuition can be used to explain the effectiveness of SDCA. The SVRG algorithm can also be applied to smooth but not strongly convex problems. A convergence rate of O(1/T) may be obtained, which improves the standard SGD convergence rate of O(1/ √ T). In order to apply SVRG to nonconvex problems such as neural networks, it is useful to start with an initial vector ˜w0 that is close to a local minimum (which may be obtained with SGD), and then the method can be used to accelerate the local convergence rate of SGD (which may converge very slowly by itself). If the system is locally (strongly) convex, then Theorem 1 can be directly applied, which implies local geometric convergence rate with a constant learning rate. 4 SDCA as Variance Reduction It can be shown that both SDCA and SAG are connected to SVRG in the sense they are also a variance reduction methods for SGD, although using different techniques. In the following we present the variance reduction view of SDCA, which provides additional insights into these recently proposed fast convergence methods for stochastic optimization. In SDCA, we consider the following problem with convex φi(w): w∗= arg min P(w), P(w) = 1 n n X i=1 φi(w) + 0.5λw⊤w. (9) This is the same as our formulation with ψi(w) = φi(w) + 0.5λw⊤w. We can take the derivative of (9) and derive a “dual” representation of w at the solution w∗as: w∗= n X i=1 α∗ i (j = 1, . . . , k), 5 where the dual variables α∗ i = −1 λn∇φi(w∗). (10) Therefore in the SGD update (3), if we maintain a representation w(t) = n X i=1 α(t) i , (11) then the update of α becomes: α(t) ℓ = ( (1 −ηtλ)α(t−1) i −ηt∇φi(w) ℓ= i (1 −ηtλ)α(t−1) ℓ ℓ̸= i . (12) This update rule requires ηt →0 when t →∞. Alternatively, we may consider starting with SGD by maintaining (11), and then apply the following Dual Coordinate Ascent rule: α(t) ℓ = ( α(t−1) i −ηt(∇φi(w(t−1)) + λnα(t−1) i ) ℓ= i α(t−1) ℓ ℓ̸= i (j = 1, . . . , k) (13) and then update w as w(t) = w(t−1) + (α(t) i −α(t−1) i ). It can be checked that if we take expectation over random i ∈{1, . . . , n}, then the SGD rule in (12) and the dual coordinate ascent rule (13) both yield the gradient descent rule E[w(t|w(t−1)] = w(t−1) −ηt∇P(w(t−1)). Therefore both can be regarded as different realizations of the more general stochastic gradient rule in (4). However, the advantage of (13) is that we may take a larger step when t →∞. This is because according to (10), when the primal-dual parameters (w, α) converge to the optimal parameters (w∗, α∗), we have (∇φi(w) + λnαi) →0, which means that even if the learning rate ηt stays bounded away from zero, the procedure can converge. This is the same effect as SVRG, in the sense that the variance goes to zero asymptotically: as w →w∗and α →α∗, we have 1 n n X i=1 (∇φi(w) + λnαi)2 →0. That is, SDCA is also a variance reduction method for SGD, which is similar to SVRG. From this discussion, we can view SVRG as an explicit variance reduction technique for SGD which is similar to SDCA. However, it is simpler, more intuitive, and easier to analyze. This relationship provides useful insights into the underlying optimization problem that may allow us to make further improvements. 5 Experiments To confirm the theoretical results and insights, we experimented with SVRG (Fig. 1 Option I) in comparison with SGD and SDCA with linear predictors (convex) and neural nets (nonconvex). In all the figures, the x-axis is computational cost measured by the number of gradient computations divided by n. For SGD, it is the number of passes to go through the training data, and for SVRG in the nonconvex case (neural nets), it includes the additional computation of ∇ψi( ˜w) both in each iteration and for computing the gradient average ˜µ. For SVRG in our convex case, however, ∇ψi( ˜w) does not have to be re-computed in each iteration. Since in this case the gradient is always a multiple of xi, i.e., ∇ψi(w) = φ′ i(w⊤xi)xi where ψi(w) = φi(w⊤xi), ∇ψi( ˜w) can be compactly saved in memory by only saving scalars φ′ i( ˜w⊤xi) with the same memory consumption as SDCA and SAG. The interval m was set to 2n (convex) and 5n (nonconvex). The weights for SVRG were initialized by performing 1 iteration (convex) or 10 iterations (nonconvex) of SGD; therefore, the line for SVRG starts after x = 1 (convex) or x = 10 (nonconvex) in the respective figures. 6 (a) (b 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0 50 100 Training loss #grad / n MNIST convex: training loss: P(w) SGD:0.005 SGD:0.0025 SGD:0.001 SVRG:0.025 1E-13 1E-10 1E-07 1E-04 1E-01 1E+02 0 Training loss - optimum MNIST convex: training loss residual SVRG SGD-best (a) (b) (c) 50 100 #grad / n MNIST convex: training loss residual P(w)-P(w*) SDCA SGD:0.001 1E-16 1E-13 1E-10 1E-07 1E-04 1E-01 1E+02 0 50 100 Variance #grad / n MNIST convex: update variance SVRG SDCA SGD-best SGD:0.001 SGD-best/η(t) Figure 2: Multiclass logistic regression (convex) on MNIST. (a) Training loss comparison with SGD with fixed learning rates. The numbers in the legends are the learning rate. (b) Training loss residual P(w)−P(w∗); comparison with best-tuned SGD with learning rate scheduling and SDCA. (c) Variance of weight update (including multiplication with the learning rate). First, we performed L2-regularized multiclass logistic regression (convex optimization) on MNIST1 with regularization parameter λ =1e-4. Fig. 2 (a) shows training loss (i.e., the optimization objective P(w)) in comparison with SGD with fixed learning rates. The results are indicative of the known weakness of SGD, which also illustrates the strength of SVRG. That is, when a relatively large learning rate η is used with SGD, training loss drops fast at first, but it oscillates above the minimum and never goes down to the minimum. With small η, the minimum may be approached eventually, but it will take many iterations to get there. Therefore, to accelerate SGD, one has to start with relatively large η and gradually decrease it (learning rate scheduling), as commonly practiced. By contrast, using a single relatively large value of η, SVRG smoothly goes down faster than SGD. This is in line with our theoretical prediction that one can use a relatively large η with SVRG, which leads to faster convergence. Fig. 2 (b) and (c) compare SVRG with best-tuned SGD with learning rate scheduling and SDCA. ‘SGD-best’ is the best-tuned SGD, which was chosen by preferring smaller training loss from a large number of parameter combinations for two types of learning scheduling: exponential decay η(t) = η0a⌊t/n⌋with parameters η0 and a to adjust and t-inverse η(t) = η0(1 + b⌊t/n⌋)−1 with η0 and b to adjust. (Not surprisingly, the best-tuned SGD with learning rate scheduling outperformed the best-tuned SGD with a fixed learning rate throughout our experiments.) Fig. 2 (b) shows training loss residual, which is training loss minus the optimum (estimated by running gradient descent for a very long time): P(w) −P(w∗). We observe that SVRG’s loss residual goes down exponentially, which is in line with Theorem 1, and that SVRG is competitive with SDCA (the two lines are almost overlapping) and decreases faster than SGD-best. In Fig. 2 (c), we show the variance of SVRG update −η(∇ψi(w) −∇ψi( ˜w) + ˜µ) in comparison with the variance of SGD update −η(t)∇ψi(w) and SDCA. As expected, the variance of both SVRG and SDCA decreases as optimization proceeds, and the variance of SGD with a fixed learning rate (‘SGD:0.001’) stays high. The variance of the best-tuned SGD decreases, but this is due to the forced exponential decay of the learning rate and the variance of the gradients ∇ψi(w) (the dotted line labeled as ‘SGD-best/η(t)’) stays high. Fig. 3 shows more convex-case results (L2-regularized logistic regression) in terms of training loss residual (top) and test error rate (bottom) on rcv1.binary and covtype.binary from the LIBSVM site2, protein3, and CIFAR-104. As protein and covtype do not come with labeled test data, we randomly split the training data into halves to make the training/test split. CIFAR was normalized into [0, 1] by division with 255 (which was also done with MNIST and CIFAR in the other figures), and protein was standardized. λ was set to 1e-3 (CIFAR) and 1e-5 (rest). Overall, SVRG is competitive with SDCA and clearly more advantageous than the best-tuned SGD. It is also worth mentioning that a recent study Schmidt et al. [2013] reports that SAG and SDCA are competitive. To test SVRG with nonconvex objectives, we trained neural nets (with one fully-connected hidden layer of 100 nodes and ten softmax output nodes; sigmoid activation and L2 regularization) with mini-batches of size 10 on MNIST and CIFAR-10, both of which are standard datasets for deep 1 http://yann.lecun.com/exdb/mnist/ 2 http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/ 3 http://osmot.cs.cornell.edu/kddcup/datasets.html 4 www.cs.toronto.edu/˜kriz/cifar.html 7 1E-12 1E-10 1E-8 1E-6 1E-4 1E-2 0 10 20 30 training loss - optimum #grad / n rcv1 convex SGD-best SDCA SVRG 0.035 0.04 0.045 0.05 0 10 20 30 Test error rate #grad / n rcv1 convex SGD-best SDCA SVRG 1E-6 1E-5 1E-4 1E-3 1E-2 0 10 20 30 training loss - optimum #grad / n protein convex SGD-best SDCA SVRG 0.002 0.003 0.004 0.005 0.006 0 10 20 30 Test error rate #grad / n protein convex SGD-best SDCA SVRG 1E-14 1E-12 1E-10 1E-8 1E-6 1E-4 1E-2 0 10 20 30 training loss - optimum #grad / n cover type convex SGD-best SDCA SVRG 0.24 0.245 0.25 0.255 0.26 0 10 20 30 Test error rate #grad / n cover type convex SGD-best SDCA SVRG 1E-12 1E-10 1E-08 1E-06 1E-04 1E-02 1E+00 0 50 100 training loss - optimum #grad / n CIFAR10 convex SGD-best SDCA SVRG 0.58 0.6 0.62 0.64 0.66 0 50 100 Test error rate #grad / n CIFAR10 convex SGD-best SDCA SVRG Figure 3: More convex-case results. Loss residual P(w) −P(w∗) (top) and test error rates (down). L2regularized logistic regression (10-class for CIFAR-10 and binary for the rest). 0.09 0.095 0.1 0.105 0.11 0 100 200 Training loss #grad / n MNIST nonconvex SGD-best SVRG 1E-5 1E-4 1E-3 1E-2 1E-1 1E+0 0 100 200 Variance #grad / n MNIST nonconvex SGD-best/η(t) SGD-best SVRG 1.4 1.45 1.5 1.55 1.6 0 200 400 Training loss #grad / n CIFAR10 nonconvex SGD-best SVRG 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0 200 400 Test error rate #grad / n CIFAR10 nonconvex SGD-best SVRG Figure 4: Neural net results (nonconvex). neural net studies; λ was set to 1e-4 and 1e-3, respectively. In Fig. 4 we confirm that the results are similar to the convex case; i.e., SVRG reduces the variance and smoothly converges faster than the best-tuned SGD with learning rate scheduling, which is a de facto standard method for neural net training. As said earlier, methods such as SDCA and SAG are not practical for neural nets due to their memory requirement. We view these results as promising. However, further investigation, in particular with larger/deeper neural nets for which training cost is a critical issue, is still needed. 6 Conclusion This paper introduces an explicit variance reduction method for stochastic gradient descent methods. For smooth and strongly convex functions, we prove that this method enjoys the same fast convergence rate as those of SDCA and SAG. However, our proof is significantly simpler and more intuitive. Moreover, unlike SDCA or SAG, this method does not require the storage of gradients, and thus is more easily applicable to complex problems such as structured prediction or neural network learning. Acknowledgment We thank Leon Bottou and Alekh Agarwal for spotting a mistake in the original theorem. 8 References C.J. Hsieh, K.W. Chang, C.J. Lin, S.S. Keerthi, and S. Sundararajan. A dual coordinate descent method for large-scale linear SVM. In ICML, pages 408–415, 2008. Nicolas Le Roux, Mark Schmidt, and Francis Bach. A Stochastic Gradient Method with an Exponential Convergence Rate for Strongly-Convex Optimization with Finite Training Sets. arXiv preprint arXiv:1202.6258, 2012. Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Kluwer, Boston, 2004. Mark Schmidt, Nicolas Le Roux, and Francis Bach. Minimizing finite sums with the stochastic average gradient. arXiv preprint arXiv:1309.2388, 2013. S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal Estimated sub-GrAdient SOlver for SVM. In International Conference on Machine Learning, pages 807–814, 2007. Shai Shalev-Shwartz and Tong Zhang. Stochastic dual coordinate ascent methods for regularized loss minimization. arXiv preprint arXiv:1209.1873, 2012. T. Zhang. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In Proceedings of the Twenty-First International Conference on Machine Learning, 2004. 9
2013
250
4,988
Multisensory Encoding, Decoding, and Identification Aurel A. Lazar Department of Electrical Engineering Columbia University New York, NY 10027 aurel@ee.columbia.edu Yevgeniy B. Slutskiy∗ Department of Electrical Engineering Columbia University New York, NY 10027 ys2146@columbia.edu Abstract We investigate a spiking neuron model of multisensory integration. Multiple stimuli from different sensory modalities are encoded by a single neural circuit comprised of a multisensory bank of receptive fields in cascade with a population of biophysical spike generators. We demonstrate that stimuli of different dimensions can be faithfully multiplexed and encoded in the spike domain and derive tractable algorithms for decoding each stimulus from the common pool of spikes. We also show that the identification of multisensory processing in a single neuron is dual to the recovery of stimuli encoded with a population of multisensory neurons, and prove that only a projection of the circuit onto input stimuli can be identified. We provide an example of multisensory integration using natural audio and video and discuss the performance of the proposed decoding and identification algorithms. 1 Introduction Most organisms employ a mutlitude of sensory systems to create an internal representation of their environment. While the advantages of functionally specialized neural circuits are numerous, many benefits can also be obtained by integrating sensory modalities [1, 2, 3]. The perceptual advantages of combining multiple sensory streams that provide distinct measurements of the same physical event are compelling, as each sensory modality can inform the other in environmentally unfavorable circumstances [4]. For example, combining visual and auditory stimuli corresponding to a person talking at a cocktail party can substantially enhance the accuracy of the auditory percept [5]. Interestingly, recent studies demonstrated that multisensory integration takes place in brain areas that were traditionally considered to be unisensory [2, 6, 7]. This is in contrast to classical brain models in which multisensory integration is relegated to anatomically established sensory convergence regions, after extensive unisensory processing has already taken place [4]. Moreover, multisensory effects were shown to arise not solely due to feedback from higher cortical areas. Rather, they seem to be carried by feedforward pathways at the early stages of the processing hierarchy [2, 7, 8]. The computational principles of multisensory integration are still poorly understood. In part, this is because most of the experimental data comes from psychophysical and functional imaging experiments which do not provide the resolution necessary to study sensory integration at the cellular level [2, 7, 9, 10, 11]. Moreover, although multisensory neuron responses depend on several concurrently received stimuli, existing identification methods typically require separate experimental trials for each of the sensory modalities involved [4, 12, 13, 14]. Doing so creates major challenges, especially when unisensory responses are weak or together do not account for the multisensory response. Here we present a biophysically-grounded spiking neural circuit and a tractable mathematical methodology that together allow one to study the problems of multisensory encoding, decoding, and identification within a unified theoretical framework. Our neural circuit is comprised of a bank ∗The authors’ names are listed in alphabetical order. 1 u1 n1(x1, ..., xn1) uM nM (x1, ..., xnM ) (ti k)k∈Z vi1(t) viM(t) vi(t) Σ Field 1 Receptive Neuron i Receptive Field M + voltage reset to 0 bi 1 Ci  δi (ti k)k∈Z vi(t) (a) (b) Figure 1: Multisensory encoding on neuronal level. (a) Each neuron i=1, ..., N receives multiple stimuli um nm, m=1, ..., M, of different modalities and encodes them into a single spike train (ti k)k∈Z. (b) A spiking point neuron model, e.g., the IAF model, describes the mapping of the current vi(t)=P mvim(t) into spikes. of multisensory receptive fields in cascade with a population of neurons that implement stimulus multiplexing in the spike domain. The circuit architecture is quite flexible in that it can incorporate complex connectivity [15] and a number different spike generation models [16], [17]. Our approach is grounded in the theory of sampling in Hilbert spaces. Using this theory, we show that signals of different modalities, having different dimensions and dynamics, can be faithfully encoded into a single multidimensional spike train by a common population of neurons. Some benefits of using a common population include (a) built-in redundancy, whereby, by rerouting, a circuit could take over the function of another faulty circuit (e.g., after a stroke) (b) capability to dynamically allocate resources for the encoding of a given signal of interest (e.g., during attention) (c) joint processing and storage of multisensory signals/stimuli (e.g., in associative memory tasks). First we show that, under appropriate conditions, each of the stimuli processed by a multisensory circuit can be decoded loss-free from a common, unlabeled set of spikes. These conditions provide clear lower bounds on the size of the population of multisensory neurons and the total number of spikes generated by the entire circuit. We then discuss the open problem of identifying multisensory processing using concurrently presented sensory stimuli. We show that the identification of multisensory processing in a single neuron is elegantly related to the recovery of stimuli encoded with a population of multisensory neurons. Moreover, we prove that only a projection of the circuit onto the space of input stimuli can be identified. Finally, we present examples of both decoding and identification algorithms and demonstrate their performance using natural stimuli. 2 Modeling Sensory Stimuli, their Processing and Encoding Our formal model of multisensory encoding, called the multisensory Time Encoding Machine (mTEM) is closely related to traditional TEMs [18]. TEMs are real-time asynchronous mechanisms for encoding continuous and discrete signals into a time sequence. They arise as models of early sensory systems in neuroscience [17, 19] as well as nonlinear sampling circuits and analogto-discrete (A/D) converters in communication systems [17, 18]. However, in contrast to traditional TEMs that encode one or more stimuli of the same dimension n, a general mTEM receives M input stimuli u1 n1, ..., uM nM of different dimensions nm ∈N, m=1, ..., M, and possibly different dynamics (Fig. 1a). The mTEM processes and encodes these signals into a multidimensional spike train using a population of N neurons. For each neuron i=1, ..., N, the results of this processing are aggregated into the dendritic current vi flowing into the spike initiation zone, where it is encoded into a time sequence (ti k)k∈Z, with ti k denoting the timing of the kth spike of neuron i. Similarly to traditional TEMs, mTEMs can employ a myriad of spiking neuron models. Several examples include conductance-based models such as Hodgkin-Huxley, Morris-Lecar, FitzhughNagumo, Wang-Buzsaki, Hindmarsh-Rose [20] as well as simpler models such as the ideal and leaky integrate-and-fire (IAF) neurons [15]. For clarity, we will limit our discussion to the ideal IAF neuron, since other models can be handled as described previously [20, 21]. For an ideal IAF neuron with a bias bi ∈R+, capacitance Ci ∈R+ and threshold δi ∈R+ (Fig. 1b), the mapping of the current vi into spikes is described by a set of equations formerly known as the t-transform [18]: Z ti k+1 ti k vi(s)ds = qi k, k ∈Z, (1) where qi k = Ciδi −bi(ti k+1 −ti k). Intuitively, at every spike time ti k+1, the ideal IAF neuron is providing a measurement qi k of the current vi(t) on the time interval [ti k, ti k+1). 2 2.1 Modeling Sensory Inputs We model input signals as elements of reproducing kernel Hilbert spaces (RKHSs) [22]. Most real world signals, including natural stimuli can be described by an appropriately chosen RKHS [23]. For practical and computational reasons we choose to work with the space of trigonometric polynomials Hnm defined below, where each element of the space is a function in nm variables (nm ∈N, m = 1, 2, ..., M). However, we note that the results obtained in this paper are not limited to this particular choice of RKHS (see, e.g., [24]). Definition 1. The space of trigonometric polynomials Hnm is a Hilbert space of complex-valued functions um nm(x1, ..., xnm) = L1 X l1=−L1 · · · Lnm X lnm=−Lnm um l1...lnmel1...lnm (x1, ..., xnm), over the domain Dnm = Qnm n=1[0, Tn], where um l1...lnm∈C and the functions el1...lnm(x1, ..., xnm)= exp  Pnm n=1 jlnΩnxn/Ln  / p T1 · · · Tnm , with j denoting the imaginary number. Here Ωn is the bandwidth, Ln is the order, and Tn = 2πLn/Ωn is the period in dimension xn. Hnm is endowed with the inner product ⟨·, ·⟩: Hnm × Hnm →C, where ⟨um nm, wm nm⟩= Z Dnm um nm(x1, ..., xnm)wm nm(x1, ..., xnm)dx1...dxnm. (2) Given the inner product in (2), the set of elements el1...lnm (x1, ..., xnm) forms an orthonormal basis in Hnm. Moreover, Hnm is an RKHS with the reproducing kernel (RK) Knm(x1, ..., xnm; y1, ..., ynm) = L1 X l1=−L1 . . . Lnm X lnm=−Lnm el1...lnm(x1, ..., xnm)el1...lnm (y1, ..., ynm). Remark 1. In what follows, we will primarily be concerned with time-varying stimuli, and the dimension xnm will denote the temporal dimension t of the stimulus um nm, i.e., xnm = t. Remark 2. For M concurrently received stimuli, we have Tn1 = Tn2 = · · · = TnM . Example 1. We model audio stimuli um 1 = um 1 (t) as elements of the RKHS H1 over the domain D1 = [0, T1]. For notational convenience, we drop the dimensionality subscript and use T, Ωand L, to denote the period, bandwidth and order of the space H1. An audio signal um 1 ∈H1 can be written as um 1 (t) = PL l=−L um l el(t), where the coefficients um l ∈C and el(t) = exp (jlΩt/L) / √ T. Example 2. We model video stimuli um 3 = um 3 (x, y, t) as elements of the RKHS H3 defined on D3 = [0, T1] × [0, T2] × [0, T3], where T1 = 2πL1/Ω1, T2 = 2πL2/Ω2, T3 = 2πL3/Ω3, with (Ω1, L1), (Ω2, L2) and (Ω3, L3) denoting the (bandwidth, order) pairs in spatial directions x, y and in time t, respectively. A video signal um 3 ∈H3 can be written as um 3 (x, y, t) = PL1 l1=−L1 PL2 l2=−L2 PL3 l3=−L3 um l1l2l3el1l2l3(x, y, t), where the coefficients um l1l2l3 ∈C and the functions el1l2l3(x, y, t) = exp (jl1Ω1x/L1 + jl2Ω2y/L2 + jl3Ω3t/L3) /√T1T2T3. 2.2 Modeling Sensory Processing Multisensory processing can be described by a nonlinear dynamical system capable of modeling linear and nonlinear stimulus transformations, including cross-talk between stimuli [25]. For clarity, here we will consider only the case of linear transformations that can be described by a linear filter having an impulse response, or kernel, hm nm(x1, ..., xnm). The kernel is assumed to be boundedinput bounded-output (BIBO)-stable and causal. Without loss of generality, we assume that such transformations involve convolution in the time domain (temporal dimension xnm) and integration in dimensions x1, ..., xnm−1. We also assume that the kernel has a finite support in each direction xn, n=1, ..., nm. In other words, the kernel hm nm belongs to the space Hnm defined below. Definition 2. The filter kernel space Hnm =  hm nm ∈L1(Rnm) supp(hm nm) ⊆Dnm . Definition 3. The projection operator P : Hnm →Hnm is given (by abuse of notation) by (Phm nm)(x1, ..., xnm) = hm nm(·, ..., ·), Knm(·, ..., ·; x1, ..., xnm) . (3) Since Phm nm ∈Hnm, (Phm nm)(x1, ..., xnm)=PL1 l1=-L1... PLnm lnm=-Lnmhm l1...lnmel1...lnm(x1, ..., xnm). 3 3 Multisensory Decoding Consider an mTEM comprised of a population of N ideal IAF neurons receiving M input signals um nm of dimensions nm, m = 1, ..., M. Assuming that the multisensory processing is given by kernels him nm, m = 1, ..., M, i = 1, ..., N, the t-transform in (1) can be rewritten as T i1 k [u1 n1] + T i2 k [u2 n2] + ... + T iM k [uM nM ] = qi k, k ∈Z, (4) where T im k : Hnm →R are linear functionals defined by T im k [um nm] = Z ti k+1 ti k  Z Dnm him nm(x1, ..., xnm−1, s)um nm(x1, ..., xnm−1, t −s)dx1...dxnm−1ds  dt. We observe that each qi k in (4) is a real number representing a quantal measurement of all M stimuli, taken by the neuron i on the interval [ti k, ti k+1). These measurements are produced in an asynchronous fashion and can be computed directly from spike times (ti k)k∈Z using (1). We now demonstrate that it is possible to reconstruct stimuli um nm, m = 1, ..., M from (ti k)k∈Z, i = 1, ..., N. Theorem 1. (Multisensory Time Decoding Machine (mTDM)) Let M signals um nm ∈Hnm be encoded by a multisensory TEM comprised of N ideal IAF neurons and N × M receptive fields with full spectral support. Assume that the IAF neurons do not have the same parameters, and/or the receptive fields for each modality are linearly independent. Then given the filter kernel coefficients him l1...lnm, i = 1, ..., N, all inputs um nm can be perfectly recovered as um nm(x1, ..., xnm) = L1 X l1=−L1 ... Lnm X lnm=−Lnm um l1...lnm el1...lnm(x1, ..., xnm), (5) where um l1...lnm are elements of u = Φ+q, and Φ+ denotes the pseudoinverse of Φ. Furthermore, Φ=[Φ1; Φ2; ... ; ΦN], q=[q1; q2; ... ; qN] and [qi]k =qi k. Each matrix Φi =[Φi1, Φi2, ..., Φim], with [Φim]kl =      him −l1,−l2,...,−lnm−1,lnm(ti k+1 −ti k), lnm = 0 him −l1,−l2,...,−lnm−1,lnm Lnm p Tnm elnm (ti k+1) −elnm(ti k)  jlnmΩnm , lnm ̸= 0 , (6) where the column index l traverses all possible subscript combinations of l1, l2, ..., lnm. A necessary condition for recovery is that the total number of spikes generated by all neurons is larger than PM m=1 Qnm n=1(2Ln+1)+N. If each neuron produces ν spikes in an interval of length Tn1 = Tn2 = · · · = TnM , a sufficient condition is N ≥ lPM m=1 Qnm n=1(2Ln + 1)/ min(ν −1, 2Lnm + 1) m , where ⌈x⌉denotes the smallest integer greater than x. Proof: Substituting (5) into (4), qi k = T i1 k [u1 n1]+...+T iM k [uM nM ] = u1 n1, φi1 1k +...+ uM nM , φiM Mk = P l1 ... P ln1 u1 −l1,−l2,−ln1−1,ln1 φi1 l1...ln1k + ... + P l1 ... P lnM uM −l1,−l2,−lnM −1,lnM φiM l1...lnM k, where k ∈Z and the second equality follows from the Riesz representation theorem with φim nmk ∈Hnm, m = 1, ..., M. In matrix form the above equality can be written as qi = Φiu, with [qi]k = qi k, Φi = [Φi1, Φi2, ..., ΦiM], where elements [Φim]kl are given by [Φim]kl = φim l1...lnmk, with index l traversing all possible subscript combinations of l1, l2, ..., lnm. To find the coefficients φim l1...lnmk, we note that φim l1...lnmk = T im nmk(el1...lnm ), m = 1, ..., M, i = 1, ..., N. The column vector u = [u1; u2; ...; um] with the vector um containing Qnm n=1(2Ln + 1) entries corresponding to coefficients um l1l2...lnm. Repeating for all neurons i = 1, ..., N, we obtain q = Φu with Φ = [Φ1; Φ2; ... ; ΦN] and q = [q1; q2; ... ; qN]. This system of linear equations can be solved for u, provided that the rank r(Φ) of matrix Φ satisfies r(Φ) = P m Qnm n=1(2Ln + 1). A necessary condition for the latter is that the total number of measurements generated by all N neurons is greater or equal to Qnm n=1(2Ln + 1). Equivalently, the total number of spikes produced by all N neurons should be greater than Qnm n=1(2Ln + 1) + N. Then u can be uniquely specified as the solution to a convex optimization problem, e.g., u = Φ+q. To find the sufficient condition, we note 4 v1(t) Σ v11(t) v12(t) Σ v21(t) v22(t) v2(t) Σ vN(t) vN1(t) vN2(t) (t1 k)k∈Z (t2 k)k∈Z (tN k )k∈Z h22 3 (x, y, t) u2 3(x, y, t) y x t t u1 1(t) h11 1 (t) h21 1 (t) hN1 1 (t) hN2 3 (x, y, t) h12 3 (x, y, t) Neuron 1 Neuron 2 Neuron N (a) u1 L u1 -L + + Σ e L1,L2,L3(t) + e -L1,-L2,-L3 + Σ u2 -L1,-L2,-L3 u2 L1,L2,L3 eL(t) e -L u2 3(x, y, t) y x t t u1 1(t) (t2 k)k∈Z (tN k )k∈Z (t1 k)k∈Z Convex Optimization Problem e.g., u = Φ+q (b) Figure 2: Multimodal TEM & TDM for audio and video integration (a) Block diagram of the multimodal TEM. (b) Block diagram of the multimodal TDM. that the mth component vim of the dendritic current vi has a maximal bandwidth of Ωnm and we need only 2Lnm + 1 measurements to specify it. Thus each neuron can produce a maximum of only 2PLnm + 1 informative measurements, or equivalently, 2PLnm + 2 informative spikes on a time interval [0, Tnm]. It follows that for each modality, we require at least Qnm n=1(2Ln + 1)/(2Lnm + 1) neurons if ν ≥(2Lnm + 2) and at least ⌈Qnm n=1(2Ln + 1)/(ν −1)⌉neurons if ν < (2Lnm + 2). □ 4 Multisensory Identification We now investigate the following nonlinear neural identification problem: given stimuli um nm, m = 1, ..., M, at the input to a multisensory neuron i and spikes at its output, find the multisensory receptive field kernels him nm, m = 1, ..., M. We will show that this problem is mathematically dual to the decoding problem discussed above. Specifically, we will demonstrate that the identification problem can be converted into a neural encoding problem, where each spike train (ti k)k∈Z produced during an experimental trial i, i = 1, ..., N, is interpreted to be generated by the ith neuron in a population of N neurons. We consider identifying kernels for only one multisensory neuron (identification for multiple neurons can be performed in a serial fashion) and drop the superscript i in him nm throughout this section. Instead, we introduce the natural notion of performing multiple experimental trials and use the same superscript i to index stimuli uim nm on different trials i = 1, ..., N. Consider the multisensory neuron depicted in Fig. 1. Since for every trial i, an input signal uim nm, m = 1, ..., M, can be modeled as an element of some space Hnm, we have uim nm(x1, ..., xnm) = ⟨uim nm(·, ..., ·), Knm(·, ..., ·; x1, ..., xnm)⟩by the reproducing property of the RK Knm. It follows that Z Dnm hm nm(s1, ..., snm−1, snm)uim nm(s1, ..., snm−1, t −snm)ds1...dsnm−1dsnm = (a) = Z Dnm uim nm(s1, ..., snm−1, snm) hm nm(·, ..., ·), Knm(·, ..., ·; s1, ..., snm−1, t −snm) ds1...dsnm = (b) = Z Dnm uim nm(s1, ..., snm−1, snm)(Phm nm)(s1, ..., snm−1, t −snm)ds1...dsnm−1dsnm, where (a) follows from the reproducing property and symmetry of Knm and Definition 2, and (b) from the definition of Phm nm in (3). The t-transform of the mTEM in Fig. 1 can then be written as Li1 k [Ph1 n1] + Li2 k [Ph2 n2] + ... + LiM k [PhM nM ] = qi k, (7) 5 v1(t) Σ v11(t) v12(t) Σ v21(t) v22(t) v2(t) Σ vN(t) vN1(t) vN2(t) (t1 k)k∈Z (t2 k)k∈Z (tN k )k∈Z y x t Trial 1 Trial 2 Trial N (Ph1 1)(t) (Ph2 3)(x, y, t) u11 1 (t) u21 1 (t) uN1 3 (t) u22 3 (x, y, t) uN2 3 (x, y, t) u12 3 (x, y, t) t (a) h1 L h1 -L + + Σ e L1,L2,L3(t) + e -L1,-L2,-L3 + Σ h2 -L1,-L2,-L3 h2 L1,L2,L3 eL(t) e -L (t2 k)k∈Z (tN k )k∈Z (t1 k)k∈Z Convex Optimization Problem e.g., h = Φ+q y x t t (Ph1 1)(t) (Ph2 3)(x, y, t) (b) Figure 3: Multimodal CIM for audio and video integration (a) Time encoding interpretation of the multimodal CIM. (b) Block diagram of the multimodal CIM. where Lim k : Hnm →R, m = 1, ..., M, k ∈Z, are linear functionals defined by Lim k [Phm nm] = Z ti k+1 ti k Z Dm uim nm(s1, ... , snm)(Phm nm)(s1, ..., t −snm)ds1 ... dsnm  dt. Remark 3. Intuitively, each inter-spike interval [ti k, ti k+1) produced by the IAF neuron is a time measurement qi k of the (weighted) sum of all kernel projections Phm nm, m = 1, ..., M. Remark 4. Each projection Phm nm is determined by the corresponding stimuli uim nm, i = 1, ..., N, employed during identification and can be substantially different from the underlying kernel hm nm. It follows that we should be able to identify the projections Phm nm, m=1, ..., M, from the measurements (qi k)k∈Z. Since we are free to choose any of the spaces Hnm, an arbitrarily-close identification of original kernels is possible, provided that the bandwidth of the test signals is sufficiently large. Theorem 2. (Multisensory Channel Identification Machine (mCIM)) Let {ui}N i=1, ui =[ui1 n1, ..., uiM nM ]T , uim nm∈Hnm, m=1, ..., M, be a collection of N linearly independent stimuli at the input to an mTEM circuit comprised of receptive fields with kernels hm nm ∈Hnm, m = 1, ..., M, in cascade with an ideal IAF neuron. Given the coefficients uim l1,...,lnm of stimuli uim nm, i=1, ..., N, m=1, ..., M, the kernel projections Phm nm, m=1, ..., M, can be perfectly identified as (Phm nm)(x1, ..., xnm) = PL1 l1=−L1 ... PLnm lnm=−Lnm hm l1...lnm el1...lnm(x1, ..., xnm), where hm l1...lnm are elements of h = Φ+q, and Φ+ denotes the pseudoinverse of Φ. Furthermore, Φ=[Φ1; Φ2; ... ; ΦN], q=[q1; q2; ... ; qN] and [qi]k =qi k. Each matrix Φi =[Φi1, Φi2, ..., Φim], with [Φim]kl =      uim −l1,−l2,...,−lnm−1,lnm (ti k+1 −ti k), lnm = 0 uim −l1,−l2,...,−lnm−1,lnm Lnm p Tnm elnm(ti k+1) −elnm (ti k)  jlnmΩnm , lnm ̸= 0 , (8) where l traverses all subscript combinations of l1, l2, ..., lnm. A necessary condition for identification is that the total number of spikes generated in response to all N trials is larger than PM m=1 Qnm n=1(2Ln + 1) + N. If the neuron produces ν spikes on each trial, a sufficient condition is that the number of trials N ≥ lPM m=1 Qnm n=1(2Ln + 1)/ min(ν −1, 2Lnm + 1) m . Proof: The equivalent representation of the t-transform in equations (4) and (7) implies that the decoding of the stimulus um nm (in Theorem 1) and the identification of the filter projections Phm nm encountered here are dual problems. Therefore, the receptive field identification problem is equivalent to a neural encoding problem: the projections Phm nm, m = 1, ..., M, are encoded with an mTEM comprised of N neurons and receptive fields uim nm, i = 1, ..., N, m = 1, ..., M. The algorithm for finding the coefficients hm l1...lnm is analogous to the one for um l1...lnm in Theorem 1. 6 5 Examples A simple (mono) audio/video TEM realized using a bank of temporal and spatiotemporal linear filters and a population of integrate-and-fire neurons, is shown in Fig. 2. An analog audio signal u1 1(t) and an analog video signal u2 3(x, y, t) appear as inputs to temporal filters with kernels hi1 1 (t) and spatiotemporal filters with kernels hi2 3 (x, y, t), i = 1, ..., N. Each temporal and spatiotemporal filter could be realized in a number of ways, e.g., using gammatone and Gabor filter banks. For simplicity, we assume that the number of temporal and spatiotemporal filters in Fig. 2 is the same. In practice, the number of components could be different and would be determined by the bandwidth of input stimuli Ω, or equivalently the order L, and the number of spikes produced (Theorems 1-2). For each neuron i, i = 1, ..., N, the filter outputs vi1 and vi2, are summed to form the aggregate dendritic current vi, which is encoded into a sequence of spike times (ti k)k∈Z by the ith integrateand-fire neuron. Thus each spike train (ti k)k∈Z carries information about two stimuli of completely different modalities (audio and video) and, under certain conditions, the entire collection of spike trains {ti k}N i=1, k ∈Z, can provide a faithful representation of both signals. To demonstrate the performance of the algorithm presented in Theorem 1, we simulated a multisensory TEM with each neuron having a non-separable spatiotemporal receptive field for video stimuli and a temporal receptive field for audio stimuli. Spatiotemporal receptive fields were chosen randomly and had a bandwidth of 4 Hz in temporal direction t and 2 Hz in each spatial direction x and y. Similarly, temporal receptive fields were chosen randomly from functions bandlimited to 4 kHz. Thus, two distinct stimuli having different dimensions (three for video, one for audio) and dynamics (2-4 cycles vs. 4, 000 cycles in each direction) were multiplexed at the level of every spiking neuron and encoded into an unlabeled set of spikes. The mTEM produced a total of 360, 000 spikes in response to a 6-second-long grayscale video and mono audio of Albert Einstein explaining the mass-energy equivalence formula E = mc2: “... [a] very small amount of mass may be converted into a very large amount of energy.” A multisensory TDM was then used to reconstruct the video and audio stimuli from the produced set of spikes. Fig. 4a-b shows the original (top row) and recovered (middle row) video and audio, respectively, together with the error between them (bottom row). The neural encoding interpretation of the identification problem for the grayscale video/mono audio TEM is shown in Fig. 3a. The block diagram of the corresponding mCIM appears in Fig. 3b. Comparing this diagram to the one in Fig. 2, we note that neuron blocks have been replaced by trial blocks. Furthermore, the stimuli now appear as kernels describing the filters and the inputs to the circuit are kernel projections Phm nm, m = 1, ..., M. In other words, identification of a single neuron has been converted into a population encoding problem, where the artificially constructed population of N neurons is associated with the N spike trains generated in response to N experimental trials. The performance of the mCIM algorithm is visualized in Fig. 5. Fig. 5a-b shows the original (top row) and recovered (middle row) spatio-temporal and temporal receptive fields, respectively, together with the error between them (bottom row). 6 Conclusion We presented a spiking neural circuit for multisensory integration that encodes multiple information streams, e.g., audio and video, into a single spike train at the level of individual neurons. We derived conditions for inverting the nonlinear operator describing the multiplexing and encoding in the spike domain and developed methods for identifying multisensory processing using concurrent stimulus presentations. We provided explicit algorithms for multisensory decoding and identification and evaluated their performance using natural audio and video stimuli. Our investigations brought to light a key duality between identification of multisensory processing in a single neuron and the recovery of stimuli encoded with a population of multisensory neurons. Given the powerful machinery of employed RKHSs, extensions to neural circuits with noisy neurons are straightforward [15, 23]. Acknowledgement The work presented here was supported in part by AFOSR under grant #FA9550-12-1-0232 and, in part, by NIH under the grant #R021 DC012440001. 7 y, [px] t = 0 s    t = 2 s t = 4 s         y, [px]                 x, [px] y, [px]   MSE =-21.5 dB   x, [px]   MSE =-21.0 dB   x, [px]   MSE =-19.2 dB          Amplitude    Amplitude          Time, [s] Amplitude   MSE =-8.4 dB Original Decoded Error Video Audio (a) (b) Figure 4: Multisensory decoding. (a) Grayscale Video Recovery. (top row) Three frames of the original grayscale video u2 3. (middle row) Corresponding three frames of the decoded video projection P3u2 3. (bottom row) Error between three frames of the original and identified video. Ω1 = 2π · 2 rad/s, L1 = 30, Ω2 = 2π · 36/19 rad/s, L2 = 36, Ω3 = 2π · 4 rad/s, L3 = 4. (b) Mono Audio Recovery. (top row) Original mono audio signal u1 1. (middle row) Decoded projection P1u1 1. (bottom row) Error between the original and decoded audio. Ω= 2π · 4, 000 rad/s, L = 4, 000. Click here to see and hear the decoded video and audio stimuli. y t = 15 ms    t = 30 ms t = 45 ms       y                x y          x          x              Amplitude    Amplitude          Time, [ms] Amplitude       Original Identified Error Spatiotemporal RF Temporal RF (a) (b) Figure 5: Multisensory identification. (a) (top row) Three frames of the original spatiotemporal kernel h2 3(x, y, t). Here, h2 3 is a spatial Gabor function rotating clockwise in space as a function of time. (middle row) Corresponding three frames of the identified kernel Ph2∗ 3 (x, y, t). (bottom row) Error between three frames of the original and identified kernel. Ω1 = 2π·12 rad/s, L1 = 9, Ω2 = 2π·12 rad/s, L2 = 9, Ω3 = 2π·100 rad/s, L3 = 5. (b) Identification of the temporal RF (top row) Original temporal kernel h1 1(t). (middle row) Identified projection Ph1∗ 1 (t). (bottom row) Error between h1 1 and Ph1∗ 1 . Ω= 2π · 200 rad/s, L = 10. 8 References [1] Barry E. Stein and Terrence R. Stanford. Multisensory integration: Current issues from the perspective of a single neuron. Nature Reviews Neuroscience, 9:255–266, April 2008. [2] Christoph Kayser, Christopher I. Petkov, and Nikos K. Logothetis. Multisensory interactions in primate auditory cortex: fmri and electrophysiology. Hearing Research, 258:80–88, March 2009. [3] Stephen J. Huston and Vivek Jayaraman. Studying sensorimotor integration in insects. Current Opinion in Neurobiology, 21:527–534, June 2011. [4] Barry E. Stein and M. Alex Meredith. The merging of the senses. The MIT Press, 1993. [5] David A. Bulkin and Jennifer M. Groh. Seeing sounds: Visual and auditory interactions in the brain. Current Opinion in Neurobiology, 16:415–419, July 2006. [6] Jon Driver and Toemme Noesselt. Multisensory interplay reveals crossmodal influences on ’sensoryspecific’ brain regions, natural responses, and judgments. Neuron, 57:11–23, January 2008. [7] Christoph Kayser, Nikos K. Logothetis, and Stefano Panzeri. Visual enhancement of the information representation in auditory cortex. Current Biology, pages 19–24, January 2010. [8] Asif A. Ghazanfar and Charles E. Schroeder. Is neocortex essentially multisensory? Trends in Cognitive Sciences, 10:278–285, June 2006. [9] Paul J. Laurienti, Thomas J. Perrault, Terrence R. Stanford, Mark T. Wallace, and Barry E. Stein. On the use of superadditivity as a metric for characterizing multisensory integration in functional neuroimaging studies. Experimental Brain Research, 166:289–297, 2005. [10] Konrad P. K¨ording and Joshua B. Tenenbaum. Causal inference in sensorimotor integration. Advances in Neural Information Processing Systems 19, 2007. [11] Ulrik R. Beierholm, Konrad P. K¨ording, Ladan Shams, and Wei Ji Ma. Comparing bayesian models for multisensory cue combination without mandatory integration. Advances in Neural Information Processing Systems 20, 2008. [12] Daniel C. Kadunce, J. William Vaughan, Mark T. Wallace, and Barry E. Stein. The influence of visual and auditory receptive field organization on multisensory integration in the superior colliculus. Experimental Brain Research, 2001. [13] Wei Ji Ma and Alexandre Pouget. Linking neurons to behavior in multisensory perception: A computational review. Brain Research, 1242:4–12, 2008. [14] Mark A. Frye. Multisensory systems integration for high-performance motor control in flies. Current Opinion in Neurobiology, 20:347–352, 2010. [15] Aurel A. Lazar and Yevgeniy B. Slutskiy. Channel Identification Machines. Computational Intelligence and Neuroscience, 2012. [16] Aurel A. Lazar. Time encoding with an integrate-and-fire neuron with a refractory period. Neurocomputing, 58-60:53–58, June 2004. [17] Aurel A. Lazar. Population encoding with Hodgkin-Huxley neurons. IEEE Transactions on Information Theory, 56(2), February 2010. [18] Aurel A. Lazar and Laszlo T. T´oth. Perfect recovery and sensitivity analysis of time encoded bandlimited signals. IEEE Transactions on Circuits and Systems-I: Regular Papers, 51(10):2060–2073, 2004. [19] Aurel A. Lazar and Eftychios A. Pnevmatikakis. Faithful representation of stimuli with a population of integrate-and-fire neurons. Neural Computation, 20(11):2715–2744, November 2008. [20] Aurel A. Lazar and Yevgeniy B. Slutskiy. Functional identification of spike-processing neural circuits. Neural Computation, in press, 2013. [21] Anmo J. Kim and Aurel A. Lazar. Recovery of stimuli encoded with a Hodgkin-Huxley neuron using conditional PRCs. In N.W. Schultheiss, A.A. Prinz, and R.J. Butera, editors, Phase Response Curves in Neuroscience. Springer, 2011. [22] Alain Berlinet and Christine Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer Academic Publishers, 2004. [23] Aurel A. Lazar, Eftychios A. Pnevmatikakis, and Yiyin Zhou. Encoding natural scenes with neural circuits with random thresholds. Vision Research, 2010. Special Issue on Mathematical Models of Visual Coding. [24] Aurel A. Lazar and Eftychios A. Pnevmatikakis. Reconstruction of sensory stimuli encoded with integrate-and-fire neurons with random thresholds. EURASIP Journal on Advances in Signal Processing, 2009, 2009. [25] Yevgeniy B. Slutskiy. Identification of Dendritic Processing in Spiking Neural Circuits. PhD thesis, Columbia University, 2013. 9
2013
251
4,989
Learning invariant representations and applications to face verification Qianli Liao, Joel Z Leibo, and Tomaso Poggio Center for Brains, Minds and Machines McGovern Institute for Brain Research Massachusetts Institute of Technology Cambridge MA 02139 lql@mit.edu, jzleibo@mit.edu, tp@ai.mit.edu Abstract One approach to computer object recognition and modeling the brain’s ventral stream involves unsupervised learning of representations that are invariant to common transformations. However, applications of these ideas have usually been limited to 2D affine transformations, e.g., translation and scaling, since they are easiest to solve via convolution. In accord with a recent theory of transformationinvariance [1], we propose a model that, while capturing other common convolutional networks as special cases, can also be used with arbitrary identitypreserving transformations. The model’s wiring can be learned from videos of transforming objects—or any other grouping of images into sets by their depicted object. Through a series of successively more complex empirical tests, we study the invariance/discriminability properties of this model with respect to different transformations. First, we empirically confirm theoretical predictions (from [1]) for the case of 2D affine transformations. Next, we apply the model to non-affine transformations; as expected, it performs well on face verification tasks requiring invariance to the relatively smooth transformations of 3D rotation-in-depth and changes in illumination direction. Surprisingly, it can also tolerate clutter “transformations” which map an image of a face on one background to an image of the same face on a different background. Motivated by these empirical findings, we tested the same model on face verification benchmark tasks from the computer vision literature: Labeled Faces in the Wild, PubFig [2, 3, 4] and a new dataset we gathered—achieving strong performance in these highly unconstrained cases as well. 1 Introduction In the real world, two images of the same object may only be related by a very complicated and highly nonlinear transformation. Far beyond the well-studied 2D affine transformations, objects may rotate in depth, receive illumination from new directions, or become embedded on different backgrounds; they might even break into pieces or deform—melting like Salvador Dali’s pocket watch [5]—and still maintain their identity. Two images of the same face could be related by the transformation from frowning to smiling or from youth to old age. This notion of an identitypreserving transformation is considerably more expansive than those normally considered in computer vision. We argue that there is much to be gained from pushing the theory (and practice) of transformation-invariant recognition to accommodate this unconstrained notion of a transformation. Throughout this paper we use the formalism for describing transformation-invariant hierarchical architectures developed by Poggio et al. (2012). In [1], the authors propose a theory which, they argue, is general enough to explain the strong performance of convolutional architectures across a 1 wide range of tasks (e.g. [6, 7, 8]) and possibly also the ventral stream. The theory is based on the premise that invariance to identity-preserving transformations is the crux of object recognition. The present paper has two primary points. First, we provide empirical support for Poggio et al.’s theory of invariance (which we review in section 2) and show how various pooling methods for convolutional networks can all be understood as building invariance since they are all equivalent to special cases of the model we study here. We also measure the model’s invariance/discriminability with face-matching tasks. Our use of computer-generated image datasets lets us completely control the transformations appearing in each test, thereby allowing us to measure properties of the representation for each transformation independently. We find that the representation performs well even when it is applied to transformations for which there are no theoretical guarantees—e.g., the clutter “transformation” which maps an image of a face on one background to the same face on a different background. Motivated by the empirical finding of strong performance with far less constrained transformations than those captured by the theory, in the paper’s second half we apply the same approach to faceverification benchmark tasks from the computer vision literature: Labeled Faces in the Wild, PubFig [2, 3, 4], and a new dataset we gathered. All of these datasets consist of photographs taken under natural conditions (gathered from the internet). We find that, despite the use of a very simple classifier—thresholding the angle between face representations—our approach still achieves results that compare favorably with the current state of the art and even exceed it in some cases. 2 Template-based invariant encodings for objects unseen during training We conjecture that achieving invariance to identity-preserving transformations without losing discriminability is the crux of object recognition. In the following we will consider a very expansive notion of ‘transformation’, but first, in this section we develop the theory for 2D affine transformations1. Our aim is to compute a unique signature for each image x that is invariant with respect to a group of transformations G. We consider the orbit {gx | g ∈G} of x under the action of the group. In this section, G is the 2D affine group so its elements correspond to translations, scalings, and in-plane rotations of the image (notice that we use g to denote both elements of G and their representations, acting on vectors). We regard two images as equivalent if they are part of the same orbit, that is, if they are transformed versions of one another (x′ = gx for some g ∈G). The orbit of an image is itself invariant with respect to the group. For example, the set of images obtained by rotating x is exactly the same as the set of images obtained by rotating gx. The orbit is also unique for each object: the set of images obtained by rotating x only intersects with the set of images obtained by rotating x′ when x′ = gx. Thus, an intuitive method of obtaining an invariant signature for an image, unique to each object, is just to check which orbit it belongs to. We can assume access to a stored set of orbits of template images τk; these template orbits could have been acquired by unsupervised learning—possibly by observing objects transform and associating temporally adjacent frames (e.g. [9, 10]). The key fact enabling this approach to object recognition is this: It is not necessary to have all the template orbits beforehand. Even with a small, sampled, set of template orbits, not including the actual orbit of x, we can still compute an invariant signature. Observe that when g is unitary ⟨gx, τk⟩= ⟨x, g−1τk⟩. That is, the inner product of the transformed image with a template is the same as the inner product of the image with a transformed template. This is true regardless of whether x is in the orbit of τk or not. In fact, the test image need not resemble any of the templates (see [11, 12, 13, 1]). Consider gtτk to be a realization of a random variable. For a set {gtτk, | t = 1, ..., T} of images sampled from the orbit of the template τk, the distribution of ⟨x, gtτk⟩is invariant and unique to each object. See [1] for a proof of this fact in the case that G is the group of 2D affine transformations. 1See [1] for a more complete exposition of the theory. 2 Thus, the empirical distribution of the inner products ⟨x, gtτk⟩is an estimate of an invariant. Following [1], we can use the empirical distribution function (CDF) as the signature: µk n(x) = 1 T T X t=1 σ(⟨x, gtτk⟩+ n∆) (1) where σ is a smooth version of the step function (σ(x) = 0 for x ≤0, σ(x) = 1 for x > 0), ∆is the resolution (bin-width) parameter and n = 1, . . . , N. Figure 1 shows the results of an experiment demonstrating that the µk n(x) are invariant to translation and in-plane rotation. Since each face has its own characteristic empirical distribution function, it also shows that these signatures could be used to discriminate between them. Table 1 reports the average Kolmogorov-Smirnov (KS) statistics comparing signatures for images of the same face, and for different faces: Mean(KSsame) ∼0 =⇒ invariance and Mean(KSdifferent) > 0 =⇒discriminability. 1 2 (A) IN-PLANE ROTATION (B) TRANSLATION Figure 1: Example signatures (empirical distribution functions—CDFs) of images depicting two different faces under affine transformations. (A) shows in-plane rotations. Signatures for the upper and lower face are shown in red and purple respectively. (B) Shows the analogous experiment with translated faces. Note: In order to highlight the difference between the two distributions, the axes do not start at 0. Since the distribution of the ⟨x, gtτk⟩is invariant, we have many choices of possible signatures. Most notably, we can choose any of its statistical moments and these may also be invariant—or nearly so—in order to be discriminative and “invariant for a task” it only need be the case that for each k, the distributions of the ⟨x, gtτk⟩have different moments. It turns out that many different convolutional networks can be understood in this framework2. The differences between them correspond to different choices of 1. the set of template orbits (which group), 2. the inner product (more generally, we consider the template response function ∆gτk(·) := f(⟨·, gtτk⟩), for a possibly non-linear function f—see [1]) and 3. the moment used for the signature. For example, a simple neural-networks-style convolutional net with one convolutional layer and one subsampling layer (no bias term) is obtained by choosing G =translations and µk(x) =mean(·). The k-th filter is the template τk. The network’s nonlinearity could be captured by choosing ∆gτk(x) = tanh(x · gτk); note the similarity to Eq. (1). Similar descriptions could be given for modern convolutional nets, e.g. [6, 7, 11]. It is also possible to capture HMAX [14, 15] and related models (e.g. [16]) with this framework. The “simple cells” compute normalized dot products or Gaussian radial basis functions of their inputs with stored templates and “complex cells” compute, for example, µk(x) = max(·). The templates are normally obtained by translation or scaling of a set of fixed patterns, often Gabor functions at the first layer and patches of natural images in subsequent layers. 3 Invariance to non-affine transformations The theory of [1] only guarantees that this approach will achieve invariance (and discriminability) in the case of affine transformations. However, many researchers have shown good performance of related architectures on object recognition tasks that seem to require invariance to non-affine transformations (e.g. [17, 18, 19]). One possibility is that achieving invariance to affine transformations 2The computation can be made hierarchical by using the signature as the input to a subsequent layer. 3 is itself a larger-than-expected part of the full object recognition problem. While not dismissing that possibility, we emphasize here that approximate invariance to many non-affine transformations can be achieved as long as the system’s operation is restricted to certain nice object classes [20, 21, 22]. A nice class with respect to a transformation G (not necessarily a group) is a set of objects that all transform similarly to one another under the action of G. For example, the 2D transformation mapping a profile view of one person’s face to its frontal view is similar to the analogous transformation of another person’s face in this sense. The two transformations will not be exactly the same since any two faces differ in their exact 3D structure, but all faces do approximately share a gross 3D structure, so the transformations of two different faces will not be as different from one another as would, for example, the image transformations evoked by 3D rotation of a chair versus the analogous rotation of a clock. Faces are the prototypical example of a class of objects that is nice with respect to many transformations3. (A) ROTATION IN DEPTH (B) ILLUMINATION Figure 2: Example signatures (empirical distribution functions) of images depicting two different faces under non-affine transformations: (A) Rotation in depth. (B) Changing the illumination direction (lighting from above or below). Figure 2 shows that unlike in the affine case, the signature of a test face with respect to template faces at different orientations (3D rotation in depth) or illumination conditions is not perfectly invariant (KSsame > 0), though it still tolerates substantial transformations. These signatures are also useful for discriminating faces since the empirical distribution functions are considerably more varied between faces than they are across images of the same face (Mean(KSdifferent) > Mean(KSsame), table 1). Table 2 reports the ratios of within-class discriminability (negatively related to invariance) and between-class discriminability for moment-signatures. Lower values indicate both better transformation-tolerance and stronger discriminability. Transformation Mean(KSsame) Mean(KSdifferent) Translation 0.0000 1.9420 In-plane rotation 0.2160 19.1897 Out-of-plane rotation 2.8698 5.2950 Illumination 1.9636 2.8809 Table 1: Average Kolmogorov-Smirnov statistics comparing the distributions of normalized inner products across transformations and across objects (faces). Transformation MEAN L1 L2 L5 MAX Translation 0.0000 0.0000 0.0000 0.0000 0.0000 In-plane rotation 0.0031 0.0031 0.0033 0.0042 0.0030 Out-of-plane rotation 0.3045 0.3045 0.3016 0.2923 0.1943 Illumination 0.7197 0.7197 0.6994 0.6405 0.2726 Table 2: Table of ratios of “within-class discriminability” to “between-class discriminability” for one template ∥µ(xi) −µ(xj)∥2. within: xi, xj depict the same face, and between: xi, xj depict different faces. Columns are different statistical moments used for pooling (computing µ(x)). 3It is interesting to consider the possibility that faces co-evolved along with natural visual systems in order to be highly recognizable. 4 4 Towards the fully unconstrained task The finding that this templates-and-signatures approach works well even in the difficult cases of 3Drotation and illumination motivates us to see how far we can push it. We would like to accommodate a totally-unconstrained notion of invariance to identity-preserving transformations. In particular, we investigate the possibility of computing signatures that are invariant to all the task-irrelevant variability in the datasets used for serious computer vision benchmarks. In the present paper we focus on the problem of face-verification (also called pair-matching). Given two images of new faces, never encountered during training, the task is to decide if they depict the same person or not. We used the following procedure to test the templates-and-signatures approach on face verification problems using a variety of different datasets (see fig. 4A). First, all images were preprocessed with low-level features (e.g., histograms of oriented gradients (HOG) [23]), followed by PCA using all the images in the training set and z-score-normalization4. At test-time, the k-th element of the signature of an image x is obtained by first computing all the ⟨x, gtτk⟩where gtτk is the t-th image of the k-th template person—both encoded by their projection onto the training set’s principal components— then pooling the results. We used ⟨·, ·⟩= normalized dot product, and µk(x) = mean(·). At test time, the classifier receives images of two faces and must classify them as either depicting the same person or not. We used a simple classifier that merely computes the angle between the signatures of the two faces (via a normalized dot product) and responds “same” if it is above a fixed threshold or “different” if below threshold. We chose such a weak classifier since the goal of these simulations was to assess the value of the signature as a feature representation. We expect that the overall performance levels could be improved for most of these tasks by using a more sophisticated classifier5. We also note that, after extracting low-level features, the entire system only employs two operations: normalized dot products and pooling. The images in the Labeled Faces in the Wild (LFW) dataset vary along so many different dimensions that it is difficult to try to give an exhaustive list. It contains natural variability in, at least, pose, lighting, facial expression, and background [2] (example images in fig. 3). We argue here that LFW and the controlled synthetic data problems we studied up to now are different in two primary ways. First, in unconstrained tasks like LFW, you cannot rely on having seen all the transformations of any template. Recall, the theory of [1] relies on previous experience with all the transformations of template images in order to recognize test images invariantly to the same transformations. Since LFW is totally unconstrained, any subset of it used for training will never contain all the transformations that will be encountered at test time. Continuing to abuse the notation from section 2, we can say that the LFW database only samples a small subset of G, which is now the set of all transformations that occur in LFW. That is, for any two images in LFW, x and x′, only a small (relative to |G|) subset of their orbits are in LFW. Moreover, {g | gx ∈LFW} and {g′ | g′x′ ∈LFW} almost surely do not overlap with one another6. The second important way in which LFW differs from our synthetic image sets is the presence of clutter. Each LFW face appears on many different backgrounds. It is commmon to consider clutter to be a separate problem from that of achieving transformation-invariance, indeed, [1] conjectures that the brain employs separate mechanisms, quite different from templates and pooling—e.g. 4PCA reduces the final algorithm’s memory requirements. Additionally, it is much more plausible that the brain could store principal components than directly memorizing frames of past visual experience. A network of neurons with Hebbian synapses (modeled by Oja’s rule)—changing its weights online as images are presented—converges to the network that projects new inputs onto the eigenvectors of its past input’s covariance [24]. See also [1] for discussion of this point in the context of the templates-and-signatures approach. 5Our classifier is unsupervised in the sense that it doesn’t have any free parameters to fit on training data. However, our complete system is built using labeled data for the templates, so from that point-of-view it may be considered supervised. On the other hand, we also believe that it could be wired up by an unsupervised process—probably involving the association of temporally-adjacent frames—so there is also a sense in which the entire system could be considered, at least in principle, to be unsupervised. We might say that, insofar as our system models the ventral stream, we intend it as a (strong) claim about what the brain could learn via unsupervised mechanisms. 6The brain also has to cope with sampling and its effects can be strikingly counterintuitive. For example, Afraz et al. showed that perceived gender of a face is strongly biased toward male or female at different locations in the visual field; and that the spatial pattern of these biases was distinctive and stable over time for each individual [25]. These perceptual heterogeneity effects could be due to the templates supporting the task differing in the precise positions (transformations) at which they were encountered during development. 5 attention—toward achieving clutter-tolerance. We set aside those hypotheses for now since the goal of the present work is to explore the limits of the totally unconstrained notion of identity-preserving transformation. Thus, for the purposes of this paper, we consider background-variation as just another transformation. That is, “clutter-transformations” map images of an object on one background to images of the same object on different backgrounds. We explicitly tested the effects of non-uniform transformation-sampling and background-variation using two new fully-controlled synthetic image sets for face-verification7. Figure 3B shows the results of the test of robustness to non-uniform transformation-sampling for 3D rotation-in-depthinvariant face verification. It shows that the method tolerates substantial differences between the transformations used to build the feature representation and the transformations on which the system is tested. We tested two different models of natural non-uniform transformation sampling, in one case (blue curve) we sampled the orbits at a fixed rate when preparing templates, in the other case, we removed connected subsets of each orbit. In both cases the test used the entire orbit and never contained any of the same faces as the training phase. It is arguable which case is a better model of the real situation, but we note that even in the worse case, performance is surprisingly high—even with large percentages of the orbit discarded. Figure 3C shows that signatures produced by pooling over clutter conditions give good performance on a face-verification task with faces embedded on backgrounds. Using templates with the appropriate background size for each test, we show that our models continue to perform well as we increase the size of the background while the performance of standard HOG features declines. 0 20 40 60 80 100 50 55 60 65 70 75 80 85 90 95 Percentage discarded Accuracy Non−consecutive Consecutive 0 2 4 6 8 10 0.5 0.6 0.7 0.8 0.9 1 AUC Background size Our model HOG (A) LFW IMAGES (B) NON-UNIFORM SAMPLING (C) BACKGROUND VARIATION TASK Figure 3: (A) Example images from Labeled Faces in the Wild. (B) Non-uniform sampling simulation. The abscissa is the percentage of frames discarded from each template’s transformation sequence, the ordinate is the accuracy on the face verification task. (C) Pooling over variation in the background. The abscissa is the background size (10 scales), and the ordinate is the area under the ROC curve (AUC) for the face verification task. 5 Computer vision benchmarks: LFW, PubFig, and SUFR-W An implication of the argument in sections 2 and 4, is that there needs to be a reasonable number of images sampled from each template’s orbit. Despite the fact that we are now considering a totally unconstrained set of transformations, i.e. any number of samples is going to be small relative to |G|, we found that approximately 15 images gtτk per face is enough for all the face verification tasks we considered. 15 is a surprisingly manageable number, however, it is still more images than LFW has for most individuals. We also used the PubFig83 dataset, which has the same problem as LFW, and a subset of the original PubFig dataset. In order to ensure we would have enough images from each template orbit, we gathered a new dataset—SUFR-W8—with ∼12,500 images, depicting 450 individuals. The new dataset contains similar variability to LFW and PubFig but tends to have more images per individual than LFW (there are at least 15 images of each individual). The new dataset does not contain any of the same individuals that appear in either LFW or PubFig/PubFig83. 7We obtained 3D models of faces from FaceGen (Singular Inversions Inc.) and rendered them with Blender (www.blender.org). 8See paper [26] for details. Data available at http://cbmm.mit.edu/ 6 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 False Positive Rate True Positive Rate Our Model --- AUC: 0.817 HOG --- AUC: 0.707 Our Model w/ scrambled identities --- AUC: 0.681 Our Model w/ random noise templates--- AUC: 0.649 (a) Inputs (b) Features (c) Signatures (d) Verification HOG HOG PCA Principal Components (PCs) Project onto PCs Templates Normalized dot products Person 1 Person 2 Person 3 Person 4 > Threshold? Histogram and/or statistical moments (e.g. mean pooling) ... ... Normalized dot product (A) MODEL (B) PERFORMANCE Template preparation Testing Figure 4: (A) Illustration of the model’s processing pipeline. (B) ROC curves for the new dataset using templates from the training set. The second model (red) is a control model that uses HOG features directly. The third (control) model pools over random images in the dataset (as opposed to images depicting the same person). The fourth model pools over random noise images. 1. Detection 2. Alignment 3. Recognition Signature PubFig83 Our data PubFig LFW 78.0 81.7 (A) PIPELINE (B) PERFORMANCE (C) ROC CURVES 87.1 75.2 84.6 75.4 74.3 78.6 70.6 LBP LBP Signatures (Sig.) LPQ+LBP+LTP LPQ+LBP+LTP Sig. 76.4 66.3 74.1 65.2 65.1 68.9 63.4 Accuracy (%) 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 LFW AUC 0.937 Acc. 87.1% PubFig AUC 0.897 Acc. 81.7% Our data AUC 0.856 Acc. 78.0% PubFig83 AUC 0.847 Acc. 76.4% False positive rate True positive rate Figure 5: (A) The complete pipeline used for all experiments. (B) The performance of four different models on PubFig83, our new dataset, PubFig and LFW. For these experiments, Local Binary Patterns (LBP), Local Phase Quantization (LPQ), Local Ternary Patterns (LTP) were used [27, 28, 29]; they all perform very similarly to HOG—just slightly better (∼1%). These experiments used nondetected and non-aligned face images as inputs—thus the errors include detection and alignment errors (about 1.5% of faces are not detected and 6-7% of the detected faces are significantly misaligned). In all cases, templates were obtained from our new dataset (excluding 30 images for a testing set). This sacrifices some performance (∼1%) on each dataset but prevents overfitting: we ran the exact same model on all 4 datasets. (C) The ROC curves of the best model in each dataset. Figure 4B shows ROC curves for face verification with the new dataset. The blue curve is our model. The purple and green curves are control experiments that pool over images depicting different individuals, and random noise templates respectively. Both control models performed worse than raw HOG features (red curve). For all our PubFig, PubFig83 and LFW experiments (Fig. 5), we ignored the provided training data. Instead, we obtained templates from our new dataset. For consistency, we applied the same detection/alignment to all images. The alignment method we used ([30]) produced images that were somewhat more variable than the method used by the authors of the LFW dataset (LFW-a) —the performance of our simple classifier using raw HOG features on LFW is 73.3%, while on LFW-a it is 75.6%. Even with the very simple classifier, our system’s performance still compares favorably with the current state of the art. In the case of LFW, our model’s performance exceeds the current stateof-the-art for an unsupervised system (86.2% using LQP — Local Quantized Patterns [31]—Note: these features are not publicly available; otherwise we would have tried using them for preprocess7 ing), though the best supervised systems do better9. The strongest result in the literature for face verification with PubFig8310 is 70.2% [4]—which is 6.2% lower than our best model. 6 Discussion The templates-and-signatures approach to recognition permits many seemingly-different convolutional networks (e.g. ConvNets and HMAX) to be understood in a common framework. We have argued here that the recent strong performance of convolutional networks across a variety of tasks (e.g., [6, 7, 8]) is explained because all these problems share a common computational crux: the need to achieve representations that are invariant to identity-preserving transformations. We argued that when studying invariance, the appropriate mathematical objects to consider are the orbits of images under the action of a transformation and their associated probability distributions. The probability distributions (and hence the orbits) can be characterized by one-dimensional projections—thus justifying the choice of the empirical distribution function of inner products with template images as a representation for recognition. In this paper, we systematically investigated the properties of this representation for two affine and two non-affine transformations (tables 1 and 2). The same probability distribution could also be characterized by its statistical moments. Interestingly, we found when we considered more difficult tasks in the second half of the paper, representations based on statistical moments tended to outperform the empirical distribution function. There is a sense in which this result is surprising, since the empirical distribution function contains more invariant “information” than the moments—on the other hand, it could also be expected that the moments ought to be less noisy estimates of the underlying distribution. This is an interesting question for further theoretical and experimental work. Unlike most convolutional networks, our model has essentially no free parameters. In fact, the pipeline we used for most experiments actually has no operations at all besides normalized dot products and pooling (also PCA when preparing templates). These operations are easily implemented by neurons [32]. We could interpret the former as the operation of “simple cells” and the latter as “complex cells”—thus obtaining a similar view of the ventral stream to the one given by [33, 16, 14] (and many others). Despite the classifier’s simplicity, our model’s strong performance on face verification benchmark tasks is quite encouraging (Fig. 5). Future work could extend this approach to other objects, and other tasks. Acknowledgments This material is based upon work supported by the Center for Brains, Minds and Machines (CBMM), funded by NSF STC award CCF-1231216. References [1] T. Poggio, J. Mutch, F. Anselmi, J. Z. Leibo, L. Rosasco, and A. Tacchetti, “The computational magic of the ventral stream: sketch of a theory (and why some deep architectures work),” MIT-CSAIL-TR-2012035, 2012. [2] G. B. Huang, M. Mattar, T. Berg, and E. Learned-Miller, “Labeled faces in the wild: A database for studying face recognition in unconstrained environments,” in Workshop on faces in real-life images: Detection, alignment and recognition (ECCV), (Marseille, Fr), 2008. [3] N. Kumar, A. C. Berg, P. N. Belhumeur, and S. K. Nayar, “Attribute and Simile Classifiers for Face Verification,” in IEEE International Conference on Computer Vision (ICCV), (Kyoto, JP), pp. 365–372, Oct. 2009. [4] N. Pinto, Z. Stone, T. Zickler, and D. D. Cox, “Scaling-up Biologically-Inspired Computer Vision: A Case-Study on Facebook,” in IEEE Computer Vision and Pattern Recognition, Workshop on Biologically Consistent Vision, 2011. [5] S. Dali, “The persistence of memory (1931).” Museum of Modern Art, New York, NY. [6] A. Krizhevsky, I. Sutskever, and G. Hinton, “ImageNet classification with deep convolutional neural networks,” in Advances in neural information processing systems, vol. 25, (Lake Tahoe, CA), 2012. 9Note: Our method of testing does not strictly conform to the protocol recommended by the creators of LFW [2]: we re-aligned (worse) the faces. We also use the identities of the individuals during training. 10The original PubFig dataset was only provided as a list of URLs from which the images could be downloaded. Now only half the images remain available. On the original dataset, the strongest performance reported is 78.7% [3]. The authors of that study also made their features available, so we estimated the performance of their features on the available subset of images (using SVM). We found that an SVM classifier, using their features, and our cross-validation splits gets 78.4% correct—3.3% lower than our best model. 8 [7] O. Abdel-Hamid, A. Mohamed, H. Jiang, and G. Penn, “Applying convolutional neural networks concepts to hybrid NN-HMM model for speech recognition,” in IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4277–4280, 2012. [8] C. F. Cadieu, H. Hong, D. Yamins, N. Pinto, N. J. Majaj, and J. J. DiCarlo, “The neural representation benchmark and its evaluation on brain and machine,” arXiv preprint arXiv:1301.3530, 2013. [9] P. F¨oldi´ak, “Learning invariance from transformation sequences,” Neural Computation, vol. 3, no. 2, pp. 194–200, 1991. [10] L. Wiskott and T. Sejnowski, “Slow feature analysis: Unsupervised learning of invariances,” Neural computation, vol. 14, no. 4, pp. 715–770, 2002. [11] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y. LeCun, “What is the best multi-stage architecture for object recognition?,” IEEE International Conference on Computer Vision, pp. 2146–2153, 2009. [12] J. Z. Leibo, J. Mutch, L. Rosasco, S. Ullman, and T. Poggio, “Learning Generic Invariances in Object Recognition: Translation and Scale,” MIT-CSAIL-TR-2010-061, CBCL-294, 2010. [13] A. Saxe, P. W. Koh, Z. Chen, M. Bhand, B. Suresh, and A. Y. Ng, “On random weights and unsupervised feature learning,” Proceedings of the International Conference on Machine Learning (ICML), 2011. [14] M. Riesenhuber and T. Poggio, “Hierarchical models of object recognition in cortex,” Nature Neuroscience, vol. 2, pp. 1019–1025, Nov. 1999. [15] T. Serre, L. Wolf, S. Bileschi, M. Riesenhuber, and T. Poggio, “Robust Object Recognition with CortexLike Mechanisms,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 29, no. 3, pp. 411–426, 2007. [16] K. Fukushima, “Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position,” Biological Cybernetics, vol. 36, pp. 193–202, Apr. 1980. [17] Y. LeCun, F. J. Huang, and L. Bottou, “Learning methods for generic object recognition with invariance to pose and lighting,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), vol. 2, pp. 90–97, IEEE, 2004. [18] E. Bart and S. Ullman, “Class-based feature matching across unrestricted transformations,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 30, no. 9, pp. 1618–1631, 2008. [19] N. Pinto, Y. Barhomi, D. Cox, and J. J. DiCarlo, “Comparing state-of-the-art visual features on invariant object recognition tasks,” in Applications of Computer Vision (WACV), 2011 IEEE Workshop on, 2011. [20] T. Vetter, A. Hurlbert, and T. Poggio, “View-based models of 3D object recognition: invariance to imaging transformations,” Cerebral Cortex, vol. 5, no. 3, p. 261, 1995. [21] J. Z. Leibo, J. Mutch, and T. Poggio, “Why The Brain Separates Face Recognition From Object Recognition,” in Advances in Neural Information Processing Systems (NIPS), (Granada, Spain), 2011. [22] H. Kim, J. Wohlwend, J. Z. Leibo, and T. Poggio, “Body-form and body-pose recognition with a hierarchical model of the ventral stream,” MIT-CSAIL-TR-2013-013, CBCL-312, 2013. [23] N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection,” IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), vol. 1, no. 886-893, 2005. [24] E. Oja, “Simplified neuron model as a principal component analyzer,” Journal of mathematical biology, vol. 15, no. 3, pp. 267–273, 1982. [25] A. Afraz, M. V. Pashkam, and P. Cavanagh, “Spatial heterogeneity in the perception of face and form attributes,” Current Biology, vol. 20, no. 23, pp. 2112–2116, 2010. [26] J. Z. Leibo, Q. Liao, and T. Poggio, “Subtasks of Unconstrained Face Recognition,” in International Joint Conference on Computer Vision, Imaging and Computer Graphics, VISIGRAPP, (Lisbon), 2014. [27] T. Ojala, M. Pietikainen, and T. Maenpaa, “Multiresolution gray-scale and rotation invariant texture classification with local binary patterns,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 24, no. 7, pp. 971–987, 2002. [28] X. Tan and B. Triggs, “Enhanced local texture feature sets for face recognition under difficult lighting conditions,” in Analysis and Modeling of Faces and Gestures, pp. 168–182, Springer, 2007. [29] V. Ojansivu and J. Heikkil¨a, “Blur insensitive texture classification using local phase quantization,” in Image and Signal Processing, pp. 236–243, Springer, 2008. [30] X. Zhu and D. Ramanan, “Face detection, pose estimation, and landmark localization in the wild,” in IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2012. [31] S. u. Hussain, T. Napoleon, and F. Jurie, “Face recognition using local quantized patterns,” in Proc. British Machine Vision Conference (BMCV), vol. 1, (Guildford, UK), pp. 52–61, 2012. [32] M. Kouh and T. Poggio, “A canonical neural circuit for cortical nonlinear operations,” Neural computation, vol. 20, no. 6, pp. 1427–1451, 2008. [33] D. Hubel and T. Wiesel, “Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex,” The Journal of Physiology, vol. 160, no. 1, p. 106, 1962. 9
2013
252
4,990
Optimistic Concurrency Control for Distributed Unsupervised Learning Xinghao Pan1 Joseph Gonzalez1 Stefanie Jegelka1 Tamara Broderick1,2 Michael I. Jordan1,2 1Department of Electrical Engineering and Computer Science, and 2Department of Statistics University of California, Berkeley Berkeley, CA USA 94720 {xinghao,jegonzal,stefje,tab,jordan}@eecs.berkeley.edu Abstract Research on distributed machine learning algorithms has focused primarily on one of two extremes—algorithms that obey strict concurrency constraints or algorithms that obey few or no such constraints. We consider an intermediate alternative in which algorithms optimistically assume that conflicts are unlikely and if conflicts do arise a conflict-resolution protocol is invoked. We view this “optimistic concurrency control” paradigm as particularly appropriate for large-scale machine learning algorithms, particularly in the unsupervised setting. We demonstrate our approach in three problem areas: clustering, feature learning and online facility location. We evaluate our methods via large-scale experiments in a cluster computing environment. 1 Introduction The desire to apply machine learning to increasingly larger datasets has pushed the machine learning community to address the challenges of distributed algorithm design: partitioning and coordinating computation across the processing resources. In many cases, when computing statistics of iid data or transforming features, the computation factors according to the data and coordination is only required during aggregation. For these embarrassingly parallel tasks, the machine learning community has embraced the map-reduce paradigm, which provides a template for constructing distributed algorithms that are fault tolerant, scalable, and easy to study. However, in pursuit of richer models, we often introduce statistical dependencies that require more sophisticated algorithms (e.g., collapsed Gibbs sampling or coordinate ascent) which were developed and studied in the serial setting. Because these algorithms iteratively transform a global state, parallelization can be challenging and often requires frequent and complex coordination. Recent efforts to distribute these algorithms can be divided into two primary approaches. The mutual exclusion approach, adopted by [1] and [2], guarantees a serializable execution preserving the theoretical properties of the serial algorithm but at the expense of parallelism and costly locking overhead. Alternatively, in the coordination-free approach, proposed by [3] and [4], processors communicate frequently without coordination minimizing the cost of contention but leading to stochasticity, data-corruption, and requiring potentially complex analysis to prove algorithm correctness. In this paper we explore a third approach, optimistic concurrency control (OCC) [5] which offers the performance gains of the coordination-free approach while at the same time ensuring a serializable execution and preserving the theoretical properties of the serial algorithm. Like the coordinationfree approach, OCC exploits the infrequency of data-corrupting operations. However, instead of allowing occasional data-corruption, OCC detects data-corrupting operations and applies correcting computation. As a consequence, OCC automatically ensures correctness, and the analysis is only necessary to guarantee optimal scaling performance. 1 We apply OCC to distributed nonparametric unsupervised learning—including but not limited to clustering—and implement distributed versions of the DP-Means [6], BP-Means [7], and online facility location (OFL) algorithms. We demonstrate how to analyze OCC in the context of the DP-Means algorithm and evaluate the empirical scalability of the OCC approach on all three of the proposed algorithms. The primary contributions of this paper are: 1. Concurrency control approach to distributing unsupervised learning algorithms. 2. Reinterpretation of online nonparametric clustering in the form of facility location with approximation guarantees. 3. Analysis of optimistic concurrency control for unsupervised learning. 4. Application to feature modeling and clustering. 2 Optimistic Concurrency Control Many machine learning algorithms iteratively transform some global state (e.g., model parameters or variable assignment) giving the illusion of serial dependencies between each operation. However, due to sparsity, exchangeability, and other symmetries, it is often the case that many, but not all, of the state-transforming operations can be computed concurrently while still preserving serializability: the equivalence to some serial execution where individual operations have been reordered. This opportunity for serializable concurrency forms the foundation of distributed database systems. For example, two customers may concurrently make purchases exhausting the inventory of unrelated products, but if they try to purchase the same product then we may need to serialize their purchases to ensure sufficient inventory. One solution (mutual exclusion) associates locks with each product type and forces each purchase of the same product to be processed serially. This might work for an unpopular, rare product but if we are interested in selling a popular product for which we have a large inventory the serialization overhead could lead to unnecessarily slow response times. To address this problem, the database community has adopted optimistic concurrency control (OCC) [5] in which the system tries to satisfy the customers requests without locking and corrects transactions that could lead to negative inventory (e.g., by forcing the customer to checkout again). Optimistic concurrency control exploits situations where most operations can execute concurrently without conflicting or violating serialization invariants. For example, given sufficient inventory the order in which customers are satisfied is immaterial and concurrent operations can be executed serially to yield the same final result. However, in the rare event that inventory is nearly depleted two concurrent purchases may not be serializable since the inventory can never be negative. By shifting the cost of concurrency control to rare events we can admit more costly concurrency control mechanisms (e.g., re-computation) in exchange for an efficient, simple, coordination-free execution for the majority of the events. Formally, to apply OCC we must define a set of transactions (i.e., operations or collections of operations), a mechanism to detect when a transaction violates serialization invariants (i.e., cannot be executed concurrently), and a method to correct (e.g., rollback) transactions that violate the serialization invariants. Optimistic concurrency control is most effective when the cost of validating concurrent transactions is small and conflicts occur infrequently. Machine learning algorithms are ideal for optimistic concurrency control. The conditional independence structure and sparsity in our models and data often leads to sparse parameter updates substantially reducing the chance of conflicts. Similarly, symmetry in our models often provides the flexibility to reorder serial operations while preserving algorithm invariants. Because the models encode the dependency structure, we can easily detect when an operation violates serial invariants and correct by rejecting the change and rerunning the computation. Alternatively, we can exploit the semantics of the operations to resolve the conflict by accepting a modified update. As a consequence OCC allows us to easily construct provably correct and efficient distributed algorithms without the need to develop new theoretical tools to analyze complex non-deterministic distributed behavior. 2 2.1 The OCC Pattern for Machine Learning Optimistic concurrency control can be distilled to a simple pattern (meta-algorithm) for the design and implementation of distributed machine learning systems. We begin by evenly partitioning N data points (and the corresponding computation) across the P available processors. Each processor maintains a replicated view of the global state and serially applies the learning algorithm as a sequence of operations on its assigned data and the global state. If an operation mutates the global state in a way that preserves the serialization invariants then the operation is accepted locally and its effect on the global state, if any, is eventually replicated to other processors. However, if an operation could potentially conflict with operations on other processors then it is sent to a unique serializing processor where it is rejected or corrected and the resulting global state change is eventually replicated to the rest of the processors. Meanwhile the originating processor either tentatively accepts the state change (if a rollback operator is defined) or proceeds as though the operation has been deferred to some point in the future. While it is possible to execute this pattern asynchronously with minimal coordination, for simplicity we adopt the bulk-synchronous model of [8] and divide the computation into epochs. Within an epoch t, b data points B(p, t) are evenly assigned to each of the P processors. Any state changes or serialization operations are transmitted at the end of the epoch and processed before the next epoch. While potentially slower than an asynchronous execution, the bulk-synchronous execution is deterministic and can be easily expressed using existing systems like Hadoop or Spark [9]. 3 OCC for Unsupervised Learning Much of the existing literature on distributed machine learning algorithms has focused on classification and regression problems, where the underlying model is continuous. In this paper we apply the OCC pattern to machine learning problems that have a more discrete, combinatorial flavor—in particular unsupervised clustering and latent feature learning problems. These problems exhibit symmetry via their invariance to both data permutation and cluster or feature permutation. Together with the sparsity of interacting operations in their existing serial algorithms, these problems offer a unique opportunity to develop OCC algorithms. The K-means algorithm provides a paradigm example; here the inferential goal is to partition the data. Rather than focusing solely on K-means, however, we have been inspired by recent work in which a general family of K-means-like algorithms have been obtained by taking Bayesian nonparametric (BNP) models based on combinatorial stochastic processes such as the Dirichlet process, the beta process, and hierarchical versions of these processes, and subjecting them to smallvariance asymptotics where the posterior probability under the BNP model is transformed into a cost function that can be optimized [7]. The algorithms considered to date in this literature have been developed and analyzed in the serial setting; our goal is to explore distributed algorithms for optimizing these cost functions that preserve the structure and analysis of their serial counterparts. 3.1 OCC DP-Means We first consider the DP-means algorithm (Alg. 1) introduced by [6]. Like the K-means algorithm, DP-Means alternates between updating the cluster assignment zi for each point xi and recomputing the centroids C = {µk}K k=1 associated with each clusters. However, DP-Means differs in that the number of clusters is not fixed a priori. Instead, if the distance from a given data point to all existing cluster centroids is greater than a parameter λ, then a new cluster is created. While the second phase is trivially parallel, the process of introducing clusters in the first phase is inherently serial. However, clusters tend to be introduced infrequently, and thus DP-Means provides an opportunity for OCC. In Alg. 3 we present an OCC parallelization of the DP-Means algorithm in which each iteration of the serial DP-Means algorithm is divided into N/(Pb) bulk-synchronous epochs. The data is evenly partitioned {xi}i∈B(p,t) across processor-epochs into blocks of size b = |B(p, t)|. During each epoch t, each processor p evaluates the cluster membership of its assigned data {xi}i∈B(p,t) using the cluster centers C from the previous epoch and optimistically proposes a new set of cluster centers ˆC. At the end of each epoch the proposed cluster centers, ˆC, are serially validated using Alg. 2. 3 Algorithm 1: Serial DP-means Input: data {xi}N i=1, threshold λ C ←∅ while not converged do for i = 1 to N do µ∗←argminµ∈C ∥xi −µ∥ if ∥xi −µ∗∥> λ then zi ←xi C ←C ∪xi // New cluster else zi ←µ∗ // Use nearest for µ ∈C do // Recompute Centers µ ←Mean({xi | zi = µ}) Output: Accepted cluster centers C Algorithm 2: DPValidate Input: Set of proposed cluster centers ˆC C ←∅ for x ∈ˆC do µ∗←argminµ∈C ∥x −µ∥ if ∥xi −µ∗∥< λ then // Reject Ref(x) ←µ∗ // Rollback Assgs else C ←C ∪x // Accept Output: Accepted cluster centers C Algorithm 3: Parallel DP-means Input: data {xi}N i=1, threshold λ Input: Epoch size b and P processors Input: Partitioning B(p, t) of data {xi}i∈B(p,t) to processor-epochs where b = |B(p, t)| C ←∅ while not converged do for epoch t = 1 to N/(Pb) do ˆC ←∅ // New candidate centers for p ∈{1, . . . , P} do in parallel // Process local data for i ∈B(p, t) do µ∗←argminµ∈C ∥xi −µ∥ // Optimistic Transaction if ∥xi −µ∗∥> λ then zi ←Ref(xi) ˆC ←ˆC ∪xi else zi ←µ∗ // Always Safe // Serially validate clusters C ←C ∪DPValidate( ˆC) for µ ∈C do // Recompute Centers µ ←Mean({xi | zi = µ}) Output: Accepted cluster centers C Figure 1: The Serial DP-Means algorithm and distributed implementation using the OCC pattern. The validation process accepts cluster centers that are not covered by (i.e., not within λ of) already accepted cluster centers. When a cluster center is rejected we update its reference to point to the already accepted center, thereby correcting the original point assignment. 3.2 OCC Facility Location The DP-Means objective turns out to be equivalent to the classic Facility Location (FL) objective: J(C) = P x∈X minµ∈C ∥x −µ∥2 + λ2|C|,which selects the set of cluster centers (facilities) µ ∈C that minimizes the shortest distance ∥x −µ∥2 to each point (customer) x as well as the penalized cost of the clusters λ2 |C|. However, while DP-Means allows the clusters to be arbitrary points (e.g., C ∈RD), FL constrains the clusters to be points C ⊆F in a set of candidate locations F. Hence, we obtain a link between combinatorial Bayesian models and FL allowing us to apply algorithms with known approximation bounds to Bayesian inspired nonparametric models. As we will see in Section 4, our OCC algorithm provides constant-factor approximations for both FL and DP-means. Facility location has been studied intensely. We build on the online facility location (OFL) algorithm described by Meyerson [10]. The OFL algorithm processes each data point x serially in a single pass by either adding x to the set of clusters with probability min(1, minµ∈C ∥x −µ∥2 /λ2) or assigning x to the nearest existing cluster. Using OCC we are able to construct a distributed OFL algorithm (Alg. 4) which is nearly identical to the OCC DP-Means algorithm (Alg. 3) but which provides strong approximation bounds. The OCC OFL algorithm differs only in that clusters are introduced and validated stochastically—the validation process ensures that the new clusters are accepted with probability equal to the serial algorithm. 3.3 OCC BP-Means BP-means is an algorithm for learning collections of latent binary features, providing a way to define groupings of data points that need not be mutually exclusive or exhaustive like clusters. 4 Algorithm 4: Parallel OFL Input: Same as DP-Means for epoch t = 1 to N/(Pb) do ˆC ←∅ for p ∈{1, . . . , P} do in parallel for i ∈B(p, t) do d ←minµ∈C ∥xi −µ∥ with probability min  d2, λ2 /λ2 ˆC ←ˆC ∪(xi, d) C ←C ∪OFLValidate( ˆC) Output: Accepted cluster centers C Algorithm 5: OFLValidate Input: Set of proposed cluster centers ˆC C ←∅ for (x, d) ∈ˆC do d∗←minµ∈C ∥x −µ∥ with probability min  d∗2, d2 /d2 C ←C ∪x // Accept Output: Accepted cluster centers C Figure 2: The OCC algorithm for Online Facility Location (OFL). As with serial DP-means, there are two phases in serial BP-means (Alg. 6). In the first phase, each data point xi is labeled with binary assignments from a collection of features (zik = 0 if xi doesn’t belong to feature k; otherwise zik = 1) to construct a representation xi ≈P k zikfk. In the second phase, parameter values (the feature means fk ∈ˆC) are updated based on the assignments. The first step also includes the possibility of introducing an additional feature. While the second phase is trivially parallel, the inherently serial nature of the first phase combined with the infrequent introduction of new features points to the usefulness of OCC in this domain. The OCC parallelization for BP-means follows the same basic structure as OCC DP-means. Each transaction operates on a data point xi in two phases. In the first, analysis phase, the optimal representation P k zikfk is found. If xi is not well represented (i.e., ∥xi −P k zikfk∥> λ), the difference is proposed as a new feature in the second validation phase. At the end of epoch t, the proposed features {f new i } are serially validated to obtain a set of accepted features ˜C. For each proposed feature f new i , the validation process first finds the optimal representation f new i ≈ P fk∈˜C zikfk using newly accepted features. If f new i is not well represented, the difference f new i − P fk∈˜C zikfk is added to ˜C and accepted as a new feature. Finally, to update the feature means, let F be the K-row matrix of feature means. The feature means update F ←(ZT Z)−1ZT X can be evaluated as a single transaction by computing the sums ZT Z = P i zizT i (where zi is a K × 1 column vector so zizT i is a K × K matrix) and ZT X = P i zixT i in parallel. We present the pseudocode for the OCC parallelization of BP-means in Appendix A. 4 Analysis of Correctness and Scalability In contrast to the coordination-free pattern in which scalability is trivial and correctness often requires strong assumptions or holds only in expectation, the OCC pattern leads to simple proofs of correctness and challenging scalability analysis. However, in many cases it is preferable to have algorithms that are correct and probably fast rather than fast and possibly correct. We first establish serializability: Theorem 4.1 (Serializability). The distributed DP-means, OFL, and BP-means algorithms are serially equivalent to DP-means, OFL and BP-means, respectively. The proof (Appendix B) of Theorem 4.1 is relatively straightforward and is obtained by constructing a permutation function that describes an equivalent serial execution for each distributed execution. The proof can easily be extended to many other machine learning algorithms. Serializability allows us to easily extend important theoretical properties of the serial algorithm to the distributed setting. For example, by invoking serializability, we can establish the following result for the OCC version of the online facility location (OFL) algorithm: 5 Theorem 4.2. If the data is randomly ordered, then the OCC OFL algorithm provides a constantfactor approximation for the DP-means objective. If the data is adversarially ordered, then OCC OFL provides a log-factor approximation to the DP-means objective. The proof (Appendix B) of Theorem 4.2 is first derived in the serial setting then extended to the distributed setting through serializability. In contrast to divide-and-conquer schemes, whose approximation bounds commonly depend multiplicatively on the number of levels [11], Theorem 4.2 is unaffected by distributed processing and has no communication or coarsening tradeoffs. Furthermore, to retain the same factors as a batch algorithm on the full data, divide-and-conquer schemes need a large number of preliminary centers at lower levels [11, 12]. In that case, the communication cost can be high, since all proposed clusters are sent at the same time, as opposed to the OCC approach. We address the communication overhead (the number of rejections) for our scheme next. Scalability The scalability of the OCC algorithms depends on the number of transactions that are rejected during validation (i.e., the rejection rate). While a general scalability analysis can be challenging, it is often possible to gain some insight into the asymptotic dependencies by making simplifying assumptions. In contrast to the coordination-free approach, we can still safely apply OCC algorithms in the absence of a scalability analysis or when simplifying assumptions do not hold. To illustrate the techniques employed in OCC scalability analysis we study the DP-Means algorithm, whose scalability limiting factor is determined by the number of points that must be serially validated. We show that the communication cost only depends on the number of clusters and processing resources and does not directly depend on the number of data points. The proof is in Appendix C. Theorem 4.3 (DP-Means Scalability). Assume N data points are generated iid to form a random number (KN) of well-spaced clusters of diameter λ: λ is an upper bound on the distances within clusters and a lower bound on the distance between clusters. Then the expected number of serially validated points is bounded above by Pb + E [KN] for P processors and b points per epoch. Under the separation assumptions of the theorem, the number of clusters present in N data points, KN, is exactly equal to the number of clusters found by DP-Means in N data points; call this latter quantity kN. The experimental results in Figure 3 suggest that the bound of Pb + kN may hold more generally beyond the assumptions above. Since the master must process at least kN points, the overhead caused by rejections is Pb and independent of N. 5 Evaluation For our experiments, we generated synthetic data for clustering (DP-means and OFL) and feature modeling (BP-means). The cluster and feature proportions were generated nonparametrically as described below. All data points were generated in R16 space. We fixed threshold parameter λ = 1. Clustering: The cluster proportions and indicators were generated simultaneously using the stickbreaking procedure for Dirichlet processes—‘sticks’ are ‘broken’ on-the-fly to generate new clusters as necessary. For our experiments, we used a fixed concentration parameter θ = 1. Cluster means were sampled µk ∼N(0, I16), and data points were generated at xi ∼N(µzi, 1 4I16). Feature modeling: We use the stick-breaking procedure of [13] to generate feature weights. Unlike with Dirichlet processes, we are unable to perform stick-breaking on-the-fly with Beta processes. Instead, we generate enough features so that with high probability (> 0.9999) the remaining non-generated features will have negligible weights (< 0.0001). The concentration parameter was also fixed at θ = 1. We generated feature means fk ∼N(0, I16) and data points xi ∼N(P k zikfk, 1 4I16). 5.1 Simulated experiments To test the efficiency of our algorithms, we simulated the first iteration (one complete pass over all the data, where most clusters / features are created and thus greatest coordination is needed) of each algorithm in MATLAB. The number of data points, N, was varied from 256 to 2560 in intervals of 256. We also varied Pb, the number of data points processed in one epoch, from 16 to 256 in powers of 2. For each value of N and Pb, we empirically measured kN, the number of accepted clusters / 6 (a) OCC DP-means (b) OCC OFL (c) OCC BP-means Figure 3: Simulated distributed DP-means, OFL and BP-means: expected number of data points proposed but not accepted as new clusters / features is independent of size of data set. features, and MN, the number of proposed clusters / features. This was repeated 400 times to obtain the empirical average ˆE[MN −kN] of the number of rejections. For OCC DP-means, we observe ˆE[MN −kN] is bounded above by Pb (Fig. 3a), and that this bound is independent of the data set size, even when the assumptions of Thm 4.3 are violated. (We also verified that similar empirical results are obtained when the assumptions are not violated; see Appendix C.) The same behavior is observed for the other two OCC algorithms (Fig. 3b and Fig. 3c). 5.2 Distributed implementation and experiments We also implemented1 the distributed algorithms in Spark [9], an open-source cluster computing system. The DP-means and BP-means algorithms were initialized by pre-processing a small number of data points (1/16 of the first Pb points)—this reduces the number of data points sent to the master on the first epoch, while still preserving serializability of the algorithms. Our Spark implementations were tested on Amazon EC2 by processing a fixed data set on 1, 2, 4, 8 m2.4xlarge instances. Ideally, to process the same amount of data, an algorithm and implementation with perfect scaling would take half the runtime on 8 machines as it would on 4, and so on. The plots in Figure 4 shows this comparison by dividing all runtimes by the runtime on one machine. DP-means: We ran the distributed DP-means algorithm on 227 ≈134M data points, using λ = 2. The block size b was chosen to keep Pb = 223 ≈8M constant. The algorithm was run for 5 iterations (complete pass over all data in 16 epochs). We were able to get perfect scaling (Figure 4a) in all but the first iteration, when the master has to perform the most synchronization of proposed centers. OFL: The distributed OFL algorithm was run on 220 ≈1M data points, using λ = 2. Unlike DP-means and BP-means, OFL is a single-pass algorithm and we did not perform any initialization clustering. The block size b was chosen such that Pb = 216 ≈66K data points are processed each epoch, which gives us 16 epochs. Figure 4b shows that we get no scaling in the first epoch, where all Pb data points are sent to the master. Scaling improves in the later epochs, as the master’s workload decreases with fewer proposals but the workers’ workload increases with more centers. BP-means: Distributed BP-means was run on 223 ≈8M data points, with λ = 1; block size was chosen such that Pb = 219 ≈0.5M is constant. Five iterations were run, with 16 epochs per iteration. As with DP-means, we were able to achieve nearly perfect scaling; see Figure 4c. 6 Related work Others have proposed alternatives to mutual exclusion and coordination-free parallelism for machine learning algorithm design. [14] proposed transforming the underlying model to expose additional parallelism while preserving the marginal posterior. However, such constructions can be challenging or infeasible and many hinder mixing or convergence. Likewise, [15] proposed a reparameterization of the underlying model to expose additional parallelism through conditional independence. Additional 1Code will be made available at our project page https://amplab.cs.berkeley.edu/projects/ccml/. 7 (a) OCC DP-means (b) OCC OFL (c) OCC BP-means Figure 4: Normalized runtime for distributed algorithms. Runtime of each iteration / epoch is divided by that using 1 machine (P = 8). Ideally, the runtime with 2, 4, 8 machines (P = 16, 32, 64) should be respectively 1/2, 1/4, 1/8 of the runtime using 1 machine. OCC DP-means and BP-means obtain nearly perfect scaling for all iterations. OCC OFL rejects a lot initially, but quickly gets better in later epochs. work similar in spirit to ours using OCC-like techniques includes [16] who proposed an approximate parallel sampling algorithm for the IBP which is made exact by introducing an additional MetropolisHastings step, and [17] who proposed a look-ahead strategy in which future samples are computed optimistically based on the likely outcomes of current samples. There has been substantial work on scalable clustering algorithms [18, 19, 20]. Several authors [11, 21, 22, 12] have proposed streaming approximation algorithms that rely on hierarchical divideand-conquer schemes. The approximation factors in these algorithms are multiplicative in the hierarchy and demand a careful tradeoff between communication and approximation quality which is obviated in the OCC framework. Several methods [12, 25, 21] first collect and then re-cluster a set of centers, and therefore need to communicate all intermediate centers. Our approach avoids these stages, since a center causes no rejections in the epochs after it is established: the rejection rate does not grow with K. Finally, the OCC framework can easily integrate and exploit many of the ideas in the cited works. 7 Discussion In this paper we have shown how optimistic concurrency control can be usefully employed in the design of distributed machine learning algorithms. As opposed to previous approaches, this preserves correctness, in most cases at a small cost. We established the equivalence of our distributed OCC DPmeans, OFL and BP-means algorithms to their serial counterparts, thus preserving their theoretical properties. In particular, the strong approximation guarantees of serial OFL translate immediately to the distributed algorithm. Our theoretical analysis ensures OCC DP-means achieves high parallelism without sacrificing correctness. We implemented and evaluated all three OCC algorithms on a distributed computing platform and demonstrate strong scalability in practice. We believe that there is much more to do in this vein. Indeed, machine learning algorithms have many properties that distinguish them from classical database operations and may allow going beyond the classic formulation of OCC. In particular we may be able to partially or probabilistically accept non-serializable operations in a way that preserves underlying algorithm invariants. Laws of large numbers and concentration theorems may provide tools for designing such operations. Moreover, the conflict detection mechanism can be treated as a control knob, allowing us to softly switch between stable, theoretically sound algorithms and potentially faster coordination-free algorithms. Acknowledgments This research is supported in part by NSF CISE Expeditions award CCF-1139158 and DARPA XData Award FA8750-12-2-0331, and gifts from Amazon Web Services, Google, SAP, Blue Goji, Cisco, Clearstory Data, Cloudera, Ericsson, Facebook, General Electric, Hortonworks, Intel, Microsoft, NetApp, Oracle, Samsung, Splunk, VMware and Yahoo!. This material is also based upon work supported in part by the Office of Naval Research under contract/grant number N00014-11-1-0688. X. Pan’s work is also supported in part by a DSO National Laboratories Postgraduate Scholarship. T. Broderick’s work is supported by a Berkeley Fellowship. 8 References [1] J. Gonzalez, Y. Low, A. Gretton, and C. Guestrin. Parallel Gibbs sampling: From colored fields to thin junction trees. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 324–332, 2011. [2] Yucheng Low, Joseph Gonzalez, Aapo Kyrola, Danny Bickson, Carlos Guestrin, and J. M. Hellerstein. Distributed GraphLab: A framework for machine learning and data mining in the cloud. In Proceedings of the 38th International Conference on Very Large Data Bases (VLDB, Istanbul, 2012. [3] Benjamin Recht, Christopher Re, Stephen J. Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems (NIPS) 24, pages 693–701, Granada, 2011. [4] Amr Ahmed, Mohamed Aly, Joseph Gonzalez, Shravan Narayanamurthy, and Alexander J. Smola. Scalable inference in latent variable models. In Proceedings of the 5th ACM International Conference on Web Search and Data Mining (WSDM), 2012. [5] Hsiang-Tsung Kung and John T Robinson. On optimistic methods for concurrency control. ACM Transactions on Database Systems (TODS), 6(2):213–226, 1981. [6] Brian Kulis and Michael I. Jordan. Revisiting k-means: New algorithms via Bayesian nonparametrics. In Proceedings of 29th International Conference on Machine Learning (ICML), Edinburgh, 2012. [7] Tamara Broderick, Brian Kulis, and Michael I. Jordan. MAD-bayes: MAP-based asymptotic derivations from Bayes. In Proceedings of the 30th International Conference on Machine Learning (ICML), 2013. [8] Leslie G. Valiant. A bridging model for parallel computation. Communications of the ACM, 33(8):103–111, 1990. [9] Matei Zaharia, Mosharaf Chowdhury, Michael J Franklin, Scott Shenker, and Ion Stoica. Spark: Cluster computing with working sets. In Proceedings of the 2nd USENIX Conference on Hot Topics in Cloud Computing, 2010. [10] A. Meyerson. Online facility location. In Proceedings of the 42nd Annual Symposium on Foundations of Computer Science (FOCS), Las Vegas, 2001. [11] A. Meyerson, N. Mishra, R. Motwani, and L. O’Callaghan. Clustering data streams: Theory and practice. IEEE Transactions on Knowledge and Data Engineering, 15(3):515–528, 2003. [12] N. Ailon, R. Jaiswal, and C. Monteleoni. Streaming k-means approximation. In Advances in Neural Information Processing Systems (NIPS) 22, Vancouver, 2009. [13] John Paisley, David Blei, and Michael I Jordan. Stick-breaking Beta processes and the Poisson process. In Proceedings of the 15th International Conference on Artificial Intelligence and Statistics (AISTATS), 2012. [14] D. Newman, A. Asuncion, P. Smyth, and M. Welling. Distributed inference for Latent Dirichlet Allocation. In Advances in Neural Information Processing Systems (NIPS) 20, Vancouver, 2007. [15] D. Lovell, J. Malmaud, R. P. Adams, and V. K. Mansinghka. ClusterCluster: Parallel Markov chain Monte Carlo for Dirichlet process mixtures. ArXiv e-prints, April 2013. [16] F. Doshi-Velez, D. Knowles, S. Mohamed, and Z. Ghahramani. Large scale nonparametric Bayesian inference: Data parallelisation in the Indian Buffet process. In Advances in Neural Information Processing Systems (NIPS) 22, Vancouver, 2009. [17] Tianbing Xu and Alexander Ihler. Multicore Gibbs sampling in dense, unstructured graphs. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics (AISTATS). 2011. [18] I. Dhillon and D.S. Modha. A data-clustering algorithm on distributed memory multiprocessors. In Workshop on Large-Scale Parallel KDD Systems, 2000. [19] A. Das, M. Datar, A. Garg, and S. Ragarajam. Google news personalization: Scalable online collaborative filtering. In Proceedings of the 16th World Wide Web Conference, Banff, 2007. [20] A. Ene, S. Im, and B. Moseley. Fast clustering using MapReduce. In Proceedings of the 17th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, San Diego, 2011. [21] M. Shindler, A. Wong, and A. Meyerson. Fast and accurate k-means for large datasets. In Advances in Neural Information Processing Systems (NIPS) 24, Granada, 2011. [22] Moses Charikar, Liadan O’Callaghan, and Rina Panigrahy. Better streaming algorithms for clustering problems. In Proceedings of the 35th Annual ACM Symposium on Theory of Computing (STOC), 2003. [23] Mihai Bˇadoiu, Sariel Har-Peled, and Piotr Indyk. Approximate clustering via core-sets. In Proceedings of the 34th Annual ACM Symposium on Theory of Computing (STOC), 2002. [24] D. Feldman, A. Krause, and M. Faulkner. Scalable training of mixture models via coresets. In Advances in Neural Information Processing Systems (NIPS) 24, Granada, 2011. [25] B. Bahmani, B. Moseley, A. Vattani, R. Kumar, and S. Vassilvitskii. Scalable kmeans++. In Proceedings of the 38th International Conference on Very Large Data Bases (VLDB), Istanbul, 2012. 9
2013
253
4,991
Statistical analysis of coupled time series with Kernel Cross-Spectral Density operators. Michel Besserve MPI for Intelligent Systems and MPI for Biological Cybernetics, T¨ubingen, Germany michel.besserve@tuebingen.mpg.de Nikos K. Logothetis MPI for Biological Cybernetics, T¨ubingen nikos.logothetis@tuebingen.mpg.de Bernhard Sch¨olkopf MPI for Intelligent Systems, T¨ubingen bs@tuebingen.mpg.de Abstract Many applications require the analysis of complex interactions between time series. These interactions can be non-linear and involve vector valued as well as complex data structures such as graphs or strings. Here we provide a general framework for the statistical analysis of these dependencies when random variables are sampled from stationary time-series of arbitrary objects. To achieve this goal, we study the properties of the Kernel Cross-Spectral Density (KCSD) operator induced by positive definite kernels on arbitrary input domains. This framework enables us to develop an independence test between time series, as well as a similarity measure to compare different types of coupling. The performance of our test is compared to the HSIC test using i.i.d. assumptions, showing improvements in terms of detection errors, as well as the suitability of this approach for testing dependency in complex dynamical systems. This similarity measure enables us to identify different types of interactions in electrophysiological neural time series. 1 Introduction Complex dynamical systems can often be observed by monitoring time series of one or more variables. Finding and characterizing dependencies between several of these time series is key to understand the underlying mechanisms of these systems. This problem can be addressed easily in linear systems [4], however non-linear systems are much more challenging. Whereas higher order statistics can provide helpful tools in specific contexts [15], and have been extensively used in system identification, causal inference and blind source separation (see for example [10, 13, 5]); it is difficult to derive a general approach with solid theoretical results accounting for a broad range of interactions. Especially, studying the relationships between time series of arbitrary objects such as texts or graphs within a general framework is largely unaddressed. On the other hand, the dependency between independent identically distributed (i.i.d.) samples of arbitrary objects can be studied elegantly in the framework of positive definite kernels [19]. It relies on defining cross-covariance operators between variables mapped implicitly to Reproducing Kernel Hilbert Spaces (RKHS) [7]. It has been shown that when using a characteristic kernel for the mapping [9], the properties of RKHS operators are related to statistical independence between input variables and allow testing for it in a principled way with the Hilbert-Schmidt Independence Criterion (HSIC) test [11]. However, the suitability of this test relies heavily on the assumption that i.i.d. samples of random variables are used. This assumption is obviously violated in any nontrivial setting involving time series, and as a consequence trying to use HSIC in this context can lead to incorrect conclusions. Zhang et al. established a framework in the context of Markov chains 1 [22], showing that a structured HSIC test still provides good asymptotic properties for absolutely regular processes. However, this methodology has not been assessed extensively in empirical time series. Moreover, beyond the detection of interactions, it is important to be able to characterize the nature of the coupling between time series. It was recently suggested that generalizing the concept of cross-spectral density to Reproducible Kernel Hilbert Spaces (RKHS) could help formulate nonlinear dependency measures for time series [2]. However, no statistical assessment of this measure has been established. In this paper, after recalling the concept of kernel spectral density operator, we characterize its statistical properties. In particular, we define independence tests based on this concept as well as a similarity measure to compare different types of couplings. We use these tests in section 4 to compute the statistical dependencies between simulated time series of various types of objects, as well as recordings of neural activity in the visual cortex of non-human primates. We show that our technique reliably detects complex interactions and provides a characterization of these interactions in the frequency domain. 2 Background and notations Random variables in Reproducing Kernel Hilbert Spaces Let X1 and X2 be two (possibly non vectorial) input domains. Let k1(., .) : X1 × X1 →C and k2(., .) : X2 × X2 →C be two positive definite kernels, associated to two separable Hilbert spaces of functions, H1 and H2 respectively. For i ∈{1, 2}, they define a canonical mapping from x ∈Xi to x = ki(., x) ∈Hi, such that ∀f ∈Hi, f(x) = f, x Hi (see [19] for more details). In the same way, this mapping can be extended to random variables, so that the random variable Xi ∈Xi is mapped to the random element Xi ∈Hi. Statistical objects extending the classical mean and covariance to random variables in the RKHS are defined as follows: • the Mean Element (see [1, 3]): µi = E [Xi] , • the Cross-covariance operator (see [6]): Cij = Cov [Xi, Xj] = E[Xi ⊗X∗ j] −µi ⊗µ∗ j , where we use the tensor product notation f ⊗g∗to represent the rank one operator defined by f ⊗g∗= g, . f (following [3]). As a consequence, the cross-covariance can be seen as an operator in L(Hj, Hi), the Hilbert space of linear Hilbert-Schmidt operators from Hj to Hi (isomorphic to Hi ⊗H∗ j). Interestingly, the link between Cij and covariance in the input domains is given by the Hilbert-Schmidt scalar product Cij, fi ⊗f ∗ j HS = Cov [fi(Xi), fj(Xj)] , ∀(fi, fj) ∈Hi ⊗Hj Moreover, the Hilbert-Schmidt norm of the operator in this space has been proved to be a measure of independence between two random variables, whenever kernels are characteristic [11]. Extension of this result has been provided in [22] for Markov chains. If the time series are assumed to be k-order Markovian, then results of the classical HSIC can be generalized for a structured HSIC using universal kernels based on the state vectors (x1(t), . . . , x1(t + k), x2(t), . . . , x2(t + k)). The statistical performance of this methodology has not been studied extensively, in particular its sensitivity to the dimension of the state vector. The following sections propose an alternative methodology. Kernel Cross-Spectral Density operator Consider a bivariate discrete time random process on X1 × X2 : {(X1(t), X2(t))}t∈Z. We assume stationarity of the process and thus use the following translation invariant notations for the mean elements and cross-covariance operators: EXi(t) = µi, Cov [Xi(t + τ), Xj(t)] = Cij(τ) The cross-spectral density operator was introduced for stationary signals in [2] based on second order cumulants. Under mild assumptions, it is a Hilbert-Schmidt operator defined for all normalized frequencies ν ∈[0 ; 1] as: S12(ν) = X k∈Z C12(k) exp(−k2πν) = X k∈Z C12(k)z−k, for z = e2πiν. 2 This object summarizes all the cross-spectral properties between the families of processes {f(X1)}f∈H1 and {g(X2)}g∈H2 in the sense that the cross-spectrum between f(X1) and g(X2) is given by Sf,g 12 (ν) = f, S12g . We therefore refer to this object as the Kernel Cross-Spectral Density operator (KCSD). 3 Statistical properties of KCSD Measuring independence with the KCSD One interesting characteristic of the KCSD is given by the following theorem [2]: Theorem 1. Assume the kernels k1 and k2 are characteristic [9]. The processes X1 and X2 are pairwise independent (i.e. for all integers t and t’, X1(t) and X2(t′) are independent), if and only if S12(ν) HS = 0, ∀ν ∈[0 , 1]. While this theorem states that KCSD can be used to test pairwise independence between time series, it does not imply independence between arbitrary sets of random variables taken from each time series in general. However, if the joint probability distribution of the time series is encoded by a Directed Acyclic Graph (DAG), the following Theorem shows that independence in this broader sense is achieved under mild assumptions. Proposition 2. If the joint probability distribution of time series is encoded by a DAG with no confounder under the Markov property and faithfulness assumption, pairwise independence between time series implies the mutual independence relationship {X1(t)}t∈Z ⊥⊥{X2(t)}t∈Z. Proof. The proof uses the fact that the faithfulness and Markov property assumptions provide an equivalence between the independence of two sets of random variables and the d-separation of the corresponding sets of nodes in the DAG (see [17]). We start by assuming pairwise independence between the time series. For arbitrary times t and t′, assume the DAG contains an arrow linking the nodes X1(t) and X2(t′). This is an unblocked path linking this two nodes; thus they are not d-separated. As a consequence of faithfulness, X1(t) and X2(t′) are not independent. Since this contradicts our initial assumptions, there cannot exist any arrow between X1(t) and X2(t′). Since this holds for all t and t′, there is no path linking the nodes of each time series and we have {X1(t)}t∈Z ⊥⊥{X2(t)}t∈Z according to the Markov property (any joint probability distribution on the nodes will factorize in two terms, one for each time series). As a consequence, the use of KCSD to test for independence is justified under the widely used faithfulness and Markov assumptions of graphical models. As a comparison, the structured HSIC proposed in [22] is theoretically able to capture all dependencies within the range of k samples by assuming k-order Markovian time series. Fourth order kernel cumulant operator Statistical properties of KCSD require assumptions regarding the higher order statistics of the time series. Analogously to covariance, higher order statistics can be generalized as operators in (tensor products of) RKHSs. An important example in our setting is the joint quadricumulant (4th order cumulant) (see [4]). We skip the general expression of this cumulant to focus on its simplified form for four centered scalar random variables: κ(X1, X2, X3, X4) = E[X1X2X3X4] −E[X1X2]E[X3X4] −E[X1X3]E[X2X4] −E[X1X4]E[X2X3] (1) This object can be generalized to the case random variables mapped in two RKHSs. The quadricumulant operator K1234 is a linear operator in the Hilbert space L(H1 ⊗H∗ 2, H1 ⊗H∗ 2), such that κ(f1(X1),f2(X2),f3(X3),f4(X4)) = f1⊗f ∗ 2 ,K1234f3⊗f ∗ 4 , for arbitrary elements fi. The properties of this operator will be useful in the next sections due to the following lemma. Lemma 3. [Property of the tensor quadricumulant] Let Xc 1, Xc 3 be centered random elements in the Hilbert space H1 and Xc 2, Xc 4 centered random elements in H2 (the centered random element is defined by Xc i = Xj −µj), then E  Xc 1, Xc 3 H1 Xc 2, Xc 4 H2  = Tr K1234 + C1,2, C3,4 + Tr C1,3 Tr C2,4 + C1,4, C3,2 3 In the case of two jointly stationary time series, we define the translation invariant quadricumulant between the two stationary time series as: K12(τ1, τ2, τ3) = K1234(X1(t + τ1), X2(t + τ2), X1(t + τ3), X2(t)) Estimation with the Kernel Periodogram In the following, we address the problem of estimating the properties of cross-spectral density operators from finite samples. The idea for doing this analytically is to select samples from a time-series with a tapering window function w : R 7→R with a support included in [0, 1]. By scaling this window according to wT (k) = w(k/T), and multiplying it with the time series, T samples of the sequence can be selected. The windowed periodogram estimate of the KCSD operator for T successive samples of the time series is PT 12(ν)= 1 T ∥w∥2 FT [Xc 1](ν)⊗FT [Xc 2](ν)∗, with Xc i(k) = Xi(k) −µi and ∥w∥2 = ˆ 1 0 w2(t)dt where FT [Xc 1] = PT k=1wT (k)(Xc 1(k))z−k, for z = e2πiν, is the windowed Fourier transform of the delayed time series in the RKHS. Properties of the windowed Fourier transform are related to the regularity of the tapering window. In particular, we will chose a tapering window of bounded variation. In such a case, the following lemma holds (see supplementary material for the proof). Lemma 4. [A property of bounded variation functions] Let w be a bounded function of bounded variation then for all k, P+∞ t=−∞wT (t + k)w(t) −P+∞ t=−∞wT (t)2 ≤C|k| Using this assumption, the above periodogram estimate is asymptotically unbiased as shown in the following theorem Theorem 5. Let w be a bounded function of bounded variation, if P k∈Z |k|∥C12(k)∥HS < +∞, P k∈Z |k| Tr(Cii(k)) < +∞and P (k,i,j)∈Z3 Tr [K12(k, i, j)] < +∞, then lim T →+∞E PT 12(ν) = S12(ν), ν ̸≡0 (mod 1/2) Proof. By definition, PT 12(z)= 1 T ∥w∥2 P k∈Z wT (k)Xc 1(k)z−k ⊗ P n∈Z wT (n)Xc 2(n)z−n∗ = 1 T ∥w∥2 P k∈Z P n∈Z zn−kwT (k)wT (n)Xc 1(k)⊗Xc 2(n)∗ = 1 T ∥w∥2 P δ∈Z z−δ P n∈Z wT (n + δ)wT (n)Xc 1(n + δ)⊗Xc 2(n)∗, using δ = k −n. Thus using Lemma 4, E PT 12(z) = 1 T ∥w∥2 P δ∈Z z−δ(P n∈Z wT (n)2 + O(|δ|))C12(δ) = 1 ∥w∥2 (P n∈Z wT (n)2 T ) P δ∈Z z−δC12(δ)+ 1 T O(P δ∈Z |δ| C12(δ) HS) → T →+∞S12. However, the squared Hilbert-Schmidt norm of PT 12(ν) is an asymptotically biased estimator of the population KCSD squared norm according to the following theorem. Theorem 6. Under the assumptions of Theorem 5, for ν ̸≡0 (mod 1/2) lim T →+∞E PT 12(ν) 2 HS = S12(ν) 2 HS + Tr(S11(ν)) Tr(S22(ν)) The proof of Theorem 5 is based on the decomposition in Lemma 3 and is provided in supplementary information. This estimate requires specific bias estimation techniques to develop an independence test, we will call it the biased estimate of the KCSD squared norm. Having the KCSD defined in an Hilbert space also enables to define similarity between two KCSD operators, so that it is possible to compare quantitatively whether different dynamical systems have similar couplings. The following theorem shows how periodograms enable to estimate the scalar product between two KCSD operators, which reflects their similarity. 4 Theorem 7. Assume assumptions of Theorem 5 hold for two independent samples of bivariate time series{(X1(t), X2(t))}t=...,−1,0,1,... and {(X3(t), X4(t))}t=...,−1,0,1,..., mapped with the same couple of reproducing kernels. Then lim T →+∞E PT 12(ν), PT 34(ν) HS = S12(ν), S34(ν) HS, ν ̸≡0 (mod 1/2) The proof of Theorem 7 is similar to the one of Theorem 6 provided as supplemental information. Interestingly, this estimate of the scalar product between KCSD operators is unbiased. This comes from the assumption that the two bivariate series are independent. This provides a new opportunity to estimate the Hilbert-Schmidt norm as well, in case two independent samples of the same bivariate series are available. Corollary 8. Assume assumptions of Theorem 5 hold for the bivariate time series {(X1(t), X2(t))}t∈Z and assume {( ˜X1(t), ˜X2(t))}t∈Zan independent copy of the same time series, providing the periodogram estimates PT 12(ν) and ˜PT 12(ν), respectively. Then lim T →+∞E PT 12(ν), ˜PT 12(ν) HS = S12(ν) 2 HS, ν ̸≡0 (mod 1/2) In many experimental settings, such as in neuroscience, it is possible to measure the same time series in several independent trials. In such a case, corollary 8 states that estimating the Hilbert-Schmidt norm of the KCSD without bias is possible using two intependent trials. We will call this estimate the unbiased estimate of the KCSD squared norm. These estimate can be computed efficiently for T equispaced frequency samples using the fast Fourier transform of the centered kernel matrices of the two time series. In general, the choice of the kernel is a trade-off between the capacity to capture complex dependencies (a characteristic kernel being better in this respect), and the convergence rate of the estimate (simpler kernels related to lower order statistics usually require less samples). Related theoretical analysis can be found in [8, 12]. Unless otherwise stated, the Gaussian RBF kernel with bandwidth parameter σ, k(x, y) = exp(∥x −y∥2 /2σ2), will be used as a characteristic kernel for vector spaces. Let Kij denote the kernel matrix between the i-th and j-th time series (such that (Kij)k,l = k(xi(k), xj(l))), W the windowing matrix (such that (W)k,l = wT (k)wT (l)) and M be the centering matrix M = I −1T 1T T /T, then we can define the windowed centered kernel matrices ˜Kij = (MKijM) ◦W. Defining the Discrete Fourier Transform matrix F, such that (F)k,l = exp(−i2πkl/T)/ √ T, the estimated scalar product is PT 12, PT 34 ν=(0,1,...,(T −1))/T = ∥w∥−4 diag F ˜K13F−1 ◦diag F−1 ˜K24F  , which can be efficiently computed using the Fast Fourier Transform (◦is the Hadamard product). The biased and unbiased squared norm estimates can be trivially retrieved from the above expression. Shuffling independence tests According to Theorem 1, pairwise independence between time series requires the cross-spectral density operator to be zero for all frequencies. We can thus test independence by testing whether the Hilbert-Schmidt norm of the operator vanishes for each frequency. We rely on Theorem 6 and Corollary 8 to compute biased and unbiased estimates of this norm. To achieve this, we generate a distribution of the Hilbert-Schmidt norm statistics under the null hypothesis by cutting the time interval in non-overlapping blocks and matching the blocks of each time series in pairs at random. Due to the central limit theorem, for a sufficiently large number of time windows, the empirical average of the statistics approaches a Gaussian distribution. We thus test whether the empirical mean differs from the one under the null distribution using a t-statistic. To prevent false positive resulting from multiple hypothesis testing, we control the Family-wise Error Rate (FWER) of the tests performed for each frequency. Following [16], we estimate a global maximum distribution on the family of t-statistics across frequencies under the null hypothesis, and use the percentile of this distribution to assess the significance of the original t-statistics. 5 frequency (Hz) biased unbiased Squared norm estimate: linear kernel frequency (Hz) biased unbiased Squared norm estimate: RBF kernel 0 0.5 1 1.5 −4 −2 0 2 4 20 40 60 80 100 block hsic hsic linear kcsd kcsd 0 20 40 60 80 100 type I (C=0) type II (C=.4) type II (C=2) error rate (%) time (s) number of samples number of dependencies detected (%) Detection probability for biased kcsd number of samples 10 2 10 3 0 0.2 0.4 0.6 0.8 1 Detection probability for unbiased kcsd number of dependencies detected (%) 10 2 10 3 0 0.2 0.4 0.6 0.8 1 linear rbf σ=.1 .2 .63 1.5 3.9 10 0 5 10 15 20 25 30 −0.1 0 0.1 0.2 0.3 0 5 10 15 20 25 30 −0.05 0 0.05 0.1 0.15 Figure 1: Results for the phase-amplitude coupling system. Top-left: example time course. Topmiddle: estimate of the KCSD squared norm with a linear kernel. Top-right: estimate of the KCSD squared norm with an RBF kernel. Bottom-left: performance of the biased kcsd test as a function of number of samples. Bottom-middle: performance of the unbiased kcsd test as a function of number of samples. Bottom-right: Rate of type I and type II errors for several independence tests. 4 Experiments In the following, we validate the performance of our test, called kcsd, on several datasets in the biased and unbiased case. There is no general time series analysis tool in the literature to compare with our approach on all these datasets. So our main source of comparison will be the HSIC test of independence (assuming data is i.i.d.). This enables us, to compare both approaches using the same kernels. For vector data, one can compare the performance of our approach with a linear dependency measure: we do this by implementing our test using a linear kernel (instead of an RBF kernel), and we call it linear kscd. Finally, we use the alternative approach of structured HSIC [22] by cutting the time series in time windows (using the same approach as our independence test) and considering each of them as a single multivariate sample. This will be called block hsic. The bandwidth of the HSIC methods is chosen proportional to the median norm of the sample points in the vector space. The p-value for all independence tests will be set to 5%. Phase amplitude coupling We first simulate a non-linear dependency between two time series by generating two oscillations at frequencies f1 and f2 , and introducing a modulation of the amplitude of the second oscillation by the phase of the first one. This is achieved using the following discrete time equations:  ϕ1(k + 1) = ϕ1(k) + .1ϵ1(k) + 2πf1Ts ϕ2(k + 1) = ϕ2(k) + .1ϵ2(k) + 2πf2Ts  x1(k) = cos(ϕ1(k)) x2(k) = (2 + C sin ϕ1(k)) cos(ϕ2(k)) Where the ϵi are i.i.d normal. A simulation with f1 = 4Hz and f2 = 20Hz for a sampling frequency 1/Ts=100Hz is plotted on Figure 1 (top-left panel). For the parameters of the periodogram, we used a window length of 50 samples (.5 s). We used a Gaussian RBF kernel to compute nonlinear dependencies between the two time series after standardizing each of them (divide them by their standard deviation). The top-middle and top-right panels of Figure 1 plot the mean and standard errors of the estimate of the squared Hilbert-Schmidt norm for this system (for C = .1) for a linear and a Gaussian RBF kernel (with σ = 1) respectively. The bias of the first estimate appears clearly in both cases at the two power picks of the signals for the biased estimate. In the second (unbiased) estimate, the spectrum exhibits a zero mean for all but one peak (at 4Hz for the RBF kernel), which corresponds to the expected frequency of non-linear interaction between the time series. The observed negative values are also a direct consequence of the unbiased property of our estimate (Corollary 8). The influence of the bandwidth parameter of the kernel was studied in the case of weakly coupled time series (C = .4 ). The bottom left and middle panels of Figure 1 show 6 1 2 3 .1 .1 .1 .2 .4 .7 .5 .7 .2 1 2 3 .1 .1 .1 .2 .6 .01 .3 .7 .89 Transition probabilities 0 1 2 3 4 −0.5 0 0.5 state 1 state 2 state 3 time (s) block hsic hsic kcsd 0 20 40 60 80 100 error rate (%) type I error type II error biased unbiased frequency (Hz) KCSD norm estimate 0.1 0.2 0.5 1 2 5 10 20 0 5 10 15 20 Figure 2: Markov chain dynamical system. Upper left: Markov transition probabilities, fluctuating between the values indicated in both graphs. Upper right: example of simulated time series. Bottom left: the biased and unbiased KCSD norm estimates in the frequency domain. Bottom right: type I and type II errors for hsic and kcsd tests the influence of this parameter on the number of samples required to actually reject the null hypothesis and detect the dependency for biased and unbiased estimates respectively. It was observed that choosing an hyper-parameter close to the standard deviation of the signal (here 1.5) was an optimal strategy, and that the test relying on the unbiased estimate outperformed the biased estimate. We thus used the unbiased estimate in our subsequent analysis. The coupling parameter C was further varied to test the performance of independence tests both in case the null hypothesis of independence is true (C=0), and when it should be rejected (C = .4 for weak coupling, C = 2 for strong coupling). These two settings enable to quantify the type I and type II error of the tests, respectively. The bottom-right panel of Figure 1 reports these errors for several independence tests. Showing the superiority of our method especially for type II errors. In particular, methods based on HSIC fail to detect weak dependencies in the time series. Time varying Markov chain We now illustrate the use of our test in an hybrid setting. We generate a symbolic time series x2 using the alphabet S = [1, 2, 3], controlled by a scalar time series x1. The coupling is achieved by modulating across time the transition probabilities of the Markov transition matrix generating the symbolic time series x2 using the current value of the scalar time series x1 . This model is described by the following equations with f1 = 1Hz. ( ϕ1(k + 1) = ϕ1(k) + .1ϵ1(k) + 2πf1Ts x1(k + 1) = sin(ϕ1(k + 1)) p(x2(k + 1) = Si|x2(k) = Sj) = Mij + ∆Mijx1(k) Since x1 is bounded between -1 and 1, the Markov transition matrix fluctuates across time between two models represented Figure 2 (top-left panel). A model without these fluctuations (∆M = 0) was simulated as well to measure type I error. The time course of such an hybrid system is illustrated on the top-right panel of the same figure. In order to measure the dependency between these two time series, we use a k-spectrum kernel [14] for x2 and a RBF kernel for x1 . For the k-spectrum kernel, we use k=2 (using k=1, i.e. counting occurrences of single symbols was less efficient) and we computed the kernel between words of 3 successive symbols of the time series. We used an RBF kernel with σ = 1, decimated the signals by a factor 2 and signals were cut in time windows of 100 samples. The biased and unbiased estimates of the KCSD norm are represented at the bottom-left of Figure 2 and show a clear peak at the modulating frequency (1Hz). The independence test results shown at the bottom-right of Figure 2 illustrate again the superiority of KCSD for type II error, whereas type I error stays in an acceptable range. 7 Figure 3: Left: Experimental setup of LFP recordings in anesthetized monkey during visual stimulation with a movie. Right: Proportion of detected dependencies for the unbiased kcsd test of interactions between Gamma band and wide band LFP for different kernels. Neural data: local field potentials from monkey visual cortex We analyzed dependencies between local field potential (LFP) time series recorded in the primary visual cortex of one anesthetized monkey during visual stimulation by a commercial movie (see Figure 3 for a scheme of the experiment). LFP activity reflects the non-linear interplay between a large variety of underlying mechanisms. Here we investigate this interplay by extracting LFP activity in two frequency bands within the same electrode and quantify the non-linear interactions between them with our approach. LFPs were filtered into two frequency bands: 1/ a wide band ranging from 1 to 100Hz which contains a rich variety of rhythms and 2/ a high gamma band ranging from 60 to 100Hz which as been shown to play a role in the processing of visual information. Both of these time series were sampled at 1000Hz. Using non-overlapping time windows of 1s points, we computed the Hilbert-Schmidt norm of the KCSD operator between gamma and large band time series originating from the same electrode. We performed statistical testing for all frequencies between 1 and 500Hz (using a Fourier transform on 2048 points). The results of the test averaged over all recording sites is plotted on Figure 3. We observe a highly reliable detection of interactions in the gamma band, using either a linear or non-linear kernel. This is due to the fact that the Gamma band LFP is a filtered version of the wide band LFP, making these signals highly correlated in the Gamma band. However, in addition to this obvious linear dependency, we observe significant interactions in the lowest frequencies (0.5-2Hz) which can not be explained by linear interaction (and is thus not detected by the linear kernel). This characteristic illustrates the non-linear interaction between the high frequency gamma rhythm and other lower frequencies of the brain electrical activity, which has been reported in other studies [21]. This also shows the interpretability of our approach as a test of non-linear dependency in the frequency domain. 5 Conclusion An independence test for time series based on the concept of Kernel Cross Spectral Density estimation was introduced in this paper. It generalizes the linear approach based on the Fourier transform in several respects. First, it allows quantification of non-linear interactions for time series living in vector spaces. Moreover, it can measure dependencies between more complex objects, including sequences in an arbitrary alphabet, or graphs, as long as an appropriate positive definite kernel can be defined in the space of each time series. This paper provides asymptotic properties of the KCSD estimates, as well as an efficient approach to compute them on real data. The space of KCSD operators constitutes a very general framework to analyze dependencies in multivariate and highly structured dynamical systems. Following [13, 18], our independence test can further be combined to recent developments in kernel time series prediction techniques [20] to define general and reliable multivariate causal inference techniques. Acknowledgments. MB is grateful to Dominik Janzing for fruitful discussions and advice. 8 References [1] A. Berlinet and C. Thomas-Agnan. Reproducing kernel Hilbert spaces in probability and statistics. Kluwer Academic Boston, 2004. [2] M. Besserve, D. Janzing, N. Logothetis, and B. Sch¨olkopf. Finding dependencies between frequencies with the kernel cross-spectral density. In IEEE International Conference on Acoustics, Speech and Signal Processing, pages 2080–2083, 2011. [3] G. Blanchard, O. Bousquet, and L. Zwald. Statistical properties of kernel principal component analysis. Machine Learning, 66(2-3):259–294, 2007. [4] D. Brillinger. Time series: data analysis and theory. Holt, Rinehart, and Winston, New York, 1974. [5] J.-F. Cardoso. High-order contrasts for independent component analysis. Neural computation, 11(1):157– 192, 1999. [6] K. Fukumizu, F. Bach, and A. Gretton. Statistical convergence of kernel CCA. In Advances in Neural Information Processing Systems 18, pages 387–394, 2006. [7] K. Fukumizu, F. Bach, and M. Jordan. Dimensionality reduction for supervised learning with reproducing kernel Hilbert spaces. J. Mach. Learn. Res., 5:73–99, 2004. [8] K. Fukumizu, A. Gretton, G. R. Lanckriet, B. Sch¨olkopf, and B. K. Sriperumbudur. Kernel choice and classifiability for RKHS embeddings of probability distributions. In Advances in Neural Information Processing Systems 21, pages 1750–1758, 2009. [9] K. Fukumizu, A. Gretton, X. Sun, and B. Sch¨olkopf. Kernel Measures of Conditional Dependence. In Advances in Neural Information Processing Systems 20, pages 489–496, 2008. [10] G. B. Giannakis and J. M. Mendel. Identification of nonminimum phase systems using higher order statistics. Acoustics, Speech and Signal Processing, IEEE Transactions on, 37(3):360–377, 1989. [11] A. Gretton, K. Fukumizu, C. Teo, L. Song, B. Sch¨olkopf, and A. Smola. A kernel statistical test of independence. In Advances in Neural Information Processing Systems 20, pages 585–592. 2008. [12] A. Gretton, D. Sejdinovic, H. Strathmann, S. Balakrishnan, M. Pontil, K. Fukumizu, and B. K. Sriperumbudur. Optimal kernel choice for large-scale two-sample tests. In Advances in Neural Information Processing Systems 25, pages 1214–1222, 2012. [13] A. Hyv¨arinen, S. Shimizu, and P. O. Hoyer. Causal modelling combining instantaneous and lagged effects: an identifiable model based on non-gaussianity. In Proceedings of the 25th International Conference on Machine Learning, pages 424–431. ACM, 2008. [14] C. Leslie, E. Eskin, and W. Noble. The spectrum kernel: a string kernel for SVM protein classification. In Pac Symp Biocomput., 2002. [15] C. Nikias and A. Petropulu. Higher-Order Spectra Analysis - A Non-linear Signal Processing Framework. Prentice-Hall PTR, Englewood Cliffs, NJ, 1993. [16] D. Pantazis, T. Nichols, S. Baillet, and R. Leahy. A comparison of random field theory and permutation methods for the statistical analysis of MEG data. NeuroImage, 25:383 – 394, 2005. [17] J. Pearl. Causality - Models, Reasoning, and Inference. Cambridge University Press, Cambridge, UK, 2000. [18] J. Peters, D. Janzing, and B. Sch¨olkopf. Causal inference on time series using structural equation models. In Advances in Neural Information Processing Systems 26, 2013. [19] B. Sch¨olkopf and A. J. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [20] V. Sindhwani, H. Q. Minh, and A. C. Lozano. Scalable matrix-valued kernel learning for high-dimensional nonlinear multivariate regression and granger causality. In Proceedings of the 29th Conference on Uncertainty in Artificial Intelligence, 2013. [21] K. Whittingstall and N. K. Logothetis. Frequency-band coupling in surface EEG reflects spiking activity in monkey visual cortex. Neuron, 64:281–9, 2009. [22] X. Zhang, L. Song, A. Gretton, and A. Smola. Kernel Measures of Independence for Non-IID Data. In Advances in Neural Information Processing Systems 21, pages 1937–1944, 2009. 9
2013
254
4,992
Sinkhorn Distances: Lightspeed Computation of Optimal Transport Marco Cuturi Graduate School of Informatics, Kyoto University mcuturi@i.kyoto-u.ac.jp Abstract Optimal transport distances are a fundamental family of distances for probability measures and histograms of features. Despite their appealing theoretical properties, excellent performance in retrieval tasks and intuitive formulation, their computation involves the resolution of a linear program whose cost can quickly become prohibitive whenever the size of the support of these measures or the histograms’ dimension exceeds a few hundred. We propose in this work a new family of optimal transport distances that look at transport problems from a maximumentropy perspective. We smooth the classic optimal transport problem with an entropic regularization term, and show that the resulting optimum is also a distance which can be computed through Sinkhorn’s matrix scaling algorithm at a speed that is several orders of magnitude faster than that of transport solvers. We also show that this regularized distance improves upon classic optimal transport distances on the MNIST classification problem. 1 Introduction Choosing a suitable distance to compare probabilities is a key problem in statistical machine learning. When little is known on the probability space on which these probabilities are supported, various information divergences with minimalistic assumptions have been proposed to play that part, among which the Hellinger, χ2, total variation or Kullback-Leibler divergences. When the probability space is a metric space, optimal transport distances (Villani, 2009, §6), a.k.a. earth mover’s (EMD) in computer vision (Rubner et al., 1997), define a more powerful geometry to compare probabilities. This power comes, however, with a heavy computational price tag. No matter what the algorithm employed – network simplex or interior point methods – the cost of computing optimal transport distances scales at least in O(d3log(d)) when comparing two histograms of dimension d or two point clouds each of size d in a general metric space (Pele and Werman, 2009, §2.1). In the particular case that the metric probability space of interest can be embedded in Rn and n is small, computing or approximating optimal transport distances can become reasonably cheap. Indeed, when n = 1, their computation only requires O(d log d) operations. When n ≥2, embeddings of measures can be used to approximate them in linear time (Indyk and Thaper, 2003; Grauman and Darrell, 2004; Shirdhonkar and Jacobs, 2008) and network simplex solvers can be modified to run in quadratic time (Gudmundsson et al., 2007; Ling and Okada, 2007). However, the distortions of such embeddings (Naor and Schechtman, 2007) as well as the exponential increase of costs incurred by such modifications as n grows make these approaches inapplicable when n exceeds 4. Outside of the perimeter of these cases, computing a single distance between a pair of measures supported by a few hundred points/bins in an arbitrary metric space can take more than a few seconds on a single CPU. This issue severely hinders the applicability of optimal transport distances in large-scale data analysis and goes as far as putting into question their relevance within the field of machine learning, where high-dimensional histograms and measures in high-dimensional spaces are now prevalent. 1 We show in this paper that another strategy can be employed to speed-up optimal transport, and even potentially define a better distance in inference tasks. Our strategy is valid regardless of the metric characteristics of the original probability space. Rather than exploit properties of the metric probability space of interest (such as embeddability in a low-dimensional Euclidean space) we choose to focus directly on the original transport problem, and regularize it with an entropic term. We argue that this regularization is intuitive given the geometry of the optimal transport problem and has, in fact, been long known and favored in transport theory to predict traffic patterns (Wilson, 1969). From an optimization point of view, this regularization has multiple virtues, among which that of turning the transport problem into a strictly convex problem that can be solved with matrix scaling algorithms. Such algorithms include Sinkhorn’s celebrated fixed point iteration (1967), which is known to have a linear convergence (Franklin and Lorenz, 1989; Knight, 2008). Unlike other iterative simplex-like methods that need to cycle through complex conditional statements, the execution of Sinkhorn’s algorithm only relies on matrix-vector products. We propose a novel implementation of this algorithm that can compute simultaneously the distance of a single point to a family of points using matrix-matrix products, and which can therefore be implemented on GPGPU architectures. We show that, on the benchmark task of classifying MNIST digits, regularized distances perform better than standard optimal transport distances, and can be computed several orders of magnitude faster. This paper is organized as follows: we provide reminders on optimal transport theory in Section 2, introduce Sinkhorn distances in Section 3 and provide algorithmic details in Section 4. We follow with an empirical study in Section 5 before concluding. 2 Reminders on Optimal Transport Transport Polytope and Interpretation as a Set of Joint Probabilities In what follows, ⟨·, ·⟩ stands for the Frobenius dot-product. For two probability vectors r and c in the simplex Σd := {x ∈ Rd + : xT 1d = 1}, where 1d is the d dimensional vector of ones, we write U(r, c) for the transport polytope of r and c, namely the polyhedral set of d × d matrices, U(r, c) := {P ∈Rd×d + | P1d = r, P T 1d = c}. U(r, c) contains all nonnegative d × d matrices with row and column sums r and c respectively. U(r, c) has a probabilistic interpretation: for X and Y two multinomial random variables taking values in {1, · · · , d}, each with distribution r and c respectively, the set U(r, c) contains all possible joint probabilities of (X, Y ). Indeed, any matrix P ∈U(r, c) can be identified with a joint probability for (X, Y ) such that p(X = i, Y = j) = pij. We define the entropy h and the Kullback-Leibler divergences of P, Q ∈U(r, c) and a marginals r ∈Σd as h(r) = − d X i=1 ri log ri, h(P) = − d X i,j=1 pij log pij, KL(P∥Q) = X ij pij log pij qij . Optimal Transport Distance Between r and c Given a d× d cost matrix M, the cost of mapping r to c using a transport matrix (or joint probability) P can be quantified as ⟨P, M ⟩. The problem defined in Equation (1) dM(r, c) := min P ∈U(r,c)⟨P, M ⟩. (1) is called an optimal transport (OT) problem between r and c given cost M. An optimal table P ⋆ for this problem can be obtained, among other approaches, with the network simplex (Ahuja et al., 1993, §9). The optimum of this problem, dM(r, c), is a distance between r and c (Villani, 2009, §6.1) whenever the matrix M is itself a metric matrix, namely whenever M belongs to the cone of distance matrices (Avis, 1980; Brickell et al., 2008): M = {M ∈Rd×d + : ∀i, j ≤d, mij = 0 ⇔i = j, ∀i, j, k ≤d, mij ≤mik + mkj}. For a general matrix M, the worst case complexity of computing that optimum scales in O(d3 log d) for the best algorithms currently proposed, and turns out to be super-cubic in practice as well (Pele and Werman, 2009, §2.1). 2 3 Sinkhorn Distances: Optimal Transport with Entropic Constraints Entropic Constraints on Joint Probabilities The following information theoretic inequality (Cover and Thomas, 1991, §2) for joint probabilities ∀r, c ∈Σd, ∀P ∈U(r, c), h(P) ≤h(r) + h(c), is tight, since the independence table rcT (Good, 1963) has entropy h(rcT ) = h(r) + h(c). By the concavity of entropy, we can introduce the convex set Uα(r, c) := {P ∈U(r, c) | KL(P∥rcT ) ≤α} = {P ∈U(r, c) | h(P) ≥h(r)+h(c)−α} ⊂U(r, c). These two definitions are indeed equivalent, since one can easily check that KL(P∥rcT ) = h(r) + h(c) −h(P), a quantity which is also the mutual information I(X∥Y ) of two random variables (X, Y ) should they follow the joint probability P (Cover and Thomas, 1991, §2). Hence, the set of tables P whose Kullback-Leibler divergence to rcT is constrained to lie below a certain threshold can be interpreted as the set of joint probabilities P in U(r, c) which have sufficient entropy with respect to h(r) and h(c), or small enough mutual information. For reasons that will become clear in Section 4, we call the quantity below the Sinkhorn distance of r and c: Definition 1 (Sinkhorn Distance). dM,α(r, c) := min P ∈Uα(r,c)⟨P, M ⟩ Why consider an entropic constraint in optimal transport? The first reason is computational, and is detailed in Section 4. The second reason is built upon the following intuition. As a classic result of linear optimization, the OT problem is always solved on a vertex of U(r, c). Such a vertex is a sparse d × d matrix with only up to 2d −1 non-zero elements (Brualdi, 2006, §8.1.3). From a probabilistic perspective, such vertices are quasi-deterministic joint probabilities, since if pij > 0, then very few probabilities pij′ for j ̸= j′ will be non-zero in general. Rather than considering such outliers of U(r, c) as the basis of OT distances, we propose to restrict the search for low cost joint probabilities to tables with sufficient smoothness. Note that this is equivalent to considering the maximum-entropy principle (Jaynes, 1957; Darroch and Ratcliff, 1972) if we were to maximize entropy while keeping the transportation cost constrained. Before proceeding to the description of the properties of Sinkhorn distances, we note that Ferradans et al. (2013) have recently explored similar ideas. They relax and penalize (through graph-based norms) the original transport problem to avoid undesirable properties exhibited by the original optima in the problem of color matching. Combined, their idea and ours suggest that many more smooth regularizers will be worth investigating to solve the the OT problem, driven by either or both computational and modeling motivations. Metric Properties of Sinkhorn Distances When α is large enough, the Sinkhorn distance coincides with the classic OT distance. When α = 0, the Sinkhorn distance has a closed form and becomes a negative definite kernel if one assumes that M is itself a negative definite distance, or equivalently a Euclidean distance matrix1. Property 1. For α large enough, the Sinkhorn distance dM,α is the transport distance dM. Proof. Since for any P ∈U(r, c), h(P) is lower bounded by 1 2(h(r) + h(c)), we have that for α large enough Uα(r, c) = U(r, c) and thus both quantities coincide.■ Property 2 (Independence Kernel). dM,0 = rT Mc. If M is a Euclidean distance matrix, dM,0 is a negative definite kernel and e−tdM,0, the independence kernel, is positive definite for all t > 0. The proof is provided in the appendix. Beyond these two extreme cases, the main theorem of this section states that Sinkhorn distances are symmetric and satisfy triangle inequalities for all possible values of α. Since for α small enough dM,α(r, r) > 0 for any r such that h(r) > 0, Sinkhorn distances cannot satisfy the coincidence axiom (d(x, y) = 0 ⇔x = y holds for all x, y). However, multiplying dM,α by 1r̸=c suffices to recover the coincidence property if needed. Theorem 1. For all α ≥0 and M ∈M, dM,α is symmetric and satisfies all triangle inequalities. The function (r, c) 7→1r̸=cdM,α(r, c) satisfies all three distance axioms. 1∃n, ∃ϕ1, · · · , ϕd ∈Rn such that mij = ∥ϕi −ϕj∥2 2. Recall that, in that case, M raised to power t element-wise, [mt ij], 0 < t < 1 is also a Euclidean distance matrix (Berg et al., 1984, p.78,§3.2.10). 3 M P ⋆= argmin P∈U(r,c) ⟨P, M⟩ U(r, c) P ⋆ rcT P λ P λ= argmin P∈U(r,c) ⟨P, M⟩−1 λh(P ) λ = 0 λ →∞ Uα(r, c) Pα= argmin P∈Uα(r,c) ⟨P, M⟩ Pα P λmax P ⋆ machine-precision limit Rd×d Figure 1: Transport polytope U(r, c) and Kullback-Leibler ball Uα(r, c) of level α centered around rcT . This drawing implicitly assumes that the optimal transport P ⋆is unique. The Sinkhorn distance dM,α(r, c) is equal to ⟨Pα, M ⟩, the minimum of the dot product with M on that ball. For α large enough, both objectives coincide, as Uα(r, c) gradually overlaps with U(r, c) in the vicinity of P ⋆. The dual-sinkhorn distance dλ M(r, c), the minimum of the transport problem regularized by minus the entropy divided by λ, reaches its minimum at a unique solution P λ, forming a regularization path for varying λ from rcT to P ⋆. For a given value of α, and a pair (r, c) there exists λ ∈[0, ∞] such that both dλ M(r, c) and dM,α(r, c) coincide. dλ M can be efficiently computed using Sinkhorn’s fixed point iteration (1967). Although the convergence to P ⋆of this fixed point iteration is theoretically guaranteed as λ →∞, the procedure cannot work beyond a problem-dependent value λmax beyond which some entries of e−λM are represented as zeroes in memory. The gluing lemma (Villani, 2009, p.19) is key to proving that OT distances are indeed distances. We propose a variation of this lemma to prove our result: Lemma 1 (Gluing Lemma With Entropic Constraint). Let α ≥0 and x, y, z ∈Σd. Let P ∈ Uα(x, y) and Q ∈Uα(y, z). Let S be the d × d defined as sik := P j pijqjk yj . Then S ∈Uα(x, z). The proof is provided in the appendix. We can prove the triangle inequality for dM,α by using the same proof strategy than that used for classic transport distances: Proof of Theorem 1. The symmetry of dM,α is a direct result of M’s symmetry. Let x, y, z be three elements in Σd. Let P ∈Uα(x, y) and Q ∈Uα(y, z) be two optimal solutions for dM,α(x, y) and dM,α(y, z) respectively. Using the matrix S of Uα(x, z) provided in Lemma 1, we proceed with the following chain of inequalities: dM,α(x, z) = min P ∈Uα(x,z)⟨P, M ⟩≤⟨S, M ⟩= X ik mik X j pijqjk yj ≤ X ijk (mij + mjk) pijqjk yj = X ijk mij pijqjk yj + mjk pijqjk yj = X ij mijpij X k qjk yj + X jk mjkqjk X i pij yj = X ij mijpij + X jk mjkqjk = dM,α(x, y) + dM,α(y, z). ■ 4 Computing Regularized Transport with Sinkhorn’s Algorithm We consider in this section a Lagrange multiplier for the entropy constraint of Sinkhorn distances: For λ > 0, dλ M(r, c) := ⟨P λ, M ⟩, where P λ = argmin P ∈U(r,c) ⟨P, M ⟩−1 λh(P). (2) By duality theory we have that to each α corresponds a λ ∈[0, ∞] such that dM,α(r, c) = dλ M(r, c) holds for that pair (r, c). We call dλ M the dual-Sinkhorn divergence and show that it can be computed 4 for a much cheaper cost than the original distance dM. Figure 1 summarizes the relationships between dM, dM,α and dλ M. Since the entropy of P λ decreases monotonically with λ, computing dM,α can be carried out by computing dλ M with increasing values of λ until h(P λ) reaches h(r)+h(c)−α. We do not consider this problem here and only use the dual-Sinkhorn divergence in our experiments. Computing dλ M with Matrix Scaling Algorithms Adding an entropy regularization to the optimal transport problem enforces a simple structure on the optimal regularized transport P λ: Lemma 2. For λ > 0, the solution P λ is unique and has the form P λ = diag(u)K diag(v), where u and v are two non-negative vectors of Rd uniquely defined up to a multiplicative factor and K := e−λM is the element-wise exponential of −λM. Proof. The existence and unicity of P λ follows from the boundedness of U(r, c) and the strict convexity of minus the entropy. The fact that P λ can be written as a rescaled version of K is a well known fact in transport theory (Erlander and Stewart, 1990, §3.3): let L(P, α, β) be the Lagrangian of Equation (2) with dual variables α, β ∈Rd for the two equality constraints in U(r, c): L(P, α, β) = X ij 1 λpij log pij + pijmij + αT (P1d −r) + βT (P T 1d −c). For any couple (i, j), (∂L/∂pij = 0) ⇒pij = e−1/2−λαie−λmije−1/2−λβj. Since K is strictly positive, Sinkhorn’s theorem (1967) states that there exists a unique matrix of the form diag(u)K diag(v) that belongs to U(r, c), where u, v ≥0d. P λ is thus necessarily that matrix, and can be computed with Sinkhorn’s fixed point iteration (u, v) ←(r./Kv, c./K′u). ■ Given K and marginals r and c, one only needs to iterate Sinkhorn’s update a sufficient number of times to converge to P λ. One can show that these successive updates carry out iteratively the projection of K on U(r, c) in the Kullback-Leibler sense. This fixed point iteration can be written as a single update u ←r./K(c./K′u). When r > 0d, diag(1./r)K can be stored in a d × d matrix ˜K to save one Schur vector product operation with the update u ←1./( ˜K(c./K′u)). This can be easily ensured by selecting the positive indices of r, as seen in the first line of Algorithm 1. Algorithm 1 Computation of d = [dλ M(r, c1), · · · , dλ M(r, cN)], using Matlab syntax. Input M, λ, r, C := [c1, · · · , cN]. I = (r > 0); r = r(I); M = M(I, :); K = exp(−λM) u = ones(length(r), N)/length(r); ˜K = bsxfun(@rdivide, K, r) % equivalent to ˜K = diag(1./r)K while u changes or any other relevant stopping criterion do u = 1./( ˜K(C./(K′u))) end while v = C./(K′u) d = sum(u. ∗((K. ∗M)v) Parallelism, Convergence and Stopping Criteria As can be seen right above, Sinkhorn’s algorithm can be vectorized and generalized to N target histograms c1, · · · , cN. When N = 1 and C is a vector in Algorithm 1, we recover the simple iteration mentioned in the proof of Lemma 2. When N > 1, the computations for N target histograms can be simultaneously carried out by updating a single matrix of scaling factors u ∈Rd×N + instead of updating a scaling vector u ∈Rd +. This important observation makes the execution of Algorithm 1 particularly suited to GPGPU platforms. Despite ongoing research in that field (Bieling et al., 2010) such speed ups have not been yet achieved on complex iterative procedures such as the network simplex. Using Hilbert’s projective metric, Franklin and Lorenz (1989) prove that the convergence of the scaling factor u (as well as v) is linear, with a rate bounded above by κ(K)2, where κ(K) = p θ(K) −1 p θ(K) + 1 < 1, and θ(K) = max i,j,l,m KilKjm KjlKim . The upper bound κ(K) tends to 1 as λ grows, and we do observe a slower convergence as P λ gets closer to the optimal vertex P ⋆(or the optimal facet of U(r, c) if it is not unique). Different stopping criteria can be used for Algorithm 1. We consider two in this work, which we detail below. 5 5 Experimental Results Figure 2: Average test errors with shaded confidence intervals. Errors are computed using 1/4 of the dataset for train and 3/4 for test. Errors are averaged over 4 folds × 6 repeats = 24 experiments. MNIST Digits We test the performance of dual-Sinkhorn divergences on the MNIST digits dataset. Each image is converted to a vector of intensities on the 20 × 20 pixel grid, which are then normalized to sum to 1. We consider a subset of N ∈ {3, 5, 12, 17, 25} × 103 points in the dataset. For each subset, we provide mean and standard deviation of classification error using a 4 fold (3 test, 1 train) cross validation (CV) scheme repeated 6 times, resulting in 24 different experiments. Given a distance d, we form the kernel e−d/t, where t > 0 is chosen by CV on each training fold within {1, q10(d), q20(d), q50(d)}, where qs is the s% quantile of a subset of distances observed in that fold. We regularize non-positive definite kernel matrices resulting from this computation by adding a sufficiently large diagonal term. SVM’s were run with Libsvm (one-vs-one) for multiclass classification. We select the regularization C in 10{−2,0,4} using 2 folds/2 repeats CV on the training fold. We consider the Hellinger, χ2, total variation and squared Euclidean (Gaussian kernel) distances. M is the 400 × 400 matrix of Euclidean distances between the 20 × 20 bins in the grid. We also tried Mahalanobis distances on this example using exp(-tM.ˆ2), t>0 as well as its inverse, with varying values of t, but none of these results proved competitive. For the Independence kernel we considered [ma ij] where a ∈{0.01, 0.1, 1} is chosen by CV on each training fold. We select λ in {5, 7, 9, 11} × 1/q50(M) where q50(M(:)) is the median distance between pixels. We set the number of fixed-point iterations to an arbitrary number of 20 iterations. In most (though not all) folds, the value λ = 9 comes up as the best setting. The dual-Sinkhorn divergence beats by a safe margin all other distances, including the classic optimal transport distance, here labeled as EMD. 1 5 9 15 25 50 100 0.2 0.4 0.6 0.8 1 1.2 1.4 λ Distribution of (Sinkhorn−EMD)/EMD Deviation of Sinkhorn’s Distance to EMD on subset of MNIST Data Figure 3: Decrease of the gap between the dualSinkhorn divergence and the EMD as a function of λ on a subset of the MNIST dataset. Does the Dual-Sinkhorn Divergence Converge to the EMD? We study the convergence of the dual-Sinkhorn divergence towards classic optimal transport distances as λ grows. Because of the regularization in Equation (2), dλ M(r, c) is necessarily larger than dM(r, c), and we expect this gap to decrease as λ increases. Figure 3 illustrates this by plotting the boxplot of the distributions of (dλ M(r, c) −dM(r, c))/dM(r, c) over 402 pairs of images from the MNIST database. dλ M typically approximates the EMD with a high accuracy when λ exceeds 50 (median relative gap of 3.4% and 1.2% for 50 and 100 respectively). For this experiment as well as all the other experiments below, we compute a vector of N divergences d at each iteration, and stop when none of the N values of d varies more in absolute value than a 1/100th of a percent i.e. we stop when ∥dt./dt−1 −1∥∞< 1e −4. 6 64 128 256 512 1024 2048 10 −4 10 −2 10 0 10 2 Histogram Dimension Avg. Execution Time per Distance (in s.) Computational Speed for Histograms of Varying Dimension Drawn Uniformly on the Simplex (log log scale) FastEMD Rubner’s emd Sink. CPU λ=50 Sink. GPU λ=50 Sink. CPU λ=10 Sink. GPU λ=10 Sink. CPU λ=1 Sink. GPU λ=1 Figure 4: Average computational time required to compute a distance between two histograms sampled uniformly in the d dimensional simplex for varying values of d. Dual-Sinkhorn divergences are run both on a single CPU and on a GPU card. Several Orders of Magnitude Faster We measure the computational speed of classic optimal transport distances vs. that of dual-Sinkhorn divergences using Rubner et al.’s (1997) and Pele and Werman’s (2009) publicly available implementations. We pick a random distance matrix M by generating a random graph of d vertices with edge presence probability 1/2 and edge weights uniformly distributed between 0 and 1. M is the allpairs shortest-path matrix obtained from this connectivity matrix using the FloydWarshall algorithm (Ahuja et al., 1993, §5.6). Using this procedure, M is likely to be an extreme ray of the cone M (Avis, 1980, p.138). The elements of M are then normalized to have unit median. We implemented Algorithm 1 in matlab, and use emd mex and emd hat gd metric mex/C files. The EMD distances and Sinkhorn CPU are run on a single core (2.66 Ghz Xeon). Sinkhorn GPU is run on a NVidia Quadro K5000 card. We consider λ in {1, 10, 50}. λ = 1 results in a relatively dense matrix K, with results comparable to that of the Independence kernel, while for λ = 10 or 50 K = e−λM has very small values. Rubner et al.’s implementation cannot be run for histograms larger than d = 512. As can be expected, the competitive advantage of dual-Sinkhorn divergences over EMD solvers increases with the dimension. Using a GPU results in a speed-up of an additional order of magnitude. Figure 5: The influence of λ on the number of iterations required to converge on histograms uniformly sampled from the simplex. Empirical Complexity To provide an accurate picture of the actual cost of the algorithm, we replicate the experiments above but focus now on the number of iterations (matrix-matrix products) typically needed to obtain the convergence of a set of N divergences from a given point r, all uniformly sampled on the simplex. As can be seen in Figure 5, the number of iterations required for vector d to converge increases as e−λM becomes diagonally dominant. However, the total number of iterations does not seem to vary with respect to the dimension. This observation can explain why we do observe a quadratic (empirical) time complexity O(d2) with respect to the dimension d in Figure 4 above. These results suggest that the costly action of keeping track of the actual approximation error (computing variations in d) is not required, and that simply predefining a fixed number of iterations can work well and yield even additional speedups. 6 Conclusion We have shown that regularizing the optimal transport problem with an entropic penalty opens the door for new numerical approaches to compute OT. This regularization yields speed-ups that are effective regardless of any assumptions on the ground metric M. Based on preliminary evidence, it 7 seems that dual-Sinkhorn divergences do not perform worse than the EMD, and may in fact perform better in applications. Dual-Sinkhorn divergences are parameterized by a regularization weight λ which should be tuned having both computational and performance objectives in mind, but we have not observed a need to establish a trade-off between both. Indeed, reasonably small values of λ seem to perform better than large ones. Acknowledgements The author would like to thank: Zaid Harchaoui for suggesting the title of this paper and highlighting the connection between the mutual information of P and its Kullback-Leibler divergence to rcT ; Lieven Vandenberghe, Philip Knight, Sanjeev Arora, Alexandre d’Aspremont and Shun-Ichi Amari for fruitful discussions; reviewers for anonymous comments. 7 Appendix: Proofs Proof of Property 1. The set U1(r, c) contains all joint probabilities P for which h(P) = h(r) + h(c). In that case (Cover and Thomas, 1991, Theorem 2.6.6) applies and U1(r, c) can only be equal to the singleton {rcT }. If M is negative definite, there exists vectors (ϕ1, · · · , ϕd) in some Euclidean space Rn such that mij = ∥ϕi −ϕj∥2 2 through (Berg et al., 1984, §3.3.2). We thus have that rT Mc = X ij ricj∥ϕi −ϕj∥2 = ( X i ri∥ϕi∥2 + X i ci∥ϕi∥2) −2 X ij ⟨riϕi, cjϕj ⟩ = rT u + cT u −2rT Kc where ui = ∥φi∥2 and Kij = ⟨ϕi, ϕj ⟩. We used the fact that P ri = P ci = 1 to go from the first to the second equality. rT Mc is thus a n.d. kernel because it is the sum of two n.d. kernels: the first term (rT u + cT u) is the sum of the same function evaluated separately on r and c, and thus a negative definite kernel (Berg et al., 1984, §3.2.10); the latter term −2rT Ku is negative definite as minus a positive definite kernel (Berg et al., 1984, Definition §3.1.1). Remark. The proof above suggests a faster way to compute the Independence kernel. Given a matrix M, one can indeed pre-compute the vector of norms u as well as a Cholesky factor L of K above to preprocess a dataset of histograms by premultiplying each observations ri by L and only store Lri as well as precomputing its diagonal term rT i u. Note that the independence kernel is positive definite on histograms with the same 1-norm, but is no longer positive definite for arbitrary vectors. Proof of Lemma 1. Let T be the a probability distribution on {1, · · · , d}3 whose coefficients are defined as tijk := pijqjk yj , (3) for all indices j such that yj > 0. For indices j such that yj = 0, all values tijk are set to 0. Let S := [P j tijk]ik. S is a transport matrix between x and z. Indeed, X i X j sijk = X j X i pijqjk yj = X j qjk yj X i pij = X j qjk yj yj = X j qjk = zk (column sums) X k X j sijk = X j X k pijqjk yj = X j pij yj X k qjk = X j pij yj yj = X j pij = xi (row sums) We now prove that h(S) ≥h(x) + h(z) −α. Let (X, Y, Z) be three random variables jointly distributed as T . Since by definition of T in Equation (3) p(X, Y, Z) = p(X, Y )p(Y, Z)/p(Y ) = p(X)p(Y |X)p(Z|Y ), the triplet (X, Y, Z) is a Markov chain X →Y →Z (Cover and Thomas, 1991, Equation 2.118) and thus, by virtue of the data processing inequality (Cover and Thomas, 1991, Theorem 2.8.1), the following inequality between mutual informations applies: I(X; Y ) ≥I(X; Z), namely h(X, Z) −h(X) −h(Z) ≥h(X, Y ) −h(X) −h(Y ) ≥−α. 8 References Ahuja, R., Magnanti, T., and Orlin, J. (1993). Network Flows: Theory, Algorithms and Applications. Prentice Hall. Avis, D. (1980). On the extreme rays of the metric cone. Canadian Journal of Mathematics, 32(1):126–144. Berg, C., Christensen, J., and Ressel, P. (1984). Harmonic Analysis on Semigroups. Number 100 in Graduate Texts in Mathematics. Springer Verlag. Bieling, J., Peschlow, P., and Martini, P. (2010). An efficient gpu implementation of the revised simplex method. In Parallel Distributed Processing, 2010 IEEE International Symposium on, pages 1–8. Brickell, J., Dhillon, I., Sra, S., and Tropp, J. (2008). The metric nearness problem. SIAM J. Matrix Anal. Appl, 30(1):375–396. Brualdi, R. A. (2006). Combinatorial matrix classes, volume 108. Cambridge University Press. Cover, T. and Thomas, J. (1991). Elements of Information Theory. Wiley & Sons. Darroch, J. N. and Ratcliff, D. (1972). Generalized iterative scaling for log-linear models. The Annals of Mathematical Statistics, 43(5):1470–1480. Erlander, S. and Stewart, N. (1990). The gravity model in transportation analysis: theory and extensions. Vsp. Ferradans, S., Papadakis, N., Rabin, J., Peyr´e, G., Aujol, J.-F., et al. (2013). Regularized discrete optimal transport. In International Conference on Scale Space and Variational Methods in Computer Vision, pages 1–12. Franklin, J. and Lorenz, J. (1989). On the scaling of multidimensional matrices. Linear Algebra and its applications, 114:717–735. Good, I. (1963). Maximum entropy for hypothesis formulation, especially for multidimensional contingency tables. The Annals of Mathematical Statistics, pages 911–934. Grauman, K. and Darrell, T. (2004). Fast contour matching using approximate earth mover’s distance. In IEEE Conf. Vision and Patt. Recog., pages 220–227. Gudmundsson, J., Klein, O., Knauer, C., and Smid, M. (2007). Small manhattan networks and algorithmic applications for the earth movers distance. In Proceedings of the 23rd European Workshop on Computational Geometry, pages 174–177. Indyk, P. and Thaper, N. (2003). Fast image retrieval via embeddings. In 3rd International Workshop on Statistical and Computational Theories of Vision (at ICCV). Jaynes, E. T. (1957). Information theory and statistical mechanics. Phys. Rev., 106:620–630. Knight, P. A. (2008). The sinkhorn-knopp algorithm: convergence and applications. SIAM Journal on Matrix Analysis and Applications, 30(1):261–275. Ling, H. and Okada, K. (2007). An efficient earth mover’s distance algorithm for robust histogram comparison. IEEE transactions on Patt. An. and Mach. Intell., pages 840–853. Naor, A. and Schechtman, G. (2007). Planar earthmover is not in l1. SIAM J. Comput., 37(3):804–826. Pele, O. and Werman, M. (2009). Fast and robust earth mover’s distances. In ICCV’09. Rubner, Y., Guibas, L., and Tomasi, C. (1997). The earth movers distance, multi-dimensional scaling, and color-based image retrieval. In Proceedings of the ARPA Image Understanding Workshop, pages 661–668. Shirdhonkar, S. and Jacobs, D. (2008). Approximate earth movers distance in linear time. In CVPR 2008, pages 1–8. IEEE. Sinkhorn, R. (1967). Diagonal equivalence to matrices with prescribed row and column sums. The American Mathematical Monthly, 74(4):402–405. Villani, C. (2009). Optimal transport: old and new, volume 338. Springer Verlag. Wilson, A. G. (1969). The use of entropy maximising models, in the theory of trip distribution, mode split and route split. Journal of Transport Economics and Policy, pages 108–126. 9
2013
255
4,993
Nonparametric Multi-group Membership Model for Dynamic Networks Myunghwan Kim Stanford University Stanford, CA 94305 mykim@stanford.edu Jure Leskovec Stanford University Stanford, CA 94305 jure@cs.stanford.edu Relational data—like graphs, networks, and matrices—is often dynamic, where the relational structure evolves over time. A fundamental problem in the analysis of time-varying network data is to extract a summary of the common structure and the dynamics of the underlying relations between the entities. Here we build on the intuition that changes in the network structure are driven by dynamics at the level of groups of nodes. We propose a nonparametric multi-group membership model for dynamic networks. Our model contains three main components: We model the birth and death of individual groups with respect to the dynamics of the network structure via a distance dependent Indian Buffet Process. We capture the evolution of individual node group memberships via a Factorial Hidden Markov model. And, we explain the dynamics of the network structure by explicitly modeling the connectivity structure of groups. We demonstrate our model’s capability of identifying the dynamics of latent groups in a number of different types of network data. Experimental results show that our model provides improved predictive performance over existing dynamic network models on future network forecasting and missing link prediction. 1 Introduction Statistical analysis of social networks and other relational data is becoming an increasingly important problem as the scope and availability of network data increases. Network data—such as the friendships in a social network—is often dynamic in a sense that relations between entities rise and decay over time. A fundamental problem in the analysis of such dynamic network data is to extract a summary of the common structure and the dynamics of the underlying relations between entities. Accurate models of structure and dynamics of network data have many applications. They allow us to predict missing relationships [20, 21, 23], recommend potential new relations [2], identify clusters and groups of nodes [1, 29], forecast future links [4, 9, 11, 24], and even predict group growth and longevity [15]. Here we present a new approach to modeling network dynamics by considering time-evolving interactions between groups of nodes as well as the arrival and departure dynamics of individual nodes to these groups. We develop a dynamic network model, Dynamic Multi-group Membership Graph Model, that identifies the birth and death of individual groups as well as the dynamics of node joining and leaving groups in order to explain changes in the underlying network linking structure. Our nonparametric model considers an infinite number of latent groups, where each node can belong to multiple groups simultaneously. We capture the evolution of individual node group memberships via a Factorial Hidden Markov model. However, in contrast to recent works on dynamic network modeling [4, 5, 11, 12, 14], we explicitly model the birth and death dynamics of individual groups by using a distance-dependent Indian Buffet Process [7]. Under our model only active/alive groups influence relationships in a network at a given time. Further innovation of our approach is that we not only model relations between the members of the same group but also account for links between members and non-members. By explicitly modeling group lifespan and group connectivity structure we achieve greater modeling flexibility, which leads to improved performance on link prediction and network forecasting tasks as well as to increased interpretability of obtained results. 1 The rest of the paper is organized as follows: Section 2 provides the background and Section 3 presents our generative model and motivates its parametrization. We discuss related work in Section 4 and present model inference procedure in Section 5. Last, in Section 6 we provide experimental results as well as analysis of the social network from the movie, The Lord of the Rings. 2 Models of Dynamic Networks First, we describe general components of modern dynamic network models [4, 5, 11, 14]. In the next section we will then describe our own model and point out the differences to the previous work. Dynamic networks are generally conceptualized as discrete time series of graphs on a fixed set of nodes N. Dynamic network Y is represented as a time series of adjacency matrices Y (t) for each time t = 1, 2, · · · , T . In this work, we limit our focus to unweighted directed as well as undirected networks. So, each Y (t) is a N × N binary matrix where Y (t) ij = 1 if a link from node i to j exists at time t and Y (t) ij = 0 otherwise. Each node i of the network is associated with a number of latent binary features that govern the interaction dynamics with other nodes of the network. We denote the binary value of feature k of node i at time t by z(t) ik ∈{0, 1}. Such latent features can be viewed as assigning nodes to multiple overlapping, latent clusters or groups [1, 21]. In our work, we interpret these latent features as memberships to latent groups such as social communities of people with the same interests or hobbies. We allow each node to belong to multiple groups simultaneously. We model each node-group membership using a separate Bernoulli random variable [17, 22, 29]. This is in contrast to mixedmembership models where the distribution over individual node’s group memberships is modeled using a multinomial distribution [1, 5, 12]. The advantage of our multiple-membership approach is as follows. Mixed-membership models (i.e., multinomial distribution over group memberships) essentially assume that by increasing the amount of node’s membership to some group k, the same node’s membership to some other group k′ has to decrease (due to the condition that the probabilities normalize to 1). On the other hand, multiple-membership models do not suffer from this assumption and allow nodes to truely belong to multiple groups. Furthermore, we consider a nonparametric model of groups which does not restrict the number of latent groups ahead of time. Hence, our model adaptively learns the appropriate number of latent groups for a given network at a given time. In dynamic network models, one also specifies a process by which nodes dynamically join and leave groups. We assume that each node i can join or leave a given group k according to a Markov model. However, since each node can join multiple groups independently, we naturally consider factorial hidden Markov models (FHMM) [8], where latent group membership of each node independently evolves over time. To be concrete, each membership z(t) ik evolves through a 2-by-2 Markov transition probability matrix Q(t) k where each entry Q(t) k [r, s] corresponds to P(z(t) ik = s|z(t−1) ik = r), where r, s ∈{0 = non-member, 1 = member}. Now, given node group memberships z(t) ik at time t one also needs to specify the process of link generation. Links of the network realize according to a link function f(·). A link from node i to node j at time t occurs with probability determined by the link function f(z(t) i· , z(t) j· ). In our model, we develop a link function that not only accounts for links between group members but also models links between the members and non-members of a given group. 3 Dynamic Multi-group Membership Graph Model Next we shall describe our Dynamic Multi-group Membership Graph Model (DMMG) and point out the differences with the previous work. In our model, we pay close attention to the three processes governing network dynamics: (1) birth and death dynamics of individual groups, (2) evolution of memberships of nodes to groups, and (3) the structure of network interactions between group members as well as non-members. We now proceed by describing each of them in turn. Model of active groups. Links of the network are influenced not only by nodes changing memberships to groups but also by the birth and death of groups themselves. New groups can be born and old ones can die. However, without explicitly modeling group birth and death there exists ambiguity 2 between group membership change and the birth/death of groups. For example, consider two disjoint groups k and l such that their lifetimes and members do not overlap. In other words, group l is born after group k dies out. However, if group birth and death dynamics is not explicitly modeled, then the model could interpret that the two groups correspond to a single latent group where all the members of k leave the group before the members of l join the group. To resolve this ambiguity we devise an explicit model of birth/death dynamics of groups by introducing a notion of active groups. Under our model, a group can be in one of two states: it can be either active (alive) or inactive (not yet born or dead). However, once a group becomes inactive, it can never be active again. That is, once a group dies, it can never be alive again. To ensure coherence of group’s state over time, we build on the idea of distance-dependent Indian Buffet Processes (dd-IBP) [7]. The IBP is named after a metaphorical process that gives rise to a probability distribution, where customers enter an Indian Buffet restaurant and sample some subset of an infinitely long sequence of dishes. In the context of networks, nodes usually correspond to ‘customers’ and latent features/groups correspond to ‘dishes’. However, we apply dd-IBP in a different way. We regard each time step t as a ‘customer’ that samples a set of active groups Kt. So, at the first time step t = 1, we have Poisson(λ) number of groups that are initially active, i.e., |K1| ∼Poisson(λ). To account for death of groups we then consider that each active group at time t −1 can become inactive at the next time step t with probability γ. On the other hand, Poisson(γλ) new groups are also born at time t. Thus, at each time currently active groups can die, while new ones can also be born. The hyperparameter γ controls for how often new groups are born and how often old ones die. For instance, there will be almost no newborn or dead groups if γ ≈1, while there would be no temporal group coherence and practically all the groups would die between consecutive time steps if γ = 0. Figure 1(a) gives an example of the above process. Black circles indicate active groups and white circles denote inactive (not yet born or dead) groups. Groups 1 and 3 exist at t = 1 and Group 2 is born at t = 2. At t = 3, Group 3 dies but Group 4 is born. Without our group activity model, Group 3 could have been reused with a completely new set of members and Group 4 would have never been born. Our model can distinguish these two disjoint groups. Formally, we denote the number of active groups at time t by Kt = |Kt|. We also denote the state (active/inactive) of group k at time t by W (t) k = 1{k ∈Kt}. For convenience, we also define a set of newly active groups at time t be K+ t = {k|W (t) k = 1, W (t′) k = 0 ∀t′ < t} and K+ t = |K+ t |. Putting it all together we can now fully describe the process of group birth/death as follows: K+ t ∼ Poisson (λ) , for t = 1 Poisson (γλ) , for t > 1 W (t) k ∼      Bernoulli(1 −γ) if W (t−1) k = 1 1, if Pt−1 t′=1 K+ t′ < k ≤Pt t′=1 K+ t′ 0, otherwise . (1) Note that under this model an infinite number of active groups can exist. This means our model automatically determines the right number of active groups and each node can belong to many groups simultaneously. We now proceed by describing the model of node group membership dynamics. Dynamics of node group memberships. We capture the dynamics of nodes joining and leaving groups by assuming that latent node group memberships form a Markov chain. In this framework, node memberships to active groups evolve through time according to Markov dynamics: P(z(t) ik |z(t−1) ik ) = Qk =  1 −ak ak bk 1 −bk  , where matrix Qk[r, s] denotes a Markov transition from state r to state s, which can be a fixed parameter, group specific, or otherwise domain dependent as long as it defines a Markov transition matrix. Thus, the transition of node’s i membership to active group k can be defined as follows: ak, bk ∼Beta(α, β), z(t) ik ∼W (t) k · Bernoulli  a 1−z(t−1) ik k (1 −bk)z(t−1) ik  . (2) Typically, β > α, which ensures that group’s memberships are not too volatile over time. 3 (a) Group activity model (b) Link function model Figure 1: (a) Birth and death of groups: Black circles represent active and white circles represent inactive (unborn or dead) groups. A dead group can never become active again. (b) Link function: z(t) i denotes binary node group memberships. Entries of link affinity matrix Θk denotes linking parameters between all 4 combinations of members (z(t) i = 1) and non-members (z(t) i = 0). To obtain link probability p(t) ij , individual affinities Θk[z(t) j , z(t) j ] are combined using a logistic function g(·) . Relationship between node group memberships and links of the network. Last, we describe the part of the model that establishes the connection between node’s memberships to groups and the links of the network. We achieve this by defining a link function f(i, j), which for given a pair of nodes i, j determines their interaction probability p(t) ij based on their group memberships. We build on the Multiplicative Attribute Graph model [16, 18], where each group k is associated with a link affinity matrix Θk ∈R2×2. Each of the four entries of the link affinity matrix captures the tendency of linking between group’s members, members and non-members, as well as nonmembers themselves. While traditionally link affinities were considered to be probabilities, we relax this assumption by allowing affinities to be arbitrary real numbers and then combine them through a logistic function to obtain a final link probability. The model is illustrated in Figure 1(b). Given group memberships z(t) ik and z(t) jk of nodes i and j at time t the binary indicators “select” an entry Θk[z(t) ik , z(t) jk ] of matrix Θk. This way linking tendency from node i to node j is reflected based on their membership to group k. We then determine the overall link probability p(t) ij by combining the link affinities via a logistic function g(·)1. Thus, p(t) ij = f(z(t) i· , z(t) j· ) = g ǫt + ∞ X k=1 Θk[z(t) ik , z(t) jk ] ! , Yij ∼Bernoulli(p(t) ij ) (3) where ǫt is a density parameter that reflects the varying link density of network over time. Note that due to potentially infinite number of groups the sum of an infinite number of link affinities may not be tractable. To resolve this, we notice that for a given Θk subtracting Θk[0, 0] from all its entries and then adding this value to ǫt does not change the overall linking probability p(t) ij . Thus, we can set Θk[0, 0] = 0 and then only a finite number of affinities selected by z(t) ik have to be considered. For all other entries of Θk we use N(0, ν2) as a prior distribution. To sum up, Figure 2 illustrates the three components of the DMMG in a plate notation. Group’s state W (t) k is determined by the dd-IBP process and each node-group membership z(t) ik is defined as the FHMM over active groups. Then, the link between nodes i and j is determined based on the groups they belong to and the corresponding group link affinity matrices Θ. 4 Related Work Classically, non-Bayesian approaches such as exponential random graph models [10, 27] have been used to study dynamic networks. On the other hand, in the Bayesian approaches to dynamic network analysis latent variable models have been most widely used. These approaches differ by the structure of the latent space that they assume. For example, euclidean space models [13, 24] place nodes 1g(x) = exp(x)/(1 + exp(x)) 4 Figure 2: Dynamic Multi-group Membership Graph Model. Network Y depends on each node’s group memberships Z and active groups W . Links of Y appear via link affinities Θ. in a low dimensional Euclidean space and the network evolution is then modeled as a regression problem of node’s future latent location. In contrast, our model uses HMMs, where latent variables stochastically depend on the state at the previous time step. Related to our work are dynamic mixed-membership models where a node is probabilistically allocated to a set of latent features. Examples of this model include the dynamic mixed-membership block model [5, 12] and the dynamic infinite relational model [14]. However, the critical difference here is that our model uses multimemberships where node’s membership to one group does not limit its membership to other groups. Probably most related to our work here are DRIFT [4] and LFP [11] models. Both of these models consider Markov switching of latent multi-group memberships over time. DRIFT uses the infinite factorial HMM [6], while LFP adds “social propagation” to the Markov processes so that network links of each node at a given time directly influence group memberships of the corresponding node at the next time. Compared to these models, we uniquely incorporate the model of group birth and death and present a novel and powerful linking function. 5 Model Inference via MCMC We develop a Markov chain Monte Carlo (MCMC) procedure to approximate samples from the posterior distribution of the latent variables in our model. More specifically, there are five types of variables that we need to sample: node group memberships Z = {z(t) ik }, group states W = {W (t) k }, group membership transitions Q = {Qk}, link affinities Θ = {Θk}, and density parameters ǫ = {ǫt}. By sampling each type of variables while fixing all the others, we end up with many samples representing the posterior distribution P(Z, W, Q, Θ, ǫ|Y, λ, γ, α, β). We shall now explain a sampling strategy for each varible type. Sampling node group memberships Z. To sample node group membership z(t) ik , we use the forward-backward recursion algorithm [26]. The algorithm first defines a deterministic forward pass which runs down the chain starting at time one, and at each time point t collects information from the data and parameters up to time t in a dynamic programming cache. A stochastic backward pass starts at time T and samples each z(t) ik in backwards order using the information collected during the forward pass. In our case, we only need to sample z(T B k :T D k ) ik where T B k and T D k indicate the birth time and the death time of group k. Due to space constraints, we discuss further details in the extended version of the paper [19]. Sampling group states W. To update active groups, we use the Metropolis-Hastings algorithm with the following proposal distribution P(W →W ′): We add a new group, remove an existing group, or update the life time of an active group with the same probability 1/3. When adding a new group k′ we select the birth and death time of the group at random such that 1 ≤T B k′ ≤T D k′ ≤T . For removing groups we randomly pick one of existing groups k′′ and remove it by setting W (t) k′′ = 0 for all t. Finally, to update the birth and death time of an existing group, we select an existing group and propose new birth and death time of the group at random. Once new state vector W ′ is proposed we accept it with probability min  1, P(Y |W ′)P(W ′|λ, γ)P(W ′ →W) P(Y |W)P(W|λ, γ)P(W →W ′)  . (4) We compute P(W|λ, γ) and P(W ′ →W) in a closed form, while we approximate the posterior P(Y |W) by sampling L Gibbs samples while keeping W fixed. 5 Sampling group membership transition matrix Q. Beta distribution is a conjugate prior of Bernoulli distribution and thus we can sample each ak and bk in Qk directly from the posterior distribution: ak ∼Beta(α+N01,k, β +N00,k) and bk ∼Beta(α+N10,k, β +N11,k), where Nrs,k is the number of nodes that transition from state r to s in group k (r, s ∈{0 = non-member, 1 = member}). Sampling link affinities Θ. Once node group memberships Z are determined, we update the entries of link affinity matrices Θk. Direct sampling of Θ is intractable because of non-conjugacy of the logistic link function. An appropriate method in such case would be the Metropolis-Hastings that accepts or rejects the proposal based on the likelihood ratio. However, to avoid low acceptance rates and quickly move toward the mode of the posterior distribution, we develop a method based on Hybrid Monte Carlo (HMC) sampling [3]. We guide the sampling using the gradient of loglikelihood function with respect to each Θk. Because links Y (t) ij are generated independently given group memberships Z, the gradient with respect to Θk[x, y] can be computed by −1 2σ2 Θ2 k + X i,j,t  Y (t) ij −p(t) ij  1{z(t) ik = x, z(t) jk = y} . (5) Updating density parameter ǫ. Parameter vector ǫ is defined over a finite dimension T . Therefore, we can update ǫ by maximizing the log-likelihood given all the other variables. We compute the gradient update for each ǫt and directly update ǫt via a gradient step. Updating hyperparameters. The number of groups over all time periods is given by a Poisson distribution with parameter λ (1 + γ (T −1)). Hence, given γ we sample λ by using a Gamma conjugate prior. Similarly, we can use the Beta conjugate prior for the group death process (i.e., Bernoulli distribution) to sample γ. However, hyperparameters α and β do not have a conjugate prior, so we update them by using a gradient method based on the sampled values of ak and bk. Time complexity of model parameter estimation. Last, we briefly comment on the time complexity of our model parameter estimation procedure. Each sample z(t) ik requires computation of link probability p(t) ij for all j ̸= i. Since the expected number of active groups at each time is λ, this requires O(λN 2T ) computations of p(t) ij . By caching the sum of link affinities between every pair of nodes sampling Z as well as W requires O(λN 2T ) time. Sampling Θ and ǫ also requires O(λN 2T ) because the gradient of each p(t) ij needs to be computed. Overall, our approach takes O(λN 2T ) to obtain a single sample, while models that are based on the interaction matrix between all groups [4, 5, 11] require O(K2N 2T ), where K is the expected number of groups. Furthermore, it has been shown that O(log N) groups are enough to represent networks [16, 18]. Thus, in practice K (i.e., λ) is of order log N and the running time for each sample is O(N 2T log N). 6 Experiments We evaluate our model on three different tasks. For quantitative evaluation, we perform missing link prediction as well as future network forecasting and show our model gives favorable performance when compared to current dynamic and static network models. We also analyze the dynamics of groups in a dynamic social network of characters in a movie “The Lord of the Rings: The Two Towers.” Experimental setup. For the two prediction experiments, we use the following three datasets. First, the NIPS co-authorships network connects two people if they appear on the same publication in the NIPS conference in a given year. Network spans T =17 years (1987 to 2003). Following [11] we focus on a subset of 110 most connected people over all time periods. Second, the DBLP coauthorship network is obtained from 21 Computer Science conferences from 2000 to 2009 (T = 10) [28]. We focus on 209 people by taking 7-core of the aggregated network for the entire time. Third, the INFOCOM dataset represents the physical proximity interactions between 78 students at the 2006 INFOCOM conference, recorded by wireless detector remotes given to each attendee [25]. As in [11] we use the processed data that removes inactive time slices to have T =50. To evaluate the predictive performance of our model, we compare it to three baseline models. For a naive baseline model, we regard the relationship between each pair of nodes as the instance of 6 Model NIPS DBLP INFOCOM TestLL AUC F1 TestLL AUC F1 TestLL AUC F1 Naive -2030 0.808 0.177 -12051 0.814 0.300 -17821 0.677 0.252 LFRM -880 0.777 0.195 -3783 0.784 0.146 -8689 0.946 0.703 DRIFT -758 0.866 0.296 -3108 0.916 0.421 -6654 0.973 0.757 DMMG −624 0.916 0.434 −2684 0.939 0.492 −6422 0.976 0.764 Table 1: Missing link prediction. We bold the performance of the best scoring method. Our DMMG performs the best in all cases. All improvements are statistically significant at 0.01 significance level. independent Bernoulli distribution with Beta(1, 1) prior. Thus, for a given pair of nodes, the link probability at each time equals to the expected probability from the posterior distribution given network data. Second baseline is LFRM [21], a model of static networks. For missing link prediction, we independently fit LFRM to each snapshot of dynamic networks. For network forecasting task, we fit LFRM to the most recent snapshot of a network. Even though LFRM does not capture time dynamics, we consider this to be a strong baseline model. Finally, for the comparison with dynamic network models, we consider two recent state of the art models. The DRIFT model [4] is based on an infinite factorial HMM and authors kindly shared their implementation. We also consider the LFP model [11] for which we were not able to obtain the implementation, but since we use the same datasets, we compare performance numbers directly with those reported in [11]. To evaluate predictive performance, we use various standard evaluation metrics. First, to assess goodness of inferred probability distributions, we report the log-likelihood of held-out edges. Second, to verify the predictive performance, we compute the area under the ROC curve (AUC). Last, we also report the maximum F1-score (F1) by scanning over all possible precision/recall thresholds. Task 1: Predicting missing links. To generate the datasets for the task of missing link prediction, we randomly hold out 20% of node pairs (i.e., either link or non-link) throughout the entire time period. We then run each model to obtain 400 samples after 800 burn-in samples for each of 10 MCMC chains. Each sample gives a link probability for a given missing entry, so the final link probability of a missing entry is computed by averaging the corresponding link probability over all the samples. This final link probability provides the evaluation metric for a given missing data entry. Table 1 shows average evaluation metrics for each model and dataset over 10 runs. We also compute the p-value on the difference between two best results for each dataset and metric. Overall, our DMMG model significantly outperforms the other models in every metric and dataset. Particularly in terms of F1-score we gain up to 46.6% improvement over the other models. By comparing the naive model and LFRM, we observe that LFRM performs especially poorly compared to the naive model in two networks with few edges (NIPS and DBLP). Intuitively this makes sense because due to the network sparsity we can obtain more information from the temporal trajectory of each link than from each snapshot of network. However, both DRIFT and DMMG successfully combine the temporal and the network information which results in better predictive performance. Furthermore, we note that DMMG outperforms the other models by a larger margin as networks get sparser. DMMG makes better use of temporal information because it can explicitly model temporally local links through active groups. Last, we also compare our model to the LFP model. The LFP paper reports AUC ROC score of ∼0.85 for NIPS and ∼0.95 for INFOCOM on the same task of missing link prediction with 20% held-out missing data [11]. Performance of our DMMG on these same networks under the same conditions is 0.916 for NIPS and 0.976 for INFOCOM, which is a strong improvement over LFP. Task 2: Future network forecasting. Here we are given a dynamic network up to time Tobs and the goal is to predict the network at the next time Tobs + 1. We follow the experimental protocol described in [4, 11]: We train the models on first Tobs networks, fix the parameters, and then for each model we run MCMC sampling one time step into the future. For each model and network, we obtain 400 samples with 10 different MCMC chains, resulting in 400K network samples. These network samples provide a probability distribution over links at time Tobs + 1. Table 2 shows performance averaged over different Tobs values ranging from 3 to T -1. Overall, DMMG generally exhibits the best performance, but performance results seem to depend on the dataset. DMMG performs the best at 0.001 significance level in terms of AUC and F1 for the NIPS dataset, and at 0.05 level for the INFOCOM dataset. While DMMG improves performance on AUC 7 Model NIPS DBLP INFOCOM TestLL AUC F1 TestLL AUC F1 TestLL AUC F1 Naive -547 0.524 0.130 -3248 0.668 0.243 -774 0.673 0.270 LFRM -356 0.398 0.011 -1680 0.492 0.024 -760 0.640 0.248 DRIFT −148 0.672 0.084 −1324 0.650 0.122 -661 0.782 0.381 DMMG -170 0.732 0.196 -1347 0.652 0.245 −625 0.804 0.392 Table 2: Future network forecasting. DMMG performs best on NIPS and INFOCOM while results on DBLP are mixed. madril galadriel elrond arwen faramir hama grima theoden eomer eowyn saruman gimli legolas aragorn pippin gollum sam frodo merry gandalf haldir 1 2 3 4 5 madril galadriel elrond arwen faramir hama grima theoden eomer eowyn saruman gimli legolas aragorn pippin gollum sam frodo merry gandalf haldir 1 2 3 4 5 madril galadriel elrond arwen faramir hama grima theoden eomer eowyn saruman gimli legolas aragorn pippin gollum sam frodo merry gandalf haldir 1 2 3 4 5 (a) Group 1 (b) Group 2 (c) Group 3 Figure 3: Group arrival and departure dynamics of different characters in the Lord of the Rings. Dark areas in the plots correspond to a give node’s (y-axis) membership to each group over time (x-axis) . (9%) and F1 (133%), DRIFT achieves the best log-likelihood on the NIPS dataset. In light of our previous observations, we conjecture that this is due to change in network edge density between different snapshots. On the DBLP dataset, DRIFT gives the best log-likelihood, the naive model performs best in terms of AUC, and DMMG is the best on F1 score. However, in all cases of DBLP dataset, the differences are not statistically significant. Overall, DMMG performs the best on NIPS and INFOCOM and provides comparable performance on DBLP. Task 3: Case study of “The Lord of the Rings: The Two Towers” social network. Last, we also investigate groups identified by our model on a dynamic social network of characters in a movie, The Lord of the Rings: The Two Towers. Based on the transcript of the movie we created a dynamic social network on 21 characters and T =5 time epochs, where we connect a pair of characters if they co-appear inside some time window. We fit our model to this network and examine the results in Figure 3. Our model identified three dynamic groups, which all nicely correspond to the Lord of the Rings storyline. For example, the core of Group 1 corresponds to Aragorn, elf Legolas, dwarf Gimli, and people in Rohan who in the end all fight against the Orcs. Similarly, Group 2 corresponds to hobbits Sam, Frodo and Gollum on their mission to destroy the ring in Mordor, and are later joined by Faramir and ranger Madril. Interestingly, Group 3 evolving around Merry and Pippin only forms at t=2 when they start their journey with Treebeard and later fight against wizard Saruman. While the fight occurs in two separate places we find that some scenes are not distinguishable, so it looks as if Merry and Pippin fought together with Rohan’s army against Saruman’s army. Acknowledgments We thank Creighton Heaukulani and Zoubin Ghahramani for sharing data and code. This research has been supported in part by NSF IIS-1016909, CNS-1010921, IIS-1149837, IIS-1159679, IARPA AFRL FA8650-10-C-7058,Okawa Foundation, Docomo, Boeing, Allyes, Volkswagen, Intel, Alfred P. Sloan Fellowship and the Microsoft Faculty Fellowship. References [1] E. M. Airoldi, D. M. Blei, S. E. Fienberg, and E. P. Xing. Mixed membership stochastic blockmodels. JMLR, 9, 2008. [2] L. Backstrom and J. Leskovec. Supervised random walks: Predicting and recommending links in social networks. In WSDM, 2011. 8 [3] S. Duane, A. Kennedy, B. J. Pendleton, and D. Roweth. Hybrid monte carlo. Physics Letter B, 195(2):216–222, 1987. [4] J. Foulds, A. U. Asuncion, C. DuBois, C. T. Butts, and P. Smyth. A dynamic relational infinite feature model for longitudinal social networks. In AISTATS, 2011. [5] W. Fu, L. Song, and E. P. Xing. Dynamic mixed membership blockmodel for evolving networks. In ICML, 2009. [6] J. V. Gael, Y. W. Teh, , and Z. Ghahramani. The infinite factorial hidden markov model. In NIPS, 2009. [7] S. J. Gershman, P. I. Frazier, and D. M. Blei. Distance dependent infinite latent feature models. arXiv:1110.5454, 2012. [8] Z. Ghahramani and M. I. Jordan. Factorial hidden markov models. Machine Learning, 29(2-3):245–273, 1997. [9] F. Guo, S. Hanneke, W. Fu, and E. P. Xing. Recovering temporally rewiring networks: a model-based approach. In ICML, 2007. [10] S. Hanneke, W. Fu, and E. P. Xing. Discrete temporal models of social networks. Electron. J. Statist., 4:585–605, 2010. [11] C. Heaukulani and Z. Ghahramani. Dynamic probabilistic models for latent feature propagation in social networks. In ICML, 2013. [12] Q. Ho, L. Song, and E. P. Xing. Evolving cluster mixed-membership blockmodel for time-varying networks. In AISTATS, 2011. [13] P. D. Hoff, A. E. Raftery, and M. S. Handcock. Latent space approaches to social network analysis. JASA, 97(460):1090 – 1098, 2002. [14] K. Ishiguro, T. Iwata, N. Ueda, and J. Tenenbaum. Dynamic infinite relational model for time-varying relational data analysis. In NIPS, 2010. [15] S. Kairam, D. Wang, and J. Leskovec. The life and death of online groups: Predicting group growth and longevity. In WSDM, 2012. [16] M. Kim and J. Leskovec. Modeling social networks with node attributes using the multiplicative attribute graph model. In UAI, 2011. [17] M. Kim and J. Leskovec. Latent multi-group membership graph model. In ICML, 2012. [18] M. Kim and J. Leskovec. Multiplicative attribute graph model of real-world networks. Internet Mathematics, 8(1-2):113–160, 2012. [19] M. Kim and J. Leskovec. Nonparametric multi-group membership model for dynamic networks. arXiv:1311.2079, 2013. [20] J. R. Lloyd, P. Orbanz, Z. Ghahramani, and D. M. Roy. Random function priors for exchangeable arrays with applications to graphs and relational data. In NIPS, 2012. [21] K. T. Miller, T. L. Grifths, and M. I. Jordan. Nonparametric latent feature models for link prediction. In NIPS, 2009. [22] M. Mørup, M. N. Schmidt, and L. K. Hansen. Infinite multiple membership relational modeling for complex networks. In MLSP, 2011. [23] K. Palla, D. A. Knowles, and Z. Ghahramani. An infinite latent attribute model for network data. In ICML, 2012. [24] P. Sarkar and A. W. Moore. Dynamic social network analysis using latent space models. In NIPS, 2005. [25] J. Scott, R. Gass, J. Crowcroft, P. Hui, C. Diot, and A. Chaintreau. CRAWDAD data set cambridge/haggle (v. 2009-05-29), May 2009. [26] S. L. Scott. Bayesian methods for hidden markov models. JASA, 97(457):337–351, 2002. [27] T. A. B. Snijders, G. G. van de Bunt, and C. E. G. Steglich. Introduction to stochastic actor-based models for network dynamics. Social Networks, 32(1):44–60, 2010. [28] J. Tang, J. Zhang, L. Yao, J. Li, L. Zhang, and Z. Su. Arnetminer: Extraction and mining of academic social networks. In KDD’08, 2008. [29] J. Yang and J. Leskovec. Community-affiliation graph model for overlapping community detection. In ICDM, 2012. 9
2013
256
4,994
EDML for Learning Parameters in Directed and Undirected Graphical Models Khaled S. Refaat, Arthur Choi, Adnan Darwiche Computer Science Department University of California, Los Angeles {krefaat,aychoi,darwiche}@cs.ucla.edu Abstract EDML is a recently proposed algorithm for learning parameters in Bayesian networks. It was originally derived in terms of approximate inference on a metanetwork, which underlies the Bayesian approach to parameter estimation. While this initial derivation helped discover EDML in the first place and provided a concrete context for identifying some of its properties (e.g., in contrast to EM), the formal setting was somewhat tedious in the number of concepts it drew on. In this paper, we propose a greatly simplified perspective on EDML, which casts it as a general approach to continuous optimization. The new perspective has several advantages. First, it makes immediate some results that were non-trivial to prove initially. Second, it facilitates the design of EDML algorithms for new graphical models, leading to a new algorithm for learning parameters in Markov networks. We derive this algorithm in this paper, and show, empirically, that it can sometimes learn estimates more efficiently from complete data, compared to commonly used optimization methods, such as conjugate gradient and L-BFGS. 1 Introduction EDML is a recently proposed algorithm for learning MAP parameters of a Bayesian network from incomplete data [5, 16]. While it is procedurally very similar to Expectation Maximization (EM) [7, 11], EDML was shown to have certain advantages, both theoretically and practically. Theoretically, EDML can in certain specialized cases provably converge in one iteration, whereas EM may require many iterations to solve the same learning problem. Some empirical evaluations further suggested that EDML and hybrid EDML/EM algorithms can sometimes find better parameter estimates than vanilla EM, in fewer iterations and less time. EDML was originally derived in terms of approximate inference on a meta-network used for Bayesian approaches to parameter estimation. This graphical representation of the estimation problem lent itself to the initial derivation of EDML, as well to the identification of certain key theoretical properties, such as the one we just described. The formal details, however, can be somewhat tedious as EDML draws on a number of different concepts. We review EDML in such terms in the supplementary appendix. In this paper, we propose a new perspective on EDML, which views it more abstractly in terms of a simple method for continuous optimization. This new perspective has a number of advantages. First, it makes immediate some results that were previously obtained for EDML, but through some effort. Second, it facilitates the design of new EDML algorithms for new classes of models, where graphical formulations of parameter estimation, such as meta-networks, are lacking. Here, we derive, in particular, a new parameter estimation algorithm for Markov networks, which is in many ways a more challenging task, compared to the case of Bayesian networks. Empirically, we find that EDML is capable of learning parameter estimates, under complete data, more efficiently than popular methods such as conjugate-gradient and L-BFGS, and in some cases, by an order-of-magnitude. 1 This paper is structured as follows. In Section 2, we highlight a simple iterative method for, approximately, solving continuous optimization problems. In Section 3, we formulate the EDML algorithm for parameter estimation in Bayesian networks, as an instance of this optimization method. In Section 4, we derive a new EDML algorithm for Markov networks, based on the same perspective. In Section 5, we contrast the two EDML algorithms for directed and undirected graphical models, in the complete data case. We empirically evaluate our new algorithm for parameter estimation under complete data in Markov networks, in Section 6; review related work in Section 7; and conclude in Section 8. Proofs of theorems appear in the supplementary appendix. 2 An Approximate Optimization of Real-Valued Functions Consider a real-valued objective function f(x) whose input x is a vector of components: x = (x1, . . . , xi, . . . , xn), where each component xi is a vector in Rki for some ki. Suppose further that we have a constraint on the domain of function f(x) with a corresponding function g that maps an arbitrary point x to a point g(x) satisfying the given constraint. We say in this case that g(x) is a feasibility function and refer to the points in its range as feasible points. Our goal here is to find a feasible input vector x = (x1, . . . , xi, . . . , xn) that optimizes the function f(x). Given the difficulty of this optimization problem in general, we will settle for finding stationary points x in the constrained domain of function f(x). One approach for finding such stationary points is as follows. Let x⋆= (x⋆ 1, . . . , x⋆ i , . . . , x⋆ n) be a feasible point in the domain of function f(x). For each component xi, we define a sub-function fx⋆(xi) = f(x⋆ 1, . . . , x⋆ i−1, xi, x⋆ i+1, . . . , x⋆ n). That is, we use the n-ary function f(x) to generate n sub-functions fx⋆(xi). Each of these subfunctions is obtained by fixing all inputs xj of f(x), for j ̸= i, to their values in x⋆, while keeping the input xi free. We further assume that these sub-functions are subject to the same constraints that the function f(x) is subject to. We can now characterize all feasible points x⋆that are stationary with respect to the function f(x), in terms of local conditions on sub-functions fx⋆(xi). Claim 1 A feasible point x⋆= (x⋆ 1, . . . , x⋆ i , . . . , x⋆ n) is stationary for function f(x) iff for all i, component x⋆ i is stationary for sub-function fx⋆(xi). This is immediate from the definition of a stationary point. Assuming no constraints, at a stationary point x⋆, the gradient ∇f(x⋆) = 0, i.e., ∇xif(x⋆) = ∇fx⋆(x⋆ i ) = 0 for all xi, where ∇xif(x⋆) denotes the sub-vector of gradient ∇f(x⋆) with respect to component xi.1 With these observations, we can now search for feasible stationary points x⋆of the constrained function f(x) using an iterative method that searches instead for stationary points of the constrained sub-functions fx⋆(xi). The method works as follows: 1. Start with some feasible point xt of function f(x) for t = 0 2. While some xt i is not a stationary point for constrained sub-function fxt(xi) (a) Find a stationary point yt+1 i for each constrained sub-function fxt(xi) (b) xt+1 = g(yt+1) (c) Increment t The real computational work of this iterative procedure is in Steps 2(a) and 2(b), although we shall see later that such steps can, in some cases, be performed efficiently. With an appropriate feasibility function g(y), one can guarantee that a fixed-point of this procedure yields a stationary point of the constrained function f(x), by Claim 1.2 Further, any stationary point is trivially a fixed-point of this procedure (one can seed this procedure with such a point). 1Under constraints, we consider points that are stationary with respect to the corresponding Lagrangian. 2We discuss this point further in the supplementary appendix. 2 As we shall show in the next section, the EDML algorithm—which has been proposed for parameter estimation in Bayesian networks—is an instance of the above procedure with some notable observations: (1) the sub-functions fxt(xi) are convex and have unique optima; (2) these sub-functions have an interesting semantics, as they correspond to posterior distributions that are induced by Naive Bayes networks with soft evidence asserted on them; (3) defining these sub-functions requires inference in a Bayesian network parameterized by the current feasible point xt; (4) there are already several convergent, fixed-point iterative methods for finding the unique optimum of these sub-functions; and (5) these convergent methods produce solutions that are always feasible and, hence, the feasibility function g(y) corresponds to the identity function g(y) = y in this case. We next show this connection to EDML as proposed for parameter estimation in Bayesian networks. We follow by deriving an EDML algorithm (another instance of the above procedure), but for parameter estimation in undirected graphical models. We will also study the impact of having complete data on both versions of the EDML algorithm, and finally evaluate the new instance of EDML by comparing it to conjugate gradient and L-BFGS when applied to complete datasets. 3 EDML for Bayesian Networks From here on, we use upper case letters (X) to denote variables and lower case letters (x) to denote their values. Variable sets are denoted by bold-face upper case letters (X) and their instantiations by bold-face lower case letters (x). Generally, we will use X to denote a variable in a Bayesian network and U to denote its parents. A network parameter will therefore have the general form θx|u, representing the probability Pr(X =x|U=u). Consider a (possibly incomplete) dataset D with examples d1, . . . , dN, and a Bayesian network with parameters θ. Our goal is to find parameter estimates θ that minimize the negative log-likelihood: f(θ) = −ℓℓ(θ|D) = − N X i=1 log Pr θ(di). (1) Here, θ = (. . . , θX|u, . . .) is a vector over the network parameters. Moreover, Pr θ is the distribution induced by the Bayesian network structure under parameters θ. As such, Pr θ(di) is the probability of observing example di in dataset D under parameters θ. Each component of θ is a parameter set θX|u, which defines a parameter θx|u for each value x of variable X and instantiation u of its parents U. The feasibility constraint here is that each component θX|u satisfies the convex sum-to-one constraint: P x θx|u = 1. The above parameter estimation problem is clearly in the form of the constrained optimization problem that we phrased in the previous section and, hence, admits the same iterative procedure proposed in that section for finding stationary points. The relevant questions now are: What form do the subfunctions fθ⋆(θX|u) take in this context? What are their semantics? What properties do they have? How do we find their stationary points? What is the feasibility function g(y) in this case? Finally, what is the connection to previous work on EDML? We address these questions next. 3.1 Form We start by characterizing the sub-functions of the negative log-likelihood given in Equation 1. Theorem 1 For each parameter set θX|u, the negative log-likelihood of Equation 1 has the subfunction: fθ⋆(θX|u) = − N X i=1 log  Ci u + X x Ci x|u · θx|u  (2) where Ci u and Ci x|u are constants that are independent of parameter set θX|u, given by Ci u = Pr θ⋆(di) −Pr θ⋆(u, di) and Ci x|u = Pr θ⋆(x, u, di)/θ⋆ x|u To compute the constants Ci, we require inference on a Bayesian network with parameters θ⋆.3 3Theorem 1 assumes tacitly that θ⋆ x|u ̸= 0. More generally, however, Ci x|u = ∂Pr θ⋆(di)/∂θx|u, which can also be computed using some standard inference algorithms [6, 14]. 3 …   …   η1 η2 ηN !X X1 X2 XN Figure 1: Estimation given independent soft observations. 3.2 Semantics Equation 2 has an interesting semantics, as it corresponds to the negative log-likelihood of a root variable in a naive Bayes structure, on which soft, not necessarily hard, evidence is asserted [5].4 This model is illustrated in Figure 1, where our goal is to estimate a parameter set θX, given soft observations η = (η1, . . . , ηN) on variables X1, . . . , XN, where each ηi has a strength specified by a weight on each value xi of Xi. If we denote the distribution of this model by P, then (1) P(θ) denotes a prior over parameters sets,5 (2) P(xi|θX = (. . . , θx, . . .)) = θx, and (3) weights P(ηi|xi) denote the strengths of soft evidence ηi on value xi. The log likelihood of our soft observations η is: log P(η|θX) = N X i=1 log X xi P(ηi|xi)P(xi|θX) = N X i=1 log X xi P(ηi|xi) · θx (3) The following result connects Equation 2 to the above likelihood of a soft dataset, when we now want to estimate the parameter set θX|u, for a particular variable X and parent instantiation u. Theorem 2 Consider Equations 2 and 3, and assume that each soft evidence ηi has the strength P(ηi|xi) = Ci u + Ci x|u. It then follows that fθ⋆(θX|u) = −log P(η|θX|u) (4) This theorem yields the following interesting semantics for EDML sub-functions. Consider a parameter set θX|u and example di in our dataset. The example can then be viewed as providing “votes” on what this parameter set should be. In particular, the vote of example di for value x takes the form of a soft evidence ηi whose strength is given by P(ηi|xi) = Pr θ⋆(di) −Pr θ⋆(u, di) + Pr θ⋆(x, u, di)/θ⋆ x|u The sub-function is then aggregating these votes from different examples and producing a corresponding objective function on parameter set θX|u. EDML optimizes this objective function to produce the next estimate for each parameter set θX|u. 3.3 Properties Equation 2 is a convex function, and thus has a unique optimum.6 In particular, we have logs of a linear function, which are each concave. The sum of two concave functions is also concave, thus our sub-function fθ⋆(θX|u) is convex, and is subject to a convex sum-to-one constraint [16]. Convex functions are relatively well understood, and there are a variety of methods and systems that can be used to optimize Equation 2; see, e.g., [3]. We describe one such approach, next. 3.4 Finding the Unique Optima In every EDML iteration, and for each parameter set θX|u, we seek the unique optimum for each sub-function fθ⋆(θX|u), given by Equation 2. Refaat, et al., has previously proposed a fixed-point 4Soft evidence is an observation that increases or decreases ones belief in an event, but not necessarily to the point of certainty. For more on soft evidence, see [4]. 5Typically, we assume Dirichlet priors for MAP estimation. However, we focus on ML estimation here. 6More specifically, strict convexity implies a unique optimum, although under certain assumptions, we can guarantee that Equation 2 is indeed strictly convex. 4 algorithm that monotonically improves the objective, and is guaranteed to converge [16]. Moreover, the solutions it produces already satisfy the convex sum-to-one constraint and, hence, the feasibility function g ends up being the identity function g(θ) = θ. In particular, we start with some initial feasible estimates θt X|u at iteration t = 0, and then apply the following update equation until convergence: θt+1 x|u = 1 N N X i=1 (Ci u + Ci x|u) · θt x|u Ciu + P x′ Ci x′|u · θt x′|u (5) Note here that constants Ci are computed by inference on a Bayesian network structure under parameters θt (see Theorem 1 for the definitions of these constants). Moreover, while the above procedure is convergent when optimizing sub-functions fθ⋆(θX|u), the global EDML algorithm that is optimizing function f(θ) may not be convergent in general. 3.5 Connection to Previous Work EDML was originally derived by applying an approximate inference algorithm to a meta-network, which is typically used in Bayesian approaches to parameter estimation [5, 16]. This previous formulation of EDML, which is specific to Bayesian networks, now falls as a special instance of the one given in Section 2. In particular, the “sub-problems” defined by the original EDML [5, 16] correspond precisely to the sub-functions fθ⋆(θX|u) described here. Further, both versions of EDML are procedurally identical when they both use the same method for optimizing these sub-functions. The new formulation of EDML is more transparent, however, at least in revealing certain properties of the algorithm. For example, it now follows immediately (from Section 2) that the fixed points of EDML are stationary points of the log-likelihood—a fact that was not proven until [16], using a technique that appealed to the relationship between EDML and EM. Moreover, the proof that EDML under complete data will converge immediately to the optimal estimates is also now immediate (see Section 5). More importantly though, this new formulation provides a systematic procedure for deriving new instances of EDML for additional models, beyond Bayesian networks. Indeed, in the next section, we use this procedure to derive an EDML instance for Markov networks, which is followed by an empirical evaluation of the new algorithm under complete data. 4 EDML for Undirected Models In this section, we show how parameter estimation for undirected graphical models, such as Markov networks, can also be posed as an optimization problem, as described in Section 2. For Markov networks, θ = (. . . , θXa, . . .) is a vector over the network parameters. Component θXa is a parameter set for a (tabular) factor a, assigning a number θxa ≥0 for each instantiation xa of variables Xa. The negative log-likelihood −ℓℓ(θ|D) for a Markov network is: −ℓℓ(θ|D) = N log Zθ − N X i=1 log Zθ(di) (6) where Zθ is the partition function, and where Zθ(di) is the partition function after conditioning on example di, under parameterization θ. Sub-functions with respect to Equation 6 may not be convex, as was the case in Bayesian networks. Consider instead the following objective function, which we shall subsequently relate to the negative log-likelihood: f(θ) = − N X i=1 log Zθ(di), (7) with a feasibility constraint that the partition function Zθ equals some constant α. The following result tells us that it suffices to optimize Equation 7 under the given constraint, to optimize Equation 6. Theorem 3 Let α be a positive constant, and let g(θ) be a (feasibility) function satisfying Zg(θ) = α and g(θxa) ∝θxa for all θxa.7 For every point θ, if g(θ) is optimal for Equation 7, subject to its 7Here, g(θxa) denotes the component of g(θ) corresponding to θxa. Moreover, the function g(θ) can be constructed, e.g., by simply multiplying all entries of one parameter set by α/Zθ. In our experiments, we 5 constraint, then it is also optimal for Equation 6. Moreover, a point θ is stationary for Equation 6 iff the point g(θ) is stationary for Equation 7, subject to its constraint. With Equation 7 as a new (constrained) objective function for estimating the parameters of a Markov network, we can now cast it in the terms of Section 2. We start by characterizing its sub-functions. Theorem 4 For a given parameter set θXa, the objective function of Equation 7 has sub-functions: fθ⋆(θXa) = − N X i=1 log X xa Ci xa · θxa subject to X xa Cxa · θxa = α (8) where Ci xa and Cxa are constants that are independent of the parameter set θXa: Ci xa = Zθ⋆(xa, di)/θ⋆ xa and Cxa = Zθ⋆(xa)/θ⋆ xa. Note that computing these constants requires inference on a Markov network with parameters θ⋆.8 Interestingly, this sub-function is convex, as well as the constraint (which is now linear), resulting in a unique optimum, as in Bayesian networks. However, even when θ⋆is a feasible point, the unique optima of these sub-functions may not be feasible when combined. Thus, the feasibility function g(θ) of Theorem 3 must be utilized in this case. We now have another instance of the iterative algorithm proposed in Section 2, but for undirected graphical models. That is, we have just derived an EDML algorithm for such models. 5 EDML under Complete Data We consider now how EDML simplifies under complete data for both Bayesian and Markov networks, identifying forms and properties of the corresponding sub-functions under complete data. We start with Bayesian networks. Consider a variable X, and a parent instantiation u; and let D#(xu) represent the number of examples that contain xu in the complete dataset D. Equation 2 of Theorem 1 then reduces to: fθ⋆(θX|u) = −P x D#(xu) log θx|u +C, where C is a constant that is independent of parameter set θX|u. Assuming that θ⋆is feasible (i.e., each θX|u satisfies the sumto-one constraint), the unique optimum of this sub-function is θx|u = D#(xu) D#(u) , which is guaranteed to yield a feasible point θ, globally. Hence, EDML produces the unique optimal estimates in its first iteration and terminates immediately thereafter. The situation is different, however, for Markov networks. Under a complete dataset D, Equation 8 of Theorem 4 reduces to: fθ⋆(θXa) = −P xa D#(xa) log θxa + C, where C is a constant that is independent of parameter set θXa. Assuming that θ⋆is feasible (i.e., satisfies Zθ⋆= α), the unique optimum of this sub-function has the closed form: θxa = α N D#(xa) Cxa , which is equivalent to the unique optimum one would obtain in a sub-function for Equation 6 [15, 13]. Contrary to Bayesian networks, the collection of these optima for different parameter sets do not necessarily yield a feasible point θ. Hence, the feasibility function g of Theorem 3 must be applied here. The resulting feasible point, however, may no longer be a stationary point for the corresponding sub-functions, leading EDML to iterate further. Hence, under complete data, EDML for Bayesian networks converges immediately, while EDML for Markov networks may take multiple iterations. Both results are consistent with what is already known in the literature on parameter estimation for Bayesian and Markov networks. The result on Bayesian networks is useful in confirming that EDML performs optimally in this case. The result for Markov networks, however, gives rise to a new algorithm for parameter estimation under complete data. We evaluate the performance of this new EDML algorithm after considering the following example. Let D be a complete dataset over three variables A, B and C, specified in terms of the number of times that each instantiation a, b, c appears in D. In particular, we have the following counts: normalize each parameter set to sum-to-one, but then update the constant α = Zθt for the subsequent iteration. 8Theorem 4 assumes that θ⋆ xa ̸= 0. In general, Ci xa = ∂Zθ⋆(di) ∂θxa , and Cxa = ∂Zθ⋆ ∂θxa . See also Footnote 3. 6 Table 1: Speed-up results of EDML over CG and L-BFGS problem #vars icg iedml tcg (S) il-bfgs i′ edml tl-bfgs (S′) zero 256 45 105 3.62 3.90x 24 74 1.64 1.98x one 256 104 73 8.25 13.26x 58 42 3.87 8.08x two 256 46 154 3.73 2.83x 21 87 1.54 1.54x three 256 43 169 3.58 2.52x 52 169 3.55 1.93x four 256 56 126 4.59 4.31x 61 115 3.90 3.22x five 256 43 155 3.48 2.70x 49 155 3.20 1.90x six 256 48 150 3.93 3.13x 20 90 1.47 1.40x seven 256 57 147 4.64 3.37x 23 89 1.65 1.62x eight 256 48 155 3.82 2.84x 57 154 3.83 2.28x nine 256 56 168 4.46 3.15x 45 141 2.90 1.94x 54.wcsp 67 107.33 160.33 6.56 2.78x 68.33 172 1.80 0.72x or-chain-42 385 120.33 27 0.12 31.27x 110 54.33 0.06 6.43x or-chain-45 715 151 33.67 0.14 12.52x 94.33 36.33 0.06 4.85x or-chain-147 410 107.67 18.67 3.27 80.72x 105 58.33 1.63 12.77x or-chain-148 463 122.67 42.33 1.00 49.04x 80 32 0.28 14.24x or-chain-225 467 181.33 58 0.79 44.14x 137.67 69 0.33 10.76x rbm20 40 9 41 30.98 2.38x 30 107.22 30.18 0.99x Seg2-17 228 63 83.66 1.77 7.00x 46.67 64.67 0.74 4.14x Seg7-11 235 54.3 84 1.86 2.84x 48.66 73.33 1.27 2.32x Family2Dominant.1.5loci 385 117.33 88 2.39 5.90x 85.67 78.33 1.04 2.69x Family2Recessive.15.5loci 385 111.6 89.7 1.31 3.85x 86.33 81.67 0.74 2.18x grid10x10.f5.wrap 100 136.67 239 17.36 6.26x 142 180.33 10.30 4.63x grid10x10.f10.wrap 100 101.33 62.33 12.39 20.92x 92.67 59 5.94 9.70x average 275.65 83.89 101.29 5.39 13.55x 66.84 94.89 3.56 4.45x D#(a, b, c) = 4, D#(a, b, ¯c) = 18, D#(a,¯b, c) = 2, D#(a,¯b, ¯c) = 13, D#(¯a, b, c) = 1, D#(¯a, b, ¯c) = 1, D#(¯a,¯b, c) = 42, and D#(¯a,¯b, ¯c) = 19. Suppose we want to learn, from this dataset, a Markov network with 3 edges, (A, B), (B, C) and (A, C), with the corresponding parameter sets θAB, θBC and θAC. If the initial set of parameters θ⋆= (θ⋆ AB, θ⋆ BC, θ⋆ AC) is uniform, i.e., θ⋆ XY = (1, 1, 1, 1), then Equation 8 gives the sub-function fθ⋆(θAB) = −22 · log θab −15 · log θa¯b −2 · log θ¯ab −61 · log θ¯a¯b. Moreover, we have Zθ⋆= 2 · θab + 2 · θa¯b + 2 · θ¯ab + 2 · θ¯a¯b. Minimizing fθ⋆(θAB) under Zθ⋆= α = 2 corresponds to solving a convex optimization problem, which has the unique solution: (θab, θa¯b, θ¯ab, θa¯b) = ( 22 100, 15 100, 2 100, 61 100). We solve similar convex optimization problems for the other parameter sets θBC and θAC, to update estimates θ⋆. We then apply an appropriate feasibility function g (see Footnote 7), and repeat until convergence. 6 Experimental Results We evaluate now the efficiency of EDML, conjugate gradient (CG) and Limited-memory BFGS (L-BFGS), when learning Markov networks under complete data.9 We first learned grid-structured pairwise MRFs from the CEDAR dataset of handwritten digits, which has 10 datasets (one for each digit) of 16×16 binary images. We also simulated datasets from networks used in the probabilistic inference evaluations of UAI-2008, 2010 and 2012, that are amenable to jointree inference.10 For each network, we simulated 3 datasets of size 210 examples each, and learned parameters using the original structure. Experiments were run on a 3.6GHz Intel i5 CPU with access to 8GB RAM. We used the CG implementation in the Apache Commons Math library, and the L-BFGS implementation in Mallet.11 Both are Java libraries, and our implementation of EDML is also in Java. More importantly, all of the CG, L-BFGS, and EDML methods rely on the same underlying engine for 9We also considered Iterative Proportional Fitting (IPF) as a baseline. However, IPF does not scale to our benchmarks, as it invokes inference many times more often than the methods we considered. 10Network 54.wcsp is a weighted CSP problem; or-chain-{42, 45, 147, 148, 225} are from the Promedas suite; rbm-20 is a restricted Boltzmann machine; Seg2-17, Seg7-11 are from the Segmentation suite; family2-dominant.1.5loci, family2-recessive.15.5loci are genetic linkage analysis networks; and grid10x10.f5.wrap, grid10x10.10.wrap are 10x10 grid networks. 11Available at http://commons.apache.org/ and http://mallet.cs.umass.edu/. 7 exact inference.12 For EDML, we damped parameter estimates at each iteration, which is typical for algorithms like loopy belief propagation, which EDML was originally inspired by [5].13 We used Brent’s method with default settings for line search in CG, which was the most efficient over all univariate solvers in Apache’s library, which we evaluated in initial experiments. We first run CG until convergence (or after exceeding 30 minutes) to obtain parameter estimates of some quality qcg (in log likelihood), recording the number of iterations icg and time tcg required in minutes. EDML is then run next until it obtains an estimate of the same quality qcg, or better, recording also the number of iterations iedml and time tedml in minutes. The time speed-up S of EDML over CG is computed as tcg/tedml. We also performed the same comparison with LBFGS instead of CG, recording the corresponding number of iterations (il-bfgs, i′ edml) and time taken (tl-bfgs, t′ edml), giving us the speed-up of EDML over L-BFGS as S′ = tl-bfgs/t′ edml. Table 1 shows results for both sets of experiments. It shows the number of variables in each network (#vars), the average number of iterations taken by each algorithm, and the average speed-up achieved by EDML over CG (L-BFGS).14 On the given benchmarks, we see that on average EDML was roughly 13.5× faster than CG, and 4.5× faster than L-BFGS. EDML was up to an order-ofmagnitude faster than L-BFGS in some cases. In many cases, EDML required more iterations but was still faster in time. This is due in part by the number of times inference is invoked by CG and L-BFGS (in line search), whereas EDML only needs to invoke inference once per iteration. 7 Related Work As an iterative fixed-point algorithm, we can view EDML as a Jacobi-type method, where updates are performed in parallel [1]. Alternatively, a version of EDML using Gauss-Seidel iterations would update each parameter set in sequence using the most recently computed update. This leads to an algorithm that monotonically improves the log likelihood at each update. In this case, we obtain a coordinate descent algorithm, Iterative Proportional Fitting (IPF) [9], as a special case of EDML. The notion of fixing all parameters, except for one, has been exploited before for the purposes of optimizing the log likelihood of a Markov network, as a heuristic for structure learning [15]. This notion also underlies the IPF algorithm; see, e.g., [13], Section 19.5.7. In the case of complete data, the resulting sub-function is convex, yet for incomplete data, it is not necessarily convex. Optimization methods such as conjugate gradient, and L-BFGS [12], are more commonly used to optimize the parameters of a Markov network. For relational Markov networks or Markov networks that otherwise assume a feature-based representation [8], evaluating the likelihood is typically intractable, in which case one typically optimizes instead the pseudo-log-likelihood [2]. For more on parameter estimation in Markov networks, see [10, 13]. 8 Conclusion In this paper, we provided an abstract and simple view of the EDML algorithm, originally proposed for parameter estimation in Bayesian networks, as a particular method for continuous optimization. One consequence of this view is that it is immediate that fixed-points of EDML are stationary points of the log-likelihood, and vice-versa [16]. A more interesting consequence, is that it allows us to propose an EDML algorithm for a new class of models, Markov networks. Empirically, we find that EDML can more efficiently learn parameter estimates for Markov networks under complete data, compared to conjugate gradient and L-BFGS, sometimes by an order-of-magnitude. The empirical evaluation of EDML for Markov networks under incomplete data is left for future work. Acknowledgments This work has been partially supported by ONR grant #N00014-12-1-0423. 12For exact inference in Markov networks, we employed a jointree algorithm from the SAMIAM inference library, http://reasoning.cs.ucla.edu/samiam/. 13 We start with an initial factor of 1 2, which we tighten as we iterate. 14 For CG, we used a threshold based on relative change in the likelihood at 10−4. We used Mallet’s default convergence threshold for L-BFGS. 8 References [1] Dimitri P. Bertsekas and John N. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Prentice-Hall, 1989. [2] J. Besag. Statistical Analysis of Non-Lattice Data. The Statistician, 24:179–195, 1975. [3] Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [4] Hei Chan and Adnan Darwiche. On the revision of probabilistic beliefs using uncertain evidence. AIJ, 163:67–90, 2005. [5] Arthur Choi, Khaled S. Refaat, and Adnan Darwiche. EDML: A method for learning parameters in Bayesian networks. In UAI, 2011. [6] Adnan Darwiche. A differential approach to inference in Bayesian networks. JACM, 50(3):280–305, 2003. [7] A.P. Dempster, N.M. Laird, and D.B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, 39:1–38, 1977. [8] Pedro Domingos and Daniel Lowd. Markov Logic: An Interface Layer for Artificial Intelligence. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2009. [9] Radim Jirousek and Stanislav Preucil. On the effective implementation of the iterative proportional fitting procedure. Computational Statistics & Data Analysis, 19(2):177–189, 1995. [10] Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [11] S. L. Lauritzen. The EM algorithm for graphical association models with missing data. Computational Statistics and Data Analysis, 19:191–201, 1995. [12] D. C. Liu and J. Nocedal. On the Limited Memory BFGS Method for Large Scale Optimization. Mathematical Programming, 45(3):503–528, 1989. [13] Kevin Patrick Murphy. Machine Learning: A Probabilistic Perspective. MIT Press, 2012. [14] James Park and Adnan Darwiche. A differential semantics for jointree algorithms. AIJ, 156:197–216, 2004. [15] Stephen Della Pietra, Vincent J. Della Pietra, and John D. Lafferty. Inducing features of random fields. IEEE Trans. Pattern Anal. Mach. Intell., 19(4):380–393, 1997. [16] Khaled S. Refaat, Arthur Choi, and Adnan Darwiche. New advances and theoretical insights into EDML. In UAI, pages 705–714, 2012. 9
2013
257
4,995
Flexible sampling of discrete data correlations without the marginal distributions Alfredo Kalaitzis Department of Statistical Science and CSML University College London a.kalaitzis@ucl.ac.uk Ricardo Silva Department of Statistical Science and CSML University College London ricardo@stats.ucl.ac.uk Abstract Learning the joint dependence of discrete variables is a fundamental problem in machine learning, with many applications including prediction, clustering and dimensionality reduction. More recently, the framework of copula modeling has gained popularity due to its modular parameterization of joint distributions. Among other properties, copulas provide a recipe for combining flexible models for univariate marginal distributions with parametric families suitable for potentially high dimensional dependence structures. More radically, the extended rank likelihood approach of Hoff (2007) bypasses learning marginal models completely when such information is ancillary to the learning task at hand as in, e.g., standard dimensionality reduction problems or copula parameter estimation. The main idea is to represent data by their observable rank statistics, ignoring any other information from the marginals. Inference is typically done in a Bayesian framework with Gaussian copulas, and it is complicated by the fact this implies sampling within a space where the number of constraints increases quadratically with the number of data points. The result is slow mixing when using off-the-shelf Gibbs sampling. We present an efficient algorithm based on recent advances on constrained Hamiltonian Markov chain Monte Carlo that is simple to implement and does not require paying for a quadratic cost in sample size. 1 Contribution There are many ways of constructing multivariate discrete distributions: from full contingency tables in the small dimensional case [1], to structured models given by sparsity constraints [11] and (hierarchies of) latent variable models [6]. More recently, the idea of copula modeling [16] has been combined with such standard building blocks. Our contribution is a novel algorithm for efficient Markov chain Monte Carlo (MCMC) for the copula framework introduced by [7], extending algorithmic ideas introduced by [17]. A copula is a continuous cumulative distribution function (CDF) with uniformly distributed univariate marginals in the unit interval [0, 1]. It complements graphical models and other formalisms that provide a modular parameterization of joint distributions. The core idea is simple and given by the following observation: suppose we are given a (say) bivariate CDF F(y1, y2) with marginals F1(y1) and F2(y2). This CDF can then be rewritten as F(F −1 1 (F1(y1)), F −1 2 (F2(y2))). The function C(·, ·) given by F(F −1 1 (·), F −1 2 (·)) is a copula. For discrete distributions, this decomposition is not unique but still well-defined [16]. Copulas have found numerous applications in statistics and machine learning since they provide a way of constructing flexible multivariate distributions by mix-and-matching different copulas with different univariate marginals. For instance, one can combine flexible univariate marginals Fi(·) with useful but more constrained high-dimensional copulas. We will not further motivate the use of copula models, which has been discussed at length in recent 1 machine learning publications and conference workshops, and for which comprehensive textbooks exist [e.g., 9]. For a recent discussion on the applications of copulas from a machine learning perspective, [4] provides an overview. [10] is an early reference in machine learning. The core idea dates back at least to the 1950s [16]. In the discrete case, copulas can be difficult to apply: transforming a copula CDF into a probability mass function (PMF) is computationally intractable in general. For the continuous case, a common trick goes as follows: transform variables by defining ai ≡ˆFi(yi) for an estimate of Fi(·) and then fit a copula density c(·, . . . , ·) to the resulting ai [e.g. 9]. It is not hard to check this breaks down in the discrete case [7]. An alternative is to represent the CDF to PMF transformation for each data point by a continuous integral on a bounded space. Sampling methods can then be used. This trick has allowed many applications of the Gaussian copula to discrete domains. Readers familiar with probit models will recognize the similarities to models where an underlying latent Gaussian field is discretized into observable integers as in Gaussian process classifiers and ordinal regression [18]. Such models can be indirectly interpreted as special cases of the Gaussian copula. In what follows, we describe in Section 2 the Gaussian copula and the general framework for constructing Bayesian estimators of Gaussian copulas by [7], the extended rank likelihood framework. This framework entails computational issues which are discussed. A recent general approach for MCMC in constrained Gaussian fields by [17] can in principle be directly applied to this problem as a blackbox, but at a cost that scales quadratically in sample size and as such it is not practical in general. Our key contribution is given in Section 4. An application experiment on the Bayesian Gaussian copula factor model is performed in Section 5. Conclusions are discussed in the final section. 2 Gaussian copulas and the extended rank likelihood It is not hard to see that any multivariate Gaussian copula is fully defined by a correlation matrix C, since marginal distributions have no free parameters. In practice, the following equivalent generative model is used to define a sample U according to a Gaussian copula GC(C): 1. Sample Z from a zero mean Gaussian with covariance matrix C 2. For each Zj, set Uj = Φ(zj), where Φ(·) is the CDF of the standard Gaussian It is clear that each Uj follows a uniform distribution in [0, 1]. To obtain a model for variables {y1, y2, . . . , yp} with marginal distributions Fj(·) and copula GC(C), one can add the deterministic step yj = F −1 j (uj). Now, given n samples of observed data Y ≡{y(1) 1 , . . . , y(1) p , y(2) 1 , . . . , y(n) p }, one is interested on inferring C via a Bayesian approach and the posterior distribution p(C, θF | Y) ∝pGC(Y | C, θF )π(C, θF ) where π(·) is a prior distribution, θF are marginal parameters for each Fj(·), which in general might need to be marginalized since they will be unknown, and pGC(·) is the PMF of a (here discrete) distribution with a Gaussian copula and marginals given by θF . Let Z be the underlying latent Gaussians of the corresponding copula for dataset Y. Although Y is a deterministic function of Z, this mapping is not invertible due to the discreteness of the distribution: each marginal Fj(·) has jumps. Instead, the reverse mapping only enforces the constraints where y(i1) j < y(i2) j implies z(i1) j < z(i2) j . Based on this observation, [7] considers the event Z ∈D(y), where D(y) is the set of values of Z in Rn×p obeying those constraints, that is D(y) ≡ n Z ∈Rn×p : max n z(k) j s.t. y(k) j < y(i) j o < z(i) j < min n z(k) j s.t. y(i) j < y(k) j oo . Since {Y = y} ⇒Z(y) ∈D(y), we have pGC(Y | C, θF ) = pGC(Z ∈D(y), Y | C, θF ) = pN (Z ∈D(y) | C) × pGC(Y| Z ∈D(y), C, θF ), (1) the first factor of the last line being that of a zero-mean a Gaussian density function marginalized over D(y). 2 The extended rank likelihood is defined by the first factor of (1). With this likelihood, inference for C is given simply by marginalizing p(C, Z | Y) ∝I(Z ∈D(y)) pN (Z| C) π(C), (2) the first factor of the right-hand side being the usual binary indicator function. Strictly speaking, this is not a fully Bayesian method since partial information on the marginals is ignored. Nevertheless, it is possible to show that under some mild conditions there is information in the extended rank likelihood to consistently estimate C [13]. It has two important properties: first, in many applications where marginal distributions are nuisance parameters, this sidesteps any major assumptions about the shape of {Fi(·)} – applications include learning the degree of dependence among variables (e.g., to understand relationships between social indicators as in [7] and [13]) and copula-based dimensionality reduction (a generalization of correlation-based principal component analysis, e.g., [5]); second, MCMC inference in the extended rank likelihood is conceptually simpler than with the joint likelihood, since dropping marginal models will remove complicated entanglements between C and θF . Therefore, even if θF is necessary (when, for instance, predicting missing values of Y), an estimate of C can be computed separately and will not depend on the choice of estimator for {Fi(·)}. The standard model with a full correlation matrix C can be further refined to take into account structure implied by sparse inverse correlation matrices [2] or low rank decompositions via higher-order latent variable models [13], among others. We explore the latter case in section 5. An off-the-shelf algorithm for sampling from (2) is full Gibbs sampling: first, given Z, the (full or structured) correlation matrix C can be sampled by standard methods. More to the point, sampling Z is straightforward if for each variable j and data point i we sample Z(i) j conditioned on all other variables. The corresponding distribution is an univariate truncated Gaussian. This is the approach used originally by Hoff. However, mixing can be severely compromised by the sampling of Z, and that is where novel sampling methods can facilitate inference. 3 Exact HMC for truncated Gaussian distributions Hoff’s algorithm modifies the positions of all Z(i) j associated with a particular discrete value of Yj, conditioned on the remaining points. As the number of data points increases, the spread of the hard boundaries on Z(i) j , given by data points of Zj associated with other levels of Yj, increases. This reduces the space in which variables Z(i) j can move at a time. To improve the mixing, we aim to sample from the joint Gaussian distribution of all latent variables Z(i) j , i = 1 . . . n , conditioned on other columns of the data, such that the constraints between them are satisfied and thus the ordering in the observation level is conserved. Standard Gibbs approaches for sampling from truncated Gaussians reduce the problem to sampling from univariate truncated Gaussians. Even though each step is computationally simple, mixing can be slow when strong correlations are induced by very tight truncation bounds. In the following, we briefly describe the methodology recently introduced by [17] that deals with the problem of sampling from log p(x) ∝−1 2x⊤Mx + r⊤x , where x, r ∈Rn and M is positive definite, with linear constraints of the form f ⊤ j x ≤gj , where fj ∈Rn, j = 1 . . . m, is the normal vector to some linear boundary in the sample space. Later in this section we shall describe how this framework can be applied to the Gaussian copula extended rank likelihood model. More importantly, the observed rank statistics impose only linear constraints of the form xi1 ≤xi2 . We shall describe how this special structure can be exploited to reduce the runtime complexity of the constrained sampler from O(n2) (in the number of observations) to O(n) in practice. 3.1 Hamiltonian Monte Carlo for the Gaussian distribution Hamiltonian Monte Carlo (HMC) [15] is a MCMC method that extends the sampling space with auxiliary variables so that (ideally) deterministic moves in the joint space brings the sampler to 3 potentially far places in the original variable space. Deterministic moves cannot in general be done, but this is possible in the Gaussian case. The form of the Hamiltonian for the general d-dimensional Gaussian case with mean µ and precision matrix M is: H = 1 2 x⊤Mx −r⊤x + 1 2 s⊤M−1s , (3) where M is also known in the present context as the mass matrix, r = Mµ and s is the velocity. Both x and s are Gaussian distributed so this Hamiltonian can be seen (up to a constant) as the negative log of the product of two independent Gaussian random variables. The physical interpretation is that of a sum of potential and kinetic energy terms, where the total energy of the system is conserved. In a system where this Hamiltonian function is constant, we can exactly compute its evolution through the pair of differential equations: ˙x = ∇sH = M−1s , ˙s = −∇xH = −Mx + r . (4) These are solved exactly by x(t) = µ+a sin(t)+b cos(t) , where a and b can be identified at initial conditions (t = 0) : a = ˙x(0) = M−1s , b = x(0) −µ . (5) Therefore, the exact HMC algorithm can be summarised as follows: • Initialise the allowed travel time T and some initial position x0 . • Repeat for HMC samples k = 1 . . . N 1. Sample sk ∼N (0, M) 2. Use sk and xk to update a and b and store the new position at the end of the trajectory xk+1 = x(T) as an HMC sample. It can be easily shown that the Markov chain of sampled positions has the desired equilibrium distribution N µ, M−1 [17]. 3.2 Sampling with linear constraints Sampling from multivariate Gaussians does not require any method as sophisticated as HMC, but the plot thickens when the target distribution is truncated by linear constraints of the form Fx ≤g . Here, F ∈Rm×n is a constraint matrix whose every row is the normal vector to a linear boundary in the sample space. This is equivalent to sampling from a Gaussian that is confined in the (not necessarily bounded) convex polyhedron {x : Fx ≤g}. In general, to remain within the boundaries of each wall, once a new velocity has been sampled one must compute all possible collision times with the walls. The smallest of all collision times signifies the wall that the particle should bounce from at that collision time. Figure 1 illustrates the concept with two simple examples on 2 and 3 dimensions. The collision times can be computed analytically and their equations can be found in the supplementary material. We also point the reader to [17] for a more detailed discussion of this implementation. Once the wall to be hit has been found, then position and velocity at impact time are computed and the velocity is reflected about the boundary normal1. The constrained HMC sampler is summarized follows: • Initialise the allowed travel time T and some initial position x0 . • Repeat for HMC samples k = 1 . . . N 1. Sample sk ∼N (0, M) 2. Use sk and xk to update a and b . 1Also equivalent to transforming the velocity with a Householder reflection matrix about the bounding hyperplane. 4 1 2 3 4 1 2 3 4 Figure 1: Left: Trajectories of the first 40 iterations of the exact HMC sampler on a 2D truncated Gaussian. A reflection of the velocity can clearly be seen when the particle meets wall #2 . Here, the constraint matrix F is a 4 × 2 matrix. Center: The same example after 40000 samples. The coloring of each sample indicates its density value. Right: The anatomy of a 3D Gaussian. The walls are now planes and in this case F is a 2 × 3 matrix. Figure best seen in color. 3. Reset remaining travel time Tleft ←T . Until no travel time is left or no walls can be reached (no solutions exist), do: (a) Compute impact times with all walls and pick the smallest one, th (if a solution exists). (b) Compute v(th) and reflect it about the hyperplane fh . This is the updated velocity after impact. The updated position is x(th) . (c) Tleft ←Tleft −th 4. Store the new position at the end of the trajectory xk+1 as an HMC sample. In general, all walls are candidates for impact, so the runtime of the sampler is linear in m , the number of constraints. This means that the computational load is concentrated in step 3(a). Another consideration is that of the allocated travel time T . Depending on the shape of the bounding polyhedron and the number of walls, a very large travel time can induce many more bounces thus requiring more computations per sample. On the other hand, a very small travel time explores the distribution more locally so the mixing of the chain can suffer. What constitutes a given travel time “large” or “small” is relative to the dimensionality, the number of constraints and the structure of the constraints. Due to the nature of our problem, the number of constraints, when explicitly expressed as linear functions, is O(n2) . Clearly, this restricts any direct application of the HMC framework for Gaussian copula estimation to small-sample (n) datasets. More importantly, we show how to exploit the structure of the constraints to reduce the number of candidate walls (prior to each bounce) to O(n) . 4 HMC for the Gaussian Copula extended rank likelihood model Given some discrete data Y ∈Rn×p , the task is to infer the correlation matrix of the underlying Gaussian copula. Hoff’s sampling algorithm proceeds by alternating between sampling the continuous latent representation Z(i) j of each Y (i) j , for i = 1 . . . n, j = 1 . . . p , and sampling a covariance matrix from an inverse-Wishart distribution conditioned on the sampled matrix Z ∈Rn×p , which is then renormalized as a correlation matrix. From here on, we use matrix notation for the samples, as opposed to the random variables – with Zi,j replacing Z(i) j , Z:,j being a column of Z, and Z:,\j being the submatrix of Z without the j-th column. In a similar vein to Hoff’s sampling algorithm, we replace the successive sampling of each Zi,j conditioned on Zi,\j (a conditional univariate truncated Gaussian) with the simultaneous sampling of Z:,j conditioned on Z:,\j. This is done through an HMC step from a conditional multivariate truncated Gaussian. The added benefit of this HMC step over the standard Gibbs approach, is that of a handle for regulating the trade-off between exploration and runtime via the allocated travel time T. Larger travel times potentially allow for larger moves in the sample space, but it comes at a cost as explained in the sequel. 5 4.1 The Hough envelope algorithm The special structure of constraints. Recall that the number of constraints is quadratic in the dimension of the distribution. This is because every Z sample must satisfy the conditions of the event Z ∈D(y) of the extended rank likelihood (see Section 2). In other words, for any column Z:,j , all entries are organised into a partition L(j) of |L(j)| levels, the number of unique values observed for the discrete or ordinal variable Y (j) . Thereby, for any two adjacent levels lk, lk+1 ∈L(j) and any pair i1 ∈lk, i2 ∈lk+1, it must be true that Zli,j < Zli+1,j . Equivalently, a constraint f exists where fi1 = 1, fi2 = −1 and g = 0 . It is easy to see that O(n2) of such constraints are induced by the order statistics of the j-th variable. To deal with this boundary explosion, we developed the Hough Envelope algorithm to search efficiently, within all pairs in {Z:,j}, in practically linear time. Recall in HMC (section 3.2) that the trajectory of the particle, x(t), is decomposed as xi(t) = ai sin(t) + bi cos(t) + µi , (6) and there are n such functions, grouped into a partition of levels as described above. The Hough envelope2 is found for every pair of adjacent levels. We illustrate this with an example of 10 dimensions and two levels in Figure 2, without loss of generalization to any number of levels or dimensions. Assume we represent trajectories for points in level lk with blue curves, and points in lk+1 with red curves. Assuming we start with a valid state, at time t = 0 all red curves are above all blue curves. The goal is to find the smallest t where a blue curve meets a red curve. This will be our collision time where a bounce will be necessary. 0.2 0.4 0.6 0.8 1 1.2 1.4 123 4 5 1 2 3 4 5 t Figure 2: The trajectories xj(t) of each component are sinusoid functions. The right-most green dot signifies the wall and the time th of the earliest bounce, where the first inter-level pair (that is, any two components respectively from the blue and red level) becomes equal, in this case the constraint activated being xblue2 = xred2 . 1. First we find the largest component bluemax of the blue level at t = 0. This takes O(n) time. Clearly, this will be the largest component until its sinusoid intersects that of any other component. 2. To find the next largest component, compute the roots of xbluemax(t) −xi(t) = 0 for all components and pick the smallest (earliest) one (represented by a green dot). This also takes O(n) time. 3. Repeat this procedure until a red sinusoid crosses the highest running blue sinusoid. When this happens, the time of earliest bounce and its constraint are found. In the worst-case scenario, n such repetitions have to be made, but in practice we can safely assume an fixed upper bound h on the number of blue crossings before a inter-level crossing occurs. In experiments, we found h << n, no more than 10 in simulations with hundreds of thousands of curves. Thus, this search strategy takes O(n) time in practice to complete, mirroring the analysis of other output-sensitive algorithms such as the gift wrapping algorithm for computing convex hulls [8]. Our HMC sampling approach is summarized in Algorithm 1. 2The name is inspired from the fact that each xi(t) is the sinusoid representation, in angle-distance space, of all lines that pass from the (ai, bi) point in a −b space. A representation known in image processing as the Hough transform [3]. 6 Algorithm 1 HMC for GCERL # Notation: T MN(µ, C, F) is a truncated multivariate normal with location vector µ, scale matrix C and constraints encoded by F and g = 0 . # IW(df, V0) is an inverse-Wishart prior with degrees of freedom df and scale matrix V0 . Input: Y ∈Rn×p, allocated travel time T, a starting Z and variable covariance V ∈Rp×p , df = p + 2, V0 = dfIp and chain size N . Generate constraints F(j) from Y:,j , for j = 1 . . . p . for samples k = 1 . . . N do # Resample Z as follows: for variables j = 1 . . . p do Compute parameters: σ2 j = Vjj −Vj,\jV−1 \j,\jV\j,j , µj = Z:,\jV−1 \j,\jV\j,j . Get one sample Z:,j ∼T MN µj, σ2 j I, F(j) efficiently by using the Hough Envelope algorithm, see section 4.1. end for Resample V ∼IW(df + n, V0 + Z⊤Z) . Compute correlation matrix C, s.t. Ci,j = Vi,j/ p Vi,iVj,j and store sample, C(k) ←C . end for 5 An application on the Bayesian Gausian copula factor model In this section we describe an experiment that highlights the benefits of our HMC treatment, compared to a state-of-the-art parameter expansion (PX) sampling scheme. During this experiment we ask the important question: “How do the two schemes compare when we exploit the full-advantage of the HMC machinery to jointly sample parameters and the augmented data Z, in a model of latent variables and structured correlations?” We argue that under such circumstances the superior convergence speed and mixing of HMC undeniably compensate for its computational overhead. Experimental setup In this section we provide results from an application on the Gaussian copula latent factor model of [13] (Hoff’s model [7] for low-rank structured correlation matrices). We modify the parameter expansion (PX) algorithm used by [13] by replacing two of its Gibbs steps with a single HMC step. We show a much faster convergence to the true mode with considerable support on its vicinity. We show that unlike the HMC, the PX algorithm falls short of properly exploring the posterior in any reasonable finite amount of time, even for small models, even for small samples. Worse, PX fails in ways one cannot easily detect. Namely, we sample each row of the factor loadings matrix Λ jointly with the corresponding column of the augmented data matrix Z, conditioning on the higher-order latent factors. This step is analogous to Pakman and Paninski’s [17, sec.3.1] use of HMC in the context of a binary probit model (the extension to many levels in the discrete marginal is straightforward with direct application of the constraint matrix F and the Hough envelope algorithm). The sampling of the higher level latent factors remains identical to [13]. Our scheme involves no parameter expansion. We do however interweave the Gibbs step for the Z matrix similarly to Hoff. This has the added benefit of exploring the Z sample space within their current boundaries, complementing the joint (λ, z) sampling which moves the boundaries jointly. The value of such ”interweaving” schemes has been addressed in [19]. Results We perform simulations of 10000 iterations, n = 1000 observations (rows of Y), travel time π/2 for HMC with the setups listed in the following table, along with the elapsed times of each sampling scheme. These experiments were run on Intel COREi7 desktops with 4 cores and 8GB of RAM. Both methods were parallelized across the observed variables (p). Figure p (vars) k (latent factors) M (ordinal levels) elapsed (mins): HMC PX 3(a) : 20 5 2 115 8 3(b) : 10 3 2 80 6 3(c) : 10 3 5 203 16 Many functionals of the loadings matrix Λ can be assessed. We focus on reconstructing the true (low-rank) correlation matrix of the Gaussian copula. In particular, we summarize the algorithm’s 7 outcome with the root mean squared error (RMSE) of the differences between entries of the ground-truth correlation matrix and the implied correlation matrix at each iteration of a MCMC scheme (so the following plots looks like a time-series of 10000 timepoints), see Figures 3(a), 3(b) and 3(c) . (a) (b) (c) Figure 3: Reconstruction (RMSE per iteration) of the low-rank structured correlation matrix of the Gaussian copula and its histogram (along the left side). (a) Simulation setup: 20 variables, 5 factors, 5 levels. HMC (blue) reaches a better mode faster (in iterations/CPU-time) than PX (red). Even more importantly the RMSE posterior samples of PX are concentrated in a much smaller region compared to HMC, even after 10000 iterations. This illustrates that PX poorly explores the true distribution. (b) Simulation setup: 10 vars, 3 factors, 2 levels. We observe behaviors similar to Figure 3(a). Note that the histogram counts RMSEs after the burn-in period of PX (iteration #500). (c) Simulation setup: 10 vars, 3 factors, 5 levels. We observe behaviors similar to Figures 3(a) and 3(b) but with a thinner tail for HMC. Note that the histogram counts RMSEs after the burn-in period of PX (iteration #2000). Main message HMC reaches a better mode faster (iterations/CPUtime). Even more importantly the RMSE posterior samples of PX are concentrated in a much smaller region compared to HMC, even after 10000 iterations. This illustrates that PX poorly explores the true distribution. As an analogous situation we refer to the top and bottom panels of Figure 14 of Radford Neal’s slice sampler paper [14]. If there was no comparison against HMC, there would be no evidence from the PX plot alone that the algorithm is performing poorly. This mirrors Radford Neal’s statement opening Section 8 of his paper: “a wrong answer is obtained without any obvious indication that something is amiss”. The concentration on the posterior mode of PX in these simulations is misleading of the truth. PX might seen a bit simpler to implement, but it seems one cannot avoid using complex algorithms for complex models. We urge practitioners to revisit their past work with this model to find out by how much credible intervals of functionals of interest have been overconfident. Whether trivially or severely, our algorithm offers the first principled approach for checking this out. 6 Conclusion Sampling large random vectors simultaneously in order to improve mixing is in general a very hard problem, and this is why clever methods such as HMC or elliptical slice sampling [12] are necessary. We expect that the method here developed is useful not only for those with data analysis problems within the large family of Gaussian copula extended rank likelihood models, but the method itself and its behaviour might provide some new insights on MCMC sampling in constrained spaces in general. Another direction of future work consists of exploring methods for elliptical copulas, and related possible extensions of general HMC for non-Gaussian copula models. Acknowledgements The quality of this work has benefited largely from comments by our anonymous reviewers and useful discussions with Simon Byrne and Vassilios Stathopoulos. Research was supported by EPSRC grant EP/J013293/1. 8 References [1] Y. Bishop, S. Fienberg, and P. Holland. Discrete Multivariate Analysis: Theory and Practice. MIT Press, 1975. [2] A. Dobra and A. Lenkoski. Copula Gaussian graphical models and their application to modeling functional disability data. Annals of Applied Statistics, 5:969–993, 2011. [3] R. O. Duda and P. E. Hart. Use of the Hough transformation to detect lines and curves in pictures. Communications of the ACM, 15(1):11–15, 1972. [4] G. Elidan. Copulas and machine learning. Proceedings of the Copulae in Mathematical and Quantitative Finance workshop, to appear, 2013. [5] F. Han and H. Liu. Semiparametric principal component analysis. Advances in Neural Information Processing Systems, 25:171–179, 2012. [6] G. Hinton and R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [7] P. Hoff. Extending the rank likelihood for semiparametric copula estimation. Annals of Applied Statistics, 1:265–283, 2007. [8] R. Jarvis. On the identification of the convex hull of a finite set of points in the plane. Information Processing Letters, 2(1):18–21, 1973. [9] H. Joe. Multivariate Models and Dependence Concepts. Chapman-Hall, 1997. [10] S. Kirshner. Learning with tree-averaged densities and distributions. Neural Information Processing Systems, 2007. [11] S. Lauritzen. Graphical Models. Oxford University Press, 1996. [12] I. Murray, R. Adams, and D. MacKay. Elliptical slice sampling. JMLR Workshop and Conference Proceedings: AISTATS 2010, 9:541–548, 2010. [13] J. Murray, D. Dunson, L. Carin, and J. Lucas. Bayesian Gaussian copula factor models for mixed data. Journal of the American Statistical Association, to appear, 2013. [14] R. Neal. Slice sampling. The Annals of Statistics, 31:705–767, 2003. [15] R. Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, pages 113–162, 2010. [16] R. Nelsen. An Introduction to Copulas. Springer-Verlag, 2007. [17] A. Pakman and L. Paninski. Exact Hamiltonian Monte Carlo for truncated multivariate Gaussians. arXiv:1208.4118, 2012. [18] C. Rasmussen and C. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [19] Y. Yu and X. L. Meng. To center or not to center: That is not the question — An ancillaritysufficiency interweaving strategy (ASIS) for boosting MCMC efficiency. Journal of Computational and Graphical Statistics, 20(3):531–570, 2011. 9
2013
258
4,996
Designed Measurements for Vector Count Data 1Liming Wang, 1David Carlson, 2Miguel Dias Rodrigues, 3David Wilcox, 1Robert Calderbank and 1Lawrence Carin 1Department of Electrical and Computer Engineering, Duke University 2Department of Electronic and Electrical Engineering, University College London 3Department of Chemistry, Purdue University {liming.w, david.carlson, robert.calderbank, lcarin}@duke.edu m.rodrigues@ucl.ac.uk wilcoxds@purdue.edu Abstract We consider design of linear projection measurements for a vector Poisson signal model. The projections are performed on the vector Poisson rate, X ∈Rn +, and the observed data are a vector of counts, Y ∈Zm +. The projection matrix is designed by maximizing mutual information between Y and X, I(Y ; X). When there is a latent class label C ∈{1, . . . , L} associated with X, we consider the mutual information with respect to Y and C, I(Y ; C). New analytic expressions for the gradient of I(Y ; X) and I(Y ; C) are presented, with gradient performed with respect to the measurement matrix. Connections are made to the more widely studied Gaussian measurement model. Example results are presented for compressive topic modeling of a document corpora (word counting), and hyperspectral compressive sensing for chemical classification (photon counting). 1 Introduction There is increasing interest in exploring connections between information and estimation theory. For example, mutual information and conditional mean estimation have been discovered to possess close interrelationships. The derivative of mutual information in a scalar Gaussian channel [11] has been expressed in terms of the minimum mean-squared error (MMSE). The connections have also been extended from the scalar Gaussian to the scalar Poisson channel model [12]. The gradient of mutual information in a vector Gaussian channel [17] has been expressed in terms of the MMSE matrix. It has also been found that the relative entropy can be represented in terms of the mismatched MMSE estimates [23, 24]. Recently, parallel results for scalar binomial and negative binomial channels have been established [22, 10]. Inspired by the Lipster-Shiryaev formula [16], it has been demonstrated that for certain channels (or measurement models), investigation of the gradient of mutual information can often lead to a relatively simple formulation, relative to computing mutual information itself. Further, it has been shown that the derivative of mutual information with respect to key system parameters also relates to the conditional mean estimates in other channel settings beyond Gaussian and Poisson models [18]. This paper pursues this overarching theme for a vector Poisson measurement model. Results for scalar Poisson signal models have been developed recently [12, 1] for signal recovery; the vector results presented here are new, with known scalar results recovered as a special case. Further, we consider the gradient of mutual information for Poisson data in the context of classification, for which there are no previous results, even in the scalar case. The results we present for optimizing mutual information in vector Poisson measurement models are general, and may be applied to optical communication systems [15, 13]. The specific applications that motivate this study are compressive measurements for vector Poisson data. Direct observation of long vectors of counts may be computationally or experimentally expensive, and therefore it is of interest to design compressive Poisson measurements. Almost all existing results for compres1 sive sensing (CS) directly or implicitly assume a Gaussian measurement model [6], and extension to Poisson measurements represents an important contribution of this paper. To the authors knowledge, the only previous examination of CS with Poisson data was considered in [20], and that paper considered a single special (random) measurement matrix, it did not consider design of measurement matrices, and the classification problems was not addressed. It has been demonstrated in the context of Gaussian measurements that designed measurement matrices, using information-theoretic metrics, may yield substantially improved performance relative to randomly constituted measurement matrices [7, 8, 21]. In this paper we extend these ideas to vector Poisson measurement systems, for both signal recovery and classification, and make connections to the Gaussian measurement model. The theory is demonstrated by considering compressive topic modeling of a document corpora, and chemical classification with a compressive photon-counting hyperspectral camera [25]. 2 Mutual Information for Designed Compressive Measurements 2.1 Motivation A source random variable X ∈Rn, with probability density function PX(X), is sent through a measurement channel, the output of which is characterized by random variable Y ∈Rm, with conditional probability density function PY |X(Y |X); we are interested in the case m < n, relevant for compressive measurements, although the theory is general. Concerning PY |X(Y |X), in this paper we focus on Poisson measurement models, but we also make connections to the much more widely considered Gaussian case. For the Poisson and Gaussian measurement models the mean of PY |X(Y |X) is ΦX, where Φ ∈Rm×n is the measurement matrix. For the Poisson case the mean may be modified as ΦX + λ for “dark current” λ ∈Rm +, and positivity constraints are imposed on the elements of Φ and X. Often the source statistics are characterized as a mixture model: PX(X) = PL c=1 πcPX|C(X|C = c), where πc > 0 and PL c=1 πc = 1, and C may correspond to a latent class label. In this context, for each draw X there is a latent class random variable C ∈{1, . . . , L}, where the probability of class c is πc. Our goal is to design Φ such that the observed Y is most informative about the underlying X or C. When the interest is in recovering X, we design Φ with the goal of maximizing mutual information I(X; Y ), while when interested in inferring C we design Φ with the goal of maximizing I(C; Y ). To motivate use of the mutual information as the design metric, we note several results from the literature. For the case in which we are interested in recovering X from Y , it has been shown [19] that MMSE ≥ 1 2πe exp{2[h(X) −I(X; Y )]} (1) where h(X) is the differential entropy of X and MMSE = E{trace[(X −E(X|Y ))(X − E(X|Y ))T ]} is the minimum mean-square error. For the classification problem, we define the Bayesian classification error as Pe = R PY (y)[1 − maxcPC|Y (c|y)]dy. It has been shown in [14] that [H(C|Y ) −H(Pe)]/ log L ≤Pe ≤1 2H(C|Y ) (2) where H(C|Y ) = H(C) −I(C; Y ), 0 ≤H(Pe) ≤1, and H(·) denotes the entropy of a discrete random variable. By minimizing H(C|Y ) we minimize the upper bound to Pe, and since H(C) is independent of Φ, to minimize the upper bound to Pe our goal is to design Φ such that I(C; Y ) is maximized. 2.2 Existing results for Gaussian measurements There are recent results for the gradient of mutual information for vector Gaussian measurements, which we summarize here. Consider the case C ∼PC(C), X|C ∼PX|C(X|C), and Y |X ∼ N(Y ; ΦX, Λ−1), where Λ ∈Rm×m is a known precision matrix. Note that PC and PX|C are arbitrary, while PY |X = N(Y ; ΦX, Λ−1) corresponds to a Gaussian measurement with mean ΦX. It has been established that the gradient of mutual information between the input and the output of the vector Gaussian channel model obeys [17] ∇ΦI(X; Y ) = ΛΦE, (3) 2 where E = E  (X −E(X|Y ))(X −E(X|Y ))T  denotes the MMSE matrix. The gradient of mutual information between the class label and the output for the vector Gaussian channel is [8] ∇ΦI(C; Y ) = ΛΦ ˜E, (4) where ˜E = E  (E(X|Y, C) −E(X|Y ))(E(X|Y, C) −E(X|Y ))T  denotes the equivalent MMSE matrix. 2.3 Conditional-mean estimation Note from the above discussion that for a Gaussian measurement, ∇ΦI(X; Y ) = E[f(X, E(X|Y ))] and ∇ΦI(C; Y ) = E[g(E(X|Y, C), E(X|Y ))], where f(·) and g(·) are matrix-valued functions of the respective arguments. These results highlight the connection between the gradient of mutual information with respect to the measurement matrix Φ and conditional-mean estimation, constituted by E(X|Y ) and E(X|Y, C). We will see below that these relationships hold as well for the vector Poisson case, with distinct functions ˜f(·) and ˜g(·). 3 Vector Poisson Data 3.1 Model The vector Poisson channel model is defined as Pois(Y ; ΦX + λ) = PY |X (Y |X) = m Y i=1 PYi|X (Yi|X) = m Y i=1 Pois (Yi; (ΦX)i + λi) (5) where the random vector X = (X1, X2, . . . , Xn) ∈Rn + represents the channel input, the random vector Y = (Y1, Y2, . . . , Ym) ∈Zm + represents the channel output, Φ ∈Rm×n + represents a measurement matrix, and the vector λ = (λ1, λ2, . . . , λm) ∈Rm + represents the dark current. The vector Poisson channel model associated with arbitrary m and n is a generalization of the scalar Poisson model, for which m = n = 1 [12, 1]. In the scalar case PY |X(Y |X) = Pois(Y ; φX + λ), where here scalar random variables X ∈R+ and Y ∈Z+ are associated with the input and output of the scalar channel, respectively, φ ∈R+ is a scaling factor, and λ ∈R+ is associated with the dark current. The goal is to design Φ to maximize the mutual information between X and Y . Toward that end, we consider the gradient of mutual information with respect to Φ: ∇ΦI(X; Y ) = [∇ΦI(X; Y )ij], where ∇ΦI(X; Y )ij represents the (i, j)-th entry of the matrix ∇ΦI(X; Y ). We also consider the gradient with respect to the vector dark current, ∇λI(X; Y ) = [∇λI(X; Y )i], where ∇λI(X; Y )i represents the i-th entry of the vector ∇λI(X; Y ). For a mixture-model source PX(X) = PL c=1 πcPX|C=c(X|C = c), for which there is more interest in recovering C than in recovering X, we seek ∇ΦI(C; Y ) and ∇λI(C; Y ). 3.2 Gradient of Mutual Information for Signal Recovery In order to take full generality of the input distribution into consideration, we utilize the RadonNikodym derivatives to represent the probability measures of interests. Consider random variables X ∈Rn and Y ∈Rm. Let f θ Y |X be the Radon-Nikodym derivative of probability measure P θ Y |X with respect to an arbitrary measure QY , provided that P θ Y |X is absolutely continuous with respect to QY , i.e., P θ Y |X ≪QY . θ ∈R is a parameter. f θ Y is the Radon-Nikodym derivative of the probability measure P θ Y with respect to QY provided that P θ Y ≪QY . Note that in the continuous or discrete case, f θ Y |X and f θ Y are simply probability density or mass functions with QY chosen to be the Lebesgue measure or the counting measure, respectively. We note that similar notation is also used for the signal classification case, except that we may also need to condition both on X and C. Some results of the paper require the assumption on the regularity conditions (RC), which are listed in the Supplementary Material. We will assume all four regularity conditions RC1–RC4 whenever necessary in the proof and the statement of the results. Recall [9] that for a function f(x, θ) : Rn × R →R with a Lebesgue measure µ on Rn, we have ∂ ∂θ R f(x, θ)dµ(x) = R ∂ ∂θf(x, θ)dµ(x), if f(x, θ) ≤g(x), where g ∈L1(µ). Hence, in light of this criterion, it is straightforward to verify that the RC are valid for many common distributions of X. Proofs of the below theorems are provided in the Supplementary Material. 3 Theorem 1. Consider the vector Poisson channel model in (5). The gradient of mutual information between the input and output of the channel, with respect to the matrix Φ, is given by: [∇ΦI(X; Y )ij] =  E [Xj log((ΦX)i + λi)] −E [E[Xj|Y ] log E[(ΦX)i + λi|Y ]]  , (6) and with respect to the dark current is given by: [∇λI(X; Y )i] =  E[log((ΦX)i + λi)] −E[log E[(ΦX)i + λi|Y ]]  . (7) irrespective of the input distribution PX(X), provided that the regularity conditions hold. 3.3 Gradient of Mutual Information for Classification Theorem 2. Consider the vector Poisson channel model in (5) and mixture signal model. The gradient with respect to Φ of mutual information between the class label and output of the channel is [∇ΦI(C; Y )ij] = E  E[Xj|Y, C] log E[(ΦX)i + λi|Y, C] E[(ΦX)i + λi|Y ]  , (8) and with respect to the dark current is given by (∇λI(C; Y ))i =E  log E[(ΦX)i + λi|Y, C] E[(ΦX)i + λi|Y ]  . (9) irrespective of the input distribution PX|C(X|C), provided that the regularity conditions hold. 3.4 Relationship to known scalar results It is clear that Theorem 1 represents a multi-dimensional generalization of Theorems 1 and 2 in [12]. The scalar result follows immediately from the vector counterpart by taking m = n = 1. Corollary 1. For the scalar Poisson channel model PY |X(Y |X) = Pois(Y ; φX + λ), we have ∂ ∂φI(X; Y ) = E [X log((φX) + λ)] −E [E[X|Y ] log E[φX + λ|Y ]] , (10) ∂ ∂λI(X; Y ) = E[log(φX + λ)] −E[log E[φX + λ|Y ]]. (11) irrespective of the input distribution PX(X), provided that the regularity conditions hold. While the scalar result in [12] for signal recovery is obtained as a special case of our Theorem 1, for recovery of the class label C there are no previous results for our Theorem 2, even in the scalar case. 3.5 Conditional mean and generalized Bregman divergence Considering the results in Theorem 1, and recognizing that E[(ΦX) + λ|Y ] = ΦE(X|Y ) + λ, it is clear that for the Poisson case ∇ΦI(X; Y ) = E[ ˜f(X, E(X|Y ))]. Similarly, for the classification case, ∇ΦI(C; Y ) = E[˜g(E(X|Y, C), E(X|Y ))]. The gradient with respect to the dark current λ has no analog for the Gaussian case, but similarly we have ∇λI(X; Y ) = E[ ˜f1(X, E(X|Y ))] and ∇λI(C; Y ) = E[˜g1(E(X|Y, C), E(X|Y ))]. For the scalar Poisson channel in Corollary 1, it has been shown in [1] that ∂ ∂φI(X; Y ) = E[ℓ(X, E(X|Y ))], where ℓ(X, E(X|Y )) is defined by the right side of (10), and is related to the Bregman divergence [5, 2]. While beyond the scope of this paper, one may show that ˜f(X, E(X|Y )) and ˜g(E(X|Y, C), E(X|Y )) may be interpreted as generalized Bregman divergences, where here the generalization is manifested by the fact that these are matrix-valued measures, rather than the scalar one in [1]. Further, for the vector Gaussian cases one may also show that f(X, E(X|Y )) and g(E(X|Y, C), E(X|Y )) are also generalized Bregman divergences. These facts are primarily of theoretical interest, as they do not affect the way we perform computations. Nevertheless, these theoretical results, through generalized Bregman divergence, underscore the primacy the conditional mean estimators E(X|Y ) and E(X|Y, C) within the gradient of mutual information with respect to Φ, for both the Gaussian and Poisson vector measurement models. 4 4 Applications 4.1 Topic Models Consider the case for which the Poisson rate vector for document d may be represented Xd = ΨSd, where Xd ∈Rn +, Ψ ∈Rn×T + and Sd ∈RT +. Here T represents the number of topics, and in the context of documents, n represents the total number of words in dictionary D. The count for the number of times each of the n words is manifested in document d may often be modeled as Yd|Sd ∼Pois(Yd; ΨSd); see [26] and the extensive set of references therein. 20 40 60 80 100 120 140 −9 −8.5 −8 −7.5 20 Newsgroups: PLL of Hold−out Set Number of Projections Per−word Predictive Log−Likelihood Random Ortho NNMF LDA Optimized Full (a) 0 50 100 150 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 20Newsgroups: KL−Divergence on Topic Mixture Estimates Number of Projections Per−Document K−L Divergence Random Rand−Ortho NNMF LDA Optimized (b) Figure 1: Results on the 20 Newsgroups dataset. Random denotes a random binary matrix with 1% non-zero values. Rand-Ortho denotes a random binary matrix restricted to an orthogonal matrix with one non-zero entry per column. Optimized denotes the methods discussed in Section 4.3. Full denotes when each word is observed. The error estimates were obtained by running the algorithm over 10 different random splits of the corpus. (a) Per-word predictive log-likelihood estimate versus the number of projections. (b) KL Divergence versus the number of projections. Rather than counting the number of times each of the n words are separately manifested, we may more efficiently count the number of times words in particular subsets of D are manifested. Specifically, consider a compressive measurement for document d, as Yd|Xd ∼Pois(Yd; ΦXd), where Φ ∈{0, 1}m×n, with m ≪ n. Let φk ∈ {0, 1}n represent the kth row of Φ, with Ydk the kth component of Yd. Then Ydk|Xd ∼ Pois(Ydk; φT k Xd) is equal in distribution to Ydk = Pn i=1 ˜Ydki, where ˜Ydki|Xdi ∼ Pois(φkiXdi), with φki ∈{0, 1} the ith component of φk and Xdi the ith component of Xd. Therefore, Ydk represents the number of times words in the set defined by the non-zero elements of φk are manifested in document d; Yd therefore represents the number of times words are manifested in a document in m distinct sets. Our goal is to use the theory developed above to design the binary Φ such that the compressive Yd|Xd ∼Pois(Yd; ΦXd) is as informative as possible. In our experiments we assume that Ψ may be learned separately based upon a small subset of the corpus, and then with Ψ so fixed the statistics of Xd are driven by the statistics of Sd. When performing learning of Ψ, each column of Ψ is assumed drawn from an n-dimensional Dirichlet distribution, and Sd is assumed drawn from a gamma process, as specified in [26]. We employ variational Bayesian (VB) inference on this model [26] to estimate Ψ (and retain the mean). With Ψ so fixed, we then design Φ under two cases. For the case in which we are interested in inferring Sd from the compressive measurements, i.e., based on counts of words in sets, we employ a gamma process prior for pS(Sd), as in [26]. The result in Theorem 1 is then used to perform gradients for design of Φ. For the classification case, for each document class c ∈{1, . . . , L} we learn a p(Sd|C) based on a training sub-corpus for class C. This is done for all document classes, and we design a compressive matrix Φ ∈{0, 1}m×n, with gradient performed using Theorem 2. In the testing phase, using held-out documents, we employ the matrix Φ to group the counts of words in document d into counts on m sets of words, with sets defined by the rows of Φ. Using these Yd, which we assume are drawn Yd|Sd ∼Pois(Yd; ΦΨSd), for known Φ and Ψ, we then use VB computations for the model in [26] to infer a posterior distribution on Sd or class C, depending on the application. The VB inference for this model was not considered in [26], and the update equations are presented in the Supplementary Material. 4.2 Model for Chemical Sensing The model employed for the chemical sensing [25] considered below is very similar in form to that used for topic modeling, so we reuse notation. Assume that there are T fundamental (building-block) chemicals of interest, and that the hyperspectral sensor performs measurements at n wavelengths. Then the observed data for sample d may be represented Yd|Sd ∼Pois(Yd; ΨSd + λ), where Yd ∈ Zn + represents the count of photons at the n sensor wavelengths, λ ∈Rn + represents the sensor dark current, and the tth column of Ψ ∈Rn×T + reflects the mean Poisson rate for chemical t (the 5 20 40 60 80 100 120 140 −8.4 −8.2 −8 −7.8 −7.6 −7.4 −7.2 NYTimes: PLL of Hold−out Set Number of Projections Per−word Predictive Log−Likelihood Random Ortho NNMF LDA Optimized Full (a) 0 50 100 150 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 NYTimes: KL−Divergence on Topic Mixture Estimates Number of Projections Per−Document K−L Divergence Random Rand−Ortho NNMF LDA Optimized (b) 0 0.5 1 1.5 2 −9 −8.5 −8 −7.5 NYTimes: Predictive Log−Likelihood vs Time Per−Document Processing Time, ms Holdout Per−Word PLL Random Rand−Ortho NNMF LDA Optimized (c) Figure 2: Results on the NYTimes corpus. Optimized denotes the methods discussed in Section 4.3. Full denotes when each word is observed. The error estimates were obtained by running the algorithm over 10 different random subsets of 20,000 documents. (a) Predictive log-likelihood estimate versus the number of projections. (b) KL Divergence versus the number of projections. (c) Predictive log-likelihood versus processing time. different chemicals play a role analogous to topics). The vector Sd ∈RT + reflects the amount of each fundamental chemical present in the sample under test. For the compressive chemical-sensing system discussed in Section 4.5, the measurement matrix is again binary, Φ ∈{0, 1}m×n. Through calibrations and known properties of chemicals and characteristics of the camera, one may readily constitute Ψ and λ, and a model similar to that employed for topic modeling is utilized to model Sd; here λ is a characteristic of the camera, and is not optimized. In the experiments reported below the analysis of the chemical-sensing data is performed analogously to how the documents were modeled (which we detail), and therefore no further modeling details are provided explicitly for the chemical-sensing application, for brevity. For the chemical sensing application, the goal is to classify the chemical sample under test, and therefore Φ is defined based on optimization using the Theorem 2 gradient. 4.3 Details on Designing Φ We wish to use Theorems 1 and 2 to design a binary Φ, for the document-analysis and chemicalsensing applications. To do this, instead of directly optimizing Φ, we put a logistic link on each value Φij = logit(Mij). We can state the gradient with respect to M as: [∇MI(X; Y )ij] = [∇ΦI(X; Y )ij][∇MΦij] (12) Similar results hold for ∇MI(C; Y )ij.Φ was initialized at random, and we threshold the logistic at 0.5 to get the final binary Φ. To estimate the expectations needed for the results in Theorems 1 and 2, we used Monte Carlo integration methods, where we simulated X and Y from the appropriate distribution. The number of samples in the Monte Carlo integration was set to n (data dimension), and 1000 gradient steps were used for optimizing Φ. The explicit forms for the gradients in Theorems 1 and 2 play an important role in making optimization of Φ tractable for the practical applications considered here. One could in principle take a brute-force gradient of I(Y ; X) and I(Y ; C) with respect to Φ, and evaluate all needed integrals via Monte Carlo sampling. This leads to a cumbersome set of terms that need be computed. The “clean” forms of the gradients in Theorems 1 and 2 significantly simplified design implementation within the below experiments, with the added value of allowing connections to be made to the Gaussian measurement model. 4.4 Examples for Document Corpora We demonstrate designed projections on the NYTimes and 20 Newsgroups data. The NYTimes data has n = 8000 unique words, and the Newsgroup data has n = 8052 unique words. When learning Ψ, we placed the prior Dir(0.1, . . . , 0.1) on the columns of Ψ, and the components Sdk had a prior Gamma(0.1, 0.1). We tried many different settings for these priors, and as in [26], the learned Ψ was insensitive to “reasonable” settings. The number of topics (columns) in Ψ was set to T = 100. In addition to designing Φ using the proposed theory, we also considered four comparative designs: (i) binary Φ constituted uniformly at random, with 1% of the entries non-zero; (ii) orthogonal binary rows of Φ, with one non-zero element in each column selected uniformly at random; (iii) performing non-negative matrix factorization [3] on (NNMF) Ψ, and projecting onto the principal vectors; and (iv) performing latent Dirichlet allocation [4] on the documents, and projecting onto the topic-dependent probabilities of words. For (iii) and (iv), the top (highest amplitude) 5% of 6 0 50 100 150 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Number of Projections Hold−out Classification Accuracy 20 Newsgroups: Classification Accuracy Full Random Rand−Ortho NNMF LDA Optimized (a) Confusion Matrix for Fully Observed Word Counts 72 5 6 3 5 10 6 66 11 2 10 6 1 7 75 7 2 7 2 2 9 77 0 9 10 5 1 1 78 4 alt.atheism comp.graphics comp.os.ms−windows.misc comp.sys.ibm.pc.hardware comp.sys.mac.hardware comp.windows.x Other comp.graphics comp.os.ms−windows.misc comp.sys.ibm.pc.hardware comp.sys.mac.hardware comp.windows.x 0 0.2 0.4 0.6 0.8 (b) Confusion Matrix for Projected (N=150) Counts 67 6 7 3 5 11 9 56 15 1 13 6 2 8 73 8 1 8 3 3 14 70 1 9 9 7 2 0 75 7 alt.atheism comp.graphics comp.os.ms−windows.misc comp.sys.ibm.pc.hardware comp.sys.mac.hardware comp.windows.x Other comp.graphics comp.os.ms−windows.misc comp.sys.ibm.pc.hardware comp.sys.mac.hardware comp.windows.x 0 0.2 0.4 0.6 (c) Figure 3: (a) Classification accuracy of projected measurements and the fully observed case. Random uses 10% non-zero values, Ortho is a random matrix limited to orthogonal projections, and Optimized uses designed projections. The error bars are the standard deviation of the algorithm run independently on 10 random splits of the dataset. (b) Subset of confusion matrix of of the fully observed counts. White numbers denote percentage of documents classified in that manner. Only those classes in the “comp” subgroup are shown. The “comp” group is the least accurate subgroup. (c) The confusion matrix on the “comp” subgroup for 150 compressive measurements. the words in each vector on which we project (e.g., topic) were set to have projection amplitude 1, and all the rest were set to zero. The settings on (i), (iii) and (iv), i.e., with regard to the fraction of words with non-zero values in Φ, were those that yielded the best results (other settings often performed much worse). We show results using two metrics, Kullback-Leibler (KL) divergence and predictive log-likelihood. For the KL divergence, we compare the topic mixture learned from the projection measurements to the topic mixture learned from the case where each word is observed (no compressive measurement). We define the topic mixture S′ d as the normalized version of Sd. We calculate DKL(S′ d,p||S′ d,f) = PK k=1 S′ dk,p log(S′ dk,p/S′ dk,f), where S′ dk,p is the relative weight on document d, topic k for the full set of words, and S′ dk,p is the same for the compressive topic model. We also calculate perword predictive log-likelihood. Because different projection metrics are in different dimensions, we use 75% of a document’s words to get the projection measurements Yd and use the remaining 25% as the original word tokens Wd. We then calculate the predictive log-likelihood (PLL) as log(Wd|Ψ, Φ, Yd). We split the 20 Newgroups corpus into 10 random splits of 60% training and 40% testing to get an estimate of uncertainty. The results are shown in Figure 1. Figure 1(a) shows the per-word predictive log-likelihood (PLL). At very low numbers of compressive measurements we get similar PLL between the designed matrix and the random methods. As we increase the number of measurements, we get dramatic improvements by optimizing the sensing matrix and the optimized methods quickly approach the fully observed case. The same trends can be seen in the KL divergence shown in Figure 1(b). Note that the relative quality of the NNMF and LDA based designs of Φ depends on the metric (KL or PLL), but for both metrics the proposed mutual-information-based design of Φ yields best performance. To test the NYTimes corpus, we split the corpus into 10 random subsets with 20,000 training documents and 20,000 testing documents. The results are shown in Figure 2. As in the 20 Newsgroups results, the predictive log-likelihood and KL divergence of the random and designed measurements are similar when the number of projections are low. As we increase the number of projections the optimized projection matrix offers dramatic improvements over the random methods. We also consider predictive log-likelihood versus time in Figure 2(c). The compressive measurements give near the same performance with half the per-document processing time. Since the total processing time increases linearly with the total number of documents, a 50% decrease in processing time can make a significant difference in large corpora. We also consider the classification problem over the 20 classes in the 20 Newsgroups dataset, split into 10 groups of 60% training and 40% testing. We learn a Ψ with T = 20 columns (topics) and with the prior on the columns as above. Within the prior, we draw Sdcd|cd ∼Gamma(1, 1) and Sdc′|cd = 0 for all c′ ̸= cd. Separate topics are associated with each of the 20 classes, and we use the MAP estimate to get the class label c∗ d = arg max(c|Yd). Classification versus number of projections for random projections and designed projections are shown in Figure 3(a). It is also useful to look at the type of errors made in the classifier when we use the designed projections. Figure 3(b) and Figure 3(c) show the newsgroups under the “comp” (computer) heading, which is the least 7 accurate section. In the compressed case, many of the additional errors go into nearby topics with overlapping ideas. For example, most additional misclassifications in “comp.os.ms-windows.misc” go into “comp.sys.ibm.pc.hardware” and “comp.windows.x,” which have many similar discussions. Additionally, 4% of the articles were originally posted in more than one topic, showing the intimate relationship between similar discussion groups, and so misclassifying into a related (and overlapping) class is less of a problem than misclassification into a completely disjoint class. 4.5 Poisson Compressive Sensing for Chemical Classification We consider chemical sensing based on the wavelength-dependent signature of chemicals, at optical frequencies (here we consider a 850-1000 nm laser system). In Figure 4(a) the measurement system is summarized; details of this system are described in [25]. In Part 1 of Figure 4(a) multi-wavelength photons are scattered off a chemical sample. In Part 2 of this figure a volume holographic grating (VHG) is employed to diffract the photons in a wavelength-dependent manner, and therefore photons are distributed spatially across a digital mirror microdevice (DMD); distinct wavelengths are associated with each micromirror. The DMD consists of 1920 × 1080 aluminum mirrors. Each mirror is in a binary state, either reflecting light back to a detector, or not. Each mirror approximately samples a single wavelength, as a result of the VHG, and the photon counter counts all photons at wavelengths for which the mirrors direct light to the sensor. Hence, the sensor counts all photons at a subset of the wavelengths, those for which the mirror is at the appropriate angle. D.S. Wilcox et al. / Analytica Chimica Acta 755 (2012) 17– 27 21 Fig. 1. Schematic of the DMD-based near infrared digital compressive detection instrument. As for which vector  we should use in (7), we believe that a practical set of filters F can be designed assuming that the pure component emission rates are normalized to the same value, i = j (8) for all i and j, i.e., we design measurement filters F to minimize the error in estimating a mixture where the rate of photons emitted by all chemical species are the same. Setting  = (1, 1, . . . , 1) T suffices. This determines A = FTP, B, and T. Matlab software to determine OB filters is available on request. See www.math.purdue.edu/∼buzzard/software/ for more details. 3. Experimental 3.1. Experimental apparatus The compressive detection spectrometer, shown in Fig. 1, employs a Raman backscattering collection geometry. Part 1 is similar to that described in [2]. The excitation source is a 785 nm single mode laser (Innovative Photonic Solutions). After passing through a laser-line bandpass filter (Semrock, LL01-785-12.5), the laser is focused onto the sample with a NIR lens (Olympus, LMPlan IR, 20×). The Raman scattering is collected and separated from the laser Rayleigh scattering with a dichroic mirror (Semrock, LPD01-785RS-25) and a 785 nm notch filter (Semrock, NF03-785E25). The Raman scattered light is then sent to Part 2, where it is first filtered with a 900 nm shortpass filter (Thorlabs, FES0900) and subsequently directed to a volume holographic grating (1200 L mm−1, center wavelength 830 nm, Edmund Optics, 48–590). The window of the dispersed light is ∼200–1700 cm−1 with a spectral resolution of 30 cm−1 (this resolution is limited by the beam quality and hence the image of the diode laser focal spot size, which spans approximately 15 mirrors on the surface of the DMD). The light is collimated with an achromatic lens with a focal length of f = 50 mm (Thorlabs, AC254-050-B) and focused onto the DMD (Texas Instruments, DLP Discovery 4000). The DMD consists of 1920 × 1080 aluminum mirrors (10.8 m pitch) that can tilt ±12 ◦relative to the flat state of the array, controlled by an interface card (DLP D4000, Texas Instruments). All 1080 mirrors in each rows of the array are set to the same angle, and the 1920 columns are divided into adjacent groupings – e.g., if we want to divide the energy of the photons into 128 “bins”, then groups of 15 adjacent columns are set in unison. The DMD is mounted at an angle such that the −12◦mirror position directs photons back with a vertical offset of ∼1◦below the incident light in order to spatially separate the incident and reflected photons. The latter photons are recombined in a second pass through the holographic grating, and focused onto a fiber optic cable that is connected to a photodiode photon counting module (PerkinElmer, SPCMCD2969PE). The photon counting module has a dark count rate of ∼200 photons s−1 and no read noise. A TTL pulse is output by the photon counter as each photon is detected, and the pulses are counted in a USB data acquisition (DAQ) card (National Instruments, USB-6212BNC). Integration timing is controlled by setting the sampling rate and number of samples to acquire with the DAQ card in Labview 2009. Binary filter functions (F), optimal times (T), and the estimator (B) were generated from the spectra of all pure components (see Section 3.2 for more information) using functions from Matlab 7.13 R2011b. The input binary optical filter function determined which mirrors will point toward the detector (assigned a value of 1) or point away (assigned a value of 0). The binary (0–1) mathematical filters are configured to the DMD through Labview software (Texas Instruments, DDC4100, Load Blocks.vi) that sets blocks of mirrors on the DMD array corresponding to different wavelengths to the appropriate ±12◦position. Labview scripts were used to sequentially apply the filters and integrate for the corresponding times, to store the raw photon counts, and to calculate the photon rates. Linear and quadratic discriminant analyses were performed in Matlab 7.13 R2011b. Data was further processed and plotted in Igor Pro 6.04. 3.2. Constructing filters Generating accurate filters for a given application requires high signal-to-noise training spectra of each of the components of interest. Measuring full spectra with the DMD is achieved by notch scanning. This is done by sequentially directing one mirror (or a small set of mirrors) toward the detector (with all other mirrors directed away) and counting the number of photons detected at each notch position. Notch scanning measurements were performed using 1 s per notch to obtain spectra with a signal-to-noise ratio of ∼500:1. A background spectrum is present in all of our training spectra, arising from the interaction of the excitation laser and the intervening optical elements. We have implemented two compressive detection strategies for removing this background. The first method involves measuring the background (with no sample) (a) 1 2 3 4 5 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Classification of 10 Chemicals Number of Measurements Accuracy Exp−Designed Exp−Random Sim−Designed Sim−Random (b) Figure 4: (a) Measurement system. The VHG is a volume holographic grating, that spatially spreads photons in a wavelengthdependent manner across the digital mirror microdevice (DMD), and the DMD is employed to implement binary coding. (b) Performance of the compressive-measurement classifier as a function of the number of compressive measurements; ten chemicals are considered. Experimental results are shown (Exp), as well as predictions from simulations (Sim). The measurement may be represented Y |Sd ∼Pois[Φ(ΨSd + λ0)], where λ0 ∈Rn + is known from calibration. The elements of the rate vector of λ0 vary from .07 to 1.5 per bin, and the cumulative dark current Φλ0 can provide in excess of 50% of the signal energy, depending on the measurement (very noisy measurements). Design of Φ was based on Theorem 2, and λ0 here is treated as the signature of an additional chemical (actually associated with measurement noise); finally, λ = Φλ0 is the measurement dark current. The ten chemicals considered in this test were acetone, acetonitrile, benzene, dimethylacetamide, dioxane, ethanol, hexane, methylcyclohexane, octane, and toluene, and we note from Figure 4 that after only five compressive measurements excellent chemical classification is manifested based on designed CS measurements. There are n > 1000 wavelengths in a conventional measurement of these data, this system therefore reflecting significant compression. In Figure 4(b) we show results of measured data and performance predictions based on our model, with good agreement manifested. Note that designed projection measurements perform markedly better than random, where here the probability of a one in the random design was 10% (this yielded best random results in simulations). 5 Conclusions New results are presented for the gradient of mutual information with respect to the measurement matrix and a dark current, within the context of a Poisson model for vector count data. The mutual information is considered for signal recovery and classification. For the former we recover known scalar results as a special case, and the latter results for classification have not been addressed in any form previously. Fundamental connections between the gradient of mutual information and conditional expectation estimates have been made for the Poisson model. Encouraging applications have been demonstrated for compressive topic modeling, and for compressive hyperspectral chemical sensing (with demonstration on a real compressive camera). Acknowledgments The work reported here was supported in part by grants from ARO, DARPA, DOE, NGA and ONR. 8 References [1] R. Atar and T. Weissman. Mutual information, relative entropy, and estimation in the Poisson channel. IEEE Transactions on Information Theory, 58(3):1302–1318, March 2012. [2] A. Banerjee, S. Merugu, I.S. Dhillon, and J. Ghosh. Clustering with bregman divergences. JMLR, 2005. [3] M.W Berry, M. Browne, A.N. Langville, V.P. Pauca, and R. J. Plemmons. Algorithms and applications for approximate nonnegative matrix factorization. Computational Statistics & Data Analysis, 2007. [4] D.M. Blei, A.Y. Ng, and M.I. Jordan. Latent Dirichlet allocation. JMLR, 2003. [5] L.M. Bregman. The relaxation method of finding the common point of convex sets and its application to the solution of problems in convex programming. USSR computational mathematics and mathematical physics, 1967. [6] E. Cand`es, J. Romberg, and T. Tao. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. on Inform. Theory, 2006. [7] W.R. Carson, M. Chen, M.R.D. Rodrigues, R. Calderbank, and L. Carin. Communications-inspired projection design with application to compressive sensing. SIAM J. Imaging Sciences, 2013. [8] M. Chen, W. Carson, M. Rodrigues, R. Calderbank, and L. Carin. Communications inspired linear discriminant analysis. In ICML, 2012. [9] G.B. Folland. Real Analysis: Modern Techniques and Their Applications. Wiley New York, 1999. [10] D. Guo. Information and estimation over binomial and negative binomial models. arXiv preprint arXiv:1207.7144, 2012. [11] D. Guo, S. Shamai, and S. Verd´u. Mutual information and minimum mean-square error in Gaussian channels. IEEE Transactions on Information Theory, 51(4):1261–1282, April 2005. [12] D. Guo, S. Shamai, and S. Verd´u. Mutual information and conditional mean estimation in Poisson channels. IEEE Transactions on Information Theory, 54(5):1837–1849, May 2008. [13] S.M. Haas and J.H. Shapiro. Capacity of wireless optical communications. IEEE Journal on Selected Areas in Communications, 21(8):1346–1357, Aug. 2003. [14] M. Hellman and J. Raviv. Probability of error, equivocation, and the Chernoff bound. IEEE Transactions on Information Theory, 1970. [15] A. Lapidoth and S. Shamai. The poisson multiple-access channel. IEEE Transactions on Information Theory, 44(2):488–501, Feb. 1998. [16] R.S. Liptser and A.N. Shiryaev. Statistics of Random Processes: II. Applications, volume 2. Springer, 2000. [17] D.P. Palomar and S. Verd´u. Gradient of mutual information in linear vector Gaussian channels. IEEE Transactions on Information Theory, 52(1):141–154, Jan. 2006. [18] D.P. Palomar and S. Verd´u. Representation of mutual information via input estimates. IEEE Transactions on Information Theory, 53(2):453–470, Feb. 2007. [19] S. Prasad. Certain relations between mutual information and fidelity of statistical estimation. http://arxiv.org/pdf/1010.1508v1.pdf, 2012. [20] M. Raginsky, R.M. Willett, Z.T. Harmany, and R.F. Marcia. Compressed sensing performance bounds under poisson noise. IEEE Trans. Signal Processing, 2010. [21] M. Seeger, H. Nickisch, R. Pohmann, and B. Schoelkopf. Optimization of k-space trajectories for compressed sensing by bayesian experimental design. Magnetic Resonance in Medicine, 2010. [22] C.G. Taborda and F. Perez-Cruz. Mutual information and relative entropy over the binomial and negative binomial channels. In IEEE International Symposium on Information Theory Proceedings (ISIT), pages 696–700. IEEE, 2012. [23] S. Verd´u. Mismatched estimation and relative entropy. IEEE Transactions on Information Theory, 56(8):3712–3720, Aug. 2010. [24] T. Weissman. The relationship between causal and noncausal mismatched estimation in continuous-time awgn channels. IEEE Transactions on Information Theory, 2010. [25] D.S. Wilcox, G.T. Buzzard, B.J. Lucier, P. Wang, and D. Ben-Amotz. Photon level chemical classification using digital compressive detection. Analytica Chimica Acta, 2012. [26] M. Zhou, L. Hannah, D. Dunson, and L. Carin. Beta-negative binomial process and Poisson factor analysis. AISTATS, 2012. 9
2013
259
4,997
Integrated Non-Factorized Variational Inference Shaobo Han Duke University Durham, NC 27708 shaobo.han@duke.edu Xuejun Liao Duke University Durham, NC 27708 xjliao@duke.edu Lawrence Carin Duke University Durham, NC 27708 lcarin@duke.edu Abstract We present a non-factorized variational method for full posterior inference in Bayesian hierarchical models, with the goal of capturing the posterior variable dependencies via efficient and possibly parallel computation. Our approach unifies the integrated nested Laplace approximation (INLA) under the variational framework. The proposed method is applicable in more challenging scenarios than typically assumed by INLA, such as Bayesian Lasso, which is characterized by the non-differentiability of the ℓ1 norm arising from independent Laplace priors. We derive an upper bound for the Kullback-Leibler divergence, which yields a fast closed-form solution via decoupled optimization. Our method is a reliable analytic alternative to Markov chain Monte Carlo (MCMC), and it results in a tighter evidence lower bound than that of mean-field variational Bayes (VB) method. 1 Introduction Markov chain Monte Carlo (MCMC) methods [1] have been dominant tools for posterior analysis in Bayesian inference. Although MCMC can provide numerical representations of the exact posterior, they usually require intensive runs and are therefore time consuming. Moreover, assessment of a chain’s convergence is a well-known challenge [2]. There have been many efforts dedicated to developing deterministic alternatives, including the Laplace approximation [3], variational methods [4], and expectation propagation (EP) [5]. These methods each have their merits and drawbacks [6]. More recently, the integrated nested Laplace approximation (INLA) [7] has emerged as an encouraging method for full posterior inference, which achieves computational accuracy and speed by taking advantage of a (typically) low-dimensional hyper-parameter space, to perform efficient numerical integration and parallel computation on a discrete grid. However, the Gaussian assumption for the latent process prevents INLA from being applied to more general models outside of the family of latent Gaussian models (LGMs). In the machine learning community, variational inference has received significant use as an efficient alternative to MCMC. It is also attractive because it provides a closed-form lower bound to the model evidence. An active area of research has been focused on developing more efficient and accurate variational inference algorithms, for example, collapsed inference [8, 9], non-conjugate models [10, 11], multimodal posteriors [12], and fast convergent methods [13, 14]. The goal of this paper is to develop a reliable and efficient deterministic inference method, to both achieve the accuracy of MCMC and retain its inferential flexibility. We present a promising variational inference method without requiring the widely used factorized approximation to the posterior. Inspired by INLA, we propose a hybrid continuous-discrete variational approximation, which enables us to preserve full posterior dependencies and is therefore more accurate than the mean-field variational Bayes (VB) method [15]. The continuous variational approximation is flexible enough for various kinds of latent fields, which makes our method applicable to more general settings than assumed by INLA. The discretization of the low-dimensional hyper-parameter space can overcome the potential non-conjugacy and multimodal posterior problems in variational inference. 1 2 Integrated Non-Factorized Variational Bayesian Inference Consider a general Bayesian hierarchical model with observation y, latent variables x, and hyperparameters θ. The exact joint posterior p(x, θ|y) = p(y, x, θ)/p(y) can be difficult to evaluate, since usually the normalization p(y) = R R p(y, x, θ)dxdθ is intractable and numerical integration of x is too expensive. To address this problem, we find a variational approximation to the exact posterior by minimizing the Kullback-Leibler (KL) divergence KL (q(x, θ|y)||p(x, θ|y)). Applying Jensen’s inequality to the log-marginal data likelihood, one obtains ln p(y) = ln R R q(x, θ|y) p(y,x,θ) q(x,θ|y)dxdθ ≥ R R q(x, θ|y) ln p(y,x,θ) q(x,θ|y)dxdθ := L, (1) which holds for any proposed approximating distributions q(x, θ|y). L is termed the evidence lower bound (ELBO)[4]. The gap in the Jensen’s inequality is exactly the KL divergence. Therefore minimizing the Kullback-Leibler (KL) divergence is equivalent to maximizing the ELBO. To make the variational problem tractable, the variational distribution q(x, θ|y) is commonly required to take a restricted form. For example, mean-field variational Bayes (VB) method assumes the distribution factorizes into a product of marginals [15], q(x, θ|y) = q(x)q(θ), which ignores the posterior dependencies among different latent variables (including hyperparameters) and therefore impairs the accuracy of the approximate posterior distribution. 2.1 Hybrid Continuous and Discrete Variational Approximations We consider a non-factorized approximation to the posterior q(x, θ|y) = q(x|y, θ)q(θ|y), to preserve the posterior dependency structure. Unfortunately, this generally leads to a nontrivial optimization problem, q⋆(x, θ|y) = argmin{q(x,θ|y)} KL (q(x, θ|y)||p(x, θ|y)) , = argmin{q(x,θ|y)} R R q(x, θ|y) ln q(x,θ|y) p(x,θ|y)dxdθ, = argmin{q(x|y,θ), q(θ|y)} R q(θ|y) hR q(x|θ, y) ln q(x|θ,y) p(x,θ|y)dx + ln q(θ|y) i dθ. (2) We propose a hybrid continuous-discrete variational distribution q(x|y, θ)qd(θ|y), where qd(θ|y) is a finite mixture of Dirac-delta distributions, qd(θ|y) = P k ωkδθk(θ) with ωk = qd(θk|y) and P k ωk = 1. Clearly, qd(θ|y) is an approximation of q(θ|y) by discretizing the continuous (typically) low-dimensional parameter space of θ using a grid G with finite grid points1. One can always reduce the discretization error by increasing the number of points in G. To obtain a useful discretization at a manageable number of grid points, the dimension of θ cannot be too large; this is also the same assumption in INLA [7], but we remove here the Gaussian prior assumption of INLA on latent effects x. The hybrid variational approximation is found by minimizing the KL divergence, i.e., KL (q(x, θ|y)||p(x, θ|y)) = P k qd(θk|y) hR q(x|θk, y) ln q(x|y,θk) p(x,θk|y)dx + ln qd(θk|y) i (3) which leads to the approximate marginal posterior, q(x|y) = P k q(x|y, θk)qd(θk|y) (4) As will be clearer shortly, the problem in (3) can be much easier to solve than that in (2). We give the name integrated non-factorized variational Bayes (INF-VB) to the method of approximating p(x, θ|y) with q(x|y, θ)qd(θ|y) by solving the optimization problem in (3). The use of qd(θ) is equivalent to numerical integration, which is a key idea of INLA [7], see Section 2.3 for details. It has also been used in sampling methods when samples are not easy to obtain directly [16]. Here we use this idea in variational inference to overcome the potential non-conjugacy and multimodal posterior problems in θ. 2.2 Variational Optimization The proposed INF-VB method consists of two algorithmic steps: 1The grid points need not to be uniformly spaced, one may put more grid points to potentially high mass regions if credible prior information is available. 2 • Step 1: Solving multiple independent optimization problems, each for a grid point in G, to obtain the optimal q(x|y, θk), ∀θk ∈G, i.e., q⋆(x|y, θk) = argmin{q(x|y,θk)} P k qd(θk|y) hR q(x|θk, y) ln q(x|y,θk) p(x,θk|y)dx + ln qd(θk|y) i = argmin{q(x|y,θk)} R q(x|θk, y) ln q(x|y,θk) p(x|y,θk)dx = argmin{q(x|y,θk)} KL(q(x|y, θk)||p(x|y, θk)) (5) The optimal variational distribution q⋆(x|y, θk) is the exact posterior p(x|y, θk). In case it is not available, we may further constrain q(x|y, θk) to a parametric form, examples including: (i) multivariate Gaussian [17], if the posterior asymptotic normality holds; (ii) skew-normal densities [6, 18]; or (iii) an inducing factorization assumption (see Ch.10.2.5 in [19]), if the latent variables x are conditionally independent or their dependencies are negligible. • Step 2: Given {q⋆(x|y, θk) : θk ∈G} obtained in Step 1, one solves {q⋆ d(θk|y)} = argmin{qd(θk|y)} P k qd(θk|y) Z q⋆(x|θk, y) ln q⋆(x|y, θk) p(x, θk|y) dx + ln qd(θk|y)  | {z } l(qd(θk|y))=l(ωk) Setting ∂l(ωk)/∂ωk = 0 (also ∂2l(ωk)/∂ω2 k > 0), which is solved to give q⋆ d(θk|y) ∝exp R q⋆(x|y, θk) ln p(x,θk|y) q⋆(x|y,θk)dx  . (6) Note that qd(θ|y) is evaluated at a grid of points θk ∈G, it needs to be known only up to a multiplicative constant, which can be identified from the normalization constraint P k q⋆ d(θk|y) = 1. The integral in (6) can be analytically evaluated in the application considered in Section 3. 2.3 Links between INF-VB and INLA The INF-VB is a variational extension of the integrated nested Laplace approximations (INLA) [7], a deterministic Bayesian inference method for latent Gaussian models (LGMs), to the case when p(x|θ) exhibits strong non-Gaussianity and hence p(θ|y) may not be approximated accurately by the Laplace’s method of integration [20]. To see the connection, we review briefly the three computation steps of INLA and compare them with INF-VB in below: 1. Based on the Laplace approximation [3], INLA seeks a Gaussian distribution qG(x|y, θk) = N(x; x∗(θk), H(x∗(θk))−1), ∀θk ∈G that captures most of the probabilistic mass locally, where x∗(θk) = argmaxx p(x|y, θk) is the posterior mode, and H(x∗(θk)) is the Hessian matrix of the log posterior evaluated at the mode. By contrast, INF-VB with the Gaussian parametric constraint on q⋆(x|y, θk) provides a global variational Gaussian approximation qV G(x|y, θk) in the sense that the conditions of the Laplace approximation hold on average [17]. As we will see next, the averaging operator plays a crucial role in handling the non-differentiable ℓ1 norm arising from the double-exponential priors. 2. INLA computes the marginal posteriors of θ based on the Laplace’s method of integration [20], qLA(θ|y) = p(x,θ|y) q(x|y,θ) x=x∗(θ) (7) The quality of this approximation depends on the accuracy of q(x|y, θ). When q(x|y, θ) = p(x|y, θ), one has qLA(θ|y) equal to p(θ|y), according to the Bayes rule. It has been shown in [7] that (7) is accurate enough for latent Gaussian models with qG(x|y, θ). Alternatively, the variational optimal posterior q⋆ d(θ|y) by INF-VB (6) can be derived as a lower bound of the true posterior p(θ|y) by Jensen’s inequality. ln p(θ|y) = ln hR p(x,θ|y) q(x|y,θ)q(x|y, θ)dx i ≥ R ln h p(x,θ|y) q(x|y,θ)q(x|y, θ) i dx = ln q⋆ d(θ|y) (8) Its optimality justifications in Section 2.2 also explain the often observed empirical successes of hyperparameter selection based on the ELBO of ln p(y|θ) [13], when the first level of Bayesian inference is performed, i.e. only the conditional posterior q(x|y, θ) with fixed θ is of interest. In Section 4 we compare the accuracies of both (6) and (7) for hyperparameter learning. 3. INLA obtains the marginal distributions of interest, e.g., q(x|y) via numerically integrating out θ: q(x|y) = P k q(x|y, θk)q(θk|y)∆k with area weights ∆k. In INF-VB, we have qd(θ|y) = P k ωkδθk(θ). Let ωk = q(θk|y)∆k, we immediately have 3 q(x|y) = R q(x|y, θ)qd(θ|y)dθ = P k q(x|y, θk)qd(θk|y) = P k q(x|y, θk)q(θk|y)∆k (9) This Dirac-delta mixture interpretation of numerical integration also enables us to quantitize the accuracy of INLA approximation qG(x|y, θ)qLA(θ|y) using the KL divergence to p(x, θ|y) under the variational framework. In contrast to INLA, INF-VB provides q(x|y, θ) and qd(θ|y), both are optimal in a sense of the minimum Kullback-Leibler divergence, within the proposed hybrid distribution family. In this paper we focus on the full posterior inference of Bayesian Lasso [21] where the local Laplace approximation in INLA cannot be applied, as the non-differentiability of the ℓ1 norm prevents one from computing the Hessian matrix. Besides, if we do not exploit the scale mixture of normals representation [22] of Laplace priors (i.e., no data-augmentation), we are actually dealing with a non-conjugate variational inference problem in Bayesian Lasso. 3 Application to Bayesian Lasso Consider the Bayesian Lasso regression model [21], y = Φx + e, where Φ ∈Rn×p is the design matrix containing predictors, y ∈Rn are responses2, and e ∈Rn contain independent zero-mean Gaussian noise e ∼N(e; 0, σ2In). Following [21] we assume3, xj|σ2, λ2, ∼ λ 2 √ σ2 exp  − λ √ σ2 ∥xj∥1  , σ2 ∼InvGamma(σ2; a, b), λ2 ∼Gamma(λ2; r, s) While the Lasso estimates [23] provide only the posterior modes of the regression parameters x ∈ Rp, Bayesian Lasso [21] provides the complete posterior distribution p(x, θ|y), from which one may obtain whatever statistical properties are desired of x and θ, including the posterior mode, mean, median, and credible intervals. Since in our approach variational Gaussian approximation is performed separately (see Section 3.1) for each hyperparameter {λ, σ2} considered, the efficiency of approximating p(x|y, θ) is particularly important. The upper bound of the KL divergence derived in Section 3.2 provides an approximate closed-form solution, that is often accurate enough or requires a small number of gradient iterations to converge to optimality. The tightness of the upper bound is analyzed using spectral-norm bounds (See Section 3.3), which also provide insights on the connection between the deterministic Lasso [23] and the Bayesian Lasso [21]. 3.1 Variational Gaussian Approximation The conditional distribution of y and x given θ is p(y, x|θ) = λp/(2σ)p √ (2πσ2)n exp n −∥y−Φx∥2 2σ2 −λ σ∥x∥1 o . (10) The postulated approximation, q(x|θ, y) = N(x; µ, D), is a multivariate Gaussian density (dropping dependencies of variational parameters (µ, D) on (θ, y) for brevity), whose parameters (µ, D) are found by minimizing the KL divergence to p(x|θ, y), g(µ, D) Def. = KL(q(x; µ, D)∥p(x|y, θ)) = R q(x; µ, D) ln q(x;µ,D) p(x|y,θ) dx = R q(x; µ, D) ln q(x;µ,D) p(y,x|θ) dx + ln p(y|θ), = −1 2ln|D|+ ∥y−Φµ∥2+tr(Φ′ΦD) 2σ2 + λ σ Eq(∥x∥1) + ln p(y|θ) −ln ψ(σ2, λ) Eq(∥x∥1) = Pp j=1  µj −2µjΨ(hj) + 2 p djψ(hj)  , hj = −µj p dj, dj = Djj (11) where ψ(σ2, λ) = (4πeλ2σ−2)p/2(2πσ2)−n/2, Ψ(·) and ψ(·) corresponds to the standard normal cumulative distribution function and probability density function, respectively. Expectation is taken with respect to q(x; µ, D). Define D = CCT , where C is the Cholesky factorization of the covariance matrix D. Since g(µ, D) is convex in the parameter space (µ, C), a global optimal variational Gaussian approximation q⋆(x|y, θ) is guaranteed, which achieves the minimum KL divergence to p(x|θ, y) within the family of multivariate Gaussian densities specified [13]4. 2We assume that both y and the columns of Φ have been mean-centered to remove the intercept term. 3[21] suggested using scaled double-exponential priors under which they showed that p(x, σ2|y, λ) is unimodal, further, the unimodality helps to accelerate convergence of the data-augmentation Gibbs sampler and makes the posterior mode more meaningful. Gamma prior is put on λ2 for conjugacy. 4Code for variational Gaussian approximation is available at mloss.org/software/view/308 4 As a first step, one finds q⋆(x|y, θ) using gradient based procedures independently for each hyperparameter combinations {λ, σ2}. Second, q⋆(θ|y) can be evaluated analytically using either (6) or (7); both will yield a finite mixture of Gaussian distribution for the marginal posterior q(x|y) via numerical integration, which is highly efficient since we only have two hyperparameters in Bayesian Lasso. Finally, the evidence lower bound (ELBO) in (1) can also be evaluated analytically after simple algebra. We will show in Section 4.3 a comparison with the mean-field variational Bayesian (VB) approach, derived based on a scale normal mixture representation [22] of the Laplace prior. 3.2 Upper Bounds of KL divergence We provide an approximate solution (ˆµ, ˆD) via minimizing an upper bound of KL divergence (11). This solution solves a Lasso problem in µ, and has a closed-form expression for D, making this computationally efficient. In practice, it could serve as an initialization for gradient procedures. Lemma 3.1. (Triangle Inequality) Eq∥x∥1 ≤Eq∥x −µ∥1 + ∥µ∥1, where Eq∥x −µ∥1 = p 2/π Pp j=1 p dj, with the expectation taken with respect to q(x; µ, D). Lemma 3.2. For any {dj ≥0}p j=1, it holds qPp j=1 d2 j ≤Pp j=1 dj ≤ q p Pp j=1 d2 j. Lemma 3.3. [24] For any A ∈Sp ++, tr(A2) ≤tr(A) ≤√p tr(A2). Theorem 3.1. (Upper and Lower bound) For any A, D ∈Sp ++, A = √ D5, dj = Djj holds 1 √ptr(A) ≤Pp j=1 p dj ≤√p tr(A). Applying Lemma 3.1 and Theorem 3.1 in (11), one obtains an upper bound for KL divergence, f(µ, D) = ∥y −Φµ∥2 2 2σ2 + λ σ ∥µ∥1 | {z } f1(µ) + −1 2 ln |D| + tr(Φ′ΦD) 2σ2 + λ σ r 2p π tr( √ D) | {z } f2(D) + ln p(y|θ) ψ(σ2,λ) ≥g(µ, D) = KL(q(x; µ, D)∥p(x|y, θ)) (12) In the problem of minimizing the KL divergence g(µ, CCT ), one needs to iteratively update µ and C, since they are coupled. However, the upper bound f(µ, D) decouples into two additive terms: f1 is a function of µ while f2 is a function of D, which greatly simplifies the minimization. • The minimization of f1(µ) is a convex Lasso problem. Using path-following algorithms (e.g., a modified least angle regression algorithm (LARS) [25]), one can efficiently compute the entire solution path of Lasso estimates as a function of λ0 = 2λσ in one shot. Global optimal solutions for ˆµ(θk) on each grid point θk ∈G can be recovered using the piece-wise linear property. • The function f2(D) is convex in the parameter space A = √ D, whose minimizer is in closedform and can be found by setting the gradient to zero and solving the resulting equation, ∇Af2 = −A−1 + Φ′ΦA σ2 + λ q 2p π I = 0, ˆA = q λ2p 2πσ2 I + q λ2p 2πσ2 I + Φ′Φ σ2 −1 , (13) We have ˆD = ˆA2, which is guaranteed to be a positive definite matrix. Note that the global optimum ˆD(θk) for each grid point θk ∈G have the same eigenvectors as the Gram matrix Φ′Φ and differ only in eigenvalues. For j = 1, . . . , p, denote the eigenvalues of D and Φ′Φ as αj and βj, respectively. By (13), we have αj = λ p p/(2πσ2) + p λ2p/(2πσ2) + βj/σ2. Therefore, one can pre-compute the eigenvectors once, and only update the eigenvalues as a function of θk. This will make the computation efficient both in time and memory. The solutions (ˆµ, ˆD) which minimize the KL upper bound f(ˆµ, ˆD) in (12) achieves its global optimum. Meanwhile, it is also accurate in the sense of the KL divergence g(ˆµ, ˆD) in (11), as we will show next. Tightness analysis of the upper bound is also provided, using trace norm bounds. 5Since D is positive definite, it has a unique symmetric square root A = √ D, which can be obtained from D by taking square root of the eigenvalues. 5 3.3 Theoretical Anlaysis Theorem 3.2. (KL Divergence Upper Bound) Let (ˆµ, ˆD) be the minimizer of the KL upper bound(12), i.e., ˆµ solves the Lasso and ˆD is given in (13). Then g(ˆµ, ˆD) ≤minµ,D f(µ, D) = f1(ˆµ) + f2( ˆD) + ln p(y|θ) ψ(σ2,λ) (14) where f1(ˆµ) = minµ  ∥y−Φµ∥2 2 2σ2 + λ σ∥µ∥1  , f2( ˆD) = P j ln αj+P j βjα−2 j 2σ2 +P j q 2λ2n π (αj)−1. Thus the KL divergence for (ˆµ, ˆD) is upper bounded by the minimum achievable ℓ1-penalized least square error ϵ1 = f1(ˆµ) and terms in f2( ˆD) which are ultimately related to the eigenvalues {βj} (j = 1, . . . , p) of the Gram matrix Φ′Φ. Let (µ∗, D∗) be the minimizer of the original KL divergence g(µ, D), and g1(µ|D) collect the terms of g(µ, D) that are related to µ. Then the Bayesian posterior mean obtained via VG, i.e., µ∗= argminµ g1(µ|D∗) = argminµ Eq(x|y,θ) ∥y −Φx∥2 2 + 2λσ∥x∥1  , (15) is a counterpart of the deterministic Lasso [23], which appears naturally in the upper bound, ˆµ = argminµ f1(µ) = argminµ ∥y −Φµ∥2 2 + 2λσ∥µ∥1  (16) Note that the Lasso solution cannot be found by gradient methods due to non-differentiability. By taking the expectation, the objective function is smoothed around 0 and thus differentiable. This connection indicates that in VG for Bayesian Lasso, the conditions of deterministic Lasso hold on average, with respect to the variational distribution q(x|y, θ), in the parameter space of µ. The following theorem (proof sketches are in the Supplementary Material) provides quantitative measures of the closeness of the upper bounds, f1(µ) and f(µ, D), to their respective true counterparts. Theorem 3.3. The tightness of f1(µ) and f(µ, D) is given by g1(µ|D) −f1(µ) ≤tr(Φ′ΦD) 2σ2 + λ σ q 2p π tr( √ D), f(µ, D) −g(µ, D) ≤2λ σ q 2p π tr( √ D)(17) which holds for any (µ, D) ∈Rp × Sp ++. Further assume g(µ∗, D∗) = ϵ2 (minimum achievable KL divergence, or information gap), we have f1(µ∗) ≤g1(µ∗) ≤g1(ˆµ) ≤ϵ1 + tr(Φ′ΦD)/(2σ2) + λ p 2p/(σ2π)tr( p ˆD) (18a) g(ˆµ, ˆD) ≤f(ˆµ, ˆD) ≤f(µ∗, D∗) ≤ϵ2 + 2λ p 2p/(σ2π)tr( √ D∗) (18b) 4 Experiments We consider long runs of MCMC 6 as reference solutions, and consider two types of INF-VB: INFVB-1 calculates hyperparameter posteriors using (6); while INF-VB-2 uses (7) and evaluates it at the posterior mode of p(x|y, θ). We also compare INF-VB-1 and INF-VB-2 to VB, a mean-field variational Bayes (VB) solution (See Supplementary Material for update equations). The results show that the INF-VB method is more accurate than VB, and is a promising alternative to MCMC for Bayesian Lasso. 4.1 Synthetic Dataset We compare the proposed INF-VB methods with VB and intensive MCMC runs, in terms of the joint posterior q(λ2, σ2|y) , the marginal posteriors of hyper-parameters q(σ2|y) and q(λ2|y), and the marginal posteriors of regression coefficients q(xj|y) (see Figure 1). The observations are generated from yi = φT i x + ϵi, i = 1, . . . , 600, where φij are drawn from an i.i.d. normal distribution7, where the pairwise correlation between the jth and the kth columns of Φ is 0.5|j−k|; we draw ϵi ∼N(0, σ2), xj|λ, σ ∼Laplace(λ/σ), j = 1, . . . , 300, and set σ2 = 0.5, λ = 0.5. 6In all experiments shown here, we take intensive MCMC runs as the gold standard (with 5 × 103 burn-ins and 5 × 105 samples collected). We use data-augmentation Gibbs sampler introduced in [21]. Ground truth for latent variables and hyper-parameter are also compared to whenever possible. The hyperparameters for Gamma distributions are set to a = b = r = s = 0.001 through all these experiments. If not mentioned, the grid size is 50 × 50, which is uniformly created around the ordinary least square (OLS) estimates of hyper-parameters. 7The responses y and the columns of Φ are centered; the columns of Φ are also scaled to have unit variance 6 λ2 σ2 0.15 0.2 0.25 0.3 0.35 0.35 0.4 0.45 0.5 0.55 0.6 MCMC Ground Truth λ2 σ2 0.15 0.2 0.25 0.3 0.35 0.35 0.4 0.45 0.5 0.55 0.6 VB Ground Truth λ2 σ2 0.15 0.2 0.25 0.3 0.35 0.35 0.4 0.45 0.5 0.55 0.6 INF−VB−1 Ground Truth λ2 σ2 0.15 0.2 0.25 0.3 0.35 0.35 0.4 0.45 0.5 0.55 0.6 INF−VB−2 Ground Truth (a) (b) (c) (d) 0.3 0.4 0.5 0.6 0.7 0 5 10 15 20 σ2 q(σ2|y) MCMC INF−VB−1 INF−VB−2 VB Ground Truth 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 5 10 15 20 25 30 λ2 q(λ2|y) MCMC INF−VB−1 INF−VB−2 VB Ground Truth −1.2 −1.1 −1 −0.9 −0.8 0 2 4 6 8 x1 q(x1|y) MCMC INF−VB−1 INF−VB−2 VB Ground Truth −0.2 −0.1 0 0.1 0 2 4 6 8 10 x2 q(x2|y) MCMC INF−VB−1 INF−VB−2 VB Ground Truth (e) (f) (g) (h) Figure 1: Contour plots for joint posteriors of hyperparameters q(σ2, λ2|y): (a)-(d); Marginal posterior of hyperparameters and coefficients: (e) q(σ2|y), (f)q(λ2|y); (g) q(x1|y), (h)q(x2|y) See Figure 1(a)-(d), both MCMC and INF-VB preserve the strong posterior dependence among hyperparameters, while mean-field VB cannot. While mean-field VB approximates the posterior mode well, the posterior variance can be (sometimes severely) underestimated, see Figure 1(e), (f). Since we have analytically approximated p(x|y) by a finite mixture of normal distribution q(x|y, θ) with mixing weights q(θ|y), the posterior marginals for the latent variables: q(xj|y) are easily accessible from this analytical representation. Perhaps surprisingly, both INF-VB and mean-field VB provide quite accurate marginal distributions q(xj|y), see Figure 1(j)-(h) for examples. The differences in the tails of q(θ|y) between INF-VB and mean-field VB yield negligible differences in the marginal distributions q(xj|y), when θ is integrated out. 4.2 Diabetes Dataset We consider the benchmark diabetes dataset [25] frequently used in previous studies of Bayesian Lasso; see [21, 26], for example. The goal of this diagnostic study, as suggested in [25], is to construct a linear regression model (n = 442, p = 10) to reveal the important determinants of the response, and to provide interpretable results to guide disease progression. In Figure 2, we show accurate marginal posteriors of hyperparameters q(σ2|y) and q(λ2|y) as well as marginals of coefficients q(xj|y), j = 1, . . . , 10, which indicate the relevance of each predictor. We also compared them to the ordinary least square (OLS) estimates. 0.8 1 1.2 1.4 0 1 2 3 4 5 6 σ2 q(σ2|y) MCMC INF−VB−1 INF−VB−2 VB OLS 0 1000 2000 3000 4000 0 0.5 1 1.5 2 2.5 x 10 −3 λ2 q(λ2|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.15 −0.1 −0.05 0 0.05 0 5 10 15 x1 (age) q(x1|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.15 −0.1 −0.05 0 0.05 0 5 10 15 x2 (sex) q(x2|y) MCMC INF−VB−1 INF−VB−2 VB OLS (a) (b) (c) (d) −0.1 −0.05 0 0.05 0.1 0 5 10 15 20 x3 (bmi) q(x3|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.1 −0.05 0 0.05 0.1 0 5 10 15 20 x4 (bp) q(x4|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.1 −0.05 0 0.05 0.1 0 5 10 15 20 x5 (tc) q(x5|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.05 0 0.05 0.1 0.15 0 5 10 15 x6 (ldl) q(x6|y) MCMC INF−VB−1 INF−VB−2 VB OLS (e) (f) (g) (h) −0.1 −0.05 0 0.05 0.1 0 5 10 15 20 x7 (hdl) q(x7|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.05 0 0.05 0.1 0.15 0 5 10 15 x8 (tch) q(x8|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.1 −0.05 0 0.05 0.1 0 5 10 15 20 x9 (ltg) q(x9|y) MCMC INF−VB−1 INF−VB−2 VB OLS −0.1 −0.05 0 0.05 0.1 0 5 10 15 20 x10 (glu) q(x10|y) MCMC INF−VB−1 INF−VB−2 VB OLS (i) (j) (k) (l) Figure 2: Posterior marginals of hyperparameters: (a) q(σ2|y) and (b)q(λ2|y); posterior marginals of coefficients: (c)-(l) q(xj|y) (j = 1, . . . , 10) 7 4.3 Comparison: Accuracy and Speed We quantitatively measure the quality of the approximate joint probability q(x, θ|y) provided by our non-factorized variational methods, and compare them to VB under factorization assumptions. The KL divergence KL(q(x, θ|y)|p(x, θ|y)) is not directly available; instead, we compare the negative evidence lower bound (1), which can be evaluated analytically in our case and differs from the KL divergence only up to a constant. We also measure the computational time of different algorithms by elapsed times (seconds). In INF-VB, different grids of sizes m × m are considered, where m = 1, 5, 10, 30, 50. We consider two real world datasets: the above Diabetes dataset, and the Prostate cancer dataset [27]. Here, INF-VB-3 and INF-VB-4 refer to the methods that use the approximate solution in Section 3.2 with no gradient steps for q(x|y, θ), and use (6) or (7) for q(θ|y). 0 10 20 30 40 50 630 635 640 645 650 655 660 665 m Negative ELBO INF−VB−1 INF−VB−2 INF−VB−3 INF−VB−4 VB 0 10 20 30 40 50 0 5 10 15 20 m Elapsed Time (seconds) MCMC INF−VB−1 INF−VB−2 INF−VB−3 INF−VB−4 VB 0 10 20 30 40 50 115 120 125 130 135 140 145 150 m Negative ELBO INF−VB−1 INF−VB−2 INF−VB−3 INF−VB−4 VB 0 10 20 30 40 50 0 5 10 15 m Elapsed Time (seconds) MCMC INF−VB−1 INF−VB−2 INF−VB−3 INF−VB−4 VB (a) (b) (c) (d) Figure 3: Negative evidence lower bound (ELBO) and elapsed time v.s. grid size; (a), (b) for the Diabetes dataset (n = 442, p = 10). (c), (d) for the Prostate cancer dataset (n = 97, p = 8) The quality of variational methods depends on the flexibility of variational distributions. In INF-VB for Bayesian Lasso, we constrain q(x|y, θ) to be parametric and q(θ|y) to be still in free form. See from Figure 3, the accuracy of INF-VB method with a 1×1 grid is worse than mean-field VB, which corresponds to the partial Bayesian learning of q(x|y, θ) with a fixed θ. As the grid size increases, the accuracies of INF-VB (even those without gradient steps) also increase and are in general of better quality than mean-field VB, in the sense of negative ELBO (KL divergence up to a constant). The computational complexities of INF-VB, mean-field VB, and MCMC methods are proportional to the grid size, number of iterations toward local optimum, and the number of runs, respectively. Since the computations on the grid are independent, INF-VB is highly parallelizable, which is an important feature as more multiprocessor computational power becomes available. Besides, one may further reduce its computational load by choosing grid points more economically, which will be pursued in our next step. Even the small datasets we show here for illustration enjoy good speedups. A significant speed-up for INF-VB can be achieved via parallel computing. 5 Discussion We have provided a flexible framework for approximate inference of the full posterior p(x, θ|y) based on a hybrid continuous-discrete variational distribution, which is optimal in the sense of the KL divergence. As a reliable and efficient alternative to MCMC, our method generalizes INLA to non-Gaussian priors and VB to non-factorization settings. While we have used Bayesian Lasso as an example, our inference method is generically applicable. One can also approximate p(x|y, θ) using other methods, such as scalable variational methods [28], or improved EP [29]. The posterior p(θ|y), which is analyzed based on a grid approximation, enables users to do both model averaging and model selection, depending on specific purposes. The discretized approximation of p(θ|y) overcomes the potential non-conjugacy or multimodal issues in the θ space in variational inference, and it also allows parallel implementation of the hybrid continuous-discrete variational approximation with the dominant computational load (approximating the continuous high dimensional q(x|y, θ)) distributed on each grid point, which is particularly important when applying INF-VB to large-scale Bayesian inference. INF-VB has limitations. The number of hyperparameters θ should be no more than 5 to 6, which is the same fundamental limitation of INLA. Acknowledgments The work reported here was supported in part by grants from ARO, DARPA, DOE, NGA and ONR. 8 References [1] D. Gamerman and H. F. Lopes. Markov chain Monte Carlo: stochastic simulation for Bayesian inference. Chapman & Hall Texts in Statistical Science Series. Taylor & Francis, 2006. [2] C. P. Robert and G. Casella. Monte Carlo Statistical Methods (Springer Texts in Statistics). SpringerVerlag New York, Inc., Secaucus, NJ, USA, 2005. [3] R. E. Kass and D. Steffey. Approximate Bayesian inference in conditionally independent hierarchical models (parametric empirical Bayes models). J. Am. Statist. Assoc., 84(407):717–726, 1989. [4] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. In Learning in graphical models, pages 105–161, Cambridge, MA, 1999. MIT Press. [5] T. P. Minka. Expectation propagation for approximate Bayesian inference. In J. S. Breese and D. Koller, editors, Proceedings of the 17th Conference in Uncertainty in Artificial Intelligence, pages 362–369, 2001. [6] J. T. Ormerod. Skew-normal variational approximations for Bayesian inference. Technical Report CRGTR-93-1, School of Mathematics and Statistics, Univeristy of Sydney, 2011. [7] H. Rue, S. Martino, and N. Chopin. Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations. Journal of the Royal Statistical Society: Series B, 71(2):319– 392, 2009. [8] J. Hensman, M. Rattray, and N. D. Lawrence. Fast variational inference in the conjugate exponential family. In Advances in Neural Information Processing Systems, 2012. [9] J. Foulds, L. Boyles, C. Dubois, P. Smyth, and M. Welling. Stochastic collapsed variational Bayesian inference for latent Dirichlet allocation. In 19th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), 2013. [10] J. W. Paisley, D. M. Blei, and M. I. Jordan. Variational Bayesian inference with stochastic search. In International Conference on Machine Learning, 2012. [11] C. Wang and D. M. Blei. Truncation-free online variational inference for Bayesian nonparametric models. In Advances in Neural Information Processing Systems, 2012. [12] S. J. Gershman, M. D. Hoffman, and D. M. Blei. Nonparametric variational inference. In International Conference on Machine Learning, 2012. [13] E. Challis and D. Barber. Concave Gaussian variational approximations for inference in large-scale Bayesian linear models. Journal of Machine Learning Research - Proceedings Track, 15:199–207, 2011. [14] M. E. Khan, S. Mohamed, and K. P. Muprhy. Fast Bayesian inference for non-conjugate Gaussian process regression. In Advances in Neural Information Processing Systems, 2012. [15] M. J. Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, Gatsby Computational Neuroscience Unit, University College London, 2003. [16] C. Ritter and M. A. Tanner. Facilitating the Gibbs sampler: The Gibbs stopper and the griddy-Gibbs sampler. J. Am. Statist. Assoc., 87(419):pp. 861–868, 1992. [17] M. Opper and C. Archambeau. The variational Gaussian approximation revisited. Neural Comput., 21(3):786–792, 2009. [18] E. Challis and D. Barber. Affine independence variational inference. In Advances in Neural Information Processing Systems, 2012. [19] C. M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). SpringerVerlag New York, Inc., Secaucus, NJ, USA, 2006. [20] L. Tierney and J. B. Kadane. Accurate approximations for posterior moments and marginal densities. J. Am. Statist. Assoc., 81:82–86, 1986. [21] T. Park and G. Casella. The Bayesian Lasso. J. Am. Statist. Assoc., 103(482):681–686, 2008. [22] D. F. Andrews and C. L. Mallows. Scale mixtures of normal distributions. Journal of the Royal Statistical Society. Series B, 36(1):pp. 99–102, 1974. [23] R. Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society, Series B, 58:267–288, 1996. [24] G. H. Golub and C. V. Loan. Matrix Computations(Third Edition). Johns Hopkins University Press, 1996. [25] B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani. Least angle regression. Annals of Statistics, 32:407– 499, 2004. [26] C. Hans. Bayesian Lasso regression. Biometrika, 96(4):835–845, 2009. [27] T. Stamey, J. Kabalin, J. McNeal, I. Johnstone, F. Freha, E. Redwine, and N. Yang. Prostate specific antigen in the diagnosis and treatment of adenocarcinoma of the prostate. ii. radical prostatectomy treated patients. Journal of Urology, 16:pp. 1076–1083, 1989. [28] M. W. Seeger and H. Nickisch. Large scale Bayesian inference and experimental design for sparse linear models. SIAM J. Imaging Sciences, 4(1):166–199, 2011. [29] B. Cseke and T. Heskes. Approximate marginals in latent Gaussian models. J. Mach. Learn. Res., 12:417– 454, 2011. 9
2013
26
4,998
Reasoning With Neural Tensor Networks for Knowledge Base Completion Richard Socher∗, Danqi Chen*, Christopher D. Manning, Andrew Y. Ng Computer Science Department, Stanford University, Stanford, CA 94305, USA richard@socher.org, {danqi,manning}@stanford.edu, ang@cs.stanford.edu Abstract Knowledge bases are an important resource for question answering and other tasks but often suffer from incompleteness and lack of ability to reason over their discrete entities and relationships. In this paper we introduce an expressive neural tensor network suitable for reasoning over relationships between two entities. Previous work represented entities as either discrete atomic units or with a single entity vector representation. We show that performance can be improved when entities are represented as an average of their constituting word vectors. This allows sharing of statistical strength between, for instance, facts involving the “Sumatran tiger” and “Bengal tiger.” Lastly, we demonstrate that all models improve when these word vectors are initialized with vectors learned from unsupervised large corpora. We assess the model by considering the problem of predicting additional true relations between entities given a subset of the knowledge base. Our model outperforms previous models and can classify unseen relationships in WordNet and FreeBase with an accuracy of 86.2% and 90.0%, respectively. 1 Introduction Ontologies and knowledge bases such as WordNet [1], Yago [2] or the Google Knowledge Graph are extremely useful resources for query expansion [3], coreference resolution [4], question answering (Siri), information retrieval or providing structured knowledge to users. However, they suffer from incompleteness and a lack of reasoning capability. Much work has focused on extending existing knowledge bases using patterns or classifiers applied to large text corpora. However, not all common knowledge that is obvious to people is expressed in text [5, 6, 2, 7]. We adopt here the complementary goal of predicting the likely truth of additional facts based on existing facts in the knowledge base. Such factual, common sense reasoning is available and useful to people. For instance, when told that a new species of monkeys has been discovered, a person does not need to find textual evidence to know that this new monkey, too, will have legs (a meronymic relationship inferred due to a hyponymic relation to monkeys in general). We introduce a model that can accurately predict additional true facts using only an existing database. This is achieved by representing each entity (i.e., each object or individual) in the database as a vector. These vectors can capture facts about that entity and how probable it is part of a certain relation. Each relation is defined through the parameters of a novel neural tensor network which can explicitly relate two entity vectors. The first contribution of this paper is the new neural tensor network (NTN), which generalizes several previous neural network models and provides a more powerful way to model relational information than a standard neural network layer. The second contribution is to introduce a new way to represent entities in knowledge bases. Previous work [8, 9, 10] represents each entity with one vector. However, does not allow the sharing of ∗Both authors contributed equally. 1 Reasoning about Relations Knowledge Base Relation: has part tail leg …. cat dog …. Relation: type of cat limb …. tiger leg …. tiger … Bengal tiger …. Relation: instance of Does a Bengal tiger have a tail? ( Bengal tiger, has part, tail) Confidence for Triplet R Neural Tensor Network e1 e2 Word Vector Space eye tail leg dog cat tiger Bengal India Figure 1: Overview of our model which learns vector representations for entries in a knowledge base in order to predict new relationship triples. If combined with word representations, the relationships can be predicted with higher accuracy and for entities that were not in the original knowledge base. statistical strength if entity names share similar substrings. Instead, we represent each entity as the average of its word vectors, allowing the sharing of statistical strength between the words describing each entity e.g., Bank of China and China. The third contribution is the incorporation of word vectors which are trained on large unlabeled text. This readily available resource enables all models to more accurately predict relationships. We train on relationships in WordNet and Freebase and evaluate on a heldout set of unseen relational triplets. Our model outperforms previously introduced related models such as those of [8, 9, 10]. Our new model, illustrated in Fig. 1, outperforms previous knowledge base models by a large margin. We will make the code and dataset available at www.socher.org. 2 Related Work The work most similar to ours is that by Bordes et al. [8] and Jenatton et al. [9] who also learn vector representations for entries in a knowledge base. We implement their approach and compare to it directly. Our new model outperforms this and other previous work. We also show that both our and their model can benefit from initialization with unsupervised word vectors. Another related approach is by Sutskever et al. [11] who use tensor factorization and Bayesian clustering for learning relational structures. Instead of clustering the entities in a nonparametric Bayesian framework we rely purely on learned entity vectors. Their computation of the truth of a relation can be seen as a special case of our proposed model. Instead of using MCMC for inference and learning, we use standard forward propagation and backpropagation techniques modified for the NTN. Lastly, we do not require multiple embeddings for each entity. Instead, we consider the subunits (space separated words) of entity names. Our Neural Tensor Network is related to other models in the deep learning literature. Ranzato and Hinton [12] introduced a factored 3-way Restricted Boltzmann Machine which is also parameterized by a tensor. Recently, Yu et al. [13] introduce a model with tensor layers for speech recognition. Their model is a special case of our model and is only applicable inside deeper neural networks. Simultaneously with this paper, we developed a recursive version of this model for sentiment analysis [14]. There is a vast amount of work on extending knowledge bases by parsing external, text corpora [5, 6, 2], among many others. The field of open information extraction [15], for instance, extracts relationships from millions of web pages. This work is complementary to ours; we mainly note that little work has been done on knowledge base extension based purely on the knowledge base itself or with readily available resources but without re-parsing a large corpus. 2 Lastly, our model can be seen as learning a tensor factorization, similar to Nickel et al. [16]. In the comparison of Bordes et al. [17] these factorization methods have been outperformed by energybased models. Many methods that use knowledge bases as features such as [3, 4] could benefit from a method that maps the provided information into vector representations. We learn to modify word representations via grounding in world knowledge. This essentially allows us to analyze word embeddings and query them for specific relations. Furthermore, the resulting vectors could be used in other tasks such as named entity recognition [18] or relation classification in natural language [19]. 3 Neural Models for Reasoning over Relations This section introduces the neural tensor network that reasons over database entries by learning vector representations for them. As shown in Fig. 1, each relation triple is described by a neural network and pairs of database entities which are given as input to that relation’s model. The model returns a high score if they are in that relationship and a low one otherwise. This allows any fact, whether implicit or explicitly mentioned in the database to be answered with a certainty score. We first describe our neural tensor model and then show that many previous models are special cases of it. 3.1 Neural Tensor Networks for Relation Classification The goal is to learn models for common sense reasoning, the ability to realize that some facts hold purely due to other existing relations. Another way to describe the goal is link prediction in an existing network of relationships between entity nodes. The goal of our approach is to be able to state whether two entities (e1, e2) are in a certain relationship R. For instance, whether the relationship (e1, R, e2) = (Bengal tiger, has part, tail) is true and with what certainty. To this end, we define a set of parameters indexed by R for each relation’s scoring function. Let e1, e2 ∈Rd be the vector representations (or features) of the two entities. For now we can assume that each value of this vector is randomly initialized to a small uniformly random number. The Neural Tensor Network (NTN) replaces a standard linear neural network layer with a bilinear tensor layer that directly relates the two entity vectors across multiple dimensions. The model computes a score of how likely it is that two entities are in a certain relationship by the following NTN-based function: g(e1, R, e2) = uT Rf  eT 1 W [1:k] R e2 + VR  e1 e2  + bR  , (1) where f = tanh is a standard nonlinearity applied element-wise, W [1:k] R ∈Rd×d×k is a tensor and the bilinear tensor product eT 1 W [1:k] R e2 results in a vector h ∈Rk, where each entry is computed by one slice i = 1, . . . , k of the tensor: hi = eT 1 W [i] R e2. The other parameters for relation R are the standard form of a neural network: VR ∈Rk×2d and U ∈Rk, bR ∈Rk. Linear Slices of Standard Bias Layer Tensor Layer Layer UT f( e1 T W[1:2] e2 + V + b ) e1 e2 f + + Neural Tensor Layer Figure 2: Visualization of the Neural Tensor Network. Each dashed box represents one slice of the tensor, in this case there are k = 2 slices. Fig. 2 shows a visualization of this model. The main advantage is that it can relate the two inputs multiplicatively instead of only implicitly through the nonlinearity as with standard neural networks where the entity vectors are simply concatenated. Intuitively, we can see each slice of the tensor as being responsible for one type of entity pair or instantiation of a relation. For instance, the model could learn that both animals and mechanical entities such as cars can have parts (i.e., (car, has part, x)) from different parts of the semantic word vector space. In our experiments, we show that this results in improved performance. Another way to interpret each tensor slice is that it mediates the relationship between the two entity vectors differently. 3 3.2 Related Models and Special Cases We now introduce several related models in increasing order of expressiveness and complexity. Each model assigns a score to a triplet using a function g measuring how likely the triplet is correct. The ideas and strengths of these models are combined in our new Neural Tensor Network defined above. Distance Model. The model of Bordes et al. [8] scores relationships by mapping the left and right entities to a common space using a relationship specific mapping matrix and measuring the L1 distance between the two. The scoring function for each triplet has the following form: g(e1, R, e2) = ∥WR,1e1 −WR,2e2∥1, where WR,1, WR,2 ∈Rd×d are the parameters of relation R’s classifier. This similarity-based model scores correct triplets lower (entities most certainly in a relation have 0 distance). All other functions are trained to score correct triplets higher. The main problem with this model is that the parameters of the two entity vectors do not interact with each other, they are independently mapped to a common space. Single Layer Model. The second model tries to alleviate the problems of the distance model by connecting the entity vectors implicitly through the nonlinearity of a standard, single layer neural network. The scoring function has the following form: g(e1, R, e2) = uT Rf (WR,1e1 + WR,2e2) = uT Rf  [WR,1WR,2]  e1 e2  , where f = tanh, WR,1, WR,2 ∈Rk×d and uR ∈Rk×1 are the parameters of relation R’s scoring function. While this is an improvement over the distance model, the non-linearity only provides a weak interaction between the two entity vectors at the expense of a harder optimization problem. Collobert and Weston [20] trained a similar model to learn word vector representations using words in their context. This model is a special case of the tensor neural network if the tensor is set to 0. Hadamard Model. This model was introduced by Bordes et al. [10] and tackles the issue of weak entity vector interaction through multiple matrix products followed by Hadamard products. It is different to the other models in our comparison in that it represents each relation simply as a single vector that interacts with the entity vectors through several linear products all of which are parameterized by the same parameters. The scoring function is as follows: g(e1, R, e2) = (W1e1 ⊗Wrel,1eR + b1)T (W2e2 ⊗Wrel,2eR + b2) where W1, Wrel,1, W2, Wrel,2 ∈Rd×d and b1, b2 ∈Rd×1 are parameters that are shared by all relations. The only relation specific parameter is eR. While this allows the model to treat relational words and entity words the same way, we show in our experiments that giving each relationship its own matrix operators results in improved performance. However, the bilinear form between entity vectors is by itself desirable. Bilinear Model. The fourth model [11, 9] fixes the issue of weak entity vector interaction through a relation-specific bilinear form. The scoring function is as follows: g(e1, R, e2) = eT 1 WRe2, where WR ∈Rd×d are the only parameters of relation R’s scoring function. This is a big improvement over the two previous models as it incorporates the interaction of two entity vectors in a simple and efficient way. However, the model is now restricted in terms of expressive power and number of parameters by the word vectors. The bilinear form can only model linear interactions and is not able to fit more complex scoring functions. This model is a special case of NTNs with VR = 0, bR = 0, k = 1, f = identity. In comparison to bilinear models, the neural tensor has much more expressive power which will be useful especially for larger databases. For smaller datasets the number of slices could be reduced or even vary between relations. 3.3 Training Objective and Derivatives All models are trained with contrastive max-margin objective functions. The main idea is that each triplet in the training set T (i) = (e(i) 1 , R(i), e(i) 2 ) should receive a higher score than a triplet in which one of the entities is replaced with a random entity. There are NR many relations, indexed by R(i) for each triplet. Each relation has its associated neural tensor net parameters. We call the triplet 4 with a random entity corrupted and denote the corrupted triplet as T (i) c = (e(i) 1 , R(i), ec), where we sampled entity ec randomly from the set of all entities that can appear at that position in that relation. Let the set of all relationships’ NTN parameters be Ω= u, W, V, b, E. We minimize the following objective: J(Ω) = N X i=1 C X c=1 max  0, 1 −g  T (i) + g  T (i) c  + λ∥Ω∥2 2, where N is the number of training triplets and we score the correct relation triplet higher than its corrupted one up to a margin of 1. For each correct triplet we sample C random corrupted triplets. We use standard L2 regularization of all the parameters, weighted by the hyperparameter λ. The model is trained by taking derivatives with respect to the five groups of parameters. The derivatives for the standard neural network weights V are the same as in general backpropagation. Dropping the relation specific index R, we have the following derivative for the j’th slice of the full tensor: ∂g(e1, R, e2) ∂W [j] = ujf ′(zj)e1eT 2 , where zj = eT 1 W [j]e2 + Vj·  e1 e2  + bj, where Vj· is the j’th row of the matrix V and we defined zj as the j’th element of the k-dimensional hidden tensor layer. We use minibatched L-BFGS for optimization which converges to a local optimum of our non-convex objective function. We also experimented with AdaGrad but found that it performed slightly worse. 3.4 Entity Representations Revisited All the above models work well with randomly initialized entity vectors. In this section we introduce two further improvements: representing entities by their word vectors and initializing word vectors with pre-trained vectors. Previous work [8, 9, 10] assigned a single vector representation to each entity of the knowledge base, which does not allow the sharing of statistical strength between the words describing each entity. Instead, we model each word as a d-dimensional vector ∈Rd and compute an entity vector as the composition of its word vectors. For instance, if the training data includes a fact that homo sapiens is a type of hominid and this entity is represented by two vectors vhomo and vsapiens, we may extend the fact to the previously unseen homo erectus, even though its second word vector for erectus might still be close to its random initialization. Hence, for a total number of NE entities consisting of NW many unique words, if we train on the word level (the training error derivatives are also back-propagated to these word vectors), and represent entities by word vectors, the full embedding matrix has dimensionality E ∈Rd×NW . Otherwise we represent each entity as an atomic single vector and train the entity embedding matrix E ∈Rd×NE. We represent the entity vector by averaging its word vectors. For example, vhomo sapiens = 0.5(vhomo+vsapiens). We have also experimented with Recursive Neural Networks (RNNs) [21, 19] for the composition. In the WordNet subset over 60% of the entities have only a single word and over 90% have less or equal to 2 words. Furthermore, most of the entities do not exhibit a clear compositional structure, e.g., people names in Freebase. Hence, RNNs did not show any distinct improvement over simple averaging and we will not include them in the experimental results. Training word vectors has the additional advantage that we can benefit from pre-trained unsupervised word vectors, which in general capture some distributional syntactic and semantic information. We will analyze how much it helps to use these vectors for initialization in Sec. 4.2. Unless otherwise specified, we use the d = 100-dimensional vectors provided by [18]. Note that our approach does not explicitly deal with polysemous words. One possible future extension is to incorporate the idea of multiple word vectors per word as in Huang et al. [22]. 4 Experiments Experiments are conducted on both WordNet [1] and FreeBase [23] to predict whether some relations hold using other facts in the database. This can be seen as common sense reasoning [24] over known facts or link prediction in relationship networks. For instance, if somebody was born 5 in London, then their nationality would be British. If a German Shepard is a dog, it is also a vertebrate. Our models can obtain such knowledge (with varying degrees of accuracy) by jointly learning relationship classifiers and entity representations. We first describe the datasets, then compare the above models and conclude with several analyses of important modeling decisions, such as whether to use entity vectors or word vectors. 4.1 Datasets Dataset #R. # Ent. # Train # Dev # Test Wordnet 11 38,696 112,581 2,609 10,544 Freebase 13 75,043 316,232 5,908 23,733 Table 1: The statistics for WordNet and Freebase including number of different relations #R. Table 1 gives the statistics of the databases. For WordNet we use 112,581 relational triplets for training. In total, there are 38,696 unique entities in 11 different relations. One important difference to previous work is our dataset generation which filters trivial test triplets. We filter out tuples from the testing set if either or both of their two entities also appear in the training set in a different relation or order. For instance, if (e1, similar to, e2) appears in training set, we delete (e2, similar to, e1) and (e1, type of, e2), etc from the testing set. In the case of synsets containing multiple words, we pick the first, most frequent one. For FreeBase, we use the relational triplets from People domain, and extract 13 relations. We remove 6 of them (place of death, place of birth, location, parents, children, spouse) from the testing set since they are very difficult to predict, e.g., the name of somebody’s spouse is hard to infer from other knowledge in the database. It is worth noting that the setting of FreeBase is profoundly different from WordNet’s. In WordNet, e1 and e2 can be arbitrary entities; but in FreeBase, e1 is restricted to be a person’s name, and e2 can only be chosen from a finite answer set. For example, if R = gender, e2 can only be male or female; if R = nationality, e2 can only be one of 188 country names. All the relations for testing and their answer set sizes are shown in Fig. 3. We use a different evaluation set from [8] because it has become apparent to us and them that there were issues of overlap between their training and testing sets which impacted the quality and interpretability of their evaluation. 4.2 Relation Triplets Classification Our goal is to predict correct facts in the form of relations (e1, R, e2) in the testing data. This could be seen as answering questions such as Does a dog have a tail?, using the scores g(dog, has part, tail) computed by the various models. We use the development set to find a threshold TR for each relation such that if g(e1, R, e2) ≥TR, the relation (e1, R, e2) holds, otherwise it does not hold. In order to create a testing set for classification, we randomly switch entities from correct testing triplets resulting in a total of 2×#Test triplets with equal number of positive and negative examples. In particular, we constrain the entities from the possible answer set for Freebase by only allowing entities in a position if they appeared in that position in the dataset. For example, given a correct triplet (Pablo Picaso, nationality, Spain), a potential negative example is (Pablo Picaso, nationality, United States). We use the same way to generate the development set. This forces the model to focus on harder cases and makes the evaluation harder since it does not include obvious non-relations such as (Pablo Picaso, nationality, Van Gogh). The final accuracy is based on how many triplets are classified correctly. Model Comparisons We first compare the accuracy among different models. In order to get the highest accuracy for all the models, we cross-validate using the development set to find the best hyperparameters: (i) vector initialization (see next section); (ii) regularization parameter λ = 0.0001; (iii) the dimensionality of the hidden vector (for the single layer and NTN models d = 100) and (iv) number of training iterations T = 500. Finally, the number of slices was set to 4 in our NTN model. Table 2 shows the resulting accuracy of each model. Our Neural Tensor Network achieves an accuracy of 86.2% on the Wordnet dataset and 90.0% on Freebase, which is at least 2% higher than the bilinear model and 4% higher than the Single Layer Model. 6 Model WordNet Freebase Avg. Distance Model 68.3 61.0 64.7 Hadamard Model 80.0 68.8 74.4 Single Layer Model 76.0 85.3 80.7 Bilinear Model 84.1 87.7 85.9 Neural Tensor Network 86.2 90.0 88.1 Table 2: Comparison of accuracy of the different models described in Sec. 3.2 on both datasets. 70 75 80 85 90 95 100 has instance type of member meronym member holonym part of has part subordinate instance of domain region synset domain topic similar to domain topic WordNet Accuracy (%) 70 75 80 85 90 95 100 gender (2) nationality (188) profession (455) institution (727) cause of death (170) religion (107) ethnicity (211) FreeBase Accuracy (%) Figure 3: Comparison of accuracy of different relations on both datasets. For FreeBase, the number in the bracket denotes the size of possible answer set. First, we compare the accuracy among different relation types. Fig. 3 reports the accuracy of each relation on both datasets. Here we use our NTN model for evaluation, other models generally have a lower accuracy and a similar distribution among different relations. The accuracy reflects the difficulty of inferring a relationship from the knowledge base. On WordNet, the accuracy varies from 75.5% (domain region) to 97.5% (subordinate instance of). Reasoning about some relations is more difficult than others, for instance, the relation (dramatic art, domain region, closed circuit television) is much more vague than the relation (missouri, subordinate instance of, river). Similarly, the accuracy varies from 77.2% (institution) to 96.6% (gender) in FreeBase. We can see that the two easiest relations for reasoning are gender and nationality, and the two most difficult ones are institution and cause of death. Intuitively, we can infer the gender and nationality from the name, location, or profession of a person, but we hardly infer a person’s cause of death from all other information. We now analyze the choice of entity representations and also the influence of word initializations. As explained in Sec. 3.4, we compare training entity vectors (E ∈Rd×NE) and training word vectors (E ∈Rd×NW ), where an entity vector is computed as the average of word vectors. Furthermore, we compare random initialization and unsupervised initialization for training word vectors. In summary, we explore three options: (i) entity vectors (EV); (ii) randomly initialized word vectors (WV); (iii) word vectors initialized with unsupervised word vectors (WV-init). Fig. 4 shows the various models and their performance with these three settings. We observe that word vectors consistently and significantly outperform entity vectors on WordNet and this also holds in most cases on FreeBase. It might be because the entities in WordNet share more common words. Furthermore, we can see that most of the models have improved accuracy with initialization from unsupervised word vectors. Even with random initialization, our NTN model with training word vectors can reach high classification accuracy: 84.7% and 88.9% on WordNet and Freebase respectively. In other words, our model is still able to perform good reasoning without external textual resources. 4.3 Examples of Reasoning We have shown that our model can achieve high accuracy when predicting whether a relational triplet is true or not. In this section, we give some example predictions. In particular, we are interested in how the model does transitive reasoning across multiple relationships in the knowledge base. First, we demonstrate examples of relationship predictions by our Neural Tensor Network on WordNet. We select the first entity and a relation and then sort all the entities (represented by their word 7 Distance Hadamard Single Layer Bilinear NTN 50 55 60 65 70 75 80 85 90 WordNet Accuracy (%) EV WV WV−init Distance Hadamard Single Layer Bilinear NTN 60 65 70 75 80 85 90 95 FreeBase Accuracy (%) EV WV WV−init Figure 4: Influence of entity representations. EV: entity vectors. WV: randomly initialized word vectors. WV-init: word vectors initialized with unsupervised semantic word vectors. Entity e1 Relationship R Sorted list of entities likely to be in this relationship tube type of structure; anatomical structure; device; body; body part; organ creator type of individual; adult; worker; man; communicator; instrumentalist dubrovnik subordinate instance of city; town; city district; port; river; region; island armed forces domain region military operation; naval forces; military officier; military court boldness has instance audaciousness; aggro; abductor; interloper; confession; peole type of group; agency; social group; organisation; alphabet; race Table 3: Examples of a ranking by the model for right hand side entities in WordNet. The ranking is based on the scores that the neural tensor network assigns to each triplet. vector averages) by descending scores that the model assigns to the complete triplet. Table 3 shows some examples for several relations, and most of the inferred relations among them are plausible. Francesco Guicciardini historian male Italy Florence Francesco Patrizi Matteo Rosselli profession gender place of birth nationality location nationality nationality gender Figure 5: A reasoning example in FreeBase. Black lines denote relationships given in training, red lines denote relationships the model inferred. The dashed line denotes word vector sharing. Fig. 5 illustrates a real example from FreeBase in which a person’s information is inferred from the other relations provided in training. Given place of birth is Florence and profession is historian, our model can accurately predict that Francesco Guicciardini’s gender is male and his nationality is Italy. These might be infered from two pieces of common knowledge: (i) Florence is a city of Italy; (ii) Francesco is a common name among males in Italy. The key is how our model can derive these facts from the knowledge base itself, without the help of external information. For the first fact, some relations such as Matteo Rosselli has location Florence and nationality Italy exist in the knowledge base, which might imply the connection between Florence and Italy. For the second fact, we can see that many other people e.g., Francesco Patrizi are shown Italian or male in the FreeBase, which might imply that Francesco is a male or Italian name. It is worth noting that we do not have an explicit relation between Francesco Guicciardini and Francesco Patrizi; the dashed line in Fig. 5 shows the benefits from the sharing via word representations. 5 Conclusion We introduced Neural Tensor Networks for knowledge base completion. Unlike previous models for predicting relationships using entities in knowledge bases, our model allows mediated interaction of entity vectors via a tensor. The model obtains the highest accuracy in terms of predicting unseen relationships between entities through reasoning inside a given knowledge base. It enables the extension of databases even without external textual resources. We further show that by representing entities through their constituent words and initializing these word representations using readily available word vectors, performance of all models improves substantially. Potential path for future work include scaling the number of slices based on available training data for each relation and extending these ideas to reasoning over free text. 8 Acknowledgments Richard is partly supported by a Microsoft Research PhD fellowship. The authors gratefully acknowledge the support of a Natural Language Understanding-focused gift from Google Inc., the Defense Advanced Research Projects Agency (DARPA) Deep Exploration and Filtering of Text (DEFT) Program under Air Force Research Laboratory (AFRL) prime contract no. FA8750-13-2-0040, the DARPA Deep Learning program under contract number FA8650-10-C-7020 and NSF IIS-1159679. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the view of DARPA, AFRL, or the US government. References [1] G.A. Miller. WordNet: A Lexical Database for English. Communications of the ACM, 1995. [2] F. M. Suchanek, G. Kasneci, and G. Weikum. Yago: a core of semantic knowledge. In Proceedings of the 16th international conference on World Wide Web, 2007. [3] J. Graupmann, R. Schenkel, and G. Weikum. The SphereSearch engine for unified ranked retrieval of heterogeneous XML and web documents. In Proceedings of the 31st international conference on Very large data bases, VLDB, 2005. [4] V. Ng and C. Cardie. Improving machine learning approaches to coreference resolution. In ACL, 2002. [5] R. Snow, D. Jurafsky, and A. Y. Ng. Learning syntactic patterns for automatic hypernym discovery. In NIPS, 2005. [6] A. Fader, S. Soderland, and O. Etzioni. Identifying relations for open information extraction. In EMNLP, 2011. [7] G. Angeli and C. D. Manning. Philosophers are mortal: Inferring the truth of unseen facts. In CoNLL, 2013. [8] A. Bordes, J. Weston, R. Collobert, and Y. Bengio. Learning structured embeddings of knowledge bases. In AAAI, 2011. [9] R. Jenatton, N. Le Roux, A. Bordes, and G. Obozinski. A latent factor model for highly multi-relational data. In NIPS, 2012. [10] A. Bordes, X. Glorot, J. Weston, and Y. Bengio. Joint Learning of Words and Meaning Representations for Open-Text Semantic Parsing. AISTATS, 2012. [11] I. Sutskever, R. Salakhutdinov, and J. B. Tenenbaum. Modelling relational data using Bayesian clustered tensor factorization. In NIPS, 2009. [12] M. Ranzato and A. Krizhevsky G. E. Hinton. Factored 3-Way Restricted Boltzmann Machines For Modeling Natural Images. AISTATS, 2010. [13] D. Yu, L. Deng, and F. Seide. Large vocabulary speech recognition using deep tensor neural networks. In INTERSPEECH, 2012. [14] R. Socher, A. Perelygin, J. Wu, J. Chuang, C. D. Manning, A. Ng, and C. Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013. [15] A. Yates, M. Banko, M. Broadhead, M. J. Cafarella, O. Etzioni, and S. Soderland. Textrunner: Open information extraction on the web. In HLT-NAACL (Demonstrations), 2007. [16] M. Nickel, V. Tresp, and H. Kriegel. A three-way model for collective learning on multirelational data. In ICML, 2011. [17] A. Bordes, N. Usunier, A. Garca-Durn, J. Weston, and O. Yakhnenko. Irreflexive and hierarchical relations as translations. CoRR, abs/1304.7158, 2013. [18] J. Turian, L. Ratinov, and Y. Bengio. Word representations: a simple and general method for semi-supervised learning. In Proceedings of ACL, pages 384–394, 2010. [19] R. Socher, B. Huval, C. D. Manning, and A. Y. Ng. Semantic Compositionality Through Recursive Matrix-Vector Spaces. In EMNLP, 2012. [20] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks with multitask learning. In ICML, 2008. 9 [21] R. Socher, E. H. Huang, J. Pennington, A. Y. Ng, and C. D. Manning. Dynamic Pooling and Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS. MIT Press, 2011. [22] E. H. Huang, R. Socher, C. D. Manning, and A. Y. Ng. Improving Word Representations via Global Context and Multiple Word Prototypes. In ACL, 2012. [23] K. Bollacker, C. Evans, P. Paritosh, T. Sturge, and J. Taylor. Freebase: a collaboratively created graph database for structuring human knowledge. In Proceedings of the 2008 ACM SIGMOD international conference on Management of data, SIGMOD, 2008. [24] N. Tandon, G. de Melo, and G. Weikum. Deriving a web-scale commonsense fact database. In AAAI Conference on Artificial Intelligence (AAAI 2011), 2011. 10
2013
260
4,999
Deep content-based music recommendation A¨aron van den Oord, Sander Dieleman, Benjamin Schrauwen Electronics and Information Systems department (ELIS), Ghent University {aaron.vandenoord, sander.dieleman, benjamin.schrauwen}@ugent.be Abstract Automatic music recommendation has become an increasingly relevant problem in recent years, since a lot of music is now sold and consumed digitally. Most recommender systems rely on collaborative filtering. However, this approach suffers from the cold start problem: it fails when no usage data is available, so it is not effective for recommending new and unpopular songs. In this paper, we propose to use a latent factor model for recommendation, and predict the latent factors from music audio when they cannot be obtained from usage data. We compare a traditional approach using a bag-of-words representation of the audio signals with deep convolutional neural networks, and evaluate the predictions quantitatively and qualitatively on the Million Song Dataset. We show that using predicted latent factors produces sensible recommendations, despite the fact that there is a large semantic gap between the characteristics of a song that affect user preference and the corresponding audio signal. We also show that recent advances in deep learning translate very well to the music recommendation setting, with deep convolutional neural networks significantly outperforming the traditional approach. 1 Introduction In recent years, the music industry has shifted more and more towards digital distribution through online music stores and streaming services such as iTunes, Spotify, Grooveshark and Google Play. As a result, automatic music recommendation has become an increasingly relevant problem: it allows listeners to discover new music that matches their tastes, and enables online music stores to target their wares to the right audience. Although recommender systems have been studied extensively, the problem of music recommendation in particular is complicated by the sheer variety of different styles and genres, as well as social and geographic factors that influence listener preferences. The number of different items that can be recommended is very large, especially when recommending individual songs. This number can be reduced by recommending albums or artists instead, but this is not always compatible with the intended use of the system (e.g. automatic playlist generation), and it disregards the fact that the repertoire of an artist is rarely homogenous: listeners may enjoy particular songs more than others. Many recommender systems rely on usage patterns: the combinations of items that users have consumed or rated provide information about the users’ preferences, and how the items relate to each other. This is the collaborative filtering approach. Another approach is to predict user preferences from item content and metadata. The consensus is that collaborative filtering will generally outperform content-based recommendation [1]. However, it is only applicable when usage data is available. Collaborative filtering suffers from the cold start problem: new items that have not been consumed before cannot be recommended. Additionally, items that are only of interest to a niche audience are more difficult to recommend because usage data is scarce. In many domains, and especially in music, they comprise the majority of 1 Artists with positive values Artists with negative values 1 Justin Bieber, Alicia Keys, Maroon 5, John Mayer, Michael Bubl´e The Kills, Interpol, Man Man, Beirut, the bird and the bee 2 Bonobo, Flying Lotus, Cut Copy, Chromeo, Boys Noize Shinedown, Rise Against, Avenged Sevenfold, Nickelback, Flyleaf 3 Phoenix, Crystal Castles, Muse, R¨oyksopp, Paramore Traveling Wilburys, Cat Stevens, Creedence Clearwater Revival, Van Halen, The Police Table 1: Artists whose tracks have very positive and very negative values for three latent factors. The factors seem to discriminate between different styles, such as indie rock, electronic music and classic rock. the available items, because the users’ consumption patterns follow a power law [2]. Content-based recommendation is not affected by these issues. 1.1 Content-based music recommendation Music can be recommended based on available metadata: information such as the artist, album and year of release is usually known. Unfortunately this will lead to predictable recommendations. For example, recommending songs by artists that the user is known to enjoy is not particularly useful. One can also attempt to recommend music that is perceptually similar to what the user has previously listened to, by measuring the similarity between audio signals [3, 4]. This approach requires the definition of a suitable similarity metric. Such metrics are often defined ad hoc, based on prior knowledge about music audio, and as a result they are not necessarily optimal for the task of music recommendation. Because of this, some researchers have used user preference data to tune similarity metrics [5, 6]. 1.2 Collaborative filtering Collaborative filtering methods can be neighborhood-based or model-based [7]. The former methods rely on a similarity measure between users or items: they recommend items consumed by other users with similar preferences, or similar items to the ones that the user has already consumed. Modelbased methods on the other hand attempt to model latent characteristics of the users and items, which are usually represented as vectors of latent factors. Latent factor models have been very popular ever since their effectiveness was demonstrated for movie recommendation in the Netflix Prize [8]. 1.3 The semantic gap in music Latent factor vectors form a compact description of the different facets of users’ tastes, and the corresponding characteristics of the items. To demonstrate this, we computed latent factors for a small set of usage data, and listed some artists whose songs have very positive and very negative values for each factor in Table 1. This representation is quite versatile and can be used for other applications besides recommendation, as we will show later (see Section 5.1). Since usage data is scarce for many songs, it is often impossible to reliably estimate these factor vectors. Therefore it would be useful to be able to predict them from music audio content. There is a large semantic gap between the characteristics of a song that affect user preference, and the corresponding audio signal. Extracting high-level properties such as genre, mood, instrumentation and lyrical themes from audio signals requires powerful models that are capable of capturing the complex hierarchical structure of music. Additionally, some properties are impossible to obtain from audio signals alone, such as the popularity of the artist, their reputation and and their location. Researchers in the domain of music information retrieval (MIR) concern themselves with extracting these high-level properties from music. They have grown to rely on a particular set of engineered audio features, such as mel-frequency cepstral coefficients (MFCCs), which are used as input to simple classifiers or regressors, such as SVMs and linear regression [9]. Recently this traditional approach has been challenged by some authors who have applied deep neural networks to MIR problems [10, 11, 12]. 2 In this paper, we strive to bridge the semantic gap in music by training deep convolutional neural networks to predict latent factors from music audio. We evaluate our approach on an industrialscale dataset with audio excerpts of over 380,000 songs, and compare it with a more conventional approach using a bag-of-words feature representation for each song. We assess to what extent it is possible to extract characteristics that affect user preference directly from audio signals, and evaluate the predictions from our models in a music recommendation setting. 2 The dataset The Million Song Dataset (MSD) [13] is a collection of metadata and precomputed audio features for one million contemporary songs. Several other datasets linked to the MSD are also available, featuring lyrics, cover songs, tags and user listening data. This makes the dataset suitable for a wide range of different music information retrieval tasks. Two linked datasets are of interest for our experiments: • The Echo Nest Taste Profile Subset provides play counts for over 380,000 songs in the MSD, gathered from 1 million users. The dataset was used in the Million Song Dataset challenge [14] last year. • The Last.fm dataset provides tags for over 500,000 songs. Traditionally, research in music information retrieval (MIR) on large-scale datasets was limited to industry, because large collections of music audio cannot be published easily due to licensing issues. The authors of the MSD circumvented these issues by providing precomputed features instead of raw audio. Unfortunately, the audio features provided with the MSD are of limited use, and the process by which they were obtained is not very well documented. The feature set was extended by Rauber et al. [15], but the absence of raw audio data, or at least a mid-level representation, is still an issue. However, we were able to attain 29 second audio clips for over 99% of the dataset from 7digital.com. Due to its size, the MSD allows for the music recommendation problem to be studied in a more realistic setting than was previously possible. It is also worth noting that the Taste Profile Subset is one of the largest collaborative filtering datasets that are publicly available today. 3 Weighted matrix factorization The Taste Profile Subset contains play counts per song and per user, which is a form of implicit feedback. We know how many times the users have listened to each of the songs in the dataset, but they have not explicitly rated them. However, we can assume that users will probably listen to songs more often if they enjoy them. If a user has never listened to a song, this can have many causes: for example, they might not be aware of it, or they might expect not to enjoy it. This setting is not compatible with traditional matrix factorization algorithms, which are aimed at predicting ratings. We used the weighted matrix factorization (WMF) algorithm, proposed by Hu et al. [16], to learn latent factor representations of all users and items in the Taste Profile Subset. This is a modified matrix factorization algorithm aimed at implicit feedback datasets. Let rui be the play count for user u and song i. For each user-item pair, we define a preference variable pui and a confidence variable cui (I(x) is the indicator function, α and ϵ are hyperparameters): pui = I(rui > 0), (1) cui = 1 + α log(1 + ϵ−1rui). (2) The preference variable indicates whether user u has ever listened to song i. If it is 1, we will assume the user enjoys the song. The confidence variable measures how certain we are about this particular preference. It is a function of the play count, because songs with higher play counts are more likely to be preferred. If the song has never been played, the confidence variable will have a low value, because this is the least informative case. The WMF objective function is given by: 3 min x⋆,y⋆ X u,i cui(pui −xT u yi)2 + λ X u ||xu||2 + X i ||yi||2 ! , (3) where λ is a regularization parameter, xu is the latent factor vector for user u, and yi is the latent factor vector for song i. It consists of a confidence-weighted mean squared error term and an L2 regularization term. Note that the first sum ranges over all users and all songs: contrary to matrix factorization for rating prediction, where terms corresponding to user-item combinations for which no rating is available can be discarded, we have to take all possible combinations into account. As a result, using stochastic gradient descent for optimization is not practical for a dataset of this size. Hu et al. propose an efficient alternating least squares (ALS) optimization method, which we used instead. 4 Predicting latent factors from music audio Predicting latent factors for a given song from the corresponding audio signal is a regression problem. It requires learning a function that maps a time series to a vector of real numbers. We evaluate two methods to achieve this: one follows the conventional approach in MIR by extracting local features from audio signals and aggregating them into a bag-of-words (BoW) representation. Any traditional regression technique can then be used to map this feature representation to the factors. The other method is to use a deep convolutional network. Latent factor vectors obtained by applying WMF to the available usage data are used as ground truth to train the prediction models. It should be noted that this approach is compatible with any type of latent factor model that is suitable for large implicit feedback datasets. We chose to use WMF because an efficient optimization procedure exists for it. 4.1 Bag-of-words representation Many MIR systems rely on the following feature extraction pipeline to convert music audio signals into a fixed-size representation that can be used as input to a classifier or regressor [5, 17, 18, 19, 20]: • Extract MFCCs from the audio signals. We computed 13 MFCCs from windows of 1024 audio frames, corresponding to 23 ms at a sampling rate of 22050 Hz, and a hop size of 512 samples. We also computed first and second order differences, yielding 39 coefficients in total. • Vector quantize the MFCCs. We learned a dictionary of 4000 elements with the K-means algorithm and assigned all MFCC vectors to the closest mean. • Aggregate them into a bag-of-words representation. For every song, we counted how many times each mean was selected. The resulting vector of counts is a bag-of-words feature representation of the song. We then reduced the size of this representation using PCA (we kept enough components to retain 95% of the variance) and used linear regression and a multilayer perceptron with 1000 hidden units on top of this to predict latent factors. We also used it as input for the metric learning to rank (MLR) algorithm [21], to learn a similarity metric for content-based recommendation. This was used as a baseline for our music recommendation experiments, which are described in Section 5.2. 4.2 Convolutional neural networks Convolutional neural networks (CNNs) have recently been used to improve on the state of the art in speech recognition and large-scale image classification by a large margin [22, 23]. Three ingredients seem to be central to the success of this approach: • Using rectified linear units (ReLUs) [24] instead of sigmoid nonlinearities leads to faster convergence and reduces the vanishing gradient problem that plagues traditional neural networks with many layers. • Parallellization is used to speed up training, so that larger models can be trained in a reasonable amount of time. We used the Theano library [25] to take advantage of GPU acceleration. 4 • A large amount of training data is required to be able to fit large models with many parameters. The MSD contains enough training data to be able to train large models effectively. We have also evaluated the use of dropout regularization [26], but this did not yield any significant improvements. We first extracted an intermediate time-frequency representation from the audio signals to use as input to the network. We used log-compressed mel-spectrograms with 128 components and the same window size and hop size that we used for the MFCCs (1024 and 512 audio frames respectively). The networks were trained on windows of 3 seconds sampled randomly from the audio clips. This was done primarily to speed up training. To predict the latent factors for an entire clip, we averaged over the predictions for consecutive windows. Convolutional neural networks are especially suited for predicting latent factors from music audio, because they allow for intermediate features to be shared between different factors, and because their hierarchical structure consisting of alternating feature extraction layers and pooling layers allows them to operate on multiple timescales. 4.3 Objective functions Latent factor vectors are real-valued, so the most straightforward objective is to minimize the mean squared error (MSE) of the predictions. Alternatively, we can also continue to minimize the weighted prediction error (WPE) from the WMF objective function. Let yi be the latent factor vector for song i, obtained with WMF, and y′ i the corresponding prediction by the model. The objective functions are then (θ represents the model parameters): min θ X i ||yi −y′ i||2, (4) min θ X u,i cui(pui −xT u y′ i)2. (5) 5 Experiments 5.1 Versatility of the latent factor representation To demonstrate the versatility of the latent factor vectors, we compared them with audio features in a tag prediction task. Tags can describe a wide range of different aspects of the songs, such as genre, instrumentation, tempo, mood and year of release. We ran WMF to obtain 50-dimensional latent factor vectors for all 9,330 songs in the subset, and trained a logistic regression model to predict the 50 most popular tags from the Last.fm dataset for each song. We also trained a logistic regression model on a bag-of-words representation of the audio signals, which was first reduced in size using PCA (see Section 4.1). We used 10-fold crossvalidation and computed the average area under the ROC curve (AUC) across all tags. This resulted in an average AUC of 0.69365 for audio-based prediction, and 0.86703 for prediction based on the latent factor vectors. 5.2 Latent factor prediction: quantitative evaluation To assess quantitatively how well we can predict latent factors from music audio, we used the predictions from our models for music recommendation. For every user u and for every song i in the test set, we computed the score xT u yi, and recommended the songs with the highest scores first. As mentioned before, we also learned a song similarity metric on the bag-of-words representation using metric learning to rank. In this case, scores for a given user are computed by averaging similarity scores across all the songs that the user has listened to. The following models were used to predict latent factor vectors: • Linear regression trained on the bag-of-words representation described in Section 4.1. • A multi-layer perceptron (MLP) trained on the same bag-of-words representation. • A convolutional neural network trained on log-scaled mel-spectrograms to minimize the mean squared error (MSE) of the predictions. 5 • The same convolutional neural network, trained to minimize the weighted prediction error (WPE) from the WMF objective instead. Model mAP AUC MLR 0.01801 0.60608 linear regression 0.02389 0.63518 MLP 0.02536 0.64611 CNN with MSE 0.05016 0.70987 CNN with WPE 0.04323 0.70101 Table 2: Results for all considered models on a subset of the dataset containing only the 9,330 most popular songs, and listening data for 20,000 users. For our initial experiments, we used a subset of the dataset containing only the 9,330 most popular songs, and listening data for only 20,000 users. We used 1,881 songs for testing. For the other experiments, we used all available data: we used all songs that we have usage data for and that we were able to download an audio clip for (382,410 songs and 1 million users in total, 46,728 songs were used for testing). We report the mean average precision (mAP, cut off at 500 recommendations per user) and the area under the ROC curve (AUC) of the predictions. We evaluated all models on the subset, using latent factor vectors with 50 dimensions. We compared the convolutional neural network with linear regression on the bag-of-words representation on the full dataset as well, using latent factor vectors with 400 dimensions. Results are shown in Tables 2 and 3 respectively. On the subset, predicting the latent factors seems to outperform the metric learning approach. Using an MLP instead of linear regression results in a slight improvement, but the limitation here is clearly the bag-of-words feature representation. Using a convolutional neural network results in another large increase in performance. Most likely this is because the bag-of-words representation does not reflect any kind of temporal structure. Interestingly, the WPE objective does not result in improved performance. Presumably this is because the weighting causes the importance of the songs to be proportional to their popularity. In other words, the model will be encouraged to predict latent factor vectors for popular songs from the training set very well, at the expense of all other songs. Model mAP AUC random 0.00015 0.49935 linear regression 0.00101 0.64522 CNN with MSE 0.00672 0.77192 upper bound 0.23278 0.96070 Table 3: Results for linear regression on a bag-of-words representation of the audio signals, and a convolutional neural network trained with the MSE objective, on the full dataset (382,410 songs and 1 million users). Also shown are the scores achieved when the latent factor vectors are randomized, and when they are learned from usage data using WMF (upper bound). On the full dataset, the difference between the bag-ofwords approach and the convolutional neural network is much more pronounced. Note that we did not train an MLP on this dataset due to the small difference in performance with linear regression on the subset. We also included results for when the latent factor vectors are obtained from usage data. This is an upper bound to what is achievable when predicting them from content. There is a large gap between our best result and this theoretical maximum, but this is to be expected: as we mentioned before, many aspects of the songs that influence user preference cannot possibly be extracted from audio signals only. In particular, we are unable to predict the popularity of the songs, which considerably affects the AUC and mAP scores. 5.3 Latent factor prediction: qualitative evaluation Evaluating recommender systems is a complex matter, and accuracy metrics by themselves do not provide enough insight into whether the recommendations are sound. To establish this, we also performed some qualitative experiments on the subset. For each song, we searched for similar songs by measuring the cosine similarity between the predicted usage patterns. We compared the usage patterns predicted using the latent factors obtained with WMF (50 dimensions), with those using latent factors predicted with a convolutional neural network. A few songs and their closest matches according to both models are shown in Table 4. When the predicted latent factors are used, the matches are mostly different, but the results are quite reasonable in the sense that the matched songs are likely to appeal to the same audience. Furthermore, they seem to be a bit more varied, which is a useful property for recommender systems. 6 Query Most similar tracks (WMF) Most similar tracks (predicted) Jonas Brothers Hold On Jonas Brothers - Games Miley Cyrus - G.N.O. (Girl’s Night Out) Miley Cyrus - Girls Just Wanna Have Fun Jonas Brothers - Year 3000 Jonas Brothers - BB Good Jonas Brothers - Video Girl Jonas Brothers - Games New Found Glory - My Friends Over You My Chemical Romance - Thank You For The Venom My Chemical Romance - Teenagers Beyonc´e Speechless Beyonc´e - Gift From Virgo Beyonce - Daddy Rihanna / J-Status - Crazy Little Thing Called Love Beyonc´e - Dangerously In Love Rihanna - Haunted Daniel Bedingfield - If You’re Not The One Rihanna - Haunted Alejandro Sanz - Siempre Es De Noche Madonna - Miles Away Lil Wayne / Shanell - American Star Coldplay I Ran Away Coldplay - Careful Where You Stand Coldplay - The Goldrush Coldplay - X & Y Coldplay - Square One Jonas Brothers - BB Good Arcade Fire - Keep The Car Running M83 - You Appearing Angus & Julia Stone - Hollywood Bon Iver - Creature Fear Coldplay - The Goldrush Daft Punk Rock’n Roll Daft Punk - Short Circuit Daft Punk - Nightvision Daft Punk - Too Long (Gonzales Version) Daft Punk - Aerodynamite Daft Punk - One More Time / Aerodynamic Boys Noize - Shine Shine Boys Noize - Lava Lava Flying Lotus - Pet Monster Shotglass LCD Soundsystem - One Touch Justice - One Minute To Midnight Table 4: A few songs and their closest matches in terms of usage patterns, using latent factors obtained with WMF and using latent factors predicted by a convolutional neural network. Shaggy Dangerdoom Eminem Ice Cube Featuring Mack 10 And Ms Toi D-12 Eminem Method Man Cypress Hill Justin Timberlake Featuring T.I. Eminem Eminem Sugar Ray feat. Super Cat Baby Boy Da Prince / P. Town Moe Lil Wayne Eminem Fabolous / The-Dream Lil Scrappy Calle 13 50 Cent Baby Bash Swizz Beatz Young Jeezy / Akon Kanye West Tech N9ne Terror Squad / Remy / Fat Joe The Streets OutKast Big Kuntry King Wiz Khalifa The Roots / Common Usher featuring Jay Z Ludacris Binary Star Black Eyed Peas / Papa Roach Jill Scott Bubba Sparxxx Brandon Heath Binary Star DJ Khaled The Ethiopians Puff Daddy Black Eyed Peas The Lonely Island / T-Pain Baby Bash / Akon Fort Minor (Featuring Black Thought Of The Roots And Styles Of Beyond) Will Smith Swizz Beatz Mystikal Yung Joc featuring Gorilla Zoe Fugees Big Tymers 50 Cent Eminem Don Omar Michael Franti & Spearhead / Cherine Anderson The Lonely Island Soulja Boy Tell’em / Sammie T.I. The Notorious B.I.G. Gang Starr Hot Chip DMX Jurassic 5 Cam’Ron / Juelz Santana / Un Kasa Eminem / DMX / Obie Trice Bonobo Dangerdoom Common / Kanye West Yung Joc featuring Gorilla Zoe Black Eyed Peas Mike Jones Lupe Fiasco Ying Yang Twins ft. Lil Jon & The East Side Boyz A Tribe Called Quest M. Pokora Swizz Beatz Alliance Ethnik Calle 13 Gorillaz Calle 13 DMX Tech N9NE Collabos featuring Big Scoob, Krizz Kaliko Calle 13 The Notorious B.I.G. Rick Ross Shaggy / Ricardo Ducent California Swag District Girl Talk D4L Collie Buddz Sexion d’Assaut DMX Lupe Fiasco The Notorious B.I.G. Sean Paul Westside Connection Featuring Nate Dogg Redman Jay-Z / John Legend Jordan Francis/Roshon Bernard Fegan Gang Starr Bow Wow Cam’Ron / Juelz Santana / Freekey Zeekey / Toya Shaggy / Brian & Tony Gold EPMD / Nocturnal Eminem Eminem Guru Common Ignition Slick Rick Danger Doom Ratatat Diddy - Dirty Money / T.I. Kanye West / GLC / Consequence Common Jay-Z Daddy Yankee / Randy Eminem / Dina Rae Nas / Damian ”Jr. Gong” Marley Fort Minor (Featuring Styles Of Beyond) Common / Kanye West New Edition Jay-Z Buju Banton Method Man / Busta Rhymes Gotan Project Prince & The New Power Generation Linkin Park Ying Yang Twins ft. Pitbull Wax Tailor The Notorious B.I.G. LL Cool J The Notorious B.I.G. Usher Slum Village Gym Class Heroes Plies Method Man Company Flow Louis Smith The Presidents of the United States of America Kim Carnes Easy Star All-Stars The Rolling Stones Steve Winwood Nick Drake The Doors The Cars The Contours Velvet Underground & Nico War The Grass Roots Eric Clapton Wild Cherry Metallica Creedence Clearwater Revival Marvin Gaye Tom Petty And The Heartbreakers No Doubt Bill Medley & Jennifer Warnes Ramones Yeah Yeah Yeahs The Chills Crosby, Stills & Nash R.E.M. Creedence Clearwater Revival Bachman-Turner Overdrive The Doors Journey Cream Miriam Makeba Motrhead Enigma Parliament David Bowie Flight Of The Conchords Louis Prima And Keely Smith Steel Pulse Regina Spektor The Velvet Underground Pepper Cher Fleetwood Mac Steely Dan Tom Petty And The Heartbreakers Ricchi E Poveri Eddy Grant The Statler Brothers Huey Lewis & The News Chris Rea Vienio & Pele Bread Traveling Wilburys The Killers Metallica Prince Charlelie Couture Bobby Helms Bill Withers Love Labelle (featuring Patti Labelle) Modest Mouse James Taylor Jimi Hendrix Ray LaMontagne The Kills Steve Miller Band The Animals Against Me! Vanilla Ice Steely Dan Tommy James And The Shondells Beastie Boys Noir Dsir The Turtles Cat Stevens Labi Siffre The Mercury Program Creedence Clearwater Revival Barry Manilow The Hives Billy Joel The Black Keys The Runaways Re-up Gang Crosby, Stills, Nash & Young Tom Petty The Mamas & The Papas Cheap TrickThe Turtles Laura Branigan The dB’s Insane Clown Posse Freda Payne Gipsy Kings Pinback Marty Stuart Warren Zevon The Black Keys Mud Kings Of Leon Ray LaMontagne Bee Gees Happy Mondays Blue Swede Weezer The Doobie Brothers Graham Nash Steve Miller Band The Police Van McCoy Eric Clapton Europe The Four Seasons Rose Royce Cat Stevens Easy Star All-Stars The Police ZZ Top Fleetwood Mac Billy Idol Patrice Rushen The Monkees John Waite Weird Al Yankovic Dexys Midnight Runners Bodo Wartke Creedence Clearwater Revival Estopa PAULA COLE Steve Miller Thelma Houston Bootsy Collins Sam & Dave Prince & The Revolution Lonesome River Band Joan Jett & The Blackhearts Ruben Blades Aerosmith Beyonc Destiny’s Child Rilo Kiley Tokio Hotel Kardinal Offishall / Akon Ace of Base Jem Dragonette Madonna Flo Rida Miranda Lambert Cline Dion Mariah Carey Rihanna / J-Status Amy Winehouse Alicia Keys Amy Winehouse Lady GaGa Lady GaGa Fergie Pretty Ricky Passion Pit Mylo Mariah Carey Belanova Sugarland Aaliyah Yeah Yeah Yeahs The Corrs Beyonc Sia Christina Aguilera The-Dream Mase Vanessa Carlton Alicia Keys Daniel Bedingfield The Veronicas Flo Rida Beyonc The Pussycat Dolls / Busta Rhymes Alejandro Sanz Lady GaGa Santigold Young Money Julieta Venegas A Dueto Con Dante Rilo Kiley Rusko The Pussycat Dolls Cheryl Cole Justin Bieber Kelly Clarkson Avril Lavigne Shakira Beyonc The-Dream Jack White & Alicia Keys Beyonc Lady GaGa Aneta Langerova Brandy Young Money featuring Lloyd Emilia Plies Gretchen Wilson Mariah Carey Ashanti Taylor Swift Kylie Minogue Marc Anthony;Jennifer Lopez Beyonce Gym Class Heroes Taylor Swift Eve / Truth Hurts Boys Like Girls featuring Taylor Swift Jack Johnson Timbaland / Keri Hilson / D.O.E. Jay-Z Rihanna LMFAO Monica featuring Tyrese Chris Brown featuring T-Pain Lupe Fiasco feat. Nikki Jean Justin Bieber Mariah Carey Shakira Mariah Carey Britney Spears Keri Hilson / Lil Wayne Beyonc Kat DeLuna Colbie Caillat Kesha Tito El Bambino Next La Roux Miley Cyrus Two Door Cinema Club Mariah Carey Avril Lavigne Donavon Frankenreiter Juvenile / Mannie Fresh / Lil Wayne Britney Spears featuring Ying Yang Twins Erykah Badu Thievery Corporation Yael Nam Beyonc Taylor Swift Sugarland Alicia Keys The-Dream Kristinia DeBarge Lil Wayne / Shanell Beyonc Portishead Aqua Chris Brown Gwen Stefani / Eve Usher featuring Beyonc Mariah Carey Beyonc I Wayne Owl City Justin Bieber / Usher Fergie / Ludacris Chris Brown Leona Lewis Flyleaf Rudeboy Records Nelly / Jaheim Madonna Lindsay Lohan Ashlee Simpson Linkin Park Kelly Clarkson Britney Spears Way Out West Ronski Speed Bonobo Boys Noize Flying Lotus Flying Lotus Cut Copy Revl9n Dave Aju The Knife ATB Four Tet Flying Lotus ATB Basshunter Junior Senior Holy Fuck Imogen Heap Basshunter Hot Chip Peaches LCD Soundsystem Daft Punk Cirrus Perfect Stranger Sander Van Doorn Friendly Fires Vitalic LCD Soundsystem Digitalism Steps Mr. Oizo The Knife Filo + Peri Daft Punk Stardust Chromeo Alex Gaudino Feat. Shena Daft Punk Eric Prydz Four Tet Justice Showtek Boys Noize Safri Duo Kelis Daft Punk Cut Copy KC And The Sunshine Band Lange Ida Corr Vs Fedde Le Grand Crystal Castles Simian Mobile Disco Crystal Castles Johan Gielen Gorillaz The Postal Service Telefon Tel Aviv Armand Van Helden & A-TRAK Present Duck Sauce Chromeo Daft Punk Bassholes Daft Punk Trentemller Gorillaz Miike Snow Alaska Y Dinarama Basshunter James Blake Toro Y Moi Foals Delerium feat. Sarah McLachlan Kate Ryan Animal Collective DHT Feat. Edme Daft Punk Irene Cara Airwave Boys Noize Radiohead Junior Boys Sub Focus The Prodigy Panic! At The Disco Telefon Tel Aviv LCD Soundsystem LCD Soundsystem Arctic Monkeys Figure 1: t-SNE visualization of the distribution of predicted usage patterns, using latent factors predicted from audio. A few close-ups show artists whose songs are projected in specific areas. We can discern hip-hop (red), rock (green), pop (yellow) and electronic music (blue). This figure is best viewed in color. Following McFee et al. [5], we also visualized the distribution of predicted usage patterns in two dimensions using t-SNE [27]. A few close-ups are shown in Figure 1. Clusters of songs that appeal to the same audience seem to be preserved quite well, even though the latent factor vectors for all songs were predicted from audio. 6 Related work Many researchers have attempted to mitigate the cold start problem in collaborative filtering by incorporating content-based features. We review some recent work in this area of research. 7 Wang et al. [28] extend probabilistic matrix factorization (PMF) [29] with a topic model prior on the latent factor vectors of the items, and apply this model to scientific article recommendation. Topic proportions obtained from the content of the articles are used instead of latent factors when no usage data is available. The entire system is trained jointly, allowing the topic model and the latent space learned by matrix factorization to adapt to each other. Our approach is sequential instead: we first obtain latent factor vectors for songs for which usage data is available, and use these to train a regression model. Because we reduce the incorporation of content information to a regression problem, we are able to use a deep convolutional network. McFee et al. [5] define an artist-level content-based similarity measure for music learned from a sample of collaborative filter data using metric learning to rank [21]. They use a variation on the typical bag-of-words approach for audio feature extraction (see section 4.1). Their results corroborate that relying on usage data to train the model improves content-based recommendations. For audio data they used the CAL10K dataset, which consists of 10,832 songs, so it is comparable in size to the subset of the MSD that we used for our initial experiments. Weston et al. [17] investigate the problem of recommending items to a user given another item as a query, which they call ‘collaborative retrieval’. They optimize an item scoring function using a ranking loss and describe a variant of their method that allows for content features to be incorporated. They also use the bag-of-words approach to extract audio features and evaluate this method on a large proprietary dataset. They find that combining collaborative filtering and content-based information does not improve the accuracy of the recommendations over collaborative filtering alone. Both McFee et al. and Weston et al. optimized their models using a ranking loss. We have opted to use quadratic loss functions instead, because we found their optimization to be more easily scalable. Using a ranking loss instead is an interesting direction of future research, although we suspect that this approach may suffer from the same problems as the WPE objective (i.e. popular songs will have an unfair advantage). 7 Conclusion In this paper, we have investigated the use of deep convolutional neural networks to predict latent factors from music audio when they cannot be obtained from usage data. We evaluated the predictions by using them for music recommendation on an industrial-scale dataset. Even though a lot of characteristics of songs that affect user preference cannot be predicted from audio signals, the resulting recommendations seem to be sensible. We can conclude that predicting latent factors from music audio is a viable method for recommending new and unpopular music. We also showed that recent advances in deep learning translate very well to the music recommendation setting in combination with this approach, with deep convolutional neural networks significantly outperforming a more traditional approach using bag-of-words representations of audio signals. This bag-of-words representation is used very often in MIR, and our results indicate that a lot of research in this domain could benefit significantly from using deep neural networks. References [1] M. Slaney. Web-scale multimedia analysis: Does content matter? MultiMedia, IEEE, 18(2):12–15, 2011. [2] `O. Celma. Music Recommendation and Discovery in the Long Tail. PhD thesis, Universitat Pompeu Fabra, Barcelona, 2008. [3] Malcolm Slaney, Kilian Q. Weinberger, and William White. Learning a metric for music similarity. In Proceedings of the 9th International Conference on Music Information Retrieval (ISMIR), 2008. [4] Jan Schl¨uter and Christian Osendorfer. Music Similarity Estimation with the Mean-Covariance Restricted Boltzmann Machine. In Proceedings of the 10th International Conference on Machine Learning and Applications (ICMLA), 2011. [5] Brian McFee, Luke Barrington, and Gert R. G. Lanckriet. Learning content similarity for music recommendation. IEEE Transactions on Audio, Speech & Language Processing, 20(8), 2012. [6] Richard Stenzel and Thomas Kamps. Improving Content-Based Similarity Measures by Training a Collaborative Model. pages 264–271, London, UK, September 2005. University of London. 8 [7] Francesco Ricci, Lior Rokach, Bracha Shapira, and Paul B. Kantor, editors. Recommender Systems Handbook. Springer, 2011. [8] James Bennett and Stan Lanning. The netflix prize. In Proceedings of KDD cup and workshop, volume 2007, page 35, 2007. [9] Eric J. Humphrey, Juan P. Bello, and Yann LeCun. Moving beyond feature design: Deep architectures and automatic feature learning in music informatics. In Proceedings of the 13th International Conference on Music Information Retrieval (ISMIR), 2012. [10] Philippe Hamel and Douglas Eck. Learning features from music audio with deep belief networks. In Proceedings of the 11th International Conference on Music Information Retrieval (ISMIR), 2010. [11] Honglak Lee, Peter Pham, Yan Largman, and Andrew Ng. Unsupervised feature learning for audio classification using convolutional deep belief networks. In Advances in Neural Information Processing Systems 22. 2009. [12] Sander Dieleman, Phil´emon Brakel, and Benjamin Schrauwen. Audio-based music classification with a pretrained convolutional network. In Proceedings of the 12th International Conference on Music Information Retrieval (ISMIR), 2011. [13] Thierry Bertin-Mahieux, Daniel P.W. Ellis, Brian Whitman, and Paul Lamere. The million song dataset. In Proceedings of the 11th International Conference on Music Information Retrieval (ISMIR), 2011. [14] Brian McFee, Thierry Bertin-Mahieux, Daniel P.W. Ellis, and Gert R.G. Lanckriet. The million song dataset challenge. In Proceedings of the 21st international conference companion on World Wide Web, 2012. [15] Andreas Rauber, Alexander Schindler, and Rudolf Mayer. Facilitating comprehensive benchmarking experiments on the million song dataset. In Proceedings of the 13th International Conference on Music Information Retrieval (ISMIR), 2012. [16] Yifan Hu, Yehuda Koren, and Chris Volinsky. Collaborative filtering for implicit feedback datasets. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, 2008. [17] Jason Weston, Chong Wang, Ron Weiss, and Adam Berenzweig. Latent collaborative retrieval. In Proceedings of the 29th international conference on Machine learning, 2012. [18] Jason Weston, Samy Bengio, and Philippe Hamel. Large-scale music annotation and retrieval: Learning to rank in joint semantic spaces. Journal of New Music Research, 2011. [19] Jonathan T Foote. Content-based retrieval of music and audio. In Voice, Video, and Data Communications, pages 138–147. International Society for Optics and Photonics, 1997. [20] Matthew Hoffman, David Blei, and Perry Cook. Easy As CBA: A Simple Probabilistic Model for Tagging Music. In Proceedings of the 10th International Conference on Music Information Retrieval (ISMIR), 2009. [21] Brian McFee and Gert R. G. Lanckriet. Metric learning to rank. In Proceedings of the 27 th International Conference on Machine Learning, 2010. [22] Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: the shared views of four research groups. Signal Processing Magazine, IEEE, 29(6):82–97, 2012. [23] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, 2012. [24] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), 2010. [25] James Bergstra, Olivier Breuleux, Fr´ed´eric Bastien, Pascal Lamblin, Razvan Pascanu, Guillaume Desjardins, Joseph Turian, David Warde-Farley, and Yoshua Bengio. Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy), June 2010. [26] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. Technical report, University of Toronto, 2012. [27] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(2579-2605):85, 2008. [28] Chong Wang and David M. Blei. Collaborative topic modeling for recommending scientific articles. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, 2011. [29] Ruslan Salakhutdinov and Andriy Mnih. Probabilistic matrix factorization. In Advances in Neural Information Processing Systems, volume 20, 2008. 9
2013
261